7bf87deadb1dfaecb44d5b85f51fe9950157ca4f
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2020-03-26  Charlie Turner  <cturner@igalia.com>
2
3         [GStreamer] Fix missing NULL-check in setSyncOnClock
4         https://bugs.webkit.org/show_bug.cgi?id=209609
5
6         Unreviewed, simple fix.
7
8         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
9         (WebCore::setSyncOnClock): Some systems are configured so that
10         audio sinks are not available. Make sure not to crash when asking
11         to sync with a NULL sink.
12
13 2020-03-26  Chris Dumez  <cdumez@apple.com>
14
15         REGRESSION: ASSERTION FAILED: m_wrapper on storage/indexeddb/modern/abort-requests tests
16         https://bugs.webkit.org/show_bug.cgi?id=209499
17         <rdar://problem/60842165>
18
19         Reviewed by Alex Christensen.
20
21         IDBTransaction::hasPendingActivity() was failing to consult ActiveDOMObject::hasPendingActivity()
22         so the JS wrapper would get garbage collected even though the ActiveDOMObject base class was
23         aware of some pending activity.
24
25         No new tests, unskipped existing tests.
26
27         * Modules/indexeddb/IDBTransaction.cpp:
28         (WebCore::IDBTransaction::hasPendingActivity const):
29
30 2020-03-25  Ryosuke Niwa  <rniwa@webkit.org>
31
32         Sequential focus navigation can't get out of a descendent of a slot element in a document tree
33         https://bugs.webkit.org/show_bug.cgi?id=199633
34
35         Reviewed by Darin Adler.
36
37         The bug was caused by slot element outside a shadow tree not being treated as a focus navigation
38         scope owner as specified in the HTML5 specification:
39         https://html.spec.whatwg.org/multipage/interaction.html#focus-navigation-scope-owner
40
41         Fixed the bug by treating it as such unless custom focusing behavior is used.
42
43         Test: fast/shadow-dom/focus-across-slot-outside-shadow-tree.html
44
45         * page/FocusController.cpp:
46         (WebCore::isFocusScopeOwner):
47
48 2020-03-26  Kate Cheney  <katherine_cheney@apple.com>
49
50         ScopeRuleSets::initializeUserStyle() should not add console logging if there are no injected user style sheets
51         https://bugs.webkit.org/show_bug.cgi?id=209548
52         <rdar://problem/60851745>
53
54         Reviewed by Darin Adler.
55
56         Logging when there are no injected user style sheets is unnecessary and confusing.
57
58         * style/StyleScopeRuleSets.cpp:
59         (WebCore::Style::ScopeRuleSets::initializeUserStyle):
60
61 2020-03-26  Alexey Proskuryakov  <ap@apple.com>
62
63         REGRESSION(r259042): It creates some test failures (Requested by youenn on #webkit).
64         Roll back the patch.
65
66 2020-03-26  Antti Koivisto  <antti@apple.com>
67
68         REGRESSION (r254669): Expand media button doesn't work on first try on photos on reddit.com
69         https://bugs.webkit.org/show_bug.cgi?id=209590
70         <rdar://problem/60461809>
71
72         Reviewed by Darin Adler.
73
74         Image intrinsic size computed from width/height attributes is ignored during preferred width computation
75         (used for float sizing in this case). This creates a mismatch between layout and preferred width computation,
76         causing the final image size to be miscomputed.
77
78         Test: fast/images/preferred-width-computation-with-attribute-intrinsic-size.html
79
80         * rendering/RenderReplaced.cpp:
81         (WebCore::RenderReplaced::computePreferredLogicalWidths const):
82
83         Compute attribute based intrinsic size already during preferred width computation if needed.
84
85 2020-03-26  Nikos Mouchtaris  <nmouchtaris@apple.com>
86
87         Remove manual redacting of billing contact after wallet fix for rdar://problem/59075234
88         https://bugs.webkit.org/show_bug.cgi?id=209557
89         <rdar://problem/60883506>
90
91         Reviewed by Andy Estes.
92
93         Removed manual redaction of billing address after wallet fixed
94         their redaction code.
95
96         No new tests. Current tests cover this functionality.
97
98         * Modules/applepay/cocoa/PaymentMethodCocoa.mm:
99         (WebCore::convert):
100
101 2020-03-26  Per Arne Vollan  <pvollan@apple.com>
102
103         [iOS] Adopt ScreenProperties class.
104         https://bugs.webkit.org/show_bug.cgi?id=191767
105
106         Reviewed by Brent Fulgham.
107
108         On macOS, the ScreenProperties class is used to collect screen properties in the UI process
109         and forward these to the Web process. We should also do this on iOS, in order to be able
110         to block frontboard services.
111  
112         No new tests. Covered by existing tests.
113
114         * Sources.txt:
115         * platform/PlatformScreen.h:
116         * platform/ScreenProperties.h:
117         (WebCore::ScreenData::encode const):
118         (WebCore::ScreenData::decode):
119         * platform/ios/PlatformScreenIOS.mm:
120         (WebCore::screenIsMonochrome):
121         (WebCore::screenHasInvertedColors):
122         (WebCore::screenSupportsExtendedColor):
123         (WebCore::collectScreenProperties):
124         * platform/mac/PlatformScreenMac.mm:
125         (WebCore::primaryOpenGLDisplayMask):
126         (WebCore::displayMaskForDisplay):
127         (WebCore::primaryGPUID):
128         (WebCore::gpuIDForDisplay):
129         (WebCore::screenIsMonochrome):
130         (WebCore::screenHasInvertedColors):
131         (WebCore::screenDepth):
132         (WebCore::screenDepthPerComponent):
133         (WebCore::screenRectForDisplay):
134         (WebCore::screenRect):
135         (WebCore::screenAvailableRect):
136         (WebCore::screenColorSpace):
137         (WebCore::screenSupportsExtendedColor):
138         (WebCore::screenProperties): Deleted.
139         (WebCore::primaryScreenDisplayID): Deleted.
140         (WebCore::setScreenProperties): Deleted.
141         (WebCore::screenData): Deleted.
142         (WebCore::getScreenProperties): Deleted.
143
144 2020-03-26  Rob Buis  <rbuis@igalia.com>
145
146         Take into account referrer-policy in append Origin header algorithm
147         https://bugs.webkit.org/show_bug.cgi?id=209066
148
149         Reviewed by Youenn Fablet.
150
151         Start taking into account referrer-policy in more places when we
152         append the origin header [1]. To prevent computing SecurityOrigin
153         needlessly add a helper function doesRequestNeedHTTPOriginHeader.
154
155         [1] https://fetch.spec.whatwg.org/#append-a-request-origin-header
156
157         * loader/FormSubmission.cpp:
158         (WebCore::FormSubmission::populateFrameLoadRequest):
159         * loader/FrameLoader.cpp:
160         (WebCore::FrameLoader::addExtraFieldsToRequest):
161         (WebCore::FrameLoader::loadResourceSynchronously):
162         (WebCore::FrameLoader::loadDifferentDocumentItem):
163         (WebCore::FrameLoader::addHTTPOriginIfNeeded): Deleted.
164         * loader/FrameLoader.h:
165         * loader/NavigationScheduler.cpp:
166         * loader/PingLoader.cpp:
167         (WebCore::PingLoader::sendPing):
168         * loader/SubresourceLoader.cpp:
169         (WebCore::SubresourceLoader::checkRedirectionCrossOriginAccessControl):
170         * loader/cache/CachedResourceRequest.cpp:
171         (WebCore::CachedResourceRequest::updateReferrerOriginAndUserAgentHeaders):
172         * platform/network/ResourceRequestBase.cpp:
173         (WebCore::doesRequestNeedHTTPOriginHeader):
174         * platform/network/ResourceRequestBase.h:
175
176 2020-03-25  Sihui Liu  <sihui_liu@apple.com>
177
178         IndexedDB: destroy UniqueIDBDatabase when it's not used
179         https://bugs.webkit.org/show_bug.cgi?id=209532
180
181         Reviewed by Geoffrey Garen.
182
183         Reviewed by Geoffrey Garen.
184
185         When all connections of a UniqueIDBDatabase object are closed and there are no pending reuqests, the 
186         object may not be used any more. We should delete it for better memory use.
187
188         * Modules/indexeddb/server/IDBServer.cpp:
189         (WebCore::IDBServer::IDBServer::removeUniqueIDBDatabase):
190         (WebCore::IDBServer::IDBServer::closeAndTakeUniqueIDBDatabase): Deleted.
191         * Modules/indexeddb/server/IDBServer.h:
192         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
193         (WebCore::IDBServer::UniqueIDBDatabase::handleDelete):
194         (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
195         (WebCore::IDBServer::UniqueIDBDatabase::tryCloseAndRemoveFromServer):
196         * Modules/indexeddb/server/UniqueIDBDatabase.h:
197
198 2020-03-25  Said Abou-Hallawa  <sabouhallawa@apple.com>
199
200         [ macOS ] svg/custom/textPath-change-id-pattern.svg is flakey failing
201         https://bugs.webkit.org/show_bug.cgi?id=208532
202
203         Reviewed by Darin Adler.
204
205         In this layout test, the id of a <path> element changes. This <path> is
206         referenced by a <textPath> element which is a child of a <pattern> element.
207         The <pattern> element is used to fill a <rect> element.
208
209         This patch ensures all clients (<rect>) of the resource ancestor (<pattern>)
210         of any sub-resource (<textPath>) is marked for repaint when the id of a
211         sub-sub-resource (<path>) changes.
212
213         * rendering/svg/RenderSVGResourceContainer.cpp:
214         (WebCore::RenderSVGResourceContainer::markAllClientsForRepaint):
215         * rendering/svg/RenderSVGResourceContainer.h:
216         * svg/SVGElement.cpp:
217         (WebCore::SVGElement::buildPendingResourcesIfNeeded):
218         (WebCore::SVGElement::invalidateInstances):
219         Unrelated change. This is a leftover from r179807 which was converting a
220         "do { } while();" statement to "while() { }" statement.
221
222 2020-03-25  Jack Lee  <shihchieh_lee@apple.com>
223
224         Nullptr crash in WebCore::Node::isDescendantOf when inserting list
225         https://bugs.webkit.org/show_bug.cgi?id=209529
226         <rdar://problem/60693542>
227
228         Reviewed by Darin Adler.
229
230         The visible positions may be null if the DOM tree is altered before an edit command is applied. 
231         Add null check for visible positions at the beginning of InsertListCommand::doApply.
232
233         Test: editing/inserting/insert-list-during-node-removal-crash.html
234
235         * editing/InsertListCommand.cpp:
236         (WebCore::InsertListCommand::doApply):
237
238 2020-03-25  Alexey Shvayka  <shvaikalesh@gmail.com>
239
240         Invalid numeric and named references should be early syntax errors
241         https://bugs.webkit.org/show_bug.cgi?id=178175
242
243         Reviewed by Ross Kirsling.
244
245         Accounts for changes of YarrParser's Delegate interface, no behavioral changes.
246         resetForReparsing() is never called because we disable numeric backrefences
247         and named forward references (see arguments of Yarr::parse() call).
248
249         Test: TestWebKitAPI.ContentExtensionTest.ParsingFailures
250
251         * contentextensions/URLFilterParser.cpp:
252         (WebCore::ContentExtensions::PatternParser::resetForReparsing):
253         (WebCore::ContentExtensions::URLFilterParser::addPattern):
254         (WebCore::ContentExtensions::PatternParser::isValidNamedForwardReference): Deleted.
255
256 2020-03-25  Pinki Gyanchandani  <pgyanchandani@apple.com>
257
258         CanvasRenderingContext2D.putImageData() should not process neutered ImageData
259         https://bugs.webkit.org/show_bug.cgi?id=208303
260
261         Reviewed by Said Abou-Hallawa.
262
263         Test: fast/canvas/canvas-putImageData-neutered-ImageData.html
264
265         The crash happens when putImageData is called on a neutered ImageData object. 
266         Added a check to exit from CanvasRenderingContext2D.putImageData() function when ImageData object is neutered.
267
268         * html/canvas/CanvasRenderingContext2DBase.cpp:
269         (WebCore::CanvasRenderingContext2DBase::putImageData):
270
271 2020-03-25  Chris Dumez  <cdumez@apple.com>
272
273         Use JSC::EnsureStillAliveScope RAII object in the generated bindings code
274         https://bugs.webkit.org/show_bug.cgi?id=209552
275
276         Reviewed by Yusuke Suzuki.
277
278         Use JSC::EnsureStillAliveScope RAII object in the generated bindings code
279         instead of explicit ensureStillAlive() calls. This makes the bindings
280         generator code simpler and results in nicer generated code too.
281
282         * bindings/scripts/CodeGeneratorJS.pm:
283         (GenerateParametersCheck):
284         (GenerateWriteBarriersForArguments):
285         (GenerateImplementationFunctionCall):
286         (GenerateEnsureStillAliveCallsForArguments): Deleted.
287         * bindings/scripts/test/JS/JSMapLike.cpp:
288         (WebCore::jsMapLikePrototypeFunctionGetBody):
289         (WebCore::jsMapLikePrototypeFunctionHasBody):
290         (WebCore::jsMapLikePrototypeFunctionForEachBody):
291         (WebCore::jsMapLikePrototypeFunctionSetBody):
292         (WebCore::jsMapLikePrototypeFunctionDeleteBody):
293         * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
294         (WebCore::jsReadOnlyMapLikePrototypeFunctionGetBody):
295         (WebCore::jsReadOnlyMapLikePrototypeFunctionHasBody):
296         (WebCore::jsReadOnlyMapLikePrototypeFunctionForEachBody):
297         * bindings/scripts/test/JS/JSReadOnlySetLike.cpp:
298         (WebCore::jsReadOnlySetLikePrototypeFunctionHasBody):
299         (WebCore::jsReadOnlySetLikePrototypeFunctionForEachBody):
300         * bindings/scripts/test/JS/JSSetLike.cpp:
301         (WebCore::jsSetLikePrototypeFunctionHasBody):
302         (WebCore::jsSetLikePrototypeFunctionForEachBody):
303         (WebCore::jsSetLikePrototypeFunctionAddBody):
304         (WebCore::jsSetLikePrototypeFunctionDeleteBody):
305         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
306         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunctionBody):
307         (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessageBody):
308         (WebCore::jsTestActiveDOMObjectPrototypeFunctionOverloadedMethod1Body):
309         (WebCore::jsTestActiveDOMObjectPrototypeFunctionOverloadedMethod2Body):
310         * bindings/scripts/test/JS/JSTestCallTracer.cpp:
311         (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithArgumentsBody):
312         (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableArgumentBody):
313         (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithVariantArgumentBody):
314         (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableVariantArgumentBody):
315         (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithOptionalVariantArgumentBody):
316         (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithDefaultVariantArgumentBody):
317         * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
318         (WebCore::jsTestDOMJITPrototypeFunctionGetAttributeBody):
319         (WebCore::jsTestDOMJITPrototypeFunctionItemBody):
320         (WebCore::jsTestDOMJITPrototypeFunctionGetElementByIdBody):
321         (WebCore::jsTestDOMJITPrototypeFunctionGetElementsByNameBody):
322         * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
323         (WebCore::jsTestEnabledBySettingPrototypeFunctionEnabledBySettingOperationBody):
324         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
325         (WebCore::JSTestEventConstructorConstructor::construct):
326         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
327         (WebCore::jsTestEventTargetPrototypeFunctionItemBody):
328         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
329         (WebCore::jsTestGlobalObjectInstanceFunctionRegularOperationBody):
330         (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation1Body):
331         (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation2Body):
332         (WebCore::jsTestGlobalObjectConstructorFunctionEnabledAtRuntimeOperationStaticBody):
333         (WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldBody):
334         (WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldWhenRuntimeFeatureEnabledBody):
335         (WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldWhenRuntimeFeaturesEnabledBody):
336         * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
337         (WebCore::jsTestIndexedSetterWithIdentifierPrototypeFunctionIndexedSetterBody):
338         * bindings/scripts/test/JS/JSTestInterface.cpp:
339         (WebCore::JSTestInterfaceConstructor::construct):
340         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2Body):
341         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2Body):
342         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
343         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethodBody):
344         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
345         (WebCore::jsTestNamedAndIndexedSetterWithIdentifierPrototypeFunctionNamedSetterBody):
346         (WebCore::jsTestNamedAndIndexedSetterWithIdentifierPrototypeFunctionIndexedSetterBody):
347         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
348         (WebCore::JSTestNamedConstructorNamedConstructor::construct):
349         * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
350         (WebCore::jsTestNamedDeleterWithIdentifierPrototypeFunctionNamedDeleterBody):
351         * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
352         (WebCore::jsTestNamedGetterWithIdentifierPrototypeFunctionGetterNameBody):
353         * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
354         (WebCore::jsTestNamedSetterWithIdentifierPrototypeFunctionNamedSetterBody):
355         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
356         (WebCore::jsTestNamedSetterWithIndexedGetterPrototypeFunctionNamedSetterBody):
357         (WebCore::jsTestNamedSetterWithIndexedGetterPrototypeFunctionIndexedSetterBody):
358         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
359         (WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionNamedSetterBody):
360         (WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionIndexedSetter1Body):
361         (WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionIndexedSetter2Body):
362         * bindings/scripts/test/JS/JSTestObj.cpp:
363         (WebCore::JSTestObjConstructor::construct):
364         (WebCore::callJSTestObj1):
365         (WebCore::callJSTestObj2):
366         (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation1Body):
367         (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation2Body):
368         (WebCore::jsTestObjConstructorFunctionEnabledAtRuntimeOperationStaticBody):
369         (WebCore::jsTestObjPrototypeFunctionEnabledInSpecificWorldWhenRuntimeFeatureEnabledBody):
370         (WebCore::jsTestObjPrototypeFunctionWorldSpecificMethodBody):
371         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgsBody):
372         (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgsBody):
373         (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgsBody):
374         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgsBody):
375         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgsBody):
376         (WebCore::jsTestObjPrototypeFunctionMethodWithArgTreatingNullAsEmptyStringBody):
377         (WebCore::jsTestObjPrototypeFunctionMethodWithXPathNSResolverParameterBody):
378         (WebCore::jsTestObjPrototypeFunctionNullableStringSpecialMethodBody):
379         (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArgBody):
380         (WebCore::jsTestObjPrototypeFunctionMethodWithStandaloneEnumArgBody):
381         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgBody):
382         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValueBody):
383         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrowsBody):
384         (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArgBody):
385         (WebCore::jsTestObjPrototypeFunctionMethodWithNullableUSVStringArgBody):
386         (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArgTreatingNullAsEmptyStringBody):
387         (WebCore::jsTestObjPrototypeFunctionMethodWithByteStringArgBody):
388         (WebCore::jsTestObjPrototypeFunctionMethodWithNullableByteStringArgBody):
389         (WebCore::jsTestObjPrototypeFunctionMethodWithByteStringArgTreatingNullAsEmptyStringBody):
390         (WebCore::jsTestObjPrototypeFunctionSerializedValueBody):
391         (WebCore::jsTestObjPrototypeFunctionMethodWithRecordBody):
392         (WebCore::jsTestObjPrototypeFunctionPrivateMethodBody):
393         (WebCore::jsTestObjPrototypeFunctionPublicAndPrivateMethodBody):
394         (WebCore::jsTestObjPrototypeFunctionAddEventListenerBody):
395         (WebCore::jsTestObjPrototypeFunctionRemoveEventListenerBody):
396         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgBody):
397         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValueBody):
398         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArgBody):
399         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgsBody):
400         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringBody):
401         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVStringBody):
402         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringBody):
403         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValueBody):
404         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringAndDefaultValueBody):
405         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullBody):
406         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefinedBody):
407         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsNullBody):
408         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsEmptyStringBody):
409         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVStringIsEmptyStringBody):
410         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsEmptyStringBody):
411         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalDoubleIsNaNBody):
412         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalFloatIsNaNBody):
413         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLongBody):
414         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLongIsZeroBody):
415         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongBody):
416         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongIsZeroBody):
417         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceBody):
418         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmptyBody):
419         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBooleanBody):
420         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBooleanIsFalseBody):
421         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAnyBody):
422         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalObjectBody):
423         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperBody):
424         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperIsNullBody):
425         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalXPathNSResolverBody):
426         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalRecordBody):
427         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalPromiseBody):
428         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArgBody):
429         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArgBody):
430         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArgBody):
431         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArgBody):
432         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArgBody):
433         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArgBody):
434         (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArgBody):
435         (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArgBody):
436         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1Body):
437         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2Body):
438         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3Body):
439         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4Body):
440         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5Body):
441         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6Body):
442         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7Body):
443         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8Body):
444         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9Body):
445         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10Body):
446         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11Body):
447         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod12Body):
448         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1Body):
449         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2Body):
450         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithDistinguishingUnion1Body):
451         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithDistinguishingUnion2Body):
452         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWith2DistinguishingUnions1Body):
453         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWith2DistinguishingUnions2Body):
454         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithNonDistinguishingUnion1Body):
455         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithNonDistinguishingUnion2Body):
456         (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion1Body):
457         (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion2Body):
458         (WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion1Body):
459         (WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion2Body):
460         (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter1Body):
461         (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter2Body):
462         (WebCore::jsTestObjConstructorFunctionClassMethodWithOptionalBody):
463         (WebCore::jsTestObjConstructorFunctionOverloadedMethod11Body):
464         (WebCore::jsTestObjConstructorFunctionOverloadedMethod12Body):
465         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClampBody):
466         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClampOnOptionalBody):
467         (WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRangeBody):
468         (WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRangeOnOptionalBody):
469         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequenceBody):
470         (WebCore::jsTestObjPrototypeFunctionStringArrayFunctionBody):
471         (WebCore::jsTestObjPrototypeFunctionDomStringListFunctionBody):
472         (WebCore::jsTestObjPrototypeFunctionOperationWithOptionalUnionParameterBody):
473         (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequenceBody):
474         (WebCore::jsTestObjPrototypeFunctionGetElementByIdBody):
475         (WebCore::jsTestObjPrototypeFunctionConvert1Body):
476         (WebCore::jsTestObjPrototypeFunctionConvert2Body):
477         (WebCore::jsTestObjPrototypeFunctionConvert3Body):
478         (WebCore::jsTestObjPrototypeFunctionConvert4Body):
479         (WebCore::jsTestObjPrototypeFunctionVariadicStringMethodBody):
480         (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethodBody):
481         (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethodBody):
482         (WebCore::jsTestObjPrototypeFunctionVariadicUnionMethodBody):
483         (WebCore::jsTestObjPrototypeFunctionAnyBody):
484         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentBody):
485         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentBody):
486         (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Body):
487         (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Body):
488         (WebCore::jsTestObjPrototypeFunctionConditionalOverload1Body):
489         (WebCore::jsTestObjPrototypeFunctionConditionalOverload2Body):
490         (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload1Body):
491         (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload2Body):
492         (WebCore::jsTestObjPrototypeFunctionAttachShadowRootBody):
493         (WebCore::jsTestObjPrototypeFunctionOperationWithExternalDictionaryParameterBody):
494         (WebCore::jsTestObjPrototypeFunctionBufferSourceParameterBody):
495         (WebCore::jsTestObjPrototypeFunctionLegacyCallerNamedBody):
496         (WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationBody):
497         (WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationWithExceptionBody):
498         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
499         (WebCore::constructJSTestOverloadedConstructors1):
500         (WebCore::constructJSTestOverloadedConstructors2):
501         (WebCore::constructJSTestOverloadedConstructors3):
502         (WebCore::constructJSTestOverloadedConstructors4):
503         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
504         (WebCore::constructJSTestOverloadedConstructorsWithSequence1):
505         (WebCore::constructJSTestOverloadedConstructorsWithSequence2):
506         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
507         (WebCore::jsTestOverrideBuiltinsPrototypeFunctionNamedItemBody):
508         * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
509         (WebCore::JSTestPromiseRejectionEventConstructor::construct):
510         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
511         (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionFunctionBody):
512         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
513         (WebCore::JSTestTypedefsConstructor::construct):
514         (WebCore::jsTestTypedefsPrototypeFunctionFuncBody):
515         (WebCore::jsTestTypedefsPrototypeFunctionSetShadowBody):
516         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArgBody):
517         (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceArgBody):
518         (WebCore::jsTestTypedefsPrototypeFunctionSequenceOfNullablesArgBody):
519         (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArgBody):
520         (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceOfUnionsArgBody):
521         (WebCore::jsTestTypedefsPrototypeFunctionUnionArgBody):
522         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClampBody):
523         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClampInTypedefBody):
524         (WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunctionBody):
525         (WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunction2Body):
526         (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresIncludeBody):
527
528 2020-03-25  Wenson Hsieh  <wenson_hsieh@apple.com>
529
530         Unreviewed, fix the watchOS build after r259008
531
532         Put a call to Pasteboard::nameOfDragPasteboard behind ENABLE(DRAG_SUPPORT); additionally, update an out-of-date
533         comment to reflect the fact that arbitrary UIPasteboards can be converted to a list of NSItemProviders, whose
534         data can be traversed in fidelity order.
535
536         * platform/ios/PasteboardIOS.mm:
537         (WebCore::Pasteboard::respectsUTIFidelities const):
538
539 2020-03-25  Simon Fraser  <simon.fraser@apple.com>
540
541         Flashing and partly visible elements
542         https://bugs.webkit.org/show_bug.cgi?id=204605
543
544         Reviewed by Zalan Bujtas.
545
546         If, during a compositing update, a layer becomes non-composited, then we repaint its
547         location in its new target compositing layer. However, that layer might be in the list
548         of BackingSharingState's layers that may paint into backing provided by some ancestor,
549         so they'd be in a limbo state where their repaint target was unknown. We'd erroneously
550         repaint in some ancestor, resulting in missing content.
551
552         Fix by having BackingSharingState track a set of layers that can't be repainted currently
553         because their ancestor chain contains a maybe-sharing layer, and repaint them when
554         the backing sharing state is resolved.
555
556         This is only an issue during RenderLayerCompositor::computeCompositingRequirements()
557         when the backing sharing state is being computed, so most repaints are not affected.
558
559         Test: compositing/shared-backing/repaint-into-shared-backing.html
560
561         * rendering/RenderLayerCompositor.cpp:
562         (WebCore::RenderLayerCompositor::BackingSharingState::isPotentialBackingSharingLayer const):
563         (WebCore::RenderLayerCompositor::BackingSharingState::addLayerNeedingRepaint):
564         (WebCore::RenderLayerCompositor::BackingSharingState::endBackingSharingSequence):
565         (WebCore::RenderLayerCompositor::BackingSharingState::issuePendingRepaints):
566         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
567         (WebCore::RenderLayerCompositor::updateBacking):
568         (WebCore::RenderLayerCompositor::updateLayerCompositingState):
569         (WebCore::RenderLayerCompositor::layerRepaintTargetsBackingSharingLayer const):
570         * rendering/RenderLayerCompositor.h:
571
572 2020-03-25  Chris Dumez  <cdumez@apple.com>
573
574         Event listeners registered with 'once' option may get garbage collected too soon
575         https://bugs.webkit.org/show_bug.cgi?id=209504
576         <rdar://problem/60541567>
577
578         Reviewed by Yusuke Suzuki.
579
580         In EventTarget::innerInvokeEventListeners, if the listener we're about to call is a one-time
581         listener (has 'once' flag set), we would first unregister the event listener and then call
582         it, as per the DOM specification. However, once unregistered, the event listener is no longer
583         visited for GC purposes and its internal JS Function may get garbage collected before we get
584         a chance to call it.
585
586         To address the issue, we now make sure the JS Function (and its wrapper) stay alive for the
587         duration of the scope using ensureStillAliveHere().
588
589         Test: http/tests/inspector/network/har/har-page-aggressive-gc.html
590
591         * bindings/js/JSEventListener.h:
592         * dom/EventListener.h:
593         (WebCore::EventListener::jsFunction const):
594         (WebCore::EventListener::wrapper const):
595         * dom/EventTarget.cpp:
596         (WebCore::EventTarget::innerInvokeEventListeners):
597
598 2020-03-25  Wenson Hsieh  <wenson_hsieh@apple.com>
599
600         Rename "data interaction pasteboard" to "drag and drop pasteboard"
601         https://bugs.webkit.org/show_bug.cgi?id=209556
602
603         Reviewed by Tim Horton.
604
605         "Data interaction" is an obsolete term for drag and drop on iOS, and was meant only to be used early on in
606         development. Replace this with the more descriptive name "drag and drop pasteboard", and additionally hide the
607         name behind a Cocoa-only Pasteboard helper method so that each call site won't need to repeat the string.
608
609         * platform/Pasteboard.h:
610         * platform/cocoa/DragDataCocoa.mm:
611         (WebCore::DragData::DragData):
612         * platform/ios/PasteboardIOS.mm:
613         (WebCore::Pasteboard::nameOfDragPasteboard):
614         (WebCore::Pasteboard::createForDragAndDrop):
615         (WebCore::Pasteboard::respectsUTIFidelities const):
616         * platform/ios/PlatformPasteboardIOS.mm:
617         (WebCore::PlatformPasteboard::PlatformPasteboard):
618         * platform/mac/PasteboardMac.mm:
619         (WebCore::Pasteboard::nameOfDragPasteboard):
620
621 2020-03-25  Frank Yang  <guowei_yang@apple.com>
622
623         Unprefix -webkit-text-orientation
624         https://bugs.webkit.org/show_bug.cgi?id=196139
625
626         Reviewed by Myles C. Maxfield
627
628         In order to unprefix -webkit-text-orientation to be text-orientation, 
629         a new property, "text-orientation" is added to CSSProperties.json. 
630         I didn't use alias because the prefixed version still supports non-standard values, 
631         and we want the unprefixed version to strictly follow the specs.
632         However only adding a new property is not enough because -webkit-text-orientation
633         is a high-priority property, and without extra logic, the CSS property 
634         "last-one-wins" ordering rule cannot be enforced because high-priority properties 
635         are applied to elements in the order they appear in the generated CSSPropertyNames.cpp file. 
636         Therefore a codegen flag, "related-property" is added to both 
637         -webkit-text-orientation and text-orientation to point to each other, 
638         so that when applying high priorities, the algorithm will know that the 
639         two properties are modifying the same style of the element (in our case, text orientation)
640         and thus the CSS property "last-one-wins" ordering rule will take effect. 
641
642         This code change also helps future developments when we want to unprefix other high-priority properties.
643
644         Tests: fast/text/orientation-inheritance.html
645                fast/text/orientation-mixed-unprefix.html
646                fast/text/orientation-sideways-prefix-unprefix.html
647                fast/text/orientation-sideways-unprefix.html
648                fast/text/orientation-upright-unprefix.html
649                fast/text/test-orientation-parsing-001.html
650                fast/text/text-orientation-parse-competition.html
651                fast/text/text-orientation-parse.html
652                imported/w3c/web-platform-tests/css/css-writing-modes/text-orientation-parsing-001.html
653
654         * css/CSSComputedStyleDeclaration.cpp: 
655             - added support for parsing "text-orientation"
656         (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
657             - added a new RenderStyle, CSSPropertyTextOrientation 
658         * css/CSSProperties.json: 
659             - added a new codegen property, "related-property"
660         * css/makeprop.pl: 
661             - added new rules for generating code to parse related properties
662         (addProperty):
663             - inserts new rule in the generated code to parse related properties
664         * css/parser/CSSParserFastPaths.cpp:
665             - Specified the CSS property values that the unprefixed "text-orientation" can take
666         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
667             - Only supports the standard values for text-orientation
668         (WebCore::CSSParserFastPaths::isKeywordPropertyID):
669             - Added switch case value CSSPropertyTextOrientation
670         * css/parser/CSSParserImpl.cpp: 
671             - Added rules to treat related properties differently
672         (WebCore::filterProperties):
673             - For related rules that are also high priority, 
674               if we saw one in the property list, we will mark all the related property 
675               as seen, in order to enforce the "last-one-wins" ordering rule
676         * style/StyleBuilderCustom.h:
677         (WebCore::Style::BuilderCustom::applyValueTextOrientation):
678             - added functionality to parse the newly added "text-orientation" property
679
680 2020-03-25  Simon Fraser  <simon.fraser@apple.com>
681
682         Remove CompositingChangeRepaint which was always CompositingChangeRepaintNow
683         https://bugs.webkit.org/show_bug.cgi?id=209551
684
685         Reviewed by Zalan Bujtas.
686
687         All callers to updateBacking() passed CompositingChangeRepaintNow, so remove this argument
688         and the enum.
689
690         No behavior change.
691
692         * rendering/RenderLayerCompositor.cpp:
693         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
694         (WebCore::RenderLayerCompositor::layerStyleChanged):
695         (WebCore::RenderLayerCompositor::updateBacking):
696         (WebCore::RenderLayerCompositor::updateLayerCompositingState):
697         * rendering/RenderLayerCompositor.h:
698
699 2020-03-25  Sergio Villar Senin  <svillar@igalia.com>
700
701         Unreviewed build fix for GTK.
702
703         In wkb.ug/209536 we replaced ENABLE_WEBGL by ENABLE_WEBXR for cmake
704         builds. We just forgot to do it the same for derived sources.
705
706         * Sources.txt: replaced ENABLE_WEBGL by ENABLE_WEBXR.
707
708 2020-03-25  youenn fablet  <youenn@apple.com>
709
710         Fix build after https://trac.webkit.org/changeset/258977/webkit
711         https://bugs.webkit.org/show_bug.cgi?id=209545
712
713         Unreviewed.
714
715         * dom/Document.cpp:
716         (WebCore::Document::visibilityStateChanged):
717         Add ENABLE(MEDIA_STREAM) compilation flag.
718
719 2020-03-25  Frank Yang  <guowei_yang@apple.com>
720
721         WebKit uses Alphabetic Baseline when "-webkit-text-orientation" is "mixed" in Vertical Writing Mode
722         https://bugs.webkit.org/show_bug.cgi?id=208824
723
724         Reviewed by Myles C. Maxfield.
725
726         According to the CSS documentation, https://drafts.csswg.org/css-writing-modes/#text-orientation and 
727         https://drafts.csswg.org/css-writing-modes/#text-baselines "In vertical typographic mode, 
728         the central baseline is used as the dominant baseline when text-orientation is mixed or upright. 
729         Otherwise the alphabetic baseline is used." 
730
731         However, InlineFlowBox::requiresIdeographicsBaseline returns true only when text orientation is 
732         "upright", meaning it applies the same baseline for mixed and sideways text orientation.
733         Therefore, a new clause is added to check if text-orientation is "mixed" 
734
735         Currently in our implementation, text orientation is determinted by the following:
736                 - mixed:    FontDescription returns Vertical   and   nonCJKGlyphOrientation returns Mixed
737                 - upright:  FontDescription returns Vertical   and   nonCJKGlyphOrientation returns Upright
738                 - sideways: FontDescription returns Horizontal and   nonCJKGlyphOrientation returns Mixed
739         Original code only checks if FontDescription returns Vertical and nonCJKGlyphOrientation returns Mixed, which
740         is only checking if text orientation is "upright", and returns true for requiresIdeographicBaseline, treating        
741         "mixed" and "sideways" the same, requesting alphabetic baseline, which is incorrect.
742
743         Therefore, to correct this bahavior, change the code so that requiresIdeographicsBaseline returns true either 
744         when text-orientation is "mixed" or "upright". Equivalently, we return true when FontDescription returns Vertical
745         false otherwise. 
746
747         Test: imported/w3c/web-platform-tests/css/css-writing-modes/
748
749         * rendering/InlineFlowBox.cpp:
750         (WebCore::InlineFlowBox::requiresIdeographicBaseline const):
751
752 2020-03-25  Sergio Villar Senin  <svillar@igalia.com>
753
754         Use ENABLE_WEBXR to guard WebXR IDL files in CMakeLists.txt
755         https://bugs.webkit.org/show_bug.cgi?id=209536
756
757         Reviewed by Darin Adler.
758
759         * CMakeLists.txt: replaced ENABLE_WEBGL by ENABLE_WEBXR.
760
761 2020-03-25  Kate Cheney  <katherine_cheney@apple.com>
762
763         App-bound domain checks should provide more debugging details at script evaluation sites
764         https://bugs.webkit.org/show_bug.cgi?id=209521
765         <rdar://problem/60837954>
766
767         Reviewed by Chris Dumez.
768
769         * bindings/js/ScriptController.cpp:
770         (WebCore::ScriptController::executeScriptInWorld):
771         Return makeUnexpected object with an error message instead of null to
772         provide more details as to why the executeScriptInWorld()
773         call was not completed. Also add console logging and release logging.
774  
775         * page/Frame.cpp:
776         (WebCore::Frame::injectUserScriptImmediately):
777         There is no option to return an exception here, so this patch adds
778         console logging and release logging.
779
780 2020-03-25  Simon Fraser  <simon.fraser@apple.com>
781
782         REGRESSION (r251385): box-shadow interferes with backdrop-filter
783         https://bugs.webkit.org/show_bug.cgi?id=208070
784         <rdar://problem/59683152>
785
786         Reviewed by Dean Jackson.
787
788         updateClippingStrategy() compares the rounded rect passed in with the geometry
789         of the first layer argument, so the rect needs to have a zero origin. We do
790         the same computation in GraphicsLayerCA::updateContentsRects().
791
792         Test: compositing/filters/backdrop-filter-rect.html
793
794         * platform/graphics/ca/GraphicsLayerCA.cpp:
795         (WebCore::GraphicsLayerCA::updateBackdropFiltersRect):
796
797 2020-03-25  Wenson Hsieh  <wenson_hsieh@apple.com>
798
799         Avoid querying pasteboard strings while dragging content over a potential drop target
800         https://bugs.webkit.org/show_bug.cgi?id=209531
801
802         Reviewed by Tim Horton and Ryosuke Niwa.
803
804         A couple of places in WebCore currently use PasteboardStrategy::stringForType() to query for pasteboard URL
805         strings. These call sites attempt to read URL strings (using both readString and stringForType) for the purposes
806         of checking whether or not we should avoid exposing the URL string to web content (note that in the case of
807         containsPlainText, we actually check whether or not the string is empty, which depends on whether or not the
808         string is safe to expose to the web -- e.g., not a file URL).
809
810         This is incompatible with some changes in the near future which will prevent the web content process from
811         reading any data from the pasteboard, if a paste or drop action has not yet been performed. To address this
812         issue, we introduce an alternate PasteboardStrategy method, containsStringSafeForDOMToReadForType, which returns
813         (for a given platform pasteboard type) whether or not a string that can be safely exposed to bindings exists.
814
815         Rather than allow the web process to read the entire string, limit it to just this true/false answer.
816
817         * platform/PasteboardStrategy.h:
818         * platform/PlatformPasteboard.h:
819         * platform/cocoa/DragDataCocoa.mm:
820         (WebCore::DragData::containsPlainText const):
821
822         Use containsStringSafeForDOMToReadForType instead of stringForType.
823
824         * platform/cocoa/PasteboardCocoa.mm:
825         (WebCore::Pasteboard::fileContentState):
826
827         Use containsStringSafeForDOMToReadForType instead of readString.
828
829         * platform/cocoa/PlatformPasteboardCocoa.mm:
830         (WebCore::PlatformPasteboard::containsStringSafeForDOMToReadForType const):
831
832 2020-03-25  Ting-Wei Lan  <lantw44@gmail.com>
833
834         [GTK] Add user agent quirk for auth.mayohr.com
835         https://bugs.webkit.org/show_bug.cgi?id=209378
836
837         Reviewed by Michael Catanzaro.
838
839         This site blocks the login page completely and asks the user to download
840         Google Chrome when using our standard user agent. It only blocks the
841         login page. After logging in, it works fine without user agent quirks.
842
843         Note that it is required to hide Version/X from the user agent string
844         for the site to recognize it as a valid Chrome user agent. Since Chrome
845         itself does not use Version/X, it should be safe to modify the existing
846         quirk instead of adding a new one to handle it.
847
848         * platform/UserAgentQuirks.cpp:
849         (WebCore::urlRequiresChromeBrowser):
850         (WebCore::urlRequiresNoSafariVersion):
851         (WebCore::UserAgentQuirks::quirksForURL):
852         (WebCore::UserAgentQuirks::stringForQuirk):
853         * platform/UserAgentQuirks.h:
854         * platform/glib/UserAgentGLib.cpp:
855         (WebCore::buildUserAgentString):
856
857 2020-03-25  Youenn Fablet  <youenn@apple.com>
858
859         Audio fails to capture stream in WebRTC if AudioSession gets interrupted
860         https://bugs.webkit.org/show_bug.cgi?id=208516
861         <rdar://problem/60020467>
862
863         Reviewed by Eric Carlson.
864
865         In case of page going to hidden, continue calling each capture factory to mute the corresponding sources if needed.
866         In case of page being visible again, reset all tracks according page muted state. This allows restarting tracks that have been
867         muted while page was hidden (video tracks or suspended audio tracks).
868
869         Since tracks can go to muted when visibility changes, we no longer return early when setting the muted state of a page to the same value.
870         Instead we apply it which ensures we comply with what UIProcess wants.
871
872         We start removing the concept of a RealtimeMediaSource be interrupted. Instead we use muting of sources.
873         This allows UIProcess or the page to override any muted state, for instance if page goes in foreground again.
874
875         We update the AudioSharedUnit to allow restarting capture even if suspended.
876         This ensures that we are able to restart capturing even if we do not receive the audio session end of interruption.
877         Also, this notification sometimes takes a long time to happen and we do not want to wait for it when user is interacting with the page.
878         A future refactoring will further remove RealtimeMediaSource interrupted-related code.
879
880         Manually tested.
881
882         * dom/Document.cpp:
883         (WebCore::Document::visibilityStateChanged):
884         * page/Page.cpp:
885         (WebCore::Page::setMuted):
886         * platform/audio/PlatformMediaSessionManager.h:
887         (WebCore::PlatformMediaSessionManager::isInterrupted const):
888         * platform/mediastream/RealtimeMediaSource.cpp:
889         (WebCore::RealtimeMediaSource::setInterrupted):
890         (WebCore::RealtimeMediaSource::setMuted):
891         * platform/mediastream/mac/BaseAudioSharedUnit.cpp:
892         (WebCore::BaseAudioSharedUnit::startProducingData):
893         (WebCore::BaseAudioSharedUnit::resume):
894         (WebCore::BaseAudioSharedUnit::suspend):
895
896 2020-03-25  Charlie Turner  <cturner@igalia.com>
897
898         [GStreamer] Remove noisy warning about broken LC support
899         https://bugs.webkit.org/show_bug.cgi?id=209472
900
901         Reviewed by Philippe Normand.
902
903         * platform/graphics/gstreamer/GStreamerCommon.cpp:
904         (WebCore::initializeGStreamer): There's no seemingly nice way of
905         ensuring this message is issued once in WebKit the
906         lifetime. Issuing multiple times is upsetting users. We can't rely
907         on Gst logging at this point, and there's no established story of
908         using the LOG_CHANNEL stuff on WPE/GTK ports for suppressible
909         WebKit message AFAICT.
910
911 2020-03-24  Andres Gonzalez  <andresg_22@apple.com>
912
913         Avoid multiple unnecessary updates of the IsolatedTree.
914         https://bugs.webkit.org/show_bug.cgi?id=209409
915
916         Reviewed by Chris Fleizach.
917
918         AXObjectCache::notificationPostTimerFired was updating the isolated tree
919         in every single notification, causing a big performance hit.
920         This change filters out repeated notifications for the same node, thus
921         reducing significantly the number of times the isolated tree is updated.
922
923         * accessibility/AXObjectCache.cpp:
924         (WebCore::AXObjectCache::notificationPostTimerFired):
925         (WebCore::AXObjectCache::postNotification):
926         (WebCore::AXObjectCache::postTextStateChangeNotification):
927         (WebCore::AXObjectCache::generateIsolatedTree):
928         (WebCore::AXObjectCache::updateIsolatedTree):
929         (WebCore::appendIfNotContainsMatching): Helper function that might be
930         added to WTF::Vector.
931         (WebCore::createIsolatedTreeHierarchy): Became AXIsolatedTree::createSubtree
932         * accessibility/AXObjectCache.h:
933         * accessibility/AccessibilityObjectInterface.h:
934         (WebCore::AXCoreObject::childrenIDs):
935         * accessibility/isolatedtree/AXIsolatedTree.cpp:
936         (WebCore::AXIsolatedTree::removeTreeForPageID):
937         (WebCore::AXIsolatedTree::generateSubtree):
938         (WebCore::AXIsolatedTree::createSubtree):
939         (WebCore::AXIsolatedTree::updateNode): Updates only the given node.
940         (WebCore::AXIsolatedTree::updateSubtree): Recreates the entire subtree.
941         (WebCore::AXIsolatedTree::updateChildren): Updates the associated object,
942         recreating only the children that are added and removing the ones that
943         are no longer present in the AX tree.
944         (WebCore::AXIsolatedTree::removeNode):
945         (WebCore::AXIsolatedTree::removeSubtree):
946         (WebCore::AXIsolatedTree::appendNodeChanges):
947         (WebCore::AXIsolatedTree::applyPendingChanges):
948         * accessibility/isolatedtree/AXIsolatedTree.h:
949
950 2020-03-24  John Wilander  <wilander@apple.com>
951
952         Build fix for deprecated DDHighlightCreateWithRectsInVisibleRectWithStyleAndDirection
953         https://bugs.webkit.org/show_bug.cgi?id=209530
954         <rdar://problem/60855794>
955
956         Unreviewed build fix. Solution suggested by Darin Adler.
957
958         * page/mac/ServicesOverlayController.mm:
959         (WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
960             Use of DDHighlightCreateWithRectsInVisibleRectWithStyleAndDirection put between
961             ALLOW_DEPRECATED_DECLARATIONS_BEGIN and ALLOW_DEPRECATED_DECLARATIONS_END.
962         (WebCore::ServicesOverlayController::buildSelectionHighlight):
963             Use of DDHighlightCreateWithRectsInVisibleRectWithStyleAndDirection put between
964             ALLOW_DEPRECATED_DECLARATIONS_BEGIN and ALLOW_DEPRECATED_DECLARATIONS_END.
965
966 2020-03-24  Zalan Bujtas  <zalan@apple.com>
967
968         [MultiColumn] Infinite recursion in RenderBlockFlow::relayoutToAvoidWidows
969         https://bugs.webkit.org/show_bug.cgi?id=209527
970         <rdar://problem/56993589>
971
972         Reviewed by Simon Fraser.
973
974         This patch expands on r204980. This is yet another case when we can't possibly accommodate widows in the current column.
975
976         Test: fast/multicol/page-cant-accommodate-widow-crash.html
977
978         * rendering/RenderBlockFlow.cpp:
979         (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
980
981 2020-03-24  Wenson Hsieh  <wenson_hsieh@apple.com>
982
983         Rename DragDataMac and DragImageMac to DragDataCocoa and DragImageCocoa
984         https://bugs.webkit.org/show_bug.cgi?id=209523
985
986         Reviewed by Megan Gardner.
987
988         Rename DragDataMac to DragDataCocoa, and DragImageMac to DragImageCocoa. These files contain logic relevant to
989         both macOS and iOS, and as such, belong in platform/cocoa rather than platform/mac.
990
991         No change in behavior.
992
993         * SourcesCocoa.txt:
994         * WebCore.xcodeproj/project.pbxproj:
995         * platform/cocoa/DragDataCocoa.mm: Renamed from Source/WebCore/platform/mac/DragDataMac.mm.
996         (WebCore::rtfPasteboardType):
997         (WebCore::rtfdPasteboardType):
998         (WebCore::stringPasteboardType):
999         (WebCore::urlPasteboardType):
1000         (WebCore::htmlPasteboardType):
1001         (WebCore::colorPasteboardType):
1002         (WebCore::pdfPasteboardType):
1003         (WebCore::tiffPasteboardType):
1004         (WebCore::DragData::DragData):
1005         (WebCore::DragData::containsURLTypeIdentifier const):
1006         (WebCore::DragData::canSmartReplace const):
1007         (WebCore::DragData::containsColor const):
1008         (WebCore::DragData::containsFiles const):
1009         (WebCore::DragData::numberOfFiles const):
1010         (WebCore::DragData::asFilenames const):
1011         (WebCore::DragData::containsPlainText const):
1012         (WebCore::DragData::asPlainText const):
1013         (WebCore::DragData::asColor const):
1014         (WebCore::DragData::containsCompatibleContent const):
1015         (WebCore::DragData::containsPromise const):
1016         (WebCore::DragData::containsURL const):
1017         (WebCore::DragData::asURL const):
1018         * platform/cocoa/DragImageCocoa.mm: Renamed from Source/WebCore/platform/mac/DragImageMac.mm.
1019         (WebCore::dragImageSize):
1020         (WebCore::deleteDragImage):
1021         (WebCore::scaleDragImage):
1022         (WebCore::dissolveDragImageToFraction):
1023         (WebCore::createDragImageFromImage):
1024         (WebCore::createDragImageIconForCachedImageFilename):
1025         (WebCore::dragOffsetForLinkDragImage):
1026         (WebCore::anchorPointForLinkDragImage):
1027         (WebCore::LinkImageLayout::LinkImageLayout):
1028         (WebCore::createDragImageForLink):
1029         (WebCore::createDragImageForColor):
1030         * platform/graphics/gpu/cocoa/GPUShaderModuleMetal.mm:
1031
1032         Unrelated build fix due to changing unified sources.
1033
1034 2020-03-24  Jer Noble  <jer.noble@apple.com>
1035
1036         REGRESSION(r258314): Leak in MediaPlayerPrivateMediaSourceAVFObjC::updateLastPixelBuffer()
1037         https://bugs.webkit.org/show_bug.cgi?id=209519
1038
1039         Reviewed by Eric Carlson.
1040
1041         Obey the "copy" rule and adopt the results of -copyPixelBufferForSourceTime:sourceTimeForDisplay:.
1042
1043         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1044         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateLastPixelBuffer):
1045
1046 2020-03-24  Jiewen Tan  <jiewen_tan@apple.com>
1047
1048         [WebAuthn] Customize a bit more on the macOS LocalAuthentication prompt
1049         https://bugs.webkit.org/show_bug.cgi?id=208703
1050         <rdar://problem/60136974>
1051
1052         Reviewed by Brent Fulgham.
1053
1054         Part 2.
1055
1056         This patch adds a different LocalAuthentication prompt title for getAssertion.
1057         It also polishes the text used for makeCredential.
1058
1059         Besides that, it also enhances the iOS title strings.
1060
1061         * en.lproj/Localizable.strings:
1062         * platform/LocalizedStrings.cpp:
1063         (WebCore::getAssertionTouchIDPromptTitle):
1064         * platform/LocalizedStrings.h:
1065
1066 2020-03-24  Chris Dumez  <cdumez@apple.com>
1067
1068         Function passed to addEventListener may get garbage collected before the event listener is even added
1069         https://bugs.webkit.org/show_bug.cgi?id=209445
1070
1071         Reviewed by Yusuke Suzuki.
1072
1073         Function passed to addEventListener may get garbage collected before the event listener is even added.
1074         The issue is that the JS bindings for addEventListener() would first create a JSEventListener to store
1075         the JSC Function that was passed in and then add this JSEventListener as an event listener on the
1076         EventTarget. The JSC function held by JSEventListener is supposed to get visited by
1077         JSEventListener::visitJSFunction() which gets called by EventTarget::visitJSEventListeners() which
1078         gets called every time an EventTarget wrapper gets visited. The issue is that when the JSEventListener
1079         gets created, the JSEventListener is not yet connected to its EventTarget and thus
1080         EventTarget::visitJSEventListeners() would not visit it. However, the constructor of JSEventListener
1081         would issue a write barrier on that JSC Function.
1082
1083         Several changes were made to address this issue in the generated bindings:
1084         1. We now create a local variable (named argumentX, X being argument index) for each argument that gets
1085            passed in to an operation
1086         2. At the end of the operation implementation, we call ensureStillAliveHere() on each JSValue argument
1087            to make sure they stay alive until the end of the operation
1088         3. For EventListeners / EventHandlers, we also issue a write barrier at the end of the operation
1089            implementation, when it is safe to do so. Now that we do this here in the bindings, I dropped the
1090            code in the JSEventListener constructor to issue the write barrier (as this was too early).
1091
1092         * bindings/js/JSEventListener.cpp:
1093         (WebCore::JSEventListener::JSEventListener):
1094         * bindings/scripts/CodeGeneratorJS.pm:
1095         (GetOperationReturnedParameterName):
1096         (GenerateAttributeSetterBodyDefinition):
1097         (GenerateParametersCheck):
1098         (GenerateEnsureStillAliveCallsForArguments):
1099         (GenerateImplementationFunctionCall):
1100         * bindings/scripts/test/JS/JSMapLike.cpp:
1101         (WebCore::jsMapLikePrototypeFunctionGetBody):
1102         (WebCore::jsMapLikePrototypeFunctionHasBody):
1103         (WebCore::jsMapLikePrototypeFunctionEntriesBody):
1104         (WebCore::jsMapLikePrototypeFunctionKeysBody):
1105         (WebCore::jsMapLikePrototypeFunctionValuesBody):
1106         (WebCore::jsMapLikePrototypeFunctionForEachBody):
1107         (WebCore::jsMapLikePrototypeFunctionSetBody):
1108         (WebCore::jsMapLikePrototypeFunctionDeleteBody):
1109         * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
1110         (WebCore::jsReadOnlyMapLikePrototypeFunctionGetBody):
1111         (WebCore::jsReadOnlyMapLikePrototypeFunctionHasBody):
1112         (WebCore::jsReadOnlyMapLikePrototypeFunctionEntriesBody):
1113         (WebCore::jsReadOnlyMapLikePrototypeFunctionKeysBody):
1114         (WebCore::jsReadOnlyMapLikePrototypeFunctionValuesBody):
1115         (WebCore::jsReadOnlyMapLikePrototypeFunctionForEachBody):
1116         * bindings/scripts/test/JS/JSReadOnlySetLike.cpp:
1117         (WebCore::jsReadOnlySetLikePrototypeFunctionHasBody):
1118         (WebCore::jsReadOnlySetLikePrototypeFunctionEntriesBody):
1119         (WebCore::jsReadOnlySetLikePrototypeFunctionKeysBody):
1120         (WebCore::jsReadOnlySetLikePrototypeFunctionValuesBody):
1121         (WebCore::jsReadOnlySetLikePrototypeFunctionForEachBody):
1122         * bindings/scripts/test/JS/JSSetLike.cpp:
1123         (WebCore::jsSetLikePrototypeFunctionHasBody):
1124         (WebCore::jsSetLikePrototypeFunctionEntriesBody):
1125         (WebCore::jsSetLikePrototypeFunctionKeysBody):
1126         (WebCore::jsSetLikePrototypeFunctionValuesBody):
1127         (WebCore::jsSetLikePrototypeFunctionForEachBody):
1128         (WebCore::jsSetLikePrototypeFunctionAddBody):
1129         (WebCore::jsSetLikePrototypeFunctionDeleteBody):
1130         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1131         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunctionBody):
1132         (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessageBody):
1133         (WebCore::jsTestActiveDOMObjectPrototypeFunctionOverloadedMethod1Body):
1134         (WebCore::jsTestActiveDOMObjectPrototypeFunctionOverloadedMethod2Body):
1135         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
1136         (WebCore::jsTestCEReactionsStringifierPrototypeFunctionToStringBody):
1137         * bindings/scripts/test/JS/JSTestCallTracer.cpp:
1138         (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithArgumentsBody):
1139         (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableArgumentBody):
1140         (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithVariantArgumentBody):
1141         (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableVariantArgumentBody):
1142         (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithOptionalVariantArgumentBody):
1143         (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithDefaultVariantArgumentBody):
1144         * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
1145         (WebCore::jsTestDOMJITPrototypeFunctionGetAttributeBody):
1146         (WebCore::jsTestDOMJITPrototypeFunctionItemBody):
1147         (WebCore::jsTestDOMJITPrototypeFunctionHasAttributeBody):
1148         (WebCore::jsTestDOMJITPrototypeFunctionGetElementByIdBody):
1149         (WebCore::jsTestDOMJITPrototypeFunctionGetElementsByNameBody):
1150         * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
1151         (WebCore::jsTestEnabledBySettingPrototypeFunctionEnabledBySettingOperationBody):
1152         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1153         (WebCore::JSTestEventConstructorConstructor::construct):
1154         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1155         (WebCore::jsTestEventTargetPrototypeFunctionItemBody):
1156         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
1157         (WebCore::jsTestGlobalObjectInstanceFunctionRegularOperationBody):
1158         (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation1Body):
1159         (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation2Body):
1160         (WebCore::jsTestGlobalObjectConstructorFunctionEnabledAtRuntimeOperationStaticBody):
1161         (WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldBody):
1162         (WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldWhenRuntimeFeatureEnabledBody):
1163         (WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldWhenRuntimeFeaturesEnabledBody):
1164         (WebCore::jsTestGlobalObjectInstanceFunctionGetSecretBooleanBody):
1165         (WebCore::jsTestGlobalObjectInstanceFunctionTestFeatureGetSecretBooleanBody):
1166         * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
1167         (WebCore::jsTestIndexedSetterWithIdentifierPrototypeFunctionIndexedSetterBody):
1168         * bindings/scripts/test/JS/JSTestInterface.cpp:
1169         (WebCore::JSTestInterfaceConstructor::construct):
1170         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2Body):
1171         (WebCore::jsTestInterfacePrototypeFunctionTakeNodesBody):
1172         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2Body):
1173         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1174         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethodBody):
1175         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
1176         (WebCore::jsTestNamedAndIndexedSetterWithIdentifierPrototypeFunctionNamedSetterBody):
1177         (WebCore::jsTestNamedAndIndexedSetterWithIdentifierPrototypeFunctionIndexedSetterBody):
1178         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1179         (WebCore::JSTestNamedConstructorNamedConstructor::construct):
1180         * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
1181         (WebCore::jsTestNamedDeleterWithIdentifierPrototypeFunctionNamedDeleterBody):
1182         * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
1183         (WebCore::jsTestNamedGetterWithIdentifierPrototypeFunctionGetterNameBody):
1184         * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
1185         (WebCore::jsTestNamedSetterWithIdentifierPrototypeFunctionNamedSetterBody):
1186         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
1187         (WebCore::jsTestNamedSetterWithIndexedGetterPrototypeFunctionNamedSetterBody):
1188         (WebCore::jsTestNamedSetterWithIndexedGetterPrototypeFunctionIndexedSetterBody):
1189         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
1190         (WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionNamedSetterBody):
1191         (WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionIndexedSetter1Body):
1192         (WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionIndexedSetter2Body):
1193         * bindings/scripts/test/JS/JSTestNode.cpp:
1194         (WebCore::jsTestNodePrototypeFunctionGetSecretBooleanBody):
1195         (WebCore::jsTestNodePrototypeFunctionTestFeatureGetSecretBooleanBody):
1196         * bindings/scripts/test/JS/JSTestObj.cpp:
1197         (WebCore::JSTestObjConstructor::construct):
1198         (WebCore::callJSTestObj1):
1199         (WebCore::callJSTestObj2):
1200         (WebCore::setJSTestObjOnfooSetter):
1201         (WebCore::setJSTestObjOnwebkitfooSetter):
1202         (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation1Body):
1203         (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation2Body):
1204         (WebCore::jsTestObjConstructorFunctionEnabledAtRuntimeOperationStaticBody):
1205         (WebCore::jsTestObjPrototypeFunctionEnabledInSpecificWorldWhenRuntimeFeatureEnabledBody):
1206         (WebCore::jsTestObjPrototypeFunctionWorldSpecificMethodBody):
1207         (WebCore::jsTestObjPrototypeFunctionGetSecretBooleanBody):
1208         (WebCore::jsTestObjPrototypeFunctionTestFeatureGetSecretBooleanBody):
1209         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgsBody):
1210         (WebCore::jsTestObjPrototypeFunctionByteMethodBody):
1211         (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgsBody):
1212         (WebCore::jsTestObjPrototypeFunctionOctetMethodBody):
1213         (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgsBody):
1214         (WebCore::jsTestObjPrototypeFunctionLongMethodBody):
1215         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgsBody):
1216         (WebCore::jsTestObjPrototypeFunctionObjMethodBody):
1217         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgsBody):
1218         (WebCore::jsTestObjInstanceFunctionUnforgeableMethodBody):
1219         (WebCore::jsTestObjPrototypeFunctionMethodWithArgTreatingNullAsEmptyStringBody):
1220         (WebCore::jsTestObjPrototypeFunctionMethodWithXPathNSResolverParameterBody):
1221         (WebCore::jsTestObjPrototypeFunctionNullableStringMethodBody):
1222         (WebCore::jsTestObjConstructorFunctionNullableStringStaticMethodBody):
1223         (WebCore::jsTestObjPrototypeFunctionNullableStringSpecialMethodBody):
1224         (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArgBody):
1225         (WebCore::jsTestObjPrototypeFunctionMethodWithStandaloneEnumArgBody):
1226         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgBody):
1227         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValueBody):
1228         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrowsBody):
1229         (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArgBody):
1230         (WebCore::jsTestObjPrototypeFunctionMethodWithNullableUSVStringArgBody):
1231         (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArgTreatingNullAsEmptyStringBody):
1232         (WebCore::jsTestObjPrototypeFunctionMethodWithByteStringArgBody):
1233         (WebCore::jsTestObjPrototypeFunctionMethodWithNullableByteStringArgBody):
1234         (WebCore::jsTestObjPrototypeFunctionMethodWithByteStringArgTreatingNullAsEmptyStringBody):
1235         (WebCore::jsTestObjPrototypeFunctionSerializedValueBody):
1236         (WebCore::jsTestObjPrototypeFunctionMethodWithRecordBody):
1237         (WebCore::jsTestObjPrototypeFunctionMethodWithExceptionReturningLongBody):
1238         (WebCore::jsTestObjPrototypeFunctionMethodWithExceptionReturningObjectBody):
1239         (WebCore::jsTestObjPrototypeFunctionPrivateMethodBody):
1240         (WebCore::jsTestObjPrototypeFunctionPublicAndPrivateMethodBody):
1241         (WebCore::jsTestObjPrototypeFunctionAddEventListenerBody):
1242         (WebCore::jsTestObjPrototypeFunctionRemoveEventListenerBody):
1243         (WebCore::jsTestObjPrototypeFunctionWithExecStateObjBody):
1244         (WebCore::jsTestObjPrototypeFunctionWithExecStateObjExceptionBody):
1245         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndExecStateObjExceptionBody):
1246         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndExecStateWithSpacesBody):
1247         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgBody):
1248         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValueBody):
1249         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArgBody):
1250         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgsBody):
1251         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringBody):
1252         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVStringBody):
1253         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringBody):
1254         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValueBody):
1255         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringAndDefaultValueBody):
1256         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullBody):
1257         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefinedBody):
1258         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsNullBody):
1259         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsEmptyStringBody):
1260         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVStringIsEmptyStringBody):
1261         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsEmptyStringBody):
1262         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalDoubleIsNaNBody):
1263         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalFloatIsNaNBody):
1264         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLongBody):
1265         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLongIsZeroBody):
1266         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongBody):
1267         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongIsZeroBody):
1268         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceBody):
1269         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmptyBody):
1270         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBooleanBody):
1271         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBooleanIsFalseBody):
1272         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAnyBody):
1273         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalObjectBody):
1274         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperBody):
1275         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperIsNullBody):
1276         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalXPathNSResolverBody):
1277         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalRecordBody):
1278         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalPromiseBody):
1279         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArgBody):
1280         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArgBody):
1281         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArgBody):
1282         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArgBody):
1283         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArgBody):
1284         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArgBody):
1285         (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArgBody):
1286         (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArgBody):
1287         (WebCore::jsTestObjPrototypeFunctionConditionalMethod1Body):
1288         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1Body):
1289         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2Body):
1290         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3Body):
1291         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4Body):
1292         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5Body):
1293         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6Body):
1294         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7Body):
1295         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8Body):
1296         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9Body):
1297         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10Body):
1298         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11Body):
1299         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod12Body):
1300         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1Body):
1301         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2Body):
1302         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithDistinguishingUnion1Body):
1303         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithDistinguishingUnion2Body):
1304         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWith2DistinguishingUnions1Body):
1305         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWith2DistinguishingUnions2Body):
1306         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithNonDistinguishingUnion1Body):
1307         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithNonDistinguishingUnion2Body):
1308         (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion1Body):
1309         (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion2Body):
1310         (WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion1Body):
1311         (WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion2Body):
1312         (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter1Body):
1313         (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter2Body):
1314         (WebCore::jsTestObjConstructorFunctionClassMethodWithOptionalBody):
1315         (WebCore::jsTestObjConstructorFunctionOverloadedMethod11Body):
1316         (WebCore::jsTestObjConstructorFunctionOverloadedMethod12Body):
1317         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClampBody):
1318         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClampOnOptionalBody):
1319         (WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRangeBody):
1320         (WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRangeOnOptionalBody):
1321         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequenceBody):
1322         (WebCore::jsTestObjPrototypeFunctionStringArrayFunctionBody):
1323         (WebCore::jsTestObjPrototypeFunctionDomStringListFunctionBody):
1324         (WebCore::jsTestObjPrototypeFunctionOperationWithOptionalUnionParameterBody):
1325         (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequenceBody):
1326         (WebCore::jsTestObjPrototypeFunctionGetElementByIdBody):
1327         (WebCore::jsTestObjPrototypeFunctionGetSVGDocumentBody):
1328         (WebCore::jsTestObjPrototypeFunctionConvert1Body):
1329         (WebCore::jsTestObjPrototypeFunctionConvert2Body):
1330         (WebCore::jsTestObjPrototypeFunctionConvert3Body):
1331         (WebCore::jsTestObjPrototypeFunctionConvert4Body):
1332         (WebCore::jsTestObjPrototypeFunctionMutablePointFunctionBody):
1333         (WebCore::jsTestObjPrototypeFunctionVariadicStringMethodBody):
1334         (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethodBody):
1335         (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethodBody):
1336         (WebCore::jsTestObjPrototypeFunctionVariadicUnionMethodBody):
1337         (WebCore::jsTestObjPrototypeFunctionAnyBody):
1338         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentBody):
1339         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentBody):
1340         (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Body):
1341         (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Body):
1342         (WebCore::jsTestObjPrototypeFunctionTestReturnsOwnPromiseAndPromiseProxyFunctionBody):
1343         (WebCore::jsTestObjPrototypeFunctionConditionalOverload1Body):
1344         (WebCore::jsTestObjPrototypeFunctionConditionalOverload2Body):
1345         (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload1Body):
1346         (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload2Body):
1347         (WebCore::jsTestObjPrototypeFunctionAttachShadowRootBody):
1348         (WebCore::jsTestObjPrototypeFunctionOperationWithExternalDictionaryParameterBody):
1349         (WebCore::jsTestObjPrototypeFunctionBufferSourceParameterBody):
1350         (WebCore::jsTestObjPrototypeFunctionLegacyCallerNamedBody):
1351         (WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationBody):
1352         (WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationWithExceptionBody):
1353         (WebCore::jsTestObjPrototypeFunctionToStringBody):
1354         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1355         (WebCore::constructJSTestOverloadedConstructors1):
1356         (WebCore::constructJSTestOverloadedConstructors2):
1357         (WebCore::constructJSTestOverloadedConstructors3):
1358         (WebCore::constructJSTestOverloadedConstructors4):
1359         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
1360         (WebCore::constructJSTestOverloadedConstructorsWithSequence1):
1361         (WebCore::constructJSTestOverloadedConstructorsWithSequence2):
1362         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
1363         (WebCore::jsTestOverrideBuiltinsPrototypeFunctionNamedItemBody):
1364         * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
1365         (WebCore::JSTestPromiseRejectionEventConstructor::construct):
1366         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1367         (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionFunctionBody):
1368         (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionFunctionReturningBody):
1369         * bindings/scripts/test/JS/JSTestStringifier.cpp:
1370         (WebCore::jsTestStringifierPrototypeFunctionToStringBody):
1371         * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
1372         (WebCore::jsTestStringifierAnonymousOperationPrototypeFunctionToStringBody):
1373         * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
1374         (WebCore::jsTestStringifierNamedOperationPrototypeFunctionIdentifierBody):
1375         (WebCore::jsTestStringifierNamedOperationPrototypeFunctionToStringBody):
1376         * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
1377         (WebCore::jsTestStringifierOperationImplementedAsPrototypeFunctionIdentifierBody):
1378         (WebCore::jsTestStringifierOperationImplementedAsPrototypeFunctionToStringBody):
1379         * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
1380         (WebCore::jsTestStringifierOperationNamedToStringPrototypeFunctionToStringBody):
1381         * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
1382         (WebCore::jsTestStringifierReadOnlyAttributePrototypeFunctionToStringBody):
1383         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
1384         (WebCore::jsTestStringifierReadWriteAttributePrototypeFunctionToStringBody):
1385         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1386         (WebCore::JSTestTypedefsConstructor::construct):
1387         (WebCore::jsTestTypedefsPrototypeFunctionFuncBody):
1388         (WebCore::jsTestTypedefsPrototypeFunctionSetShadowBody):
1389         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArgBody):
1390         (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceArgBody):
1391         (WebCore::jsTestTypedefsPrototypeFunctionSequenceOfNullablesArgBody):
1392         (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArgBody):
1393         (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceOfUnionsArgBody):
1394         (WebCore::jsTestTypedefsPrototypeFunctionUnionArgBody):
1395         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClampBody):
1396         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClampInTypedefBody):
1397         (WebCore::jsTestTypedefsPrototypeFunctionPointFunctionBody):
1398         (WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunctionBody):
1399         (WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunction2Body):
1400         (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresIncludeBody):
1401
1402 2020-03-24  Alex Christensen  <achristensen@webkit.org>
1403
1404         Add console message when legacy TLS is used
1405         https://bugs.webkit.org/show_bug.cgi?id=209444
1406
1407         Reviewed by Darin Adler.
1408
1409         * loader/ResourceLoader.cpp:
1410         (WebCore::ResourceLoader::didReceiveResponse):
1411         Indent less, add host to inspector, add release logging without host.
1412
1413 2020-03-24  Antoine Quint  <graouts@apple.com>
1414
1415         [Web Animations] Clean timeline headers up
1416         https://bugs.webkit.org/show_bug.cgi?id=209482
1417
1418         Reviewed by Antti Koivisto.
1419
1420         The AnimationTimeline::removeAnimationsForElement() method isn't used and DocumentTimeline::applyPendingAcceleratedAnimations()
1421         is only used internally in DocumentTimeline so it can be made private.
1422
1423         * animation/AnimationTimeline.cpp:
1424         (WebCore::AnimationTimeline::removeAnimationsForElement): Deleted.
1425         * animation/AnimationTimeline.h:
1426         * animation/DocumentTimeline.h:
1427
1428 2020-03-24  Antoine Quint  <graouts@apple.com>
1429
1430         [iOS+macOS Debug] ASSERTION FAILED: m_effects.isEmpty() in WebCore::KeyframeEffectStack::~KeyframeEffectStack()
1431         https://bugs.webkit.org/show_bug.cgi?id=208718
1432         <rdar://problem/59956433>
1433
1434         Reviewed by Darin Adler.
1435
1436         This assertion is only valid in the case where elements with relevant animations are still alive when the document is
1437         torn down. However, it's fine to have an Element be destroyed with a relevant animation while its document is still alive.
1438
1439         * animation/KeyframeEffectStack.cpp:
1440         (WebCore::KeyframeEffectStack::~KeyframeEffectStack):
1441
1442 2020-03-23  Simon Fraser  <simon.fraser@apple.com>
1443
1444         Safari jetsams with repeated drawImage/getImageData
1445         https://bugs.webkit.org/show_bug.cgi?id=207957
1446
1447         Reviewed by Tim Horton.
1448
1449         SubimageCacheWithTimer used a DeferrableOneShotTimer to clear itself, but if content
1450         adds an entry to the cache on every frame (as might content drawing video frames into a canvas)
1451         then the cache was never cleared. Nor was it cleared via a memory warning.
1452
1453         Fix by tracking cache entries by age, and using a repeating timer to prune old images
1454         from the cache. Also hook up the cache to the memory pressure handler, which clears it.
1455
1456         Reduce the timer frequency from 1s to 500ms, since that was observed to reduce the memory use
1457         on the provided testcase from ~600M to ~350M, making jetsam less likely.
1458
1459         Rename m_images to m_imageCounts to make its role clearer.
1460
1461         * page/cocoa/MemoryReleaseCocoa.mm:
1462         (WebCore::platformReleaseMemory):
1463         * platform/graphics/cg/SubimageCacheWithTimer.cpp:
1464         (WebCore::SubimageCacheWithTimer::clear):
1465         (WebCore::SubimageCacheAdder::translate):
1466         (WebCore::SubimageCacheWithTimer::SubimageCacheWithTimer):
1467         (WebCore::SubimageCacheWithTimer::pruneCacheTimerFired):
1468         (WebCore::SubimageCacheWithTimer::prune):
1469         (WebCore::SubimageCacheWithTimer::subimage):
1470         (WebCore::SubimageCacheWithTimer::clearImageAndSubimages):
1471         (WebCore::SubimageCacheWithTimer::clearAll):
1472         (WebCore::SubimageCacheWithTimer::invalidateCacheTimerFired): Deleted.
1473         * platform/graphics/cg/SubimageCacheWithTimer.h:
1474
1475 2020-03-23  Stephan Szabo  <stephan.szabo@sony.com>
1476
1477         [WinCairo][PlayStation] Failure to build with ENABLE_XSLT=OFF
1478         https://bugs.webkit.org/show_bug.cgi?id=209454
1479
1480         Reviewed by Ross Kirsling.
1481
1482         No new tests, build fix.
1483
1484         * xml/parser/XMLDocumentParserLibxml2.cpp:
1485
1486 2020-03-23  Zalan Bujtas  <zalan@apple.com>
1487
1488         becu.org: Placeholder text "Search" is cut off
1489         https://bugs.webkit.org/show_bug.cgi?id=209447
1490         <rdar://problem/45951728>
1491
1492         Reviewed by Simon Fraser.
1493
1494         'line-height: initial' ensures that that the placeholder text is visible and properly positioned when the input itself has
1495         incompatible values. This is also what Chrome has in their UA stylesheet.
1496
1497         Test: fast/forms/placeholder-content-line-height.html
1498
1499         * css/html.css:
1500         (input::placeholder):
1501
1502 2020-03-23  Simon Fraser  <simon.fraser@apple.com>
1503
1504         [mac-wk1] fast/scrolling/arrow-key-scroll-in-rtl-document.html is a flaky timeout
1505         https://bugs.webkit.org/show_bug.cgi?id=209427
1506
1507         Reviewed by Wenson Hsieh.
1508
1509         In WebKit1, arrow-key scrolls are instantaneous, so scrolling is complete before the test
1510         registers the 'monitor wheel events' callback. However, nothing triggers a subsequent rendering
1511         update, so the test never completes.
1512
1513         Fix by having WheelEventTestMonitor::setTestCallbackAndStartMonitoring() trigger a rendering
1514         update.
1515
1516         * page/WheelEventTestMonitor.cpp:
1517         (WebCore::WheelEventTestMonitor::setTestCallbackAndStartMonitoring):
1518
1519 2020-03-23  Zalan Bujtas  <zalan@apple.com>
1520
1521         [LFC] Layout::Box::initialContainingBlock() should return const InitialContainingBlock&
1522         https://bugs.webkit.org/show_bug.cgi?id=209406
1523         <rdar://problem/60749715>
1524
1525         Reviewed by Antti Koivisto.
1526
1527         Use is<InitialContainingBlock> where applicable.
1528
1529         * layout/FormattingContext.cpp:
1530         (WebCore::Layout::FormattingContext::geometryForBox const):
1531         (WebCore::Layout::FormattingContext::collectOutOfFlowDescendantsIfNeeded):
1532         * layout/FormattingContextQuirks.cpp:
1533         (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
1534         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
1535         * layout/displaytree/DisplayPainter.cpp:
1536         (WebCore::Display::absoluteDisplayBox):
1537         * layout/invalidation/InvalidationState.cpp:
1538         (WebCore::Layout::InvalidationState::markNeedsUpdate):
1539         * layout/layouttree/LayoutBox.cpp:
1540         (WebCore::Layout::Box::establishesBlockFormattingContext const):
1541         (WebCore::Layout::Box::containingBlock const):
1542         (WebCore::Layout::Box::formattingContextRoot const):
1543         (WebCore::Layout::Box::initialContainingBlock const):
1544         (WebCore::Layout::Box::isInFormattingContextOf const):
1545         (WebCore::Layout::Box::isOverflowVisible const):
1546         * layout/layouttree/LayoutBox.h:
1547         (WebCore::Layout::Box::isInitialContainingBlock const):
1548         (WebCore::Layout::Box::isInlineTextBox const):
1549         (WebCore::Layout::Box::isLineBreakBox const):
1550         (WebCore::Layout::Box::isReplacedBox const):
1551         * layout/layouttree/LayoutInitialContainingBlock.cpp:
1552         (WebCore::Layout::InitialContainingBlock::InitialContainingBlock):
1553         * layout/layouttree/LayoutInlineTextBox.cpp:
1554         (WebCore::Layout::InlineTextBox::InlineTextBox):
1555         * layout/layouttree/LayoutLineBreakBox.cpp:
1556         (WebCore::Layout::LineBreakBox::LineBreakBox):
1557         * layout/layouttree/LayoutReplacedBox.cpp:
1558         (WebCore::Layout::ReplacedBox::ReplacedBox):
1559         * layout/layouttree/LayoutTreeBuilder.cpp:
1560         (WebCore::Layout::outputLayoutBox):
1561
1562 2020-03-23  Justin Fan  <justin_fan@apple.com>
1563
1564         [ Mac wk2 Debug ] webgpu/whlsl/vector-compare.html is flaky crashing.
1565         https://bugs.webkit.org/show_bug.cgi?id=209024
1566
1567         Reviewed by Myles C. Maxfield.
1568
1569         Prevent GPUBindGroup destructor from accidentally dereferencing GPUBindGroupAllocator too many times
1570         if the owning GPUDevice has already been destroyed. A GPUBindGroupAllocator should reset whenever its
1571         spawned GPUBindGroups are all cleaned up. 
1572
1573         Covered by existing tests.
1574
1575         * platform/graphics/gpu/GPUBindGroupAllocator.h:
1576         * platform/graphics/gpu/cocoa/GPUBindGroupAllocatorMetal.mm:
1577         (WebCore::GPUBindGroupAllocator::allocateAndSetEncoders):
1578         (WebCore::GPUBindGroupAllocator::tryReset):
1579         * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
1580         (WebCore::GPUBindGroup::~GPUBindGroup):
1581
1582 2020-03-23  Wenson Hsieh  <wenson_hsieh@apple.com>
1583
1584         Remove the unused method PasteboardStrategy::uniqueName()
1585         https://bugs.webkit.org/show_bug.cgi?id=209452
1586
1587         Reviewed by Tim Horton.
1588
1589         This was introduced in <https://trac.webkit.org/r107844>, where it was used in the implementation of
1590         Editor::newGeneralClipboard. However, this was subsequently removed in <https://trac.webkit.org/r150351>.
1591
1592         No change in behavior.
1593
1594         * platform/PasteboardStrategy.h:
1595         * platform/PlatformPasteboard.h:
1596         * platform/ios/PlatformPasteboardIOS.mm:
1597         (WebCore::PlatformPasteboard::uniqueName): Deleted.
1598         * platform/mac/PlatformPasteboardMac.mm:
1599         (WebCore::PlatformPasteboard::uniqueName): Deleted.
1600
1601 2020-03-23  Alex Christensen  <achristensen@webkit.org>
1602
1603         Add console message when legacy TLS is used
1604         https://bugs.webkit.org/show_bug.cgi?id=209444
1605
1606         Reviewed by Darin Adler.
1607
1608         * loader/ResourceLoader.cpp:
1609         (WebCore::ResourceLoader::didReceiveResponse):
1610
1611 2020-03-23  John Wilander  <wilander@apple.com>
1612
1613         Add the capability to change all of a website's cookies to SameSite=Strict
1614         https://bugs.webkit.org/show_bug.cgi?id=209369
1615         <rdar://problem/60710690>
1616
1617         Reviewed by Alex Christensen and David Kilzer.
1618
1619         Test: http/tests/resourceLoadStatistics/set-all-cookies-to-same-site-strict.html
1620
1621         * platform/network/NetworkStorageSession.cpp:
1622         (WebCore::NetworkStorageSession::setAllCookiesToSameSiteStrict):
1623             Stub function for non-Cocoa platforms.
1624         * platform/network/NetworkStorageSession.h:
1625         * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
1626         (WebCore::NetworkStorageSession::setAllCookiesToSameSiteStrict):
1627         * testing/Internals.h:
1628             Added code to expose SameSite=None and path properties of cookies.
1629             However, they don't seem to carry over so I'll have to revisit the
1630             internal workings.
1631
1632 2020-03-23  Michael Catanzaro  <mcatanzaro@gnome.org>
1633
1634         [WPE][GTK] Allow distributors to brand user agent
1635         https://bugs.webkit.org/show_bug.cgi?id=162611
1636
1637         Unreviewed, un-break my previous commit.
1638
1639         * platform/glib/UserAgentGLib.cpp:
1640         (WebCore::standardUserAgent):
1641
1642 2020-03-23  Simon Fraser  <simon.fraser@apple.com>
1643
1644         [iOS WK2] compositing/overflow/dynamic-composited-scrolling-status.html asserts
1645         https://bugs.webkit.org/show_bug.cgi?id=209440
1646         <rdar://problem/60705261>
1647
1648         Reviewed by Wenson Hsieh.
1649
1650         nonFastScrollableRectsForTesting() needs to eagerly update event regions after r258528,
1651         as we do for touchEventRectsForEventForTesting().
1652
1653         Also renamed the function so it's clear that it's for testing only.
1654
1655         * page/Page.cpp:
1656         (WebCore::Page::nonFastScrollableRectsForTesting):
1657         (WebCore::Page::nonFastScrollableRects): Deleted.
1658         * page/Page.h:
1659         * testing/Internals.cpp:
1660         (WebCore::Internals::nonFastScrollableRects const):
1661
1662 2020-03-24  James Darpinian  <jdarpinian@chromium.org>
1663
1664         Set important EGL context attributes
1665         https://bugs.webkit.org/show_bug.cgi?id=208724
1666
1667         Reviewed by Dean Jackson.
1668
1669         Re-landing this change after r258875.
1670
1671         These EGL context attributes are important to make ANGLE's validation correct for
1672         WebGL contexts. ROBUST_RESOURCE_INITIALIZATION is especially important; the lack
1673         of it may be a root cause of some of the test flakiness we have seen. With this
1674         change WebKit's EGL context attributes now match Chromium's for ANGLE/WebGL
1675         contexts.
1676
1677         * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
1678         (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):
1679
1680 2020-03-23  Michael Catanzaro  <mcatanzaro@gnome.org>
1681
1682         [GTK] Allow distributors to brand user agent
1683         https://bugs.webkit.org/show_bug.cgi?id=162611
1684
1685         Reviewed by Adrian Perez de Castro.
1686
1687         * platform/glib/UserAgentGLib.cpp:
1688         (WebCore::buildUserAgentString):
1689
1690 2020-03-23  Dean Jackson  <dino@apple.com>
1691
1692         [WebGL] Skip vertexAttrib0 simulation when using ANGLE
1693         https://bugs.webkit.org/show_bug.cgi?id=209416
1694         <rdar://problem/60765734>
1695
1696         Reviewed by Antoine Quint.
1697
1698         When using ANGLE as a backend, we do not need to simulate a
1699         missing vertexAttrib0 at the WebGL layer, since ANGLE will
1700         handle it for us.
1701
1702         This causes a couple of tests to begin passing (they were marked as
1703         failures). It also allows us to re-land r258025, which was rolled
1704         out in r258226.
1705
1706         * html/canvas/WebGL2RenderingContext.cpp: Wrap any code that does vertexAttrib0
1707         simulation in a !USE(ANGLE).
1708         (WebCore::WebGL2RenderingContext::initializeVertexArrayObjects):
1709         * html/canvas/WebGLRenderingContext.cpp:
1710         (WebCore::WebGLRenderingContext::initializeVertexArrayObjects):
1711         * html/canvas/WebGLRenderingContextBase.cpp:
1712         (WebCore::WebGLRenderingContextBase::~WebGLRenderingContextBase):
1713         (WebCore::WebGLRenderingContextBase::disableVertexAttribArray):
1714         (WebCore::WebGLRenderingContextBase::validateDrawArrays):
1715         (WebCore::WebGLRenderingContextBase::validateDrawElements):
1716         (WebCore::WebGLRenderingContextBase::drawArrays):
1717         (WebCore::WebGLRenderingContextBase::drawElements):
1718         (WebCore::WebGLRenderingContextBase::getActiveUniform):
1719         (WebCore::WebGLRenderingContextBase::getVertexAttrib):
1720         (WebCore::WebGLRenderingContextBase::vertexAttribfImpl):
1721         (WebCore::WebGLRenderingContextBase::vertexAttribfvImpl):
1722         * html/canvas/WebGLRenderingContextBase.h:
1723         * html/canvas/WebGLVertexArrayObjectBase.cpp:
1724         (WebCore::WebGLVertexArrayObjectBase::unbindBuffer):
1725
1726 2020-03-23  Darin Adler  <darin@apple.com>
1727
1728         Change TextIterator::rangeLength to not require a live range
1729         https://bugs.webkit.org/show_bug.cgi?id=209207
1730
1731         Reviewed by Antti Koivisto.
1732
1733         - Renamed TextIterator::rangeLength to characterCount.
1734
1735         * accessibility/AXObjectCache.cpp:
1736         (WebCore::AXObjectCache::rangeMatchesTextNearRange): Use characterCount.
1737         (WebCore::resetNodeAndOffsetForReplacedNode): Ditto.
1738         (WebCore::AXObjectCache::nextCharacterOffset): Ditto.
1739         * accessibility/atk/AXObjectCacheAtk.cpp:
1740         (WebCore::AXObjectCache::nodeTextChangePlatformNotification): Ditto.
1741         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
1742         (rangeLengthForObject): Ditto.
1743         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1744         (-[WebAccessibilityObjectWrapper _convertToNSRange:]): Ditto.
1745
1746         * dom/SimpleRange.h: Export another constructor.
1747
1748         * editing/AlternativeTextController.cpp:
1749         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
1750         Use characterCount.
1751         * editing/ApplyStyleCommand.cpp:
1752         (WebCore::ApplyStyleCommand::applyBlockStyle): Ditto.
1753         * editing/CompositeEditCommand.cpp:
1754         (WebCore::CompositeEditCommand::moveParagraphs): Ditto.
1755         * editing/Editing.cpp:
1756         (WebCore::indexForVisiblePosition): Ditto.
1757         * editing/TextCheckingHelper.cpp:
1758         (WebCore::TextCheckingParagraph::rangeLength const): Ditto.
1759         (WebCore::TextCheckingParagraph::offsetTo const): Ditto.
1760         (WebCore::TextCheckingParagraph::checkingStart const): Ditto.
1761         (WebCore::TextCheckingParagraph::checkingEnd const): Ditto.
1762         (WebCore::TextCheckingParagraph::checkingLength const): Ditto.
1763         (WebCore::TextCheckingParagraph::automaticReplacementStart const): Ditto.
1764         (WebCore::TextCheckingParagraph::automaticReplacementLength const): Ditto.
1765         (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar): Ditto.
1766         (WebCore::TextCheckingHelper::isUngrammatical const): Ditto.
1767
1768         * editing/TextIterator.cpp:
1769         (WebCore::TextIterator::rangeLength): Deleted.
1770         (WebCore::characterCount): Like the baove but the argument is SimpleRange
1771         and return is CharacterCount. Even though each individual node is limited
1772         to 32-bit size, ranges covering multiple nodes could have a count of
1773         characters that exceeds 32 bits, so CharacterCount is size_t.
1774         (WebCore::TextIterator::getLocationAndLengthFromRange): Use characterCount.
1775
1776         * editing/TextIterator.h: Added characterCount function,
1777         CharacterCount and CharacterRange types. Removed TextIterator::rangeLength.
1778         Added FIXME comments about the next steps.
1779
1780         * editing/VisiblePosition.cpp:
1781         (WebCore::makeBoundaryPoint): Added.
1782         * editing/VisiblePosition.h: Added makeBoundaryPoint. Also removed
1783         extraneous forward declarations and moved some function bodies out of the
1784         class definition.
1785
1786         * editing/VisibleUnits.cpp:
1787         (WebCore::distanceBetweenPositions): Changed return type to ptrdiff_t.
1788         Use characterCount.
1789         * editing/VisibleUnits.h: Updated for the above.
1790
1791         * editing/cocoa/DataDetection.mm:
1792         (WebCore::detectItemAtPositionWithRange): Use characterCount.
1793         * editing/cocoa/DictionaryLookup.mm:
1794         (WebCore::DictionaryLookup::rangeForSelection): Ditto.
1795         (WebCore::DictionaryLookup::rangeAtHitTestResult): Ditto.
1796         * editing/ios/DictationCommandIOS.cpp:
1797         (WebCore::DictationCommandIOS::doApply): Ditto.
1798         * editing/mac/DictionaryLookupLegacy.mm:
1799         (WebCore::DictionaryLookup::rangeForSelection): Ditto.
1800         (WebCore::DictionaryLookup::rangeAtHitTestResult): Ditto.
1801         * page/EventHandler.cpp:
1802         (WebCore::textDistance): Ditto.
1803
1804 2020-03-23  youenn fablet  <youenn@apple.com>
1805
1806         Rename blankURL to aboutBlankURL
1807         https://bugs.webkit.org/show_bug.cgi?id=209344
1808
1809         Reviewed by Darin Adler.
1810
1811         No change of behavior.
1812
1813         * dom/Document.cpp:
1814         (WebCore::Document::setURL):
1815         (WebCore::Document::completeURL const):
1816         (WebCore::Document::ensureTemplateDocument):
1817         * dom/Document.h:
1818         (WebCore::Document::urlForBindings const):
1819         * dom/InlineStyleSheetOwner.cpp:
1820         (WebCore::parserContextForElement):
1821         * dom/Node.cpp:
1822         (WebCore::Node::baseURI const):
1823         * editing/cocoa/WebContentReaderCocoa.mm:
1824         (WebCore::WebContentReader::readWebArchive):
1825         * editing/markup.cpp:
1826         (WebCore::createFragmentFromMarkup):
1827         * html/DOMURL.cpp:
1828         (WebCore::DOMURL::create):
1829         * html/HTMLFrameElementBase.cpp:
1830         (WebCore::HTMLFrameElementBase::openURL):
1831         (WebCore::HTMLFrameElementBase::location const):
1832         * html/parser/XSSAuditor.cpp:
1833         (WebCore::XSSAuditor::filterScriptToken):
1834         (WebCore::XSSAuditor::filterObjectToken):
1835         (WebCore::XSSAuditor::filterParamToken):
1836         (WebCore::XSSAuditor::filterEmbedToken):
1837         (WebCore::XSSAuditor::filterFormToken):
1838         (WebCore::XSSAuditor::filterInputToken):
1839         (WebCore::XSSAuditor::filterButtonToken):
1840         (WebCore::XSSAuditor::isLikelySafeResource):
1841         * loader/DocumentLoader.cpp:
1842         (WebCore::DocumentLoader::maybeLoadEmpty):
1843         * loader/DocumentLoader.h:
1844         (WebCore::DocumentLoader::serverRedirectSourceForHistory const):
1845         * loader/FrameLoader.cpp:
1846         (WebCore::FrameLoader::loadWithDocumentLoader):
1847         * loader/HistoryController.cpp:
1848         (WebCore::HistoryController::currentItemShouldBeReplaced const):
1849         (WebCore::HistoryController::initializeItem):
1850         * loader/SubframeLoader.cpp:
1851         (WebCore::SubframeLoader::requestFrame):
1852         * loader/archive/cf/LegacyWebArchive.cpp:
1853         (WebCore::LegacyWebArchive::createFromSelection):
1854         * page/Location.cpp:
1855         (WebCore::Location::url const):
1856         * page/SecurityPolicy.cpp:
1857         (WebCore::SecurityPolicy::shouldInheritSecurityOriginFromOwner):
1858         * platform/win/ClipboardUtilitiesWin.cpp:
1859         (WebCore::markupToCFHTML):
1860         * svg/SVGImageLoader.cpp:
1861         (WebCore::SVGImageLoader::sourceURI const):
1862
1863 2020-03-23  youenn fablet  <youenn@apple.com>
1864
1865         Remove DOMCache::m_records
1866         https://bugs.webkit.org/show_bug.cgi?id=209425
1867
1868         Reviewed by Alex Christensen.
1869
1870         We do not need to keep references of FetchRequest and FetchResponse since we clone them before exposing them.
1871         For that reason, remove m_records and directly use records given from the CacheStorageConnection.
1872         Minor refactoring to modernize/improve code readability.
1873
1874         This is a first step towards a future refactoring that will reduce the sending of records from network process to web process
1875         based on the request parameters: record filtering will be done in network process instead of web process.
1876
1877         No change of behavior.
1878
1879         * Modules/cache/DOMCache.cpp:
1880         (WebCore::createResponse):
1881         (WebCore::DOMCache::doMatch):
1882         (WebCore::DOMCache::cloneResponses):
1883         (WebCore::DOMCache::matchAll):
1884         (WebCore::createRequest):
1885         (WebCore::DOMCache::keys):
1886         (WebCore::DOMCache::retrieveRecords):
1887         (WebCore::DOMCache::queryCache):
1888         (WebCore::DOMCache::queryCacheWithTargetStorage):
1889         (WebCore::DOMCache::batchDeleteOperation):
1890         (WebCore::DOMCache::batchPutOperation):
1891         (WebCore::copyRequestRef): Deleted.
1892         (WebCore::queryCacheMatch): Deleted.
1893         (WebCore::DOMCache::updateRecords): Deleted.
1894         * Modules/cache/DOMCache.h:
1895
1896 2020-03-23  Rob Buis  <rbuis@igalia.com>
1897
1898         XMLHttpRequest: getAllResponseHeaders() sorting
1899         https://bugs.webkit.org/show_bug.cgi?id=200565
1900
1901         Reviewed by Darin Adler.
1902
1903         Sort headers using the ASCII-uppercase header name as key but use ASCII-lowercase header
1904         names in the string result.
1905
1906         Nehavior matches Firefox and Chrome.
1907
1908         Test: imported/web-platform-tests/xhr/getallresponseheaders.htm
1909
1910         [1] https://xhr.spec.whatwg.org/#dom-xmlhttprequest-getallresponseheaders
1911
1912         * xml/XMLHttpRequest.cpp:
1913         (WebCore::XMLHttpRequest::getAllResponseHeaders const):
1914
1915 2020-03-23  Truitt Savell  <tsavell@apple.com>
1916
1917         Unreviewed, reverting r258847.
1918
1919         Broke testing on Mac Debug with an Assert
1920
1921         Reverted changeset:
1922
1923         "[LFC] Layout::Box::initialContainingBlock() should return
1924         const InitialContainingBlock&"
1925         https://bugs.webkit.org/show_bug.cgi?id=209406
1926         https://trac.webkit.org/changeset/258847
1927
1928 2020-03-23  Kate Cheney  <katherine_cheney@apple.com>
1929
1930         Add checks for app-bound navigations when evaluating user style sheets
1931         https://bugs.webkit.org/show_bug.cgi?id=209368
1932         <rdar://problem/60204230>
1933
1934         Reviewed by Brent Fulgham.
1935
1936         * page/Page.cpp:
1937         (WebCore::Page::injectUserStyleSheet):
1938         If the style sheet is for a specific WebView, it will have a pageID
1939         and we can check for app-bound navigation in the page object.
1940
1941         * style/StyleScopeRuleSets.cpp:
1942         (WebCore::Style::ScopeRuleSets::initializeUserStyle):
1943         If the user style sheet is being applied to all WebViews, we can check for 
1944         for a page's existence and navigation state here before the style sheet is
1945         updated.
1946
1947 2020-03-23  Antoine Quint  <graouts@apple.com>
1948
1949         DocumentTimeline / CSSTransition objects are leaking on CNN.com
1950         https://bugs.webkit.org/show_bug.cgi?id=208069
1951         <rdar://problem/59680143>
1952
1953         Reviewed by Darin Adler.
1954
1955         Integrating post-commit review feedback from Darin. 
1956
1957         * testing/Internals.cpp:
1958         (WebCore::Internals::animationWithIdExists const):
1959
1960 2020-03-23  Chris Dumez  <cdumez@apple.com>
1961
1962         Port window.postMessage to the HTML event loop
1963         https://bugs.webkit.org/show_bug.cgi?id=209359
1964
1965         Reviewed by Alex Christensen.
1966
1967         Port window.postMessage to the HTML event loop instead of using a 0-timer.
1968
1969         * inspector/InspectorInstrumentation.cpp:
1970         (WebCore::InspectorInstrumentation::willPostMessageImpl):
1971         (WebCore::InspectorInstrumentation::didPostMessageImpl):
1972         (WebCore::InspectorInstrumentation::didFailPostMessageImpl):
1973         (WebCore::InspectorInstrumentation::willDispatchPostMessageImpl):
1974         (WebCore::InspectorInstrumentation::didDispatchPostMessageImpl):
1975         * inspector/InspectorInstrumentation.h:
1976         (WebCore::InspectorInstrumentation::willPostMessage):
1977         (WebCore::InspectorInstrumentation::didPostMessage):
1978         (WebCore::InspectorInstrumentation::didFailPostMessage):
1979         (WebCore::InspectorInstrumentation::willDispatchPostMessage):
1980         (WebCore::InspectorInstrumentation::didDispatchPostMessage):
1981         * inspector/agents/WebDebuggerAgent.cpp:
1982         (WebCore::WebDebuggerAgent::willPostMessage):
1983         (WebCore::WebDebuggerAgent::didPostMessage):
1984         (WebCore::WebDebuggerAgent::didFailPostMessage):
1985         (WebCore::WebDebuggerAgent::willDispatchPostMessage):
1986         (WebCore::WebDebuggerAgent::didDispatchPostMessage):
1987         (WebCore::WebDebuggerAgent::didClearAsyncStackTraceData):
1988         * inspector/agents/WebDebuggerAgent.h:
1989         * page/DOMWindow.cpp:
1990         (WebCore::DOMWindow::postMessage):
1991         (WebCore::PostMessageTimer::PostMessageTimer): Deleted.
1992         (WebCore::PostMessageTimer::event): Deleted.
1993         (WebCore::PostMessageTimer::targetOrigin const): Deleted.
1994         (WebCore::PostMessageTimer::stackTrace const): Deleted.
1995         (WebCore::DOMWindow::postMessageTimerFired): Deleted.
1996         * page/DOMWindow.h:
1997
1998 2020-03-23  Zalan Bujtas  <zalan@apple.com>
1999
2000         [LFC] Layout::Box::initialContainingBlock() should return const InitialContainingBlock&
2001         https://bugs.webkit.org/show_bug.cgi?id=209406
2002         <rdar://problem/60749715>
2003
2004         Reviewed by Antti Koivisto.
2005
2006         Use is<InitialContainingBlock> where applicable.
2007
2008         * layout/FormattingContext.cpp:
2009         (WebCore::Layout::FormattingContext::geometryForBox const):
2010         (WebCore::Layout::FormattingContext::collectOutOfFlowDescendantsIfNeeded):
2011         * layout/FormattingContextQuirks.cpp:
2012         (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
2013         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
2014         * layout/displaytree/DisplayPainter.cpp:
2015         (WebCore::Display::absoluteDisplayBox):
2016         * layout/invalidation/InvalidationState.cpp:
2017         (WebCore::Layout::InvalidationState::markNeedsUpdate):
2018         * layout/layouttree/LayoutBox.cpp:
2019         (WebCore::Layout::Box::establishesBlockFormattingContext const):
2020         (WebCore::Layout::Box::containingBlock const):
2021         (WebCore::Layout::Box::formattingContextRoot const):
2022         (WebCore::Layout::Box::initialContainingBlock const):
2023         (WebCore::Layout::Box::isInFormattingContextOf const):
2024         (WebCore::Layout::Box::isOverflowVisible const):
2025         * layout/layouttree/LayoutBox.h:
2026         (WebCore::Layout::Box::isInitialContainingBlock const):
2027         (WebCore::Layout::Box::isInlineTextBox const):
2028         (WebCore::Layout::Box::isLineBreakBox const):
2029         (WebCore::Layout::Box::isReplacedBox const):
2030         * layout/layouttree/LayoutInitialContainingBlock.cpp:
2031         (WebCore::Layout::InitialContainingBlock::InitialContainingBlock):
2032         * layout/layouttree/LayoutInlineTextBox.cpp:
2033         (WebCore::Layout::InlineTextBox::InlineTextBox):
2034         * layout/layouttree/LayoutLineBreakBox.cpp:
2035         (WebCore::Layout::LineBreakBox::LineBreakBox):
2036         * layout/layouttree/LayoutReplacedBox.cpp:
2037         (WebCore::Layout::ReplacedBox::ReplacedBox):
2038         * layout/layouttree/LayoutTreeBuilder.cpp:
2039         (WebCore::Layout::outputLayoutBox):
2040
2041 2020-03-23  Jer Noble  <jer.noble@apple.com>
2042
2043         [MSE] Handle the case where AVStreamDataParser packages sync and non-sync samples together in a CMSampleBufferRef.
2044         https://bugs.webkit.org/show_bug.cgi?id=209365
2045         <rdar://problem/60625209>
2046
2047         Reviewed by Eric Carlson.
2048
2049         AVStreamDataParser will package together muliple samples into a single CMSampleBufferRef for efficiency's sake. When
2050         this occurs, it may include sync and non-sync samples together into the same CMSampleBufferRef, which is problematic
2051         as we consider a CMSampleBufferRef to be "sync" only when every sample inside the buffer is also sync.
2052
2053         To handle this scenario, when receiving a CMSampleBufferRef from AVStreamDataParser, first check whether that buffer
2054         is "homogeneous", meaning every sample within the buffer has the same effective MediaSample flags. Then, if the buffer
2055         is not homogenous, break the buffer into muliple homogenious CMSampleBufferRefs. Then, each of those resulting buffers
2056         is passed up to SourceBuffer as a MediaSample individually.
2057
2058         * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
2059         * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
2060         (WebCore::isCMSampleBufferAttachmentRandomAccess):
2061         (WebCore::isCMSampleBufferRandomAccess):
2062         (WebCore::isCMSampleBufferAttachmentNonDisplaying):
2063         (WebCore::isCMSampleBufferNonDisplaying):
2064         (WebCore::MediaSampleAVFObjC::flags const):
2065         (WebCore::MediaSampleAVFObjC::isHomogeneous const):
2066         (WebCore::MediaSampleAVFObjC::divideIntoHomogeneousSamples):
2067         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2068         (WebCore::SourceBufferPrivateAVFObjC::processCodedFrame):
2069
2070 2020-03-23  Alicia Boya García  <aboya@igalia.com>
2071
2072         [MSE][GStreamer] Clean and explain first sample PTS hack
2073         https://bugs.webkit.org/show_bug.cgi?id=209335
2074
2075         Reviewed by Philippe Normand.
2076
2077         MediaSample::applyPtsOffset() had a rather confusing name, so it has
2078         been changed to something more descriptive of its actual function:
2079         extendToTheBeginning().
2080
2081         Also, its only argument has been removed, as it's always zero.
2082
2083         An explanation of the hack has also been added.
2084
2085         This patch introduces no behavior changes.
2086
2087         * platform/graphics/gstreamer/MediaSampleGStreamer.cpp:
2088         (WebCore::MediaSampleGStreamer::extendToTheBeginning):
2089         (WebCore::MediaSampleGStreamer::applyPtsOffset): Deleted.
2090         * platform/graphics/gstreamer/MediaSampleGStreamer.h:
2091         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
2092         (WebCore::AppendPipeline::appsinkNewSample):
2093
2094 2020-03-23  Zalan Bujtas  <zalan@apple.com>
2095
2096         [LFC] Remove unused LayoutAncestorIterator class
2097         https://bugs.webkit.org/show_bug.cgi?id=209401
2098         <rdar://problem/60743144>
2099
2100         Reviewed by Sam Weinig.
2101
2102         * WebCore.xcodeproj/project.pbxproj:
2103         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2104         * layout/displaytree/DisplayPainter.cpp:
2105         * layout/layouttree/LayoutAncestorIterator.h: Removed.
2106         * layout/layouttree/LayoutChildIterator.h:
2107         (WebCore::Layout::LayoutChildIteratorAdapter<T>::last const): Deleted.
2108         * layout/layouttree/LayoutIterator.h:
2109         (WebCore::Layout::LayoutBoxTraversal::nextSkippingChildren): Deleted.
2110         (WebCore::Layout::Traversal::lastChild): Deleted.
2111         (WebCore::Layout::Traversal::previousSibling): Deleted.
2112         (WebCore::Layout::Traversal::findAncestorOfType): Deleted.
2113         (WebCore::Layout::LayoutIterator<T>::traversePreviousSibling): Deleted.
2114         (WebCore::Layout::LayoutIterator<T>::traverseAncestor): Deleted.
2115         * layout/layouttree/LayoutTreeBuilder.cpp:
2116
2117 2020-03-23  Antoine Quint  <graouts@apple.com>
2118
2119         [Web Animations] Refactor cancelDeclarativeAnimationsForElement and willDestroyRendererForElement on AnimationTimeline
2120         https://bugs.webkit.org/show_bug.cgi?id=209423
2121
2122         Reviewed by Antti Koivisto.
2123
2124         The methods cancelDeclarativeAnimationsForElement and willDestroyRendererForElement on AnimationTimeline did the same
2125         thing save for the argument passed to WebAnimation::cancel(). We now refactor those two methods into a single
2126         cancelDeclarativeAnimationsForElement method with an argument to set whether cancelation should be silent.
2127         As a result, we also change WebAnimation::cancel() to have a single flavor instead of one without an argument and one
2128         with the silent argument.
2129
2130         No test because there is no change in visible behavior.
2131
2132         * animation/AnimationTimeline.cpp:
2133         (WebCore::AnimationTimeline::elementWasRemoved):
2134         (WebCore::AnimationTimeline::cancelDeclarativeAnimationsForElement):
2135         (WebCore::AnimationTimeline::willDestroyRendererForElement): Deleted.
2136         * animation/AnimationTimeline.h:
2137         * animation/DeclarativeAnimation.cpp:
2138         (WebCore::DeclarativeAnimation::cancel):
2139         * animation/DeclarativeAnimation.h:
2140         * animation/WebAnimation.cpp:
2141         * animation/WebAnimation.h:
2142         * rendering/updating/RenderTreeUpdater.cpp:
2143         (WebCore::RenderTreeUpdater::tearDownRenderers):
2144
2145 2020-03-23  Youenn Fablet  <youenn@apple.com>
2146
2147         AudioTrackPrivateMediaStream recovers from a muted track very late
2148         https://bugs.webkit.org/show_bug.cgi?id=209411
2149
2150         Reviewed by Eric Carlson.
2151
2152         In case of a muted track, the AudioSampleDataSource is not pushed any new sample.
2153         When unmuting the tracks, pulled samples will be zeroes for some time until the newly pushed samples are used.
2154         To fix this, we pause the audio player whenever muted/disabled/ended and restart playing when unmuted/enabled.
2155         Manually tested.
2156
2157         * platform/mediastream/AudioTrackPrivateMediaStream.cpp:
2158         (WebCore::AudioTrackPrivateMediaStream::updateRendererMutedState):
2159
2160 2020-03-23  Youenn Fablet  <youenn@apple.com>
2161
2162         AudioMediaStreamTrackRendererCocoa does not recover from AudioSession interruption
2163         https://bugs.webkit.org/show_bug.cgi?id=209412
2164
2165         Reviewed by Eric Carlson.
2166
2167         In case there is an AudioSession interruption, like the app is in the background
2168         and another app starts to play audio, AudioMediaStreamTrackRendererCocoa will not restart playing audio.
2169         Fix this by clearing the AudioUnit when starting since the renderer is paused during the interruption.
2170         This ensures resuming from the interruption in a clean state.
2171
2172         Manually tested.
2173
2174         * platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp:
2175         (WebCore::AudioMediaStreamTrackRendererCocoa::start):
2176
2177 2020-03-23  youenn fablet  <youenn@apple.com>
2178
2179         MediaDevices::refreshDevices should take device type into account
2180         https://bugs.webkit.org/show_bug.cgi?id=209417
2181         <rdar://problem/60521332>
2182
2183         Reviewed by Eric Carlson.
2184
2185         Now that we set deviceId to the empty string when media capture is not granted,
2186         we can have two devices with the same ID. We also need to handle the device type.
2187
2188         * Modules/mediastream/MediaDevices.cpp:
2189         (WebCore::MediaDevices::refreshDevices):
2190
2191 2020-03-23  Zalan Bujtas  <zalan@apple.com>
2192
2193         [LFC] Box::establishesBlockFormattingContext should check isInitialContainingBlock
2194         https://bugs.webkit.org/show_bug.cgi?id=209390
2195         <rdar://problem/60735021>
2196
2197         Reviewed by Antti Koivisto.
2198
2199         It's more correct to call isInitialContainingBlock() to check if the current box is the ICB.
2200
2201         * layout/layouttree/LayoutBox.cpp:
2202         (WebCore::Layout::Box::establishesBlockFormattingContext const):
2203         (WebCore::Layout::Box::initialContainingBlock const):
2204
2205 2020-03-23  Antoine Quint  <graouts@apple.com>
2206
2207         [Web Animations] ElementAnimationRareData is created too frequently
2208         https://bugs.webkit.org/show_bug.cgi?id=209415
2209
2210         Reviewed by Antti Koivisto.
2211
2212         The various accessors on Element to access transitions and animations will ensure there is a backing
2213         ElementAnimationRareData object. However, in a lot of cases, such as when we consider whether CSS
2214         Transitions should be created, updated or removed under AnimationTimeline::updateCSSTransitionsForElement(),
2215         we end up not needing to actually access the data structures on ElementAnimationRareData.
2216
2217         We now make the various methods on Element to access transitions and animations `const T*` and add ensure*()
2218         methods to access the collections for modification. We also add methods to query whether there are running or
2219         completed transitions at all or for a given property.
2220
2221         No test because there is no change in visible behavior.
2222
2223         * animation/AnimationTimeline.cpp:
2224         (WebCore::AnimationTimeline::animationWasAddedToElement):
2225         (WebCore::AnimationTimeline::animationWasRemovedFromElement):
2226         (WebCore::AnimationTimeline::removeDeclarativeAnimationFromListsForOwningElement):
2227         (WebCore::AnimationTimeline::animationsForElement const):
2228         (WebCore::AnimationTimeline::willDestroyRendererForElement):
2229         (WebCore::AnimationTimeline::cancelDeclarativeAnimationsForElement):
2230         (WebCore::AnimationTimeline::updateCSSTransitionsForElementAndProperty):
2231         (WebCore::AnimationTimeline::updateCSSTransitionsForElement):
2232         * animation/AnimationTimeline.h:
2233         * animation/DocumentTimeline.cpp:
2234         (WebCore::DocumentTimeline::transitionDidComplete):
2235         * dom/Element.cpp:
2236         (WebCore::Element::webAnimations const):
2237         (WebCore::Element::cssAnimations const):
2238         (WebCore::Element::transitions const):
2239         (WebCore::Element::hasCompletedTransitionsForProperty const):
2240         (WebCore::Element::hasRunningTransitionsForProperty const):
2241         (WebCore::Element::hasRunningTransitions const):
2242         (WebCore::Element::ensureWebAnimations):
2243         (WebCore::Element::ensureCSSAnimations):
2244         (WebCore::Element::ensureTransitions):
2245         (WebCore::Element::ensureCompletedTransitionsByProperty):
2246         (WebCore::Element::ensureRunningTransitionsByProperty):
2247         (WebCore::Element::webAnimations): Deleted.
2248         (WebCore::Element::cssAnimations): Deleted.
2249         (WebCore::Element::transitions): Deleted.
2250         (WebCore::Element::completedTransitionsByProperty): Deleted.
2251         (WebCore::Element::runningTransitionsByProperty): Deleted.
2252         * dom/Element.h:
2253
2254 2020-03-23  Charlie Turner  <cturner@igalia.com>
2255
2256         [GStreamer] Fail gracefully in the absence of a WebVTT encoder.
2257         https://bugs.webkit.org/show_bug.cgi?id=209290
2258
2259         Reviewed by Philippe Normand.
2260
2261         Covered by existing tests.
2262
2263         * platform/graphics/gstreamer/GStreamerCommon.cpp:
2264         (WebCore::initializeGStreamer): Gets rid of "plugin not found"
2265         errors. It's not an error to have potentially broken AAC decoders,
2266         but it's nice to give a clear warning.
2267         * platform/graphics/gstreamer/TextCombinerGStreamer.cpp:
2268         (webkit_text_combiner_class_init):
2269         (webkitTextCombinerNew): Check for the "subenc" *plugin*. This
2270         check indirectly tells us the "webvttenc" *element* will exist.
2271
2272 2020-03-23  Carlos Garcia Campos  <cgarcia@igalia.com>
2273
2274         [WPE] AsyncScrolling: horizontal scrolling is inverted
2275         https://bugs.webkit.org/show_bug.cgi?id=208638
2276
2277         Reviewed by Adrian Perez de Castro.
2278
2279         Scrolling down should scroll to the right and up to the left..
2280
2281         * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:
2282         (WebCore::ScrollingTreeFrameScrollingNodeNicosia::handleWheelEvent): Invert also the x axis.
2283         * page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:
2284         (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::handleWheelEvent): Ditto.
2285
2286 2020-03-23  Antoine Quint  <graouts@apple.com>
2287
2288         [Web Animations] Fix the typo for ElementAnimationRareData::completedTransitionByProperty()
2289         https://bugs.webkit.org/show_bug.cgi?id=209413
2290
2291         Reviewed by Antti Koivisto.
2292
2293         There can be several completed transitions by property, so renaming this property to completedTransitionsByProperty.
2294
2295         * animation/AnimationTimeline.cpp:
2296         (WebCore::AnimationTimeline::removeDeclarativeAnimationFromListsForOwningElement):
2297         (WebCore::AnimationTimeline::updateCSSTransitionsForElement):
2298         * animation/DocumentTimeline.cpp:
2299         (WebCore::DocumentTimeline::transitionDidComplete):
2300         * animation/ElementAnimationRareData.h:
2301         (WebCore::ElementAnimationRareData::completedTransitionsByProperty):
2302         (WebCore::ElementAnimationRareData::completedTransitionByProperty): Deleted.
2303         * dom/Element.cpp:
2304         (WebCore::Element::completedTransitionsByProperty):
2305         (WebCore::Element::completedTransitionByProperty): Deleted.
2306         * dom/Element.h:
2307
2308 2020-03-22  Antoine Quint  <graouts@apple.com>
2309
2310         DocumentTimeline / CSSTransition objects are leaking on CNN.com
2311         https://bugs.webkit.org/show_bug.cgi?id=208069
2312         <rdar://problem/59680143>
2313
2314         Reviewed by Simon Fraser, Geoffrey Garen and Darin Adler.
2315
2316         Test: webanimations/leak-css-animation.html
2317
2318         We add a test feature that lets use query the availability of a given WebAnimation by its "id" property in the WebAnimation::instances list.
2319         We also fix some build issues that appeared with a change in UnifiedSources order.
2320
2321         * animation/ElementAnimationRareData.cpp:
2322         (WebCore::ElementAnimationRareData::setAnimationsCreatedByMarkup):
2323         * animation/ElementAnimationRareData.h:
2324         (WebCore::ElementAnimationRareData::setAnimationsCreatedByMarkup): Deleted.
2325         * animation/WebAnimation.h:
2326         * testing/Internals.cpp:
2327         (WebCore::Internals::animationWithIdExists const):
2328         * testing/Internals.h:
2329         * testing/Internals.idl:
2330
2331 2020-03-22  Antoine Quint  <graouts@apple.com>
2332
2333         [ Mac ] imported/w3c/web-platform-tests/web-animations/timing-model/timelines/update-and-send-events-replacement.html is flaky failing.
2334         https://bugs.webkit.org/show_bug.cgi?id=209239
2335         <rdar://problem/60591358>
2336
2337         Reviewed by Simon Fraser.
2338
2339         This test was made flaky by r257417, the initial fix for webkit.org/b/208069. A new, appropriate fix for that bug is in the works. In the
2340         meantime we revert r257417 in this patch.
2341
2342         The reason this test became flaky is that it features the following code:
2343
2344             animB.timeline = new DocumentTimeline({
2345               originTime:
2346                 document.timeline.currentTime - 100 * MS_PER_SEC - animB.startTime,
2347             });
2348
2349         In this case the only reference to the created DocumentTimeline is through `animB.timeline`. But because r257417 made the timeline reference from
2350         WebAnimation a weak reference, in some cases, if GC kicks in, the timeline would be dereferenced and the test would fail. We restore that relationship
2351         to its previous state, which is a strong reference.
2352
2353         * animation/WebAnimation.cpp:
2354         (WebCore::WebAnimation::setTimeline):
2355         (WebCore::WebAnimation::setTimelineInternal):
2356         (WebCore::WebAnimation::enqueueAnimationEvent):
2357         (WebCore::WebAnimation::acceleratedStateDidChange):
2358         (WebCore::WebAnimation::timeline const): Deleted.
2359         * animation/WebAnimation.h:
2360         (WebCore::WebAnimation::timeline const):
2361
2362 2020-03-22  Zalan Bujtas  <zalan@apple.com>
2363
2364         [LFC] Introduce InitialContainingBox class
2365         https://bugs.webkit.org/show_bug.cgi?id=209399
2366         <rdar://problem/60741767>
2367
2368         Reviewed by Antti Koivisto.
2369
2370         ICB is the top level containing block. This helps to make sure we don't accidentally call parent() on the ICB.
2371         This is also a preparation for "const Box& Layout::Box::parent()".
2372
2373         * Sources.txt:
2374         * WebCore.xcodeproj/project.pbxproj:
2375         * layout/integration/LayoutIntegrationBoxTree.cpp:
2376         (WebCore::LayoutIntegration::BoxTree::BoxTree):
2377         (): Deleted.
2378         * layout/integration/LayoutIntegrationBoxTree.h:
2379         (WebCore::LayoutIntegration::BoxTree::rootLayoutBox const):
2380         (WebCore::LayoutIntegration::BoxTree::rootLayoutBox):
2381         * layout/layouttree/LayoutBox.cpp:
2382         (WebCore::Layout::Box::isInitialContainingBlock const): Deleted.
2383         * layout/layouttree/LayoutBox.h:
2384         (WebCore::Layout::Box::isInitialContainingBlock const):
2385         * layout/layouttree/LayoutContainerBox.h:
2386         * layout/layouttree/LayoutTreeBuilder.cpp:
2387         (WebCore::Layout::TreeBuilder::buildLayoutTree):
2388
2389 2020-03-22  Zalan Bujtas  <zalan@apple.com>
2390
2391         [LFC] Layout::Box::containingBlock should return a const ContainerBox&
2392         https://bugs.webkit.org/show_bug.cgi?id=209381
2393         <rdar://problem/60732278>
2394
2395         Reviewed by Antti Koivisto.
2396
2397         Layout tree is immutable during layout, so every box should be able to return a valid containing block (except the ICB).
2398         (This patch also removes the unused isDescendantOf() function and renames isDescendantOfFormattingRoot to isInFormattingContextOf).
2399
2400         * layout/FormattingContext.cpp:
2401         (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
2402         (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
2403         * layout/FormattingContextGeometry.cpp:
2404         (WebCore::Layout::isHeightAuto):
2405         (WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
2406         (WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
2407         (WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):
2408         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
2409         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
2410         (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):
2411         * layout/FormattingContextQuirks.cpp:
2412         (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
2413         * layout/Verification.cpp:
2414         (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
2415         * layout/blockformatting/BlockFormattingContext.cpp:
2416         (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
2417         (WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider):
2418         (WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForAncestors):
2419         (WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForBoxAndAncestors):
2420         (WebCore::Layout::BlockFormattingContext::verticalPositionWithMargin const):
2421         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2422         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
2423         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
2424         (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
2425         (WebCore::Layout::initialContainingBlock): Deleted.
2426         * layout/blockformatting/BlockMarginCollapse.cpp:
2427         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough const):
2428         * layout/blockformatting/PrecomputedBlockMarginCollapse.cpp:
2429         (WebCore::Layout::BlockFormattingContext::MarginCollapse::precomputedPositiveNegativeValues const):
2430         * layout/displaytree/DisplayPainter.cpp:
2431         (WebCore::Display::absoluteDisplayBox):
2432         * layout/floats/FloatingContext.cpp:
2433         (WebCore::Layout::FloatingContext::verticalPositionWithClearance const):
2434         (WebCore::Layout::FloatingContext::absoluteDisplayBoxCoordinates const):
2435         (WebCore::Layout::FloatingContext::mapToFloatingStateRoot const):
2436         (WebCore::Layout::FloatingContext::mapTopToFloatingStateRoot const):
2437         (WebCore::Layout::FloatingContext::mapPointFromFormattingContextRootToFloatingStateRoot const):
2438         * layout/floats/FloatingState.cpp:
2439         (WebCore::Layout::FloatingState::bottom const):
2440         (WebCore::Layout::FloatingState::top const):
2441         * layout/floats/FloatingState.h:
2442         (WebCore::Layout::FloatingState::FloatItem::isInFormattingContextOf const):
2443         (WebCore::Layout::FloatingState::FloatItem::isDescendantOfFormattingRoot const): Deleted.
2444         * layout/layouttree/LayoutBox.cpp:
2445         (WebCore::Layout::Box::containingBlock const):
2446         (WebCore::Layout::Box::formattingContextRoot const):
2447         (WebCore::Layout::Box::isInFormattingContextOf const):
2448         (WebCore::Layout::Box::isDescendantOf const): Deleted.
2449         (WebCore::Layout::Box::isContainingBlockDescendantOf const): Deleted.
2450         * layout/layouttree/LayoutBox.h:
2451
2452 2020-03-21  Said Abou-Hallawa  <sabouhallawa@apple.com>
2453
2454         An animated PNG plays the frames one time more than the image loopCount
2455         https://bugs.webkit.org/show_bug.cgi?id=205640
2456
2457         Reviewed by Darin Adler.
2458
2459         Make the repetitionCount calculation for GIFs different from it for other
2460         image formats.
2461
2462         Tests: fast/images/animated-gif-loop-count.html
2463                fast/images/animated-png-loop-count.html
2464
2465         * platform/graphics/cg/ImageDecoderCG.cpp:
2466         (WebCore::ImageDecoderCG::repetitionCount const):
2467         * platform/graphics/cg/UTIRegistry.cpp:
2468         (WebCore::isGIFImageType):
2469         * platform/graphics/cg/UTIRegistry.h:
2470
2471 2020-03-21  Jack Lee  <shihchieh_lee@apple.com>
2472
2473         Nullptr crash in RenderObject::RenderObjectBitfields::isBox when current renderer is the RenderView
2474         https://bugs.webkit.org/show_bug.cgi?id=209251
2475         <rdar://problem/60103614>
2476
2477         Reviewed by Darin Adler.
2478
2479         In this case, which is a valid scenario, we are looking for sibling of an AccessibilityRenderObject through the parent of its renderer, which happens to be of <RenderView>. Since <RenderView> has no parent, we need to skip calling isInlineWithContinuation with a null parent, by adding null check.
2480
2481         Test: fast/frames/iframe-empty-doc-crash.html
2482
2483         * accessibility/AccessibilityRenderObject.cpp:
2484         (WebCore::AccessibilityRenderObject::nextSibling const):
2485
2486 2020-03-21  Philippe Normand  <pnormand@igalia.com>
2487
2488         Make the MediaSample::toJSONString method generic
2489         https://bugs.webkit.org/show_bug.cgi?id=209287
2490
2491         Reviewed by Eric Carlson.
2492
2493         It is generic and thus can be shared to sub-classes.
2494
2495         * platform/MediaSample.h:
2496         (WebCore::MediaSample::toJSONString const):
2497         * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
2498         * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
2499
2500 2020-03-21  Zalan Bujtas  <zalan@apple.com>
2501
2502         telerik.com: Placeholder text is misaligned in search text box
2503         https://bugs.webkit.org/show_bug.cgi?id=209371
2504         <rdar://problem/45945564>
2505
2506         Reviewed by Antti Koivisto.
2507
2508         Let the placeholder box do its own vertical positioning/sizing.
2509         The placeholder box's height is currently set to the height of the editable renderer (sibling box), so when the ::placeholder has
2510         a large font-size set, the text is oddly positioned and gets cut off (the placeholder box has 'overflow: hidden' UA style).
2511         This patch makes the placeholder box center aligned and sized based on the used size (matches both Chrome and FF).
2512
2513         Test: fast/forms/placeholder-content-center.html
2514
2515         * rendering/RenderTextControlSingleLine.cpp:
2516         (WebCore::RenderTextControlSingleLine::layout):
2517
2518 2020-03-20  Simon Fraser  <simon.fraser@apple.com>
2519
2520         REGRESSION (r258679): [ Mac ] fast/scrolling/arrow-key-scroll-in-rtl-document.html is failing and timing out
2521         https://bugs.webkit.org/show_bug.cgi?id=209299
2522
2523         Reviewed by Daniel Bates.
2524
2525         fast/scrolling/arrow-key-scroll-in-rtl-document.html is unusual in that it uses monitorWheelEvents()
2526         but then issues arrow key presses.
2527
2528         WebCore responds to arrow keys via WebEditorClient::handleKeyboardEvent() calling down into
2529         WebPage::scroll() which ends up in FrameView::requestScrollPositionUpdate() and bounces to the
2530         scrolling thread. This isn't tracked by existing 'defer' reasons on WheelEventTestMonitor, so add a
2531         new defer reason that covers the period for adding the requested scroll go the scrolling state tree,
2532         and responding to it in the scrolling thread.
2533
2534         * page/WheelEventTestMonitor.cpp:
2535         (WebCore::operator<<):
2536         * page/WheelEventTestMonitor.h:
2537         * page/scrolling/AsyncScrollingCoordinator.cpp:
2538         (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
2539         * page/scrolling/ThreadedScrollingTree.cpp:
2540         (WebCore::ThreadedScrollingTree::scrollingTreeNodeRequestsScroll):
2541         * page/scrolling/ThreadedScrollingTree.h:
2542
2543 2020-03-20  David Kilzer  <ddkilzer@apple.com>
2544
2545         Content-Type & Nosniff Ignored on XML External Entity Resources
2546         <https://webkit.org/b/191171>
2547         <rdar://problem/45763222>
2548
2549         Reviewed by Darin Adler.
2550
2551         Test: http/tests/security/contentTypeOptions/nosniff-xml-external-entity.xhtml
2552
2553         * platform/MIMETypeRegistry.cpp:
2554         (WebCore::MIMETypeRegistry::isXMLEntityMIMEType): Add.
2555         * platform/MIMETypeRegistry.h:
2556         (WebCore::MIMETypeRegistry::isXMLEntityMIMEType): Add.
2557         - Checks for XML external entity MIME types.
2558
2559         * xml/parser/XMLDocumentParserLibxml2.cpp:
2560         (WebCore::externalEntityMimeTypeAllowedByNosniff): Add.
2561         - Checks whether the MIME type is valid based on the presence of
2562           the "X-Content-Type-Options: nosniff" header.
2563         (WebCore::openFunc):
2564         - Drop the contents of the resource that was returned and print
2565           an error message to the Web Inspector console if
2566           externalEntityMimeTypeAllowedByNosniff() says the MIME type is
2567           not allowed.
2568
2569 2020-03-20  Alex Christensen  <achristensen@webkit.org>
2570
2571         CORS-disabling SPI introduced in r253978 should make responses non-opaque
2572         https://bugs.webkit.org/show_bug.cgi?id=209351
2573         <rdar://problem/60024850>
2574
2575         Reviewed by Chris Dumez.
2576
2577         Covered by making the API test actually check that response content is readable.
2578
2579         * loader/DocumentThreadableLoader.cpp:
2580         (WebCore::DocumentThreadableLoader::responseReceived):
2581
2582 2020-03-20  Jer Noble  <jer.noble@apple.com>
2583
2584         Ensure media cache directory is created before passing to AVURLAsset.
2585         https://bugs.webkit.org/show_bug.cgi?id=209341
2586
2587         Reviewed by Eric Carlson.
2588
2589         Sandbox changes require the media cache directory to be created before passing to
2590         AVFoundation, to ensure that a sandbox extension is allowed to be created for that
2591         directory.
2592
2593         When the mediaCacheDirectory is empty or null, no longer specify a temporary directory. This
2594         allows clients to disable caching by specifying an empty string for the cache directory.
2595         Since now assetCacheForPath() can return nil, update all the call sites to handle that
2596         possibility. Add a new method, ensureAssetCacheExistsAtPath() which tries to create a
2597         directory at the specified path, and returns nil if that is not possible. This ensures the
2598         cache path exists before adding the AVAssetCache to the AVURLAsset options dictionary.
2599
2600         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2601         (WebCore::assetCacheForPath):
2602         (WebCore::ensureAssetCacheExistsForPath):
2603         (WebCore::MediaPlayerPrivateAVFoundationObjC::originsInMediaCache):
2604         (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCache):
2605         (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCacheForOrigins):
2606         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
2607
2608 2020-03-20  David Kilzer  <ddkilzer@apple.com>
2609
2610         Fix name of "X-Content-Type:" HTTP header in console logging
2611         <https://webkit.org/b/209348>
2612
2613         Reviewed by Devin Rousso.
2614
2615         * css/StyleSheetContents.cpp:
2616         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
2617         * dom/LoadableClassicScript.cpp:
2618         (WebCore::LoadableClassicScript::notifyFinished):
2619         * workers/WorkerScriptLoader.cpp:
2620         (WebCore::WorkerScriptLoader::validateWorkerResponse):
2621         - Change "X-Content-Type:" to "X-Content-Type-Options:" to fix
2622           the name of the header.
2623
2624 2020-03-20  Ali Juma  <ajuma@chromium.org>
2625
2626         Intersection Observer intersections are wrong with zooming
2627         https://bugs.webkit.org/show_bug.cgi?id=209264
2628
2629         Reviewed by Simon Fraser.
2630
2631         An IntersectionObserver's rootMargin is expressed in CSS pixels,
2632         but we weren't accounting for page zoom. Fix this by multiplying
2633         the root margin by the zoom factor.
2634
2635         Test: intersection-observer/root-margin-with-zoom.html
2636
2637         * dom/Document.cpp:
2638         (WebCore::expandRootBoundsWithRootMargin):
2639         (WebCore::computeIntersectionState):
2640
2641 2020-03-20  Don Olmstead  <don.olmstead@sony.com>
2642
2643         [GPUP] Add PlatformLayerContainer to hold pointer to PlatformLayer
2644         https://bugs.webkit.org/show_bug.cgi?id=208963
2645
2646         Reviewed by Eric Carlson.
2647
2648         Add a PlatformLayerContainer definition for use within the GPU Process code.
2649         Migrate to using over typedef in the file.
2650
2651         * platform/graphics/PlatformLayer.h:
2652
2653 2020-03-20  Andres Gonzalez  <andresg_22@apple.com>
2654
2655         Isolated tree updates must happen after AXObject has finished handling notifications.
2656         https://bugs.webkit.org/show_bug.cgi?id=209354
2657
2658         Reviewed by Chris Fleizach.
2659
2660         Isolated tree updates were happening in AXObjectCache::postNotification,
2661         but that is too early because the AXObject tree is updated during
2662         notificationPostTimerFired. Thus, moved the updates to after all
2663         AXObject tree updates have been done.
2664         In addition, fixed the check for replacement of the IsolatedObject in
2665         AXIsolatedTree::applyPendingChanges, which now happens only if the old
2666         and new objects have the same platform wrapper.
2667
2668         * accessibility/AXObjectCache.cpp:
2669         (WebCore::AXObjectCache::notificationPostTimerFired):
2670         (WebCore::AXObjectCache::postNotification):
2671         * accessibility/isolatedtree/AXIsolatedTree.cpp:
2672         (WebCore::AXIsolatedTree::applyPendingChanges):
2673
2674 2020-03-20  Andres Gonzalez  <andresg_22@apple.com>
2675
2676         Fix for retrieving focus in isolated tree mode.
2677         https://bugs.webkit.org/show_bug.cgi?id=209336
2678
2679         Reviewed by Chris Fleizach.
2680
2681         Focused object requests can come on the secondary thread before the
2682         isolated tree has been generated. Thus, AXObjectCache::isolatedTreeFocusedObject
2683         needs to generate the isolated tree if it doesn't exist, similar to
2684         isolatedTreeRootObject.
2685
2686         * accessibility/AXObjectCache.cpp:
2687         (WebCore::AXObjectCache::isolatedTreeFocusedObject):
2688         (WebCore::AXObjectCache::focusedUIElementForPage):
2689         (WebCore::AXObjectCache::getOrCreateIsolatedTree const):
2690         (WebCore::AXObjectCache::isolatedTreeRootObject):
2691         * accessibility/AXObjectCache.h:
2692         * accessibility/isolatedtree/AXIsolatedObject.cpp:
2693         (WebCore::AXIsolatedObject::focusedUIElement const):
2694         * accessibility/isolatedtree/AXIsolatedTree.h:
2695         m_pendingFocusedNodeID wasn't being initialized, which was causing
2696         random crashes when accessing the HashMap of isolated objects for a
2697         spurious AXID.
2698
2699 2020-03-20  Tim Horton  <timothy_horton@apple.com>
2700
2701         Upstream a variety of Cocoa-platform HAVE and ENABLE macros
2702         https://bugs.webkit.org/show_bug.cgi?id=209307
2703
2704         Reviewed by Andy Estes.
2705
2706         * Configurations/FeatureDefines.xcconfig:
2707
2708 2020-03-20  youenn fablet  <youenn@apple.com>
2709
2710         Add routines to check about:blank and about:srcdoc URLs
2711         https://bugs.webkit.org/show_bug.cgi?id=209174
2712
2713         Reviewed by Alex Christensen.
2714
2715         * Modules/fetch/FetchRequest.cpp:
2716         (WebCore::computeReferrer):
2717         * dom/Document.cpp:
2718         (WebCore::isURLPotentiallyTrustworthy):
2719         * html/HTMLFrameElementBase.cpp:
2720         (WebCore::HTMLFrameElementBase::location const):
2721         * loader/FrameLoader.cpp:
2722         (WebCore::FrameLoader::shouldTreatURLAsSrcdocDocument const):
2723         * page/SecurityPolicy.cpp:
2724         (WebCore::SecurityPolicy::shouldInheritSecurityOriginFromOwner):
2725
2726 2020-03-20  Chris Dumez  <cdumez@apple.com>
2727
2728         [iOS] Articles on NYTimes.com get truncated when switching between MobileSafari and another app
2729         https://bugs.webkit.org/show_bug.cgi?id=209321
2730         <rdar://problem/59763843>
2731
2732         Reviewed by Tim Horton.
2733
2734         Articles on NYTimes.com get truncated when switching between MobileSafari and another app
2735         (multitasking). The reason is that when you home out of MobileSafari, snapshots of the
2736         web view are taken at various sizes and we were firing 5 resizes events at the page as a
2737         result. Those resize events were confusing the logic on NYTimes.com and causing it to
2738         truncate the article.
2739
2740         To address the issue, we stop firing resize events at the page if the resize is happening
2741         during the snapshotting sequence.
2742
2743         * page/FrameView.cpp:
2744         (WebCore::FrameView::sendResizeEventIfNeeded):
2745         * page/Page.h:
2746         (WebCore::Page::shouldFireResizeEvents const):
2747         (WebCore::Page::setShouldFireResizeEvents):
2748
2749 2020-03-20  Jacob Uphoff  <jacob_uphoff@apple.com>
2750
2751         Unreviewed, reverting r258748.
2752
2753         This commit broke the Catalina build
2754
2755         Reverted changeset:
2756
2757         "Upstream a variety of Cocoa-platform HAVE and ENABLE macros"
2758         https://bugs.webkit.org/show_bug.cgi?id=209307
2759         https://trac.webkit.org/changeset/258748
2760
2761 2020-03-20  Zalan Bujtas  <zalan@apple.com>
2762
2763         [LFC][IFC] Avoid infinite loop when stuck on partial content
2764         https://bugs.webkit.org/show_bug.cgi?id=209312
2765         <rdar://problem/59954605>
2766
2767         Reviewed by Simon Fraser.
2768
2769         Speculative fix to address infinite loop/running out of inline run vector capacity at InlineFormattingContext::setDisplayBoxesForLine.
2770         (Checking if we managed to progress on the content while having partial runs.)
2771
2772         * layout/inlineformatting/InlineFormattingContext.cpp:
2773         (WebCore::Layout::InlineFormattingContext::lineLayout):
2774         * layout/inlineformatting/LineLayoutContext.cpp:
2775         (WebCore::Layout::LineLayoutContext::nextContentForLine):
2776         (WebCore::Layout::LineLayoutContext::handleFloatsAndInlineContent):
2777
2778 2020-03-20  Philippe Normand  <pnormand@igalia.com>
2779
2780         [GStreamer] White-list vp09 in the codec registry
2781         https://bugs.webkit.org/show_bug.cgi?id=209288
2782
2783         Reviewed by Xabier Rodriguez-Calvar.
2784
2785         * platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
2786         (WebCore::GStreamerRegistryScanner::initialize):
2787
2788 2020-03-20  Jack Lee  <shihchieh_lee@apple.com>
2789
2790         Nullptr crash in RenderObject::RenderObjectBitfields::isBox when current renderer is the RenderView
2791         https://bugs.webkit.org/show_bug.cgi?id=209251
2792         <rdar://problem/60103614>
2793
2794         Reviewed by Antti Koivisto.
2795
2796         It’s perfectly fine to call AccessibilityRenderObject::nextSibling on the RenderView (empty document) and since the RenderView has no sibling, let’s just early return with nullptr.
2797
2798         Test: fast/frames/iframe-empty-doc-crash.html
2799
2800         * accessibility/AccessibilityRenderObject.cpp:
2801         (WebCore::AccessibilityRenderObject::nextSibling const):
2802
2803 2020-03-20  Mike Gorse  <mgorse@suse.com>
2804
2805         Fix build with gstreamer 1.12
2806         https://bugs.webkit.org/show_bug.cgi?id=209296
2807
2808         Reviewed by Philippe Normand.
2809
2810         No new tests (build fix only).
2811
2812         * platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:
2813         (webKitGLVideoSinkChangeState): Add GST_VERSION_CHECK around check for
2814         GST_STATE_CHANGE_READY_TO_READY.
2815
2816 2020-03-20  Philippe Normand  <pnormand@igalia.com>
2817
2818         [Unix] Allow runtime release logging levels configuration
2819         https://bugs.webkit.org/show_bug.cgi?id=209286
2820
2821         Reviewed by Adrian Perez de Castro.
2822
2823         Setting to a comma-separated list like in this example should now work as expected:
2824
2825         WEBKIT_DEBUG="Media=debug,MediaSource=info" run-minibrowser --gtk ...
2826
2827         * platform/unix/LoggingUnix.cpp:
2828         (WebCore::logLevelString):
2829
2830 2020-03-19  Simon Fraser  <simon.fraser@apple.com>
2831
2832         Some scroll snapping tests are still flaky
2833         https://bugs.webkit.org/show_bug.cgi?id=165196
2834
2835         Reviewed by Wenson Hsieh.
2836
2837         WheelEventTestMonitor could trigger too early if the main thread was bogged down, delaying
2838         the firing of the m_updateNodeScrollPositionTimer scheduled from
2839         AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll().
2840
2841         Fix by extending the life of the "ScrollingThreadSyncNeeded" reason until after the m_updateNodeScrollPositionTimer
2842         has fired
2843
2844         Fixes flakiness of tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html
2845         and others.
2846
2847         * page/scrolling/AsyncScrollingCoordinator.cpp:
2848         (WebCore::AsyncScrollingCoordinator::noteScrollingThreadSyncCompleteForNode):
2849         (WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll):
2850         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScrollTimerFired):
2851         * page/scrolling/AsyncScrollingCoordinator.h:
2852         * page/scrolling/ThreadedScrollingTree.cpp:
2853         (WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
2854
2855 2020-03-19  Peng Liu  <peng.liu6@apple.com>
2856
2857         Safari video gravity changes performance improvements
2858         https://bugs.webkit.org/show_bug.cgi?id=209316
2859
2860         Reviewed by Eric Carlson.
2861
2862         Remove an unnecessary (and harmful) call of setVideoLayerFrame in WebAVPlayerLayer:layoutSublayers.
2863
2864         When a video with the gravity AVLayerVideoGravityResizeAspectFill needs to enter the
2865         picture-in-picture mode from fullscreen, the extra call of setVideoLayerFrame will send
2866         an extra IPC message to the Web process to set the video layer bounds. So the [CATransaction commit]
2867         will need to wait for three property changes to complete - two in the Web process, and one in the
2868         UI process. The interval of the two property changes in the Web process is over 100 ms, because we
2869         delay the call of resolveBounds (which calls the second setVideoLayerFrame) at least 100 ms
2870         in WebAVPlayerLayer:layoutSublayers. That leads to long durations of core animation commits.
2871         In the test, the longest duration of commits is over 500 ms. After applying this patch,
2872         the longest duration in the test is about 50 ms.
2873
2874         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
2875         (-[WebAVPlayerLayer layoutSublayers]):
2876
2877 2020-03-19  Tim Horton  <timothy_horton@apple.com>
2878
2879         Upstream a variety of Cocoa-platform HAVE and ENABLE macros
2880         https://bugs.webkit.org/show_bug.cgi?id=209307
2881
2882         Reviewed by Andy Estes.
2883
2884         * Configurations/FeatureDefines.xcconfig:
2885
2886 2020-03-19  Sunny He  <sunny_he@apple.com>
2887
2888         ScriptDisallowedScope should disable isEventAllowedInMainThread and isEventDispatchAllowedInSubtree asserts in WebKit1
2889         https://bugs.webkit.org/show_bug.cgi?id=209165
2890
2891         Reviewed by Ryosuke Niwa.
2892
2893         Under very intricate sequences of event dispatch in WebKit1, it is
2894         possible for security asserts to be triggered even if there is no
2895         underlying security issue soley due to the design patterns of
2896         WebKit1.
2897
2898         No new tests since the conditions for reproduction are very delicate
2899         and difficult to reliably capture in a test case.
2900
2901         * dom/ScriptDisallowedScope.h:
2902         (WebCore::ScriptDisallowedScope::isEventAllowedInMainThread):
2903         (WebCore::ScriptDisallowedScope::InMainThread::isEventDispatchAllowedInSubtree):
2904
2905 2020-03-19  Tim Horton  <timothy_horton@apple.com>
2906
2907         Upstream the definition of HAVE_READ_ONLY_SYSTEM_VOLUME
2908         https://bugs.webkit.org/show_bug.cgi?id=209305
2909
2910         Reviewed by Andy Estes.
2911
2912         * platform/mac/BlacklistUpdater.mm:
2913
2914 2020-03-19  Javier Fernandez  <jfernandez@igalia.com>
2915
2916         [css-grid] Changes in grid or elements inside the grid affects margin on other elements in the grid
2917         https://bugs.webkit.org/show_bug.cgi?id=209203
2918
2919         Reviewed by Darin Adler.
2920
2921         We should ignore the previously computed auto margins wheneven a relayout is performed.
2922
2923         Tests: imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-001.html
2924                imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-002.html
2925                imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-003.html
2926                imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-004.html
2927                imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-005.html
2928                imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-006.html
2929                imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-007.html
2930                imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-008.html
2931                imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-001.html
2932                imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-002.html
2933                imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-003.html
2934                imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-004.html
2935                imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-005.html
2936                imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-006.html
2937                imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-007.html
2938                imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-008.html
2939
2940         * rendering/RenderGrid.cpp:
2941         (WebCore::RenderGrid::updateAutoMarginsInRowAxisIfNeeded):
2942         (WebCore::RenderGrid::updateAutoMarginsInColumnAxisIfNeeded):
2943
2944 2020-03-19  Andres Gonzalez  <andresg_22@apple.com>
2945
2946         Remove caching of isOnScreen since it is not used.
2947         https://bugs.webkit.org/show_bug.cgi?id=209306
2948
2949         Reviewed by Chris Fleizach.
2950
2951         AXIsolatedObject was caching isOnScreen and it wasn't used. It has a
2952         performance impact since it needs to run on the main thread. thus this
2953         change removes it from the cache.
2954
2955         * accessibility/AccessibilityObjectInterface.h:
2956         * accessibility/isolatedtree/AXIsolatedObject.cpp:
2957         (WebCore::AXIsolatedObject::initializeAttributeData):
2958         * accessibility/isolatedtree/AXIsolatedObject.h:
2959
2960 2020-03-19  Andres Gonzalez  <andresg_22@apple.com>
2961
2962         URL needs to be isolatedCopied when cached in AXIsolatedObject.
2963         https://bugs.webkit.org/show_bug.cgi?id=209298
2964
2965         Reviewed by Chris Fleizach.
2966
2967         AXIsolatedObject needs to isolatedCopy the URL property in order to use
2968         it on the secondary thread.
2969
2970         * accessibility/isolatedtree/AXIsolatedObject.cpp:
2971         (WebCore::AXIsolatedObject::initializeAttributeData):
2972
2973 2020-03-19  Takashi Komori  <Takashi.Komori@sony.com>
2974
2975         [Curl] Add an API returns description of verification errors.
2976         https://bugs.webkit.org/show_bug.cgi?id=208913
2977
2978         Reviewed by Fujii Hironori.
2979
2980         WKCertificateInfoCopyVerificationErrorDescription returns the description of SSL verification error as human readable string.
2981         Browser can display more precise error information with this API.
2982
2983         API Test: Curl.CertificateAPI
2984
2985         * platform/network/curl/CertificateInfo.h:
2986         * platform/network/curl/CertificateInfoCurl.cpp:
2987         (WebCore::CertificateInfo::verificationErrorDescription const):
2988
2989 2020-03-19  Tim Horton  <timothy_horton@apple.com>
2990
2991         Implement support for cursor interactions on iPad
2992         https://bugs.webkit.org/show_bug.cgi?id=209268
2993
2994         Reviewed by Darin Adler.
2995
2996         No new tests in this patch, just upstreaming. Will attempt to enable
2997         some macOS mouse event tests on iOS in the future, though.
2998
2999         * platform/RuntimeApplicationChecks.h:
3000         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
3001         (WebCore::IOSApplication::isNews):
3002         (WebCore::IOSApplication::isStocks):
3003         (WebCore::IOSApplication::isFeedly):
3004         Add some bundle ID checks needed in WebKit.
3005
3006 2020-03-19  Andres Gonzalez  <andresg_22@apple.com>
3007
3008         AXIsolatedObject implementation of the title method.
3009         https://bugs.webkit.org/show_bug.cgi?id=209291
3010
3011         Reviewed by Chris Fleizach.
3012
3013         - Implements AXIsolatedObgject::title.
3014         - Modified implementation of AXIsolatedObject::titleAttributeValue to
3015         use its appropriate key.
3016
3017         * accessibility/isolatedtree/AXIsolatedObject.cpp:
3018         (WebCore::AXIsolatedObject::initializeAttributeData):
3019         (WebCore::AXIsolatedObject::title const): Deleted.
3020         * accessibility/isolatedtree/AXIsolatedObject.h:
3021
3022 2020-03-19  Chris Fleizach  <cfleizach@apple.com>
3023
3024         AX: VO and safari: can't press the play button
3025         https://bugs.webkit.org/show_bug.cgi?id=209249
3026
3027         Reviewed by Darin Adler.
3028
3029         Test: accessibility/ios-simulator/has-touch-event-listener-with-shadow.html
3030
3031         If a node is in a shadowRoot, going up the node parent tree will stop and not check the entire tree for touch event listeners
3032         and a touch event won't be dispatched. We need to change to use the parentInComposedTree instead to go up the chain.
3033
3034         * accessibility/ios/AccessibilityObjectIOS.mm:
3035         (WebCore::AccessibilityObject::hasTouchEventListener const):
3036
3037 2020-03-19  Andres Gonzalez  <andresg_22@apple.com>
3038
3039         [WebAccessibilityObjectWrapper remoteAccessibilityParentObject] must run on the main thread.
3040         https://bugs.webkit.org/show_bug.cgi?id=209284
3041
3042         Reviewed by Chris Fleizach.
3043
3044         - Dispatch [WebAccessibilityObjectWrapper remoteAccessibilityParentObject] to the main thread.
3045         - [WebAccessibilityObjectWrapper windowElement:] must then call it outside the dispatched lambda.
3046
3047         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3048         (-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]):
3049         (-[WebAccessibilityObjectWrapper windowElement:]):
3050
3051 2020-03-19  Antoine Quint  <graouts@apple.com>
3052
3053         [Web Animations] Mark promises as handled when rejected
3054         https://bugs.webkit.org/show_bug.cgi?id=209240
3055         <rdar://problem/60592305>
3056
3057         Reviewed by Youenn Fablet.
3058
3059         Implementing the spec change discussed in https://github.com/w3c/csswg-drafts/issues/4556.
3060
3061         * animation/WebAnimation.cpp:
3062         (WebCore::WebAnimation::cancel):
3063         (WebCore::WebAnimation::resetPendingTasks):
3064
3065 2020-03-19  Charlie Turner  <cturner@igalia.com>
3066
3067         Fix many warnings with Clang 7.0 on GTK x86-64 in Debug.
3068         https://bugs.webkit.org/show_bug.cgi?id=209146
3069
3070         Reviewed by Darin Adler.
3071
3072         Warning fixes, no new tests.
3073
3074         * Modules/encryptedmedia/MediaKeys.cpp:
3075         (WebCore::MediaKeys::MediaKeys):
3076         * Modules/webaudio/MediaStreamAudioSource.h: The m_numberOfFrames ivar
3077         is platform-specific.
3078         * loader/cache/CachedResource.cpp:
3079         (WebCore::CachedResource::load):
3080         * platform/graphics/texmap/TextureMapperGL.cpp:
3081         (WebCore::TextureMapperGLData::getStaticVBO):
3082         * platform/mediastream/RealtimeVideoSource.h:
3083         * platform/mediastream/gstreamer/GStreamerAudioCapturer.h: There are
3084         still virtual methods in this class, but no virtual destructor. Since
3085         this won't be subclassed further (I doubt, anyway!) lets make it final
3086         and plug the bug.
3087         * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
3088         * platform/mediastream/gstreamer/GStreamerVideoCapturer.h: See
3089         AudioCapturer.
3090         * platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp:
3091         (WebCore::GStreamerVideoDecoder::RegisterDecodeCompleteCallback): Deleted.
3092         (WebCore::GStreamerVideoDecoder::ImplementationName const): Deleted.
3093         * platform/mediastream/libwebrtc/GStreamerVideoEncoder.cpp:
3094         * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp: The
3095         encoder was being used uninitialized, and hence codec support can not
3096         be working as intended. Fix that bug.
3097         (WebCore::GStreamerVideoEncoder::AddCodecIfSupported):
3098         (WebCore::GStreamerVideoEncoder::InitEncode): Deleted.
3099         (WebCore::GStreamerVideoEncoder::GetEncoderInfo const): Deleted.
3100         * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.h:
3101         * platform/network/soup/NetworkStorageSessionSoup.cpp:
3102         (WebCore::NetworkStorageSession::setCookies):
3103         * rendering/RenderLayerBacking.h: Condition the bear trap on Cocoa
3104         platform where the crash is being seen. On GTK these traps generate
3105         warning spam and we don't see the crash here.
3106         * rendering/RenderThemeAdwaita.h:
3107         * testing/Internals.cpp:
3108         (WebCore::Internals::readPreferenceInteger):
3109         (WebCore::Internals::encodedPreferenceValue):
3110         (WebCore::Internals::getUTIFromMIMEType):
3111         (WebCore::Internals::getUTIFromTag):
3112
3113 2020-03-19  Antoine Quint  <graouts@apple.com>
3114
3115         onwebkit{animation, transition}XX handlers missing from Document
3116         https://bugs.webkit.org/show_bug.cgi?id=206170
3117         <rdar://problem/58596373>
3118
3119         Reviewed by Youenn Fablet.
3120
3121         We now specify the non-standard CSS Animations and CSS Transitions event handlers on DocumentAndElementEventHandlers.idl rather than Element.idl
3122         such that they specified on both Element and Document.
3123
3124         * dom/DocumentAndElementEventHandlers.idl:
3125         * dom/Element.idl:
3126
3127 2020-03-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3128
3129         [GTK][WPE] Media controls numeric position value is not automatically updated during playback
3130         https://bugs.webkit.org/show_bug.cgi?id=209051
3131
3132         Reviewed by Philippe Normand.
3133
3134         The time label is not updated because updateTime() thinks the media controls are hidden when not hovered, but
3135         for audio elements the controls are always visible.
3136
3137         * Modules/mediacontrols/mediaControlsAdwaita.js:
3138         (Controller.prototype.controlsAreAlwaysVisible): Return true for audio elements.
3139
3140 2020-03-19  Enrique Ocaña González  <eocanha@igalia.com>
3141
3142         [GTK] media/track/track-automatic-subtitles.html is timing out
3143         https://bugs.webkit.org/show_bug.cgi?id=116957
3144
3145         Reviewed by Adrian Perez de Castro.
3146
3147         Moved CaptionUserPreferencesMediaAF::textTrackSelectionScore() implementation
3148         to the CaptionUserPreferencesMedia superclass.
3149
3150         Tested by existing test.
3151
3152         * page/CaptionUserPreferences.cpp:
3153         (WebCore::CaptionUserPreferences::textTrackSelectionScore const):
3154         * page/CaptionUserPreferencesMediaAF.cpp:
3155         * page/CaptionUserPreferencesMediaAF.h:
3156
3157 2020-03-19  Philippe Normand  <pnormand@igalia.com>
3158
3159         [GTK][WPE] Unreviewed, build fixes after r258547 when disabling release logging support
3160
3161         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3162         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
3163         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3164         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
3165
3166 2020-03-19  youenn fablet  <youenn@apple.com>
3167
3168         Make URL::path() return a StringView
3169         https://bugs.webkit.org/show_bug.cgi?id=209173
3170
3171         Reviewed by Alex Christensen.
3172
3173         Update code according new path return type.
3174
3175         * Modules/plugins/YouTubePluginReplacement.cpp:
3176         (WebCore::processAndCreateYouTubeURL):
3177         (WebCore::YouTubePluginReplacement::youTubeURLFromAbsoluteURL):
3178         * html/Autofill.cpp:
3179         (WebCore::AutofillData::createFromHTMLFormControlElement):
3180         * html/URLUtils.h:
3181         (WebCore::URLUtils<T>::pathname const):
3182         * loader/FormSubmission.cpp:
3183         (WebCore::appendMailtoPostFormDataToURL):
3184         * loader/appcache/ManifestParser.cpp:
3185         (WebCore::manifestPath):
3186         * page/Location.cpp:
3187         (WebCore::Location::pathname const):
3188         * page/UserContentURLPattern.cpp:
3189         (WebCore::MatchTester::MatchTester):
3190         (WebCore::UserContentURLPattern::matchesPath const):
3191         * page/csp/ContentSecurityPolicySource.cpp:
3192         (WebCore::ContentSecurityPolicySource::pathMatches const):
3193         * platform/network/curl/CookieJarDB.cpp:
3194         (WebCore::CookieJarDB::searchCookies):
3195         (WebCore::CookieJarDB::deleteCookie):
3196         * platform/network/curl/CookieUtil.cpp:
3197         (WebCore::CookieUtil::defaultPathForURL):
3198         * platform/network/curl/CurlRequest.cpp:
3199         (WebCore::CurlRequest::invokeDidReceiveResponseForFile):
3200         * platform/text/TextEncoding.cpp:
3201         (WebCore::decodeURLEscapeSequences):
3202         * platform/text/TextEncoding.h:
3203         * workers/WorkerLocation.cpp:
3204         (WebCore::WorkerLocation::pathname const):
3205         * workers/service/ServiceWorkerContainer.cpp:
3206         (WebCore::ServiceWorkerContainer::addRegistration):
3207         * workers/service/ServiceWorkerJob.cpp:
3208         (WebCore::ServiceWorkerJob::validateServiceWorkerResponse):
3209         * workers/service/server/RegistrationDatabase.cpp:
3210         (WebCore::RegistrationDatabase::doPushChanges):
3211
3212 2020-03-18  Peng Liu  <peng.liu6@apple.com>
3213
3214         The value of [AVPlayerViewController isPictureInPicturePossible] is NO in the first attempt to enter PiP
3215         https://bugs.webkit.org/show_bug.cgi?id=204979
3216
3217         Reviewed by Jer Noble.
3218
3219         A follow-up patch to fix build failures.
3220         This patch also removes a meaningless line in the dealloc of WebAVPlayerViewController.
3221
3222         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
3223         (-[WebAVPlayerViewController initWithFullscreenInterface:]):
3224         (-[WebAVPlayerViewController dealloc]):
3225         (VideoFullscreenInterfaceAVKit::doEnterFullscreen):
3226
3227 2020-03-18  Andres Gonzalez  <andresg_22@apple.com>
3228
3229         Use helper function retainPtr(T*) instead of creating one.
3230         https://bugs.webkit.org/show_bug.cgi?id=209269
3231
3232         Reviewed by Chris Fleizach.
3233
3234         This is acorrection to patch in bug: https://bugs.webkit.org/show_bug.cgi?id=209247.
3235         Use the existing retainPtr helper funtion instead of creating a new helper.
3236
3237         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3238         (-[WebAccessibilityObjectWrapper attachmentView]):
3239         (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
3240         (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
3241         (-[WebAccessibilityObjectWrapper associatedPluginParent]):
3242         (-[WebAccessibilityObjectWrapper windowElement:]):
3243         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
3244         (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
3245         (-[WebAccessibilityObjectWrapper textMarkerRangeAtTextMarker:forUnit:]):
3246         (-[WebAccessibilityObjectWrapper lineTextMarkerRangeForTextMarker:forUnit:]):
3247         (-[WebAccessibilityObjectWrapper textMarkerForTextMarker:atUnit:]):
3248         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
3249         (retainWrapper): Deleted.
3250
3251 2020-03-18  Zalan Bujtas  <zalan@apple.com>
3252
3253         [Multicolumn] RenderListItem::positionListMarker should not fail when the list marker is inside a spanner.
3254         https://bugs.webkit.org/show_bug.cgi?id=209262
3255         <rdar://problem/58447665>
3256
3257         Reviewed by Simon Fraser.
3258
3259         When the list marker is in a column spanner and as a result it gets moved under the column flow, the
3260         normal "let's find the list item by walking up on the ancestor chain" does not work anymore.
3261         We need to check if this list marker is inside a spanner and climb up on the ancestor chain by
3262         using the spanner placeholder position (see RenderListMarker::parentBox).
3263         This patch also moves the marker's overflow computation from the list item to the marker.
3264
3265         Test: fast/multicol/list-item-marker-inside-column-spanner.html
3266
3267         * rendering/RenderListItem.cpp:
3268         (WebCore::RenderListItem::addOverflowFromChildren):
3269         (WebCore::RenderListItem::positionListMarker): Deleted.
3270         * rendering/RenderListMarker.cpp:
3271         (WebCore::RenderListMarker::parentBox):
3272         (WebCore::RenderListMarker::addOverflowFromListMarker):
3273         (WebCore::RenderListMarker::layout):
3274         * rendering/RenderListMarker.h:
3275
3276 2020-03-18  Simon Fraser  <simon.fraser@apple.com>
3277
3278         eventSender.monitorWheelEvents() is very fragile
3279         https://bugs.webkit.org/show_bug.cgi?id=197819
3280         <rdar://problem/51319456>
3281
3282         Reviewed by Tim Horton.
3283
3284         Deflake tests using eventSender.monitorWheelEvents() by fixing several causes of flakiness,
3285         adding back changes from r257844 that were reverted in r258558.
3286         
3287         First, have EventSendingController keep track of whether it's seen then "end" event
3288         for the scrolling and momentum phases, and pass this down to WheelEventTestMonitor, which
3289         now waits until it sees these, which prevents premature triggering which was a common cause of
3290         failure before.
3291         
3292         Second, remove WheelEventTestMonitor's 1/60s timer and instead have WheelEventTestMonitor test
3293         for completion in a callout from the end of Page::updateRendering(), which makes it test
3294         and fire at a more consistent time.
3295         
3296         Third, push WheelEventTestMonitor to the ScrollingTree, so that reasons for deferral
3297         can be added on the scrolling thread. This fixes an issue where the RunLoop::main().dispatch()
3298         used to send the "ScrollingThreadSyncNeeded" reason to the main thread would get delayed,
3299         also resulting in a premature trigger.
3300
3301         * Modules/applepay/ApplePaySession.cpp: Unified sources!
3302         * dom/WindowEventLoop.cpp: Unified sources!
3303         * page/EventHandler.cpp:
3304         (WebCore::EventHandler::handleWheelEvent):
3305         * page/FrameView.cpp:
3306         (WebCore::FrameView::scrollOffsetChangedViaPlatformWidgetImpl):
3307         * page/Page.cpp:
3308         (WebCore::Page::doAfterUpdateRendering):
3309         (WebCore::Page::wheelEventTestMonitor const):
3310         (WebCore::Page::clearWheelEventTestMonitor):
3311         (WebCore::Page::isMonitoringWheelEvents const):
3312         (WebCore::Page::ensureWheelEventTestMonitor):
3313         * page/Page.h:
3314         (WebCore::Page::wheelEventTestMonitor const): Deleted.
3315         (WebCore::Page::clearWheelEventTestMonitor): Deleted.
3316         (WebCore::Page::isMonitoringWheelEvents const): Deleted.
3317         * page/WheelEventTestMonitor.cpp:
3318         (WebCore::WheelEventTestMonitor::WheelEventTestMonitor):
3319         (WebCore::WheelEventTestMonitor::clearAllTestDeferrals):
3320         (WebCore::WheelEventTestMonitor::setTestCallbackAndStartMonitoring):
3321         (WebCore::WheelEventTestMonitor::deferForReason):
3322         (WebCore::WheelEventTestMonitor::removeDeferralForReason):
3323         (WebCore::WheelEventTestMonitor::receivedWheelEvent):
3324         (WebCore::WheelEventTestMonitor::scheduleCallbackCheck):
3325         (WebCore::WheelEventTestMonitor::checkShouldFireCallbacks):
3326         (WebCore::operator<<):
3327         (WebCore::WheelEventTestMonitor::setTestCallbackAndStartNotificationTimer): Deleted.
3328         (WebCore::WheelEventTestMonitor::triggerTestTimerFired): Deleted.
3329         * page/WheelEventTestMonitor.h:
3330         (WebCore::WheelEventTestMonitorCompletionDeferrer::WheelEventTestMonitorCompletionDeferrer):
3331         (WebCore::WheelEventTestMonitorCompletionDeferrer::~WheelEventTestMonitorCompletionDeferrer):
3332         * page/scrolling/AsyncScrollingCoordinator.cpp:
3333         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
3334         (WebCore::AsyncScrollingCoordinator::deferWheelEventTestCompletionForReason const): Deleted.
3335         (WebCore::AsyncScrollingCoordinator::removeWheelEventTestCompletionDeferralForReason const): Deleted.
3336         * page/scrolling/AsyncScrollingCoordinator.h:
3337         * page/scrolling/ScrollingCoordinator.h:
3338         (WebCore::ScrollingCoordinator::startMonitoringWheelEvents):
3339         (WebCore::ScrollingCoordinator::stopMonitoringWheelEvents):
3340         * page/scrolling/ScrollingTree.cpp:
3341         (WebCore::ScrollingTree::handleWheelEvent):
3342         * page/scrolling/ScrollingTree.h:
3343         (WebCore::ScrollingTree::setWheelEventTestMonitor):
3344         (WebCore::ScrollingTree::receivedWheelEvent):
3345         * page/scrolling/ThreadedScrollingTree.cpp:
3346         (WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
3347         (WebCore::ThreadedScrollingTree::deferWheelEventTestCompletionForReason): Deleted.
3348         (WebCore::ThreadedScrollingTree::removeWheelEventTestCompletionDeferralForReason): Deleted.
3349         * page/scrolling/ThreadedScrollingTree.h:
3350         * page/scrolling/mac/ScrollingCoordinatorMac.h:
3351         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
3352         (WebCore::ScrollingCoordinatorMac::startMonitoringWheelEvents):
3353         (WebCore::ScrollingCoordinatorMac::stopMonitoringWheelEvents):
3354         * page/scrolling/mac/ScrollingTreeMac.h:
3355         * page/scrolling/mac/ScrollingTreeMac.mm:
3356         (ScrollingTreeMac::setWheelEventTestMonitor):
3357         (ScrollingTreeMac::receivedWheelEvent):
3358         (ScrollingTreeMac::deferWheelEventTestCompletionForReason):
3359         (ScrollingTreeMac::removeWheelEventTestCompletionDeferralForReason):
3360         * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
3361         (WebCore::ScrollingTreeScrollingNodeDelegateMac::deferWheelEventTestCompletionForReason const):
3362         (WebCore::ScrollingTreeScrollingNodeDelegateMac::removeWheelEventTestCompletionDeferralForReason const):
3363         * testing/js/WebCoreTestSupport.cpp:
3364         (WebCoreTestSupport::setWheelEventMonitorTestCallbackAndStartMonitoring):
3365         (WebCoreTestSupport::setTestCallbackAndStartNotificationTimer): Deleted.
3366         * testing/js/WebCoreTestSupport.h:
3367
3368 2020-03-18  Fujii Hironori  <Hironori.Fujii@sony.com>
3369
3370         AuthenticatorResponseData::decode should check bufferIsLargeEnoughToContain before allocating buffers
3371         https://bugs.webkit.org/show_bug.cgi?id=209133
3372
3373         Reviewed by Darin Adler.
3374
3375         Check bufferIsLargeEnoughToContain with the decoded size before
3376         allocating buffers.
3377
3378         Replaced ArrayBuffer::create with ArrayBuffer::tryCreate, and
3379         added a null check.
3380
3381         * Modules/webauthn/AuthenticatorResponseData.h:
3382         (WebCore::encodeArrayBuffer): Added.
3383         (WebCore::decodeArrayBuffer): Added.
3384         (WebCore::AuthenticatorResponseData::encode const):
3385         (WebCore::AuthenticatorResponseData::decode):
3386
3387 2020-03-18  Andres Gonzalez  <andresg_22@apple.com>
3388
3389         Several TextMarker attributes need to run on the main thread.
3390         https://bugs.webkit.org/show_bug.cgi?id=209247
3391
3392         Reviewed by Chris Fleizach.
3393
3394         - Dispatch several TextMarker parameterized attributes to the main
3395         thread.
3396         - Added helper methods to return TextMarkers and TextMarkerRanges for
3397         diffferent units of text such as word or sentence.
3398         - Added a helper function, retainWrapper to make code a bit more
3399         readable in lambda definitions.
3400
3401         * accessibility/mac/AXObjectCacheMac.mm:
3402         (WebCore::textMarkerForVisiblePosition):
3403         (WebCore::textMarkerRangeFromVisiblePositions):
3404         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3405         (retainWrapper):
3406         (-[WebAccessibilityObjectWrapper attachmentView]):
3407         (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
3408         (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
3409         (-[WebAccessibilityObjectWrapper associatedPluginParent]):
3410         (-[WebAccessibilityObjectWrapper windowElement:]):
3411         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
3412         (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
3413         (-[WebAccessibilityObjectWrapper textMarkerRangeAtTextMarker:forUnit:]):
3414         (-[WebAccessibilityObjectWrapper lineTextMarkerRangeForTextMarker:forUnit:]):
3415         (-[WebAccessibilityObjectWrapper textMarkerForTextMarker:atUnit:]):
3416         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
3417
3418 2020-03-18  Zalan Bujtas  <zalan@apple.com>
3419
3420         [MultiColumn] Ignore spanner boxes inside <legend>
3421         https://bugs.webkit.org/show_bug.cgi?id=209248
3422         <rdar://problem/51857865>
3423
3424         Reviewed by Simon Fraser.
3425
3426         <legend> boxes don't participate in the multicolumn flow, they are simply ignored.
3427         This patch ensures that we don't include their descendants in the spanner construction.
3428         <column>some<legend><div spanner></div></legend>content</column> <- the "spanner" div won't span the column content. 
3429
3430         Test: fast/multicol/spanner-inside-legend-crash.html
3431
3432         * rendering/updating/RenderTreeBuilderMultiColumn.cpp:
3433         (WebCore::isValidColumnSpanner):
3434
3435 2020-03-18  Yusuke Suzuki  <ysuzuki@apple.com>
3436
3437         Add a way to mark a rejected promise as handled
3438         https://bugs.webkit.org/show_bug.cgi?id=209241
3439
3440         Reviewed by Michael Saboff.
3441
3442         This adds an interface using JSPromise::rejectAsHandled to DOMPromise classes.
3443
3444         * bindings/js/DOMPromiseProxy.h:
3445         (WebCore::DOMPromiseProxy<IDLType>::reject):
3446         (WebCore::DOMPromiseProxy<IDLVoid>::reject):
3447         (WebCore::DOMPromiseProxyWithResolveCallback<IDLType>::reject):
3448         * bindings/js/JSDOMPromiseDeferred.cpp:
3449         (WebCore::DeferredPromise::callFunction):
3450         (WebCore::DeferredPromise::reject):
3451         * bindings/js/JSDOMPromiseDeferred.h:
3452         (WebCore::DeferredPromise::reject):
3453         (WebCore::DeferredPromise::rejectWithCallback):
3454         (WebCore::DOMPromiseDeferredBase::reject):
3455         (WebCore::DOMPromiseDeferredBase::rejectType):
3456
3457 2020-03-18  youenn fablet  <youenn@apple.com>
3458
3459         WebPage should own a Ref<WebFrame>
3460         https://bugs.webkit.org/show_bug.cgi?id=209235
3461
3462         Reviewed by Geoffrey Garen.
3463
3464         * loader/FrameLoaderStateMachine.h:
3465         Export committedFirstRealDocumentLoad/
3466
3467 2020-03-18  Eugene But  <eugenebut@chromium.org>
3468
3469         Fix ReplaceSelectionCommand::InsertedNodes::willRemoveNodePreservingChildren crash
3470         https://bugs.webkit.org/show_bug.cgi?id=208312
3471         
3472         Reviewed by Ryosuke Niwa
3473
3474         ReplaceSelectionCommand::InsertedNodes::willRemoveNodePreservingChildren
3475         was crashing on dereferencing m_firstNodeInserted pointer. Before the crash
3476         ReplaceSelectionCommand::InsertedNodes object received the following calls:
3477
3478         respondToNodeInsertion() with node A, which set m_firstNodeInserted and m_lastNodeInserted to A
3479         willRemoveNode() with node B, which left m_firstNodeInserted and m_lastNodeInserted unchanged (A)
3480         (node A was destroyed setting m_firstNodeInserted and m_lastNodeInserted to null)
3481         respondToNodeInsertion() with node C, which set m_firstNodeInserted and m_lastNodeInserted to C
3482         willRemoveNodePreservingChildren() with node C, which set m_firstNodeInserted to null and crashed
3483
3484         This patch checks m_firstNodeInserted before dereferencing and sets m_lastNodeInserted to null if
3485         m_firstNodeInserted became null. It seems like having non-null value for m_lastNodeInserted would
3486         be an invalid state.
3487
3488         Test: editing/pasteboard/insert-apple-style-span-after-timeout.html
3489
3490         * editing/ReplaceSelectionCommand.cpp:
3491         (WebCore::ReplaceSelectionCommand::InsertedNodes::willRemoveNodePreservingChildren):
3492
3493 2020-03-18  Youenn Fablet  <youenn@apple.com>
3494
3495         CrossOriginPreflightResultCacheItem::allows methods should not use out parameters
3496         https://bugs.webkit.org/show_bug.cgi?id=209224
3497
3498         Reviewed by Alex Christensen.
3499
3500         Instead of having an out parameter for the error description, either return whether there is an error or not.
3501         Covered by existing tests.
3502
3503         * loader/CrossOriginPreflightResultCache.cpp:
3504         (WebCore::CrossOriginPreflightResultCacheItem::validateMethodAndHeaders const):
3505         (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginMethod const):
3506         (WebCore::CrossOriginPreflightResultCacheItem::validateCrossOriginHeaders const):
3507         (WebCore::CrossOriginPreflightResultCacheItem::allowsRequest const):
3508         (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders const): Deleted.
3509         * loader/CrossOriginPreflightResultCache.h:
3510
3511 2020-03-18  Peng Liu  <peng.liu6@apple.com>
3512
3513         The value of [AVPlayerViewController isPictureInPicturePossible] is NO in the first attempt to enter PiP
3514         https://bugs.webkit.org/show_bug.cgi?id=204979
3515
3516         Reviewed by Jer Noble.
3517
3518         Since [AVPlayerViewControl isPictureInPicturePossible] can be NO initially, we may fail to enter
3519         the Picture-in-Picture mode.
3520
3521         This patch implements the mechanism to observe [AVPlayerViewControl isPictureInPicturePossible] after
3522         a user requests to enter the Picture-in-Picture mode, and call [AVPlayerViewController startPictureInPicture]
3523         when [AVPlayerViewController isPictureInPicturePossible] changes to YES.
3524         A timer is added to monitor the status. If [AVPlayerViewController isPictureInPicturePossible] does not
3525         change to YES in 0.5 second, we will give up the attempt.
3526
3527         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
3528         (-[WebAVPlayerViewController initWithFullscreenInterface:]):
3529         (-[WebAVPlayerViewController dealloc]):
3530         (-[WebAVPlayerViewController MY_NO_RETURN]):
3531         (VideoFullscreenInterfaceAVKit::doEnterFullscreen):
3532
3533 2020-03-18  Frederic Wang  <fwang@igalia.com>
3534
3535         frame/iframe scrolling attribute does to recognize value "noscroll" or "off"
3536         https://bugs.webkit.org/show_bug.cgi?id=208570
3537
3538         Reviewed by Rob Buis.
3539
3540         Tests: imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/the-page/iframe-scrolling-attribute.html
3541                imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/the-page/iframe-scrolling-attribute-values.html
3542
3543         * html/HTMLFrameElementBase.cpp:
3544         (WebCore::HTMLFrameElementBase::scrollingMode const): Treat "noscroll" and "off" the same as "no".
3545
3546 2020-03-18  Chris Dumez  <cdumez@apple.com>
3547
3548         [ Mac wk2 ] http/wpt/beacon/beacon-quota.html is flaky failing
3549         https://bugs.webkit.org/show_bug.cgi?id=207894
3550         <rdar://problem/59551688>
3551
3552         Reviewed by Geoffrey Garen.
3553
3554         Add internals API exposing the number of inflight beacon loads for a given navigator object
3555         so that the test can rely on it.
3556
3557         * Modules/beacon/NavigatorBeacon.h:
3558         * testing/Internals.cpp:
3559         (WebCore::Internals::inflightBeaconsCount const):
3560         * testing/Internals.h:
3561         * testing/Internals.idl:
3562
3563 2020-03-18  Frederic Wang  <fwang@igalia.com>
3564
3565         [intersection-observer] Accept a Document as an explicit root
3566         https://bugs.webkit.org/show_bug.cgi?id=208047
3567
3568         Reviewed by Rob Buis.
3569
3570         No new tests, no behavior change.
3571
3572         * page/IntersectionObserver.cpp:
3573         (WebCore::IntersectionObserver::create):
3574         (WebCore::IntersectionObserver::IntersectionObserver):
3575         * page/IntersectionObserver.h:
3576         (WebCore::IntersectionObserver::root const):
3577
3578 2020-03-18  Joonghun Park  <jh718.park@samsung.com>
3579
3580         Unreviewed. Remove the build warnings below since r256756
3581         warning: unused parameter ‘foo’ [-Wunused-parameter]
3582
3583         no new tests, no new behaviours.
3584
3585         * testing/Internals.cpp:
3586         (WebCore::Internals::readPreferenceInteger):
3587         (WebCore::Internals::encodedPreferenceValue):
3588         (WebCore::Internals::getUTIFromMIMEType):
3589         (WebCore::Internals::getUTIFromTag):
3590
3591 2020-03-18  Joonghun Park  <jh718.park@samsung.com>
3592
3593         Unreviewed. Remove the build warning below since r256196
3594         warning: variable ‘highlightEnd’ set but not used [-Wunused-but-set-variable]
3595
3596         no new tests, no new behaviours.
3597
3598         * rendering/HighlightData.cpp:
3599         (WebCore::HighlightData::highlightStateForRenderer):
3600
3601 2020-03-18  youenn fablet  <youenn@apple.com>
3602
3603         Make sure a preflight fails if response headers are invalid
3604         https://bugs.webkit.org/show_bug.cgi?id=208924
3605
3606         Reviewed by Alex Christensen.
3607
3608         Implement https://fetch.spec.whatwg.org/#cors-preflight-fetch-0 step 7.3.
3609         In case header parsing is wrong, fail the preflight with a meaningful message.
3610         Update parsing of headers to return an Optional so that parsing error is handled as a nullopt.
3611         Minor refactoring to return Expected/Optional for error handlng instead of passing an out parameter.
3612         Also, adding preflight cache entry if it is valid, no matter whether preflight succeeds or not.
3613
3614         Tests: imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-response-validation.any.html
3615                imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-response-validation.any.worker.html
3616
3617         * loader/CrossOriginAccessControl.cpp:
3618         (WebCore::validatePreflightResponse):
3619         * loader/CrossOriginPreflightResultCache.cpp:
3620         (WebCore::CrossOriginPreflightResultCacheItem::create):
3621         (WebCore::CrossOriginPreflightResultCacheItem::validateMethodAndHeaders const):
3622         * loader/CrossOriginPreflightResultCache.h:
3623         (WebCore::CrossOriginPreflightResultCacheItem::CrossOriginPreflightResultCacheItem):
3624         * platform/network/HTTPParsers.h:
3625         (WebCore::parseAccessControlAllowList):
3626         * platform/network/ResourceResponseBase.cpp:
3627         (WebCore::ResourceResponseBase::filter):
3628         (WebCore::ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingToTainting):
3629
3630 2020-03-18  Joonghun Park  <jh718.park@samsung.com>
3631
3632         Unreviewed. Remove the build warning below since r258458
3633         warning: unused variable ‘frame’ [-Wunused-variable]
3634
3635         No new tests, no new behaviors.
3636
3637         * loader/ResourceLoader.cpp:
3638         (WebCore::ResourceLoader::didReceiveResponse):
3639
3640 2020-03-18  youenn fablet  <youenn@apple.com>
3641
3642         FrameLoader should own its FrameLoaderClient
3643         https://bugs.webkit.org/show_bug.cgi?id=208918
3644
3645         Reviewed by Geoff Garen.
3646
3647         Update Frame/FrameLoader constructors to get a UniqueRef<FrameLoaderClient>.
3648         This makes the lifetime management much clearer and allows some WebKit1/WebKit2 clean-up.
3649
3650         Covered by existing tests.
3651
3652         * loader/EmptyClients.cpp:
3653         (WebCore::pageConfigurationWithEmptyClients):
3654         * loader/EmptyFrameLoaderClient.h:
3655         * loader/FrameLoader.cpp:
3656         (WebCore::FrameLoader::FrameLoader):
3657         (WebCore::FrameLoader::~FrameLoader):
3658         (WebCore::FrameLoader::init):
3659         (WebCore::FrameLoader::initForSynthesizedDocument):
3660         (WebCore::FrameLoader::didExplicitOpen):
3661         (WebCore::FrameLoader::receivedFirstData):
3662         (WebCore::FrameLoader::finishedParsing):
3663         (WebCore::FrameLoader::loadArchive):
3664         (WebCore::FrameLoader::setOpener):
3665         (WebCore::FrameLoader::provisionalLoadStarted):
3666         (WebCore::FrameLoader::loadInSameDocument):
3667         (WebCore::FrameLoader::prepareForLoadStart):
3668         (WebCore::FrameLoader::setupForReplace):
3669         (WebCore::FrameLoader::load):
3670         (WebCore::FrameLoader::loadWithNavigationAction):
3671         (WebCore::FrameLoader::loadWithDocumentLoader):
3672         (WebCore::FrameLoader::willLoadMediaElementURL):
3673         (WebCore::FrameLoader::reloadWithOverrideEncoding):
3674         (WebCore::FrameLoader::reload):
3675         (WebCore::FrameLoader::setDocumentLoader):
3676         (WebCore::FrameLoader::commitProvisionalLoad):
3677         (WebCore::FrameLoader::transitionToCommitted):
3678         (WebCore::FrameLoader::clientRedirectCancelledOrFinished):
3679         (WebCore::FrameLoader::clientRedirected):
3680         (WebCore::FrameLoader::closeOldDataSources):
3681         (WebCore::FrameLoader::willChangeTitle):
3682         (WebCore::FrameLoader::dispatchDidFailProvisionalLoad):
3683         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
3684         (WebCore::FrameLoader::didReachLayoutMilestone):
3685         (WebCore::FrameLoader::didReachVisuallyNonEmptyState):
3686         (WebCore::FrameLoader::frameLoadCompleted):
3687         (WebCore::FrameLoader::checkLoadComplete):
3688         (WebCore::FrameLoader::userAgent const):
3689         (WebCore::FrameLoader::dispatchOnloadEvents):
3690         (WebCore::FrameLoader::detachViewsAndDocumentLoader):
3691         (WebCore::FrameLoader::receivedMainResourceError):
3692         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
3693         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
3694         (WebCore::FrameLoader::loadedResourceFromMemoryCache):
3695         (WebCore::FrameLoader::loadDifferentDocumentItem):
3696         (WebCore::FrameLoader::cancelledError const):
3697         (WebCore::FrameLoader::blockedByContentBlockerError const):
3698         (WebCore::FrameLoader::blockedError const):
3699         (WebCore::FrameLoader::blockedByContentFilterError const):
3700         (WebCore::FrameLoader::connectionProperties):
3701         (WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
3702         (WebCore::FrameLoader::dispatchGlobalObjectAvailableInAllWorlds):
3703         (WebCore::FrameLoader::didChangeTitle):
3704         (WebCore::FrameLoader::dispatchDidCommitLoad):
3705         (WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads):
3706         (WebCore::FrameLoader::completePageTransitionIfNeeded):
3707         * loader/FrameLoader.h:
3708         * loader/FrameLoaderClient.h:
3709         * page/Frame.cpp:
3710         (WebCore::Frame::Frame):
3711         (WebCore::Frame::create):
3712         * page/Frame.h:
3713         * page/Page.cpp:
3714         (WebCore::Page::Page):
3715         * page/PageConfiguration.cpp:
3716         (WebCore::PageConfiguration::PageConfiguration):
3717         * page/PageConfiguration.h:
3718         * workers/service/context/SWContextManager.cpp:
3719         * workers/service/context/SWContextManager.h:
3720
3721 2020-03-18  Philippe Normand  <pnormand@igalia.com>
3722
3723         [GTK][WPE] Migrate to Flatpak-based dev SDK
3724         https://bugs.webkit.org/show_bug.cgi?id=205658
3725
3726         Reviewed by Carlos Alberto Lopez Perez.
3727
3728         * platform/text/hyphen/HyphenationLibHyphen.cpp:
3729         (WebCore::scanTestDictionariesDirectoryIfNecessary): Check for flatpak-installed dictionaries.
3730
3731 2020-03-17  Pinki Gyanchandani  <pgyanchandani@apple.com>
3732
3733         Crash in CSSPrimitiveValue::cleanup
3734         https://bugs.webkit.org/show_bug.cgi?id=208316
3735
3736         Reviewed by Ryosuke Niwa.
3737
3738         Added a NULL check before calling deref() for CSSUnitType :: CSS_CALC.
3739
3740         During initialization of CSSCalcValue, createCSS returns nullptr when processing min() operator
3741         and there is a category mismatch between length and percent for min() operator
3742         as seen in this newly added test case.
3743
3744         Test: editing/execCommand/primitive-value-cleanup-minimal.html
3745
3746         * css/CSSPrimitiveValue.cpp:
3747         (WebCore::CSSPrimitiveValue::cleanup):
3748
3749 2020-03-17  Fujii Hironori  <Hironori.Fujii@sony.com>
3750
3751         SerializedScriptValue::decode should check bufferIsLargeEnoughToContain before allocating a buffer
3752         https://bugs.webkit.org/show_bug.cgi?id=209132
3753
3754         Reviewed by Darin Adler.
3755
3756         * bindings/js/SerializedScriptValue.h:
3757         (WebCore::SerializedScriptValue::decode): Added bufferIsLargeEnoughToContain check.
3758         Added a null check for Gigacage::tryMalloc.
3759
3760 2020-03-17  Chris Fleizach  <cfleizach@apple.com>
3761
3762         AX: WebKit crashes with VO and keyboard support fails on encapsulated radio button components.
3763         https://bugs.webkit.org/show_bug.cgi?id=208844
3764         <rdar://problem/60252659>
3765
3766         Reviewed by Darin Adler.
3767
3768         Test: accessibility/mac/crash-bounds-for-range.html
3769
3770         Don't access renderer if nil in getInlineBoxAndOffset.
3771
3772         * dom/Position.cpp:
3773         (WebCore::Position::getInlineBoxAndOffset const):
3774
3775 2020-03-17  Eric Carlson  <eric.carlson@apple.com>
3776
3777         TextTrackBase should validate language before setting m_validBCP47Language
3778         https://bugs.webkit.org/show_bug.cgi?id=209094
3779         <rdar://problem/60439603>
3780
3781         Unreviewed, address post-commit review comments.
3782
3783         * html/track/TrackBase.cpp:
3784         (WebCore::TrackBase::setLanguage): Use makeString instead of StringBuilder.
3785
3786 2020-03-17  Eric Carlson  <eric.carlson@apple.com>
3787
3788         TextTrackBase should validate language before setting m_validBCP47Language
3789         https://bugs.webkit.org/show_bug.cgi?id=209094
3790         <rdar://problem/60439603>
3791
3792         Reviewed by Jer Noble.
3793         
3794         Test: media/track/track-bcp-language.html
3795
3796         * html/track/TextTrack.idl:
3797         * html/track/TrackBase.cpp:
3798         (WebCore::TrackBase::TrackBase): Don't set m_validBCP47Language unless the language is valid.
3799         (WebCore::TrackBase::setLanguage): Clear m_validBCP47Language if the language is invalid. 
3800         Restructure the code to use early returns.
3801         (WebCore::TrackBase::validBCP47Language const): Deleted.
3802         * html/track/TrackBase.h:
3803         (WebCore::TrackBase::validBCP47Language const):
3804         * testing/Internals.cpp:
3805         (WebCore::Internals::textTrackBCP47Language):
3806         * testing/Internals.h:
3807         * testing/Internals.idl:
3808
3809 2020-03-17  Alex Christensen  <achristensen@webkit.org>
3810
3811         REGRESSION(r254856) Add exception for window.openDatabase to not masquerade as undefined in currently shipping Jesus Calling Devotional app
3812         https://bugs.webkit.org/show_bug.cgi?id=209160
3813         <rdar://problem/60297073>
3814
3815         Reviewed by Geoff Garen.
3816
3817         Manually verified this fixes the app, which compares typeof openDatabase with 'undefined'
3818         Going forward, we intend to completely remove WebSQL, so this is a temporary exception to our removal strategy.
3819
3820         * bindings/js/JSDOMWindowCustom.cpp:
3821         (WebCore::JSDOMWindow::openDatabase const):
3822         * platform/RuntimeApplicationChecks.h:
3823         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
3824         (WebCore::IOSApplication::isJesusCalling):
3825
3826 2020-03-17  Andres Gonzalez  <andresg_22@apple.com>
3827
3828         AXIsolatedTree removal should set all nodes to be removed on AX secondary thread.
3829         https://bugs.webkit.org/show_bug.cgi?id=209169
3830
3831         Reviewed by Chris Fleizach.
3832
3833         - AXIsolatedTree::removeTreeForPageID is called on the main thread but
3834         it should not remove the nodes in the main thread, but instead add them
3835         to the pending changes to be removed on the secondary thread. This was
3836         causing the problem of empty new trees when the old tree would go away
3837         but the client was holding a reference to an object that has been
3838         disconnected and thus had no children.
3839         - In addition, this change fixes an isolated tree mode crash in AccessibilityMenuList.
3840
3841         * accessibility/AXObjectCache.cpp:
3842         (WebCore::AXObjectCache::~AXObjectCache):
3843         * accessibility/AccessibilityMenuList.cpp:
3844         (WebCore::AccessibilityMenuList::isCollapsed const):
3845         * accessibility/isolatedtree/AXIsolatedTree.cpp:
3846         (WebCore::AXIsolatedTree::removeTreeForPageID):
3847
3848 2020-03-17  Jacob Uphoff  <jacob_uphoff@apple.com>
3849
3850         Unreviewed, reverting r257844.
3851
3852         this revision caused a test to start timing out
3853
3854         Reverted changeset:
3855
3856         "(r256513) [ Mac ] fast/scrolling/programmatic-scroll-to-zero-
3857         zero.html is a flaky failure"
3858         https://bugs.webkit.org/show_bug.cgi?id=207948
3859         https://trac.webkit.org/changeset/257844
3860
3861 2020-03-17  Commit Queue  <commit-queue@webkit.org>
3862
3863         Unreviewed, reverting r258339.
3864         https://bugs.webkit.org/show_bug.cgi?id=209179
3865
3866         "Is it sometimes breaking rendering" (Requested by youenn on
3867         #webkit).
3868
3869         Reverted changeset:
3870
3871         "FrameLoader should own its FrameLoaderClient"
3872         https://bugs.webkit.org/show_bug.cgi?id=208918
3873         https://trac.webkit.org/changeset/258339
3874
3875 2020-03-17  Philippe Normand  <pnormand@igalia.com>
3876
3877         RELEASE_LOG should not be Cocoa specific
3878         https://bugs.webkit.org/show_bug.cgi?id=195182
3879
3880         Reviewed by Konstantin Tokarev.
3881
3882         WPE/GTK build fixes related with Release logging support.
3883
3884         * bridge/npruntime_internal.h:
3885         * dom/ScriptedAnimationController.cpp:
3886         (WebCore::throttlingReasonToString):
3887         * page/PerformanceLogging.cpp:
3888         (WebCore::toString):
3889         * page/PerformanceMonitor.cpp:
3890         (WebCore::stringForCPUSamplingActivityState):
3891         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3892         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
3893         (WebCore::MediaPlayerPrivateGStreamer::logChannel const):
3894         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3895         (WebCore::MediaPlayerPrivateGStreamer::mediaPlayerLogIdentifier):
3896         (WebCore::MediaPlayerPrivateGStreamer::mediaPlayerLogger):
3897         * platform/graphics/gstreamer/eme/CDMProxyClearKey.cpp:
3898         (WebCore::CDMProxyClearKey::cencDecryptSubsampled):
3899         (WebCore::CDMProxyClearKey::initializeGcrypt):
3900         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
3901         * platform/graphics/gstreamer/mse/MediaSourceGStreamer.cpp:
3902         (WebCore::MediaSourceGStreamer::MediaSourceGStreamer):
3903         (WebCore::MediaSourceGStreamer::~MediaSourceGStreamer):
3904         (WebCore::MediaSourceGStreamer::addSourceBuffer):
3905         (WebCore::MediaSourceGStreamer::logChannel const):
3906         * platform/graphics/gstreamer/mse/MediaSourceGStreamer.h:
3907         * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
3908         (WebCore::SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer):
3909         (WebCore::SourceBufferPrivateGStreamer::logChannel const):
3910         * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:
3911         * platform/mediastream/AudioMediaStreamTrackRenderer.cpp:
3912         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
3913         (WebCore::computeLogLevel):
3914         * platform/network/soup/NetworkStorageSessionSoup.cpp:
3915         (WebCore::NetworkStorageSession::getRawCookies const):
3916
3917 2020-03-17  youenn fablet  <youenn@apple.com>
3918
3919         Safari doesn't insert mDNS candidates to SDP
3920         https://bugs.webkit.org/show_bug.cgi?id=209050
3921         <rdar://problem/60419936>
3922
3923         Reviewed by Eric Carlson.
3924
3925         Instead of removing host candidate lines in SDP, replace the host IP address by the corresponding mDNS name.
3926         Covered by updated test.
3927
3928         * Modules/mediastream/PeerConnectionBackend.cpp:
3929         (WebCore::extractIPAddress):
3930         (WebCore::PeerConnectionBackend::filterSDP const):
3931         (WebCore::PeerConnectionBackend::finishedRegisteringMDNSName):
3932         * Modules/mediastream/PeerConnectionBackend.h:
3933
3934 2020-03-17  Philippe Normand  <pnormand@igalia.com>
3935
3936         [GStreamer][MSE] Playback rate update support
3937         https://bugs.webkit.org/show_bug.cgi?id=208454
3938
3939         Reviewed by Xabier Rodriguez-Calvar.
3940
3941         Implement playback rate update support for the MSE player. Also
3942         includes drive-by logging cleanups.
3943
3944         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3945         (WebCore::MediaPlayerPrivateGStreamer::updatePlaybackRate):
3946         (WebCore::MediaPlayerPrivateGStreamer::setRate):
3947         (WebCore::MediaPlayerPrivateGStreamer::setPreservesPitch):
3948         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3949         (WebCore::MediaPlayerPrivateGStreamer::pipeline const):
3950         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
3951         (WebCore::MediaPlayerPrivateGStreamerMSE::seek):
3952         (WebCore::MediaPlayerPrivateGStreamerMSE::doSeek):
3953         (WebCore::MediaPlayerPrivateGStreamerMSE::maybeFinishSeek):
3954         (WebCore::MediaPlayerPrivateGStreamerMSE::seekCompleted):
3955         (WebCore::MediaPlayerPrivateGStreamerMSE::updatePlaybackRate): Deleted.
3956         (WebCore::MediaPlayerPrivateGStreamerMSE::setRate): Deleted.
3957         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
3958
3959 2020-03-16  Simon Fraser  <simon.fraser@apple.com>
3960
3961         Remove the zero-delay ScrollingCoordinatorMac commit timer
3962         https://bugs.webkit.org/show_bug.cgi?id=209164
3963
3964         Reviewed by Zalan Bujtas.
3965
3966         The scrolling tree on macOS should just commit at rendering update time. There's no need
3967         for a&