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