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