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