there is no vp8 support in youtube.com/html5 page with libwebkit2gtk 2.24 (MSE enabled)
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2019-04-10  Philippe Normand  <pnormand@igalia.com>
2
3         there is no vp8 support in youtube.com/html5 page with libwebkit2gtk 2.24 (MSE enabled)
4         https://bugs.webkit.org/show_bug.cgi?id=196615
5
6         Reviewed by Xabier Rodriguez-Calvar.
7
8         Add vp8.0 and vp9.0 in supported mime-types if the corresponding video decoders are found.
9
10         No new tests, existing web-platform-tests cover this change.
11
12         * platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
13         (WebCore::GStreamerRegistryScanner::initialize):
14
15 2019-04-10  Philippe Normand  <pnormand@igalia.com>
16
17         [GStreamer] Adaptive streaming playback broken with GStreamer < 1.12
18         https://bugs.webkit.org/show_bug.cgi?id=196765
19
20         Reviewed by Xabier Rodriguez-Calvar.
21
22         Without the following patch in gst-plugins-bad, the uridownloader
23         doesn't relay need-context messages to its parent, so in our case
24         the player can't share its context with secondary webkitwebsrc
25         elements and a RELEASE_ASSERT is hit in the WebProcess.
26
27         So the workaround is to use again webkit+ protocol prefixes for
28         GStreamer versions older than 1.12.
29
30         https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/commit/8cf858fb27919e1d631223375f81b98055623733
31
32         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
33         (WebCore::convertToInternalProtocol):
34         (WebCore::MediaPlayerPrivateGStreamer::setPlaybinURL):
35         (WebCore::MediaPlayerPrivateGStreamer::loadFull):
36         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
37         (WebCore::MediaPlayerPrivateGStreamer::wouldTaintOrigin const):
38         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
39         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
40         (webKitWebSrcStart):
41         (webKitWebSrcGetProtocols):
42         (convertPlaybinURI):
43         (webKitWebSrcSetUri):
44         (CachedResourceStreamingClient::responseReceived):
45         (webKitSrcWouldTaintOrigin):
46         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.h:
47
48 2019-04-10  Carlos Garcia Campos  <cgarcia@igalia.com>
49
50         [ATK] Defer the emision of AtkObject::children-changed signal after layout is done
51         https://bugs.webkit.org/show_bug.cgi?id=187948
52
53         Reviewed by Michael Catanzaro.
54
55         The signal AtkObject::children-changed is emitted from AXObjectCache::attachWrapper() and
56         AXObjectCache::detachWrapper(). Both can be called in the middle of a layout, so we need to defer the emission
57         of the signal after the layout is done, to avoid other atk entry points from being called at that point, since
58         most of them update the backing store at the beginning.
59
60         Fixes: accessibility/children-changed-sends-notification.html
61
62         * accessibility/AXObjectCache.cpp:
63         (WebCore::AXObjectCache::performDeferredCacheUpdate): Call platformPerformDeferredCacheUpdate().
64         * accessibility/AXObjectCache.h:
65         * accessibility/atk/AXObjectCacheAtk.cpp:
66         (WebCore::wrapperParent): Helper to get the AtkObject parent of a given WebKitAccessible.
67         (WebCore::AXObjectCache::detachWrapper): Add wrapper to m_deferredDetachedWrapperList.
68         (WebCore::AXObjectCache::attachWrapper): Add object to m_deferredAttachedWrapperObjectList.
69         (WebCore::AXObjectCache::platformPerformDeferredCacheUpdate): Emit AtkObject::children-changed::add for objects
70         in m_deferredAttachedWrapperObjectList and AtkObject::children-changed::remove for wrappers in m_deferredDetachedWrapperList.
71         * accessibility/ios/AXObjectCacheIOS.mm:
72         (WebCore::AXObjectCache::platformPerformDeferredCacheUpdate):
73         * accessibility/mac/AXObjectCacheMac.mm:
74         (WebCore::AXObjectCache::platformPerformDeferredCacheUpdate):
75         * accessibility/win/AXObjectCacheWin.cpp:
76         (WebCore::AXObjectCache::platformPerformDeferredCacheUpdate):
77         * accessibility/wpe/AXObjectCacheWPE.cpp:
78         (WebCore::AXObjectCache::platformPerformDeferredCacheUpdate):
79
80 2019-04-10  Carlos Garcia Campos  <cgarcia@igalia.com>
81
82         [ATK] Test accessibility/insert-children-assert.html is crashing since added in r216980
83         https://bugs.webkit.org/show_bug.cgi?id=172281
84         <rdar://problem/37030990>
85
86         Reviewed by Joanmarie Diggs.
87
88         The crash happens because at some point the test tries to get the anonymous block text, getting the RenderText as
89         first child and RenderFullScreen as last child and the latter doesn't have a node. This is because in atk we do
90         things differently, we don't include the static text elements individually, but parent element uses
91         textUnderElement() to get all the pieces together. We can just turn the asserts into actual nullptr checks.
92
93         Fixes: accessibility/insert-children-assert.html
94
95         * accessibility/AccessibilityRenderObject.cpp:
96         (WebCore::AccessibilityRenderObject::textUnderElement const):
97
98 2019-04-09  Keith Rollin  <krollin@apple.com>
99
100         Unreviewed build maintenance -- update .xcfilelists.
101
102         * DerivedSources-input.xcfilelist:
103         * DerivedSources-output.xcfilelist:
104
105 2019-04-09  Zalan Bujtas  <zalan@apple.com>
106
107         [AutoSizing] Avoid making text paragraphs scroll horizontally when there is a wide table
108         https://bugs.webkit.org/show_bug.cgi?id=196743
109         <rdar://problem/43897551>
110
111         Reviewed by Tim Horton.
112
113         This patch changes the auto size behavior by using fixed constraint (instead of a min/max pair) to compute the content height.
114         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
115         and triggers scrolling the same way the non-auto-sizing mode does.
116
117         * page/FrameView.cpp:
118         (WebCore::FrameView::autoSizeIfEnabled):
119         (WebCore::FrameView::enableAutoSizeMode):
120         * page/FrameView.h:
121         * testing/Internals.cpp:
122         (WebCore::Internals::enableAutoSizeMode):
123         * testing/Internals.h:
124         * testing/Internals.idl:
125
126 2019-04-09  Youenn Fablet  <youenn@apple.com>
127
128         Close service worker database on network process suspension
129         https://bugs.webkit.org/show_bug.cgi?id=196623
130         <rdar://problem/48930869>
131
132         Reviewed by Alex Christensen.
133
134         Add suspend/resume support to SWServer.
135         On suspend, close the service worker database and stop pushing for changes.
136         On resume, push changes if needed.
137
138         * workers/service/server/RegistrationDatabase.cpp:
139         (WebCore::RegistrationDatabase::close):
140         * workers/service/server/RegistrationDatabase.h:
141         (WebCore::RegistrationDatabase::isClosed const): Deleted.
142         * workers/service/server/RegistrationStore.cpp:
143         (WebCore::RegistrationStore::closeDatabase):
144         * workers/service/server/RegistrationStore.cpp:
145         (WebCore::RegistrationStore::pushChangesToDatabase):
146         (WebCore::RegistrationStore::clearAll):
147         (WebCore::RegistrationStore::startSuspension):
148         (WebCore::RegistrationStore::endSuspension):
149         * workers/service/server/RegistrationStore.h:
150         * workers/service/server/SWServer.cpp:
151         (WebCore::SWServer::startSuspension):
152         (WebCore::SWServer::endSuspension):
153         * workers/service/server/SWServer.h:
154
155 2019-04-09  Justin Fan  <justin_fan@apple.com>
156
157         [Web GPU] GPURenderPassEncoder updates: setBlendColor, setViewport, setScissorRect
158         https://bugs.webkit.org/show_bug.cgi?id=196719
159
160         Reviewed by Myles C. Maxfield.
161
162         Implement setBlendColor, setViewport, and setScissorRect for GPURenderPassEncoder.
163
164         Tests: webgpu/viewport-scissor-rect-triangle-strip.html, webgpu/blend-color-triangle-strip.html
165
166         * Modules/webgpu/WebGPURenderPassEncoder.cpp:
167         (WebCore::WebGPURenderPassEncoder::setBlendColor):
168         (WebCore::WebGPURenderPassEncoder::setViewport):
169         (WebCore::WebGPURenderPassEncoder::setScissorRect):
170         * Modules/webgpu/WebGPURenderPassEncoder.h:
171         * Modules/webgpu/WebGPURenderPassEncoder.idl:
172         * platform/graphics/gpu/GPURenderPassEncoder.h:
173         * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
174         (WebCore::GPURenderPassEncoder::setBlendColor):
175         (WebCore::GPURenderPassEncoder::setViewport):
176         (WebCore::GPURenderPassEncoder::setScissorRect):
177
178 2019-04-09  Andy Estes  <aestes@apple.com>
179
180         [Apple Pay] Add release logging to PaymentCoordinator
181         https://bugs.webkit.org/show_bug.cgi?id=196738
182
183         Reviewed by Alex Christensen.
184
185         When allowed, log interactions with PaymentCoordinator to os_log to help diagnose Apple Pay bugs.
186
187         The following information might be logged: names of functions called, merchant API versions,
188         boolean results of canMakePayments(), boolean results of beginPaymentSession(), whether
189         completePaymentSession() was called with a final state result, boolean results of
190         shouldAllowApplePay(), whether a document has evaluated user agent scripts or is running
191         user scripts, and whether a client supports unrestricted Apple Pay.
192
193         * Modules/applepay/PaymentCoordinator.cpp:
194         (WebCore::PaymentCoordinator::supportsVersion const):
195         (WebCore::PaymentCoordinator::canMakePayments):
196         (WebCore::PaymentCoordinator::canMakePaymentsWithActiveCard):
197         (WebCore::PaymentCoordinator::openPaymentSetup):
198         (WebCore::PaymentCoordinator::beginPaymentSession):
199         (WebCore::PaymentCoordinator::completeMerchantValidation):
200         (WebCore::PaymentCoordinator::completeShippingMethodSelection):
201         (WebCore::PaymentCoordinator::completeShippingContactSelection):
202         (WebCore::PaymentCoordinator::completePaymentMethodSelection):
203         (WebCore::PaymentCoordinator::completePaymentSession):
204         (WebCore::PaymentCoordinator::abortPaymentSession):
205         (WebCore::PaymentCoordinator::cancelPaymentSession):
206         (WebCore::PaymentCoordinator::validateMerchant):
207         (WebCore::PaymentCoordinator::didAuthorizePayment):
208         (WebCore::PaymentCoordinator::didSelectPaymentMethod):
209         (WebCore::PaymentCoordinator::didSelectShippingMethod):
210         (WebCore::PaymentCoordinator::didSelectShippingContact):
211         (WebCore::PaymentCoordinator::didCancelPaymentSession):
212         (WebCore::PaymentCoordinator::shouldAllowApplePay const):
213         (WebCore::PaymentCoordinator::shouldAllowUserAgentScripts const):
214         * Modules/applepay/PaymentCoordinatorClient.h:
215         (WebCore::PaymentCoordinatorClient::isAlwaysOnLoggingAllowed const):
216         * platform/Logging.h:
217         * testing/MockPaymentCoordinator.h:
218
219 2019-04-09  John Wilander  <wilander@apple.com>
220
221         Pick up Ad Click Attribution conversions in NetworkResourceLoader::willSendRedirectedRequest()
222         https://bugs.webkit.org/show_bug.cgi?id=196558
223         <rdar://problem/47650245>
224
225         Reviewed by Youenn Fablet.
226
227         Tests: http/tests/adClickAttribution/attribution-conversion-through-cross-site-image-redirect.html
228                http/tests/adClickAttribution/attribution-conversion-through-image-redirect-with-priority.html
229                http/tests/adClickAttribution/attribution-conversion-through-image-redirect-without-priority.html
230
231         The existing API tests were expanded too.
232
233         * html/HTMLAnchorElement.cpp:
234         (WebCore::HTMLAnchorElement::parseAdClickAttribution const):
235            Enhanced the use of AdClickAttribution::MaxEntropy.
236         * loader/AdClickAttribution.cpp:
237         (WebCore::AdClickAttribution::parseConversionRequest):
238             New function to parse and validate URLs with a path starting with
239             /.well-known/ad-click-attribution/.
240         (WebCore::AdClickAttribution::toString const):
241             Added output for the conversion priority for testing purposes.
242         * loader/AdClickAttribution.h:
243         (WebCore::AdClickAttribution::Campaign::isValid const):
244         (WebCore::AdClickAttribution::Conversion::isValid const):
245            Enhanced the use of AdClickAttribution::MaxEntropy.
246
247 2019-04-09  Don Olmstead  <don.olmstead@sony.com>
248
249         [CMake] Apple builds should use ICU_INCLUDE_DIRS
250         https://bugs.webkit.org/show_bug.cgi?id=196720
251
252         Reviewed by Konstantin Tokarev.
253
254         * PlatformMac.cmake:
255
256 2019-04-09  Jer Noble  <jer.noble@apple.com>
257
258         Test for: 196095 Inband Text Track cues interspersed with Data cues can display out of order.
259         https://bugs.webkit.org/show_bug.cgi?id=196097
260
261         Reviewed by Eric Carlson.
262
263         Test: media/track/track-in-band-metadata-display-order.html
264
265         Add a method in Internals to create a TextTrackCueGeneric (which can normally only be created
266         by parsing an in-band media track). This requires adding IDL for TextTrackCueGeneric, and exporting
267         TextTrackCueGeneric for testing.
268
269         Drive-by fixes:
270
271         Add runtime logging to MediaControlTextTrackContainerElement. This necessitates modifying the
272         parentMediaElement() method to take a const Node*, and const_cast that constness away in order to return
273         a HTMLMediaElement*
274
275         TextTrackCue, VTTCue, TextTrackCueGeneric, and DataCue should all use the WTF TypeCasts macros to
276         enable use of is<> and downcast<>.
277
278         * Source/WebCore/CMakeLists.txt:
279         * DerivedSources-input.xcfilelist:
280         * DerivedSources-output.xcfilelist:
281         * DerivedSources.make:
282         * WebCore.xcodeproj/project.pbxproj:
283         * Sources.txt:
284         * html/shadow/MediaControlElementTypes.cpp:
285         (WebCore::parentMediaElement):
286         * html/shadow/MediaControlElementTypes.h:
287         * html/shadow/MediaControlElements.cpp:
288         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
289         (WebCore::MediaControlTextTrackContainerElement::logger const):
290         (WebCore::MediaControlTextTrackContainerElement::logIdentifier const):
291         (WebCore::MediaControlTextTrackContainerElement::logChannel const):
292         * html/shadow/MediaControlElements.h:
293         * html/track/DataCue.h:
294         (isType):
295         * html/track/TextTrackCueGeneric.h:
296         (isType):
297         * html/track/TextTrackCueGeneric.idl: Added.
298         * html/track/VTTCue.h:
299         (isType):
300         * testing/Internals.cpp:
301         (WebCore::Internals::createGenericCue):
302         * testing/Internals.h:
303         * testing/Internals.idl:
304
305 2019-04-09  Sihui Liu  <sihui_liu@apple.com>
306
307         Remove unnecessary network process assertion for IDB close
308         https://bugs.webkit.org/show_bug.cgi?id=196693
309
310         Reviewed by Geoffrey Garen.
311
312         We already took assertion at WebCore::SQLiteDatabase::close.
313
314         * Modules/indexeddb/server/IDBServer.cpp:
315         (WebCore::IDBServer::IDBServer::create):
316         (WebCore::IDBServer::IDBServer::IDBServer):
317         (WebCore::IDBServer::m_quotaManagerGetter): Deleted.
318         (WebCore::IDBServer::IDBServer::closeDatabase): Deleted.
319         (WebCore::IDBServer::IDBServer::didCloseDatabase): Deleted.
320         * Modules/indexeddb/server/IDBServer.h:
321         (WebCore::IDBServer::IDBServer::create): Deleted.
322         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
323         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
324         (WebCore::IDBServer::UniqueIDBDatabase::scheduleShutdownForClose):
325         (WebCore::IDBServer::UniqueIDBDatabase::didShutdownForClose):
326         (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
327         (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):
328         (WebCore::IDBServer::UniqueIDBDatabase::notifyServerAboutClose): Deleted.
329         * Modules/indexeddb/server/UniqueIDBDatabase.h:
330
331 2019-04-09  Eike Rathke  <erack@redhat.com>
332
333         Initialize trackTypeAsString for call to GST_INFO_OBJECT() in TrackType::Text
334         https://bugs.webkit.org/show_bug.cgi?id=196350
335
336         Reviewed by Xabier Rodriguez-Calvar.
337
338         trackTypeAsString was uninitialized in the
339         TrackPrivateBaseGStreamer::TrackType::Text case when calling
340         GST_INFO_OBJECT().
341
342         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
343         (WebCore::MediaPlayerPrivateGStreamer::enableTrack):
344
345 2019-04-09  Carlos Garcia Campos  <cgarcia@igalia.com>
346
347         [ATK] Cleanup WebKitAccessibleHyperlink
348         https://bugs.webkit.org/show_bug.cgi?id=196602
349
350         Reviewed by Michael Catanzaro.
351
352         Cleanups:
353
354          - Rename webkitAccessibleHyperlinkNew() as webkitAccessibleHyperlinkGetOrCreate() and move the code to get/set
355            the object data here.
356          - Use WEBKIT_DEFINE_TYPE instead of custom type registration. This ensures that all CStrings used in private
357            struct are no longer leaked.
358          - Remove all confusing core() functions and simply use webkitAccessibleGetAccessibilityObject().
359          - Use nullptr instead of 0 and other coding style issues.
360
361         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
362         (webkitAccessibleHyperlinkActionDoAction):
363         (webkitAccessibleHyperlinkActionGetNActions):
364         (webkitAccessibleHyperlinkActionGetDescription):
365         (webkitAccessibleHyperlinkActionGetKeybinding):
366         (webkitAccessibleHyperlinkActionGetName):
367         (atk_action_interface_init):
368         (webkitAccessibleHyperlinkGetURI):
369         (webkitAccessibleHyperlinkGetObject):
370         (rangeLengthForObject):
371         (webkitAccessibleHyperlinkGetStartIndex):
372         (webkitAccessibleHyperlinkGetEndIndex):
373         (webkitAccessibleHyperlinkIsValid):
374         (webkitAccessibleHyperlinkGetNAnchors):
375         (webkitAccessibleHyperlinkIsSelectedLink):
376         (webkitAccessibleHyperlinkGetProperty):
377         (webkitAccessibleHyperlinkSetProperty):
378         (webkit_accessible_hyperlink_class_init):
379         (webkitAccessibleHyperlinkGetOrCreate):
380         (core): Deleted.
381         (atkActionInterfaceInit): Deleted.
382         (getRangeLengthForObject): Deleted.
383         (webkitAccessibleHyperlinkFinalize): Deleted.
384         (webkitAccessibleHyperlinkClassInit): Deleted.
385         (webkitAccessibleHyperlinkInit): Deleted.
386         (webkitAccessibleHyperlinkGetType): Deleted.
387         (webkitAccessibleHyperlinkNew): Deleted.
388         (webkitAccessibleHyperlinkGetAccessibilityObject): Deleted.
389         * accessibility/atk/WebKitAccessibleHyperlink.h:
390         * accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp:
391         (webkitAccessibleHyperlinkImplGetHyperlink):
392         (webkitAccessibleHyperlinkImplInterfaceInit):
393
394 2019-04-08  Simon Fraser  <simon.fraser@apple.com>
395
396         Remove some iOS #ifdefs around sticky-related code
397         https://bugs.webkit.org/show_bug.cgi?id=196726
398
399         Reviewed by Zalan Bujtas.
400
401         Now that async overflow scrolling can be enabled on macOS, RenderLayerCompositor::isAsyncScrollableStickyLayer()
402         should not have iOS-only code.
403
404         The answer to the FIXME in RenderLayerCompositor::computeStickyViewportConstraints is obvious: composited
405         overflow:scroll can be the container for sticky. The assertion can be removed.
406
407         * rendering/RenderLayer.cpp: Fix spacing in some logging.
408         (WebCore::outputPaintOrderTreeRecursive):
409         * rendering/RenderLayerCompositor.cpp:
410         (WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer const):
411         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints const):
412
413 2019-04-08  Don Olmstead  <don.olmstead@sony.com>
414
415         [CMake][WinCairo] Separate copied headers into different directories
416         https://bugs.webkit.org/show_bug.cgi?id=196655
417
418         Reviewed by Michael Catanzaro.
419
420         * CMakeLists.txt:
421         * PlatformWin.cmake:
422
423 2019-04-08  Chris Fleizach  <cfleizach@apple.com>
424
425         AX: Automatically compute accessibility labels for Apple Pay buttons
426         https://bugs.webkit.org/show_bug.cgi?id=196661
427
428         Reviewed by Joanmarie Diggs.
429
430         Detect Apple Pay buttons and return a standard role and label for them based on their type.
431
432         Test: accessibility/mac/apple-pay-labels.html
433               accessibility/mac/apple-pay-session-v4.html
434
435         * accessibility/AccessibilityNodeObject.cpp:
436         (WebCore::AccessibilityNodeObject::isControl const):
437         * accessibility/AccessibilityNodeObject.h:
438         * accessibility/AccessibilityRenderObject.cpp:
439         (WebCore::AccessibilityRenderObject::applePayButtonDescription const):
440         (WebCore::AccessibilityRenderObject::titleElementText const):
441         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
442         (WebCore::AccessibilityRenderObject::isApplePayButton const):
443         (WebCore::AccessibilityRenderObject::applePayButtonType const):
444         * accessibility/AccessibilityRenderObject.h:
445         * en.lproj/Localizable.strings:
446         * platform/LocalizedStrings.cpp:
447         (WebCore::AXApplePayPlainLabel):
448         (WebCore::AXApplePayBuyLabel):
449         (WebCore::AXApplePaySetupLabel):
450         (WebCore::AXApplePayDonateLabel):
451         (WebCore::AXApplePayCheckOutLabel):
452         (WebCore::AXApplePayBookLabel):
453         (WebCore::AXApplePaySubscribeLabel):
454         * platform/LocalizedStrings.h:
455
456 2019-04-08  Chris Fleizach  <cfleizach@apple.com>
457
458         AX: Support API: accessibilityReplaceRange:withText
459         https://bugs.webkit.org/show_bug.cgi?id=196636
460
461         Reviewed by Daniel Bates.
462
463         Support this platform API on mac to provide a way to replace a range of editable text.
464
465         Test: accessibility/mac/replace-text-with-range.html
466
467         * accessibility/AccessibilityObject.cpp:
468         (WebCore::AccessibilityObject::replaceTextInRange):
469         * accessibility/AccessibilityObject.h:
470         * accessibility/mac/AccessibilityObjectBase.mm:
471         (WebCore::PlainTextRange::PlainTextRange):
472         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
473         (-[WebAccessibilityObjectWrapper accessibilityReplaceRange:withText:]):
474
475 2019-04-08  Wenson Hsieh  <wenson_hsieh@apple.com>
476
477         [iOS] Do not allow starting selection drags when selection views are not visible
478         https://bugs.webkit.org/show_bug.cgi?id=196686
479         <rdar://problem/49399192>
480
481         Reviewed by Tim Horton.
482
483         See WebKit ChangeLog for more details.
484
485         Tests:  DragAndDropTests.CanDragImageWhenNotFirstResponder
486                 DragAndDropTests.DoNotPerformSelectionDragWhenNotFirstResponder
487
488         * page/DragController.cpp:
489         (WebCore::DragController::draggableElement const):
490
491         Make this respect the case where m_dragSourceAction does not include DragSourceActionSelection. All the other
492         drag source types are currently consulted in this method, with the exception of DragSourceActionSelection.
493
494 2019-04-08  Youenn Fablet  <youenn@apple.com>
495
496         Add a test to check for the service worker process name
497         https://bugs.webkit.org/show_bug.cgi?id=196621
498
499         Reviewed by Chris Dumez.
500
501         Add a service worker internal API to get process name.
502         Covered by updated test.
503
504         * WebCore.xcodeproj/project.pbxproj:
505         * testing/ServiceWorkerInternals.cpp:
506         (WebCore::ServiceWorkerInternals::processName const):
507         * testing/ServiceWorkerInternals.h:
508         * testing/ServiceWorkerInternals.idl:
509         * testing/ServiceWorkerInternals.mm: Added.
510
511 2019-04-08  Yusuke Suzuki  <ysuzuki@apple.com>
512
513         Unreviewed, speculative fix for build failure in old macOS after r243887
514         https://bugs.webkit.org/show_bug.cgi?id=196475
515
516         * dom/NodeList.h:
517
518 2019-04-08  Justin Fan  <justin_fan@apple.com>
519
520         [Web GPU] Fix Web GPU experimental feature on iOS
521         https://bugs.webkit.org/show_bug.cgi?id=196632
522
523         Reviewed by Myles C. Maxfield.
524
525         Add feature conditionals for iOS 11.
526         Properly make Web GPU available on iOS 11+.
527
528         * Configurations/FeatureDefines.xcconfig:
529         * Configurations/WebKitTargetConditionals.xcconfig:
530
531 2019-04-08  Timothy Hatcher  <timothy@apple.com>
532
533         Unreviewed build fix for iOSMac after r243893.
534         https://bugs.webkit.org/show_bug.cgi?id=196707
535
536         * dom/Element.cpp:
537         (WebCore::parentCrossingFrameBoundaries): Remove ENABLE(POINTER_EVENTS) since computedTouchActions()
538         no longer uses parentCrossingFrameBoundaries().
539
540 2019-04-08  Youenn Fablet  <youenn@apple.com>
541
542         Lazily construct Navigator serviceWorker
543         https://bugs.webkit.org/show_bug.cgi?id=196692
544
545         Reviewed by Chris Dumez.
546
547         Make NavigatorBase a ContextDestructionObserver.
548         This allows to get the navigator script execution context.
549         Use it when creating the navigator ServiceWorkerContainer object.
550         For GC, introduce serviceWorkerIfAny which returns the container if created.
551         No JS observable change of behavior.
552         Covered by existing tests.
553
554         * bindings/js/JSNavigatorCustom.cpp:
555         (WebCore::JSNavigator::visitAdditionalChildren):
556         * bindings/js/JSWorkerNavigatorCustom.cpp:
557         (WebCore::JSWorkerNavigator::visitAdditionalChildren):
558         * page/NavigatorBase.cpp:
559         (WebCore::NavigatorBase::NavigatorBase):
560         (WebCore::NavigatorBase::serviceWorkerIfAny):
561         (WebCore::NavigatorBase::serviceWorker):
562         * page/NavigatorBase.h:
563
564 2019-04-08  Antti Koivisto  <antti@apple.com>
565
566         Update touch-action region on property changes
567         https://bugs.webkit.org/show_bug.cgi?id=196608
568
569         Reviewed by Simon Fraser.
570
571         Test: pointerevents/ios/touch-action-region-dynamic.html
572
573         * rendering/EventRegion.cpp:
574         (WebCore::EventRegion::touchActionsForPoint const):
575
576         Correctly return 'auto' when nothing is found from the regions (this code is not used yet).
577
578         * rendering/RenderElement.cpp:
579         (WebCore::RenderElement::styleWillChange):
580
581         React to 'touch-action' property changes, similarly to 'pointer-events'.
582
583         * rendering/RenderLayer.cpp:
584         (WebCore::RenderLayer::invalidateEventRegion):
585
586         Test if need to invalidate.
587
588         * rendering/RenderLayerBacking.cpp:
589         (WebCore::RenderLayerBacking::setContentsNeedDisplay):
590         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
591
592         Call invalidateEventRegion explicitly instead of relying on compositing update. This ensures
593         that we update the top level event region correctly when we have touch-actions.
594
595 2019-04-08  Javier Fernandez  <jfernandez@igalia.com>
596
597         Implement white-space:break-spaces value
598         https://bugs.webkit.org/show_bug.cgi?id=177327
599
600         Reviewed by Myles Maxfield and Zalan Bujtas.
601
602         Finally the CSS WG decided [1] to move back the 'break-spaces' value to
603         the 'white-space' property. This makes the parsing logic easier than
604         the previous approach of using the 'overflow-wrap' property.
605
606         This new value prevents the white-space sequence to collapse and gives
607         breaking opportunities after every preserved white-space.
608
609         https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces
610
611         Additionally, unlike 'pre-wrap', non-collapsible spaces or tabs at the
612         end of a line cannot be hung or visually collapsed, since we want them
613         to be preserved and broken.
614
615         [1] https://github.com/w3c/csswg-drafts/pull/2841
616
617         Tests: imported/w3c/web-platform-tests/css/css-text/overflow-wrap/overflow-wrap-break-word-008.html
618                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-003.html
619                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-009.html
620
621         * css/CSSPrimitiveValueMappings.h:
622         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): New mapping for CSSVaueBreakSpaces.
623         (WebCore::CSSPrimitiveValue::operator WhiteSpace const): New value BreakSpaces for the Whitespace enum.
624         * css/CSSProperties.json: new 'break-spaces' value for the 'white-space' property.
625         * css/CSSValueKeywords.in: new break-spaces keyword
626         * css/parser/CSSParserFastPaths.cpp:
627         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
628         * rendering/SimpleLineLayout.cpp:  The SimpleLineLayut codepath must handle properly the new behavior of preserved whitespaces.
629         (WebCore::SimpleLineLayout::LineState::hasTrailingWhitespace const): Require that m_trailingWhitespaceWidth being greater than zero.
630         (WebCore::SimpleLineLayout::LineState::hasWhitespaceFragments const): New function to detect former whitespae fragments that could be breaking opportunities.
631         (WebCore::SimpleLineLayout::removeTrailingWhitespace): The 'break-spaces' feature forbids to remove any trailing whitespace.
632         (WebCore::SimpleLineLayout::firstFragment): We have now leading whitespace sequences comming from the previous line.
633         (WebCore::SimpleLineLayout::createLineRuns): We should revert some breaking opportunities if others were formerly found in the line.
634         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
635         (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.
636         * rendering/SimpleLineLayoutTextFragmentIterator.h:
637         * rendering/line/BreakingContext.h: Different codepath but similar changes to properly handle the new behavior of preserved whitespace.
638         (WebCore::BreakingContext::BreakingContext): New class field to determine whether there are some whitespace that may prevent the word ot be broken.
639         (WebCore::BreakingContext::handleText): New line-breaking logic to implement the break-spaces behavior.
640         (WebCore::BreakingContext::trailingSpacesHang): Cases where the preserved breakspaces should hand or overflow.
641         * rendering/style/RenderStyle.h:
642         (WebCore::RenderStyle::collapseWhiteSpace): With break-spaces collapsing whitespaces is not allowed.
643         (WebCore::RenderStyle::breakOnlyAfterWhiteSpace const): Add the WhiteSpace::BreakSpaces to this group.
644         * rendering/style/RenderStyleConstants.h: A new constan added.
645
646 2019-04-08  Youenn Fablet  <youenn@apple.com>
647
648         LibWebRTCMediaEndpoint does not need to hop to the signaling thread to gather stats
649         https://bugs.webkit.org/show_bug.cgi?id=196697
650         <rdar://problem/47477113>
651
652         Reviewed by Eric Carlson.
653
654         It is not thread safe to use m_backend in another thread than the main thread.
655         It is not useful anymore to hop to the signaling thread to gather stats.
656         No change of behavior.
657
658         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
659         (WebCore::LibWebRTCMediaEndpoint::getStats):
660         (WebCore::LibWebRTCMediaEndpoint::gatherStatsForLogging):
661
662 2019-04-08  Antoine Quint  <graouts@apple.com>
663
664         [ Mac WK2 iOS Debug ] REGRESSION(r233667) Layout Test imported/w3c/web-platform-tests/web-animations/interfaces/DocumentTimeline/constructor.html is a flaky failure
665         https://bugs.webkit.org/show_bug.cgi?id=195233
666         <rdar://problem/48527231>
667
668         Reviewed by Dean Jackson.
669
670         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.
671
672         * animation/DocumentTimeline.cpp:
673         (WebCore::DocumentTimeline::currentTime):
674
675 2019-04-08  Antoine Quint  <graouts@apple.com>
676
677         [Web Animations] JS wrapper may be deleted while animation is yet to dispatch its finish event
678         https://bugs.webkit.org/show_bug.cgi?id=196118
679         <rdar://problem/46614137>
680
681         Reviewed by Chris Dumez.
682
683         Test: webanimations/js-wrapper-kept-alive.html
684
685         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.
686         We also need to ensure that the new implementation of hasPendingActivity() does not interfere with the ability of pages to enter the page
687         cache when running animations.
688
689         * animation/WebAnimation.cpp:
690         (WebCore::WebAnimation::canSuspendForDocumentSuspension const):
691         (WebCore::WebAnimation::stop):
692         (WebCore::WebAnimation::hasPendingActivity const):
693         * animation/WebAnimation.h:
694
695 2019-04-08  Eric Liang  <ericliang@apple.com>
696
697         AX: <svg> elements with labels and no accessible contents are exposed as empty AXGroups
698         https://bugs.webkit.org/show_bug.cgi?id=156774
699
700         Reviewed by Chris Fleizach.
701
702         Labelled SVGs without accessible descendants are exposed as AXImage rather than groups.
703
704         Unlabelled equivalents are not exposed. Otherwise, SVGs with accessible descendants are exposed as AXGroup. 
705         Also added back functionalities from last patch of determining whether a SVG element should be ignored.
706         
707         Test: accessibility/svg-shape-labelled.html
708
709         * accessibility/AccessibilityRenderObject.cpp:
710         (WebCore::AccessibilityRenderObject::updateRoleAfterChildrenCreation):
711         * accessibility/AccessibilitySVGElement.cpp:
712         (WebCore::AccessibilitySVGElement::computeAccessibilityIsIgnored const):
713
714 2019-04-08  Youenn Fablet  <youenn@apple.com>
715
716         Make sure UniqueIDBDatabaseConnection unregisters itself even if its database is gone
717         https://bugs.webkit.org/show_bug.cgi?id=196651
718
719         Reviewed by Brady Eidson.
720
721         In UniqueIDBDatabase methods, many operations are refing the transaction
722         so that it stays alive until a quota check decision is made.
723         This extends the lifetime of the transaction which may be lasting
724         longer than its database that may be cleared without waiting for the quota check decisions.
725
726         We therefore need to make sure that the transaction is cleaning itself correctly at destruction time.
727
728         Make sure that the transaction is unregistering itself from its IDBServer.
729         To do so, the transaction keeps a weak ref to the IDBServer.
730
731         This is timing sensitive hence difficult to test.
732
733         * Modules/indexeddb/server/IDBServer.h:
734         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
735         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didAbortTransaction):
736         Like done below for UniqueIDBDatabaseConnection::didCommitTransaction,
737         add a check to ensure that either the database is we are in an error case.
738         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
739         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
740         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::~UniqueIDBDatabaseTransaction):
741         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
742
743 2019-04-08  Christopher Reid  <chris.reid@sony.com>
744
745         Undefined Behavior: m_experimentalImageMenuEnabled isn't initialized in HTMLImageElement when SERVICE_CONTROLS is disabled
746         https://bugs.webkit.org/show_bug.cgi?id=196664
747
748         Reviewed by Ross Kirsling.
749
750         No observable change in behavior.
751
752         Initialize m_experimentalImageMenuEnabled regardless of ENABLE(SERVICE_CONTROLS)
753
754         * html/HTMLImageElement.cpp:
755
756 2019-04-08  Ryan Haddad  <ryanhaddad@apple.com>
757
758         Unreviewed, rolling out r243943.
759
760         Caused test262 failures.
761
762         Reverted changeset:
763
764         "[JSC] Filter DontEnum properties in
765         ProxyObject::getOwnPropertyNames()"
766         https://bugs.webkit.org/show_bug.cgi?id=176810
767         https://trac.webkit.org/changeset/243943
768
769 2019-04-05  Sergio Villar Senin  <svillar@igalia.com>
770
771         [GTK][WPE] outlook.live.com displays old-fashioned UI
772         https://bugs.webkit.org/show_bug.cgi?id=196642
773
774         Reviewed by Carlos Garcia Campos.
775
776         The new good looking UI is shown as long as pretend we're a Mac in the UA.
777
778         * platform/UserAgentQuirks.cpp:
779         (WebCore::urlRequiresChromeBrowser):
780
781 2019-04-08  Carlos Garcia Campos  <cgarcia@igalia.com>
782
783         [ATK] Cleanup accessible wrapper base class
784         https://bugs.webkit.org/show_bug.cgi?id=196601
785
786         Reviewed by Mario Sanchez Prada.
787
788         Cleanups:
789
790          - Rename WebKitAccessibleWrapperAtk cpp and header as WebKitAccessible for consistency with the class name.
791          - Use WEBKIT_DEFINE_TYPE instead of custom type registration. This ensures that all CStrings used in private
792            struct are no longer leaked.
793          - Move core object pointer to the private struct.
794          - Remove confusing core() function and simply get the core object from the private struct.
795          - Use nullptr instead of 0 and other coding style issues.
796          - Rename cacheAndReturnAtkProperty as webkitAccessibleCacheAndReturnAtkProperty and use WebKitAccessible as
797            instance parameter.
798          - Make webkitAccessibleGetAccessibilityObject() return a reference, since we use a fallback object on detach it
799            never returns nullptr.
800          - Move objectFocusedAndCaretOffsetUnignored() to WebKitAccessibleUtil.
801
802         * SourcesGTK.txt:
803         * accessibility/atk/AXObjectCacheAtk.cpp:
804         * accessibility/atk/WebKitAccessible.cpp: Renamed from Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp.
805         (webkitAccessibleGetName):
806         (webkitAccessibleGetDescription):
807         (setAtkRelationSetFromCoreObject):
808         (isRootObject):
809         (webkitAccessibleGetParent):
810         (webkitAccessibleGetNChildren):
811         (webkitAccessibleRefChild):
812         (webkitAccessibleGetIndexInParent):
813         (webkitAccessibleGetAttributes):
814         (atkRole):
815         (webkitAccessibleGetRole):
816         (webkitAccessibleRefStateSet):
817         (webkitAccessibleRefRelationSet):
818         (webkitAccessibleInit):
819         (webkitAccessibleGetObjectLocale):
820         (webkit_accessible_class_init):
821         (interfaceMaskFromObject):
822         (uniqueAccessibilityTypeName):
823         (accessibilityTypeFromObject):
824         (webkitAccessibleNew):
825         (webkitAccessibleGetAccessibilityObject):
826         (webkitAccessibleDetach):
827         (webkitAccessibleIsDetached):
828         (webkitAccessibleCacheAndReturnAtkProperty):
829         * accessibility/atk/WebKitAccessible.h: Renamed from Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.h.
830         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
831         (core):
832         * accessibility/atk/WebKitAccessibleInterfaceAction.cpp:
833         (core):
834         (webkitAccessibleActionGetKeybinding):
835         (webkitAccessibleActionGetName):
836         * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
837         (core):
838         * accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:
839         (core):
840         (documentAttributeValue):
841         * accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp:
842         (core):
843         * accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp:
844         (core):
845         * accessibility/atk/WebKitAccessibleInterfaceImage.cpp:
846         (core):
847         (webkitAccessibleImageGetImageDescription):
848         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
849         (core):
850         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
851         (core):
852         * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
853         (core):
854         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
855         (core):
856         * accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
857         (core):
858         * accessibility/atk/WebKitAccessibleUtil.cpp:
859         (objectFocusedAndCaretOffsetUnignored):
860         * accessibility/atk/WebKitAccessibleUtil.h:
861         * editing/atk/FrameSelectionAtk.cpp:
862
863 2019-04-06  Antti Koivisto  <antti@apple.com>
864
865         Combine event and touch action regions into a single class
866         https://bugs.webkit.org/show_bug.cgi?id=196644
867         <rdar://problem/49643614>
868
869         Reviewed by Darin Adler.
870
871         This patch replaces the existing TouchActionRegion class with the more general EventRegion class.
872         It collects both the overall event region and the touch action regions. This avoids duplication
873         and simplifies the code.
874
875         The patch also adds serialization support for EventRegion, so touch-action regions gets passed
876         to the UI process too.
877
878         * Sources.txt:
879         * WebCore.xcodeproj/project.pbxproj:
880         * platform/graphics/GraphicsLayer.cpp:
881         (WebCore::GraphicsLayer::setEventRegion):
882         (WebCore::GraphicsLayer::dumpProperties const):
883         (WebCore::GraphicsLayer::setTouchActionRegion): Deleted.
884         * platform/graphics/GraphicsLayer.h:
885         (WebCore::GraphicsLayer::eventRegion const):
886         (WebCore::GraphicsLayer::touchActionRegion const): Deleted.
887         * platform/graphics/Region.cpp:
888         (WebCore::operator<<):
889         * platform/graphics/ca/GraphicsLayerCA.cpp:
890         (WebCore::GraphicsLayerCA::setEventRegion):
891         (WebCore::GraphicsLayerCA::setTouchActionRegion): Deleted.
892         * platform/graphics/ca/GraphicsLayerCA.h:
893         * platform/graphics/ca/PlatformCALayer.h:
894         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
895         * rendering/EventRegion.cpp: Copied from Source/WebCore/rendering/TouchActionRegion.cpp.
896         (WebCore::EventRegion::operator== const):
897         (WebCore::EventRegion::unite):
898         (WebCore::EventRegion::translate):
899         (WebCore::EventRegion::uniteTouchActions):
900         (WebCore::EventRegion::touchActionsForPoint const):
901         (WebCore::operator<<):
902         (WebCore::TouchActionRegion::unite): Deleted.
903         (WebCore::TouchActionRegion::actionsForPoint const): Deleted.
904         (WebCore::TouchActionRegion::translate): Deleted.
905         * rendering/EventRegion.h: Copied from Source/WebCore/rendering/TouchActionRegion.h.
906         (WebCore::EventRegion::isEmpty const):
907         (WebCore::EventRegion::contains const):
908         (WebCore::EventRegion::hasTouchActions const):
909         (WebCore::EventRegion::encode const):
910         (WebCore::EventRegion::decode):
911         (WebCore::TouchActionRegion::isEmpty const): Deleted.
912         (WebCore::TouchActionRegion::operator== const): Deleted.
913         * rendering/InlineTextBox.cpp:
914         (WebCore::InlineTextBox::paint):
915         * rendering/PaintInfo.h:
916         * rendering/RenderBlock.cpp:
917         (WebCore::RenderBlock::paintObject):
918         * rendering/RenderLayer.cpp:
919         (WebCore::RenderLayer::collectEventRegionForFragments):
920         * rendering/RenderLayer.h:
921         * rendering/RenderLayerBacking.cpp:
922         (WebCore::RenderLayerBacking::updateEventRegion):
923         * rendering/RenderLayerModelObject.cpp:
924         * rendering/SimpleLineLayoutFunctions.cpp:
925         (WebCore::SimpleLineLayout::paintFlow):
926         * rendering/TouchActionRegion.cpp: Removed.
927         * rendering/TouchActionRegion.h: Removed.
928
929 2019-04-05  Yongjun Zhang  <yongjun_zhang@apple.com>
930
931         We should pass minimumEffectiveDeviceWidth to web process on new page creation.
932         https://bugs.webkit.org/show_bug.cgi?id=196077
933         <rdar://problem/49108202>
934
935         Reviewed by Chris Dumez.
936
937         If the page doesn't specify it requires to use the device width in viewport tag, we should try to scale down
938         the page to fit the window width.
939
940         Test: fast/viewport/ios/shrink-to-fit-for-page-without-viewport-meta.html
941
942         * page/ViewportConfiguration.cpp:
943         (WebCore::ViewportConfiguration::updateDefaultConfiguration): Also update the minimum layout size
944             when the default configuration is changed.
945         (WebCore::ViewportConfiguration::nativeWebpageParametersWithShrinkToFit): Make sure we fit the content
946             to window width.
947
948 2019-04-05  Jer Noble  <jer.noble@apple.com>
949
950         [Cocoa] Deactivate the audio session before the WebProcess suspends.
951         https://bugs.webkit.org/show_bug.cgi?id=196658
952
953         Reviewed by Eric Carlson.
954
955         Test: platform/mac/media/audio-session-deactivated-when-suspended.html
956
957         Deactivate the audio session when we are notified that the session will suspend.
958
959         Drive-by fix: don't try to begin playback when the process is suspended.
960
961         * platform/audio/PlatformMediaSessionManager.cpp:
962         (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
963         (WebCore::PlatformMediaSessionManager::processWillSuspend):
964         (WebCore::PlatformMediaSessionManager::processDidResume):
965         * platform/audio/PlatformMediaSessionManager.h:
966         (WebCore::PlatformMediaSessionManager::processIsSuspended const):
967         * testing/InternalSettings.cpp:
968         (WebCore::InternalSettings::Backup::Backup):
969         (WebCore::InternalSettings::Backup::restoreTo):
970         (WebCore::InternalSettings::setShouldDeactivateAudioSession):
971         * testing/InternalSettings.h:
972         * testing/InternalSettings.idl:
973         * testing/Internals.cpp:
974         (WebCore::Internals::processWillSuspend):
975         (WebCore::Internals::processDidResume):
976         * testing/Internals.h:
977         * testing/Internals.idl:
978
979 2019-04-05  Sihui Liu  <sihui_liu@apple.com>
980
981         [iOS] Web process gets suspended while holding locked database files
982         https://bugs.webkit.org/show_bug.cgi?id=196519
983         <rdar://problem/49531797>
984
985         Reviewed by Chris Dumez.
986
987         Don't use DatabaseTracker singleton before it is initialized.
988
989         * Modules/webdatabase/DatabaseTracker.cpp:
990         (WebCore::DatabaseTracker::isInitialized):
991         * Modules/webdatabase/DatabaseTracker.h:
992
993 2019-04-05  Ryosuke Niwa  <rniwa@webkit.org>
994
995         Make WeakPtr<Element> possible and deploy it in form associated elements code
996         https://bugs.webkit.org/show_bug.cgi?id=196626
997
998         Reviewed by Antti Koivisto.
999
1000         Make Element inherit from CanMakeWeakPtr and deploy WeakPtr<*Element> in FormAssociatedElement and HTMLFormElement.
1001
1002         No new tests sine there should be no behavioral change.
1003
1004         * dom/Element.h:
1005         * html/FormAssociatedElement.cpp:
1006         (WebCore::FormAssociatedElement::FormAssociatedElement):
1007         (WebCore::FormAssociatedElement::insertedIntoAncestor):
1008         (WebCore::FormAssociatedElement::setForm):
1009         (WebCore::FormAssociatedElement::resetFormOwner):
1010         (WebCore::FormAssociatedElement::formAttributeChanged):
1011         * html/FormAssociatedElement.h:
1012         (WebCore::FormAssociatedElement::form const):
1013         * html/HTMLElement.cpp:
1014         (WebCore::HTMLElement::asFormNamedItem):
1015         (WebCore::HTMLElement::asFormAssociatedElement):
1016         * html/HTMLElement.h:
1017         (WebCore::HTMLElement::asFormNamedItem): Deleted.
1018         * html/HTMLFormControlElement.h:
1019         * html/HTMLFormControlsCollection.cpp:
1020         (WebCore::HTMLFormControlsCollection::formImageElements const): Inlined into updateNamedElementCache.
1021         (WebCore::HTMLFormControlsCollection::updateNamedElementCache const):
1022         * html/HTMLFormControlsCollection.h:
1023         * html/HTMLFormElement.cpp:
1024         (WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
1025         (WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
1026         (WebCore::HTMLFormElement::registerImgElement):
1027         (WebCore::HTMLFormElement::defaultButton const):
1028         (WebCore::HTMLFormElement::resetDefaultButton):
1029         (WebCore::HTMLFormElement::matchesValidPseudoClass const):
1030         (WebCore::HTMLFormElement::matchesInvalidPseudoClass const):
1031         * html/HTMLFormElement.h:
1032         * html/HTMLImageElement.cpp:
1033         (WebCore::HTMLImageElement::HTMLImageElement):
1034         (WebCore::HTMLImageElement::insertedIntoAncestor):
1035         * html/HTMLImageElement.h:
1036         * html/HTMLInputElement.h:
1037         * html/HTMLMediaElement.h:
1038         * html/HTMLObjectElement.h:
1039         * html/HTMLPictureElement.h:
1040         * html/HTMLSlotElement.h:
1041         * svg/SVGElement.h:
1042
1043 2019-04-05  Caitlin Potter  <caitp@igalia.com>
1044
1045         [JSC] Filter DontEnum properties in ProxyObject::getOwnPropertyNames()
1046         https://bugs.webkit.org/show_bug.cgi?id=176810
1047
1048         Reviewed by Saam Barati.
1049
1050         Previously, there was a comment here indicating uncertainty of whether it
1051         was necessary to filter DontEnum properties explicitly or not. It turns
1052         out that it was necessary in the case of JSC ProxyObjects.
1053
1054         This patch adds DontEnum filtering for ProxyObjects, however we continue
1055         to explicitly filter them in JSDOMConvertRecord, which needs to use the
1056         property descriptor after filtering. This change prevents observably
1057         fetching the property descriptor twice per property.
1058
1059         * bindings/js/JSDOMConvertRecord.h:
1060
1061 2019-04-05  Michael Catanzaro  <mcatanzaro@igalia.com>
1062
1063         Unreviewed manual rollout of r243929
1064         https://bugs.webkit.org/show_bug.cgi?id=196626
1065
1066         * dom/Element.h:
1067         * html/FormAssociatedElement.cpp:
1068         (WebCore::FormAssociatedElement::FormAssociatedElement):
1069         (WebCore::FormAssociatedElement::insertedIntoAncestor):
1070         (WebCore::FormAssociatedElement::setForm):
1071         (WebCore::FormAssociatedElement::resetFormOwner):
1072         (WebCore::FormAssociatedElement::formAttributeChanged):
1073         * html/FormAssociatedElement.h:
1074         (WebCore::FormAssociatedElement::form const):
1075         * html/HTMLElement.cpp:
1076         (WebCore::HTMLElement::asFormNamedItem): Deleted.
1077         (WebCore::HTMLElement::asFormAssociatedElement): Deleted.
1078         * html/HTMLElement.h:
1079         (WebCore::HTMLElement::asFormNamedItem):
1080         * html/HTMLFormControlElement.h:
1081         * html/HTMLFormControlsCollection.cpp:
1082         (WebCore:: const):
1083         (WebCore::HTMLFormControlsCollection::updateNamedElementCache const):
1084         * html/HTMLFormControlsCollection.h:
1085         * html/HTMLFormElement.cpp:
1086         (WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
1087         (WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
1088         (WebCore::HTMLFormElement::registerImgElement):
1089         (WebCore::HTMLFormElement::defaultButton const):
1090         (WebCore::HTMLFormElement::resetDefaultButton):
1091         (WebCore::HTMLFormElement::matchesValidPseudoClass const):
1092         (WebCore::HTMLFormElement::matchesInvalidPseudoClass const):
1093         * html/HTMLFormElement.h:
1094         * html/HTMLImageElement.cpp:
1095         (WebCore::HTMLImageElement::HTMLImageElement):
1096         (WebCore::HTMLImageElement::insertedIntoAncestor):
1097         * html/HTMLImageElement.h:
1098         * html/HTMLInputElement.h:
1099         * html/HTMLMediaElement.h:
1100         * html/HTMLObjectElement.h:
1101         * html/HTMLPictureElement.h:
1102         * html/HTMLSlotElement.h:
1103         * svg/SVGElement.h:
1104
1105 2019-04-05  Sihui Liu  <sihui_liu@apple.com>
1106
1107         [iOS] Web process gets suspended while holding locked database files
1108         https://bugs.webkit.org/show_bug.cgi?id=196519
1109         <rdar://problem/49531797>
1110
1111         Reviewed by Chris Dumez.
1112
1113         We should close all databases and make sure not open new databases when web process is ready to suspend.
1114
1115         * platform/sql/SQLiteDatabase.cpp:
1116         (WebCore::SQLiteDatabase::setIsDatabaseOpeningForbidden):
1117         (WebCore::SQLiteDatabase::open):
1118         * platform/sql/SQLiteDatabase.h:
1119         * platform/sql/SQLiteDatabaseTracker.cpp:
1120         (WebCore::SQLiteDatabaseTracker::setClient):
1121         (WebCore::SQLiteDatabaseTracker::incrementTransactionInProgressCount):
1122         (WebCore::SQLiteDatabaseTracker::decrementTransactionInProgressCount):
1123         (WebCore::SQLiteDatabaseTracker::hasTransactionInProgress):
1124
1125 2019-04-05  Commit Queue  <commit-queue@webkit.org>
1126
1127         Unreviewed, rolling out r243833.
1128         https://bugs.webkit.org/show_bug.cgi?id=196645
1129
1130         This change breaks build of WPE and GTK ports (Requested by
1131         annulen on #webkit).
1132
1133         Reverted changeset:
1134
1135         "[CMake][WTF] Mirror XCode header directories"
1136         https://bugs.webkit.org/show_bug.cgi?id=191662
1137         https://trac.webkit.org/changeset/243833
1138
1139 2019-04-05  David Kilzer  <ddkilzer@apple.com>
1140
1141         REGRESSION(r243887): Try to fix Windows builds by including <wtf/IsoMalloc.h>
1142
1143         Caused by:
1144             [WebCore] Put most of derived classes of ScriptWrappable into IsoHeap
1145             https://bugs.webkit.org/show_bug.cgi?id=196475
1146
1147         * css/CSSComputedStyleDeclaration.h:
1148         * dom/DOMRectReadOnly.h:
1149         * dom/LiveNodeList.h:
1150         * dom/NodeIterator.h:
1151         * dom/TreeWalker.h:
1152         * fileapi/Blob.h:
1153         * fileapi/File.h:
1154         * fileapi/FileList.h:
1155         * html/CachedHTMLCollection.h:
1156         * html/HTMLFormElement.h:
1157         * html/HTMLNameCollection.h:
1158         * html/canvas/GPUBasedCanvasRenderingContext.h:
1159         * page/RemoteDOMWindow.h:
1160
1161 2019-04-05  Ryosuke Niwa  <rniwa@webkit.org>
1162
1163         Make WeakPtr<Element> possible and deploy it in form associated elements code
1164         https://bugs.webkit.org/show_bug.cgi?id=196626
1165
1166         Reviewed by Antti Koivisto.
1167
1168         Make Element inherit from CanMakeWeakPtr and deploy WeakPtr<*Element> in FormAssociatedElement and HTMLFormElement.
1169
1170         No new tests sine there should be no behavioral change.
1171
1172         * dom/Element.h:
1173         * html/FormAssociatedElement.cpp:
1174         (WebCore::FormAssociatedElement::FormAssociatedElement):
1175         (WebCore::FormAssociatedElement::insertedIntoAncestor):
1176         (WebCore::FormAssociatedElement::setForm):
1177         (WebCore::FormAssociatedElement::resetFormOwner):
1178         (WebCore::FormAssociatedElement::formAttributeChanged):
1179         * html/FormAssociatedElement.h:
1180         (WebCore::FormAssociatedElement::form const):
1181         * html/HTMLElement.cpp:
1182         (WebCore::HTMLElement::asFormNamedItem):
1183         (WebCore::HTMLElement::asFormAssociatedElement):
1184         * html/HTMLElement.h:
1185         (WebCore::HTMLElement::asFormNamedItem): Deleted.
1186         * html/HTMLFormControlElement.h:
1187         * html/HTMLFormControlsCollection.cpp:
1188         (WebCore::HTMLFormControlsCollection::formImageElements const): Inlined into updateNamedElementCache.
1189         (WebCore::HTMLFormControlsCollection::updateNamedElementCache const):
1190         * html/HTMLFormControlsCollection.h:
1191         * html/HTMLFormElement.cpp:
1192         (WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
1193         (WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
1194         (WebCore::HTMLFormElement::registerImgElement):
1195         (WebCore::HTMLFormElement::defaultButton const):
1196         (WebCore::HTMLFormElement::resetDefaultButton):
1197         (WebCore::HTMLFormElement::matchesValidPseudoClass const):
1198         (WebCore::HTMLFormElement::matchesInvalidPseudoClass const):
1199         * html/HTMLFormElement.h:
1200         * html/HTMLImageElement.cpp:
1201         (WebCore::HTMLImageElement::HTMLImageElement):
1202         (WebCore::HTMLImageElement::insertedIntoAncestor):
1203         * html/HTMLImageElement.h:
1204         * html/HTMLInputElement.h:
1205         * html/HTMLMediaElement.h:
1206         * html/HTMLObjectElement.h:
1207         * html/HTMLPictureElement.h:
1208         * html/HTMLSlotElement.h:
1209         * svg/SVGElement.h:
1210
1211 2019-04-05  Carlos Garcia Campos  <cgarcia@igalia.com>
1212
1213         [ATK] Use a smart pointer for AccessibilityObject wrapper and remove GTK specific code
1214         https://bugs.webkit.org/show_bug.cgi?id=196593
1215         <rdar://problem/49599153>
1216
1217         Reviewed by Michael Catanzaro.
1218
1219         We have specific code for GTK to get/set the wrapper only because we don't use smart pointers. Also use
1220         WebKitAccessible as AccessibilityObjectWrapper instead of generic AtkObject, to enforce wrappers to be
1221         WebKitAccessible instances. This requires a few casts to AtkObject.
1222
1223         * accessibility/AccessibilityObject.h:
1224         (WebCore::AccessibilityObject::setWrapper):
1225         * accessibility/AccessibilityObjectInterface.h:
1226         * accessibility/atk/AXObjectCacheAtk.cpp:
1227         (WebCore::AXObjectCache::detachWrapper):
1228         (WebCore::AXObjectCache::attachWrapper):
1229         (WebCore::notifyChildrenSelectionChange):
1230         (WebCore::AXObjectCache::postPlatformNotification):
1231         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
1232         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
1233         (WebCore::AXObjectCache::platformHandleFocusedUIElementChanged):
1234         * accessibility/atk/AccessibilityObjectAtk.cpp:
1235         * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
1236         (webkitAccessibleComponentRefAccessibleAtPoint):
1237         * accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp:
1238         (webkitAccessibleHypertextGetLink):
1239         (webkitAccessibleHypertextGetNLinks):
1240         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
1241         (webkitAccessibleSelectionRefSelection):
1242         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
1243         (webkitAccessibleTableRefAt):
1244         (webkitAccessibleTableGetColumnHeader):
1245         (webkitAccessibleTableGetRowHeader):
1246         (webkitAccessibleTableGetCaption):
1247         * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
1248         (convertToGPtrArray):
1249         (webkitAccessibleTableCellGetTable):
1250         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1251         (accessibilityObjectLength):
1252         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1253         (setAtkRelationSetFromCoreObject):
1254         (atkParentOfRootObject):
1255         (webkitAccessibleGetParent):
1256         (webkitAccessibleRefChild):
1257         (isTextWithCaret):
1258         * editing/atk/FrameSelectionAtk.cpp:
1259         (WebCore::emitTextSelectionChange):
1260         (WebCore::maybeEmitTextFocusChange):
1261
1262 2019-04-04  Simon Fraser  <simon.fraser@apple.com>
1263
1264         [iOS WK2] REGRESSION (r242687): Programmatic scroll of overflow scroll results in bad rendering
1265         https://bugs.webkit.org/show_bug.cgi?id=195584
1266
1267         Reviewed by Zalan Bujtas.
1268
1269         Push data to the scrolling tree about whether an overflow:scroll scroll was programmatic, by having
1270         RenderLayer::scrollToOffset() call into AsyncScrollingCoordinator::requestScrollPositionUpdate(),
1271         just as we do for frames.
1272
1273         AsyncScrollingCoordinator::requestScrollPositionUpdate() is generalized to take any ScrollableArea.
1274
1275         Fix an assumption in the ScrollingTree that we only care about programmatic scrolls on the root node.
1276         ScrollingTree::commitTreeState() no longer sets isHandlingProgrammaticScroll; instead,
1277         callers of ScrollingTreeScrollingNode::scrollTo() pass a ScrollType. Commit functions pass
1278         ScrollType::Programmatic when handling RequestedScrollPosition changes as necessary.
1279
1280         Programmatic scrolls need to get to the scrolling tree in the UI process so that we update
1281         the tree's notion of scroll position, and trigger actual UIScrollView scrolls (layers may have
1282         already been put in the right locations, but the UI process needs to know that a scroll happened).
1283         However, we need to prevent notifications from programmatic scrolls getting back to the
1284         web process, because this causes jumpiness. This is done via an early return in
1285         RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll().
1286
1287         Tests: scrollingcoordinator/ios/programmatic-overflow-scroll.html
1288                scrollingcoordinator/ios/programmatic-page-scroll.html
1289
1290         * page/scrolling/AsyncScrollingCoordinator.cpp:
1291         (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
1292         * page/scrolling/AsyncScrollingCoordinator.h:
1293         * page/scrolling/ScrollingCoordinator.h:
1294         (WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
1295         * page/scrolling/ScrollingTree.cpp:
1296         (WebCore::ScrollingTree::commitTreeState):
1297         (WebCore::ScrollingTree::isHandlingProgrammaticScroll): Deleted.
1298         * page/scrolling/ScrollingTree.h:
1299         (WebCore::ScrollingTree::isHandlingProgrammaticScroll const):
1300         (WebCore::ScrollingTree::setIsHandlingProgrammaticScroll):
1301         * page/scrolling/ScrollingTreeScrollingNode.cpp:
1302         (WebCore::ScrollingTreeScrollingNode::scrollBy):
1303         (WebCore::ScrollingTreeScrollingNode::scrollTo):
1304         * page/scrolling/ScrollingTreeScrollingNode.h:
1305         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1306         (WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateAfterChildren):
1307         * rendering/RenderLayer.cpp:
1308         (WebCore::RenderLayer::scrollToOffset):
1309         (WebCore::RenderLayer::scrollingNodeID const):
1310         * rendering/RenderLayer.h:
1311         * rendering/RenderMarquee.cpp:
1312         (WebCore::RenderMarquee::timerFired):
1313
1314 2019-04-04  Yusuke Suzuki  <ysuzuki@apple.com>
1315
1316         Unreviewed, speculative fix for build failure
1317         https://bugs.webkit.org/show_bug.cgi?id=196475
1318
1319         * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h:
1320
1321 2019-04-04  Ryosuke Niwa  <rniwa@webkit.org>
1322
1323         Element::isFocusable() debug asserts too frequently
1324         https://bugs.webkit.org/show_bug.cgi?id=196634
1325
1326         Reviewed by Geoffrey Garen.
1327
1328         Remove the debug assertion for now.
1329
1330         * dom/Element.cpp:
1331         (WebCore::Element::isFocusable const):
1332
1333 2019-04-04  Simon Fraser  <simon.fraser@apple.com>
1334
1335         Have ScrollableArea store a ScrollType for the current scroll
1336         https://bugs.webkit.org/show_bug.cgi?id=196627
1337
1338         Reviewed by Zalan Bujtas.
1339
1340         RenderLayer had isInUserScroll() which is the opposite of ScrollableArea::inProgrammaticScroll(),
1341         so just have ScrollableArea store a ScrollType.
1342
1343         RenderLayer's scrolling bottleneck, scrollToOffset(), now takes a ScrollType, and pushes
1344         it onto the base class.
1345
1346         AsyncScrollingCoordinator::requestScrollPositionUpdate() can use the incoming scrollType (currently
1347         incorrect for iOS WK2 overflow) rather than deducing a user scroll from ScrollingLayerPositionAction.
1348
1349         No behavior change.
1350
1351         * page/FrameView.cpp:
1352         (WebCore::FrameView::setFrameRect):
1353         (WebCore::FrameView::topContentInsetDidChange):
1354         (WebCore::FrameView::updateLayoutViewport):
1355         (WebCore::FrameView::setScrollPosition):
1356         (WebCore::FrameView::shouldUpdateCompositingLayersAfterScrolling const):
1357         (WebCore::FrameView::setWasScrolledByUser):
1358         * page/FrameViewLayoutContext.cpp:
1359         (WebCore::LayoutScope::LayoutScope):
1360         (WebCore::LayoutScope::~LayoutScope):
1361         * page/ios/FrameIOS.mm:
1362         (WebCore::Frame::overflowScrollPositionChangedForNode):
1363         * page/scrolling/AsyncScrollingCoordinator.cpp:
1364         (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
1365         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
1366         (WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
1367         * platform/ScrollView.cpp:
1368         (WebCore::ScrollView::setScrollPosition):
1369         * platform/ScrollableArea.cpp:
1370         (WebCore::ScrollableArea::ScrollableArea):
1371         * platform/ScrollableArea.h:
1372         (WebCore::ScrollableArea::currentScrollType const):
1373         (WebCore::ScrollableArea::setCurrentScrollType):
1374         (WebCore::ScrollableArea::setIsUserScroll): Deleted.
1375         (WebCore::ScrollableArea::inProgrammaticScroll const): Deleted.
1376         (WebCore::ScrollableArea::setInProgrammaticScroll): Deleted.
1377         * rendering/RenderLayer.cpp:
1378         (WebCore::RenderLayer::RenderLayer):
1379         (WebCore::RenderLayer::scrollToXPosition):
1380         (WebCore::RenderLayer::scrollToYPosition):
1381         (WebCore::RenderLayer::scrollToOffset):
1382         (WebCore::RenderLayer::scrollTo):
1383         * rendering/RenderLayer.h:
1384         * rendering/RenderLayerBacking.cpp:
1385         (WebCore::RenderLayerBacking::updateScrollOffset):
1386         * rendering/RenderMarquee.cpp:
1387         (WebCore::RenderMarquee::start):
1388
1389 2019-04-04  Shawn Roberts  <sroberts@apple.com>
1390
1391         Unreviewed, rolling out r243868.
1392
1393         Causing timeouts failures on several queues
1394
1395         Reverted changeset:
1396
1397         "[Web Animations] JS wrapper may be deleted while animation is
1398         yet to dispatch its finish event"
1399         https://bugs.webkit.org/show_bug.cgi?id=196118
1400         https://trac.webkit.org/changeset/243868
1401
1402 2019-04-04  Youenn Fablet  <youenn@apple.com>
1403
1404         Pass storage quota parameters from UIProcess to NetworkProcess as part of WebsiteDataStore parameters
1405         https://bugs.webkit.org/show_bug.cgi?id=196543
1406
1407         Reviewed by Alex Christensen.
1408
1409         Add a default routine to compute a third party quota from a per origin quota.
1410         No change of behavior.
1411
1412         * storage/StorageQuotaManager.h:
1413         (WebCore::StorageQuotaManager::defaultThirdPartyQuotaFromPerOriginQuota):
1414         (WebCore::StorageQuotaManager::defaultThirdPartyQuota):
1415
1416 2019-04-04  Commit Queue  <commit-queue@webkit.org>
1417
1418         Unreviewed, rolling out r243807 and r243824.
1419         https://bugs.webkit.org/show_bug.cgi?id=196611
1420
1421         Test added is a flaky timeout on iOS Simulator, 3 tests
1422         unskipped are flaky failures (Requested by ShawnRoberts on
1423         #webkit).
1424
1425         Reverted changesets:
1426
1427         "Blob type cannot be stored correctly in IDB when
1428         IDBObjectStore has autoIncrement and keyPath options"
1429         https://bugs.webkit.org/show_bug.cgi?id=196128
1430         https://trac.webkit.org/changeset/243807
1431
1432         "Follow up fix for r243807: Use MarkedArgumentBuffer instead
1433         of Vector for JSValue"
1434         https://bugs.webkit.org/show_bug.cgi?id=196547
1435         https://trac.webkit.org/changeset/243824
1436
1437 2019-04-04  Simon Fraser  <simon.fraser@apple.com>
1438
1439         Fix rare crash under collectRelatedCoordinatedScrollingNodes()
1440         https://bugs.webkit.org/show_bug.cgi?id=196610
1441         rdar://problem/49595426
1442
1443         Reviewed by Zalan Bujtas.
1444
1445         hasCompositedScrollableOverflow() doesn't check whether a layer is composited (it has
1446         to report the right status before layers have been created), so collectRelatedCoordinatedScrollingNodes()
1447         needs to check whether there's backing.
1448
1449         * rendering/RenderLayerCompositor.cpp:
1450         (WebCore::collectRelatedCoordinatedScrollingNodes):
1451
1452 2019-04-04  Simon Fraser  <simon.fraser@apple.com>
1453
1454         Move "inProgrammaticScroll" down to ScrollableArea
1455         https://bugs.webkit.org/show_bug.cgi?id=196614
1456
1457         Reviewed by Zalan Bujtas.
1458
1459         A future patch will need to update "inProgrammaticScroll" on RenderLayers, so push
1460         inProgrammaticScroll() down to ScrollableArea.
1461
1462         ScrollableArea already has "isScrolledProgrammatically", which I rename to "scrollShouldClearLatchedState"
1463         to reduce confusion. It might be possible to remove this in future with some refactoring.
1464
1465         Sadly we can no longer use SetForScope<> in FrameView after this change so add some manual save/restore code.
1466
1467         * dom/Element.cpp:
1468         (WebCore::Element::setScrollLeft):
1469         (WebCore::Element::setScrollTop):
1470         * page/EventHandler.cpp:
1471         (WebCore::EventHandler::completeWidgetWheelEvent):
1472         (WebCore::EventHandler::handleWheelEvent):
1473         * page/FrameView.cpp:
1474         (WebCore::FrameView::setFrameRect):
1475         (WebCore::FrameView::topContentInsetDidChange):
1476         (WebCore::FrameView::updateLayoutViewport):
1477         (WebCore::FrameView::setScrollPosition):
1478         (WebCore::FrameView::setWasScrolledByUser):
1479         * page/FrameView.h:
1480         * platform/ScrollView.h:
1481         (WebCore::ScrollView::inProgrammaticScroll const): Deleted.
1482         * platform/ScrollableArea.cpp:
1483         (WebCore::ScrollableArea::ScrollableArea):
1484         * platform/ScrollableArea.h:
1485         (WebCore::ScrollableArea::inProgrammaticScroll const):
1486         (WebCore::ScrollableArea::setInProgrammaticScroll):
1487         (WebCore::ScrollableArea::scrollShouldClearLatchedState const):
1488         (WebCore::ScrollableArea::setScrollShouldClearLatchedState):
1489         (WebCore::ScrollableArea::isScrolledProgrammatically const): Deleted.
1490         (WebCore::ScrollableArea::setScrolledProgrammatically): Deleted.
1491
1492 2019-04-04  Sihui Liu  <sihui_liu@apple.com>
1493
1494         Leak of UniqueIDBDatabase in network process running layout tests
1495         https://bugs.webkit.org/show_bug.cgi?id=196565
1496         <rdar://problem/49346139>
1497
1498         Reviewed by Geoffrey Garen.
1499
1500         UniqueIDBDatabase will null itself after it receives confirmation about connecton close from its clients, but it
1501         is possible that the web process to network process connection closes before servers gets the 
1502         confirmDidCloseFromServer. Therefore, we should let UniqueIDBDatabase forget connection when it receives a 
1503         conenctionClosedFromClient.
1504
1505         No new test because this bug is caused by race between network receiving conenctionClosedFromClient and 
1506         receiving confirmDidCloseFromServer. This is testable by running some existing layout tests in a row with leak 
1507         option.
1508
1509         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1510         (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
1511         (WebCore::IDBServer::UniqueIDBDatabase::confirmDidCloseFromServer):
1512
1513 2019-04-04  Chris Dumez  <cdumez@apple.com>
1514
1515         Unreviewed, fix iOS build with recent SDKs.
1516
1517         * platform/gamepad/cocoa/GameControllerGamepad.mm:
1518         (WebCore::GameControllerGamepad::GameControllerGamepad):
1519
1520 2019-04-04  Eric Carlson  <eric.carlson@apple.com>
1521
1522         [MediaStream] Host should be able to mute screen capture and camera/microphone independently
1523         https://bugs.webkit.org/show_bug.cgi?id=196555
1524         <rdar://problem/47303865>
1525
1526         Reviewed by Youenn Fablet.
1527
1528         Test: fast/mediastream/media-stream-page-muted.html
1529
1530         * Modules/mediastream/MediaStream.cpp:
1531         (WebCore::MediaStream::MediaStream): Call setCaptureTracksMuted to pass page muted 
1532         state to tracks.
1533         (WebCore::MediaStream::startProducingData): Ditto.
1534         (WebCore::MediaStream::setCaptureTracksMuted): New.
1535         * Modules/mediastream/MediaStream.h:
1536
1537         * Modules/mediastream/MediaStreamTrack.cpp:
1538         (WebCore::MediaStreamTrack::MediaStreamTrack): Call setMuted with page muted state.
1539         (WebCore::MediaStreamTrack::setMuted): Set muted according to page state and source type.
1540         (WebCore::MediaStreamTrack::pageMutedStateDidChange): Call setMuted.
1541         (WebCore::MediaStreamTrack::mediaState const): Update for new page state.
1542         * Modules/mediastream/MediaStreamTrack.h:
1543
1544         * page/MediaProducer.h: Split capture muted state into two: camera/microphone and screen.
1545
1546         * page/Page.h:
1547         (WebCore::Page::isMediaCaptureMuted const): Update for state changes.
1548
1549         * platform/mediastream/MediaStreamPrivate.cpp:
1550         (WebCore::MediaStreamPrivate::setCaptureTracksMuted): Deleted.
1551         (WebCore::MediaStreamPrivate::hasCaptureVideoSource const): Deleted.
1552         * platform/mediastream/MediaStreamPrivate.h:
1553
1554         * platform/mediastream/RealtimeMediaSource.cpp:
1555         (WebCore::RealtimeMediaSource::setMuted): Log state.
1556         (WebCore::RealtimeMediaSource::notifyMutedChange): Call notifyMutedObservers on the
1557         next runloop so events aren't dispatched synchronously.
1558
1559         * testing/Internals.cpp:
1560         (WebCore::Internals::setPageMuted): Add new state.
1561
1562 2019-04-04  Chris Dumez  <cdumez@apple.com>
1563
1564         Unreviewed, update r243884 to use macros in Compiler.h instead.
1565
1566         * platform/ios/LegacyTileGrid.mm:
1567         (WebCore::LegacyTileGrid::dropDistantTiles):
1568
1569 2019-04-04  Chris Fleizach  <cfleizach@apple.com>
1570
1571         AX: Crash under WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored()
1572         https://bugs.webkit.org/show_bug.cgi?id=196600
1573         <rdar://problem/49572996>
1574
1575         Reviewed by Joanmarie Diggs.
1576
1577         Audit AX code to not dereference renderer before checking if it's null.
1578         Not clear how to reproduce at this time.
1579
1580         * accessibility/AccessibilityRenderObject.cpp:
1581         (WebCore::webAreaIsPresentational):
1582         (WebCore::AccessibilityRenderObject::layoutCount const):
1583         (WebCore::AccessibilityRenderObject::widget const):
1584
1585 2019-04-04  Antti Koivisto  <antti@apple.com>
1586
1587         Compute accurate regions for touch-action
1588         https://bugs.webkit.org/show_bug.cgi?id=196536
1589         <rdar://problem/49516022>
1590
1591         Reviewed by Simon Fraser.
1592
1593         Tests: pointerevents/ios/touch-action-region-basic.html
1594                pointerevents/ios/touch-action-region-layers.html
1595                pointerevents/ios/touch-action-region-pan-x-y.html
1596
1597         - Use style system to compute effective touch-action without additional tree walks.
1598         - Compute touch-action region in a fake paint, at the same time with the event region.
1599
1600         This patch doesn't yet use the computed region for anything except test output.
1601
1602         * Sources.txt:
1603         * WebCore.xcodeproj/project.pbxproj:
1604         * css/StyleResolver.cpp:
1605         (WebCore::computeEffectiveTouchActions):
1606         (WebCore::StyleResolver::adjustRenderStyle):
1607
1608         Update RenderStyle::effectiveTouchAction.
1609
1610         * dom/Element.cpp:
1611         (WebCore::Element::computedTouchActions const):
1612
1613         Just get it from the style.
1614
1615         * platform/graphics/GraphicsLayer.cpp:
1616         (WebCore::GraphicsLayer::setEventRegion):
1617         (WebCore::GraphicsLayer::setTouchActionRegion):
1618         (WebCore::GraphicsLayer::dumpProperties const):
1619         * platform/graphics/GraphicsLayer.h:
1620         (WebCore::GraphicsLayer::touchActionRegion const):
1621         * platform/graphics/ca/GraphicsLayerCA.cpp:
1622         (WebCore::GraphicsLayerCA::setTouchActionRegion):
1623         * platform/graphics/ca/GraphicsLayerCA.h:
1624         * rendering/PaintInfo.h:
1625         * rendering/RenderBlock.cpp:
1626         (WebCore::RenderBlock::paintObject):
1627         * rendering/RenderLayer.cpp:
1628         (WebCore::RenderLayer::collectEventRegionForFragments):
1629         * rendering/RenderLayer.h:
1630         * rendering/RenderLayerBacking.cpp:
1631         (WebCore::RenderLayerBacking::updateConfiguration):
1632
1633         Need to do this for the top compositing layer too.
1634
1635         (WebCore::RenderLayerBacking::updateEventRegion):
1636
1637         Compute touch-action region too.
1638         As a basic optimization avoid doing any extra work if there are no elements with non-default touch-action property.
1639
1640         * rendering/TouchActionRegion.cpp: Added.
1641         (WebCore::toIndex):
1642         (WebCore::toTouchAction):
1643         (WebCore::toString):
1644         (WebCore::TouchActionRegion::unite):
1645         (WebCore::TouchActionRegion::actionsForPoint const):
1646         (WebCore::TouchActionRegion::translate):
1647         (WebCore::operator<<):
1648         * rendering/TouchActionRegion.h: Added.
1649
1650         Class for collecting and maintaining touch-action region.
1651
1652         (WebCore::TouchActionRegion::isEmpty const):
1653         (WebCore::TouchActionRegion::operator== const):
1654         * rendering/style/RenderStyle.h:
1655         (WebCore::RenderStyle::effectiveTouchActions const):
1656         (WebCore::RenderStyle::setEffectiveTouchActions):
1657
1658         Implement as inherited property for efficiency (touch-action itself is non-inherited).
1659
1660         * rendering/style/StyleRareInheritedData.cpp:
1661         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1662         (WebCore::StyleRareInheritedData::operator== const):
1663         * rendering/style/StyleRareInheritedData.h:
1664
1665 2019-04-04  Yusuke Suzuki  <ysuzuki@apple.com>
1666
1667         Unreviewed, fix linking error because the build of RTCIceTransport.cpp is handled in Xcode project side accidentally
1668         https://bugs.webkit.org/show_bug.cgi?id=196475
1669
1670         We did not have RTCIceTransport.cpp in Sources.txt.
1671
1672         * WebCore.xcodeproj/project.pbxproj:
1673
1674 2019-04-04  Yusuke Suzuki  <ysuzuki@apple.com>
1675
1676         [WebCore] Put most of derived classes of ScriptWrappable into IsoHeap
1677         https://bugs.webkit.org/show_bug.cgi?id=196475
1678
1679         Reviewed by Saam Barati.
1680
1681         This patch puts most of derived classes of ScriptWrappable into IsoHeap. We do not include derived classes of Event simply
1682         because Internal repository code also inherits it. After watching the result of this patch, we will try Event and its derived
1683         classes into IsoHeap too.
1684
1685         This patch makes the following things IsoHeap-allocated. These classes are listed by using lldb python script.
1686
1687             1. DOM collections (HTMLCollection etc.)
1688             2. WebAudio nodes
1689             3. IDB classes
1690             4. FileSystem API classes
1691             5. Canvas contexts
1692             6. WebRTC classses
1693             7. XMLHttpRequest related classes
1694             8. WebSocket related classes
1695             9. Worker and Worklet related classes
1696             10. Other misc classes
1697
1698         * Modules/applepay/ApplePaySession.cpp:
1699         * Modules/applepay/ApplePaySession.h:
1700         * Modules/encryptedmedia/MediaKeySession.cpp:
1701         * Modules/encryptedmedia/MediaKeySession.h:
1702         * Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:
1703         * Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:
1704         * Modules/entriesapi/DOMFileSystem.cpp:
1705         * Modules/entriesapi/DOMFileSystem.h:
1706         (WebCore::DOMFileSystem::createEntryForFile): Deleted.
1707         (WebCore::DOMFileSystem::name const): Deleted.
1708         * Modules/entriesapi/FileSystemDirectoryEntry.h:
1709         * Modules/entriesapi/FileSystemDirectoryReader.cpp:
1710         * Modules/entriesapi/FileSystemDirectoryReader.h:
1711         * Modules/entriesapi/FileSystemEntry.cpp:
1712         * Modules/entriesapi/FileSystemEntry.h:
1713         * Modules/entriesapi/FileSystemFileEntry.h:
1714         * Modules/geolocation/Geolocation.cpp:
1715         * Modules/geolocation/Geolocation.h:
1716         (WebCore::Geolocation::document const): Deleted.
1717         (WebCore::Geolocation::frame const): Deleted.
1718         (WebCore::Geolocation::resetIsAllowed): Deleted.
1719         (WebCore::Geolocation::isAllowed const): Deleted.
1720         (WebCore::Geolocation::isDenied const): Deleted.
1721         (WebCore::Geolocation::hasListeners const): Deleted.
1722         * Modules/indexeddb/IDBCursor.cpp:
1723         * Modules/indexeddb/IDBCursor.h:
1724         * Modules/indexeddb/IDBCursorWithValue.cpp:
1725         * Modules/indexeddb/IDBCursorWithValue.h:
1726         * Modules/indexeddb/IDBDatabase.cpp:
1727         * Modules/indexeddb/IDBDatabase.h:
1728         (WebCore::IDBDatabase::info const): Deleted.
1729         (WebCore::IDBDatabase::databaseConnectionIdentifier const): Deleted.
1730         (WebCore::IDBDatabase::connectionProxy): Deleted.
1731         (WebCore::IDBDatabase::isClosingOrClosed const): Deleted.
1732         * Modules/indexeddb/IDBKeyRange.cpp:
1733         * Modules/indexeddb/IDBKeyRange.h:
1734         (WebCore::IDBKeyRange::lower const): Deleted.
1735         (WebCore::IDBKeyRange::upper const): Deleted.
1736         (WebCore::IDBKeyRange::lowerOpen const): Deleted.
1737         (WebCore::IDBKeyRange::upperOpen const): Deleted.
1738         * Modules/indexeddb/IDBOpenDBRequest.cpp:
1739         * Modules/indexeddb/IDBOpenDBRequest.h:
1740         * Modules/indexeddb/IDBRequest.cpp:
1741         * Modules/indexeddb/IDBRequest.h:
1742         * Modules/indexeddb/IDBTransaction.cpp:
1743         * Modules/indexeddb/IDBTransaction.h:
1744         (WebCore::IDBTransaction::mode const): Deleted.
1745         (WebCore::IDBTransaction::info const): Deleted.
1746         (WebCore::IDBTransaction::database): Deleted.
1747         (WebCore::IDBTransaction::database const): Deleted.
1748         (WebCore::IDBTransaction::originalDatabaseInfo const): Deleted.
1749         (WebCore::IDBTransaction::isVersionChange const): Deleted.
1750         (WebCore::IDBTransaction::isReadOnly const): Deleted.
1751         (WebCore::IDBTransaction::isFinished const): Deleted.
1752         * Modules/mediarecorder/MediaRecorder.cpp:
1753         * Modules/mediarecorder/MediaRecorder.h:
1754         * Modules/mediasession/MediaRemoteControls.cpp:
1755         * Modules/mediasession/MediaRemoteControls.h:
1756         (WebCore::MediaRemoteControls::create): Deleted.
1757         (WebCore::MediaRemoteControls::previousTrackEnabled const): Deleted.
1758         (WebCore::MediaRemoteControls::nextTrackEnabled const): Deleted.
1759         * Modules/mediasource/MediaSource.cpp:
1760         * Modules/mediasource/MediaSource.h:
1761         * Modules/mediasource/SourceBuffer.cpp:
1762         * Modules/mediasource/SourceBuffer.h:
1763         * Modules/mediasource/SourceBufferList.cpp:
1764         * Modules/mediasource/SourceBufferList.h:
1765         * Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
1766         * Modules/mediastream/CanvasCaptureMediaStreamTrack.h:
1767         * Modules/mediastream/MediaDeviceInfo.cpp:
1768         * Modules/mediastream/MediaDeviceInfo.h:
1769         (WebCore::MediaDeviceInfo::label const): Deleted.
1770         (WebCore::MediaDeviceInfo::deviceId const): Deleted.
1771         (WebCore::MediaDeviceInfo::groupId const): Deleted.
1772         (WebCore::MediaDeviceInfo::kind const): Deleted.
1773         * Modules/mediastream/MediaDevices.cpp:
1774         * Modules/mediastream/MediaDevices.h:
1775         * Modules/mediastream/MediaStream.cpp:
1776         * Modules/mediastream/MediaStream.h:
1777         * Modules/mediastream/MediaStreamTrack.cpp:
1778         * Modules/mediastream/MediaStreamTrack.h:
1779         * Modules/mediastream/RTCDTMFSender.cpp:
1780         * Modules/mediastream/RTCDTMFSender.h:
1781         * Modules/mediastream/RTCDataChannel.cpp:
1782         * Modules/mediastream/RTCDataChannel.h:
1783         * Modules/mediastream/RTCIceCandidate.cpp:
1784         * Modules/mediastream/RTCIceCandidate.h:
1785         (WebCore::RTCIceCandidate::candidate const): Deleted.
1786         (WebCore::RTCIceCandidate::sdpMid const): Deleted.
1787         (WebCore::RTCIceCandidate::sdpMLineIndex const): Deleted.
1788         (WebCore::RTCIceCandidate::setCandidate): Deleted.
1789         * Modules/mediastream/RTCIceTransport.cpp:
1790         * Modules/mediastream/RTCIceTransport.h:
1791         (WebCore::RTCIceTransport::create): Deleted.
1792         (WebCore::RTCIceTransport::state const): Deleted.
1793         (WebCore::RTCIceTransport::setState): Deleted.
1794         (WebCore::RTCIceTransport::gatheringState const): Deleted.
1795         (WebCore::RTCIceTransport::setGatheringState): Deleted.
1796         (WebCore::RTCIceTransport::RTCIceTransport): Deleted.
1797         * Modules/mediastream/RTCPeerConnection.cpp:
1798         * Modules/mediastream/RTCPeerConnection.h:
1799         * Modules/mediastream/RTCRtpReceiver.cpp:
1800         * Modules/mediastream/RTCRtpReceiver.h:
1801         (WebCore::RTCRtpReceiver::create): Deleted.
1802         (WebCore::RTCRtpReceiver::setBackend): Deleted.
1803         (WebCore::RTCRtpReceiver::getParameters): Deleted.
1804         (WebCore::RTCRtpReceiver::getContributingSources const): Deleted.
1805         (WebCore::RTCRtpReceiver::getSynchronizationSources const): Deleted.
1806         (WebCore::RTCRtpReceiver::track): Deleted.
1807         (WebCore::RTCRtpReceiver::backend): Deleted.
1808         * Modules/mediastream/RTCRtpSender.cpp:
1809         * Modules/mediastream/RTCRtpSender.h:
1810         (WebCore::RTCRtpSender::track): Deleted.
1811         (WebCore::RTCRtpSender::trackId const): Deleted.
1812         (WebCore::RTCRtpSender::trackKind const): Deleted.
1813         (WebCore::RTCRtpSender::mediaStreamIds const): Deleted.
1814         (WebCore::RTCRtpSender::setMediaStreamIds): Deleted.
1815         (WebCore::RTCRtpSender::isStopped const): Deleted.
1816         (WebCore::RTCRtpSender::backend): Deleted.
1817         * Modules/mediastream/RTCRtpTransceiver.cpp:
1818         * Modules/mediastream/RTCRtpTransceiver.h:
1819         (WebCore::RTCRtpTransceiver::create): Deleted.
1820         (WebCore::RTCRtpTransceiver::sender): Deleted.
1821         (WebCore::RTCRtpTransceiver::receiver): Deleted.
1822         (WebCore::RTCRtpTransceiver::iceTransport): Deleted.
1823         (WebCore::RTCRtpTransceiver::backend): Deleted.
1824         * Modules/mediastream/RTCSessionDescription.cpp:
1825         * Modules/mediastream/RTCSessionDescription.h:
1826         (WebCore::RTCSessionDescription::type const): Deleted.
1827         (WebCore::RTCSessionDescription::sdp const): Deleted.
1828         (WebCore::RTCSessionDescription::setSdp): Deleted.
1829         * Modules/notifications/Notification.cpp:
1830         * Modules/notifications/Notification.h:
1831         * Modules/paymentrequest/PaymentRequest.cpp:
1832         * Modules/paymentrequest/PaymentRequest.h:
1833         * Modules/paymentrequest/PaymentResponse.cpp:
1834         * Modules/paymentrequest/PaymentResponse.h:
1835         * Modules/speech/SpeechSynthesisUtterance.cpp:
1836         * Modules/speech/SpeechSynthesisUtterance.h:
1837         * Modules/webaudio/AnalyserNode.cpp:
1838         * Modules/webaudio/AnalyserNode.h:
1839         * Modules/webaudio/AudioBasicInspectorNode.cpp:
1840         * Modules/webaudio/AudioBasicInspectorNode.h:
1841         * Modules/webaudio/AudioBasicProcessorNode.cpp:
1842         * Modules/webaudio/AudioBasicProcessorNode.h:
1843         * Modules/webaudio/AudioBufferSourceNode.cpp:
1844         * Modules/webaudio/AudioBufferSourceNode.h:
1845         * Modules/webaudio/AudioContext.cpp:
1846         * Modules/webaudio/AudioContext.h:
1847         * Modules/webaudio/AudioDestinationNode.cpp:
1848         * Modules/webaudio/AudioDestinationNode.h:
1849         * Modules/webaudio/AudioNode.cpp:
1850         * Modules/webaudio/AudioNode.h:
1851         * Modules/webaudio/AudioScheduledSourceNode.cpp:
1852         * Modules/webaudio/AudioScheduledSourceNode.h:
1853         * Modules/webaudio/BiquadFilterNode.cpp:
1854         * Modules/webaudio/BiquadFilterNode.h:
1855         * Modules/webaudio/ChannelMergerNode.cpp:
1856         * Modules/webaudio/ChannelMergerNode.h:
1857         * Modules/webaudio/ChannelSplitterNode.cpp:
1858         * Modules/webaudio/ChannelSplitterNode.h:
1859         * Modules/webaudio/ConvolverNode.cpp:
1860         * Modules/webaudio/ConvolverNode.h:
1861         * Modules/webaudio/DefaultAudioDestinationNode.cpp:
1862         * Modules/webaudio/DefaultAudioDestinationNode.h:
1863         * Modules/webaudio/DelayNode.cpp:
1864         * Modules/webaudio/DelayNode.h:
1865         * Modules/webaudio/DynamicsCompressorNode.cpp:
1866         * Modules/webaudio/DynamicsCompressorNode.h:
1867         * Modules/webaudio/GainNode.cpp:
1868         * Modules/webaudio/GainNode.h:
1869         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
1870         * Modules/webaudio/MediaElementAudioSourceNode.h:
1871         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
1872         * Modules/webaudio/MediaStreamAudioDestinationNode.h:
1873         * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
1874         * Modules/webaudio/MediaStreamAudioSourceNode.h:
1875         * Modules/webaudio/OfflineAudioContext.cpp:
1876         * Modules/webaudio/OfflineAudioContext.h:
1877         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
1878         * Modules/webaudio/OfflineAudioDestinationNode.h:
1879         * Modules/webaudio/OscillatorNode.cpp:
1880         * Modules/webaudio/OscillatorNode.h:
1881         * Modules/webaudio/PannerNode.cpp:
1882         * Modules/webaudio/PannerNode.h:
1883         * Modules/webaudio/ScriptProcessorNode.cpp:
1884         * Modules/webaudio/ScriptProcessorNode.h:
1885         * Modules/webaudio/WaveShaperNode.cpp:
1886         * Modules/webaudio/WaveShaperNode.h:
1887         * Modules/webgpu/GPUCanvasContext.cpp:
1888         * Modules/webgpu/GPUCanvasContext.h:
1889         * Modules/websockets/WebSocket.cpp:
1890         * Modules/websockets/WebSocket.h:
1891         * Modules/webvr/VRDisplay.cpp:
1892         * Modules/webvr/VRDisplay.h:
1893         (WebCore::VRDisplay::isPresenting const): Deleted.
1894         (WebCore::VRDisplay::displayName const): Deleted.
1895         (WebCore::VRDisplay::displayId const): Deleted.
1896         (WebCore::VRDisplay::depthNear const): Deleted.
1897         (WebCore::VRDisplay::setDepthNear): Deleted.
1898         (WebCore::VRDisplay::depthFar const): Deleted.
1899         (WebCore::VRDisplay::setDepthFar): Deleted.
1900         (WebCore::VRDisplay::document): Deleted.
1901         * Sources.txt:
1902         * WebCore.xcodeproj/project.pbxproj:
1903         * animation/CSSAnimation.cpp:
1904         * animation/CSSAnimation.h:
1905         * animation/CSSTransition.cpp:
1906         * animation/CSSTransition.h:
1907         * animation/DeclarativeAnimation.cpp:
1908         * animation/DeclarativeAnimation.h:
1909         * animation/WebAnimation.cpp:
1910         * animation/WebAnimation.h:
1911         * bindings/js/ScriptWrappable.h:
1912         * css/CSSComputedStyleDeclaration.cpp:
1913         * css/CSSComputedStyleDeclaration.h:
1914         * css/CSSStyleDeclaration.cpp:
1915         (): Deleted.
1916         * css/CSSStyleDeclaration.h:
1917         * css/DOMMatrix.h:
1918         * css/DOMMatrixReadOnly.cpp:
1919         * css/DOMMatrixReadOnly.h:
1920         * css/FontFaceSet.cpp:
1921         * css/FontFaceSet.h:
1922         * css/PropertySetCSSStyleDeclaration.cpp:
1923         * css/PropertySetCSSStyleDeclaration.h:
1924         * css/WebKitCSSMatrix.cpp:
1925         * css/WebKitCSSMatrix.h:
1926         * css/typedom/TypedOMCSSImageValue.cpp: Added.
1927         * css/typedom/TypedOMCSSImageValue.h:
1928         * css/typedom/TypedOMCSSNumericValue.cpp: Added.
1929         * css/typedom/TypedOMCSSNumericValue.h:
1930         * css/typedom/TypedOMCSSStyleValue.cpp: Added.
1931         * css/typedom/TypedOMCSSStyleValue.h:
1932         * css/typedom/TypedOMCSSUnitValue.cpp: Added.
1933         * css/typedom/TypedOMCSSUnitValue.h:
1934         * css/typedom/TypedOMCSSUnparsedValue.cpp: Added.
1935         * css/typedom/TypedOMCSSUnparsedValue.h:
1936         * dom/AbortController.cpp:
1937         * dom/AbortController.h:
1938         * dom/AbortSignal.cpp:
1939         * dom/AbortSignal.h:
1940         * dom/AllDescendantsCollection.cpp: Copied from Source/WebCore/xml/XMLHttpRequestEventTarget.h.
1941         * dom/AllDescendantsCollection.h:
1942         * dom/ChildNodeList.cpp:
1943         * dom/ChildNodeList.h:
1944         * dom/ClassCollection.cpp:
1945         * dom/ClassCollection.h:
1946         * dom/DOMImplementation.cpp:
1947         * dom/DOMImplementation.h:
1948         (WebCore::DOMImplementation::ref): Deleted.
1949         (WebCore::DOMImplementation::deref): Deleted.
1950         (WebCore::DOMImplementation::document): Deleted.
1951         (WebCore::DOMImplementation::hasFeature): Deleted.
1952         * dom/DOMPoint.h:
1953         * dom/DOMPointReadOnly.cpp:
1954         * dom/DOMPointReadOnly.h:
1955         * dom/DOMQuad.cpp:
1956         * dom/DOMQuad.h:
1957         * dom/DOMRect.h:
1958         * dom/DOMRectReadOnly.cpp: Copied from Source/WebCore/dom/DOMPointReadOnly.cpp.
1959         * dom/DOMRectReadOnly.h:
1960         * dom/DataTransferItemList.cpp:
1961         * dom/DataTransferItemList.h:
1962         (WebCore::DataTransferItemList::ref): Deleted.
1963         (WebCore::DataTransferItemList::deref): Deleted.
1964         (WebCore::DataTransferItemList::dataTransfer): Deleted.
1965         (WebCore::DataTransferItemList::hasItems const): Deleted.
1966         (WebCore::DataTransferItemList::items const): Deleted.
1967         * dom/DatasetDOMStringMap.cpp:
1968         * dom/DatasetDOMStringMap.h:
1969         * dom/DocumentParser.h:
1970         * dom/EventTarget.cpp:
1971         * dom/EventTarget.h:
1972         * dom/LiveNodeList.cpp:
1973         * dom/LiveNodeList.h:
1974         * dom/MessageChannel.cpp:
1975         * dom/MessagePort.cpp:
1976         * dom/MessagePort.h:
1977         * dom/NameNodeList.cpp:
1978         * dom/NameNodeList.h:
1979         * dom/NamedNodeMap.cpp:
1980         * dom/NamedNodeMap.h:
1981         (WebCore::NamedNodeMap::NamedNodeMap): Deleted.
1982         (WebCore::NamedNodeMap::element): Deleted.
1983         * dom/NodeIterator.cpp:
1984         * dom/NodeIterator.h:
1985         (WebCore::NodeIterator::detach): Deleted.
1986         (WebCore::NodeIterator::referenceNode const): Deleted.
1987         (WebCore::NodeIterator::pointerBeforeReferenceNode const): Deleted.
1988         * dom/NodeList.cpp: Copied from Source/WebCore/xml/XMLHttpRequestEventTarget.h.
1989         * dom/NodeList.h:
1990         * dom/NodeRareData.cpp:
1991         * dom/ScriptExecutionContext.cpp:
1992         * dom/SimulatedClick.cpp:
1993         * dom/StaticNodeList.cpp:
1994         * dom/StaticNodeList.h:
1995         * dom/TagCollection.cpp:
1996         * dom/TagCollection.h:
1997         * dom/TreeWalker.cpp:
1998         * dom/TreeWalker.h:
1999         (WebCore::TreeWalker::create): Deleted.
2000         (WebCore::TreeWalker::currentNode): Deleted.
2001         (WebCore::TreeWalker::currentNode const): Deleted.
2002         * fileapi/Blob.cpp:
2003         * fileapi/Blob.h:
2004         * fileapi/File.cpp:
2005         * fileapi/File.h:
2006         * fileapi/FileList.cpp:
2007         * fileapi/FileList.h:
2008         (WebCore::FileList::create): Deleted.
2009         (WebCore::FileList::length const): Deleted.
2010         (WebCore::FileList::isEmpty const): Deleted.
2011         (WebCore::FileList::files const): Deleted.
2012         (WebCore::FileList::file const): Deleted.
2013         (WebCore::FileList::FileList): Deleted.
2014         (WebCore::FileList::append): Deleted.
2015         (WebCore::FileList::clear): Deleted.
2016         * fileapi/FileReader.cpp:
2017         * fileapi/FileReader.h:
2018         * html/CachedHTMLCollection.h:
2019         * html/GenericCachedHTMLCollection.cpp:
2020         * html/GenericCachedHTMLCollection.h:
2021         * html/HTMLAllCollection.cpp:
2022         * html/HTMLAllCollection.h:
2023         * html/HTMLCollection.cpp:
2024         * html/HTMLCollection.h:
2025         * html/HTMLFormControlsCollection.cpp:
2026         * html/HTMLFormControlsCollection.h:
2027         * html/HTMLNameCollection.cpp:
2028         * html/HTMLNameCollection.h:
2029         * html/HTMLOptionsCollection.cpp:
2030         * html/HTMLOptionsCollection.h:
2031         * html/HTMLTableRowsCollection.cpp:
2032         * html/HTMLTableRowsCollection.h:
2033         * html/ImageBitmap.cpp:
2034         * html/ImageBitmap.h:
2035         (WebCore::ImageBitmap::isDetached const): Deleted.
2036         (WebCore::ImageBitmap::buffer): Deleted.
2037         (WebCore::ImageBitmap::originClean const): Deleted.
2038         * html/LabelsNodeList.cpp:
2039         * html/LabelsNodeList.h:
2040         * html/MediaController.cpp:
2041         * html/MediaController.h:
2042         * html/OffscreenCanvas.cpp:
2043         * html/OffscreenCanvas.h:
2044         * html/RadioNodeList.cpp:
2045         * html/RadioNodeList.h:
2046         * html/canvas/CanvasRenderingContext.cpp:
2047         * html/canvas/CanvasRenderingContext.h:
2048         * html/canvas/CanvasRenderingContext2D.cpp:
2049         * html/canvas/CanvasRenderingContext2D.h:
2050         * html/canvas/CanvasRenderingContext2DBase.cpp:
2051         * html/canvas/CanvasRenderingContext2DBase.h:
2052         * html/canvas/GPUBasedCanvasRenderingContext.h:
2053         * html/canvas/ImageBitmapRenderingContext.cpp:
2054         * html/canvas/ImageBitmapRenderingContext.h:
2055         * html/canvas/OffscreenCanvasRenderingContext2D.cpp:
2056         * html/canvas/OffscreenCanvasRenderingContext2D.h:
2057         * html/canvas/PaintRenderingContext2D.cpp:
2058         * html/canvas/PaintRenderingContext2D.h:
2059         * html/canvas/PlaceholderRenderingContext.cpp:
2060         * html/canvas/PlaceholderRenderingContext.h:
2061         * html/canvas/WebGL2RenderingContext.cpp:
2062         * html/canvas/WebGL2RenderingContext.h:
2063         * html/canvas/WebGLRenderingContext.cpp:
2064         * html/canvas/WebGLRenderingContext.h:
2065         * html/canvas/WebGLRenderingContextBase.cpp:
2066         * html/canvas/WebGLRenderingContextBase.h:
2067         * html/track/AudioTrackList.h:
2068         * html/track/DataCue.cpp:
2069         * html/track/DataCue.h:
2070         * html/track/InbandDataTextTrack.cpp:
2071         * html/track/InbandDataTextTrack.h:
2072         * html/track/InbandGenericTextTrack.cpp:
2073         * html/track/InbandGenericTextTrack.h:
2074         * html/track/InbandTextTrack.cpp:
2075         * html/track/InbandTextTrack.h:
2076         * html/track/InbandWebVTTTextTrack.cpp:
2077         * html/track/InbandWebVTTTextTrack.h:
2078         * html/track/LoadableTextTrack.cpp:
2079         * html/track/LoadableTextTrack.h:
2080         * html/track/TextTrack.cpp:
2081         * html/track/TextTrack.h:
2082         * html/track/TextTrackCue.cpp:
2083         * html/track/TextTrackCue.h:
2084         * html/track/TextTrackCueGeneric.cpp:
2085         * html/track/TextTrackCueGeneric.h:
2086         * html/track/TextTrackList.cpp:
2087         * html/track/TextTrackList.h:
2088         * html/track/TrackListBase.cpp:
2089         * html/track/TrackListBase.h:
2090         * html/track/VTTCue.cpp:
2091         * html/track/VTTCue.h:
2092         * html/track/VideoTrackList.h:
2093         * loader/appcache/DOMApplicationCache.cpp:
2094         * loader/appcache/DOMApplicationCache.h:
2095         * page/AbstractDOMWindow.cpp:
2096         * page/AbstractDOMWindow.h:
2097         * page/BarProp.cpp:
2098         * page/BarProp.h:
2099         (WebCore::BarProp::create): Deleted.
2100         * page/DOMWindow.cpp:
2101         * page/DOMWindow.h:
2102         * page/EventSource.cpp:
2103         * page/EventSource.h:
2104         * page/History.cpp:
2105         * page/History.h:
2106         * page/Location.cpp:
2107         * page/Location.h:
2108         (WebCore::Location::create): Deleted.
2109         (WebCore::Location::toString const): Deleted.
2110         * page/Navigator.cpp:
2111         * page/Navigator.h:
2112         * page/Performance.cpp:
2113         * page/Performance.h:
2114         * page/RemoteDOMWindow.cpp:
2115         * page/RemoteDOMWindow.h:
2116         * page/Screen.cpp:
2117         * page/Screen.h:
2118         * page/VisualViewport.cpp:
2119         * page/VisualViewport.h:
2120         * plugins/DOMMimeTypeArray.cpp:
2121         * plugins/DOMMimeTypeArray.h:
2122         (WebCore::DOMMimeTypeArray::create): Deleted.
2123         * plugins/DOMPlugin.cpp:
2124         * plugins/DOMPlugin.h:
2125         (WebCore::DOMPlugin::create): Deleted.
2126         * plugins/DOMPluginArray.cpp:
2127         * plugins/DOMPluginArray.h:
2128         (WebCore::DOMPluginArray::create): Deleted.
2129         * storage/Storage.cpp:
2130         * storage/Storage.h:
2131         (WebCore::Storage::area const): Deleted.
2132         * workers/AbstractWorker.cpp:
2133         * workers/AbstractWorker.h:
2134         * workers/DedicatedWorkerGlobalScope.cpp:
2135         * workers/DedicatedWorkerGlobalScope.h:
2136         * workers/Worker.cpp:
2137         * workers/Worker.h:
2138         * workers/WorkerGlobalScope.cpp:
2139         * workers/WorkerGlobalScope.h:
2140         * workers/service/ServiceWorker.cpp:
2141         * workers/service/ServiceWorker.h:
2142         * workers/service/ServiceWorkerContainer.cpp:
2143         * workers/service/ServiceWorkerContainer.h:
2144         * workers/service/ServiceWorkerGlobalScope.cpp:
2145         * workers/service/ServiceWorkerGlobalScope.h:
2146         * workers/service/ServiceWorkerRegistration.cpp:
2147         * workers/service/ServiceWorkerRegistration.h:
2148         * worklets/PaintWorkletGlobalScope.cpp:
2149         * worklets/PaintWorkletGlobalScope.h:
2150         * worklets/Worklet.cpp:
2151         * worklets/Worklet.h:
2152         * worklets/WorkletGlobalScope.cpp:
2153         * worklets/WorkletGlobalScope.h:
2154         * xml/XMLHttpRequest.cpp:
2155         * xml/XMLHttpRequest.h:
2156         * xml/XMLHttpRequestEventTarget.h:
2157         * xml/XMLHttpRequestUpload.cpp:
2158         * xml/XMLHttpRequestUpload.h:
2159         * xml/XPathParser.cpp:
2160
2161 2019-04-04  Chris Dumez  <cdumez@apple.com>
2162
2163         Unreviewed, fix iOS build with recent SDKs.
2164
2165         std::ptr_fun() is deprecated.
2166
2167         * platform/ios/LegacyTileGrid.mm:
2168         (WebCore::LegacyTileGrid::dropDistantTiles):
2169
2170 2019-04-04  Antoine Quint  <graouts@apple.com>
2171
2172         [Web Animations] JS wrapper may be deleted while animation is yet to dispatch its finish event
2173         https://bugs.webkit.org/show_bug.cgi?id=196118
2174         <rdar://problem/46614137>
2175
2176         Reviewed by Ryosuke Niwa.
2177
2178         Test: webanimations/js-wrapper-kept-alive.html
2179
2180         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.
2181
2182         * animation/WebAnimation.cpp:
2183         (WebCore::WebAnimation::stop): Drive-by fix for the missing superclass method call.
2184         (WebCore::WebAnimation::hasPendingActivity const):
2185         * animation/WebAnimation.h:
2186
2187 2019-04-04  Miguel Gomez  <magomez@igalia.com>
2188
2189         [GTK][WPE] Use a timer to request the creation of pending tiles
2190         https://bugs.webkit.org/show_bug.cgi?id=196594
2191
2192         Reviewed by Žan Doberšek.
2193
2194         Use a timer to request pending tile creation, as calls to notifyFlushRequired() are discarded
2195         while inside a layer flush.
2196
2197         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2198         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
2199         (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
2200         (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
2201         (WebCore::CoordinatedGraphicsLayer::requestPendingTileCreationTimerFired):
2202         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2203
2204 2019-04-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2205
2206         [ATK] Wrong index passed to AtkObject::children-changed::add signal in AXObjectCache::attachWrapper()
2207         https://bugs.webkit.org/show_bug.cgi?id=196538
2208
2209         Reviewed by Michael Catanzaro.
2210
2211         In most of the cases the parent is not found, probably because the child is not a direct descendant of the
2212         parent returned by parentObjectUnignored(). We need to handle the case of find() returning notFound.
2213
2214         * accessibility/atk/AXObjectCacheAtk.cpp:
2215         (WebCore::AXObjectCache::attachWrapper): Use -1 as the index when find() returns notFound.
2216
2217 2019-04-03  Timothy Hatcher  <timothy@apple.com>
2218
2219         Update AutoFill field icons to be SVG instead of PNG images.
2220         https://bugs.webkit.org/show_bug.cgi?id=196557
2221         rdar://problem/48292514
2222
2223         Reviewed by Tim Horton.
2224
2225         * css/html.css:
2226         (input::-webkit-credentials-auto-fill-button):
2227         (input::-webkit-contacts-auto-fill-button):
2228         (input::-webkit-credit-card-auto-fill-button):
2229
2230 2019-04-03  Simon Fraser  <simon.fraser@apple.com>
2231
2232         Simplify some "programmaticScroll" code paths
2233         https://bugs.webkit.org/show_bug.cgi?id=196589
2234
2235         Reviewed by Zalan Bujtas.
2236
2237         AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll() just returned early if programmaticScroll
2238         was true, so instead, just never call it. This means we can remove the "programmaticScroll" argument from 
2239         scheduleUpdateScrollPositionAfterAsyncScroll(). Also change some callers to use the ScrollType enum
2240         instead of a bool.
2241
2242         Now, ThreadedScrollingTree::scrollingTreeNodeDidScroll() just returns early. Programmatic scrolls
2243         update state on the main thread before updating the scrolling tree, so this makes sense.
2244
2245         * page/scrolling/AsyncScrollingCoordinator.cpp:
2246         (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
2247         (WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll):
2248         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScrollTimerFired):
2249         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
2250         (WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
2251         * page/scrolling/AsyncScrollingCoordinator.h:
2252         (WebCore::AsyncScrollingCoordinator::ScheduledScrollUpdate::ScheduledScrollUpdate):
2253         (WebCore::AsyncScrollingCoordinator::ScheduledScrollUpdate::matchesUpdateType const):
2254         * page/scrolling/ScrollingCoordinator.cpp:
2255         (WebCore::operator<<):
2256         * page/scrolling/ScrollingCoordinator.h:
2257         (WebCore::ScrollingCoordinator::reconcileScrollingState):
2258         * page/scrolling/ThreadedScrollingTree.cpp:
2259         (WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
2260
2261 2019-04-03  Youenn Fablet  <youenn@apple.com>
2262
2263         Add logging and ASSERTs to investigate issue with VPModuleInitialize
2264         https://bugs.webkit.org/show_bug.cgi?id=196573
2265
2266         Reviewed by Eric Carlson.
2267
2268         Add some ASSERTs.
2269         No change of behavior.
2270
2271         * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
2272         (WebCore::LibWebRTCProviderCocoa::createDecoderFactory):
2273         (WebCore::LibWebRTCProviderCocoa::createEncoderFactory):
2274
2275 2019-04-03  Simon Fraser  <simon.fraser@apple.com>
2276
2277         Remove some redundant memebers from ScrollingStateFrameScrollingNode
2278         https://bugs.webkit.org/show_bug.cgi?id=196571
2279
2280         Reviewed by Zalan Bujtas.
2281
2282         m_requestedScrollPosition and m_requestedScrollPositionRepresentsProgrammaticScroll were
2283         duplicated on ScrollingStateFrameScrollingNode and ScrollingStateScrollingNode, so
2284         remove them from the derived class.
2285
2286         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
2287         (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
2288         (WebCore::ScrollingStateFrameScrollingNode::dumpProperties const):
2289         * page/scrolling/ScrollingStateFrameScrollingNode.h:
2290
2291 2019-04-03  Said Abou-Hallawa  <sabouhallawa@apple.com>
2292
2293         REGRESSION (r220717): Assertion fires when animating an SVG rounded corner rect till it collapses
2294         https://bugs.webkit.org/show_bug.cgi?id=196518
2295
2296         Reviewed by Simon Fraser.
2297
2298         r220717 made RenderSVGRect clear its m_path in updateShapeFromElement().
2299
2300         RenderSVGRect tries to optimize its layout and drawing if the rectangle
2301         is not rounded. So it uses the flag m_usePathFallback to know whether to
2302         use m_path or m_innerStrokeRect and m_outerStrokeRect. If the rectangle
2303         is rounded but its boundingSize is empty, m_path will be cleared,
2304         m_innerStrokeRect and m_outerStrokeRect will be recalculated but
2305         m_usePathFallback will not be reset to false. Therefore when calling 
2306         RenderSVGRect::isEmpty(), it will call RenderSVGShape::isEmpty() which
2307         will assert since m_path is null.
2308
2309         Test: svg/animations/animate-rounded-corner-rect-zero-height.svg
2310
2311         * rendering/svg/RenderSVGRect.cpp:
2312         (WebCore::RenderSVGRect::updateShapeFromElement):
2313         Reset m_usePathFallback to false once clearPath() is called.
2314
2315 2019-04-03  Ryosuke Niwa  <rniwa@webkit.org>
2316
2317         Nullptr crash in InlineTextBox::selectionState via TextIndicator::createWithRange
2318         https://bugs.webkit.org/show_bug.cgi?id=196579
2319
2320         Reviewed by Simon Fraser.
2321
2322         Avoid crashing accessing the unengated optional's value in relese builds for now.
2323
2324         Unfortunately, fixing the underlying cause of the selection states of RenderView & RenderObject
2325         getting out out of sync would require a significant re-architecturing of the whole selection
2326         repainting / state managing mechanism.
2327
2328         * rendering/SelectionRangeData.h:
2329         (WebCore::SelectionRangeData::startPosition const):
2330         (WebCore::SelectionRangeData::endPosition const):
2331
2332 2019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
2333
2334         -apple-trailing-word is needed for browser detection
2335         https://bugs.webkit.org/show_bug.cgi?id=196575
2336
2337         Unreviewed.
2338
2339         This is an unreviewed partial revert of r243819. Turns out there are some websites
2340         which use this property to do browser detection. So, we need to continue to parse
2341         the property, but we don't need the property to do anything.
2342
2343         Test: fast/text/trailing-word-detection.html
2344
2345         * Configurations/FeatureDefines.xcconfig:
2346         * css/CSSComputedStyleDeclaration.cpp:
2347         (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
2348         * css/CSSPrimitiveValueMappings.h:
2349         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2350         (WebCore::CSSPrimitiveValue::operator TrailingWord const):
2351         * css/CSSProperties.json:
2352         * css/CSSValueKeywords.in:
2353         * css/parser/CSSParserFastPaths.cpp:
2354         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
2355         (WebCore::CSSParserFastPaths::isKeywordPropertyID):
2356         * rendering/style/RenderStyle.h:
2357         (WebCore::RenderStyle::trailingWord const):
2358         (WebCore::RenderStyle::setTrailingWord):
2359         (WebCore::RenderStyle::initialTrailingWord):
2360         * rendering/style/RenderStyleConstants.h:
2361
2362 2019-04-03  Don Olmstead  <don.olmstead@sony.com>
2363
2364         [CMake][WTF] Mirror XCode header directories
2365         https://bugs.webkit.org/show_bug.cgi?id=191662
2366
2367         Reviewed by Konstantin Tokarev.
2368
2369         Use WTFFramework as a dependency and include frameworks/WTF.cmake for AppleWin internal
2370         builds.
2371
2372         * CMakeLists.txt:
2373         * PlatformWin.cmake:
2374
2375 2019-04-03  Said Abou-Hallawa  <sabouhallawa@apple.com>
2376
2377         Remove SVG properties tear-off objects
2378         https://bugs.webkit.org/show_bug.cgi?id=191237
2379
2380         Reviewed by Simon Fraser.
2381
2382         This patch cleans the code from unused SVG sources and get rid off the
2383         remaining SVG properties tear-off objects. Here are more details:
2384
2385         -- Remove the SVGAttributeAnimationController and move its code to the
2386            SVGAnimateElementBase. SVGAttributeAnimationController was introduced
2387            to allow animating the SVG properties whether they are backed by tear
2388            off objects or not. Since there will be no tear off objects anymore,
2389            one animation controller will be needed. But in this case, it will be
2390            better if we make SVGAnimateElementBase is the animation controller
2391            and make it manage the animator directly.
2392
2393         -- Remove SVGAttributeRegistry, SVGAttributeOwnerProxy and the virtual
2394            function SVGElement::attributeOwnerProxy(). Remove also all the
2395            overriding functions attributeOwnerProxy() from all the SVGElements.
2396
2397         -- Remove isKnownAttribute() from all the SVG header files except from 
2398            four classes: SVGURIReference, SVGFitToViewBox, SVGLangSpace
2399            and SVGExternalResourcesRequired.
2400
2401         -- Remove all the SVG animated properties classifying functions from
2402            SVGElement. This is now handled by SVGPropertyRegistry.
2403
2404         -- There is no need for the enum AnimatedPropertyType anymore. The SVG
2405            property accessor knows its type, knows how to access it and know what
2406            animator it should be created for it.
2407
2408         * Sources.txt:
2409         * WebCore.xcodeproj/project.pbxproj:
2410         * dom/Element.cpp:
2411         (WebCore::Element::synchronizeAllAttributes const):
2412         (WebCore::Element::synchronizeAttribute const):
2413         (WebCore::Element::fastAttributeLookupAllowed const):
2414         These functions are surprisingly marked 'const'. They were calling 'const'
2415         functions in SVGElement and SVGElement was casting 'this' as non 'const'
2416         before calling the non 'const' functions through the non 'const' 'this'
2417         pointer. Change this by moving the casting to the Element functions.
2418
2419         * rendering/svg/RenderSVGResourceGradient.cpp:
2420         (WebCore::RenderSVGResourceGradient::applyResource):
2421         * rendering/svg/RenderSVGResourcePattern.cpp:
2422         (WebCore::RenderSVGResourcePattern::applyResource):
2423         * svg/SVGAElement.h:
2424         * svg/SVGAltGlyphElement.h:
2425         * svg/SVGAnimateElementBase.cpp:
2426         (WebCore::SVGAnimateElementBase::SVGAnimateElementBase):
2427         (WebCore::SVGAnimateElementBase::animator const):
2428         (WebCore::SVGAnimateElementBase::hasInvalidCSSAttributeType const):
2429         (WebCore::SVGAnimateElementBase::isDiscreteAnimator const):
2430         (WebCore::SVGAnimateElementBase::setTargetElement):
2431         (WebCore::SVGAnimateElementBase::setAttributeName):
2432         (WebCore::SVGAnimateElementBase::resetAnimation):
2433         (WebCore::SVGAnimateElementBase::calculateFromAndToValues):
2434         (WebCore::SVGAnimateElementBase::calculateFromAndByValues):
2435         (WebCore::SVGAnimateElementBase::calculateToAtEndOfDurationValue):
2436         (WebCore::SVGAnimateElementBase::resetAnimatedType):
2437         (WebCore::SVGAnimateElementBase::calculateAnimatedValue):
2438         (WebCore::SVGAnimateElementBase::applyResultsToTarget):
2439         (WebCore::SVGAnimateElementBase::clearAnimatedType):
2440         (WebCore::SVGAnimateElementBase::calculateDistance):
2441         (WebCore::SVGAnimateElementBase::attributeAnimationController): Deleted.
2442         (WebCore::SVGAnimateElementBase::determineAnimatedPropertyType const): Deleted.
2443         (WebCore::SVGAnimateElementBase::isAdditive const): Deleted.
2444         * svg/SVGAnimateElementBase.h:
2445         (WebCore::SVGAnimateElementBase::animatorIfExists const):
2446         (WebCore::SVGAnimateElementBase::attributeAnimationControllerIfExists const): Deleted.
2447         The order of the functions was changed to resemble the order of running
2448         the animation:
2449           -- Setting the animation range
2450           -- Starting the animation
2451           -- Progressing the animation
2452           -- Applying the the progressed animaVal() to the target element
2453           -- Stopping the animation
2454
2455         * svg/SVGAnimateMotionElement.cpp:
2456         (WebCore::SVGAnimateMotionElement::calculateDistance):
2457         * svg/SVGAnimateMotionElement.h:
2458         * svg/SVGAnimationElement.cpp:
2459         (WebCore::SVGAnimationElement::calculateKeyTimesForCalcModePaced):
2460         (WebCore::SVGAnimationElement::shouldApplyAnimation): Deleted.
2461         * svg/SVGAnimationElement.h:
2462         (WebCore::SVGAnimationElement::attributeRegistry): Deleted.
2463         (WebCore::SVGAnimationElement::calculateDistance): Deleted.
2464         * svg/SVGAttributeAnimationController.cpp: Removed.
2465         * svg/SVGAttributeAnimationController.h: Removed.
2466         * svg/SVGAttributeAnimationControllerBase.cpp: Removed.
2467         * svg/SVGAttributeAnimationControllerBase.h: Removed.
2468         * svg/SVGCircleElement.h:
2469         * svg/SVGClipPathElement.h:
2470         * svg/SVGComponentTransferFunctionElement.h:
2471         * svg/SVGCursorElement.h:
2472         * svg/SVGDefsElement.h:
2473         * svg/SVGElement.cpp:
2474         (WebCore::SVGElement::synchronizeAttribute):
2475         (WebCore::SVGElement::synchronizeAllAttributes):
2476         (WebCore::SVGElement::synchronizeAllAnimatedSVGAttribute):
2477         (WebCore::createAttributeNameToAnimatedPropertyTypeMap): Deleted.
2478         (WebCore::attributeNameToAnimatedPropertyTypeMap): Deleted.
2479         (WebCore::createCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): Deleted.
2480         (WebCore::cssPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): Deleted.
2481         (WebCore::SVGElement::animatedPropertyTypesForAttribute): Deleted.
2482         (WebCore::SVGElement::synchronizeAnimatedSVGAttribute const): Deleted.
2483         (WebCore::SVGElement::isAnimatableCSSProperty): Deleted.
2484         (WebCore::SVGElement::isPresentationAttributeWithSVGDOM): Deleted.
2485         * svg/SVGElement.h:
2486         (WebCore::SVGElement::attributeOwnerProxy const): Deleted.
2487         (WebCore::SVGElement::attributeRegistry): Deleted.
2488         (WebCore::SVGElement::synchronizeAttribute): Deleted.
2489         (WebCore::SVGElement::synchronizeAttributes): Deleted.
2490         (WebCore::SVGElement::animatedTypes const): Deleted.
2491         (WebCore::SVGElement::lookupAnimatedProperty const): Deleted.
2492         (WebCore::SVGElement::lookupOrCreateAnimatedProperty): Deleted.
2493         (WebCore::SVGElement::lookupOrCreateAnimatedProperties): Deleted.
2494         (WebCore::SVGElement::isKnownAttribute): Deleted.
2495         * svg/SVGEllipseElement.h:
2496         * svg/SVGExternalResourcesRequired.h:
2497         (WebCore::SVGExternalResourcesRequired::attributeRegistry): Deleted.
2498         (WebCore::SVGExternalResourcesRequired::attributeOwnerProxy): Deleted.
2499         * svg/SVGFEBlendElement.h:
2500         * svg/SVGFEColorMatrixElement.h:
2501         * svg/SVGFEComponentTransferElement.h:
2502         * svg/SVGFECompositeElement.h:
2503         * svg/SVGFEConvolveMatrixElement.h:
2504         * svg/SVGFEDiffuseLightingElement.h:
2505         * svg/SVGFEDisplacementMapElement.h:
2506         * svg/SVGFEDropShadowElement.h:
2507         * svg/SVGFEGaussianBlurElement.h:
2508         * svg/SVGFEImageElement.h:
2509         * svg/SVGFELightElement.h:
2510         * svg/SVGFEMergeNodeElement.h:
2511         * svg/SVGFEMorphologyElement.h:
2512         * svg/SVGFEOffsetElement.h:
2513         * svg/SVGFESpecularLightingElement.h:
2514         * svg/SVGFETileElement.h:
2515         * svg/SVGFETurbulenceElement.h:
2516         * svg/SVGFilterElement.h:
2517         * svg/SVGFilterPrimitiveStandardAttributes.h:
2518         (WebCore::SVGFilterPrimitiveStandardAttributes::attributeRegistry): Deleted.
2519         * svg/SVGFitToViewBox.h:
2520         (WebCore::SVGFitToViewBox::attributeRegistry): Deleted.
2521         * svg/SVGFontElement.h:
2522         * svg/SVGForeignObjectElement.h:
2523         * svg/SVGGElement.h:
2524         * svg/SVGGeometryElement.h:
2525         * svg/SVGGlyphRefElement.h:
2526         * svg/SVGGradientElement.cpp:
2527         (WebCore::SVGGradientElement::svgAttributeChanged):
2528         * svg/SVGGradientElement.h:
2529         (WebCore::SVGGradientElement::attributeRegistry): Deleted.
2530         (WebCore::SVGGradientElement::isKnownAttribute): Deleted.
2531         * svg/SVGGraphicsElement.h:
2532         (WebCore::SVGGraphicsElement::attributeRegistry): Deleted.
2533         * svg/SVGImageElement.h:
2534         * svg/SVGLineElement.h:
2535         * svg/SVGLinearGradientElement.h:
2536         * svg/SVGMPathElement.h:
2537         * svg/SVGMarkerElement.cpp:
2538         * svg/SVGMarkerElement.h:
2539         * svg/SVGMaskElement.h:
2540         * svg/SVGPathElement.h:
2541         * svg/SVGPatternElement.h:
2542         * svg/SVGPolyElement.h:
2543         * svg/SVGRadialGradientElement.h:
2544         * svg/SVGRectElement.h:
2545         * svg/SVGSVGElement.h:
2546         * svg/SVGScriptElement.h:
2547         * svg/SVGStopElement.h:
2548         * svg/SVGSwitchElement.h:
2549         * svg/SVGSymbolElement.h:
2550         * svg/SVGTRefElement.h:
2551         * svg/SVGTests.cpp:
2552         (WebCore::SVGTests::svgAttributeChanged):
2553         (WebCore::SVGTests::attributeRegistry): Deleted.
2554         (WebCore::SVGTests::isKnownAttribute): Deleted.
2555         * svg/SVGTests.h:
2556         * svg/SVGTextContentElement.cpp:
2557         * svg/SVGTextContentElement.h:
2558         (WebCore::SVGTextContentElement::attributeRegistry): Deleted.
2559         * svg/SVGTextPathElement.h:
2560         * svg/SVGTextPositioningElement.h:
2561         (WebCore::SVGTextPositioningElement::attributeRegistry): Deleted.
2562         * svg/SVGURIReference.cpp:
2563         (WebCore::SVGURIReference::SVGURIReference):
2564         (WebCore::SVGURIReference::attributeRegistry): Deleted.
2565         * svg/SVGURIReference.h:
2566         * svg/SVGUseElement.h:
2567         * svg/SVGViewElement.h:
2568         * svg/SVGViewSpec.cpp:
2569         (WebCore::SVGViewSpec::SVGViewSpec):
2570         * svg/SVGViewSpec.h:
2571         * svg/SVGZoomAndPanType.h:
2572         * svg/properties/SVGAnimatedListPropertyTearOff.h: Removed.
2573         * svg/properties/SVGAnimatedPropertyAnimator.h:
2574         * svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
2575         * svg/properties/SVGAnimatedPropertyPairAnimator.h:
2576         * svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h:
2577         * svg/properties/SVGAnimatedPropertyTearOff.h: Removed.
2578         * svg/properties/SVGAnimatedPropertyType.h: Removed.
2579
2580         * svg/properties/SVGAnimationAdditiveFunction.h:
2581         (WebCore::SVGAnimationAdditiveFunction::animate):
2582         (WebCore::SVGAnimationAdditiveFunction::progress): Deleted.
2583         * svg/properties/SVGAnimationAdditiveListFunctionImpl.h:
2584         (WebCore::SVGAnimationLengthListFunction::animate):
2585         (WebCore::SVGAnimationNumberListFunction::animate):
2586         (WebCore::SVGAnimationPointListFunction::animate):
2587         (WebCore::SVGAnimationTransformListFunction::animate):
2588         (WebCore::SVGAnimationLengthListFunction::progress): Deleted.
2589         (WebCore::SVGAnimationNumberListFunction::progress): Deleted.
2590         (WebCore::SVGAnimationPointListFunction::progress): Deleted.
2591         (WebCore::SVGAnimationTransformListFunction::progress): Deleted.
2592         * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:
2593         (WebCore::SVGAnimationAngleFunction::animate):
2594         (WebCore::SVGAnimationColorFunction::animate):
2595         (WebCore::SVGAnimationIntegerFunction::animate):
2596         (WebCore::SVGAnimationLengthFunction::animate):
2597         (WebCore::SVGAnimationNumberFunction::animate):
2598         (WebCore::SVGAnimationPathSegListFunction::animate):
2599         (WebCore::SVGAnimationRectFunction::animate):
2600         (WebCore::SVGAnimationAngleFunction::progress): Deleted.
2601         (WebCore::SVGAnimationColorFunction::progress): Deleted.
2602         (WebCore::SVGAnimationIntegerFunction::progress): Deleted.
2603         (WebCore::SVGAnimationLengthFunction::progress): Deleted.
2604         (WebCore::SVGAnimationNumberFunction::progress): Deleted.
2605         (WebCore::SVGAnimationPathSegListFunction::progress): Deleted.
2606         (WebCore::SVGAnimationRectFunction::progress): Deleted.
2607         * svg/properties/SVGAnimationDiscreteFunction.h:
2608         (WebCore::SVGAnimationDiscreteFunction::animate):
2609         (WebCore::SVGAnimationDiscreteFunction::progress): Deleted.
2610         * svg/properties/SVGAnimationFunction.h:
2611         (WebCore::SVGAnimationFunction::calculateDistance const):
2612         -- Rename the 'progress()' functions of SVGAttributeAnimator and SVGAnimationFunction
2613            to 'animate()'.
2614         -- Rename the argument 'percentage' of these function to 'progress'
2615         -- Make calculateDistance return Optional<float> so it does not have to
2616            return -1 in case of error.
2617
2618         * svg/properties/SVGAttribute.h: Removed.
2619         * svg/properties/SVGAttributeAccessor.h: Removed.
2620         * svg/properties/SVGAttributeAnimator.h:
2621         (WebCore::SVGAttributeAnimator::calculateDistance const):
2622         * svg/properties/SVGAttributeOwnerProxy.cpp: Removed.
2623         * svg/properties/SVGAttributeOwnerProxy.h: Removed.
2624         * svg/properties/SVGAttributeOwnerProxyImpl.h: Removed.
2625         * svg/properties/SVGAttributeRegistry.h: Removed.
2626         * svg/properties/SVGLegacyAnimatedProperty.cpp: Removed.
2627         * svg/properties/SVGLegacyAnimatedProperty.h: Removed.
2628         * svg/properties/SVGLegacyProperty.h: Removed.
2629         * svg/properties/SVGListProperty.h: Removed.
2630         * svg/properties/SVGListPropertyTearOff.h: Removed.
2631         * svg/properties/SVGPrimitivePropertyAnimator.h:
2632         * svg/properties/SVGProperty.h:
2633         * svg/properties/SVGPropertyAnimator.h:
2634         * svg/properties/SVGPropertyTearOff.h: Removed.
2635         * svg/properties/SVGValuePropertyAnimator.h:
2636         * svg/properties/SVGValuePropertyListAnimator.h:
2637
2638 2019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
2639
2640         Documents can be destroyed before their CSSFontFaceSet is destroyed
2641         https://bugs.webkit.org/show_bug.cgi?id=195830
2642
2643         Reviewed by Darin Adler.
2644
2645         CSSFontFaceSet has a raw pointer to its owning document. JS can keep the CSSFontFaceSet alive (by using FontFaceSet)
2646         and can destroy the document at any time. When the document is destroyed, the link between the two objects needs to
2647         be severed.
2648
2649         Test: fast/text/font-face-set-destroy-document.html
2650
2651         * css/CSSFontFace.cpp:
2652         (WebCore::CSSFontFace::CSSFontFace):
2653         * css/CSSFontFace.h:
2654         * css/CSSFontFaceSet.cpp:
2655         (WebCore::CSSFontFaceSet::CSSFontFaceSet):
2656         (WebCore::CSSFontFaceSet::ensureLocalFontFacesForFamilyRegistered):
2657         * css/CSSFontFaceSet.h:
2658         * css/CSSFontSelector.cpp:
2659         (WebCore::CSSFontSelector::CSSFontSelector):
2660         (WebCore::CSSFontSelector::addFontFaceRule):
2661         * css/CSSFontSelector.h:
2662         * css/FontFace.cpp:
2663         (WebCore::FontFace::FontFace):
2664
2665 2019-04-03  Sihui Liu  <sihui_liu@apple.com>
2666
2667         Follow up fix for r243807: Use MarkedArgumentBuffer instead of Vector for JSValue
2668         https://bugs.webkit.org/show_bug.cgi?id=196547
2669
2670         Reviewed by Geoffrey Garen.
2671
2672         JSValue in Vector could be garbage collected because GC doesn't know Vector memory on C++ heap.
2673
2674         * bindings/js/JSIDBRequestCustom.cpp:
2675         (WebCore::JSIDBRequest::result const):
2676
2677 2019-04-03  Chris Dumez  <cdumez@apple.com>
2678
2679         HTML fragment serialization should not strip whitespace from URL attribute values
2680         https://bugs.webkit.org/show_bug.cgi?id=196551
2681
2682         Reviewed by Ryosuke Niwa.
2683
2684         HTML fragment serialization should not strip whitespace from URL attribute values as per:
2685         - https://html.spec.whatwg.org/multipage/parsing.html#html-fragment-serialisation-algorithm
2686
2687         WebKit was stripping such whitespace, Gecko and Blink are not. Align WebKit with other
2688         browser engines and the specification.
2689
2690         No new tests, rebaselined existing test.
2691
2692         * editing/MarkupAccumulator.cpp:
2693         (WebCore::MarkupAccumulator::appendQuotedURLAttributeValue):
2694
2695 2019-04-02  Ryosuke Niwa  <rniwa@webkit.org>
2696
2697         Crash in HTMLCanvasElement::createContext2d after the element got adopted to a new document
2698         https://bugs.webkit.org/show_bug.cgi?id=196527
2699
2700         Reviewed by Antti Koivisto.
2701
2702         We need to update CanvasBase::m_scriptExecutionContext when HTMLCanvasElement moves from
2703         one document to another. Fixed the bug by making CanvasBase::scriptExecutionContext make
2704         a virtual function call instead of directly storing a raw pointer. In HTMLCanvasElement,
2705         we use Node::scriptExecutionContext(). Use ContextDestructionObserver in CustomPaintCanvas
2706         and OffscreenCanvas instead of a raw pointer.
2707
2708         Unfortunately, no new tests since there is no reproducible test case.
2709
2710         * html/CanvasBase.cpp:
2711         (WebCore::CanvasBase::CanvasBase):
2712         * html/CanvasBase.h:
2713         (WebCore::CanvasBase::scriptExecutionContext const):
2714         * html/CustomPaintCanvas.cpp:
2715         (WebCore::CustomPaintCanvas::CustomPaintCanvas):
2716         * html/CustomPaintCanvas.h:
2717         * html/HTMLCanvasElement.cpp:
2718         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
2719         * html/HTMLCanvasElement.h:
2720         * html/OffscreenCanvas.cpp:
2721         (WebCore::OffscreenCanvas::OffscreenCanvas):
2722         * html/OffscreenCanvas.h:
2723
2724 2019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
2725
2726         Remove support for -apple-trailing-word
2727         https://bugs.webkit.org/show_bug.cgi?id=196525
2728
2729         Reviewed by Zalan Bujtas.
2730
2731         This CSS property is nonstandard and not used.
2732
2733         * Configurations/FeatureDefines.xcconfig:
2734         * css/CSSComputedStyleDeclaration.cpp:
2735         (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
2736         * css/CSSPrimitiveValueMappings.h:
2737         (WebCore::CSSPrimitiveValue::operator TrailingWord const): Deleted.
2738         * css/CSSProperties.json:
2739         * css/CSSValueKeywords.in:
2740         * css/parser/CSSParserFastPaths.cpp:
2741         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
2742         (WebCore::CSSParserFastPaths::isKeywordPropertyID):
2743         * rendering/SimpleLineLayout.cpp:
2744         (WebCore::SimpleLineLayout::canUseForStyle):
2745         * rendering/SimpleLineLayoutCoverage.cpp:
2746         (WebCore::SimpleLineLayout::printReason):
2747         * rendering/SimpleLineLayoutCoverage.h:
2748         * rendering/line/BreakingContext.h:
2749         (WebCore::BreakingContext::BreakingContext):
2750         (WebCore::BreakingContext::lineBreak):
2751         (WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
2752         (WebCore::BreakingContext::commitLineBreakClear):
2753         (WebCore::BreakingContext::commitLineBreakAtCurrentWidth):
2754         (WebCore::BreakingContext::handleBR):
2755         (WebCore::BreakingContext::handleFloat):
2756         (WebCore::BreakingContext::handleText):
2757         (WebCore::BreakingContext::handleEndOfLine):
2758         (WebCore::BreakingContext::InlineIteratorHistory::InlineIteratorHistory): Deleted.
2759         (WebCore::BreakingContext::InlineIteratorHistory::push): Deleted.
2760         (WebCore::BreakingContext::InlineIteratorHistory::update): Deleted.
2761         (WebCore::BreakingContext::InlineIteratorHistory::renderer const): Deleted.
2762         (WebCore::BreakingContext::InlineIteratorHistory::offset const): Deleted.
2763         (WebCore::BreakingContext::InlineIteratorHistory::nextBreakablePosition const): Deleted.
2764         (WebCore::BreakingContext::InlineIteratorHistory::atTextParagraphSeparator const): Deleted.
2765         (WebCore::BreakingContext::InlineIteratorHistory::previousInSameNode const): Deleted.
2766         (WebCore::BreakingContext::InlineIteratorHistory::get const): Deleted.
2767         (WebCore::BreakingContext::InlineIteratorHistory::current const): Deleted.
2768         (WebCore::BreakingContext::InlineIteratorHistory::historyLength const): Deleted.
2769         (WebCore::BreakingContext::InlineIteratorHistory::moveTo): Deleted.
2770         (WebCore::BreakingContext::InlineIteratorHistory::increment): Deleted.
2771         (WebCore::BreakingContext::InlineIteratorHistory::clear): Deleted.
2772         (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord): Deleted.
2773         * rendering/style/RenderStyle.h:
2774         (WebCore::RenderStyle::trailingWord const): Deleted.
2775         (WebCore::RenderStyle::setTrailingWord): Deleted.
2776         (WebCore::RenderStyle::initialTrailingWord): Deleted.
2777         * rendering/style/RenderStyleConstants.h:
2778         * rendering/style/StyleRareInheritedData.cpp:
2779         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2780         (WebCore::StyleRareInheritedData::operator== const):
2781         * rendering/style/StyleRareInheritedData.h:
2782
2783 2019-04-03  Youenn Fablet  <youenn@apple.com>
2784
2785         Use makePendingActivity in DOMCache
2786         https://bugs.webkit.org/show_bug.cgi?id=196515
2787
2788         Reviewed by Geoffrey Garen.
2789
2790         No change of behavior, just modernizing the code.
2791
2792         * Modules/cache/DOMCache.cpp:
2793         (WebCore::DOMCache::retrieveRecords):
2794         (WebCore::DOMCache::batchDeleteOperation):
2795         (WebCore::DOMCache::batchPutOperation):
2796         * Modules/cache/DOMCacheStorage.cpp:
2797         (WebCore::DOMCacheStorage::match):
2798
2799 2019-04-03  Chris Dumez  <cdumez@apple.com>
2800
2801         [XML Parser] Insert the error message block when stopping parsing and an error occurred
2802         https://bugs.webkit.org/show_bug.cgi?id=196546
2803
2804         Reviewed by Alexey Proskuryakov.
2805
2806         Insert the error message block when stopping parsing and an error occurred. This is based
2807         on the following Blink commit:
2808         - https://chromium.googlesource.com/chromium/src.git/+/565958bc22e2d49fed7af144482c2bf4d416fec5
2809
2810         No new tests, rebaselined existing test.
2811
2812         * xml/parser/XMLDocumentParser.cpp:
2813         (WebCore::XMLDocumentParser::end):
2814         Avoid showing the error message block twice in some cases. No need to ever call
2815         insertErrorMessageBlock() if we're already stopped since stopParsing() already
2816         takes care of doing this.
2817
2818         * xml/parser/XMLDocumentParserLibxml2.cpp:
2819         (WebCore::XMLDocumentParser::stopParsing):
2820         When XMLDocumentParser::stopParsing() is called to stop parsing, call
2821         insertErrorMessageBlock() to insert the <parsererror> element if an error
2822         occurred.
2823
2824 2019-04-03  Youenn Fablet  <youenn@apple.com>
2825
2826         Clear WorkerCacheStorageConnection callbacks on WorkerGlobalScope termination
2827         https://bugs.webkit.org/show_bug.cgi?id=196521
2828
2829         Reviewed by Alex Christensen.
2830
2831         When the worker global scope is preparing for termination,
2832         all ActiveDOMObjects are stopped.
2833         At that time, the completion handlers related to
2834         WorkerCacheStorageConnection should be cleared to be able to free
2835         memory, and as they are now no-op anyway.
2836
2837         We clear the completion handlers once the active DOM objects are stopped
2838         to limit the processing triggered by clearing them.
2839
2840         Introducing a new Stopped error code to handle this case.
2841         Add an assertion so that this error does not surface to JS.
2842
2843         Covered by existing tests.
2844
2845         * Modules/cache/CacheStorageConnection.cpp:
2846         (WebCore::CacheStorageConnection::clearPendingRequests):
2847         * Modules/cache/CacheStorageConnection.h:
2848         * Modules/cache/DOMCacheEngine.cpp:
2849         (WebCore::DOMCacheEngine::errorToException):
2850         * Modules/cache/DOMCacheEngine.h:
2851         * workers/WorkerGlobalScope.cpp:
2852         (WebCore::WorkerGlobalScope::prepareForTermination):
2853         (WebCore::WorkerGlobalScope::stopIndexedDatabase):
2854
2855 2019-04-03  Youenn Fablet  <youenn@apple.com>
2856
2857         Adopt new VCP SPI
2858         https://bugs.webkit.org/show_bug.cgi?id=193357
2859         <rdar://problem/43656651>
2860
2861         Reviewed by Eric Carlson.
2862
2863         Covered by existing tests.
2864
2865         * testing/Internals.cpp:
2866         (WebCore::Internals::supportsVCPEncoder):
2867
2868 2019-04-03  Chris Dumez  <cdumez@apple.com>
2869
2870         Remove legacy webkitRequestAnimationFrame time quirk
2871         https://bugs.webkit.org/show_bug.cgi?id=196458
2872         <rdar://problem/49490207>
2873
2874         Reviewed by Simon Fraser.
2875
2876         Remove legacy webkitRequestAnimationFrame time quirk and log a deprecation
2877         warning whenever webkitRequestAnimationFrame is called.
2878
2879         * dom/ScriptedAnimationController.cpp:
2880         (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
2881         * page/DOMWindow.cpp:
2882         (WebCore::DOMWindow::requestAnimationFrame):
2883         (WebCore::DOMWindow::webkitRequestAnimationFrame):
2884
2885 2019-04-03  Sihui Liu  <sihui_liu@apple.com>
2886
2887         Blob type cannot be stored correctly in IDB when IDBObjectStore has autoIncrement and keyPath options
2888         https://bugs.webkit.org/show_bug.cgi?id=196128
2889
2890         Reviewed by Geoffrey Garen.
2891
2892         If a key is auto-generated, it should become a property of the value object. Network process would perform the 
2893         key injection by deserializing IDBValue into script value, setting the property, serializing the result and 
2894         storing it in a database record. But network process does not have a JSDOMGlobalObject, so it would fail to 
2895         deserialize types including Blob and File.
2896
2897         To solve this issue, we move the key injection to web process and let network process store the original value 
2898         it gets. In this case, when web process asks for some value, network process should return key, value and key 
2899         path so that web process can decide whether it should perform a key injection before returning the result. Note
2900         that the auto-generated key would always be stored as the key in a ObjectStore record.
2901
2902         Test: storage/indexeddb/modern/objectstore-autoincrement-types.html
2903
2904         * Modules/indexeddb/IDBCursor.cpp:
2905         (WebCore::IDBCursor::setGetResult):
2906         * Modules/indexeddb/IDBCursor.h:
2907         (WebCore::IDBCursor::primaryKeyPath):
2908         * Modules/indexeddb/IDBGetAllResult.cpp:
2909         (WebCore::IDBGetAllResult::isolatedCopy):
2910         (WebCore::IDBGetAllResult::addKey):
2911         (WebCore::IDBGetAllResult::addValue):
2912         (WebCore::IDBGetAllResult::keys const):
2913         (WebCore::IDBGetAllResult::values const):
2914         (WebCore::IDBGetAllResult::allBlobFilePaths const):
2915         (WebCore::isolatedCopyOfVariant): Deleted.
2916
2917         * Modules/indexeddb/IDBGetAllResult.h: Introduce an IDBKeyPath parameter. Also replace Variant with two Vectors,
2918         because we only needed to store either key or value before, and now the stored value could be incomplete.
2919         (WebCore::IDBGetAllResult::IDBGetAllResult):
2920         (WebCore::IDBGetAllResult::keyPath const):
2921         (WebCore::IDBGetAllResult::encode const):
2922         (WebCore::IDBGetAllResult::decode):
2923
2924         * Modules/indexeddb/IDBGetResult.cpp:
2925         (WebCore::IDBGetResult::setValue):
2926         * Modules/indexeddb/IDBGetResult.h:
2927         (WebCore::IDBGetResult::IDBGetResult):
2928         (WebCore::IDBGetResult::keyPath const):
2929         * Modules/indexeddb/IDBObjectStore.cpp:
2930         * Modules/indexeddb/IDBRequest.cpp:
2931         (WebCore::IDBRequest::setResult):
2932         (WebCore::IDBRequest::setResultToStructuredClone):
2933         * Modules/indexeddb/IDBRequest.h:
2934         * Modules/indexeddb/IDBTransaction.cpp:
2935         (WebCore::IDBTransaction::didGetAllRecordsOnServer):
2936         (WebCore::IDBTransaction::didGetRecordOnServer):
2937         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2938         (WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
2939         * Modules/indexeddb/server/MemoryIndex.cpp:
2940         (WebCore::IDBServer::MemoryIndex::getResultForKeyRange const):
2941         (WebCore::IDBServer::MemoryIndex::getAllRecords const):
2942         * Modules/indexeddb/server/MemoryIndexCursor.cpp:
2943         (WebCore::IDBServer::MemoryIndexCursor::currentData):
2944         * Modules/indexeddb/server/MemoryObjectStore.cpp:
2945         (WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord):
2946         (WebCore::IDBServer::MemoryObjectStore::populateIndexWithExistingRecords):
2947         (WebCore::IDBServer::MemoryObjectStore::getAllRecords const):
2948         * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
2949         (WebCore::IDBServer::MemoryObjectStoreCursor::currentData):
2950         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
2951         (WebCore::IDBServer::SQLiteIDBBackingStore::updateOneIndexForAddRecord):
2952         (WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
2953         (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
2954         (WebCore::IDBServer::SQLiteIDBBackingStore::cachedStatementForGetAllObjectStoreRecords):
2955         (WebCore::IDBServer::SQLiteIDBBackingStore::getAllObjectStoreRecords):
2956         (WebCore::IDBServer::SQLiteIDBBackingStore::getAllIndexRecords):
2957         (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
2958         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey):
2959         (WebCore::IDBServer::SQLiteIDBBackingStore::openCursor):
2960         (WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
2961         * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
2962         (WebCore::IDBServer::SQLiteIDBCursor::currentData):
2963         * Modules/indexeddb/server/SQLiteIDBCursor.h:
2964
2965         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2966         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd): Remove the key injection from network process. 
2967         UniqueIDBDatabase stores any value it gets from IDBClient.
2968
2969         * Modules/indexeddb/shared/IDBResultData.cpp:
2970         (WebCore::IDBResultData::getResultRef):
2971         * Modules/indexeddb/shared/IDBResultData.h:
2972
2973         * bindings/js/IDBBindingUtilities.cpp:
2974         (WebCore::injectIDBKeyIntoScriptValue): If property is read-only, set would fail and injectKeyIntoResult would
2975         return null, but we expect it to return result as long as the property value is the same as target. Therefore, 
2976         we can add an early return here.
2977         (WebCore::createKeyPathArray):
2978
2979         (WebCore::generateIndexKeyForValue): We used to generate IndexKey from value stored in database but now the
2980         value gets stored does not include auto-generated key, as we remove the key injection from network process. In 
2981         this case if the IDBIndex has the same key path as the auto-generated key, IndexKey would be failed to create
2982         for it cannot extract auto-generated key from value. Since the auto-generated key would always be the key in 
2983         database record, we could use value of that key when we find a match in key path.
2984
2985         (WebCore::deserializeIDBValueWithKeyInjection): If the key path in the result is single entry, the key is 
2986         probably auto-generated, so we could inject the result key into the result value unconditionally.
2987
2988         * bindings/js/IDBBindingUtilities.h:
2989         * bindings/js/JSIDBCursorWithValueCustom.cpp:
2990         (WebCore::JSIDBCursorWithValue::value const):
2991         * bindings/js/JSIDBRequestCustom.cpp:
2992         (WebCore::JSIDBRequest::result const):
2993
2994 2019-04-03  Michael Catanzaro  <mcatanzaro@igalia.com>
2995
2996         Get rid of HTMLInputElement::setEditingValue
2997         https://bugs.webkit.org/show_bug.cgi?id=196402
2998
2999         Reviewed by Darin Adler.
3000
3001         HTMLInputElement::setEditingValue is only used for Epiphany password autofill. We did it
3002         this way because that's what Chrome uses for autofill, but Apple uses
3003         HTMLInputElement::setValueForUser. Let's switch to that instead, then we can get rid of
3004         setEditingValue.
3005
3006         This fixes logging into ting.com after username and password are autofilled by Epiphany.
3007         Before this change, the login would fail unless you first manually edit either the username
3008         or the password field.
3009
3010         * html/HTMLInputElement.cpp:
3011         (WebCore::HTMLInputElement::setEditingValue): Deleted.
3012         * html/HTMLInputElement.h:
3013         * testing/Internals.cpp:
3014         (WebCore::Internals::setEditingValue): Deleted.
3015         * testing/Internals.h:
3016         * testing/Internals.idl:
3017
3018 2019-04-03  Pablo Saavedra  <psaavedra@igalia.com>
3019
3020         Missing includes that were previously provided via UnifiedSources
3021         https://bugs.webkit.org/show_bug.cgi?id=196434
3022
3023         Unreviewed build fix.
3024
3025         * html/InputType.h:
3026
3027 2019-04-03  Wenson Hsieh  <wenson_hsieh@apple.com>
3028
3029         Introduce and add plumbing for a website policy for meta viewport tag handling
3030         https://bugs.webkit.org/show_bug.cgi?id=196285
3031
3032         Reviewed by Tim Horton.
3033
3034         Add MetaViewportPolicy to DocumentLoader. See WebKit ChangeLog for more detail.
3035
3036         * loader/DocumentLoader.h:
3037         (WebCore::DocumentLoader::metaViewportPolicy const):
3038         (WebCore::DocumentLoader::setMetaViewportPolicy):
3039
3040 2019-04-03  Joseph Pecoraro  <pecoraro@apple.com>
3041
3042         Web Inspector: Remote Inspector indicate callback should always happen on the main thread
3043         https://bugs.webkit.org/show_bug.cgi?id=196513
3044         <rdar://problem/49498284>
3045
3046         Reviewed by Devin Rousso.
3047
3048         * platform/ios/wak/WebCoreThreadSystemInterface.cpp:
3049         (InitWebCoreThreadSystemInterface):
3050
3051 2019-04-02  Simon Fraser  <simon.fraser@apple.com>
3052
3053         REGRESSION (r238266): Exchange 2013 Outlook Web Access displays partially blank page when creating new e-mail
3054         https://bugs.webkit.org/show_bug.cgi?id=196522
3055         rdar://problem/49472941
3056
3057         Reviewed by Zalan Bujtas.
3058
3059         In this content a layer is composited to clip descendants, and has negative z-order children,
3060         so we compute that it "paints into ancestor", and has a foreground layer. This combination doesn't
3061         make sense, and when the layer becomes scrollable, we end up with bad paint phases on layers, and
3062         fail to paint the contents.
3063
3064         Fix by ensuring that a layer has its own backing store if it requires a foreground layer
3065         by virtue of having negative z-order children.
3066
3067         Test: compositing/backing/foreground-layer-no-paints-into-ancestor.html
3068
3069         * rendering/RenderLayerCompositor.cpp:
3070         (WebCore::RenderLayerCompositor::requiresOwnBackingStore const):
3071
3072 2019-04-02  Timothy Hatcher  <timothy@apple.com>
3073
3074         Cursor count badge reverts to Zero during Drag & Drop of multiple items.
3075         https://bugs.webkit.org/show_bug.cgi?id=196511
3076
3077         Reviewed by Daniel Bates.
3078
3079         * page/DragController.cpp:
3080         (WebCore::DragController::tryDocumentDrag): Don't set m_numberOfItemsToBeAccepted to
3081         zero when dragging to a non-file input element.
3082
3083 2019-04-02  Chris Dumez  <cdumez@apple.com>
3084
3085         HTML Parser: Remove conditional parsing of <noembed> content
3086         https://bugs.webkit.org/show_bug.cgi?id=196514
3087
3088         Reviewed by Geoffrey Garen.
3089
3090         Our HTML Parser has raw text handling for <noembed> content only if plugins are runnable.
3091         However, the HTML specification doesn't ask such behavior [1], and it doesn't match to
3092         our HTML serializer. We should always handle it as raw text.
3093
3094         Blink already made this change in https://chromium-review.googlesource.com/c/1477556.
3095
3096         [1] https://html.spec.whatwg.org/multipage/parsing.html#parsing-html-fragments:noembed
3097
3098         No new tests, updated existing test.
3099
3100         * html/parser/HTMLParserOptions.cpp:
3101         (WebCore::HTMLParserOptions::HTMLParserOptions):
3102         * html/parser/HTMLParserOptions.h:
3103         * html/parser/HTMLTokenizer.cpp:
3104         (WebCore::HTMLTokenizer::updateStateFor):
3105         * html/parser/HTMLTreeBuilder.cpp:
3106         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
3107
3108 2019-04-02  Chris Dumez  <cdumez@apple.com>
3109
3110         XMLHttpRequestUpload's loadstart event not correct initialized
3111         https://bugs.webkit.org/show_bug.cgi?id=196174
3112         <rdar://problem/49191412>
3113
3114         Reviewed by Alex Christensen.
3115
3116         Align progress event firing with the XHR specification.
3117
3118         No new tests, rebaselined existing tests.
3119
3120         * xml/XMLHttpRequest.cpp:
3121         (WebCore::XMLHttpRequest::createRequest):
3122         As per [1], the loadstart event fired on the XMLHttpRequestUpload object should use
3123         loaded=0 and total=`req’s body’s total bytes`.
3124         [1] https://xhr.spec.whatwg.org/#the-send()-method (step 11.2.)
3125
3126         (WebCore::XMLHttpRequest::didSendData):
3127         As per [2], the progress / load / loadend should use loaded=transmitted and total=length.
3128         [2] https://xhr.spec.whatwg.org/#ref-for-process-request-end-of-body (steps 5, 6 and 7)
3129
3130         (WebCore::XMLHttpRequest::didReceiveData):
3131         As per [3], we should fire the readystatechange event *before* the progress event.
3132         This is covered by web-platform-tests/xhr/send-response-event-order.htm which was failing
3133         differently after the other changes in this patch.
3134         [3] https://xhr.spec.whatwg.org/#ref-for-process-response (steps 9.4 and 9.5)
3135
3136         (WebCore::XMLHttpRequest::dispatchErrorEvents):
3137         As per [4], in case of an error, we should fire the provided 'event' and 'loadend' with
3138         loaded=0 and total=0.
3139         [4] https://xhr.spec.whatwg.org/#request-error-steps (steps 7 and 8)
3140
3141         * xml/XMLHttpRequestUpload.cpp:
3142         (WebCore::XMLHttpRequestUpload::dispatchProgressEvent):
3143         * xml/XMLHttpRequestUpload.h:
3144         Simplify XMLHttpRequestUpload. It no longer needs to store loaded / total as data
3145         members now that they are always passed by the call site. lengthComputable is set
3146         to !!total as [5] says to set it to true if length/total is not 0. 
3147         [5] https://xhr.spec.whatwg.org/#concept-event-fire-progress
3148
3149 2019-04-02  Devin Rousso  <drousso@apple.com>
3150
3151         Web Inspector: Canvas: add support for showing WebGPU contexts
3152         https://bugs.webkit.org/show_bug.cgi?id=196413
3153         <rdar://problem/49438898>
3154
3155         Reviewed by Timothy Hatcher.
3156
3157         Tests: inspector/canvas/create-context-webgpu.html
3158                inspector/canvas/resolveCanvasContext-webgpu.html
3159
3160         * Modules/webgpu/GPUCanvasContext.idl:
3161         * Modules/webgpu/GPUCanvasContext.h:
3162         (WebCore::GPUCanvasContext::canvas const): Added.
3163         * Modules/webgpu/GPUCanvasContext.cpp:
3164         (WebCore::GPUCanvasContext::create):
3165
3166         * testing/InternalSettings.idl:
3167         * testing/InternalSettings.h:
3168         * testing/InternalSettings.cpp:
3169         (WebCore::InternalSettings::setWebGPUEnabled): Added.
3170
3171 2019-04-02  Chris Dumez  <cdumez@apple.com>
3172
3173         [WK2] Add support for Window's beforeprint / afterprint events
3174         https://bugs.webkit.org/show_bug.cgi?id=196478
3175
3176         Reviewed by Alex Christensen.
3177
3178         Add support for Window's beforeprint / afterprint events as per:
3179         - https://html.spec.whatwg.org/#dom-print
3180
3181         Blink and Gecko already support this.
3182
3183         Test: printing/printing-events.html
3184
3185         * dom/EventNames.h:
3186         * html/HTMLAttributeNames.in:
3187         * html/HTMLBodyElement.cpp:
3188         (WebCore::HTMLBodyElement::createWindowEventHandlerNameMap):
3189         * page/Page.cpp:
3190         (WebCore::dispatchPrintEvent):
3191         (WebCore::Page::dispatchBeforePrintEvent):
3192         (WebCore::Page::dispatchAfterPrintEvent):
3193         * page/Page.h:
3194         * page/WindowEventHandlers.idl:
3195
3196 2019-04-02  Zalan Bujtas  <zalan@apple.com>
3197
3198         [ContentChangeObserver] Hover menus do not function on fidelity.com
3199         https://bugs.webkit.org/show_bug.cgi?id=196507
3200         <rdar://problem/49496520>
3201
3202         Reviewed by Simon Fraser.
3203
3204         fidelity.com has 400ms hover intent timer to bring up the main menus.
3205
3206         Test: fast/events/touch/ios/content-observation/400ms-hover-intent.html
3207
3208         * page/ios/ContentChangeObserver.cpp:
3209
3210 2019-04-02  Timothy Hatcher  <timothy@apple.com>
3211
3212         NSAttributedString crashes when encoding text attachment cell for missing image.
3213         https://bugs.webkit.org/show_bug.cgi?id=196504
3214         rdar://problem/49161281
3215
3216         Reviewed by Tim Horton.
3217
3218         Clean up and fix a couple of errors and crashes in the missing image path of our
3219         attributed string converter.
3220
3221         Fixes include:
3222         * Removed manual call to release on a RetainPtr, leading to autorelease pool crash.
3223         * No longer try to load an image that is missing on disk and has long been renamed.
3224         * No longer use a NSTextAttachmentCell in the Mac code path which can't be encoded
3225           for sending to the UIProcess, so it was pretty useless in the web content process.
3226         * Stopped using NSFileWrapper for the missing image so the attachment can contain the
3227           retina versions of the missing image.
3228         * Simplified bundle finding code, since WebCore is assumed to be loaded.
3229         * Fix leak of attachment by adding missing adoptNS().
3230
3231         * editing/cocoa/HTMLConverter.mm:
3232         (HTMLConverter::_addAttachmentForElement): Unify and simplify missing image path.
3233         (_NSFirstPathForDirectoriesInDomains): Deleted.
3234         (_NSSystemLibraryPath): Deleted.
3235         (_webKitBundle): Deleted.
3236
3237 2019-04-02  Chris Dumez  <cdumez@apple.com>
3238
3239         [Fetch API] Allow used body replacement in Request constructor
3240         https://bugs.webkit.org/show_bug.cgi?id=183703
3241         <rdar://problem/49425609>
3242
3243         Reviewed by Youenn Fablet.
3244
3245         Allow used body replacement in Request constructor as per:
3246         - https://github.com/whatwg/fetch/pull/675
3247
3248         No new tests, rebaseline existing test.
3249
3250         * Modules/fetch/FetchRequest.cpp:
3251         (WebCore::FetchRequest::initializeWith):
3252
3253 2019-04-02  Chris Dumez  <cdumez@apple.com>
3254
3255         Unreviewed, rolling out r243551.
3256
3257         Seems to have broken file uploads to SoundCloud
3258
3259         Reverted changeset:
3260
3261         "XMLHttpRequestUpload's loadstart event not correct
3262         initialized"
3263         https://bugs.webkit.org/show_bug.cgi?id=196174
3264         https://trac.webkit.org/changeset/243551
3265
3266 2019-04-02  Justin Fan  <justin_fan@apple.com>
3267
3268         [Web GPU] Implement blend states and color write mask for GPUColorStateDescriptor
3269         https://bugs.webkit.org/show_bug.cgi?id=196474
3270
3271         Reviewed by Myles C. Maxfield.
3272
3273         Blend states and color write masks must now be specified on GPUColorStateDescriptor instead of 
3274         relying on underlying MTLRenderPipelineColorAttachmentDescriptor defaults.
3275
3276         Test: webgpu/blend-triangle-strip.html, webgpu/color-write-mask-triangle-strip.html
3277
3278         * CMakeLists.txt:
3279         * DerivedSources-input.xcfilelist:
3280         * DerivedSources-output.xcfilelist:
3281         * DerivedSources.make:
3282         * Modules/webgpu/GPUBlendDescriptor.idl: 
3283         * Modules/webgpu/GPUColorStateDescriptor.idl:
3284         * Modules/webgpu/GPUColorWriteBits.idl: 
3285         * Sources.txt:
3286         * WebCore.xcodeproj/project.pbxproj:
3287         * bindings/js/WebCoreBuiltinNames.h:
3288         * platform/graphics/gpu/GPUBlendDescriptor.h:
3289         * platform/graphics/gpu/GPUColorStateDescriptor.h:
3290         * platform/graphics/gpu/GPUColorWriteBits.h:
3291         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
3292         (WebCore::mtlColorWriteMaskForGPUColorWriteFlags):
3293         (WebCore::mtlBlendOperationForGPUBlendOperation):
3294         (WebCore::mtlBlendFactorForGPUBlendFactor):
3295         (WebCore::setColorStatesForColorAttachmentArray):
3296         (WebCore::tryCreateMtlRenderPipelineState):
3297         (WebCore::trySetColorStatesForColorAttachmentArray): Deleted.
3298
3299 2019-04-02  Zalan Bujtas  <zalan@apple.com>
3300
3301         [ContentChangeObserver] Ignore reconstructed renderers when checking for visibility change
3302         https://bugs.webkit.org/show_bug.cgi?id=196483
3303         <rdar://problem/49288174>
3304
3305         Reviewed by Simon Fraser.
3306
3307         This patch fixes the cases when the content gets reconstructed in a way that existing and visible elements gain
3308         new renderers within one style recalc. We failed to recognize such cases and ended up detecting the newly constructed renderers
3309         as "visible change" thereby triggering hover.
3310
3311         Test: fast/events/touch/ios/content-observation/visible-content-gains-new-renderer.html
3312
3313         * page/ios/ContentChangeObserver.cpp:
3314         (WebCore::ContentChangeObserver::renderTreeUpdateDidStart):
3315         (WebCore::ContentChangeObserver::renderTreeUpdateDidFinish):
3316         (WebCore::ContentChangeObserver::reset):
3317         (WebCore::ContentChangeObserver::willDestroyRenderer):
3318         (WebCore::ContentChangeObserver::StyleChangeScope::StyleChangeScope):
3319         (WebCore::ContentChangeObserver::RenderTreeUpdateScope::RenderTreeUpdateScope):
3320         (WebCore::ContentChangeObserver::RenderTreeUpdateScope::~RenderTreeUpdateScope):
3321         * page/ios/ContentChangeObserver.h:
3322         (WebCore::ContentChangeObserver::visibleRendererWasDestroyed const):
3323         * rendering/updating/RenderTreeUpdater.cpp:
3324         (WebCore::RenderTreeUpdater::updateRenderTree):
3325         (WebCore::RenderTreeUpdater::tearDownRenderers):
3326
3327 2019-04-02  Fujii Hironori  <Hironori.Fujii@sony.com>
3328
3329         [CMake] WEBKIT_MAKE_FORWARDING_HEADERS shouldn't use POST_BUILD to copy generated headers
3330         https://bugs.webkit.org/show_bug.cgi?id=182757
3331
3332         Reviewed by Don Olmstead.
3333
3334         No new tests because no behavior changes.
3335
3336         * PlatformWin.cmake: Do not use DERIVED_SOURCE_DIRECTORIES of
3337         WEBKIT_MAKE_FORWARDING_HEADERS. Added
3338         WebCore_PRIVATE_FRAMEWORK_HEADERS.
3339         * WebCoreMacros.cmake (GENERATE_DOM_NAMES): Added
3340         ${_namespace}ElementTypeHelpers.h to _outputfiles.
3341
3342 2019-04-02  Cathie Chen  <cathiechen@igalia.com>
3343
3344         Update the status of ResizeObserver in features.json.
3345         https://bugs.webkit.org/show_bug.cgi?id=196443
3346
3347         Reviewed by Rob Buis.
3348
3349         * features.json:
3350
3351 2019-04-01  Ryosuke Niwa  <rniwa@webkit.org>
3352
3353         Nullptr crash in Document::open after calling policyChecker().stopCheck()
3354         https://bugs.webkit.org/show_bug.cgi?id=196479
3355
3356         Reviewed by Antti Koivisto.
3357
3358         Added a missing nullptr check in Document::open after calling m_frame->loader().policyChecker().stopCheck()
3359         since it invokes m_willSubmitFormCompletionHandlers in WebKit2, and that could clear m_frame.
3360
3361         Unfortunately, we don't have any reproducible test case.
3362
3363         * dom/Document.cpp:
3364         (WebCore::Document::open):
3365
3366 2019-04-01  Timothy Hatcher  <timothy@apple.com>
3367
3368         Unreviewed build fix.
3369
3370         * crypto/mac/SerializedCryptoKeyWrapMac.mm:
3371         (WebCore::createAndStoreMasterKey): Add ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END
3372         around SecTrustedApplicationCreateFromPath call.
3373
3374 2019-04-01  Simon Fraser  <simon.fraser@apple.com>
3375
3376         Remove some unused iOS scrolling-related code in Frame
3377         https://bugs.webkit.org/show_bug.cgi?id=196473
3378
3379         Reviewed by Zalan Bujtas.
3380
3381         This code has no callers.
3382
3383         * page/Frame.cpp:
3384         (WebCore::Frame::Frame):
3385         (WebCore::Frame::scrollOverflowLayer): Deleted.
3386         (WebCore::Frame::overflowAutoScrollTimerFired): Deleted.
3387         (WebCore::Frame::startOverflowAutoScroll): Deleted.
3388         (WebCore::Frame::checkOverflowScroll): Deleted.
3389         * page/Frame.h:
3390
3391 2019-04-01  Chris Dumez  <cdumez@apple.com>
3392
3393         Attr nodes are not cloned properly
3394         https://bugs.webkit.org/show_bug.cgi?id=196466
3395
3396         Reviewed by Ryosuke Niwa.
3397
3398         Attr nodes are not cloned properly according to:
3399         - https://dom.spec.whatwg.org/#concept-node-clone
3400
3401         A cloned Attr node should retain its prefix and namespace.
3402
3403         Both Gecko and Blink agree with the DOM specification here.
3404
3405         No new tests, rebaselined existing test.
3406
3407         * dom/Document.cpp:
3408         (WebCore::Document::importNode):
3409
3410 2019-04-01  Said Abou-Hallawa  <sabouhallawa@apple.com>
3411
3412         Remove the SVG tear off objects for SVGMatrix, SVGTransfrom, SVGTransformList and SVGAnimatedTransformList
3413         https://bugs.webkit.org/show_bug.cgi?id=196086
3414
3415         Reviewed by Simon Fraser.
3416
3417         The IDL changes:
3418
3419         SVGTransform.idl:
3420             Remove the NewObject qualifier from matrix attribute. This matches 
3421             the specs: https://www.w3.org/TR/SVG11/coords.html#InterfaceSVGTransform.
3422             SVGTransform will internally hold an SVGMatrix. A change in this
3423             SVGMatrix will affect the container SVGTransform.
3424
3425         SVGTransformList.idl:
3426             Remove the NewObject qualifier from consolidate() method. This matches
3427             the specs:
3428             https://www.w3.org/TR/SVG11/coords.html#__svg__SVGTransformList__consolidate
3429             The method consolidate() should return a reference to the first item
3430             in the list after consolidating it.
3431
3432         Code changes:
3433
3434         -- SVGMatrix is now a superclass of SVGValueProperty<AffineTransform>.
3435            No need for SVGMatrixValue since it was wrapper of AffineTransform.
3436
3437         -- SVGTransformValue now holds a Ref<SVGMatrix> member in addition to the
3438            angle and the rotationCenter. Ref<SVGMatrix> is what SVGTransform.matrix
3439            will return. So a change in this matrix will change the owner SVGTransform.
3440
3441         -- SVGTransform is