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