Missing cursor/caret showing in search field on google.com
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2019-05-14  Wenson Hsieh  <wenson_hsieh@apple.com>
2
3         Missing cursor/caret showing in search field on google.com
4         https://bugs.webkit.org/show_bug.cgi?id=197862
5         <rdar://problem/50291989>
6
7         Reviewed by Simon Fraser.
8
9         In this bug, the search field is inside of a fixed position container, which is inside of an empty "overflow:
10         hidden" form element (the new layout test demonstrates a simple version of this). The layer of the fixed
11         position container's renderer has an overflow clipping layer of itself, and its clipping rect is non-empty, so
12         the heuristic initially identifies the layer as not fully clipped. However, as the heuristic ascends the
13         RenderLayer tree, it then finds the layer for the "overflow: hidden" form element's renderer; this layer is
14         completely clipped, which causes the heuristic to incorrectly believe that the editable element is completely
15         clipped.
16
17         To fix the bug, this patch reworks the clipping portion of the heuristic, such that we no longer need to ascend
18         the layer tree. Instead of computing the clip rect relative to the nearest ancestor that has an overflow clip
19         and then walking up the layer tree repeating this process, simply compute the clip rect relative to RenderView's
20         layer, and then walk up to the parent frame and repeat if necessary.
21
22         Test: editing/selection/ios/do-not-hide-selection-in-visible-field.html
23
24         * rendering/RenderLayer.cpp:
25         (WebCore::RenderLayer::isTransparentOrFullyClippedRespectingParentFrames const):
26
27 2019-05-14  Andy Estes  <aestes@apple.com>
28
29         [Apple Pay] Payment APIs should be completely disabled in web views into which clients have injected user scripts
30         https://bugs.webkit.org/show_bug.cgi?id=197751
31         <rdar://problem/50631563>
32
33         Reviewed by Alex Christensen.
34
35         In r243324, when a document has had user agent scripts injected into it, payment APIs were
36         disabled at runtime by having all entry points return falsy values or throw exceptions
37         (e.g., ApplePaySession.canMakePayments() returns false).
38
39         In the case of user scripts in particular (e.g., WKUserScript), since we know whether these
40         exist at the time we create a document's DOMWindow, we can do better than r243324 by
41         completely disabling the payment APIs in the presence of user scripts.
42
43         To achieve this, this change introduces the 'EnabledByContext' extended attribute for
44         interfaces, which instructs the bindings generator to add a conjunct to the payment API
45         constructors that asks the interface's implementation class whether it should be enabled for
46         a given ScriptExecutionContext. The PaymentRequest and ApplePaySession interfaces adopt this
47         new extended attribute to implement the new user script check.
48
49         Added new API tests.
50
51         * Modules/applepay/ApplePaySession.idl:
52         * Modules/applepay/PaymentCoordinator.cpp:
53         (WebCore::PaymentCoordinator::shouldEnableApplePayAPIs const):
54         * Modules/applepay/PaymentCoordinator.h:
55         * Modules/applepay/PaymentSession.cpp:
56         (WebCore::PaymentSession::enabledForContext):
57         * Modules/applepay/PaymentSession.h:
58         * Modules/paymentrequest/PaymentHandler.cpp:
59         (WebCore::PaymentHandler::enabledForContext):
60         * Modules/paymentrequest/PaymentHandler.h:
61         * Modules/paymentrequest/PaymentRequest.cpp:
62         (WebCore::PaymentRequest::enabledForContext):
63         * Modules/paymentrequest/PaymentRequest.h:
64         * Modules/paymentrequest/PaymentRequest.idl:
65         * bindings/scripts/CodeGeneratorJS.pm:
66         (NeedsRuntimeCheck):
67         (GenerateRuntimeEnableConditionalString):
68         * bindings/scripts/IDLAttributes.json:
69         * bindings/scripts/preprocess-idls.pl:
70         (GenerateConstructorAttributes):
71         * bindings/scripts/test/JS/JSTestEnabledForContext.cpp: Added.
72         * bindings/scripts/test/JS/JSTestEnabledForContext.h: Added.
73         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
74         (WebCore::JSTestGlobalObject::finishCreation):
75         (WebCore::jsTestGlobalObjectTestEnabledForContextConstructorGetter):
76         (WebCore::jsTestGlobalObjectTestEnabledForContextConstructor):
77         (WebCore::setJSTestGlobalObjectTestEnabledForContextConstructorSetter):
78         (WebCore::setJSTestGlobalObjectTestEnabledForContextConstructor):
79         * bindings/scripts/test/TestEnabledForContext.idl: Added.
80
81 2019-05-14  Robin Morisset  <rmorisset@apple.com>
82
83         [WHLSL] parseEffectfulSuffix() is never called
84         https://bugs.webkit.org/show_bug.cgi?id=195864
85         <rdar://problem/50746278>
86
87         Reviewed by Myles C. Maxfield.
88
89         The fix is trivial: when parseEffectfulPrefix does not see a ++ or --, it must call parseEffectfulSuffix.
90
91         No test yet, as it is not testable until the property resolver is finished.
92         It will be tested with the rest of the compiler, when we port the testsuite from the js implementation (it already covers this case).
93
94         * Modules/webgpu/WHLSL/WHLSLParser.cpp:
95         (WebCore::WHLSL::Parser::parseEffectfulPrefix):
96
97 2019-05-14  Robin Morisset  <rmorisset@apple.com>
98
99         [WHLSL] parseEffectfulAssignment should not call parseCallExpression directly
100         https://bugs.webkit.org/show_bug.cgi?id=197890
101
102         Reviewed by Myles Maxfield.
103
104         callExpression already appears in effSuffix which is in effPrefix which is in effAssignment, so having it directly in effAssignment as well is useless (and ambiguous).
105         I've already fixed the grammar (https://github.com/gpuweb/WHLSL/commit/a07005f4d692fe3370618dca5db218992b362049), the grammar was always good, this patch is fixing the parser.
106
107         * Modules/webgpu/WHLSL/WHLSLParser.cpp:
108         (WebCore::WHLSL::Parser::parseEffectfulAssignment):
109
110 2019-05-14  Ross Kirsling  <ross.kirsling@sony.com>
111
112         Unreviewed restoration of non-unified build.
113
114         * Modules/cache/DOMCache.cpp:
115         * bindings/js/JSLazyEventListener.h:
116         * loader/NavigationScheduler.h:
117         * page/Quirks.cpp:
118         * page/Quirks.h:
119         * rendering/ClipRect.cpp:
120
121 2019-05-14  Zalan Bujtas  <zalan@apple.com>
122
123         Do not try to issue repaint while the render tree is being destroyed.
124         https://bugs.webkit.org/show_bug.cgi?id=197461
125         <rdar://problem/50368992>
126
127         Reviewed by Simon Fraser.
128
129         Test: http/tests/svg/crash-on-reload-with-filter.html
130
131         We don't need to compute repaint rects when the render tree is getting torn down. We'll issue a full repaint at some point.
132         Also during full render tree destruction the inline tree state is undefined. We should avoid accessing it.
133
134         * rendering/svg/RenderSVGResourceContainer.cpp:
135         (WebCore::RenderSVGResourceContainer::markAllClientLayersForInvalidation):
136
137 2019-05-14  Youenn Fablet  <youenn@apple.com>
138
139         A service worker process should app nap when all its clients app nap
140         https://bugs.webkit.org/show_bug.cgi?id=185626
141         <rdar://problem/46785908>
142
143         Reviewed by Alex Christensen.
144
145         Update RegistrableDomain to work with SecurityOriginData.
146         Add internal API to enable accessing to service worker process throttle state.
147
148         Test: http/wpt/service-workers/mac/processSuppression.https.html
149
150         * platform/RegistrableDomain.h:
151         (WebCore::RegistrableDomain::RegistrableDomain):
152         (WebCore::RegistrableDomain::matches const):
153         (WebCore::RegistrableDomain::registrableDomainFromHost):
154         * testing/ServiceWorkerInternals.cpp:
155         (WebCore::ServiceWorkerInternals::isThrottleable const):
156         * testing/ServiceWorkerInternals.h:
157         * testing/ServiceWorkerInternals.idl:
158         * workers/service/SWClientConnection.h:
159         * workers/service/context/SWContextManager.cpp:
160         * workers/service/context/SWContextManager.h:
161         * workers/service/server/SWServer.cpp:
162         (WebCore::SWServer::serverToContextConnectionCreated):
163         * workers/service/server/SWServer.h:
164         (WebCore::SWServer::Connection::server const):
165         (WebCore::SWServer::connections const):
166         * workers/service/server/SWServerToContextConnection.h:
167
168 2019-05-14  Youenn Fablet  <youenn@apple.com>
169
170         getUserMedia capture changes on iOS after homing out
171         https://bugs.webkit.org/show_bug.cgi?id=197707
172
173         Reviewed by Eric Carlson.
174
175         In case of muting an AVVideoCaptureSource on iOS, the session is cleared.
176         We need to store the preset information, to setup the new session on unnmuting correctly.
177         Manually tested.
178
179         * platform/mediastream/mac/AVVideoCaptureSource.h:
180         * platform/mediastream/mac/AVVideoCaptureSource.mm:
181         (WebCore::AVVideoCaptureSource::setSizeAndFrameRateWithPreset):
182         (WebCore::AVVideoCaptureSource::setSessionSizeAndFrameRate):
183         (WebCore::AVVideoCaptureSource::setupCaptureSession):
184
185 2019-05-14  Oriol Brufau  <obrufau@igalia.com>
186
187         [css-grid] Update grid when changing auto repeat type
188         https://bugs.webkit.org/show_bug.cgi?id=197849
189
190         Reviewed by Javier Fernandez.
191
192         Test: imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-change-auto-repeat-tracks.html
193
194         This patch makes two 'repeat()' values for 'grid-template' be considered
195         to be different if one uses 'auto-fill' and the other 'auto-fit'.
196
197         Previously, they were considered to be equal if the repeated values
198         were the same, without comparing the repeat type. Therefore, the grid
199         was not updated when setting both values one after the other.
200
201         * css/CSSGridAutoRepeatValue.cpp:
202         (WebCore::CSSGridAutoRepeatValue::equals const):
203         * css/CSSGridAutoRepeatValue.h:
204
205 2019-05-14  Antti Koivisto  <antti@apple.com>
206
207         Event region computation should respect transforms
208         https://bugs.webkit.org/show_bug.cgi?id=197836
209         <rdar://problem/50762971>
210
211         Reviewed by Darin Adler.
212
213         * platform/graphics/transforms/AffineTransform.cpp:
214         (WebCore::AffineTransform::mapRegion const):
215
216         Add support for transforming regions. Non-rectlinear results use enclosing rects.
217
218         * platform/graphics/transforms/AffineTransform.h:
219         * rendering/EventRegion.cpp:
220         (WebCore::EventRegionContext::EventRegionContext):
221         (WebCore::EventRegionContext::pushTransform):
222         (WebCore::EventRegionContext::popTransform):
223         (WebCore::EventRegionContext::unite):
224         (WebCore::EventRegionContext::contains const):
225
226         Add a context object that holds the current transform.
227
228         * rendering/EventRegion.h:
229         (WebCore::EventRegion::makeContext):
230         * rendering/InlineTextBox.cpp:
231         (WebCore::InlineTextBox::paint):
232         * rendering/PaintInfo.h:
233
234         Replace the region object with the context.
235
236         * rendering/RenderBlock.cpp:
237         (WebCore::RenderBlock::paintObject):
238         * rendering/RenderLayer.cpp:
239         (WebCore::RenderLayer::paintLayerByApplyingTransform):
240
241         Apply transforms to regions if needed.
242
243         (WebCore::RenderLayer::collectEventRegionForFragments):
244         * rendering/RenderLayer.h:
245         * rendering/RenderLayerBacking.cpp:
246         (WebCore::RenderLayerBacking::updateEventRegion):
247         * rendering/SimpleLineLayoutFunctions.cpp:
248         (WebCore::SimpleLineLayout::paintFlow):
249
250 2019-05-14  Youenn Fablet  <youenn@apple.com>
251
252         Video frame resizing should be using Trim
253         https://bugs.webkit.org/show_bug.cgi?id=197722
254         <rdar://problem/50602188>
255
256         Reviewed by Eric Carlson.
257
258         Move from letter box to trim mode for resizing.
259         This ensures no black stripes are present when rendering the stream.
260
261         Test: fast/mediastream/resize-trim.html
262
263         * platform/cocoa/VideoToolboxSoftLink.cpp:
264         * platform/cocoa/VideoToolboxSoftLink.h:
265         * platform/graphics/cv/ImageTransferSessionVT.mm:
266         (WebCore::ImageTransferSessionVT::ImageTransferSessionVT):
267
268 2019-05-14  Yusuke Suzuki  <ysuzuki@apple.com>
269
270         [JSC] Shrink sizeof(UnlinkedFunctionExecutable) more
271         https://bugs.webkit.org/show_bug.cgi?id=197833
272
273         Reviewed by Darin Adler.
274
275         * testing/Internals.cpp:
276         (WebCore::Internals::parserMetaData):
277
278 2019-05-14  Antoine Quint  <graouts@apple.com>
279
280         [Pointer Events] The pointerenter and pointerleave events target the wrong element on iOS
281         https://bugs.webkit.org/show_bug.cgi?id=197881
282         <rdar://problem/50187657>
283
284         Reviewed by Dean Jackson.
285
286         Test: pointerevents/ios/enter-leave-target.html
287
288         The "pointerenter" and "pointerleave" should target the element on which the event listener was added and not
289         the element that would otherwise hit test. This matches the behavior of "mouseenter" and "mouseleave" on macOS.
290
291         * page/PointerCaptureController.cpp:
292         (WebCore::PointerCaptureController::dispatchEventForTouchAtIndex):
293
294 2019-05-14  Said Abou-Hallawa  <sabouhallawa@apple.com>
295
296         [CG] Adding support for HEIF-sequence ('public.heics') images
297         https://bugs.webkit.org/show_bug.cgi?id=197384
298
299         Reviewed by Simon Fraser.
300
301         -- Get the image repetitionCount and the frame duration.
302         -- Add a new function setAdditionalSupportedImageTypesForTesting() which
303            takes a delimited String.
304         -- Add internal APIs to retrive the image frame count and the frame
305            duration.
306
307         Tests: fast/images/animated-heics-draw.html
308                fast/images/animated-heics-verify.html
309
310         * platform/graphics/ImageSource.h:
311         * platform/graphics/cg/ImageDecoderCG.cpp:
312         (WebCore::animationPropertiesFromProperties):
313         (WebCore::animationHEICSPropertiesFromProperties):
314         (WebCore::ImageDecoderCG::repetitionCount const):
315         (WebCore::ImageDecoderCG::frameDurationAtIndex const):
316         * platform/graphics/cg/UTIRegistry.cpp:
317         (WebCore::setAdditionalSupportedImageTypesForTesting):
318         * platform/graphics/cg/UTIRegistry.h:
319         * testing/Internals.cpp:
320         (WebCore::Internals::imageFrameCount):
321         (WebCore::Internals::imageFrameDurationAtIndex):
322         * testing/Internals.h:
323         * testing/Internals.idl:
324         * testing/js/WebCoreTestSupport.cpp:
325         (WebCoreTestSupport::setAdditionalSupportedImageTypesForTesting):
326         * testing/js/WebCoreTestSupport.h:
327
328 2019-05-14  Manuel Rego Casasnovas  <rego@igalia.com>
329
330         [css-grid] Use max size to compute auto repeat tracks
331         https://bugs.webkit.org/show_bug.cgi?id=197854
332
333         Reviewed by Javier Fernandez.
334
335         When available size is indefinite we should use max size to compute the number of auto repeat tracks.
336
337         The spec text is very clear (https://drafts.csswg.org/css-grid/#auto-repeat):
338         > When auto-fill is given as the repetition number, if the grid container
339         > has a definite size or **max size** in the relevant axis...
340
341         So far we were not doing that for widths, in this patch we modify RenderGrid::computeAutoRepeatTracksCount()
342         to do the same than for heights.
343
344         We also take advantage to fix problems related to min|max sizes and box-sizing property,
345         that were inconsistent for columns and rows.
346
347         Tests: imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-max-size-001.html
348                imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-max-size-002.html
349                imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-min-max-size-001.html
350                imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-min-size-001.html
351                imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-min-size-002.html
352
353         * rendering/RenderGrid.cpp:
354         (WebCore::RenderGrid::computeAutoRepeatTracksCount const):
355
356 2019-05-14  Joonghun Park  <pjh0718@gmail.com>
357
358         Implement page-break-* and -webkit-column-break-* as legacy-shorthands.
359         https://bugs.webkit.org/show_bug.cgi?id=197656
360
361         Reviewed by Darin Adler.
362
363         According to https://drafts.csswg.org/css-cascade-4/#legacy-shorthand,
364         implement page-break-* and -webkit-column-break-* as legacy-shorthands for break-*.
365
366         This change also serialize page-break-* properties
367         to CSSStyleDeclaration,
368         per https://drafts.csswg.org/css-break/#page-break-properties.
369
370         * css/CSSProperties.json:
371         * css/StyleBuilderConverter.h:
372         (WebCore::StyleBuilderConverter::convertFontSynthesis):
373         (WebCore::StyleBuilderConverter::convertPageBreakBetween): Deleted.
374         (WebCore::StyleBuilderConverter::convertPageBreakInside): Deleted.
375         (WebCore::StyleBuilderConverter::convertColumnBreakBetween): Deleted.
376         (WebCore::StyleBuilderConverter::convertColumnBreakInside): Deleted.
377         * css/StyleProperties.cpp:
378         (WebCore::StyleProperties::getPropertyValue const):
379         (WebCore::StyleProperties::pageBreakPropertyValue const):
380         * css/StyleProperties.h:
381         * css/parser/CSSPropertyParser.cpp:
382         (WebCore::CSSPropertyParser::parseValueStart):
383         (WebCore::mapFromPageBreakBetween):
384         (WebCore::CSSPropertyParser::parseShorthand):
385         (WebCore::isLegacyBreakProperty): Deleted.
386
387 2019-05-14  Javier Fernandez  <jfernandez@igalia.com>
388
389         Implement "line-break: anywhere"
390         https://bugs.webkit.org/show_bug.cgi?id=181169
391         <rdar://problem/48507088>
392
393         Reviewed by Myles C. Maxfield.
394
395         The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break'
396         CSS property in order to allow additional breaking opportunities not
397         considered in the definition of the 'word-break: break-all'.
398
399         [1] https://github.com/w3c/csswg-drafts/issues/1171
400
401         Tests: imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-003.html
402                imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-004.html
403                imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-005.html
404                imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-006.html
405                imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-007.html
406                imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-008.html
407                imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-009.html
408                imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-010.html
409                imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-011.html
410                imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-012.html
411                imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-016.html
412                imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-017.html
413                imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-018.html
414                imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-019.html
415                imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-021.html
416                imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-022.html
417                imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-023.html
418                imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-024.html
419
420         * css/CSSPrimitiveValueMappings.h:
421         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
422         (WebCore::CSSPrimitiveValue::operator LineBreak const):
423         * css/CSSProperties.json:
424         * css/CSSValueKeywords.in:
425         * css/parser/CSSParserFastPaths.cpp:
426         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
427         * rendering/BreakLines.h:
428         (WebCore::nextBreakablePositionBreakCharacter):
429         (WebCore::isBreakable):
430         * rendering/RenderText.cpp:
431         (WebCore::mapLineBreakToIteratorMode):
432         (WebCore::RenderText::computePreferredLogicalWidths):
433         * rendering/line/BreakingContext.h:
434         (WebCore::BreakingContext::handleText):
435         * rendering/style/RenderStyleConstants.h:
436
437 2019-05-13  Yusuke Suzuki  <ysuzuki@apple.com>
438
439         Unreviewed, build fix after 245258, missing ThreadSpecific.h include
440         https://bugs.webkit.org/show_bug.cgi?id=197146
441
442         * platform/ios/wak/WebCoreThread.mm:
443
444 2019-05-13  Yusuke Suzuki  <ysuzuki@apple.com>
445
446         [WTF] Simplify GCThread and CompilationThread flags by adding them to WTF::Thread
447         https://bugs.webkit.org/show_bug.cgi?id=197146
448
449         Reviewed by Saam Barati.
450
451         * Modules/indexeddb/IDBDatabase.cpp:
452         (WebCore::IDBDatabase::hasPendingActivity const):
453         * Modules/indexeddb/IDBRequest.cpp:
454         (WebCore::IDBRequest::hasPendingActivity const):
455         * Modules/indexeddb/IDBTransaction.cpp:
456         (WebCore::IDBTransaction::hasPendingActivity const):
457
458 2019-05-13  Geoffrey Garen  <ggaren@apple.com>
459
460         Downgrade RELEASE_ASSERT TO RELEASE_LOG_FAULT for SQLite Class A files
461         https://bugs.webkit.org/show_bug.cgi?id=197760
462
463         Reviewed by Jer Noble.
464
465         Only makeSafeToUseMemoryMapForPath() if needed. (Fixed missing brace.)
466
467         * platform/sql/SQLiteDatabase.cpp:
468         (WebCore::SQLiteDatabase::open):
469
470 2019-05-13  Tadeu Zagallo  <tzagallo@apple.com>
471
472         JSObject::getOwnPropertyDescriptor is missing an exception check
473         https://bugs.webkit.org/show_bug.cgi?id=197693
474
475         Reviewed by Saam Barati.
476
477         JSObject::getOwnPropertyDescriptor assumes that getOwnPropertySlot returns false
478         if an exception is thrown, but that was not true for JSLocation::getOwnPropertySlotCommon.
479
480         This is already covered by http/tests/security/cross-frame-access-getOwnPropertyDescriptor.html
481
482         * bindings/js/JSLocationCustom.cpp:
483         (WebCore::getOwnPropertySlotCommon):
484         (WebCore::JSLocation::getOwnPropertySlot):
485         (WebCore::JSLocation::getOwnPropertySlotByIndex):
486
487 2019-05-13  Antti Koivisto  <antti@apple.com>
488
489         REGRESSION (r245208): compositing/shared-backing/sharing-bounds-non-clipping-shared-layer.html asserts
490         https://bugs.webkit.org/show_bug.cgi?id=197818
491         <rdar://problem/50705762>
492
493         Reviewed by Simon Fraser.
494
495         Tests: fast/scrolling/ios/event-region-scale-transform-shared.html
496                fast/scrolling/ios/event-region-translate-transform-shared.html
497
498         This fixes the assert. However the added tests demonstrate that transform is not taken into account
499         when computing the event region, https://bugs.webkit.org/show_bug.cgi?id=197836.
500
501         * rendering/RenderLayerBacking.cpp:
502         (WebCore::RenderLayerBacking::updateEventRegion):
503
504 2019-05-13  Wenson Hsieh  <wenson_hsieh@apple.com>
505
506         [macOS] Font formatting options don't work when composing a message in Yahoo mail
507         https://bugs.webkit.org/show_bug.cgi?id=197813
508         <rdar://problem/49382250>
509
510         Reviewed by Darin Adler.
511
512         The bug happens because on mousedown, the "Aa Font" menu item's event handler hides itself before changing the
513         font at the text selection. This causes us to clear the selection in FocusController::setFocusedElement.
514
515         There is existing logic in clearSelectionIfNeeded that would normally prevent us from clearing the selection due
516         to the mousePressNode not being able to start a selection. However, since the clickable element in this case is
517         hidden during mousedown, it is missing a renderer, and we bail from the `mousePressNode->renderer() &&
518         !mousePressNode->canStartSelection()` check as a result.
519
520         This check was orginally added in https://trac.webkit.org/r24334 to avoid clearing the selection when clicking
521         a button; the intention appears to have been making it so that clicking on something that could not start a
522         selection (back then, synonymous with -webkit-user-select: ignore;) would not clear the current selection; to
523         this end, it seems odd to additionally require that the thing being clicked should still have a renderer, so
524         it seems safe to remove this requirement.
525
526         Test: editing/selection/preserve-selection-when-clicking-button.html
527
528         * page/FocusController.cpp:
529         (WebCore::clearSelectionIfNeeded):
530
531 2019-05-13  Eric Carlson  <eric.carlson@apple.com>
532
533         https://bugs.webkit.org/show_bug.cgi?id=197793
534         <rdar://problem/46429187>
535
536         Unreviewed, build fix after r245199.
537
538         * platform/audio/ios/MediaSessionManagerIOS.mm:
539         (WebCore::MediaSessionManageriOS::externalOutputDeviceAvailableDidChange):
540
541 2019-05-13  Darin Adler  <darin@apple.com>
542
543         WHLSLPrepare.cpp always recompiles, even if nothing was changed
544         https://bugs.webkit.org/show_bug.cgi?id=197151
545
546         Reviewed by Dan Bernstein and Keith Rollin.
547
548         * DerivedSources-input.xcfilelist: Script updated this automatically after
549         DerivedSources.make was corrected.
550         * DerivedSources-output.xcfilelist: Ditto, although I had to manually remove
551         one bogus leftover reference to WHLSLStandardLibrary.cpp.
552
553         * DerivedSources.make: Updated the rule that builds WHSLStandardLibrary.h to
554         no longer refer to nonexistent WHLSLStandardLibrary.cpp. Because the dependency
555         was on a file that was never created, the rule to regenerate WHSLStandardLibrary.h
556         was running on every build, instead of only when one of the dependencies changed.
557
558 2019-05-12  Simon Fraser  <simon.fraser@apple.com>
559
560         When the set of backing-sharing layers changes, we need to issue a repaint
561         https://bugs.webkit.org/show_bug.cgi?id=197825
562
563         Reviewed by Zalan Bujtas.
564
565         If the set of layers painting into a shared backing store changes, we need
566         to repaint that backing store. This happens when scrolling as shared layers
567         enter the visible area.
568
569         Test: compositing/shared-backing/overflow-scroll/repaint-shared-on-scroll.html
570
571         * rendering/RenderLayerBacking.cpp:
572         (WebCore::RenderLayerBacking::setBackingSharingLayers):
573
574 2019-05-02  Simon Fraser  <simon.fraser@apple.com>
575
576         Add logging for RenderLayer clip rects
577         https://bugs.webkit.org/show_bug.cgi?id=197547
578
579         Reviewed by Zalan Bujtas.
580
581         Add a ClipRects log channel, and stream output for ClipRect and ClipRects.
582
583         The ClipRect code is performance sensitive, even in debug, so guard the log sites
584         with clipRectsLogEnabled() because the macro still evaluates its arguments even if
585         the channel is disabled (we need some better way to log that doesn't do this).
586
587         * platform/Logging.h:
588         * rendering/ClipRect.cpp:
589         (WebCore::operator<<):
590         * rendering/ClipRect.h:
591         * rendering/RenderLayer.cpp:
592         (WebCore::operator<<):
593         (WebCore::RenderLayer::calculateClipRects const):
594         * rendering/RenderLayer.h:
595
596 2019-05-12  Simon Fraser  <simon.fraser@apple.com>
597
598         Refactor composited backing-sharing code
599         https://bugs.webkit.org/show_bug.cgi?id=197824
600
601         Reviewed by Zalan Bujtas.
602
603         Clean up the backing-sharing code to share more code, and make it easier to understand.
604         
605         Moves more logic into member functions on BackingSharingState, which are named to make
606         their functions clearer: startBackingSharingSequence/endBackingSharingSequence.
607         
608         computeCompositingRequirements() and traverseUnchangedSubtree() now just call
609         updateBeforeDescendantTraversal/updateAfterDescendantTraversal.
610
611         No behavior change.
612
613         * rendering/RenderLayerBacking.cpp:
614         (WebCore::RenderLayerBacking::willBeDestroyed):
615         (WebCore::RenderLayerBacking::setBackingSharingLayers): Remove the early return, since
616         we need to call setBackingProviderLayer() on the sharing layers in both code paths.
617         (WebCore::RenderLayerBacking::removeBackingSharingLayer):
618         (WebCore::RenderLayerBacking::clearBackingSharingLayers):
619         * rendering/RenderLayerCompositor.cpp:
620         (WebCore::RenderLayerCompositor::BackingSharingState::backingProviderCandidate const):
621         (WebCore::RenderLayerCompositor::BackingSharingState::appendSharingLayer):
622         (WebCore::RenderLayerCompositor::BackingSharingState::startBackingSharingSequence):
623         (WebCore::RenderLayerCompositor::BackingSharingState::endBackingSharingSequence):
624         (WebCore::RenderLayerCompositor::BackingSharingState::updateBeforeDescendantTraversal):
625         (WebCore::RenderLayerCompositor::BackingSharingState::updateAfterDescendantTraversal):
626         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
627         (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
628         (WebCore::RenderLayerCompositor::BackingSharingState::resetBackingProviderCandidate): Deleted.
629         * rendering/RenderLayerCompositor.h:
630
631 2019-05-12  Youenn Fablet  <youenn@apple.com>
632
633         Use clampTo in AVVideoCaptureSource::setSizeAndFrameRateWithPreset
634         https://bugs.webkit.org/show_bug.cgi?id=197704
635
636         Reviewed by Alex Christensen.
637
638         Use clampTo as suggested in bug 196214 review.
639         No change of behavior.
640
641         * platform/mediastream/mac/AVVideoCaptureSource.mm:
642         (WebCore::AVVideoCaptureSource::setSizeAndFrameRateWithPreset):
643
644 2019-05-12  Youenn Fablet  <youenn@apple.com>
645
646         Use the main screen for screen capture
647         https://bugs.webkit.org/show_bug.cgi?id=197804
648         <rdar://problem/47671383>
649
650         Reviewed by Eric Carlson.
651
652         If the main screen, i.e. the screen that has focus at the time of
653         selection of the screen to capture, is capturable, add it to the list
654         of screen devices, but do not add any other screen.
655         This will make sure the main screen is selected.
656         Manually tested.
657
658         * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
659         (WebCore::ScreenDisplayCaptureSourceMac::screenCaptureDevices):
660
661 2019-05-12  Takashi Komori  <Takashi.Komori@sony.com>
662
663         [Curl] Suppress extra didReceiveAuthenticationChallenge call when accessing a server which checks basic auth.
664         https://bugs.webkit.org/show_bug.cgi?id=197650
665
666         Reviewed by Fujii Hironori.
667
668         When Curl port accesses a page which checks Basic Authentication credential and server trust challenge occurs,
669         Curl port calls extra didReceiveAuthenticationChallenge unnecessarily.
670         This is because Curl port discards information about allowed server trust challenge before in NetworkDataTaskCurl::restartWithCredential.
671
672         Test: http/tests/ssl/curl/certificate-and-authentication.html
673
674         * platform/network/curl/CurlRequest.h:
675         (WebCore::CurlRequest::isServerTrustEvaluationDisabled):
676
677 2019-05-11  Simon Fraser  <simon.fraser@apple.com>
678
679         Overflow scroll that becomes non-scrollable should stop being composited
680         https://bugs.webkit.org/show_bug.cgi?id=197817
681         <rdar://problem/50697290>
682
683         Reviewed by Antti Koivisto.
684
685         Remove the iOS-specific #ifdef around code that triggers a compositing re-evaluation
686         when scrolling state changes.
687
688         Test: compositing/scrolling/async-overflow-scrolling/become-non-scrollable.html
689
690         * rendering/RenderLayer.cpp:
691         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
692
693 2019-05-11  Simon Fraser  <simon.fraser@apple.com>
694
695         Layer bounds are incorrect for sharing layers that paint with transforms
696         https://bugs.webkit.org/show_bug.cgi?id=197768
697         <rdar://problem/50695493>
698
699         Reviewed by Zalan Bujtas.
700
701         We don't need to traverse shared layers if the backing-provider has overflow clip,
702         because we know they are containing-block descendants and therefore clipped.
703
704         Note tha the CSS "clip" property doesn't guarantee this, because the clip rect
705         can be larger than the element, so in that case we just traverse shared layers.
706
707         Tests: compositing/shared-backing/sharing-bounds-clip.html
708                compositing/shared-backing/sharing-bounds-non-clipping-shared-layer.html
709                compositing/shared-backing/sharing-bounds-transformed-sharing-layer.html
710                compositing/shared-backing/sharing-bounds.html
711
712         * rendering/RenderLayerBacking.cpp:
713         (WebCore::RenderLayerBacking::updateCompositedBounds):
714
715 2019-05-11  Simon Fraser  <simon.fraser@apple.com>
716
717         Translucent gradient rendering bug due to will-change transform
718         https://bugs.webkit.org/show_bug.cgi?id=197654
719         <rdar://problem/50547664>
720
721         Reviewed by Dean Jackson.
722         
723         We failed to re-evaluate 'contentsOpaque' when a background changed, because this
724         happened in updateGeometry() and that doesn't run for background changes.
725         
726         However, 'contentsOpaque' also requires knowing about geometry because we have to
727         turn it off when there's subpixel positioning, and updateConfiguration()
728         runs before updateGeometry().
729         
730         So compute m_hasSubpixelRounding in updateGeometry() and set contentsOpaque in
731         updateAfterDescendants().
732
733         Test: compositing/contents-opaque/background-change-to-transparent.html
734
735         * rendering/RenderLayerBacking.cpp:
736         (WebCore::RenderLayerBacking::updateConfiguration):
737         (WebCore::RenderLayerBacking::updateGeometry):
738         (WebCore::RenderLayerBacking::updateAfterDescendants):
739         * rendering/RenderLayerBacking.h:
740
741 2019-05-11  Simon Fraser  <simon.fraser@apple.com>
742
743         When the scroller hosting a shared layer becomes non-scrollable, content disappears
744         https://bugs.webkit.org/show_bug.cgi?id=197766
745         <rdar://problem/50695808>
746
747         Reviewed by Zalan Bujtas.
748
749         RenderLayerCompositor::requiresOwnBackingStore() should return true for a layer that shares
750         its backing store. We always made backing for overlap layers, so even  if the sharing layers
751         have no painted content, this should rarely be a backing store memory regression.
752
753         Test: compositing/shared-backing/overflow-scroll/sharing-layer-becomes-non-scrollable.html
754
755         * rendering/RenderLayerCompositor.cpp:
756         (WebCore::RenderLayerCompositor::requiresOwnBackingStore const):
757
758 2019-05-11  Simon Fraser  <simon.fraser@apple.com>
759
760         Backing-sharing layers with transforms render incorrectly
761         https://bugs.webkit.org/show_bug.cgi?id=197692
762         <rdar://problem/50652127>
763
764         Reviewed by Antti Koivisto.
765
766         Layers that paint into shared backing need to enter the RenderLayer painting code
767         in a way that paints the filters, transforms, opacity and blending.
768         
769         RenderLayerBacking::paintIntoLayer() normally enters at paintLayerContents(), because
770         the effects are rendered via the GraphicsLayer, but shared layers will paint effects.
771         Note that if the backing-provider has effects, it will be the stacking context
772         for the shared layers, so it's correct that sharing layers are impacted by effects
773         on the backing-provider.
774
775         In addition, we have to ensure that we don't over-eagerly make layers shared.
776         Consider:
777         
778         <div class="clipping">
779             <div class="sharing">
780                 <div class="inner">
781                 </div>
782             </div>
783         </div>
784         
785         Here "clipping" is the provider layer, "sharing" paints into shared backing, but
786         we don't want to also mark "inner" as sharing, since "sharing" will just paint it.
787         This is akin to avoiding unnecessary compositing of z-order descendants when they can just
788         paint.
789         
790         To do this we need to ensure that sharing layers are treated like compositing layers
791         in the overlap map, i.e. when a layer is sharing, we call overlapMap.pushCompositingContainer(),
792         and later overlapMap.popCompositingContainer().
793
794         Tests: compositing/shared-backing/nested-shared-layers-with-opacity.html
795                compositing/shared-backing/shared-layer-has-blending.html
796                compositing/shared-backing/shared-layer-has-filter.html
797                compositing/shared-backing/shared-layer-has-opacity.html
798                compositing/shared-backing/shared-layer-has-reflection.html
799                compositing/shared-backing/shared-layer-has-transform.html
800                compositing/shared-backing/shared-layer-isolates-blending.html
801                compositing/shared-backing/shared-transformed-layer-bounds.html
802                compositing/shared-backing/sharing-layer-becomes-non-scrollable.html
803                compositing/shared-backing/sharing-layer-has-effect.html
804
805         * rendering/RenderLayer.cpp:
806         (WebCore::RenderLayer::paintLayer):
807         (WebCore::RenderLayer::paintLayerWithEffects):
808         * rendering/RenderLayer.h:
809         * rendering/RenderLayerBacking.cpp:
810         (WebCore::RenderLayerBacking::paintIntoLayer):
811         * rendering/RenderLayerCompositor.cpp:
812         (WebCore::RenderLayerCompositor::CompositingState::stateForPaintOrderChildren const):
813         (WebCore::backingProviderLayerCanIncludeLayer):
814         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
815         (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
816
817 2019-05-10  Youenn Fablet  <youenn@apple.com>
818
819         A service worker instance should be terminated when its SWServer is destroyed
820         https://bugs.webkit.org/show_bug.cgi?id=197801
821         <rdar://problem/50587270>
822
823         Reviewed by Chris Dumez.
824
825         On session destruction, the SWServer is destroyed.
826         At that time, it should terminate all its running service workers.
827         Covered by updated API test.
828
829         * workers/service/server/SWServer.cpp:
830         (WebCore::SWServer::~SWServer):
831
832 2019-05-10  Eric Carlson  <eric.carlson@apple.com>
833
834         [iOS] HTMLMediaElement sometimes doesn't send 'webkitplaybacktargetavailabilitychanged' event
835         https://bugs.webkit.org/show_bug.cgi?id=197793
836         <rdar://problem/46429187>
837
838         Reviewed by Jer Noble.
839
840         * html/MediaElementSession.cpp:
841         (WebCore::MediaElementSession::MediaElementSession): Initialize m_hasPlaybackTargets.
842
843         * platform/audio/ios/MediaSessionManagerIOS.mm:
844         (WebCore::MediaSessionManageriOS::externalOutputDeviceAvailableDidChange): Log
845         target availability.
846         (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]): Call the client 
847         externalOutputDeviceAvailableDidChange method after the AVRouteDetector is available.
848
849 2019-05-09  Geoffrey Garen  <ggaren@apple.com>
850
851         Downgrade RELEASE_ASSERT TO RELEASE_LOG_FAULT for SQLite Class A files
852         https://bugs.webkit.org/show_bug.cgi?id=197760
853
854         Reviewed by Jer Noble.
855
856         We have all the data we need, and this crash is happening more than
857         expected.
858
859         * platform/sql/SQLiteDatabase.cpp:
860         (WebCore::SQLiteDatabase::open):
861
862 2019-05-10  Zalan Bujtas  <zalan@apple.com>
863
864         [iOS] baidu.com: Synthetic bold renders too far apart, appears doubled.
865         https://bugs.webkit.org/show_bug.cgi?id=197781
866         <rdar://problem/48027412>
867
868         Reviewed by Simon Fraser.
869
870         Synthetic bold is essentially two regular glyphs painted with an offset. While on macOS this offset is always 1px (CSS), on iOS larger font produces higher offset value. At paint time, this offset value (in CSS px unit) get converted
871         to a device pixel value taking context scale into account. This conversion ensures that the gap between the 2 regular glyphs won't get wider (in device pixels) as the user pinch zooms in.
872         This works as long as the scale on the context is >= 1. This patch ensures that a scaled down context won't blow up this gap.
873
874         Test: fast/text/large-synthetic-bold-with-scale-transform.html
875
876         * platform/graphics/cocoa/FontCascadeCocoa.mm:
877         (WebCore::FontCascade::drawGlyphs):
878
879 2019-05-10  Brent Fulgham  <bfulgham@apple.com>
880
881         Gracefully handle inaccessible font face data
882         https://bugs.webkit.org/show_bug.cgi?id=197762
883         <rdar://problem/50433861>
884
885         Reviewed by Per Arne Vollan.
886
887         Make sure CSS Font Face handling gracefully recovers from
888         missing font data.
889
890         Test: fast/text/missing-font-crash.html
891
892         * css/CSSFontFace.cpp:
893         (WebCore::CSSFontFace::fontLoadEventOccurred):
894         (WebCore::CSSFontFace::timeoutFired):
895         (WebCore::CSSFontFace::fontLoaded):
896         (WebCore::CSSFontFace::font):
897
898 2019-05-10  Simon Fraser  <simon.fraser@apple.com>
899
900         ASSERT(isSelfPaintingLayer() || hasSelfPaintingLayerDescendant()) on nytimes.com after r245170
901         https://bugs.webkit.org/show_bug.cgi?id=197776
902
903         Reviewed by Zalan Bujtas.
904
905         Only try to paint into shared backing for layers that are able to be composited. This
906         avoids trying to do sharing for non-self-painting layers, which doesn't make sense.
907
908         Test: compositing/shared-backing/overflow-scroll/non-self-painting-layer-should-not-share.html
909
910         * rendering/RenderLayerCompositor.cpp:
911         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
912
913 2019-05-10  Michael Catanzaro  <mcatanzaro@igalia.com>
914
915         Fix a bunch of compiler warnings
916         https://bugs.webkit.org/show_bug.cgi?id=197785
917
918         Reviewed by Don Olmstead.
919
920         * CMakeLists.txt: WebCoreTestSupport should accept extra SYSTEM includes.
921         * PlatformGTK.cmake: GTK includes should be added to SYSTEM headers to avoid warnings.
922         * inspector/InspectorCanvas.cpp: Add preprocessor guards to fix unused function warning.
923         * rendering/RenderLayer.cpp: Fix unused variable warning.
924         (WebCore::RenderLayer::updateClipRects):
925
926 2019-05-10  Antti Koivisto  <antti@apple.com>
927
928         Event region generation needs to know about backing-sharing
929         https://bugs.webkit.org/show_bug.cgi?id=197694
930         <rdar://problem/50584991>
931
932         Reviewed by Simon Fraser.
933
934         Test: pointerevents/ios/touch-action-region-backing-sharing.html
935
936         * rendering/RenderLayerBacking.cpp:
937         (WebCore::RenderLayerBacking::updateEventRegion):
938
939         Gather event region from backing sharing layers too.
940
941 2019-05-10  Michael Catanzaro  <mcatanzaro@igalia.com>
942
943         [WPE][GTK] Add WebKitWebPage::did-associate-form-controls-for-frame and deprecate original did-associate-form-controls
944         https://bugs.webkit.org/show_bug.cgi?id=197271
945
946         Reviewed by Youenn Fablet.
947
948         * dom/Document.cpp:
949         (WebCore::Document::didAssociateFormControlsTimerFired):
950         * loader/EmptyClients.h:
951         * page/ChromeClient.h:
952
953 2019-05-09  Simon Fraser  <simon.fraser@apple.com>
954
955         Implement backing-sharing in compositing layers, allowing overlap layers to paint into the backing store of another layer
956         https://bugs.webkit.org/show_bug.cgi?id=197561
957         <rdar://problem/50445998>
958
959         Reviewed by Antti Koivisto.
960
961         This change introduces the concept of layers that share backing store for compositing. A layer
962         which is sharing its backing store first paints itself, and then some set of layers which come
963         later in paint order in the same stacking context. This reduces the composited layer count in
964         some overflow scrolling scenarios, thereby also simplifying the scrolling tree.
965         
966         A backing-shared layer stores a vector of "sharing" RenderLayer* in its RenderLayerBacking. At
967         paint time, the owning layer is painted, then the sharing layers, setting the owning layer as the
968         painting root so that positioning and clipping just work.
969         
970         Sharing layer relationships are constructed in RenderLayerCompositor::computeCompositingRequirements().
971         We track the last layer which was composited in paint order as a shared candidate. If a later layer
972         would composite for overlap (and no other reasons), then we allow it to share with the candidate
973         if the candidate is in its ancestor containing block chain. Sharing is currently limited to layers
974         in the same stacking context.
975         
976         isComposited() returns false for sharing layers, but they are like composited layers in that
977         they behave as painting boundaries, so RenderLayer::paintLayer() needs to stop at them,
978         and repaints in shared layers have to be directed to their shared layer, hence
979         changes to RenderLayer::clippingRootForPainting() and RenderLayer::enclosingCompositingLayerForRepaint().
980         
981         The clipping boundary logic in RenderLayer::backgroundClipRect() needed to be generalized so that
982         all calls to RenderLayer::parentClipRects() check for crossing painting boundaries and use
983         TemporaryClipRects in that case.
984
985         Tests: compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller.html
986                compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller.html
987                compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow.html
988                compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness.html
989                compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping.html
990                compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping.html
991                compositing/shared-backing/overflow-scroll/relative-in-div-in-overflow-scroll.html
992                compositing/shared-backing/overflow-scroll/scrolled-contents-has-painted-content.html
993                compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip.html
994                compositing/shared-backing/overflow-scroll/shared-layer-clipping.html
995                compositing/shared-backing/overflow-scroll/shared-layer-composited-bounds.html
996                compositing/shared-backing/overflow-scroll/shared-layer-nested-relative-stacking.html
997                compositing/shared-backing/overflow-scroll/shared-layer-repaint.html
998                compositing/shared-backing/partial-compositing-update.html
999                compositing/shared-backing/partial-compositing-update2.html
1000                compositing/shared-backing/remove-sharing-layer.html
1001                compositing/shared-backing/sharing-cached-clip-rects.html
1002
1003         * rendering/RenderLayer.cpp:
1004         (WebCore::RenderLayer::~RenderLayer):
1005         (WebCore::RenderLayer::ancestorLayerIsInContainingBlockChain const):
1006         (WebCore::RenderLayer::setBackingProviderLayer):
1007         (WebCore::RenderLayer::disconnectFromBackingProviderLayer):
1008         (WebCore::RenderLayer::enclosingCompositingLayerForRepaint const):
1009         (WebCore::RenderLayer::clippingRootForPainting const):
1010         (WebCore::RenderLayer::clipToRect):
1011         (WebCore::RenderLayer::paintLayer):
1012         (WebCore::RenderLayer::updateClipRects):
1013         (WebCore::RenderLayer::clipCrossesPaintingBoundary const):
1014         (WebCore::RenderLayer::calculateClipRects const):
1015         (WebCore::outputPaintOrderTreeLegend):
1016         (WebCore::outputPaintOrderTreeRecursive):
1017         (WebCore::inContainingBlockChain): Deleted.
1018         * rendering/RenderLayer.h:
1019         * rendering/RenderLayerBacking.cpp:
1020         (WebCore::RenderLayerBacking::willBeDestroyed):
1021         (WebCore::clearBackingSharingLayerProviders):
1022         (WebCore::RenderLayerBacking::setBackingSharingLayers):
1023         (WebCore::RenderLayerBacking::removeBackingSharingLayer):
1024         (WebCore::RenderLayerBacking::clearBackingSharingLayers):
1025         (WebCore::RenderLayerBacking::updateCompositedBounds):
1026         (WebCore::RenderLayerBacking::updateDrawsContent):
1027         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer const):
1028         (WebCore::RenderLayerBacking::paintIntoLayer):
1029         (WebCore::RenderLayerBacking::paintContents):
1030         * rendering/RenderLayerBacking.h:
1031         * rendering/RenderLayerCompositor.cpp:
1032         (WebCore::RenderLayerCompositor::CompositingState::stateForPaintOrderChildren const):
1033         (WebCore::RenderLayerCompositor::CompositingState::propagateStateFromChildren):
1034         (WebCore::RenderLayerCompositor::CompositingState::propagateStateFromChildrenForUnchangedSubtree):
1035         (WebCore::RenderLayerCompositor::BackingSharingState::resetBackingProviderCandidate):
1036         (WebCore::RenderLayerCompositor::updateCompositingLayers):
1037         (WebCore::backingProviderLayerCanIncludeLayer):
1038         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1039         (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
1040         (WebCore::RenderLayerCompositor::updateBacking):
1041         (WebCore::RenderLayerCompositor::layerWillBeRemoved):
1042         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const):
1043         * rendering/RenderLayerCompositor.h:
1044         * rendering/RenderTreeAsText.cpp:
1045
1046 2019-05-09  Daniel Bates  <dabates@apple.com>
1047
1048         [iOS] Right command key has wrong value for property code
1049         https://bugs.webkit.org/show_bug.cgi?id=193876
1050         <rdar://problem/47577308>
1051
1052         Reviewed by Brent Fulgham.
1053
1054         We're looking for the wrong Windows virtual key code for the right command key.
1055         Substitute VK_APPS for VK_RWIN so we can identify the right command key and return
1056         the correct value for the code property of the DOM key event.
1057
1058         * platform/ios/PlatformEventFactoryIOS.mm:
1059         (WebCore::codeForKeyEvent):
1060
1061 2019-05-09  Daniel Bates  <dabates@apple.com>
1062
1063         [iOS] Numpad comma key has incorrect keyIdentifier property
1064         https://bugs.webkit.org/show_bug.cgi?id=197753
1065         <rdar://problem/50636274>
1066
1067         Reviewed by Brent Fulgham.
1068
1069         Map the Numpad Comma HID usage code to its Window virtual key code, VK_SEPARATOR,
1070         so that can compute the keyIdentifier property for the Numpad Comma key. Also
1071         consider this key as a keypad key just like we do on Mac. There is no discernable
1072         difference for doing so on iOS because the non-keypad code path computes the same result
1073         due to GraphicsServices having fixed up the input string for the Numpad Comma to be
1074         ",", which is want.
1075
1076         * platform/ios/KeyEventIOS.mm:
1077         (WebCore::windowsKeyCodeForKeyCode): Map kHIDUsage_KeypadComma to VK_SEPARATOR.
1078         * platform/ios/PlatformEventFactoryIOS.mm:
1079         (WebCore::codeForKeyEvent): Add a comment to explain that this key is only on
1080         JIS keyboards.
1081         (WebCore::isKeypadEvent): Return true for the Numpad Comma key.
1082
1083 2019-05-09  Zalan Bujtas  <zalan@apple.com>
1084
1085         Do not mix inline and block level boxes.
1086         https://bugs.webkit.org/show_bug.cgi?id=197462
1087         <rdar://problem/50369362>
1088
1089         Reviewed by Antti Koivisto.
1090
1091         This patch tightens the remove-anonymous-wrappers logic by checking if the removal would
1092         produce an inline-block sibling mix.
1093         When a block level box is removed from the tree, we check if after the removal the anonymous sibling block
1094         boxes are still needed or whether we can removed them as well (and have only inline level child boxes).
1095         In addition to checking if the container is anonymous and is part of a continuation, we also need to check
1096         if collapsing it (and by that moving its children one level up) would cause a inline-block box mix.
1097
1098         Test: fast/ruby/continuation-and-column-spanner-crash.html
1099
1100         * rendering/updating/RenderTreeBuilder.cpp:
1101         (WebCore::RenderTreeBuilder::removeAnonymousWrappersForInlineChildrenIfNeeded):
1102         * rendering/updating/RenderTreeBuilderContinuation.cpp:
1103         (WebCore::RenderTreeBuilder::Continuation::cleanupOnDestroy):
1104
1105 2019-05-09  Eric Carlson  <eric.carlson@apple.com>
1106
1107         Refine AudioSession route sharing policy
1108         https://bugs.webkit.org/show_bug.cgi?id=197742
1109         <rdar://problem/50590818>
1110
1111         Reviewed by Darin Adler.
1112
1113         No new tests, updated AVAudioSessionRouteSharingPolicy API test.
1114
1115         * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
1116         (MediaSessionManagerCocoa::updateSessionState):
1117
1118 2019-05-09  Simon Fraser  <simon.fraser@apple.com>
1119
1120         fast/hidpi/video-controls-in-hidpi.html sometimes asserts in WK1
1121         https://bugs.webkit.org/show_bug.cgi?id=197695
1122
1123         Reviewed by Zalan Bujtas.
1124
1125         With the backing-sharing changes that landed in r245058, some WebKit1 tests with media controls asserted in
1126         RenderLayerBacking::computeParentGraphicsLayerRect() because a layer would have a m_ancestorClippingLayer,
1127         but backgroundClipRect() would return an infinite rect.
1128         
1129         This happened when a layer tree change caused the layer's compositing ancestor to no longer isolate
1130         composited blending (which affects the behavior of RenderLayerCompositor:clippedByAncestor()), but we failed
1131         to mark its composited children as needing the configuration update which would eliminate their m_ancestorClippingLayers.
1132         
1133         The fix is to call setChildrenNeedCompositingGeometryUpdate() when isolatesCompositedBlending changes. We don't haev
1134         setChildrenNeedCompositingConfigurationUpdate(), but setChildrenNeedCompositingGeometryUpdate() has the desired side-effect.
1135
1136         I was unable to make a standalone test case for this, but the code is exercised by media control tests.
1137
1138         * rendering/RenderLayerCompositor.cpp:
1139         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1140
1141 2019-05-09  Brent Fulgham  <bfulgham@apple.com>
1142
1143         Correct delayed load event handling
1144         https://bugs.webkit.org/show_bug.cgi?id=197679
1145         <rdar://problem/50423334>
1146
1147         Reviewed by Alex Christensen.
1148
1149         We need to properly account for the fact that JavaScript might run
1150         while performing loads.
1151
1152         * dom/Document.cpp:
1153         (WebCore::Document::loadEventDelayTimerFired):
1154
1155 2019-05-09  Antti Koivisto  <antti@apple.com>
1156
1157         Elements with "display: inline-block" don't have a touch-action region
1158         https://bugs.webkit.org/show_bug.cgi?id=197281
1159         <rdar://problem/50535081>
1160
1161         Reviewed by Antoine Quint.
1162
1163         Test: pointerevents/ios/touch-action-region-inline-block.html
1164
1165         PaintPhase::EventRegion failed to traverse into inline boxes.
1166
1167         * rendering/InlineElementBox.cpp:
1168         (WebCore::InlineElementBox::paint):
1169         * rendering/RenderElement.cpp:
1170         (WebCore::RenderElement::paintAsInlineBlock):
1171
1172 2019-05-08  Carlos Garcia Campos  <cgarcia@igalia.com>
1173
1174         REGRESSION(r239915): [FreeType] White space skipped when rendering plain text with noto CJK font
1175         https://bugs.webkit.org/show_bug.cgi?id=197658
1176
1177         Reviewed by Michael Catanzaro.
1178
1179         Since r239915 we no longer overwrite control characters with zero width space, they are handled later when
1180         filling the glyph pages. In Font::platformGlyphInit() there's an optimization to get the glyph of zero with
1181         space character that assumes that control characters are always overwritten. Since the glyph for character at 0
1182         index is always overwritten with zero width space, we can avoid loading the page for the actual zero width space
1183         character and use the first page instead. In the particular case of noto CJK font, character at 0 is mapped to
1184         the same glyph as space character, so space and zero width space end up being the same glyph. That breaks the
1185         space width calculation, that returns 0 when isZeroWidthSpaceGlyph() is true. That's why spaces are no
1186         longer rendered, ComplexTextController::adjustGlyphsAndAdvances() is setting the x advance for the space glyphs
1187         to 0.
1188
1189         * platform/graphics/Font.cpp:
1190         (WebCore::Font::platformGlyphInit): Use the actual zero width space page to get the glyph instead of 0 when
1191         using FreeType.
1192
1193 2019-05-08  Alex Christensen  <achristensen@webkit.org>
1194
1195         Fix WPE build.
1196
1197         * CMakeLists.txt:
1198         Bots wanted a "PUBLIC" or "PRIVATE" keyword here.
1199
1200 2019-05-08  Alex Christensen  <achristensen@webkit.org>
1201
1202         Try to fix Linux build
1203
1204         * platform/graphics/ANGLEWebKitBridge.h:
1205         Include headers consistently on all platforms.
1206
1207 2019-05-08  Don Olmstead  <don.olmstead@sony.com>
1208
1209         Update ANGLE
1210         https://bugs.webkit.org/show_bug.cgi?id=197676
1211
1212         Reviewed by Alex Christensen.
1213
1214         * CMakeLists.txt:
1215         * PlatformGTK.cmake:
1216         * PlatformMac.cmake:
1217         * PlatformPlayStation.cmake:
1218         * PlatformWPE.cmake:
1219         * PlatformWin.cmake:
1220         * platform/graphics/GLContext.cpp:
1221         * platform/graphics/egl/GLContextEGL.cpp:
1222         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
1223         * platform/graphics/opengl/Extensions3DOpenGLES.h:
1224         * platform/graphics/opengl/TemporaryOpenGLSetting.cpp:
1225         * platform/graphics/texmap/TextureMapperGLHeaders.h:
1226
1227 2019-05-08  Chris Dumez  <cdumez@apple.com>
1228
1229         [iOS Debug] ASSERTION FAILED: !m_originalNode in WebCore::JSLazyEventListener::checkValidityForEventTarget(WebCore::EventTarget &)
1230         https://bugs.webkit.org/show_bug.cgi?id=197696
1231         <rdar://problem/50586956>
1232
1233         Reviewed by Simon Fraser.
1234
1235         Setting the onorientationchange / onresize event handler on the body should set the event handler on the
1236         window object, as per the HTML specification. However, calling body.addEventListener() with 'orientationchange'
1237         or 'resize' should not set the event listener on the window object, only the body. Blink and Gecko seem to
1238         behave as per specification but WebKit had a quirk for the addEventListener case. The quirk's implementation
1239         is slightly wrong (because it is unsafe to take a JSLazyEventListener from a body element and add it to the
1240         window, given that the JSLazyEventListener keeps a raw pointer to its element) and was causing crashes such
1241         as <rdar://problem/24314027>. As a result, this patch simply drops the WebKit quirk, which will align our
1242         behavior with other browsers and fix the crashes altogether.
1243
1244         Test: fast/events/ios/rotation/orientationchange-event-listener-on.body.html
1245
1246         * dom/Node.cpp:
1247         (WebCore::tryAddEventListener):
1248         (WebCore::tryRemoveEventListener):
1249
1250 2019-05-08  Ryan Haddad  <ryanhaddad@apple.com>
1251
1252         Unreviewed, rolling out r245058.
1253
1254         Causes crashes under ASan / GuardMalloc
1255
1256         Reverted changeset:
1257
1258         "Implement backing-sharing in compositing layers, allowing
1259         overlap layers to paint into the backing store of another
1260         layer"
1261         https://bugs.webkit.org/show_bug.cgi?id=197561
1262         https://trac.webkit.org/changeset/245058
1263
1264 2019-05-08  Ryan Haddad  <ryanhaddad@apple.com>
1265
1266         Unreviewed, rolling out r245068.
1267
1268         Caused debug layout tests to exit early due to an assertion
1269         failure.
1270
1271         Reverted changeset:
1272
1273         "All prototypes should call didBecomePrototype()"
1274         https://bugs.webkit.org/show_bug.cgi?id=196315
1275         https://trac.webkit.org/changeset/245068
1276
1277 2019-05-08  Megan Gardner  <megan_gardner@apple.com>
1278
1279         Add quirks to emulate undo and redo in hidden editable areas on some websites
1280         https://bugs.webkit.org/show_bug.cgi?id=197452
1281
1282         Reviewed by Alex Christensen.
1283
1284         UI change, not testable.
1285
1286         We need to send synthetic keyboard events to the web process to emulate undo and redo
1287         key combinations for when we are trying to get our undo and redo UI to work
1288         on rich editing websites that only listen to keystrokes, and don't let us use our
1289         undo manager to help manage the input content.
1290
1291         * page/EventHandler.cpp:
1292         (WebCore::EventHandler::keyEvent):
1293         * platform/PlatformKeyboardEvent.h:
1294         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1295         (WebCore::PlatformKeyboardEvent::isSyntheticEvent):
1296         (WebCore::PlatformKeyboardEvent::setSyntheticEvent):
1297         * platform/ios/KeyEventIOS.mm:
1298         (WebCore::PlatformKeyboardEvent::currentStateOfModifierKeys):
1299         * platform/ios/PlatformEventFactoryIOS.mm:
1300         (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):
1301         * platform/mac/PlatformEventFactoryMac.mm:
1302         (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):
1303
1304 2019-05-08  Don Olmstead  <don.olmstead@sony.com>
1305
1306         CSSFontFaceSource fails to compile when !ENABLE(SVG_FONTS)
1307         https://bugs.webkit.org/show_bug.cgi?id=197720
1308
1309         Unreviewed build fix.
1310
1311         Add usesInDocumentSVGFont to the !ENABLE(SVG_FONT) path.
1312
1313         * css/CSSFontFaceSource.cpp:
1314         (WebCore::CSSFontFaceSource::font):
1315
1316 2019-05-08  Timothy Hatcher  <timothy@apple.com>
1317
1318         Add plumbing for inactive system colors in RenderTheme cache.
1319         https://bugs.webkit.org/show_bug.cgi?id=197699
1320         rdar://problem/49406936
1321
1322         Reviewed by Tim Horton.
1323
1324         * css/StyleColor.h:
1325         * page/Page.cpp:
1326         (WebCore::Page::effectiveAppearanceDidChange): Renamed from setUseDarkAppearance.
1327         * page/Page.h:
1328         (WebCore::Page::useInactiveAppearance const):
1329         * rendering/RenderTheme.cpp:
1330         (WebCore::RenderTheme::purgeCaches):
1331         (WebCore::RenderTheme::platformColorsDidChange):
1332         (WebCore::RenderTheme::colorCache const):
1333         * rendering/RenderTheme.h:
1334         * testing/InternalSettings.cpp:
1335         (WebCore::InternalSettings::setUseDarkAppearanceInternal):
1336
1337 2019-05-08  Robin Morisset  <rmorisset@apple.com>
1338
1339         All prototypes should call didBecomePrototype()
1340         https://bugs.webkit.org/show_bug.cgi?id=196315
1341
1342         Reviewed by Saam Barati.
1343
1344         This changelog already landed, but the commit was missing the actual changes.
1345
1346         It was found by existing tests, with the new assert in JSC::Structure
1347
1348         * bindings/js/JSWindowProxy.cpp:
1349         (WebCore::JSWindowProxy::setWindow):
1350         * bindings/scripts/CodeGeneratorJS.pm:
1351         (GeneratePrototypeDeclaration):
1352         (GenerateConstructorHelperMethods):
1353         * bindings/scripts/test/JS/JSInterfaceName.cpp:
1354         (WebCore::JSInterfaceNamePrototype::JSInterfaceNamePrototype):
1355         * bindings/scripts/test/JS/JSMapLike.cpp:
1356         (WebCore::JSMapLikePrototype::JSMapLikePrototype):
1357         * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
1358         (WebCore::JSReadOnlyMapLikePrototype::JSReadOnlyMapLikePrototype):
1359         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1360         (WebCore::JSTestActiveDOMObjectPrototype::JSTestActiveDOMObjectPrototype):
1361         * bindings/scripts/test/JS/JSTestCEReactions.cpp:
1362         (WebCore::JSTestCEReactionsPrototype::JSTestCEReactionsPrototype):
1363         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
1364         (WebCore::JSTestCEReactionsStringifierPrototype::JSTestCEReactionsStringifierPrototype):
1365         * bindings/scripts/test/JS/JSTestCallTracer.cpp:
1366         (WebCore::JSTestCallTracerPrototype::JSTestCallTracerPrototype):
1367         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
1368         (WebCore::JSTestClassWithJSBuiltinConstructorPrototype::JSTestClassWithJSBuiltinConstructorPrototype):
1369         * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
1370         (WebCore::JSTestDOMJITPrototype::JSTestDOMJITPrototype):
1371         (WebCore::JSTestDOMJITConstructor::prototypeForStructure):
1372         * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
1373         (WebCore::JSTestEnabledBySettingPrototype::JSTestEnabledBySettingPrototype):
1374         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1375         (WebCore::JSTestEventConstructorPrototype::JSTestEventConstructorPrototype):
1376         (WebCore::JSTestEventConstructorConstructor::prototypeForStructure):
1377         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1378         (WebCore::JSTestEventTargetPrototype::JSTestEventTargetPrototype):
1379         (WebCore::JSTestEventTargetConstructor::prototypeForStructure):
1380         * bindings/scripts/test/JS/JSTestException.cpp:
1381         (WebCore::JSTestExceptionPrototype::JSTestExceptionPrototype):
1382         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1383         (WebCore::JSTestGenerateIsReachablePrototype::JSTestGenerateIsReachablePrototype):
1384         * bindings/scripts/test/JS/JSTestGlobalObject.h:
1385         (WebCore::JSTestGlobalObjectPrototype::JSTestGlobalObjectPrototype):
1386         * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
1387         (WebCore::JSTestIndexedSetterNoIdentifierPrototype::JSTestIndexedSetterNoIdentifierPrototype):
1388         * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
1389         (WebCore::JSTestIndexedSetterThrowingExceptionPrototype::JSTestIndexedSetterThrowingExceptionPrototype):
1390         * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
1391         (WebCore::JSTestIndexedSetterWithIdentifierPrototype::JSTestIndexedSetterWithIdentifierPrototype):
1392         * bindings/scripts/test/JS/JSTestInterface.cpp:
1393         (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype):
1394         * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
1395         (WebCore::JSTestInterfaceLeadingUnderscorePrototype::JSTestInterfaceLeadingUnderscorePrototype):
1396         * bindings/scripts/test/JS/JSTestIterable.cpp:
1397         (WebCore::JSTestIterablePrototype::JSTestIterablePrototype):
1398         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
1399         (WebCore::JSTestJSBuiltinConstructorPrototype::JSTestJSBuiltinConstructorPrototype):
1400         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1401         (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype):
1402         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
1403         (WebCore::JSTestNamedAndIndexedSetterNoIdentifierPrototype::JSTestNamedAndIndexedSetterNoIdentifierPrototype):
1404         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
1405         (WebCore::JSTestNamedAndIndexedSetterThrowingExceptionPrototype::JSTestNamedAndIndexedSetterThrowingExceptionPrototype):
1406         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
1407         (WebCore::JSTestNamedAndIndexedSetterWithIdentifierPrototype::JSTestNamedAndIndexedSetterWithIdentifierPrototype):
1408         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1409         (WebCore::JSTestNamedConstructorPrototype::JSTestNamedConstructorPrototype):
1410         * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
1411         (WebCore::JSTestNamedDeleterNoIdentifierPrototype::JSTestNamedDeleterNoIdentifierPrototype):
1412         * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
1413         (WebCore::JSTestNamedDeleterThrowingExceptionPrototype::JSTestNamedDeleterThrowingExceptionPrototype):
1414         * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
1415         (WebCore::JSTestNamedDeleterWithIdentifierPrototype::JSTestNamedDeleterWithIdentifierPrototype):
1416         * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
1417         (WebCore::JSTestNamedDeleterWithIndexedGetterPrototype::JSTestNamedDeleterWithIndexedGetterPrototype):
1418         * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
1419         (WebCore::JSTestNamedGetterCallWithPrototype::JSTestNamedGetterCallWithPrototype):
1420         * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
1421         (WebCore::JSTestNamedGetterNoIdentifierPrototype::JSTestNamedGetterNoIdentifierPrototype):
1422         * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
1423         (WebCore::JSTestNamedGetterWithIdentifierPrototype::JSTestNamedGetterWithIdentifierPrototype):
1424         * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
1425         (WebCore::JSTestNamedSetterNoIdentifierPrototype::JSTestNamedSetterNoIdentifierPrototype):
1426         * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
1427         (WebCore::JSTestNamedSetterThrowingExceptionPrototype::JSTestNamedSetterThrowingExceptionPrototype):
1428         * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
1429         (WebCore::JSTestNamedSetterWithIdentifierPrototype::JSTestNamedSetterWithIdentifierPrototype):
1430         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
1431         (WebCore::JSTestNamedSetterWithIndexedGetterPrototype::JSTestNamedSetterWithIndexedGetterPrototype):
1432         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
1433         (WebCore::JSTestNamedSetterWithIndexedGetterAndSetterPrototype::JSTestNamedSetterWithIndexedGetterAndSetterPrototype):
1434         * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
1435         (WebCore::JSTestNamedSetterWithOverrideBuiltinsPrototype::JSTestNamedSetterWithOverrideBuiltinsPrototype):
1436         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
1437         (WebCore::JSTestNamedSetterWithUnforgablePropertiesPrototype::JSTestNamedSetterWithUnforgablePropertiesPrototype):
1438         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
1439         (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype):
1440         * bindings/scripts/test/JS/JSTestNode.cpp:
1441         (WebCore::JSTestNodePrototype::JSTestNodePrototype):
1442         (WebCore::JSTestNodeConstructor::prototypeForStructure):
1443         * bindings/scripts/test/JS/JSTestObj.cpp:
1444         (WebCore::JSTestObjPrototype::JSTestObjPrototype):
1445         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1446         (WebCore::JSTestOverloadedConstructorsPrototype::JSTestOverloadedConstructorsPrototype):
1447         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
1448         (WebCore::JSTestOverloadedConstructorsWithSequencePrototype::JSTestOverloadedConstructorsWithSequencePrototype):
1449         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
1450         (WebCore::JSTestOverrideBuiltinsPrototype::JSTestOverrideBuiltinsPrototype):
1451         * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
1452         (WebCore::JSTestPluginInterfacePrototype::JSTestPluginInterfacePrototype):
1453         * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
1454         (WebCore::JSTestPromiseRejectionEventPrototype::JSTestPromiseRejectionEventPrototype):
1455         (WebCore::JSTestPromiseRejectionEventConstructor::prototypeForStructure):
1456         * bindings/scripts/test/JS/JSTestSerialization.cpp:
1457         (WebCore::JSTestSerializationPrototype::JSTestSerializationPrototype):
1458         * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
1459         (WebCore::JSTestSerializationIndirectInheritancePrototype::JSTestSerializationIndirectInheritancePrototype):
1460         (WebCore::JSTestSerializationIndirectInheritanceConstructor::prototypeForStructure):
1461         * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
1462         (WebCore::JSTestSerializationInheritPrototype::JSTestSerializationInheritPrototype):
1463         (WebCore::JSTestSerializationInheritConstructor::prototypeForStructure):
1464         * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
1465         (WebCore::JSTestSerializationInheritFinalPrototype::JSTestSerializationInheritFinalPrototype):
1466         (WebCore::JSTestSerializationInheritFinalConstructor::prototypeForStructure):
1467         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1468         (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype):
1469         * bindings/scripts/test/JS/JSTestStringifier.cpp:
1470         (WebCore::JSTestStringifierPrototype::JSTestStringifierPrototype):
1471         * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
1472         (WebCore::JSTestStringifierAnonymousOperationPrototype::JSTestStringifierAnonymousOperationPrototype):
1473         * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
1474         (WebCore::JSTestStringifierNamedOperationPrototype::JSTestStringifierNamedOperationPrototype):
1475         * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
1476         (WebCore::JSTestStringifierOperationImplementedAsPrototype::JSTestStringifierOperationImplementedAsPrototype):
1477         * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
1478         (WebCore::JSTestStringifierOperationNamedToStringPrototype::JSTestStringifierOperationNamedToStringPrototype):
1479         * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
1480         (WebCore::JSTestStringifierReadOnlyAttributePrototype::JSTestStringifierReadOnlyAttributePrototype):
1481         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
1482         (WebCore::JSTestStringifierReadWriteAttributePrototype::JSTestStringifierReadWriteAttributePrototype):
1483         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1484         (WebCore::JSTestTypedefsPrototype::JSTestTypedefsPrototype):
1485
1486 2019-05-08  Don Olmstead  <don.olmstead@sony.com>
1487
1488         WEBCORE_EXPORT shouldn't be on the class and its methods
1489         https://bugs.webkit.org/show_bug.cgi?id=197681
1490
1491         Reviewed by Simon Fraser.
1492
1493         Remove WEBCORE_EXPORT from the methods.
1494
1495         * page/scrolling/ScrollingTreeFrameScrollingNode.h:
1496         * page/scrolling/ScrollingTreeScrollingNode.h:
1497
1498 2019-05-08  Wenson Hsieh  <wenson_hsieh@apple.com>
1499
1500         [iOS] Add a quirk to synthesize mouse events when modifying the selection
1501         https://bugs.webkit.org/show_bug.cgi?id=197683
1502         <rdar://problem/48003980>
1503
1504         Reviewed by Tim Horton.
1505
1506         See WebKit ChangeLog for more details.
1507
1508         Test: editing/selection/ios/dispatch-mouse-events-when-modifying-selection-quirk.html
1509
1510         * page/EventHandler.cpp:
1511         (WebCore::EventHandler::handleMousePressEvent):
1512         (WebCore::EventHandler::supportsSelectionUpdatesOnMouseDrag const):
1513
1514         Add some platform hooks to prevent mousemove events from updating the selection on iOS.
1515
1516         (WebCore::EventHandler::shouldAllowMouseDownToStartDrag const):
1517
1518         Add some platform hooks to prevent drag and drop from kicking in when sending synthetic mousemove events to the
1519         page on iOS (drag and drop is instead triggered by EventHandler::tryToBeginDragAtPoint).
1520
1521         (WebCore::EventHandler::updateSelectionForMouseDrag):
1522         * page/EventHandler.h:
1523         * page/Quirks.cpp:
1524         (WebCore::Quirks::shouldDispatchSyntheticMouseEventsWhenModifyingSelection const):
1525         * page/Quirks.h:
1526
1527         Add the new site-specific quirk.
1528
1529         * page/Settings.yaml:
1530         * page/ios/EventHandlerIOS.mm:
1531         (WebCore::EventHandler::tryToBeginDragAtPoint):
1532         (WebCore::EventHandler::supportsSelectionUpdatesOnMouseDrag const):
1533         (WebCore::EventHandler::shouldAllowMouseDownToStartDrag const):
1534         * testing/InternalSettings.cpp:
1535         (WebCore::InternalSettings::Backup::Backup):
1536         (WebCore::InternalSettings::Backup::restoreTo):
1537         (WebCore::InternalSettings::setShouldDispatchSyntheticMouseEventsWhenModifyingSelection):
1538         * testing/InternalSettings.h:
1539         * testing/InternalSettings.idl:
1540
1541         Add an internal settings hook to opt into this quirk, for use in layout tests.
1542
1543 2019-05-08  Simon Fraser  <simon.fraser@apple.com>
1544
1545         Implement backing-sharing in compositing layers, allowing overlap layers to paint into the backing store of another layer
1546         https://bugs.webkit.org/show_bug.cgi?id=197561
1547         <rdar://problem/50445998>
1548
1549         Reviewed by Antti Koivisto.
1550
1551         This change introduces the concept of layers that share backing store for compositing. A layer
1552         which is sharing its backing store first paints itself, and then some set of layers which come
1553         later in paint order in the same stacking context. This reduces the composited layer count in
1554         some overflow scrolling scenarios, thereby also simplifying the scrolling tree.
1555         
1556         A backing-shared layer stores a vector of "sharing" RenderLayer* in its RenderLayerBacking. At
1557         paint time, the owning layer is painted, then the sharing layers, setting the owning layer as the
1558         painting root so that positioning and clipping just work.
1559         
1560         Sharing layer relationships are constructed in RenderLayerCompositor::computeCompositingRequirements().
1561         We track the last layer which was composited in paint order as a shared candidate. If a later layer
1562         would composite for overlap (and no other reasons), then we allow it to share with the candidate
1563         if the candidate is in its ancestor containing block chain. Sharing is currently limited to layers
1564         in the same stacking context.
1565         
1566         isComposited() returns false for sharing layers, but they are like composited layers in that
1567         they behave as painting boundaries, so RenderLayer::paintLayer() needs to stop at them,
1568         and repaints in shared layers have to be directed to their shared layer, hence
1569         changes to RenderLayer::clippingRootForPainting() and RenderLayer::enclosingCompositingLayerForRepaint().
1570         
1571         The clipping boundary logic in RenderLayer::backgroundClipRect() needed to be generalized so that
1572         all calls to RenderLayer::parentClipRects() check for crossing painting boundaries and use
1573         TemporaryClipRects in that case.
1574
1575         Tests: compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller.html
1576                compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller.html
1577                compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow.html
1578                compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness.html
1579                compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping.html
1580                compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping.html
1581                compositing/shared-backing/overflow-scroll/relative-in-div-in-overflow-scroll.html
1582                compositing/shared-backing/overflow-scroll/scrolled-contents-has-painted-content.html
1583                compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip.html
1584                compositing/shared-backing/overflow-scroll/shared-layer-clipping.html
1585                compositing/shared-backing/overflow-scroll/shared-layer-composited-bounds.html
1586                compositing/shared-backing/overflow-scroll/shared-layer-nested-relative-stacking.html
1587                compositing/shared-backing/overflow-scroll/shared-layer-repaint.html
1588                compositing/shared-backing/partial-compositing-update.html
1589                compositing/shared-backing/partial-compositing-update2.html
1590                compositing/shared-backing/remove-sharing-layer.html
1591                compositing/shared-backing/sharing-cached-clip-rects.html
1592
1593         * rendering/RenderLayer.cpp:
1594         (WebCore::RenderLayer::~RenderLayer):
1595         (WebCore::RenderLayer::ancestorLayerIsInContainingBlockChain const):
1596         (WebCore::RenderLayer::setBackingProviderLayer):
1597         (WebCore::RenderLayer::disconnectFromBackingProviderLayer):
1598         (WebCore::RenderLayer::enclosingCompositingLayerForRepaint const):
1599         (WebCore::RenderLayer::clippingRootForPainting const):
1600         (WebCore::RenderLayer::clipToRect):
1601         (WebCore::RenderLayer::paintLayer):
1602         (WebCore::RenderLayer::updateClipRects):
1603         (WebCore::RenderLayer::clipCrossesPaintingBoundary const):
1604         (WebCore::RenderLayer::calculateClipRects const):
1605         (WebCore::outputPaintOrderTreeLegend):
1606         (WebCore::outputPaintOrderTreeRecursive):
1607         (WebCore::inContainingBlockChain): Deleted.
1608         * rendering/RenderLayer.h:
1609         * rendering/RenderLayerBacking.cpp:
1610         (WebCore::RenderLayerBacking::willBeDestroyed):
1611         (WebCore::clearBackingSharingLayerProviders):
1612         (WebCore::RenderLayerBacking::setBackingSharingLayers):
1613         (WebCore::RenderLayerBacking::removeBackingSharingLayer):
1614         (WebCore::RenderLayerBacking::clearBackingSharingLayers):
1615         (WebCore::RenderLayerBacking::updateCompositedBounds):
1616         (WebCore::RenderLayerBacking::updateDrawsContent):
1617         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer const):
1618         (WebCore::RenderLayerBacking::paintIntoLayer):
1619         (WebCore::RenderLayerBacking::paintContents):
1620         * rendering/RenderLayerBacking.h:
1621         * rendering/RenderLayerCompositor.cpp:
1622         (WebCore::RenderLayerCompositor::CompositingState::stateForPaintOrderChildren const):
1623         (WebCore::RenderLayerCompositor::CompositingState::propagateStateFromChildren):
1624         (WebCore::RenderLayerCompositor::CompositingState::propagateStateFromChildrenForUnchangedSubtree):
1625         (WebCore::RenderLayerCompositor::BackingSharingState::resetBackingProviderCandidate):
1626         (WebCore::RenderLayerCompositor::updateCompositingLayers):
1627         (WebCore::backingProviderLayerCanIncludeLayer):
1628         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1629         (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
1630         (WebCore::RenderLayerCompositor::updateBacking):
1631         (WebCore::RenderLayerCompositor::layerWillBeRemoved):
1632         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const):
1633         * rendering/RenderLayerCompositor.h:
1634         * rendering/RenderTreeAsText.cpp:
1635
1636 2019-05-08  Brent Fulgham  <bfulgham@apple.com>
1637
1638         Correct delayed load event handling
1639         https://bugs.webkit.org/show_bug.cgi?id=197679
1640         <rdar://problem/50423334>
1641
1642         Reviewed by Alex Christensen.
1643
1644         We need to properly account for the fact that JavaScript might run
1645         while performing loads.
1646
1647         * dom/Document.cpp:
1648         (WebCore::Document::loadEventDelayTimerFired):
1649
1650 2019-05-08  Philippe Normand  <pnormand@igalia.com>
1651
1652         REGRESSION(r243197): [GStreamer] Error playing redirected streams
1653         https://bugs.webkit.org/show_bug.cgi?id=197410
1654
1655         Reviewed by Carlos Garcia Campos.
1656
1657         Revert the change introduced in r243197 that was checking the
1658         redirected URI instead of the original URI. Non-main URIs should
1659         be ignored only when they are HLS (or similar) fragments.
1660
1661         Test http/tests/security/canvas-remote-read-remote-video-hls.html still passes.
1662
1663         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1664         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
1665
1666 2019-05-08  Rob Buis  <rbuis@igalia.com>
1667
1668         Link prefetch not useful for top-level navigation
1669         https://bugs.webkit.org/show_bug.cgi?id=195623
1670
1671         Reviewed by Youenn Fablet.
1672
1673         Cache cross-domain top-level prefetches in a dedicated cache and not in the
1674         memory cache.
1675
1676         Tests: http/tests/cache/link-prefetch-main-resource-iframe.html
1677                http/tests/cache/link-prefetch-main-resource.html
1678                http/tests/contentextensions/prefetch-blocked.html
1679
1680         * loader/LinkLoader.cpp:
1681         (WebCore::LinkLoader::prefetchIfNeeded):
1682         * loader/ResourceLoadInfo.cpp:
1683         (WebCore::toResourceType):
1684
1685 2019-05-07  Don Olmstead  <don.olmstead@sony.com>
1686
1687         Fix !HAVE(ACCESSIBILITY) build
1688         https://bugs.webkit.org/show_bug.cgi?id=197680
1689
1690         Reviewed by Fujii Hironori.
1691
1692         * accessibility/AXObjectCache.h:
1693         (WebCore::AXObjectCache::focusedUIElementForPage):
1694         Update declaration for !HAVE(ACCESSIBILITY)
1695         * accessibility/AccessibilityObject.h:
1696         Add wrapper implementation for !HAVE(ACCESSIBILITY)
1697         * accessibility/AccessibilityProgressIndicator.cpp:
1698         (WebCore::AccessibilityProgressIndicator::roleValue const):
1699         Add ENABLE(METER_ELEMENT) guard.
1700
1701 2019-05-07  Ryan Haddad  <ryanhaddad@apple.com>
1702
1703         Unreviewed, rolling out r245038.
1704
1705         Breaks internal builds.
1706
1707         Reverted changeset:
1708
1709         "Add SPI to set a list of hosts to which to send custom header
1710         fields cross-origin"
1711         https://bugs.webkit.org/show_bug.cgi?id=197397
1712         https://trac.webkit.org/changeset/245038
1713
1714 2019-05-07  Jiewen Tan  <jiewen_tan@apple.com>
1715
1716         [WebAuthN] A new request should always suppress the pending request if any
1717         https://bugs.webkit.org/show_bug.cgi?id=191517
1718         <rdar://problem/46888222>
1719
1720         Reviewed by Brent Fulgham.
1721
1722         Blocking new requests from the same page when there is a pending request could DoS the
1723         WebAuthN API in the period between [the page is refreshed, the pending request is
1724         hanedled/timeout]. Therefore, the policy will be to always cancel any pending requests
1725         whenever a new request is made. This will enforce the policy of handling only one
1726         request at a time.
1727
1728         Covered by new tests in existing files.
1729
1730         * Modules/webauthn/AuthenticatorCoordinatorClient.cpp:
1731         (WebCore::AuthenticatorCoordinatorClient::requestReply):
1732         (WebCore::AuthenticatorCoordinatorClient::setRequestCompletionHandler):
1733         (WebCore::AuthenticatorCoordinatorClient::addQueryCompletionHandler):
1734         * Modules/webauthn/AuthenticatorCoordinatorClient.h:
1735
1736 2019-05-07  Eric Carlson  <eric.carlson@apple.com>
1737
1738         Define media buffering policy
1739         https://bugs.webkit.org/show_bug.cgi?id=196979
1740         <rdar://problem/28383861>
1741
1742         Reviewed by Jer Noble.
1743
1744         Test: MediaBufferingPolicy API test.
1745
1746         * html/HTMLMediaElement.cpp:
1747         (WebCore::HTMLMediaElement::HTMLMediaElement):
1748         (WebCore::HTMLMediaElement::suspend):
1749         (WebCore::HTMLMediaElement::resume):
1750         (WebCore::HTMLMediaElement::createMediaPlayer):
1751         (WebCore::HTMLMediaElement::setBufferingPolicy):
1752         (WebCore::HTMLMediaElement::purgeBufferedDataIfPossible):
1753         (WebCore::HTMLMediaElement::bufferingPolicy const):
1754         (WebCore::HTMLMediaElement::setShouldBufferData): Deleted.
1755         * html/HTMLMediaElement.h:
1756         (WebCore::HTMLMediaElement::shouldBufferData const): Deleted.
1757         * html/MediaElementSession.cpp:
1758         (WebCore::MediaElementSession::updateClientDataBuffering):
1759         (WebCore::MediaElementSession::preferredBufferingPolicy const):
1760         (WebCore::MediaElementSession::dataBufferingPermitted const): Deleted.
1761         * html/MediaElementSession.h:
1762         * platform/graphics/MediaPlayer.cpp:
1763         (WebCore::MediaPlayer::setBufferingPolicy):
1764         (WebCore::convertEnumerationToString):
1765         (WebCore::MediaPlayer::setShouldBufferData): Deleted.
1766         * platform/graphics/MediaPlayer.h:
1767         * platform/graphics/MediaPlayerEnums.h:
1768         (WTF::LogArgument<WebCore::MediaPlayerEnums::BufferingPolicy>::toString):
1769         * platform/graphics/MediaPlayerPrivate.h:
1770         (WebCore::MediaPlayerPrivateInterface::setBufferingPolicy):
1771         (WebCore::MediaPlayerPrivateInterface::setShouldBufferData): Deleted.
1772         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1773         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1774         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
1775         (WebCore::MediaPlayerPrivateAVFoundationObjC::setBufferingPolicy):
1776         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldBufferData): Deleted.
1777         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
1778         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
1779         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setBufferingPolicy):
1780         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::flushAndRemoveVideoSampleBuffers): Deleted.
1781         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setShouldBufferData): Deleted.
1782         * testing/Internals.cpp:
1783         (WebCore::Internals::elementShouldBufferData):
1784         (WebCore::Internals::elementBufferingPolicy):
1785         * testing/Internals.h:
1786         * testing/Internals.idl:
1787
1788 2019-05-07  Alex Christensen  <achristensen@webkit.org>
1789
1790         Add SPI to set a list of hosts to which to send custom header fields cross-origin
1791         https://bugs.webkit.org/show_bug.cgi?id=197397
1792
1793         Reviewed by Geoff Garen.
1794
1795         In r223001 I added the ability to send custom headers, but with a restriction that they will not be sent except to the origin of the main document.
1796         We need the ability to specify what origins to send these headers to even if they are not first party requests.
1797         We get this information in a list of strings which are the hosts to send the headers to.  Some of the strings have an asterisk at the beginning,
1798         indicating that the headers are to be sent to all subdomains.
1799
1800         I repurposed some ObjC SPI that was never adopted, but I keep testing the C API that was to verify no regression.
1801         I also added some new API tests for the new behavior.
1802
1803         * Sources.txt:
1804         * WebCore.xcodeproj/project.pbxproj:
1805         * loader/CustomHeaderFields.cpp: Added.
1806         (WebCore::CustomHeaderFields::thirdPartyDomainsMatch const):
1807         * loader/CustomHeaderFields.h: Added.
1808         (WebCore::CustomHeaderFields::encode const):
1809         (WebCore::CustomHeaderFields::decode):
1810         * loader/DocumentLoader.cpp:
1811         (WebCore::DocumentLoader::setCustomHeaderFields): Deleted.
1812         * loader/DocumentLoader.h:
1813         (WebCore::DocumentLoader::setCustomHeaderFields):
1814         (WebCore::DocumentLoader::customHeaderFields const):
1815         (WebCore::DocumentLoader::customHeaderFields): Deleted.
1816         * loader/cache/CachedResourceLoader.cpp:
1817         (WebCore::CachedResourceLoader::requestResource):
1818
1819 2019-05-07  Andy Estes  <aestes@apple.com>
1820
1821         run-bindings-tests should test global scope constructor generation
1822         https://bugs.webkit.org/show_bug.cgi?id=197669
1823
1824         Reviewed by Alex Christensen.
1825
1826         For interfaces that are exposed on a global object, preprocess-idls.pl generates a partial
1827         interface for the global object defining attributes for the interfaces' constructors. Most
1828         interfaces don't specify a global object, so preprocess-idls.pl defaults to DOMWindow.
1829         Since there is no DOMWindow.idl test case, we never generate the code for exposed interface
1830         constructors when running bindings tests. This means that we can't test changes to how these
1831         constructors are generated.
1832
1833         To fix this, teach preprocess-idls.pl to treat 'TestGlobalObject' as the default global
1834         object when running bindings tests. This means that all exposed interface test cases will
1835         generate their constructors as part of JSTestGlobalObject (unless otherwise specified
1836         by the 'Exposed' extended attribute).
1837
1838         * bindings/scripts/preprocess-idls.pl:
1839         Added --testGlobalContextName and --testGlobalScopeConstructorsFile arguments for use by
1840         run-bindings-tests.
1841
1842         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
1843         Updated expected results.
1844
1845 2019-05-07  Youenn Fablet  <youenn@apple.com>
1846
1847         Video stream freeze on front camera orientation changing
1848         https://bugs.webkit.org/show_bug.cgi?id=197227
1849         <rdar://problem/50175498>
1850
1851         Reviewed by Eric Carlson.
1852
1853         Use m_currentRotationSessionAngle instead of m_currentRotation to create or not a new rotation session.
1854         Covered by updated test.
1855
1856         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h:
1857         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm:
1858         (WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer):
1859
1860 2019-05-07  Youenn Fablet  <youenn@apple.com>
1861
1862         getUserMedia framerate unusable under low light in iOS 12.2
1863         https://bugs.webkit.org/show_bug.cgi?id=196214
1864         <rdar://problem/49232193>
1865
1866         Reviewed by Geoffrey Garen.
1867
1868         When setting the frame rate, set it to the exact value instead of a range.
1869         Otherwise, the capture device might use the lowest frame rate according the light conditions
1870         for best picture quality which is not what is expected by most web pages.
1871
1872         Move frame rate range computation to closer where actually used.
1873         Since frame rate matching is fuzzy, add some checks in case the expected frame rate is slightly out of min/max range.
1874
1875         Manually tested on a real device.
1876
1877         * platform/mediastream/mac/AVVideoCaptureSource.mm:
1878         (WebCore::AVVideoCaptureSource::setSizeAndFrameRateWithPreset):
1879
1880 2019-05-07  Robin Morisset  <rmorisset@apple.com>
1881
1882         All prototypes should call didBecomePrototype()
1883         https://bugs.webkit.org/show_bug.cgi?id=196315
1884
1885         Reviewed by Saam Barati.
1886
1887         It was found by existing tests, with the new assert in JSC::Structure
1888
1889         * bindings/js/JSWindowProxy.cpp:
1890         (WebCore::JSWindowProxy::setWindow):
1891         * bindings/scripts/CodeGeneratorJS.pm:
1892         (GeneratePrototypeDeclaration):
1893         (GenerateConstructorHelperMethods):
1894
1895 2019-05-07  John Wilander  <wilander@apple.com>
1896
1897         Storage Access API: Make two changes requested by developers and complete refactoring and cleanup
1898         https://bugs.webkit.org/show_bug.cgi?id=197648
1899         <rdar://problem/50527493>
1900
1901         Reviewed by Chris Dumez.
1902
1903         Developers have requested two minor changes to the Storage Access API:
1904         - Only consume the user gesture when the user explicitly denies access.
1905         - Make document.hasStorageAccess() return true instead of false when the feature is off.
1906
1907         In addition to this, we have refactoring and cleanup to do. Namely:
1908         - Make use of WebCore::RegistrableDomain all the way.
1909         - Remove dead code in WebKit::NetworkProcess since the calls now go through NetworkConnectionToWebProcess.
1910         - Introduce boolean enums for state handling.
1911         - Break out the Storage Access API functionality into a supplement of WebCore::Document.
1912
1913         Reviewed by Chris Dumez.
1914
1915         Tests: http/tests/storageAccess/deny-with-prompt-does-not-preserve-gesture.html
1916                http/tests/storageAccess/deny-without-prompt-preserves-gesture.html
1917                http/tests/storageAccess/grant-with-prompt-preserves-gesture.html
1918                http/tests/storageAccess/has-storage-access-true-if-feature-off.html
1919
1920         * DerivedSources-input.xcfilelist:
1921         * DerivedSources-output.xcfilelist:
1922         * DerivedSources.make:
1923         * Headers.cmake:
1924         * Sources.txt:
1925         * WebCore.xcodeproj/project.pbxproj:
1926         * dom/Document.cpp:
1927         (WebCore::Document::hasStorageAccess): Deleted.
1928         (WebCore::Document::requestStorageAccess): Deleted.
1929         (WebCore::Document::enableTemporaryTimeUserGesture): Deleted.
1930         (WebCore::Document::consumeTemporaryTimeUserGesture): Deleted.
1931         (WebCore::Document::hasFrameSpecificStorageAccess const): Deleted.
1932         (WebCore::Document::setHasFrameSpecificStorageAccess): Deleted.
1933         * dom/Document.h:
1934         (WebCore::Document::setUserGrantsStorageAccessOverride): Deleted.
1935             All of this has been moved to the supplement WebCore::DocumentStorageAccess.
1936         * dom/Document.idl:
1937             The Storage Access API has been moved to DocumentStorageAccess.idl.
1938         * dom/DocumentStorageAccess.cpp: Added.
1939         (WebCore::DocumentStorageAccess::from):
1940         (WebCore::DocumentStorageAccess::supplementName):
1941         (WebCore::DocumentStorageAccess::hasStorageAccess):
1942         (WebCore::DocumentStorageAccess::requestStorageAccess):
1943         (WebCore::DocumentStorageAccess::enableTemporaryTimeUserGesture):
1944         (WebCore::DocumentStorageAccess::consumeTemporaryTimeUserGesture):
1945         (WebCore::DocumentStorageAccess::hasFrameSpecificStorageAccess const):
1946         (WebCore::DocumentStorageAccess::setHasFrameSpecificStorageAccess):
1947         * dom/DocumentStorageAccess.h: Added.
1948         * dom/DocumentStorageAccess.idl: Added.
1949         * page/ChromeClient.h:
1950         * testing/Internals.cpp:
1951         (WebCore::Internals::setUserGrantsStorageAccess): Deleted.
1952             This was dead code.
1953         * testing/Internals.h:
1954         * testing/Internals.idl:
1955
1956 2019-05-07  Antoine Quint  <graouts@apple.com>
1957
1958         [Pointer Events] isPrimary property of pointercancel events should match previous events for that pointer
1959         https://bugs.webkit.org/show_bug.cgi?id=197665
1960
1961         Reviewed by Dean Jackson.
1962
1963         The test at web-platform-tests/pointerevents/pointerevent_pointercancel_touch.html would fail early because one of the first assertions
1964         would check that isPrimary for a pointercancel event would match the isPrimary property of the previous pointer event dispatched for that
1965         pointer id. This prevented many further assertions from passing and also was the cause of flakiness for the next test since this test was
1966         ended early and the state of touches created using UIScriptController were not in a clean state.
1967
1968         We now track the isPrimary state for a given pointer using the CapturingData and use that value when dispatching a pointercancel event.
1969
1970         * dom/PointerEvent.cpp:
1971         (WebCore::PointerEvent::create):
1972         (WebCore::PointerEvent::PointerEvent):
1973         * dom/PointerEvent.h:
1974         * page/PointerCaptureController.cpp:
1975         (WebCore::PointerCaptureController::pointerEventWasDispatched):
1976         (WebCore::PointerCaptureController::cancelPointer):
1977         * page/PointerCaptureController.h:
1978
1979 2019-05-07  Ryan Haddad  <ryanhaddad@apple.com>
1980
1981         Unreviewed, rolling out r244900.
1982
1983         Caused media/track/track-cue-missing.html to fail on debug
1984         queues
1985
1986         Reverted changeset:
1987
1988         "Add logging for RenderLayer clip rects"
1989         https://bugs.webkit.org/show_bug.cgi?id=197547
1990         https://trac.webkit.org/changeset/244900
1991
1992 2019-05-07  Antti Koivisto  <antti@apple.com>
1993
1994         <body> with overflow:hidden CSS is scrollable on iOS
1995         https://bugs.webkit.org/show_bug.cgi?id=153852
1996         <rdar://problem/38715356>
1997
1998         Reviewed by Antoine Quint.
1999
2000         Tests: fast/scrolling/ios/body-overflow-hidden-frame.html
2001                fast/scrolling/ios/body-overflow-hidden.html
2002
2003         * page/scrolling/ScrollingTreeScrollingNode.h:
2004
2005 2019-05-07  Antoine Quint  <graouts@apple.com>
2006
2007         Mouse event simulation should be limited to the graphing calculator on Desmos.com
2008         https://bugs.webkit.org/show_bug.cgi?id=197652
2009         <rdar://problem/47068176>
2010
2011         Reviewed by Antti Koivisto.
2012
2013         * page/Quirks.cpp:
2014         (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
2015
2016 2019-05-06  James Savage  <james.savage@apple.com>
2017
2018         Improve coordination for creating UIWindow instances.
2019         https://bugs.webkit.org/show_bug.cgi?id=197578.
2020         <rdar://problem/50456965>.
2021
2022         Reviewed by Wenson Hsieh.
2023
2024         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
2025         (makeWindowFromView): Pull out window creation.
2026         (VideoFullscreenInterfaceAVKit::doSetup): Call new helper function.
2027
2028 2019-05-06  Tim Horton  <timothy_horton@apple.com>
2029
2030         _overrideViewportWithArguments does not work when called before loading
2031         https://bugs.webkit.org/show_bug.cgi?id=197638
2032         <rdar://problem/50505111>
2033
2034         Reviewed by Wenson Hsieh.
2035
2036         * dom/Document.cpp:
2037         (WebCore::Document::viewportArguments const):
2038         (WebCore::Document::updateViewportArguments):
2039         (WebCore::Document::setOverrideViewportArguments): Deleted.
2040         * dom/Document.h:
2041         (WebCore::Document::viewportArguments const): Deleted.
2042         * page/Page.cpp:
2043         (WebCore::Page::setOverrideViewportArguments):
2044         * page/Page.h:
2045         (WebCore::Page::overrideViewportArguments const):
2046         * page/ViewportConfiguration.cpp:
2047         (WebCore::ViewportConfiguration::setViewportArguments):
2048         Move overrideViewportArguments to Page, since it is view-global in the API.
2049
2050 2019-05-06  Chris Dumez  <cdumez@apple.com>
2051
2052         Add assertions to JSLazyEventListener to help catch the cause of a crash
2053         https://bugs.webkit.org/show_bug.cgi?id=197617
2054
2055         Reviewed by Alexey Proskuryakov.
2056
2057         Add assertions to JSLazyEventListener to help catch the cause of <rdar://problem/24314027>.
2058
2059         * bindings/js/JSLazyEventListener.cpp:
2060         (WebCore::JSLazyEventListener::checkValidityForEventTarget):
2061         * bindings/js/JSLazyEventListener.h:
2062         * dom/EventListener.h:
2063         (WebCore::EventListener::checkValidityForEventTarget):
2064         * dom/EventTarget.cpp:
2065         (WebCore::EventTarget::addEventListener):
2066         (WebCore::EventTarget::setAttributeEventListener):
2067         (WebCore::EventTarget::innerInvokeEventListeners):
2068
2069 2019-05-04  Per Arne Vollan  <pvollan@apple.com>
2070
2071         -[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:] doesn't delete _WKWebsiteDataTypeCredentials
2072         https://bugs.webkit.org/show_bug.cgi?id=197510
2073         <rdar://problem/50372338>
2074
2075         Reviewed by Alex Christensen.
2076
2077         This patch implements deletion of non persistent credentials for a set of origins. In order for this to work, fetching
2078         credentials from the credential storage needs to return a set of SecurityOriginData objects, instead of a set of origin
2079         strings. This is implemented by iterating over all the elements in the credential map, and creating a SecurityOriginData
2080         object for each credential based on the protection space.
2081
2082         API test: WKWebsiteDataStore.RemoveNonPersistentCredentials
2083
2084         * platform/network/CredentialStorage.cpp:
2085         (WebCore::CredentialStorage::removeCredentialsWithOrigin):
2086         (WebCore::CredentialStorage::originsWithCredentials const):
2087         * platform/network/CredentialStorage.h:
2088         (WebCore::CredentialStorage::originsWithCredentials const): Deleted.
2089
2090 2019-05-06  Keith Rollin  <krollin@apple.com>
2091
2092         Temporarily disable generate-xcfilelists
2093         https://bugs.webkit.org/show_bug.cgi?id=197619
2094         <rdar://problem/50507392>
2095
2096         Reviewed by Alex Christensen.
2097
2098         We need to perform a significant update to the generate-xcfilelist
2099         scripts. This work involves coordinated work with another facility. If
2100         the work does not occur in tandem, the build will be broken. To avoid
2101         this, disable the invoking of the scripts during the transition. The
2102         checking will be restored once the new scripts are in place.
2103
2104         No new tests -- no change in user-visible functionality.
2105
2106         * Scripts/check-xcfilelists.sh:
2107
2108 2019-05-06  Andres Gonzalez  <andresg_22@apple.com>
2109
2110         Hitpoint for link which spans two lines in web content is incorrect
2111         https://bugs.webkit.org/show_bug.cgi?id=197511
2112         <rdar://problem/49971483>
2113
2114         Reviewed by Chris Fleizach.
2115
2116         - Special case for links to return first char location as clickPoint instead of middle point of bounding rect.
2117         - Modified iOS ActivationPoint to use clickPoint. This way all code paths go through the same function.
2118         - Made boundsForRects to return content coordinates in all platforms. Adjusted all callers, directly or indirectly, appropriately.
2119
2120         Tests: accessibility/ios-simulator/links-activation.html
2121                accessibility/links-activation.html
2122
2123         * accessibility/AccessibilityRenderObject.cpp:
2124         (WebCore::AccessibilityRenderObject::clickPoint):
2125         (WebCore::AccessibilityRenderObject::boundsForRects):
2126         (WebCore::AccessibilityRenderObject::boundsForRects const): Deleted.
2127         * accessibility/AccessibilityRenderObject.h:
2128         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2129         (-[WebAccessibilityObjectWrapper accessibilityActivationPoint]):
2130         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2131         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2132
2133 2019-05-06  Jer Noble  <jer.noble@apple.com>
2134
2135         Adopt AVStreamDataParser.audiovisualMIMETypes
2136         https://bugs.webkit.org/show_bug.cgi?id=197581
2137         <rdar://problem/50458981>
2138
2139         Reviewed by Eric Carlson.
2140
2141         Add a new singleton class, AVStreamDataParserMIMETypeCache, and rename AVFoundationMIMETypeCache to the more precise
2142         AVAssetMIMETypeCache.  Update all the old AVFoundationMIMETypeCache with the new name.
2143
2144         * SourcesCocoa.txt:
2145         * WebCore.xcodeproj/project.pbxproj:
2146         * platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.h: Renamed from Source/WebCore/platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.h.
2147         (WebCore::AVAssetMIMETypeCache::setCacheMIMETypesCallback):
2148         * platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm: Renamed from Source/WebCore/platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm.
2149         (WebCore::AVAssetMIMETypeCache::singleton):
2150         (WebCore::AVAssetMIMETypeCache::setSupportedTypes):
2151         (WebCore::AVAssetMIMETypeCache::types):
2152         (WebCore::AVAssetMIMETypeCache::supportsContentType):
2153         (WebCore::AVAssetMIMETypeCache::canDecodeType):
2154         (WebCore::AVAssetMIMETypeCache::isAvailable const):
2155         (WebCore::AVAssetMIMETypeCache::loadMIMETypes):
2156         * platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.h: Added.
2157         * platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.mm: Added.
2158         (WebCore::AVStreamDataParserMIMETypeCache::singleton):
2159         (WebCore::AVStreamDataParserMIMETypeCache::types):
2160         (WebCore::AVStreamDataParserMIMETypeCache::supportsContentType):
2161         (WebCore::AVStreamDataParserMIMETypeCache::canDecodeType):
2162         (WebCore::AVStreamDataParserMIMETypeCache::isAvailable const):
2163         (WebCore::AVStreamDataParserMIMETypeCache::loadMIMETypes):
2164         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
2165         (WebCore::ImageDecoderAVFObjC::create):
2166         (WebCore::ImageDecoderAVFObjC::supportsMediaType):
2167         (WebCore::ImageDecoderAVFObjC::supportsContentType):
2168         (WebCore::ImageDecoderAVFObjC::canDecodeType):
2169         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2170         (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine):
2171         (WebCore::MediaPlayerPrivateAVFoundationObjC::getSupportedTypes):
2172         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
2173         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem):
2174         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2175         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine):
2176         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::getSupportedTypes):
2177         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
2178
2179 2019-05-06  Youenn Fablet  <youenn@apple.com>
2180
2181         WebAudio Node JS wrappers should not be collected if events can be fired
2182         https://bugs.webkit.org/show_bug.cgi?id=197533
2183
2184         Reviewed by Jer Noble.
2185
2186         Before the patch, some web audio nodes could fire event listeners, but were not protected from GC.
2187         Use CustomIsReachable to ensure theses nodes can be collected if:
2188         - their AudioContext is stopped (typically due to document being navigated away).
2189         - their AudioContext is closed.
2190         - nodes do not have event listeners.
2191
2192         Covered by WPT mediacapture-streams/MediaStreamTrack-MediaElement-disabled-audio-is-silence.https.html and
2193         WPT webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest.html
2194         and web audio WebRTC tests.
2195         Specific newly added test: webaudio/webaudio-gc.html
2196
2197         * Modules/webaudio/AudioContext.h:
2198         (WebCore::AudioContext::isClosed const):
2199         * Modules/webaudio/AudioNode.idl:
2200         * Sources.txt:
2201         * WebCore.xcodeproj/project.pbxproj:
2202         * bindings/js/JSAudioNodeCustom.cpp: Added.
2203         (WebCore::JSAudioNodeOwner::isReachableFromOpaqueRoots):
2204
2205 2019-05-06  Daniel Bates  <dabates@apple.com>
2206
2207         Google Docs & Yahoo! Japan: Can’t compose characters with Chinese or Japanese keyboard
2208         https://bugs.webkit.org/show_bug.cgi?id=197474
2209         <rdar://problem/47219324>
2210
2211         Reviewed by Ryosuke Niwa.
2212
2213         Fix up some #if defs to compile more Mac code when building on iOS.
2214
2215         * dom/KeyboardEvent.cpp:
2216         (WebCore::KeyboardEvent::KeyboardEvent):
2217         * platform/PlatformKeyboardEvent.h:
2218         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2219
2220 2019-05-06  Chris Dumez  <cdumez@apple.com>
2221
2222         Add assertions to CachedFrame to help figure out crash in CachedFrame constructor
2223         https://bugs.webkit.org/show_bug.cgi?id=197621
2224
2225         Reviewed by Geoffrey Garen.
2226
2227         Add release assertions to try and figure out who is sometimes detaching the document from its
2228         frame while constructing CachedFrames for its descendants.
2229
2230         * dom/Document.cpp:
2231         (WebCore::Document::detachFromFrame):
2232         * dom/Document.h:
2233         (WebCore::Document::setMayBeDetachedFromFrame):
2234         * history/CachedFrame.cpp:
2235         (WebCore::CachedFrame::CachedFrame):
2236
2237 2019-05-06  Zan Dobersek  <zdobersek@igalia.com>
2238
2239         [GLib] WebCore::MainThreadSharedTimer should use the appropriate GSource priority, name
2240         https://bugs.webkit.org/show_bug.cgi?id=197606
2241
2242         Reviewed by Carlos Garcia Campos.
2243
2244         * platform/MainThreadSharedTimer.cpp:
2245         (WebCore::MainThreadSharedTimer::MainThreadSharedTimer):
2246         Use the MainThreadSharedTimer GLib priority for this timer. The name is
2247         also adjusted accordingly.
2248
2249 2019-05-05  Wenson Hsieh  <wenson_hsieh@apple.com>
2250
2251         fast/attachment/attachment-folder-icon.html is an Image Only failure on recent macOS builds
2252         https://bugs.webkit.org/show_bug.cgi?id=197593
2253         <rdar://problem/50379267>
2254
2255         Reviewed by Tim Horton.
2256
2257         On recent versions of macOS, -[NSWorkspace iconForFileType:] returns the generic document icon for
2258         "public.directory". Instead of using this UTI to generate attachment icons for "multipart/x-folder" and
2259         "application/vnd.apple.folder", we should instead be using "public.folder", which has a folder icon. This fixes
2260         the existing test fast/attachment/attachment-folder-icon.html, which currently results in an image diff on these
2261         builds of macOS.
2262
2263         * rendering/RenderThemeMac.mm:
2264         (WebCore::iconForAttachment):
2265
2266 2019-05-04  Alex Christensen  <achristensen@webkit.org>
2267
2268         Revert r244953 and r244954 because they broke internal builds.
2269         https://bugs.webkit.org/show_bug.cgi?id=197534
2270
2271         * platform/ios/PlatformPasteboardIOS.mm:
2272         (WebCore::PlatformPasteboard::changeCount const):
2273         (WebCore::PlatformPasteboard::write):
2274
2275 2019-05-04  Alex Christensen  <achristensen@webkit.org>
2276
2277         Merge the three UIKitSPI.h files into a single one in PAL
2278         https://bugs.webkit.org/show_bug.cgi?id=197534
2279
2280         Reviewed by Darin Adler.
2281
2282         * platform/ios/PlatformPasteboardIOS.mm:
2283         (WebCore::PlatformPasteboard::changeCount const):
2284         (WebCore::PlatformPasteboard::write):
2285
2286 2019-05-04  Youenn Fablet  <youenn@apple.com>
2287
2288         Convert some RealtimeOutgoingVideoSourceCocoa logging to ERROR_LOG
2289         https://bugs.webkit.org/show_bug.cgi?id=197549
2290
2291         Reviewed by Eric Carlson.
2292
2293         No change of behavior.
2294
2295         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm:
2296         (WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer):
2297
2298 2019-05-03  Simon Fraser  <simon.fraser@apple.com>
2299
2300         [macOS] Fix programmatic scrolling with async overflow scroll
2301         https://bugs.webkit.org/show_bug.cgi?id=197590
2302
2303         Reviewed by Sam Weinig.
2304         
2305         ScrollingTreeOverflowScrollingNodeMac needs to handle RequestedScrollPosition.
2306
2307         Tests: scrollingcoordinator/mac/programmatic-frame-scroll.html
2308                scrollingcoordinator/mac/programmatic-overflow-scroll.html
2309
2310         * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
2311         (WebCore::ScrollingTreeOverflowScrollingNodeMac::commitStateAfterChildren):
2312
2313 2019-05-03  Zalan Bujtas  <zalan@apple.com>
2314
2315         [iOS] outlook.live.com: Compose email frame not fully visible and not scrollable
2316         https://bugs.webkit.org/show_bug.cgi?id=197573
2317         <rdar://problem/48008441>
2318
2319         Reviewed by Wenson Hsieh.
2320
2321         The outlook mail view's flex column setup produces a somewhat unfortunate layout at certain viewport widths.
2322         This patch addresses the issue by ensuring that we never fall into that range.
2323
2324         * page/Quirks.cpp:
2325         (WebCore::Quirks::shouldIgnoreShrinkToFitContent const):
2326         (WebCore::Quirks::overriddenViewportLayoutWidth const):
2327         * page/Quirks.h:
2328
2329 2019-05-02  Jiewen Tan  <jiewen_tan@apple.com>
2330
2331         [WebAuthN] A focused document should be required
2332         https://bugs.webkit.org/show_bug.cgi?id=197543
2333         <rdar://problem/50430989>
2334
2335         Reviewed by Brent Fulgham.
2336
2337         This patch adds a check to see if the invoking document is focused before
2338         calling into WebAuthN. This patch also removes some out-to-dated comments.
2339
2340         Test: http/wpt/webauthn/public-key-credential-unfocused-document.https.html
2341
2342         * Modules/credentialmanagement/CredentialsContainer.cpp:
2343         (WebCore::CredentialsContainer::get):
2344         (WebCore::CredentialsContainer::isCreate):
2345         * Modules/webauthn/AuthenticatorCoordinator.cpp:
2346         (WebCore::AuthenticatorCoordinator::create const):
2347         (WebCore::AuthenticatorCoordinator::discoverFromExternalSource const):
2348
2349 2019-05-03  Devin Rousso  <drousso@apple.com>
2350
2351         Web Inspector: DOM: rename "low power" to "display composited"
2352         https://bugs.webkit.org/show_bug.cgi?id=197296
2353
2354         Reviewed by Joseph Pecoraro.
2355
2356         Removed specific ChangeLog entries since it is almost entirely mechanical changes.
2357
2358         * inspector/agents/InspectorDOMAgent.h:
2359         * inspector/agents/InspectorDOMAgent.cpp:
2360
2361 2019-05-03  Daniel Bates  <dabates@apple.com>
2362
2363         Pass KeyboardEvent by reference in more places
2364         https://bugs.webkit.org/show_bug.cgi?id=197480
2365
2366         Reviewed by Wenson Hsieh.
2367
2368         * editing/Editor.cpp:
2369         (WebCore::Editor::handleKeyboardEvent):
2370         (WebCore::Editor::handleInputMethodKeydown):
2371         * loader/EmptyClients.cpp:
2372         * page/EditorClient.h:
2373
2374 2019-05-03  Chris Dumez  <cdumez@apple.com>
2375
2376         [iOS Sim Debug] ASSERTION FAILED The atomic string comes from an other thread! Layout Test imported/w3c/web-platform-tests/workers/WorkerNavigator_appName.htm is a flaky crash
2377         https://bugs.webkit.org/show_bug.cgi?id=197530
2378         <rdar://problem/50448285>
2379
2380         Reviewed by Geoffrey Garen.
2381
2382         The issue is that NavigatorBase::platform() was not thread safe but was called by both Navigator on
2383         the main thread and WorkerNavigator on worker threads.
2384
2385         No new tests, covered by existing tests.
2386
2387         * page/Navigator.cpp:
2388         (WebCore::Navigator::platform const):
2389         * page/Navigator.h:
2390
2391         * page/NavigatorBase.cpp:
2392         (WebCore::NavigatorBase::platform const):
2393         * page/NavigatorBase.h:
2394         Make NavigatorBase::platform() thread safe.
2395
2396         * platform/ios/Device.cpp:
2397         (WebCore::deviceName):
2398         * platform/ios/Device.h:
2399         Make WebCore::deviceName() thread safe.
2400
2401         * platform/ios/UserAgentIOS.mm:
2402         (WebCore::deviceNameForUserAgent):
2403         Cache value returned by WebCore::deviceName() for performance.
2404
2405 2019-05-03  Chris Dumez  <cdumez@apple.com>
2406
2407         Use WeakPtr for JSLazyEventListener::m_originalNode for safety
2408         https://bugs.webkit.org/show_bug.cgi?id=197576
2409         <rdar://problem/24314027>
2410
2411         Reviewed by Alex Christensen.
2412
2413         * bindings/js/JSLazyEventListener.cpp:
2414         (WebCore::JSLazyEventListener::JSLazyEventListener):
2415         (WebCore::JSLazyEventListener::create):
2416         * bindings/js/JSLazyEventListener.h:
2417
2418 2019-05-03  Eric Carlson  <eric.carlson@apple.com>
2419
2420         AVFoundation framework isn't always installed
2421         https://bugs.webkit.org/show_bug.cgi?id=197577
2422         <rdar://problem/50447841>
2423
2424         Reviewed by Jer Noble.
2425         
2426         Use PAL::isAVFoundationFrameworkAvailable() to check to see if AVFoundation is
2427         installed, not PAL::AVFoundationLibrary().
2428
2429         * platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm:
2430         (WebCore::AVFoundationMIMETypeCache::isAvailable const):
2431         (WebCore::AVFoundationMIMETypeCache::loadMIMETypes):
2432         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2433         (WebCore::MediaPlayerPrivateAVFoundationObjC::isAvailable):
2434         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType const):
2435         (WebCore::exernalDeviceDisplayNameForPlayer):
2436         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2437         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
2438         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
2439         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable):
2440         * platform/graphics/cocoa/HEVCUtilitiesCocoa.mm:
2441         (WebCore::validateHEVCParameters):
2442         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
2443         (WebCore::AVCaptureDeviceManager::isAvailable):
2444
2445 2019-05-03  Sihui Liu  <sihui_liu@apple.com>
2446
2447         Add assertion to check whether shm files have maximum FileProtection of CompleteUnlessOpen
2448         https://bugs.webkit.org/show_bug.cgi?id=197390
2449         <rdar://problem/42685773>
2450
2451         Reviewed by Geoffrey Garen.
2452
2453         We have seen crashes about accessing database files after device is locked. We are suspecting this is because 
2454         shm files have wrong data protection class, but shm files should not have Complete class protection when it 
2455         is created. It is likely the protection class is changed later. Add an assertion to verify our guess. If the 
2456         crash signature changes after this patch, we probably need to change database implementation. If it is not, we
2457         have other problem than data protection.
2458
2459         * platform/sql/SQLiteDatabase.cpp:
2460         (WebCore::SQLiteDatabase::open):
2461
2462 2019-05-03  Youenn Fablet  <youenn@apple.com>
2463
2464         Cache.add and Cache.addAll should compute a correct response body size
2465         https://bugs.webkit.org/show_bug.cgi?id=197464
2466
2467         Reviewed by Chris Dumez.
2468
2469         Compute the response body size as we do for regular Cache.put
2470
2471         Test: http/wpt/cache-storage/cache-quota-add.any.html
2472
2473         * Modules/cache/CacheStorageConnection.cpp:
2474         (WebCore::CacheStorageConnection::computeRecordBodySize):
2475         * Modules/cache/CacheStorageConnection.h:
2476         * Modules/cache/DOMCache.cpp:
2477         (WebCore::FetchTasksHandler::addResponseBody):
2478         (WebCore::DOMCache::addAll):
2479         Compute the response body size requires getting access to the connection.
2480         'this' is added to the lambda which is fine since taskHandler keeps a
2481         Ref to 'this' in its completion handler.
2482         (WebCore::DOMCache::toConnectionRecord):
2483         * Modules/fetch/FetchResponse.h:
2484
2485 2019-05-03  Tomoki Imai  <Tomoki.Imai@sony.com>
2486
2487         [Cairo] Improve ShadowBlur performance using tiling optimization
2488         https://bugs.webkit.org/show_bug.cgi?id=197308
2489         Reviewed by Žan Doberšek.
2490
2491         Enable tiling tiling-based optimization for drawRectShadow() and drawInsetShadow().
2492         Since r228776, cairo ports doesn't have tiling-based optimization.
2493
2494         For AppleWin, this patch refactors code and it shares almost same code as cairo port.
2495         Only the difference is that AppleWin uses ScratchBuffer, but cairo ports doesn't.
2496         This should avoid a performance regression for AppleWin.
2497
2498         No new tests, covered by existing tests.
2499
2500         * platform/graphics/ShadowBlur.cpp:
2501         (WebCore::calculateLobes):
2502         Fix stylecheck errors
2503
2504         (WebCore::ShadowBlur::blurLayerImage):
2505         Fix stylecheck errors
2506
2507         (WebCore::ShadowBlur::calculateLayerBoundingRect):
2508         We don't use position of m_sourceRect, so change the type to FloatSize.
2509
2510         (WebCore::ShadowBlur::drawShadowBuffer):
2511         Use m_layerSize instead of m_shadowedResultSize to fillRect, as m_layerSize is always smaller than m_shadowedResultSize.
2512         It's because in m_layerSize is equal to m_shadowedResultSize if it's not clipped.
2513         Clipping doesn't increase size of m_layerSize, so m_layerSize is always smaller than or equal to m_shadowedResultSize.
2514
2515         (WebCore::ShadowBlur::templateSize const):
2516         Fix stylecheck errors
2517
2518         (WebCore::ShadowBlur::drawRectShadow):
2519         (WebCore::ShadowBlur::drawInsetShadow):
2520         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
2521         (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
2522         (WebCore::ShadowBlur::drawRectShadowWithTiling):
2523         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
2524         Incorporate tile-based drawing.
2525         To accomplish it, this patch abstracts GraphicsContext::drawImageBuffer to ShadowBlur::DrawImageCallback,
2526         GraphicsContext::fillRect to ShadowBlur::FillRectCallback, drawing rect with hole to  ShadowBlur::FillRectWithHoleCallback.
2527
2528         Variants which takes GraphicsContext as parameter now just calls another drawRectShadow.
2529
2530         (WebCore::ShadowBlur::drawLayerPieces):
2531         Instead of graphicsContext.drawImageBuffer, call corresponding callback.
2532
2533         (WebCore::ShadowBlur::drawLayerPiecesAndFillCenter):
2534         This function calls drawLayerPieces and fill center for outer shadow.
2535         Drawing outer shadow requires another callback for graphicsContext.fillRect.
2536
2537         (WebCore::ShadowBlur::drawShadowLayer):
2538         Use m_layerSize instead of m_shadowedResultSize to fillRect,
2539         as m_layerSize is always smaller than m_shadowedResultSize.
2540
2541         * platform/graphics/ShadowBlur.h:
2542         Rename m_sourceRect to m_shadowedResultSize, and change it to FloatSize from FloatRect.
2543         Remove GraphicsContext usage as much as possible and replace them by corresponding callbacks.
2544
2545         * platform/graphics/cairo/CairoOperations.cpp:
2546         (WebCore::Cairo::drawShadowImage):
2547         This function corresponds to ShadowBlur::DrawImageCallback.
2548
2549         (WebCore::Cairo::fillShadowBuffer):
2550         Erase sourceRect, as it's always bigger than layerSize.
2551
2552         (WebCore::Cairo::drawPathShadow):
2553         (WebCore::Cairo::drawGlyphsShadow):
2554         Erase unused parameter.
2555
2556         (WebCore::Cairo::fillRect):
2557         (WebCore::Cairo::fillRoundedRect):
2558         (WebCore::Cairo::fillRectWithRoundedHole):
2559         For tile-based optimization, add extra arguments to drawRectShadow.
2560
2561         (WebCore::Cairo::drawSurface):
2562         Erase unused parameter.
2563
2564 2019-05-03  Antti Koivisto  <antti@apple.com>
2565
2566         Add a quirk to make youtube navigation bar scrollable without mouse hover on iOS
2567         https://bugs.webkit.org/show_bug.cgi?id=197555
2568         <rdar://problem/49582231>
2569
2570         Reviewed by Brent Fulgham.
2571
2572         * css/StyleResolver.cpp:
2573         (WebCore::StyleResolver::adjustRenderStyleForSiteSpecificQuirks):
2574
2575         Turn 'overflow:hidden' into 'overflow:auto' on element with id="guide-inner-content".
2576
2577         * page/Quirks.cpp:
2578         (WebCore::Quirks::needsYouTubeOverflowScrollQuirk const):
2579         * page/Quirks.h:
2580
2581 2019-05-03  Devin Rousso  <drousso@apple.com>
2582
2583         Web Inspector: Record actions performed on WebGL2RenderingContext
2584         https://bugs.webkit.org/show_bug.cgi?id=176008
2585         <rdar://problem/34213884>
2586
2587         Reviewed by Joseph Pecoraro.
2588
2589         Tests: inspector/canvas/recording-webgl2.html
2590                inspector/canvas/recording-webgl2-snapshots.html
2591
2592         * html/canvas/WebGL2RenderingContext.idl:
2593
2594         * bindings/js/CallTracerTypes.h:
2595         * inspector/RecordingSwizzleTypes.h:
2596
2597         * inspector/InspectorCanvas.h:
2598         * inspector/InspectorCanvas.cpp:
2599         (WebCore::InspectorCanvas::canvasChanged): Added.
2600         (WebCore::InspectorCanvas::resetRecordingData):
2601         (WebCore::shouldSnapshotWebGL2Action): Added.
2602         (WebCore::InspectorCanvas::recordAction):
2603         (WebCore::InspectorCanvas::releaseObjectForRecording):
2604         (WebCore::InspectorCanvas::appendActionSnapshotIfNeeded):
2605         (WebCore::InspectorCanvas::buildAction):
2606         * inspector/agents/InspectorCanvasAgent.h:
2607         * inspector/agents/InspectorCanvasAgent.cpp:
2608         (WebCore::InspectorCanvasAgent::canvasChanged): Added.
2609         (WebCore::InspectorCanvasAgent::startRecording):
2610         Provide an actual implementation of `CanvasObserver::canvasChanged` since it can be used to
2611         determine whether or not an action needs a snapshot.
2612
2613         * page/PageConsoleClient.cpp:
2614         (WebCore::canvasRenderingContext):
2615
2616 2019-05-03  Commit Queue  <commit-queue@webkit.org>
2617
2618         Unreviewed, rolling out r244881.
2619         https://bugs.webkit.org/show_bug.cgi?id=197559
2620
2621         Breaks compilation of jsconly on linux, breaking compilation
2622         for jsc-i386-ews, jsc-mips-ews and jsc-armv7-ews (Requested by
2623         guijemont on #webkit).
2624
2625         Reverted changeset:
2626
2627         "[CMake] Refactor WEBKIT_MAKE_FORWARDING_HEADERS into
2628         WEBKIT_COPY_FILES"
2629         https://bugs.webkit.org/show_bug.cgi?id=197174
2630         https://trac.webkit.org/changeset/244881
2631
2632 2019-05-03  Joonghun Park  <jh718.park@samsung.com>
2633
2634         Resolve the percentage values of inset properties against proper box.
2635         https://bugs.webkit.org/show_bug.cgi?id=189549
2636
2637         Reviewed by Antti Koivisto.
2638
2639         Before this CL, sticky element's layout was executed relative to
2640         a box's overflow container,
2641         but the value returned by getComputedStyle was resolved against
2642         its containing block.
2643
2644         So, the computed value and the actual value used in layout
2645         was different before this change.
2646
2647         Tests: imported/w3c/web-platform-tests/css/cssom/getComputedStyle-insets-sticky-container-for-abspos.html
2648                imported/w3c/web-platform-tests/css/cssom/getComputedStyle-sticky-pos-percent.html
2649
2650         * css/CSSComputedStyleDeclaration.cpp:
2651         (WebCore::positionOffsetValue):
2652         * rendering/RenderBox.cpp:
2653         (WebCore::RenderBox::enclosingScrollportBox const):
2654         * rendering/RenderBox.h:
2655
2656 2019-05-02  Antti Koivisto  <antti@apple.com>
2657
2658         Add a quirk to make gmail navigation bar scrollable without mouse hover on iOS
2659         https://bugs.webkit.org/show_bug.cgi?id=197529
2660         <rdar://problem/49403416>
2661
2662         Reviewed by Simon Fraser.
2663
2664         * css/StyleResolver.cpp:
2665         (WebCore::StyleResolver::adjustRenderStyle):
2666         (WebCore::StyleResolver::adjustRenderStyleForSiteSpecificQuirks):
2667
2668         Turn 'overflow:hidden' to 'overflow:auto' on element with role="navigation".
2669         This should be both reasonably targeted and robust.
2670
2671         * css/StyleResolver.h:
2672         * page/Quirks.cpp:
2673         (WebCore::Quirks::needsGMailOverflowScrollQuirk const):
2674         * page/Quirks.h:
2675
2676 2019-05-02  Simon Fraser  <simon.fraser@apple.com>
2677
2678         Add logging for RenderLayer clip rects
2679         https://bugs.webkit.org/show_bug.cgi?id=197547
2680
2681         Reviewed by Zalan Bujtas.
2682
2683         Add a ClipRects log channel, and stream output for ClipRect and ClipRects.
2684
2685         * platform/Logging.h:
2686         * rendering/ClipRect.cpp:
2687         (WebCore::operator<<):
2688         * rendering/ClipRect.h:
2689         * rendering/RenderLayer.cpp:
2690         (WebCore::operator<<):
2691         (WebCore::RenderLayer::calculateClipRects const):
2692         * rendering/RenderLayer.h:
2693
2694 2019-05-02  Youenn Fablet  <youenn@apple.com>
2695
2696         Make AudioContext::scriptExecutionContext() private
2697         https://bugs.webkit.org/show_bug.cgi?id=197512
2698
2699         Reviewed by Eric Carlson.
2700
2701         Refactor code to make audio nodes not rely on AudioContext::scriptExecutionContext.
2702         Instead, let AudioContext provide the necessary API for its nodes.
2703         Covered by existing tests.
2704
2705         * Modules/webaudio/AudioBufferSourceNode.cpp:
2706         (WebCore::AudioBufferSourceNode::looping):
2707         (WebCore::AudioBufferSourceNode::setLooping):
2708         * Modules/webaudio/AudioContext.cpp:
2709         (WebCore::AudioContext::postTask):
2710         (WebCore::AudioContext::origin const):
2711         (WebCore::AudioContext::addConsoleMessage):
2712         * Modules/webaudio/AudioContext.h:
2713         (WebCore::AudioContext::isStopped const):
2714         * Modules/webaudio/AudioNode.cpp:
2715         (WebCore::AudioNode::scriptExecutionContext const):
2716         * Modules/webaudio/AudioNode.h:
2717         * Modules/webaudio/AudioScheduledSourceNode.cpp:
2718         (WebCore::AudioScheduledSourceNode::finish):
2719         * Modules/webaudio/DefaultAudioDestinationNode.cpp:
2720         (WebCore::DefaultAudioDestinationNode::resume):
2721         (WebCore::DefaultAudioDestinationNode::suspend):
2722         (WebCore::DefaultAudioDestinationNode::close):
2723         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
2724         (WebCore::MediaElementAudioSourceNode::wouldTaintOrigin):
2725         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
2726         (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
2727         * Modules/webaudio/ScriptProcessorNode.cpp:
2728         (WebCore::ScriptProcessorNode::fireProcessEvent):
2729
2730 2019-05-02  Ryosuke Niwa  <rniwa@webkit.org>
2731
2732         Disable software keyboard for a math field textarea on desmos.com
2733         https://bugs.webkit.org/show_bug.cgi?id=197488
2734
2735         Reviewed by Wenson Hsieh.
2736
2737         Treat a textarea inside a math field span as if it had inputmode content attribute set to none to suppress
2738         the software keyboard on desmos.com as it interferes with website's own UI.
2739
2740         * html/HTMLElement.cpp:
2741         (WebCore::HTMLElement::canonicalInputMode const):
2742         * page/Quirks.cpp:
2743         (WebCore::Quirks::needsInputModeNoneImplicitly const):
2744         * page/Quirks.h:
2745
2746 2019-05-02  Timothy Hatcher  <timothy@apple.com>
2747
2748         NSAttributedString conversion in a loop returns nil and WKUnknownError every other time.
2749         https://bugs.webkit.org/show_bug.cgi?id=197523
2750
2751         Reviewed by Darin Adler.
2752
2753         * editing/cocoa/HTMLConverter.mm:
2754         (HTMLConverter::convert): Don't return early if m_dataSource is nil. This is already null
2755         checked later and only needed in specific cases, it shouldn't fail the whole conversion.
2756
2757 2019-05-02  Chris Dumez  <cdumez@apple.com>
2758
2759         Setting a frame's src to a javascript URL should not run it synchronously
2760         https://bugs.webkit.org/show_bug.cgi?id=197466
2761
2762         Reviewed by Darin Adler.
2763
2764         When an iframe's src attribute is set to a javascript URL, whether when parsing
2765         or later on via JS, we now execute the URL's JavaScript asynchronously. We used
2766         to execute it synchronously, which was a source of bugs and also did not match
2767         other browsers.
2768
2769         I have verified that our new behavior is aligned with both Firefox and Chrome.
2770
2771         Note that for backward-compatibility and interoperability with Blink
2772         (https://bugs.chromium.org/p/chromium/issues/detail?id=923585), the
2773         "javascript:''" URL will still run synchronously. We should consider dropping
2774         this quirk at some point.
2775
2776         Test: fast/dom/frame-src-javascript-url-async.html
2777
2778         * loader/NavigationScheduler.cpp:
2779         (WebCore::ScheduledLocationChange::ScheduledLocationChange):
2780         (WebCore::ScheduledLocationChange::~ScheduledLocationChange):
2781         (WebCore::NavigationScheduler::scheduleLocationChange):
2782         * loader/NavigationScheduler.h:
2783         (WebCore::NavigationScheduler::scheduleLocationChange):
2784         * loader/SubframeLoader.cpp:
2785         (WebCore::SubframeLoader::requestFrame):
2786
2787 2019-05-02  Gary Katsevman  <git@gkatsev.com>
2788
2789         WebVTT: fix vertical cue alignment.
2790         https://bugs.webkit.org/show_bug.cgi?id=136627.
2791         <rdar://problem/49725538>
2792
2793         Reviewed by Eric Carlson.
2794
2795         Updated existing test results.
2796
2797         * html/track/VTTCue.cpp:
2798         (WebCore::VTTCueBox::applyCSSProperties):
2799
2800 2019-05-02  Don Olmstead  <don.olmstead@sony.com>
2801
2802         [CMake] Refactor WEBKIT_MAKE_FORWARDING_HEADERS into WEBKIT_COPY_FILES
2803         https://bugs.webkit.org/show_bug.cgi?id=197174
2804
2805         Reviewed by Alex Christensen.
2806
2807         Replace WEBKIT_MAKE_FORWARDING_HEADERS with WEBKIT_COPY_FILES and make dependencies
2808         for framework headers explicit.
2809
2810         * CMakeLists.txt:
2811
2812 2019-05-02  Jiewen Tan  <jiewen_tan@apple.com>
2813
2814         [WebAuthN] Add a quirk for google.com when processing AppID extension
2815         https://bugs.webkit.org/show_bug.cgi?id=196046
2816         <rdar://problem/49088479>
2817
2818         Reviewed by Brent Fulgham.
2819
2820         Relaxing the same site restriction on AppID while in google.com and any
2821         of its subdomains to allow two www.gstatic.com AppIDs to slip in.
2822
2823         Covered by manual tests on Google.com.
2824
2825         * Modules/webauthn/AuthenticatorCoordinator.cpp:
2826         (WebCore::AuthenticatorCoordinatorInternal::needsAppIdQuirks):
2827         (WebCore::AuthenticatorCoordinatorInternal::processAppIdExtension):
2828
2829 2019-05-02  Ross Kirsling  <ross.kirsling@sony.com>
2830
2831         Unreviewed fix for non-unified build after r244853.
2832
2833         * page/SecurityOrigin.cpp:
2834
2835 2019-05-02  Frederic Wang  <fwang@igalia.com>
2836
2837         [GTK][WPE] Disable "thin", "thick", "medium" values of mfrac@linethickness at runtime
2838         https://bugs.webkit.org/show_bug.cgi?id=196142
2839
2840         This patch introduces some experimental runtime flag to let users
2841         disable MathML features that are removed from MathML Core [1]. For now,
2842         these features are only disabled on GTK and WPE ports. This patch also
2843         adds a condition to disable "thin", "thick", "medium" values of
2844         mfrac@linethickness at runtime as agreed in [2].
2845
2846         [1] https://mathml-refresh.github.io/mathml-core/
2847         [2] https://github.com/mathml-refresh/mathml/issues/4
2848
2849         Reviewed by Rob Buis.
2850
2851         No new tests, covered by frac-linethickness-0001.html
2852
2853         * mathml/MathMLFractionElement.cpp:
2854         (WebCore::MathMLFractionElement::lineThickness): Just do standard
2855         parsing for MathML lengths when non-core MathML features are disabled.
2856         * page/Settings.yaml: Add WebCore setting.
2857
2858 2019-05-01  Jiewen Tan  <jiewen_tan@apple.com>
2859
2860         [WebAuthN] Adopt SecurityOrigin::isMatchingRegistrableDomainSuffix()
2861         https://bugs.webkit.org/show_bug.cgi?id=197481
2862
2863         Reviewed by Brent Fulgham.
2864
2865         This patch implements Step 6-7 from:
2866         https://www.w3.org/TR/webauthn/#createCredential,
2867         https://www.w3.org/TR/webauthn/#discover-from-external-source.
2868
2869         Test: http/wpt/webauthn/public-key-credential-ip-address.html
2870
2871         * Modules/webauthn/AuthenticatorCoordinator.cpp:
2872         (WebCore::AuthenticatorCoordinator::create const):
2873         (WebCore::AuthenticatorCoordinator::discoverFromExternalSource const):
2874
2875 2019-05-01  Youenn Fablet  <youenn@apple.com>
2876
2877         Add back hasNullReferences() assert in Document::updateIsPlayingMedia
2878         https://bugs.webkit.org/show_bug.cgi?id=197477
2879
2880         Reviewed by Eric Carlson.
2881
2882         AudioContext had a special scriptExecutionContext() getter
2883         that was returning nullptr when AudioContext is stopped.
2884         Instead, make this getter behave as all other scriptExecutionContext() getters
2885         and make sure existing call sites of the getter are fine with the change.
2886
2887         Covered by existing tests.
2888
2889         * Modules/webaudio/AudioContext.cpp:
2890         (WebCore::AudioContext::AudioContext):
2891         No need to check whether offline since this constructor is for non offline AudioContext.
2892         (WebCore::AudioContext::scriptExecutionContext const):
2893         (WebCore::AudioContext::fireCompletionEvent):
2894         * dom/Document.cpp:
2895         (WebCore::Document::updateIsPlayingMedia):
2896
2897 2019-05-01  Justin Fan  <justin_fan@apple.com>
2898
2899         Update WebGPU class names based on sketch.idl
2900         https://bugs.webkit.org/show_bug.cgi?id=194260
2901
2902         Reviewed by Dean Jackson.
2903
2904         Update all exposed Web GPU interface names to GPU* prefix.
2905
2906         Existing Web GPU tests updated to expect new names.
2907
2908         * Modules/webgpu/WebGPU.idl:
2909         * Modules/webgpu/WebGPUAdapter.idl:
2910         * Modules/webgpu/WebGPUBindGroup.idl:
2911         * Modules/webgpu/WebGPUBindGroupLayout.idl:
2912         * Modules/webgpu/WebGPUBuffer.idl:
2913         * Modules/webgpu/WebGPUDevice.idl:
2914         * Modules/webgpu/WebGPUInputStepMode.h: Removed.
2915         * Modules/webgpu/WebGPUPipelineLayout.idl:
2916         * Modules/webgpu/WebGPUProgrammablePassEncoder.idl:
2917         * Modules/webgpu/WebGPUQueue.idl:
2918         * Modules/webgpu/WebGPURenderPassEncoder.idl:
2919         * Modules/webgpu/WebGPURenderPipeline.idl:
2920         * Modules/webgpu/WebGPUSampler.idl:
2921         * Modules/webgpu/WebGPUTexture.idl:
2922         * Modules/webgpu/WebGPUTextureView.idl:
2923         * WebCore.xcodeproj/project.pbxproj:
2924         * bindings/js/WebCoreBuiltinNames.h:
2925
2926 2019-05-01  Jiewen Tan  <jiewen_tan@apple.com>
2927
2928         Move Document::domainIsRegisterable to SecurityOrigin::isMatchingRegistrableDomainSuffix
2929         https://bugs.webkit.org/show_bug.cgi?id=181950
2930         <rdar://problem/43357371>
2931
2932         Reviewed by Brent Fulgham.
2933
2934         This patch moves Document::domainIsRegisterable to SecurityOrigin::isMatchingRegistrableDomainSuffix
2935         to be more aligned with the HTML standard:
2936         https://html.spec.whatwg.org/multipage/origin.html#is-a-registrable-domain-suffix-of-or-is-equal-to.
2937         Besides that, it also removes redundant codes within the original method that is also done in
2938         OriginAccessEntry::matchesOrigin.
2939
2940         Covered by new API tests.
2941
2942         * dom/Document.cpp:
2943         (WebCore::Document::setDomain):
2944         (WebCore::Document::domainIsRegisterable const): Deleted.
2945         * dom/Document.h:
2946         * page/SecurityOrigin.cpp:
2947         (WebCore::SecurityOrigin::isMatchingRegistrableDomainSuffix const):
2948         * page/SecurityOrigin.h:
2949
2950 2019-05-01  Ryosuke Niwa  <rniwa@webkit.org>
2951
2952         [iOS] Element::focus and Element::scrollIntoView do not clamp scroll positions
2953         https://bugs.webkit.org/show_bug.cgi?id=197211
2954
2955         Reviewed by Simon Fraser.
2956
2957         Fixed the bug that Element::focus and Element::scrollIntoView were not clamping scroll offsets,
2958         which causes scrollTop etc... to return a bogus negative scrolling offset.
2959
2960         Unfortunately, we can't just use FrameView's ScrollableArea::constrainScrollPosition since
2961         scrollRectToVisible relies on the visible rect being expanded by the content insets in order to scroll to
2962         a position within the content insets of UIScrollView; e.g. revealing the top of the page as the center.
2963         We manually expand minimumScrollPosition() and maximumScrollPosition() by the content insets instead.
2964
2965         Tests: fast/scrolling/ios/programmatic-scroll-via-focus-should-clamp-top.html
2966                fast/scrolling/ios/programmatic-scroll-via-scrollIntoView-inside-iframe-should-clamp-top.html
2967                fast/scrolling/ios/programmatic-scroll-via-scrollIntoView-should-clamp-top.html
2968
2969         * rendering/RenderLayer.cpp:
2970         (WebCore::RenderLayer::scrollRectToVisible):
2971
2972 2019-05-01  Wenson Hsieh  <wenson_hsieh@apple.com>
2973
2974         [iOS] Add a version of viewport shrink-to-fit heuristics that preserves page layout
2975         https://bugs.webkit.org/show_bug.cgi?id=197342
2976         <rdar://problem/50063091>
2977
2978         Reviewed by Tim Horton.
2979
2980         Adds support for a new shrink-to-fit heuristic that attempts to lay out the contents of the page at a larger
2981         width in order to shrink content to fit the viewport. See WebKit ChangeLog for more details.
2982
2983         Tests: fast/viewport/ios/shrink-to-fit-content-constant-width.html
2984                fast/viewport/ios/shrink-to-fit-content-large-width-breakpoint.html
2985                fast/viewport/ios/shrink-to-fit-content-no-viewport.html
2986                fast/viewport/ios/shrink-to-fit-content-responsive-viewport-with-horizontal-overflow.html
2987                fast/viewport/ios/shrink-to-fit-content-temporary-overflow.html
2988
2989         * page/ViewportConfiguration.cpp:
2990         (WebCore::ViewportConfiguration::setMinimumEffectiveDeviceWidth):
2991         (WebCore::ViewportConfiguration::setIsKnownToLayOutWiderThanViewport):
2992         (WebCore::ViewportConfiguration::description const):
2993         * page/ViewportConfiguration.h:
2994         (WebCore::ViewportConfiguration::canIgnoreScalingConstraints const):
2995         (WebCore::ViewportConfiguration::minimumEffectiveDeviceWidth const):
2996
2997         Add several new getters and setters in ViewportConfiguration.
2998
2999         (WebCore::ViewportConfiguration::isKnownToLayOutWiderThanViewport const):
3000         (WebCore::ViewportConfiguration::shouldIgnoreMinimumEffectiveDeviceWidth const):
3001
3002         Importantly, only allow ignoring the minimum effective device width in webpages with responsive viewports, if
3003         they also have *not* laid out wider than the viewport.
3004
3005         (WebCore::ViewportConfiguration::setForceAlwaysUserScalable):
3006
3007 2019-05-01  Zalan Bujtas  <zalan@apple.com>
3008
3009         [iOS] Star rating is covered with a black circle when writing a review on Yelp
3010         https://bugs.webkit.org/show_bug.cgi?id=197469
3011         <rdar://problem/48094446>
3012
3013         Reviewed by Dean Jackson.
3014
3015         This patch moves the background painting of the radio/checkbox form controls in checked state to RenderTheme.
3016         It enables content authors to disable default appearance using -webkit-appearance: none (it is also inline with what we do on macOS).
3017
3018         Test: fast/forms/radio-and-checkbox-checked-with-no-appearance.html
3019
3020         * css/html.css:
3021         (input:matches([type="checkbox"], [type="radio"]):checked):
3022         * rendering/RenderThemeIOS.mm:
3023         (WebCore::RenderThemeIOS::paintCheckboxDecorations):
3024         (WebCore::RenderThemeIOS::paintRadioDecorations):
3025
3026 2019-05-01  Said Abou-Hallawa  <sabouhallawa@apple.com>
3027
3028         REGRESSION (r244182): RenderingUpdate should not be scheduled for invisible pages
3029         https://bugs.webkit.org/show_bug.cgi?id=197451
3030
3031         Reviewed by Simon Fraser.
3032
3033         Before r244182, some web pages never need to schedule a RenderingUpdate.
3034         Only pages with rAF callbacks, web animations, intersection and resize 
3035         observers needed to do so. After r244182, all pages have to schedule a
3036         RenderingUpdate when a page rendering update is required.
3037
3038         When Safari opens, it create a 'blank' web page. The blank page will not
3039         be visible unless the user selects to show the 'Empty page' in the new
3040         tab. Although the blank page is not visible, the loader needs to resolveStyle()
3041         which requires to scheduleLayerFlushNow(). 
3042
3043         We need to optimize this case: calling scheduleLayerFlushNow() for invisible
3044         pages. We do that by checking if the page is visible before scheduling
3045         the RenderingUpdate.
3046
3047         Also we need to change or get rid of scheduleLayerFlushNow() since its name
3048         has become confusing. It suggests that it is going to schedule flushing
3049         the layer 'now'. But after r244182, it does scheduleRenderingUpdate() first.
3050         And when it fires, scheduleCompositingLayerFlush() will be called.
3051
3052         * page/RenderingUpdateScheduler.cpp:
3053         (WebCore::RenderingUpdateScheduler::scheduleRenderingUpdate):
3054         * rendering/RenderLayerCompositor.cpp:
3055         (WebCore::RenderLayerCompositor::scheduleLayerFlush):
3056         (WebCore::RenderLayerCompositor::didChangeVisibleRect):
3057         (WebCore::RenderLayerCompositor::frameViewDidScroll):
3058         (WebCore::RenderLayerCompositor::attachRootLayer):
3059         (WebCore::RenderLayerCompositor::setLayerFlushThrottlingEnabled):
3060         (WebCore::RenderLayerCompositor::layerFlushTimerFired):
3061         (WebCore::RenderLayerCompositor::scheduleLayerFlushNow): Deleted.
3062         * rendering/RenderLayerCompositor.h:
3063
3064 2019-05-01  Darin Adler  <darin@apple.com>
3065
3066         WebKit has too much of its own UTF-8 code and should rely more on ICU's UTF-8 support
3067         https://bugs.webkit.org/show_bug.cgi?id=195535
3068
3069         Reviewed by Alexey Proskuryakov.
3070
3071         * platform/SharedBuffer.cpp:
3072         (WebCore::utf8Buffer): Removed unnecessary "strict" argument to convertUTF16ToUTF8 since
3073         that is the default behavior. Also updated for changes to return values.
3074
3075         * xml/XSLTProcessorLibxslt.cpp:
3076         (WebCore::writeToStringBuilder): Removed unnecessary use of StringBuffer for a temporary
3077         buffer for characters. Rewrote to use U8_NEXT and U16_APPEND directly.
3078
3079         * xml/parser/XMLDocumentParserLibxml2.cpp:
3080         (WebCore::convertUTF16EntityToUTF8): Updated for changes to CompletionResult.
3081
3082 2019-05-01  Shawn Roberts  <sroberts@apple.com>
3083
3084         Unreviewed, rolling out r244821.
3085
3086         Causing
3087
3088         Reverted changeset:
3089
3090         "WebKit has too much of its own UTF-8 code and should rely
3091         more on ICU's UTF-8 support"
3092         https://bugs.webkit.org/show_bug.cgi?id=195535
3093         https://trac.webkit.org/changeset/244821
3094
3095 2019-05-01  Shawn Roberts  <sroberts@apple.com>
3096
3097         Unreviewed, rolling out r244822.
3098
3099         Causing
3100
3101         Reverted changeset:
3102
3103         https://trac.webkit.org/changeset/244822
3104
3105 2019-05-01  Youenn Fablet  <youenn@apple.com>
3106
3107         Reject/throw when calling AudioContext methods on a stopped AudioContext
3108         https://bugs.webkit.org/show_bug.cgi?id=197391
3109
3110         Reviewed by Eric Carlson.
3111
3112         Return InvalidStateError in that case.
3113         ASSERT that we do not call lazyInitialize after being stopped
3114         since this would mean we are doing unneeded processing.
3115
3116         Test: http/wpt/webaudio/audiocontext-stopped.html
3117
3118         * Modules/webaudio/AudioContext.cpp:
3119         (WebCore::AudioContext::lazyInitialize):
3120         (WebCore::AudioContext::createBufferSource):
3121         (WebCore::AudioContext::createMediaElementSource):
3122         (WebCore::AudioContext::createMediaStreamSource):
3123         (WebCore::AudioContext::createMediaStreamDestination):
3124         (WebCore::AudioContext::createScriptProcessor):
3125         (WebCore::AudioContext::createBiquadFilter):
3126         (WebCore::AudioContext::createWaveShaper):
3127         (WebCore::AudioContext::createPanner):
3128         (WebCore::AudioContext::createConvolver):
3129         (WebCore::AudioContext::createDynamicsCompressor):
3130         (WebCore::AudioContext::createAnalyser):
3131         (WebCore::AudioContext::createGain):
3132         (WebCore::AudioContext::createDelay):
3133         (WebCore::AudioContext::createChannelSplitter):
3134         (WebCore::AudioContext::createChannelMerger):
3135         (WebCore::AudioContext::createOscillator):
3136         (WebCore::AudioContext::createPeriodicWave):
3137         (WebCore::AudioContext::startRendering):
3138         (WebCore::AudioContext::suspend):
3139         (WebCore::AudioContext::resume):
3140         (WebCore::AudioContext::close):
3141         * Modules/webaudio/AudioContext.h:
3142         * Modules/webaudio/AudioContext.idl:
3143
3144 2019-05-01  Eric Carlson  <eric.carlson@apple.com>
3145
3146         XMLHttpRequest should propagate user gestures for media playback
3147         https://bugs.webkit.org/show_bug.cgi?id=197428
3148         <rdar://problem/46677392>
3149
3150         Reviewed by Jer Noble.
3151
3152         A user gesture the would allow media state change in effect when XMLHttpRequest.send is 
3153         called should be active when the event handlers fire after the transaction completes successfully.
3154
3155         Test: http/tests/media/user-gesture-preserved-across-xmlhttprequest.html
3156
3157         * dom/UserGestureIndicator.cpp:
3158         (WebCore::UserGestureIndicator::UserGestureIndicator): Add a 'scope' parameter to potentially
3159         limit the scope of the gesture to just media.
3160         (WebCore::UserGestureIndicator::~UserGestureIndicator): Clear the scope.
3161         * dom/UserGestureIndicator.h:
3162         (WebCore::UserGestureToken::processingUserGesture const):
3163         (WebCore::UserGestureToken::setScope):
3164         (WebCore::UserGestureToken::resetScope):
3165         (WebCore::UserGestureToken::hasExpired const):
3166
3167         * page/DOMTimer.cpp:
3168         (WebCore::DOMTimerFireState::DOMTimerFireState): Don't need to store the nested timer interval,
3169         UserGestureIndicator knows when it started.
3170         (WebCore::DOMTimer::DOMTimer): Ditto.
3171         (WebCore::DOMTimer::fired): Ditto.
3172         (WebCore::DOMTimerFireState::nestedTimerInterval const): Deleted.
3173         (WebCore::shouldForwardUserGesture): Deleted.
3174         (WebCore::userGestureTokenToForward): Deleted.
3175         (WebCore::currentNestedTimerInterval): Deleted.
3176         * page/DOMTimer.h:
3177
3178         * testing/Internals.cpp:
3179         (WebCore::Internals::setXHRMaximumIntervalForUserGestureForwarding): Override the maximum
3180         user gesture interval for testing.
3181         * testing/Internals.h:
3182         * testing/Internals.idl:
3183
3184         * xml/XMLHttpRequest.cpp:
3185         (WebCore::XMLHttpRequest::XMLHttpRequest): 
3186         (WebCore::XMLHttpRequest::send): Stash the user gesture token.
3187         (WebCore::XMLHttpRequest::dispatchEvent): Clear user gesture token if it has expired. If still
3188         valid, activate it.
3189         * xml/XMLHttpRequest.h:
3190
3191 2019-04-29  Darin Adler  <darin@apple.com>
3192
3193         WebKit has too much of its own UTF-8 code and should rely more on ICU's UTF-8 support
3194         https://bugs.webkit.org/show_bug.cgi?id=195535
3195
3196         Reviewed by Alexey Proskuryakov.
3197
3198         * platform/SharedBuffer.cpp:
3199         (WebCore::utf8Buffer): Removed unnecessary "strict" argument to convertUTF16ToUTF8 since
3200         that is the default behavior. Also updated for changes to return values.
3201
3202         * xml/XSLTProcessorLibxslt.cpp:
3203         (WebCore::writeToStringBuilder): Removed unnecessary use of StringBuffer for a temporary
3204         buffer for characters. Rewrote to use U8_NEXT and U16_APPEND directly.
3205
3206         * xml/parser/XMLDocumentParserLibxml2.cpp:
3207         (WebCore::convertUTF16EntityToUTF8): Updated for changes to CompletionResult.
3208
3209 2019-04-30  John Wilander  <wilander@apple.com>
3210
3211         Add logging of Ad Click Attribution errors and events to a dedicated channel
3212         https://bugs.webkit.org/show_bug.cgi?id=197332
3213         <rdar://problem/49918800>
3214
3215         Reviewed by Youenn Fablet.
3216
3217         This patch adds an experimental Ad Click Attribution debug mode which
3218         logs information.
3219
3220         No new tests.
3221
3222         * loader/AdClickAttribution.cpp:
3223         (WebCore::AdClickAttribution::parseConversionRequest):
3224         (WebCore::AdClickAttribution::debugModeEnabled):
3225         * loader/AdClickAttribution.h:
3226         * page/RuntimeEnabledFeatures.h:
3227         (WebCore::RuntimeEnabledFeatures::adClickAttributionDebugModeEnabled const):
3228         (WebCore::RuntimeEnabledFeatures::setAdClickAttributionDebugModeEnabled):
3229         * platform/Logging.h:
3230
3231 2019-04-30  Myles C. Maxfield  <mmaxfield@apple.com>
3232
3233         font-weight: 1000 is not parsed successfully
3234         https://bugs.webkit.org/show_bug.cgi?id=197427
3235
3236         Reviewed by Dean Jackson.
3237
3238         The spec says:
3239         "Only values greater than or equal to 1, and less than or equal to 1000, are valid"
3240
3241         This change brings us in-line with all the other browsers.
3242
3243         Test: fast/text/font-weight-1-1000.html
3244
3245         * css/parser/CSSPropertyParserHelpers.cpp:
3246         (WebCore::CSSPropertyParserHelpers::consumeFontWeightNumber):
3247
3248 2019-04-30  Youenn Fablet  <youenn@apple.com>
3249
3250         Make Document audio producers use WeakPtr
3251         https://bugs.webkit.org/show_bug.cgi?id=197382
3252
3253         Reviewed by Eric Carlson.
3254
3255         Move from a hash set of raw pointers to a hash set of weak pointers.
3256         This helps make the code cleaner.
3257         No observable change of behavior.
3258
3259         * Modules/mediastream/MediaStreamTrack.h:
3260         * dom/Document.cpp:
3261         (WebCore::Document::addAudioProducer):
3262         (WebCore::Document::removeAudioProducer):
3263         (WebCore::Document::updateIsPlayingMedia):
3264         (WebCore::Document::pageMutedStateDidChange):
3265         * dom/Document.h:
3266         * html/HTMLMediaElement.cpp:
3267         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
3268         * html/HTMLMediaElement.h:
3269         * page/MediaProducer.h:
3270
3271 2019-04-30  Youenn Fablet  <youenn@apple.com>
3272
3273         [macOS WK1] ASSERTION FAILED: formData in WebCore::ResourceRequest::doUpdateResourceHTTPBody()
3274         https://bugs.webkit.org/show_bug.cgi?id=196864
3275         <rdar://problem/49854497>
3276
3277         Reviewed by Alex Christensen.
3278
3279         In case of redirection, it is sometimes not possible to retrieve the form data
3280         from its NSInputStream in case of redirections.
3281         To handle this case, reuse the first request form data if the new request has a body.
3282         We also clear the HTTP content type in such a case if the original request has no content type.
3283
3284         Covered by re-enabled tests.
3285
3286         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
3287         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]):
3288
3289 2019-04-30  Commit Queue  <commit-queue@webkit.org>
3290
3291         Unreviewed, rolling out r244773.
3292         https://bugs.webkit.org/show_bug.cgi?id=197436
3293
3294         Causing assertion failures on debug queues (Requested by
3295         ShawnRoberts on #webkit).
3296
3297         Reverted changeset:
3298
3299         "Make Document audio producers use WeakPtr"
3300         https://bugs.webkit.org/show_bug.cgi?id=197382
3301         https://trac.webkit.org/changeset/244773
3302
3303 2019-04-30  Commit Queue  <commit-queue@webkit.org>
3304
3305         Unreviewed, rolling out r244774.
3306         https://bugs.webkit.org/show_bug.cgi?id=197431
3307
3308         Causing assertion failures on debug queues (Requested by
3309         ShawnRoberts on #webkit).
3310
3311         Reverted changeset:
3312
3313         "Reject/throw when calling AudioContext methods on a stopped
3314         AudioContext"
3315         https://bugs.webkit.org/show_bug.cgi?id=197391
3316         https://trac.webkit.org/changeset/244774
3317
3318 2019-04-30  Alex Christensen  <achristensen@webkit.org>
3319
3320         Add WKContentRuleList ping resource-type
3321         https://bugs.webkit.org/show_bug.cgi?id=197325
3322         <rdar://problem/49841404>
3323
3324         Reviewed by Geoff Garen.
3325
3326         Tests: http/tests/contentextensions/block-ping-resource-type-ping.html and http/tests/contentextensions/block-ping-resource-type-raw.html
3327
3328         * contentextensions/ContentExtensionsBackend.cpp:
3329         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForLoad):
3330         * contentextensions/ContentExtensionsBackend.h:
3331         * loader/PingLoader.cpp:
3332         (WebCore::processContentRuleListsForLoad):
3333         (WebCore::PingLoader::sendPing):
3334         * loader/ResourceLoadInfo.cpp:
3335         (WebCore::ContentExtensions::readResourceType):
3336         (WebCore::ContentExtensions::ResourceLoadInfo::getResourceFlags const):
3337         * loader/ResourceLoadInfo.h:
3338         * page/UserContentProvider.cpp:
3339         (WebCore::UserContentProvider::processContentRuleListsForLoad):
3340         * page/UserContentProvider.h:
3341
3342 2019-04-30  Justin Fan  <justin_fan@apple.com>
3343
3344         [WebGPU] Move 'gpu' API entry point from DOMWindow to Navigator
3345         https://bugs.webkit.org/show_bug.cgi?id=197348
3346
3347         Reviewed by Myles C. Maxfield.
3348
3349         Latest API provides 'gpu' through Navigator instead of DOMWindow. Replace DOMWindowWebGPU with NavigatorGPU.
3350
3351         Existing tests updated to match. Add test: webgpu-enabled-in-worker.html to ensure workers can access WebGPU.
3352
3353         * CMakeLists.txt:
3354         * DerivedSources.make:
3355         * Modules/webgpu/NavigatorGPU.cpp:
3356         (WebCore::NavigatorGPU::from):
3357         (WebCore::NavigatorGPU::supplementName):
3358         (WebCore::NavigatorGPU::gpu):
3359         (WebCore::NavigatorGPU::gpu const):
3360         * Modules/webgpu/NavigatorGPU.h:
3361         * Modules/webgpu/NavigatorGPU.idl:
3362         * Modules/webgpu/WorkerNavigatorGPU.cpp:
3363         (WebCore::WorkerNavigatorGPU::from):
3364         (WebCore::WorkerNavigatorGPU::supplementName):
3365         (WebCore::WorkerNavigatorGPU::gpu):
3366         (WebCore::WorkerNavigatorGPU::gpu const):
3367         * Modules/webgpu/WorkerNavigatorGPU.h:
3368         * Modules/webgpu/WorkerNavigatorGPU.idl:
3369         * Sources.txt:
3370         * WebCore.xcodeproj/project.pbxproj:
3371
3372 2019-04-30  Zalan Bujtas  <zalan@apple.com>
3373
3374         Double-tapping a post to like doesn't work on Instagram.com (needs 'dblclick' event)
3375         https://bugs.webkit.org/show_bug.cgi?id=197347
3376         <rdar://problem/49393423>
3377
3378         Reviewed by Wenson Hsieh.
3379
3380         Tests: fast/events/touch/ios/double-tap-for-double-click1.html
3381                fast/events/touch/ios/double-tap-for-double-click2.html
3382
3383         * page/Frame.h:
3384         * page/ios/FrameIOS.mm:
3385         (WebCore::Frame::nodeRespondingToDoubleClickEvent):
3386
3387 2019-04-30  Youenn Fablet  <youenn@apple.com>
3388
3389         Reject/throw when calling AudioContext methods on a stopped AudioContext
3390         https://bugs.webkit.org/show_bug.cgi?id=197391
3391
3392         Reviewed by Eric Carlson.
3393
3394         Return InvalidStateError in that case.
3395         ASSERT that we do not call lazyInitialize after being stopped
3396         since this would mean we are doing unneeded processing.
3397
3398         Test: http/wpt/webaudio/audiocontext-stopped.html
3399
3400         * Modules/webaudio/AudioContext.cpp:
3401         (WebCore::AudioContext::lazyInitialize):
3402         (WebCore::AudioContext::createBufferSource):
3403         (WebCore::AudioContext::createMediaElementSource):
3404         (WebCore::AudioContext::createMediaStreamSource):
3405         (WebCore::AudioContext::createMediaStreamDestination):
3406         (WebCore::AudioContext::createScriptProcessor):
3407         (WebCore::AudioContext::createBiquadFilter):
3408         (WebCore::AudioContext::createWaveShaper):
3409         (WebCore::AudioContext::createPanner):
3410         (WebCore::AudioContext::createConvolver):
3411         (WebCore::AudioContext::createDynamicsCompressor):
3412         (WebCore::AudioContext::createAnalyser):
3413         (WebCore::AudioContext::createGain):
3414         (WebCore::AudioContext::createDelay):
3415         (WebCore::AudioContext::createChannelSplitter):
3416         (WebCore::AudioContext::createChannelMerger):
3417         (WebCore::AudioContext::createOscillator):
3418         (WebCore::AudioContext::createPeriodicWave):
3419         (WebCore::AudioContext::startRendering):
3420         (WebCore::AudioContext::suspend):
3421         (WebCore::AudioContext::resume):
3422         (WebCore::AudioContext::close):
3423         * Modules/webaudio/AudioContext.h:
3424         * Modules/webaudio/AudioContext.idl:
3425
3426 2019-04-30  Youenn Fablet  <youenn@apple.com>
3427
3428         Make Document audio producers use WeakPtr
3429         https://bugs.webkit.org/show_bug.cgi?id=197382
3430
3431         Reviewed by Eric Carlson.
3432
3433         Move from a hash set of raw pointers to a hash set of weak pointers.
3434         This helps make the code cleaner.
3435         No observable change of behavior.
3436
3437         * Modules/mediastream/MediaStreamTrack.h:
3438         * dom/Document.cpp:
3439         (WebCore::Document::addAudioProducer):
3440         (WebCore::Document::removeAudioProducer):
3441         (WebCore::Document::updateIsPlayingMedia):
3442         (WebCore::Document::pageMutedStateDidChange):
3443         * dom/Document.h:
3444         * html/HTMLMediaElement.cpp:
3445         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
3446         * html/HTMLMediaElement.h:
3447         * page/MediaProducer.h:
3448
3449 2019-04-30  Antti Koivisto  <antti@apple.com>
3450
3451         Tighten type of ScrollingTree:rootNode() to ScrollingTreeFrameScrollingNode
3452         https://bugs.webkit.org/show_bug.cgi?id=197414
3453
3454         Reviewed by Frédéric Wang.
3455
3456         * page/scrolling/ScrollingTree.cpp:
3457         (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
3458         (WebCore::ScrollingTree::handleWheelEvent):
3459         (WebCore::ScrollingTree::mainFrameViewportChangedViaDelegatedScrolling):
3460         (WebCore::ScrollingTree::updateTreeFromStateNode):
3461         * page/scrolling/ScrollingTree.h:
3462         (WebCore::ScrollingTree::rootNode const):
3463
3464 2019-04-30  Youenn Fablet  <youenn@apple.com>
3465
3466         Refactor AudioContext to register/unregister itself at construction/destruction time
3467         https://bugs.webkit.org/show_bug.cgi?id=197383
3468
3469         Reviewed by Eric Carlson.
3470
3471         Registering/Unregistering is cheap.
3472         Instead of registering/unregistering in initialize/uninitialize,
3473         move this code to constructor/destructor.
3474         No observable change of behavior.
3475
3476         * Modules/webaudio/AudioContext.cpp:
3477         (WebCore::AudioContext::AudioContext):
3478         (WebCore::AudioContext::~AudioContext):
3479         (WebCore::AudioContext::lazyInitialize):
3480         (WebCore::AudioContext::uninitialize):
3481         (WebCore::AudioContext::visibilityStateChanged):
3482
3483 2019-04-30  Michael Catanzaro  <mcatanzaro@igalia.com>
3484
3485         WebCore::StyleColorScheme should not have explicitly-declared copy constructor
3486         https://bugs.webkit.org/show_bug.cgi?id=197412
3487
3488         Reviewed by Don Olmstead.
3489
3490         Either we need to explicitly declare a copy assignment operator here, or the copy
3491         constructor needs to be removed. Having one without the other causes a huge warning spam
3492         with GCC 9. In this case, the copy constructor is redundant because it's identical to an
3493         implicitly-declared copy constructor, so let's just remove it.
3494
3495         * rendering/style/StyleColorScheme.h:
3496
3497 2019-04-30  Carlos Garcia Campos  <cgarcia@igalia.com>
3498
3499         [GTK] Support prefers-color-scheme media query
3500         https://bugs.webkit.org/show_bug.cgi?id=196685
3501
3502         Reviewed by Michael Catanzaro.
3503
3504         Change the gtk-application-prefer-dark-theme setting when tests change the useDarkModeAppearance setting.
3505
3506         * PlatformGTK.cmake:
3507         * testing/InternalSettings.cpp:
3508         (WebCore::InternalSettings::resetToConsistentState):
3509         (WebCore::InternalSettings::setUseDarkAppearanceInternal):
3510         (WebCore::InternalSettings::setUseDarkAppearance):
3511         * testing/InternalSettings.h:
3512
3513 2019-04-29  Truitt Savell  <tsavell@apple.com>
3514
3515         Unreviewed, rolling out r244755.
3516
3517         Casued several test failures on iOS
3518
3519         Reverted changeset:
3520
3521         "Double-tapping a post to like doesn't work on Instagram.com
3522         (needs 'dblclick' event)"
3523         https://bugs.webkit.org/show_bug.cgi?id=197347
3524         https://trac.webkit.org/changeset/244755
3525
3526 2019-04-29  Alex Christensen  <achristensen@webkit.org>
3527
3528         <rdar://problem/50299396> Fix internal High Sierra build
3529         https://bugs.webkit.org/show_bug.cgi?id=197388
3530
3531         * Configurations/Base.xcconfig:
3532
3533 2019-04-29  Zalan Bujtas  <zalan@apple.com>
3534
3535         Double-tapping a post to like doesn't work on Instagram.com (needs 'dblclick' event)
3536         https://bugs.webkit.org/show_bug.cgi?id=197347
3537         <rdar://problem/49393423>
3538
3539         Reviewed by Wenson Hsieh.
3540
3541         Tests: fast/events/touch/ios/double-tap-for-double-click1.html
3542                fast/events/touch/ios/double-tap-for-double-click2.html
3543
3544         * page/Frame.h:
3545         * page/ios/FrameIOS.mm:
3546         (WebCore::Frame::nodeRespondingToDoubleClickEvent):
3547
3548 2019-04-30  Simon Fraser  <simon.fraser@apple.com>
3549
3550         Transform is sometimes left in a bad state after an animation
3551         https://bugs.webkit.org/show_bug.cgi?id=197401
3552         rdar://problem/48179186
3553
3554         Reviewed by Dean Jackson.
3555         
3556         In some more complex compositing scenarios, at the end of an animation we'd
3557         fail to push a new transform onto a layer, because updateGeometry() would
3558         think there's an animation running (which there is, but in the "Ending" state).
3559
3560         It's simpler in this code to just always push transform and opacity to the layer;
3561         they will get overridden by the animation while it's running. The current code
3562         dates from the first landing of the file, and the reason for the if (!isRunningAcceleratedTransformAnimation)
3563         check is lost in the sands of time.
3564
3565         I was not able to get a reliable ref or layer tree test for this, because the next compositing update
3566         fixes it, and WTR seems to trigger one.  But the added test does show the bug
3567         in Safari, and is a good test to have.
3568
3569         Test: compositing/animation/transform-after-animation.html
3570
3571         * rendering/RenderLayerBacking.cpp:
3572         (WebCore::RenderLayerBacking::updateGeometry):
3573
3574 2019-04-29  Youenn Fablet  <youenn@apple.com>
3575
3576         getDisplayMedia should be called on user gesture
3577         https://bugs.webkit.org/show_bug.cgi?id=197356
3578
3579         Reviewed by Eric Carlson.
3580
3581         Allow getDisplayMedia on user gesture only.
3582         Otherwise reject the promise.
3583         Minor refactoring to align getDisplayMedia, getUserMedia and
3584         enumerateDevices when called with no document.
3585
3586         Test: fast/mediastream/screencapture-user-gesture.html
3587
3588         * Modules/mediastream/MediaDevices.cpp:
3589         (WebCore::MediaDevices::getUserMedia const):
3590         * Modules/mediastream/MediaDevices.h:
3591         * Modules/mediastream/NavigatorMediaDevices.h:
3592         * page/DOMWindow.h:
3593         * testing/Internals.cpp:
3594         (WebCore::Internals::setDisableGetDisplayMediaUserGestureConstraint):
3595         * testing/Internals.h:
3596         * testing/Internals.idl:
3597
3598 2019-04-29  Javier Fernandez  <jfernandez@igalia.com>
3599
3600         line should not be broken before the first space after a word
3601         https://bugs.webkit.org/show_bug.cgi?id=197278
3602
3603         Reviewed by Myles C. Maxfield.
3604
3605         The 'white-space: break-spaces' only adds breaking opportunities after
3606         a white space character. However, it's possible to break before the
3607         first space after a word when the feature is used in combination with
3608         other properties, like overflow-wrap.
3609
3610         However, breaking before the first space should not be allowed if
3611         there are previous opportunities. We wrongly assumed that we had to
3612         consider these previous breaking opportunities if the proper combination
3613         of line breaking properties is being used, so that breaking before the
3614         first space after a word is allowed.
3615
3616         This wrong assumption caused several issues, like the one described in
3617         the bug, that lead to incorrectly break before the first space even
3618         though there are previous opportunities, either white spaces or between
3619         letters.
3620
3621         Theses issues have been analyzed [1] by the CSS WG and finally agreed on a
3622         expected behavior, represented in the Web Platform tests added in this
3623         patch.
3624
3625         For the later case, of considering previous opportunities between
3626         letters, we have a seperated issue #952254, so the tests covering such
3627         cases will be added to the TestExpecations as Failure entries.
3628
3629         [1] https://github.com/w3c/csswg-drafts/issues/3701
3630
3631         Tests: imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-001.html
3632                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-002.html
3633                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-003.html
3634                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-004.html
3635                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-005.html
3636                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-006.html
3637                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-007.html
3638                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-008.html
3639                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-009.html
3640                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-010.html
3641                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-011.html
3642                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-012.html
3643                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-013.html
3644
3645         * rendering/line/BreakingContext.h:
3646         (WebCore::BreakingContext::handleText):
3647         (WebCore::BreakingContext::trailingSpacesHang):
3648
3649 2019-04-29  Simon Fraser  <simon.fraser@apple.com>
3650
3651         REGRESSION (r238090): animation on https://www.robotodyssey.online gets stuck; site broken
3652         https://bugs.webkit.org/show_bug.cgi?id=197381
3653
3654         Reviewed by Zalan Bujtas.
3655
3656         When -webkit-clip-path changes on a composited layer, we need to trigger a backing geometry update
3657         to push the changes to GraphicsLayers.
3658
3659         Test: compositing/style-change/clip-path-change.html
3660
3661         * rendering/RenderLayerCompositor.cpp:
3662         (WebCore::recompositeChangeRequiresGeometryUpdate):
3663
3664 2019-04-29  Chris Dumez  <cdumez@apple.com>
3665
3666         User-facing strings should use curly quotes instead of straight
3667         https://bugs.webkit.org/show_bug.cgi?id=197370
3668
3669         Reviewed by Geoffrey Garen.
3670
3671         Update localizable strings.
3672
3673         * en.lproj/Localizable.strings:
3674
3675 2019-04-29  Ross Kirsling  <ross.kirsling@sony.com>
3676
3677         Unreviewed fix for non-unified build after r244687.
3678
3679         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
3680
3681 2019-04-29  Youenn Fablet  <youenn@apple.com>
3682
3683         RTCTrackEvent should be delayed until the whole remote description is set
3684         https://bugs.webkit.org/show_bug.cgi?id=196808
3685         <rdar://problem/49802649>
3686
3687         Reviewed by Eric Carlson.
3688
3689         As per https://w3c.github.io/webrtc-pc/#set-description,
3690         fire events just before resolving the setRemoteDescription promise.
3691         This ensures that the exposed stream has all necessary tracks from the beginning.
3692         Pending track events are created in LibWebRTCMediaEndpoint and stored in PeerConnectionBackend.
3693
3694         Covered by updated test.
3695
3696         * Modules/mediastream/PeerConnectionBackend.cpp:
3697         (WebCore::PeerConnectionBackend::setRemoteDescriptionSucceeded):
3698         (WebCore::PeerConnectionBackend::setRemoteDescriptionFailed):
3699         (WebCore::PeerConnectionBackend::addPendingTrackEvent):
3700         (WebCore::PeerConnectionBackend::stop):
3701         * Modules/mediastream/PeerConnectionBackend.h:
3702         * Modules/mediastream/RTCPeerConnection.cpp:
3703         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
3704         (WebCore::LibWebRTCMediaEndpoint::addRemoteTrack):
3705         (WebCore::LibWebRTCMediaEndpoint::addPendingTrackEvent):
3706         (WebCore::LibWebRTCMediaEndpoint::newTransceiver):
3707         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
3708
3709 2019-04-25  Carlos Garcia Campos  <cgarcia@igalia.com>
3710
3711         REGRESSION(r244635): [GTK] Wrong background color used in non-dark mode
3712         https://bugs.webkit.org/show_bug.cgi?id=197276
3713
3714         Reviewed by Michael Catanzaro.
3715
3716         Since r244635, we are now getting the frame view background color from the theme. That's correct for dark mode,
3717         but in non-dark mode we still want to use white backgrounds by default. This made a lot of tests to fail.
3718
3719         * css/CSSValueKeywords.in: Add -webkit-control-background when HAVE(OS_DARK_MODE_SUPPORT).
3720         * css/html.css: Use -webkit-control-background instead of -apple-system-control-background.
3721         * page/FrameView.cpp:
3722         (WebCore::FrameView::updateBackgroundRecursively): Use CSSValueWindow instead of CSSValueWindowframe.
3723         * rendering/RenderThemeGtk.cpp:
3724         (WebCore::RenderThemeGtk::systemColor const): Only get the window background from the theme in dark mode. Handle
3725         also CSSValueWebkitControlBackground.
3726         * rendering/RenderThemeMac.mm:
3727         (WebCore::RenderThemeMac::systemColor const): Handle CSSValueWebkitControlBackground when HAVE(OS_DARK_MODE_SUPPORT).
3728
3729 2019-04-28  Andy Estes  <aestes@apple.com>
3730
3731         [Apple Pay] Increment the API version from 6 to 7
3732         https://bugs.webkit.org/show_bug.cgi?id=197041
3733         <rdar://problem/49986625>
3734
3735         Reviewed by Geoffrey Garen.
3736
3737         * Modules/applepay/PaymentCoordinatorClient.cpp:
3738         (WebCore::PaymentCoordinatorClient::supportsVersion):
3739
3740 2019-04-28  Andy Estes  <aestes@apple.com>
3741
3742         Fix the watchOS engineering build.
3743
3744         * Modules/webgpu/WebGPUComputePassEncoder.cpp: Included Logging.h.
3745
3746 2019-04-28  Youenn Fablet  <youenn@apple.com>
3747
3748         Remove no longer needed mDNS ICE candidate resolution code
3749         https://bugs.webkit.org/show_bug.cgi?id=197315
3750
3751         Reviewed by Eric Carlson.
3752
3753         No change of behavior.
3754         Removed code is no longer exercised as mDNS resolution happens inside libwebrtc
3755         using the same resolution mechanism as for TURN/STUN server names.
3756
3757         * Modules/mediastream/PeerConnectionBackend.cpp:
3758         (WebCore::PeerConnectionBackend::addIceCandidateSucceeded):
3759         (WebCore::PeerConnectionBackend::addIceCandidateFailed):
3760         * Modules/mediastream/PeerConnectionBackend.h:
3761
3762 2019-04-27  Simon Fraser  <simon.fraser@apple.com>
3763
3764         Move some Compositing logging to the Layers log channel
3765         https://bugs.webkit.org/show_bug.cgi?id=197345
3766
3767         Reviewed by Sam Weinig.
3768
3769         Make Compositing logging a bit less verbose by moving the GraphicsLayer tree dump
3770         to the Layers log channel. Also log GraphicsLayers after flushing, when we'll have
3771         accurate visible rects. 
3772
3773         * platform/graphics/ca/GraphicsLayerCA.cpp:
3774         (WebCore::GraphicsLayerCA::updateCoverage):
3775         * rendering/RenderLayerCompositor.cpp:
3776         (WebCore::layersLogEnabled):
3777         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
3778         (WebCore::RenderLayerCompositor::updateCompositingLayers):
3779
3780 2019-04-27  Megan Gardner  <megan_gardner@apple.com>
3781
3782         Lookup only looking up the first word in selection
3783         https://bugs.webkit.org/show_bug.cgi?id=197341
3784         <rdar://problem/48221414>
3785
3786         Reviewed by Wenson Hsieh.
3787
3788         Lookup is not testable.
3789
3790         Reveal needs the full range in order to correctly create the item for the popover.
3791
3792         * editing/cocoa/DictionaryLookup.mm:
3793         (WebCore::showPopupOrCreateAnimationController):
3794
3795 2019-04-26  Jer Noble  <jer.noble@apple.com>
3796
3797         Reduce the number of copies made during SourceBufferPrivateAVFObjC::append() using SharedBuffer
3798         https://bugs.webkit.org/show_bug.cgi?id=197335
3799         <rdar://problem/49175604>
3800
3801         Rubber-stamped by Alex Christensen.
3802
3803         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3804         (WebCore::SourceBufferPrivateAVFObjC::append):
3805
3806 2019-04-26  Jessie Berlin  <jberlin@webkit.org>
3807
3808         Add new mac target numbers
3809         https://bugs.webkit.org/show_bug.cgi?id=197313
3810
3811         Reviewed by Alex Christensen.
3812
3813         * Configurations/Version.xcconfig:
3814         * Configurations/WebKitTargetConditionals.xcconfig:
3815
3816 2019-04-26  Commit Queue  <commit-queue@webkit.org>
3817
3818         Unreviewed, rolling out r244708.
3819         https://bugs.webkit.org/show_bug.cgi?id=197334
3820
3821         "Broke the debug build" (Requested by rmorisset on #webkit).
3822
3823         Reverted changeset:
3824
3825         "All prototypes should call didBecomePrototype()"
3826         https://bugs.webkit.org/show_bug.cgi?id=196315
3827         https://trac.webkit.org/changeset/244708
3828
3829 2019-04-26  Robin Morisset  <rmorisset@apple.com>
3830
3831         All prototypes should call didBecomePrototype()
3832         https://bugs.webkit.org/show_bug.cgi?id=196315
3833
3834         Reviewed by Saam Barati.
3835
3836         It was found by existing tests, with the new assert in JSC::Structure
3837
3838         * bindings/js/JSWindowProxy.cpp:
3839         (WebCore::JSWindowProxy::setWindow):
3840         * bindings/scripts/CodeGeneratorJS.pm:
3841         (GeneratePrototypeDeclaration):
3842         (GenerateConstructorHelperMethods):
3843
3844 2019-04-26  Eric Carlson  <eric.carlson@apple.com>
3845
3846         Create AVFoundationSoftLink.{h,mm} to reduce duplicate code
3847         https://bugs.webkit.org/show_bug.cgi?id=197171
3848         <rdar://problem/47454979>
3849
3850         Reviewed by Youenn Fablet.
3851
3852         Tests: TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm
3853
3854         * Modules/plugins/QuickTimePluginReplacement.mm:
3855         (WebCore::jsValueWithValueInContext):
3856         (WebCore::jsValueWithAVMetadataItemInContext):
3857         * WebCore.xcodeproj/project.pbxproj:
3858         * platform/audio/ios/AudioSessionIOS.mm:
3859         (WebCore::AudioSession::setCategory):
3860         (WebCore::AudioSession::category const):
3861         (WebCore::AudioSession::routeSharingPolicy const):
3862         (WebCore::AudioSession::routingContextUID const):
3863         (WebCore::AudioSession::sampleRate const):
3864         (WebCore::AudioSession::bufferSize const):
3865         (WebCore::AudioSession::numberOfOutputChannels const):
3866         (WebCore::AudioSession::tryToSetActiveInternal):
3867         (WebCore::AudioSession::preferredBufferSize const):
3868         (WebCore::AudioSession::setPreferredBufferSize):
3869         * platform/audio/ios/MediaSessionManagerIOS.mm:
3870         (-[WebMediaSessionHelper initWithCallback:]):
3871         (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]):
3872         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
3873         (WebCore::AVTrackPrivateAVFObjCImpl::audioKind const):
3874         (WebCore::AVTrackPrivateAVFObjCImpl::videoKind const):
3875         (WebCore::AVTrackPrivateAVFObjCImpl::label const):
3876         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
3877         (WebCore::AudioSourceProviderAVFObjC::createMix):
3878         * platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
3879         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
3880         (WebCore::MediaSelectionGroupAVFObjC::updateOptions):
3881         * platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm:
3882         (WebCore::AVFoundationMIMETypeCache::canDecodeType):
3883         (WebCore::AVFoundationMIMETypeCache::loadMIMETypes):
3884         * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
3885         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsPersistableState):
3886         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsPersistentKeys):
3887         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsMediaCapability):
3888         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::initializeWithConfiguration):
3889         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense):
3890         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::loadSession):
3891         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::removeSessionData):
3892         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::ensureSession):
3893         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
3894         (WebCore::CDMSessionAVContentKeySession::isAvailable):
3895         (WebCore::CDMSessionAVContentKeySession::releaseKeys):
3896         (WebCore::CDMSessionAVContentKeySession::update):
3897         (WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage):
3898         (WebCore::CDMSessionAVContentKeySession::contentKeySession):
3899         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
3900         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
3901         (WebCore::CDMSessionAVStreamSession::releaseKeys):
3902         (WebCore::CDMSessionAVStreamSession::update):
3903         (WebCore::CDMSessionAVStreamSession::setStreamSession):
3904         (WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage):
3905         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
3906         (WebCore::imageDecoderAssetOptions):
3907         (WebCore::ImageDecoderAVFObjC::ImageDecoderAVFObjC):
3908         (WebCore::ImageDecoderAVFObjC::firstEnabledTrack):
3909         (WebCore::ImageDecoderAVFObjC::readSamples):
3910         (SOFT_LINK_CONSTANT_MAY_FAIL): Deleted.
3911         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
3912         (WebCore::InbandTextTrackPrivateAVFObjC::label const):
3913         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
3914         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::label const):
3915         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
3916         (WebCore::MediaPlaybackTargetPickerMac::devicePicker):
3917         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3918         (WebCore::assetCacheForPath):
3919         (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCache):
3920         (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCacheForOrigins):
3921         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
3922         (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageGenerator):
3923         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
3924         (WebCore::MediaPlayerPrivateAVFoundationObjC::synchronizeTextTrackState):
3925         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
3926         (WebCore::MediaPlayerPrivateAVFoundationObjC::setAVPlayerItem):
3927         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
3928         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
3929         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
3930         (WebCore::MediaPlayerPrivateAVFoundationObjC::isAvailable):
3931         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
3932         (WebCore::determineChangedTracksFromNewTracksAndOldItems):
3933         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks):
3934         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks):
3935         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
3936         (WebCore::MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange):
3937         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForLegibleMedia):
3938         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForAudibleMedia):
3939         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForVisualMedia):
3940         (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions):
3941         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack):
3942         (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack const):
3943         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType const):
3944         (WebCore::exernalDeviceDisplayNameForPlayer):
3945         (WebCore::metadataType):
3946         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
3947         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
3948         (-[WebCoreAVFPullDelegate outputMediaDataWillChange:]):
3949         (-[WebCoreAVFPullDelegate outputSequenceWasFlushed:]):
3950         (WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks): Deleted.
3951         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3952         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
3953         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
3954         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
3955         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
3956         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession):
3957         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
3958         (-[WebAVSampleBufferStatusChangeListener observeValueForKeyPath:ofObject:change:context:]):
3959         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable):
3960         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
3961         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3962         (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
3963         (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
3964         (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
3965         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
3966         (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
3967         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
3968         (WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
3969         (WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
3970         (WebCore::PlatformCALayerCocoa::clone const):
3971         (WebCore::PlatformCALayerCocoa::avPlayerLayer const):
3972         * platform/graphics/cocoa/HEVCUtilitiesCocoa.mm:
3973         (WebCore::validateHEVCParameters):
3974         * platform/ios/PlatformSpeechSynthesizerIOS.mm:
3975         (getAVSpeechUtteranceDefaultSpeechRate):
3976         (getAVSpeechUtteranceMaximumSpeechRate):
3977         (-[WebSpeechSynthesisWrapper speakUtterance:]):
3978         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
3979         (SOFT_LINK_CONSTANT): Deleted.
3980         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
3981         (-[WebAVPlayerLayer init]):
3982         (-[WebAVPlayerLayer layoutSublayers]):
3983         (-[WebAVPlayerLayer setVideoGravity:]):
3984         (-[WebAVPlayerLayer videoRect]):
3985         (WebAVPlayerLayerView_startRoutingVideoToPictureInPicturePlayerLayerView):
3986         * platform/mac/SerializedPlatformRepresentationMac.mm:
3987         (WebCore::jsValueWithValueInContext):
3988         (WebCore::jsValueWithAVMetadataItemInContext):
3989         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
3990         (WebCore::getAVFormatIDKeyWithFallback):
3991         (WebCore::getAVNumberOfChannelsKeyWithFallback):
3992         (WebCore::getAVSampleRateKeyWithFallback):
3993         (WebCore::getAVEncoderBitRateKeyWithFallback):
3994         (WebCore::MediaRecorderPrivateWriter::create):
3995         (WebCore::MediaRecorderPrivateWriter::setVideoInput):
3996         (WebCore::MediaRecorderPrivateWriter::setAudioInput):
3997         * platform/mediastream/RealtimeVideoSource.h: