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