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