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