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