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