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