[WebVTT] Inline WebVTT styles should start with '::cue'
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2019-02-08  Per Arne Vollan  <pvollan@apple.com>
2
3         [WebVTT] Inline WebVTT styles should start with '::cue'
4         https://bugs.webkit.org/show_bug.cgi?id=194227
5         <rdar://problem/47791087>
6
7         Reviewed by Eric Carlson.
8
9         Check that the CSS string starts with '::cue' and is successfully parsed before adding it
10         to the CSS stylesheet list. Also, the caption preferences CSS string should start with
11         '::cue', since it is added inside the video shadow root element.
12
13         Test: media/track/track-cue-css.html
14
15         * html/track/WebVTTParser.cpp:
16         (WebCore::WebVTTParser::checkAndStoreStyleSheet):
17         * page/CaptionUserPreferencesMediaAF.cpp:
18         (WebCore::CaptionUserPreferencesMediaAF::captionsStyleSheetOverride const):
19
20 2019-02-08  Youenn Fablet  <youenn@apple.com>
21
22         Running RTCRtpSender.getCapabilities("video") before initial offer breaks VP8
23         https://bugs.webkit.org/show_bug.cgi?id=194380
24         <rdar://problem/47916514>
25
26         Reviewed by Eric Carlson.
27
28         Set whether VP8 is supported at creation of the page.
29         This ensures that any call creating a peer connection factory will end up supporting the runtime flag configuration.
30
31         Add internal API to enable resetting the factory to enable proper testing.
32
33         Covered by updated test.
34
35         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
36         (WebCore::createLibWebRTCPeerConnectionBackend):
37         * page/Page.cpp:
38         (WebCore::m_applicationManifest):
39         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
40         * testing/Internals.cpp:
41         (WebCore::Internals::clearPeerConnectionFactory):
42         * testing/Internals.h:
43         * testing/Internals.idl:
44
45 2019-02-08  Andy Estes  <aestes@apple.com>
46
47         [WebIDL] Support serializing sequences and FrozenArrays of non-interfaces
48         https://bugs.webkit.org/show_bug.cgi?id=190997
49         <rdar://problem/35983035>
50
51         Reviewed by Brent Fulgham.
52
53         Support serializing sequences and FrozenArrays of types that aren't interfaces. This is
54         needed to properly serialize PaymentAddress, which has a FrozenArray of DOMStrings.
55
56         We should support serializing sequences of interfaces too, but that's slightly more
57         complicated since it involves iterating the sequence and serializing each of its items. I
58         left that as a follow-up task, since I don't see any IDLs that currently need this.
59
60         We also don't support serializing sequences with the CachedAttribute or CustomGetter
61         extended attributes, because WebIDL specifies that a new array should be created when
62         converting an IDL sequence into an ECMAScript value.
63
64         Added bindings test cases to TestSerialization.idl and PaymentAddress test cases to
65         http/tests/paymentrequest/payment-address-attributes-and-toJSON-method.https.html.
66
67         * bindings/scripts/CodeGenerator.pm:
68         (GetInterfaceForType): Renamed from GetInterfaceForAttribute.
69         (IsSerializableType): Modified to allow sequences and FrozenArrays of non-interface types.
70         (hasCachedAttributeOrCustomGetterExtendedAttribute): Added a helper to determine if an
71         attribute has the CachedAttribute or CustomGetter extended attributes.
72         (IsSerializableAttribute): Checked for sequences with the CachedAttribute or CustomGetter
73         extended attributes before calling IsSerializableType.
74         (GetInterfaceForAttribute): Renamed to GetInterfaceForType.
75         * bindings/scripts/test/JS/JSTestSerialization.cpp:
76         * bindings/scripts/test/TestSerialization.idl:
77
78 2019-02-08  Sihui Liu  <sihui_liu@apple.com>
79
80         IndexedDB tests leak documents
81         https://bugs.webkit.org/show_bug.cgi?id=189435
82         <rdar://problem/44240043>
83
84         Reviewed by Geoffrey Garen.
85
86         Remove use of JSC::Strong in IndexedDatabase.
87
88         * Modules/indexeddb/IDBCursor.cpp:
89         (WebCore::IDBCursor::update):
90         (WebCore::IDBCursor::continuePrimaryKey):
91         (WebCore::IDBCursor::continueFunction):
92         (WebCore::IDBCursor::deleteFunction):
93         (WebCore::IDBCursor::setGetResult):
94         * Modules/indexeddb/IDBCursor.h:
95         (WebCore::IDBCursor::key):
96         (WebCore::IDBCursor::primaryKey):
97         (WebCore::IDBCursor::value):
98         (WebCore::IDBCursor::keyWrapper):
99         (WebCore::IDBCursor::primaryKeyWrapper):
100         (WebCore::IDBCursor::valueWrapper):
101         (WebCore::IDBCursor::key const): Deleted.
102         (WebCore::IDBCursor::primaryKey const): Deleted.
103         (WebCore::IDBCursor::value const): Deleted.
104         * Modules/indexeddb/IDBCursor.idl:
105         * Modules/indexeddb/IDBCursorWithValue.idl:
106         * Modules/indexeddb/IDBObjectStore.cpp:
107         (WebCore::IDBObjectStore::putForCursorUpdate):
108         * Modules/indexeddb/IDBObjectStore.h:
109         * Modules/indexeddb/IDBRequest.cpp:
110         (WebCore::IDBRequest::IDBRequest):
111         (WebCore::IDBRequest::~IDBRequest):
112         (WebCore::IDBRequest::result const):
113         (WebCore::IDBRequest::setResult):
114         (WebCore::IDBRequest::setResultToStructuredClone):
115         (WebCore::IDBRequest::setResultToUndefined):
116         (WebCore::IDBRequest::resultCursor):
117         (WebCore::IDBRequest::willIterateCursor):
118         (WebCore::IDBRequest::didOpenOrIterateCursor):
119         * Modules/indexeddb/IDBRequest.h:
120         (WebCore::IDBRequest::resultWrapper):
121         * Modules/indexeddb/IDBRequest.idl:
122         * Sources.txt:
123         * WebCore.xcodeproj/project.pbxproj:
124         * bindings/js/JSIDBCursorCustom.cpp:
125         (WebCore::JSIDBCursor::key const):
126         (WebCore::JSIDBCursor::primaryKey const):
127         (WebCore::JSIDBCursor::visitAdditionalChildren):
128         * bindings/js/JSIDBCursorWithValueCustom.cpp:
129         (WebCore::JSIDBCursorWithValue::value const):
130         (WebCore::JSIDBCursorWithValue::visitAdditionalChildren):
131         * bindings/js/JSIDBRequestCustom.cpp: Added.
132         (WebCore::JSIDBRequest::result const):
133         (WebCore::JSIDBRequest::visitAdditionalChildren):
134         * inspector/agents/InspectorIndexedDBAgent.cpp:
135
136 2019-02-08  Zalan Bujtas  <zalan@apple.com>
137
138         [LFC] The used containing block width value is optional
139         https://bugs.webkit.org/show_bug.cgi?id=194428
140
141         Reviewed by Antti Koivisto.
142
143         The preferred width codepath cannot provide a valid used containing block width value.
144
145         "The percentage is calculated with respect to the width of the generated box's containing block.
146         If the containing block's width depends on this element's width, then the resulting layout is undefined in CSS 2.2."
147
148         Let's use 0 as used value for now.
149
150         * layout/FormattingContextGeometry.cpp:
151         (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
152         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
153         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
154         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
155         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
156         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
157         (WebCore::Layout::FormattingContext::Geometry::computedPadding):
158         (WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin):
159         * layout/LayoutUnits.h:
160         (WebCore::Layout::UsedHorizontalValues::UsedHorizontalValues):
161         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
162         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
163         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
164         (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
165         * page/FrameViewLayoutContext.cpp:
166
167 2019-02-08  Zalan Bujtas  <zalan@apple.com>
168
169         [LFC] Horizontal geometry compute functions should take the containing block's width as a used value
170         https://bugs.webkit.org/show_bug.cgi?id=194424
171
172         Reviewed by Antti Koivisto.
173
174         This is in preparation for passing optional containing block width for the preferred with codepath. 
175
176         * layout/FormattingContext.cpp:
177         (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const):
178         (WebCore::Layout::FormattingContext::computeBorderAndPadding const):
179         * layout/FormattingContext.h:
180         * layout/FormattingContextGeometry.cpp:
181         (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
182         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
183         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
184         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
185         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
186         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
187         (WebCore::Layout::FormattingContext::Geometry::computedBorder):
188         (WebCore::Layout::FormattingContext::Geometry::computedPadding):
189         (WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin):
190         * layout/LayoutUnits.h:
191         (WebCore::Layout::UsedHorizontalValues::UsedHorizontalValues):
192         * layout/blockformatting/BlockFormattingContext.cpp:
193         (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const):
194         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
195         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
196         * layout/inlineformatting/InlineFormattingContext.cpp:
197         (WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPadding const):
198         (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin const):
199         * layout/inlineformatting/InlineFormattingContext.h:
200         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
201         (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
202
203 2019-02-08  Benjamin Poulain  <benjamin@webkit.org>
204
205         clampTo(): do not convert the input to double when dealing with integers
206         https://bugs.webkit.org/show_bug.cgi?id=194263
207         <rdar://problem/47692312>
208
209         Reviewed by Darin Adler.
210
211         Make the calls to clampTo<float>() unambiguous.
212
213         * page/FrameView.cpp:
214         (WebCore::FrameView::computeUpdatedLayoutViewportRect):
215         * rendering/style/RenderStyle.h:
216         (WebCore::RenderStyle::setOpacity):
217         (WebCore::RenderStyle::setShapeImageThreshold):
218
219 2019-02-08  Eric Liang  <ericliang@apple.com>
220
221         When performing AXPress, check to see if the menu list is disabled.
222         https://bugs.webkit.org/show_bug.cgi?id=193878
223
224         Reviewed by Chris Fleizach.
225
226         Test: accessibility/mac/press-not-work-for-disabled-menu-list.html
227
228         * accessibility/AXObjectCache.h:
229         * accessibility/AccessibilityMenuList.cpp:
230         (WebCore::AccessibilityMenuList::press):
231         * accessibility/mac/AXObjectCacheMac.mm:
232         (WebCore::AXObjectCache::postPlatformNotification):
233
234 2019-02-07  Devin Rousso  <drousso@apple.com>
235
236         PseudoElement created for any ::before/::after selector regardless of whether a content property exists
237         https://bugs.webkit.org/show_bug.cgi?id=194423
238         <rdar://problem/46787260>
239
240         Reviewed by Antti Koivisto.
241
242         Test: inspector/css/pseudo-creation.html
243
244         * style/StyleTreeResolver.cpp:
245         (WebCore::Style::TreeResolver::resolvePseudoStyle):
246         We should only be creating `PseudoElement`s if we actually have a `content` proprety in the
247         `PseudoElement`'s style. Otherwise, we end up creating `PseudoElement`s for every CSS rule
248         that has a `::before`/`::after`, only to immediately destroy them as there is nothing to show.
249
250 2019-02-07  Chris Dumez  <cdumez@apple.com>
251
252         Mark more heap-allocated classes as fast allocated
253         https://bugs.webkit.org/show_bug.cgi?id=194422
254
255         Reviewed by Ryosuke Niwa.
256
257         * Modules/applepay/PaymentCoordinator.h:
258         * Modules/beacon/NavigatorBeacon.h:
259         * Modules/cache/DOMWindowCaches.h:
260         * Modules/cache/WorkerGlobalScopeCaches.h:
261         * Modules/credentialmanagement/NavigatorCredentials.h:
262         * Modules/encryptedmedia/legacy/LegacyCDMPrivateClearKey.h:
263         * Modules/gamepad/NavigatorGamepad.h:
264         * Modules/indexeddb/IDBGetAllResult.h:
265         * Modules/indexeddb/IDBGetResult.h:
266         * Modules/indexeddb/IDBKeyData.h:
267         * Modules/indexeddb/IDBValue.h:
268         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h:
269         * Modules/indexeddb/server/IndexValueEntry.h:
270         * Modules/indexeddb/server/IndexValueStore.h:
271         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
272         * Modules/indexeddb/server/MemoryCursor.h:
273         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
274         * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
275         * Modules/indexeddb/server/SQLiteIDBCursor.h:
276         * Modules/indexeddb/server/SQLiteIDBTransaction.h:
277         * Modules/indexeddb/server/UniqueIDBDatabase.h:
278         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
279         * Modules/indexeddb/shared/IDBResourceIdentifier.h:
280         * Modules/indexeddb/shared/IDBTransactionInfo.h:
281         * Modules/mediacapabilities/NavigatorMediaCapabilities.h:
282         * Modules/mediasession/WebMediaSessionManager.cpp:
283         * Modules/mediastream/NavigatorMediaDevices.h:
284         * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:
285         * Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.h:
286         * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:
287         * Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.h:
288         * Modules/navigatorcontentutils/NavigatorContentUtils.h:
289         * Modules/quota/DOMWindowQuota.h:
290         * Modules/quota/NavigatorStorageQuota.h:
291         * Modules/quota/WorkerNavigatorStorageQuota.h:
292         * Modules/speech/DOMWindowSpeechSynthesis.h:
293         * Modules/webaudio/BiquadProcessor.h:
294         * Modules/webaudio/DelayProcessor.h:
295         * Modules/webauthn/fido/FidoHidPacket.h:
296         * Modules/webdriver/NavigatorWebDriver.h:
297         * Modules/webgpu/DOMWindowWebGPU.h:
298         * Modules/websockets/WebSocketChannel.h:
299         * Modules/webvr/NavigatorWebVR.h:
300         * accessibility/AXObjectCache.h:
301         * bindings/js/DOMGCOutputConstraint.h:
302         * bindings/js/DOMPromiseProxy.h:
303         * bridge/c/c_runtime.h:
304         * contentextensions/CombinedURLFilters.cpp:
305         * crypto/CryptoAlgorithmParameters.h:
306         * css/CSSComputedStyleDeclaration.h:
307         * css/CSSRegisteredCustomProperty.h:
308         * css/DOMCSSPaintWorklet.h:
309         * css/DOMCSSRegisterCustomProperty.h:
310         * css/StyleRule.h:
311         * dom/ConstantPropertyMap.h:
312         * dom/CustomElementReactionQueue.h:
313         * dom/Document.h:
314         * dom/GenericEventQueue.h:
315         * dom/RejectedPromiseTracker.h:
316         * dom/UserGestureIndicator.h:
317         * editing/ReplaceSelectionCommand.cpp:
318         * editing/SelectionRectGatherer.h:
319         * editing/TextIterator.h:
320         * editing/cocoa/HTMLConverter.mm:
321         * fileapi/AsyncFileStream.cpp:
322         * fileapi/AsyncFileStream.h:
323         * html/forms/FileIconLoader.h:
324         * html/parser/HTMLTreeBuilder.h:
325         * html/track/WebVTTParser.h:
326         * inspector/DOMPatchSupport.cpp:
327         * loader/FrameLoaderClient.h:
328         * loader/WorkerThreadableLoader.cpp:
329         * page/IntersectionObserver.h:
330         * page/PerformanceMonitor.h:
331         * page/PerformanceUserTiming.h:
332         * page/PrintContext.h:
333         * page/ValidationMessageClient.h:
334         * platform/ColorChooser.h:
335         * platform/ControlStates.h:
336         * platform/DataListSuggestionPicker.h:
337         * platform/FileStream.h:
338         * platform/KeyedCoding.h:
339         * platform/LowPowerModeNotifier.h:
340         * platform/PlatformSpeechSynthesizer.h:
341         * platform/WebGLStateTracker.h:
342         * platform/audio/AudioArray.h:
343         * platform/audio/AudioDestination.h:
344         * platform/audio/DownSampler.h:
345         * platform/audio/DynamicsCompressor.h:
346         * platform/audio/FFTFrame.h:
347         * platform/audio/HRTFDatabase.h:
348         * platform/audio/MultiChannelResampler.h:
349         * platform/audio/Panner.h:
350         * platform/audio/Reverb.h:
351         * platform/audio/ReverbConvolver.h:
352         * platform/audio/ReverbConvolverStage.h:
353         * platform/audio/UpSampler.h:
354         * platform/audio/mac/AudioSessionMac.cpp:
355         * platform/audio/mac/CAAudioStreamDescription.h:
356         * platform/audio/mac/CARingBuffer.h:
357         * platform/cocoa/ScrollSnapAnimatorState.h:
358         * platform/gamepad/PlatformGamepad.h:
359         * platform/graphics/GraphicsLayer.cpp:
360         * platform/graphics/GraphicsLayerFactory.h:
361         * platform/graphics/PlatformTimeRanges.h:
362         * platform/graphics/TextTrackRepresentation.h:
363         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h:
364         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.h:
365         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
366         * platform/graphics/displaylists/DisplayListRecorder.h:
367         * platform/network/cocoa/WebCoreNSURLSession.mm:
368         * platform/sql/SQLiteDatabase.h:
369         * platform/text/TextCodecICU.h:
370         * rendering/GridBaselineAlignment.h:
371         * rendering/GridTrackSizingAlgorithm.h:
372         * rendering/RenderObject.h:
373         * rendering/style/GridArea.h:
374         * workers/service/context/SWContextManager.h:
375
376 2019-02-07  Justin Fan  <justin_fan@apple.com>
377
378         [Web GPU] GPUDevice::createTexture implementation prototype
379         https://bugs.webkit.org/show_bug.cgi?id=194409
380         <rdar://problem/47894312>
381
382         Reviewed by Myles C. Maxfield.
383
384         Test: textures-textureviews.html updated to test new functionality.
385
386         Implement GPUDevice::createTexture():
387         * Modules/webgpu/WebGPUDevice.cpp:
388         (WebCore::WebGPUDevice::createTexture const):
389         * Modules/webgpu/WebGPUDevice.h:
390         * Modules/webgpu/WebGPUDevice.idl:
391         * Modules/webgpu/WebGPUTexture.cpp:
392         (WebCore::WebGPUTexture::create): Modified to return non-nullable to match direction of API.
393         (WebCore::WebGPUTexture::WebGPUTexture):
394         * Modules/webgpu/WebGPUTexture.h:
395
396         Metal backend MTLTextureDescriptor and MTLTexture creation:
397         * platform/graphics/gpu/GPUDevice.cpp:
398         (WebCore::GPUDevice::tryCreateTexture const):
399         * platform/graphics/gpu/GPUDevice.h:
400         * platform/graphics/gpu/GPUTexture.h:
401         * platform/graphics/gpu/cocoa/GPUTextureMetal.mm:
402         (WebCore::mtlTextureTypeForGPUTextureDescriptor):
403         (WebCore::mtlTextureUsageForGPUTextureUsageFlags):
404         (WebCore::storageModeForPixelFormatAndSampleCount):
405         (WebCore::tryCreateMtlTextureDescriptor):
406         (WebCore::GPUTexture::tryCreate):
407         (WebCore::GPUTexture::createDefaultTextureView): Add ObjC try/catch guards.
408
409         Add GPUUtils.h/cpp for shared utility functions:
410         * SourcesCocoa.txt:
411         * WebCore.xcodeproj/project.pbxproj:
412         * platform/graphics/gpu/GPUUtils.h: Added. Moved platformTextureFormatForGPUTextureFormat here.
413         * platform/graphics/gpu/cocoa/GPUSwapChainMetal.mm:
414         (WebCore::GPUSwapChain::setFormat):
415         (WebCore::platformTextureFormatForGPUTextureFormat): Moved to GPUUtils.
416         * platform/graphics/gpu/cocoa/GPUUtilsMetal.mm: Added.
417         (WebCore::platformTextureFormatForGPUTextureFormat): Moved here to be referenced by multiple files.
418
419 2019-02-07  Sihui Liu  <sihui_liu@apple.com>
420
421         REGRESSION(r239887): Crash under IDBConnectionToClient::didDeleteDatabase(WebCore::IDBResultData const&)
422         https://bugs.webkit.org/show_bug.cgi?id=194402
423         <rdar://problem/47858241>
424
425         Reviewed by Geoffrey Garen.
426
427         r239887 removed a reference cycle of IDBConnectionToClient so that IDBConnectionToClient would no longer be
428         around forever. Therefore, ServerOpenRequest should keep a reference to IDBConnectionToClient to make sure it
429         is valid during access.
430
431         * Modules/indexeddb/server/ServerOpenDBRequest.cpp:
432         (WebCore::IDBServer::ServerOpenDBRequest::maybeNotifyRequestBlocked):
433         (WebCore::IDBServer::ServerOpenDBRequest::notifyDidDeleteDatabase):
434         * Modules/indexeddb/server/ServerOpenDBRequest.h:
435
436 2019-02-07  Timothy Hatcher  <timothy@apple.com>
437
438         Overflow element scrollbar is light for dark mode content.
439         https://bugs.webkit.org/show_bug.cgi?id=194407
440         rdar://problem/45991585
441
442         Reviewed by Beth Dakin.
443
444         Tested by css-dark-mode/supported-color-schemes-scrollbar.html.
445
446         * page/ChromeClient.h:
447         (WebCore::FrameView::preferredScrollbarOverlayStyle): Return WTF::nullopt by default to avoid
448         short-circuiting auto detection in recalculateScrollbarOverlayStyle() for clients, like WK1,
449         that do not implement preferredScrollbarOverlayStyle().
450         * page/FrameView.cpp:
451         (WebCore::FrameView::recalculateScrollbarOverlayStyle): Use WTF::nullopt in the false case
452         to auto detect overlay style when page() is null.
453         * rendering/RenderLayer.cpp:
454         (WebCore::RenderLayer::useDarkAppearance const): Added.
455         * rendering/RenderLayer.h:
456         * testing/Internals.cpp:
457         (WebCore::Internals::scrollbarOverlayStyle const): Added Node argument.
458         (WebCore::Internals::scrollbarUsingDarkAppearance const): Added.
459         * testing/Internals.h:
460         * testing/Internals.idl:
461
462 2019-02-07  Eric Carlson  <eric.carlson@apple.com>
463
464         [MSE] Convert debug-only logging to runtime logging
465         https://bugs.webkit.org/show_bug.cgi?id=194348
466         <rdar://problem/47566449>
467
468         Reviewed by Jer Noble.
469
470         No new tests, this just changes existing logging.
471
472         * Modules/mediasource/MediaSource.cpp:
473         (WebCore::convertEnumerationToString):
474         (WebCore::MediaSource::MediaSource):
475         (WebCore::MediaSource::~MediaSource):
476         (WebCore::MediaSource::setPrivateAndOpen):
477         (WebCore::MediaSource::addedToRegistry):
478         (WebCore::MediaSource::removedFromRegistry):
479         (WebCore::MediaSource::durationChanged):
480         (WebCore::MediaSource::seekToTime):
481         (WebCore::MediaSource::completeSeek):
482         (WebCore::MediaSource::setLiveSeekableRange):
483         (WebCore::MediaSource::clearLiveSeekableRange):
484         (WebCore::MediaSource::setDuration):
485         (WebCore::MediaSource::setDurationInternal):
486         (WebCore::MediaSource::setReadyState):
487         (WebCore::MediaSource::endOfStream):
488         (WebCore::MediaSource::streamEndedWithError):
489         (WebCore::MediaSource::addSourceBuffer):
490         (WebCore::MediaSource::removeSourceBuffer):
491         (WebCore::MediaSource::isTypeSupported):
492         (WebCore::MediaSource::detachFromElement):
493         (WebCore::MediaSource::attachToElement):
494         (WebCore::MediaSource::openIfInEndedState):
495         (WebCore::MediaSource::suspend):
496         (WebCore::MediaSource::resume):
497         (WebCore::MediaSource::stop):
498         (WebCore::MediaSource::onReadyStateChange):
499         (WebCore::MediaSource::scheduleEvent):
500         (WebCore::MediaSource::logChannel const):
501         (WebCore::MediaSourceInternal::toString): Deleted.
502         * Modules/mediasource/MediaSource.h:
503         (WTF::LogArgument<WebCore::MediaSource::EndOfStreamError>::toString):
504         (WTF::LogArgument<WebCore::MediaSource::ReadyState>::toString):
505         * Modules/mediasource/SourceBuffer.cpp:
506         (WebCore::SourceBuffer::SourceBuffer):
507         (WebCore::SourceBuffer::~SourceBuffer):
508         (WebCore::SourceBuffer::remove):
509         (WebCore::SourceBuffer::seekToTime):
510         (WebCore::SourceBuffer::appendBufferInternal):
511         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
512         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveRenderingError):
513         (WebCore::removeSamplesFromTrackBuffer):
514         (WebCore::SourceBuffer::removeCodedFrames):
515         (WebCore::SourceBuffer::evictCodedFrames):
516         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
517         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
518         (WebCore::SourceBuffer::sourceBufferPrivateReenqueSamples):
519         (WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
520         (WebCore::SourceBuffer::provideMediaData):
521         (WebCore::SourceBuffer::trySignalAllSamplesInTrackEnqueued):
522         (WebCore::SourceBuffer::monitorBufferingRate):
523         (WebCore::SourceBuffer::logChannel const):
524         * Modules/mediasource/SourceBuffer.h:
525         * dom/Document.cpp:
526         (WebCore::messageSourceForWTFLogChannel):
527         (WebCore::Document::didLogMessage):
528         * html/HTMLMediaElement.cpp:
529         (WebCore::convertEnumerationToString):
530         (WebCore::HTMLMediaElement::scheduleCheckPlaybackTargetCompatability):
531         (WebCore::HTMLMediaElement::selectMediaResource):
532         (WebCore::HTMLMediaElement::loadResource):
533         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
534         (WebCore::HTMLMediaElement::scheduleConfigureTextTracks):
535         (WebCore::HTMLMediaElement::scheduleMediaEngineWasUpdated):
536         (WebCore::HTMLMediaElement::scheduleUpdatePlayState):
537         (WebCore::HTMLMediaElement::scheduleUpdateMediaState):
538         * platform/ContentType.cpp:
539         (WebCore::ContentType::toJSONString const):
540         * platform/ContentType.h:
541         (WTF::LogArgument<WebCore::ContentType>::toString):
542         * platform/MediaSample.h:
543         (WebCore::MediaSample::toJSONString const):
544         (WTF::LogArgument<WebCore::MediaSample>::toString):
545         * platform/graphics/FloatSize.cpp:
546         (WebCore::FloatSize::toJSONObject const):
547         (WebCore::FloatSize::toJSONString const):
548         * platform/graphics/FloatSize.h:
549         (WTF::LogArgument<WebCore::FloatSize>::toString):
550         * platform/graphics/MediaSourcePrivate.h:
551         (WebCore::MediaSourcePrivate::mediaSourceLogIdentifier):
552         (WTF::LogArgument<WebCore::MediaSourcePrivate::AddStatus>::toString):
553         (WTF::LogArgument<WebCore::MediaSourcePrivate::EndOfStreamStatus>::toString):
554         * platform/graphics/SourceBufferPrivate.h:
555         (WebCore::SourceBufferPrivate::sourceBufferLogger const):
556         (WebCore::SourceBufferPrivate::sourceBufferLogIdentifier):
557         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
558         (WebCore::MediaPlayerPrivateAVFoundationObjC::setMuted):
559         (WebCore::MediaPlayerPrivateAVFoundationObjC::setClosedCaptionsVisible):
560         (WebCore::MediaPlayerPrivateAVFoundationObjC::isCurrentPlaybackTargetWireless const):
561         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessVideoPlaybackDisabled const):
562         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessVideoPlaybackDisabled):
563         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget):
564         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldBufferData):
565         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
566         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::mediaPlayerLogIdentifier):
567         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::mediaPlayerLogger):
568         (WTF::LogArgument<WebCore::MediaPlayerPrivateMediaSourceAVFObjC::SeekState>::toString):
569         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
570         (WebCore::convertEnumerationToString):
571         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
572         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC):
573         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load):
574         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::play):
575         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal):
576         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pause):
577         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pauseInternal):
578         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVolume):
579         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setMuted):
580         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVisible):
581         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
582         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
583         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::waitForSeekCompleted):
584         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekCompleted):
585         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setPreservesPitch):
586         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableVideoFrame):
587         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateAllRenderersHaveAvailableSamples):
588         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationChanged):
589         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setNaturalSize):
590         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):
591         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::outputObscuredDueToInsufficientExternalProtectionChanged):
592         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cdmInstanceAttached):
593         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cdmInstanceDetached):
594         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::attemptToDecryptWithInstance):
595         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::waitingForKeyChanged):
596         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::initializationDataEncountered):
597         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setReadyState):
598         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setNetworkState):
599         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setShouldPlayToPlaybackTarget):
600         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isCurrentPlaybackTargetWireless const):
601         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::logChannel const):
602         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
603         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample):
604         * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
605         * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
606         (WebCore::MediaSampleAVFObjC::toJSONString const):
607         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
608         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
609         (WebCore::MediaSourcePrivateAVFObjC::MediaSourcePrivateAVFObjC):
610         (WebCore::MediaSourcePrivateAVFObjC::~MediaSourcePrivateAVFObjC):
611         (WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer):
612         (WebCore::MediaSourcePrivateAVFObjC::logChannel const):
613         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
614         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
615         (WebCore::bufferWasConsumedCallback):
616         (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
617         (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
618         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
619         (WebCore::SourceBufferPrivateAVFObjC::didFailToParseStreamDataWithError):
620         (WebCore::SourceBufferPrivateAVFObjC::processCodedFrame):
621         (WebCore::SourceBufferPrivateAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID):
622         (WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
623         (WebCore::SourceBufferPrivateAVFObjC::append):
624         (WebCore::SourceBufferPrivateAVFObjC::abort):
625         (WebCore::SourceBufferPrivateAVFObjC::resetParserState):
626         (WebCore::SourceBufferPrivateAVFObjC::removedFromMediaSource):
627         (WebCore::SourceBufferPrivateAVFObjC::setReadyState):
628         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
629         (WebCore::SourceBufferPrivateAVFObjC::setCDMSession):
630         (WebCore::SourceBufferPrivateAVFObjC::setCDMInstance):
631         (WebCore::SourceBufferPrivateAVFObjC::layerDidReceiveError):
632         (WebCore::SourceBufferPrivateAVFObjC::outputObscuredDueToInsufficientExternalProtectionChanged):
633         (WebCore::SourceBufferPrivateAVFObjC::flush):
634         (WebCore::SourceBufferPrivateAVFObjC::flushVideo):
635         (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
636         (WebCore::SourceBufferPrivateAVFObjC::bufferWasConsumed):
637         (WebCore::SourceBufferPrivateAVFObjC::setActive):
638         (WebCore::SourceBufferPrivateAVFObjC::willSeek):
639         (WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples):
640         (WebCore::SourceBufferPrivateAVFObjC::canSwitchToType):
641         (WebCore::SourceBufferPrivateAVFObjC::setDecompressionSession):
642         (WebCore::SourceBufferPrivateAVFObjC::logChannel const):
643
644 2019-02-07  Youenn Fablet  <youenn@apple.com>
645
646         Simplify applyConstraints callbacks
647         https://bugs.webkit.org/show_bug.cgi?id=194297
648
649         Reviewed by Eric Carlson.
650
651         Make use of one callback for both success and failure cases.
652         No changed of behavior.
653
654         * Modules/mediastream/MediaStreamTrack.cpp:
655         (WebCore::MediaStreamTrack::applyConstraints):
656         * platform/mediastream/MediaStreamTrackPrivate.cpp:
657         (WebCore::MediaStreamTrackPrivate::applyConstraints):
658         * platform/mediastream/MediaStreamTrackPrivate.h:
659         * platform/mediastream/RealtimeMediaSource.cpp:
660         (WebCore::RealtimeMediaSource::applyConstraints):
661         * platform/mediastream/RealtimeMediaSource.h:
662         * platform/mediastream/mac/AVVideoCaptureSource.mm:
663         (WebCore::AVVideoCaptureSource::create):
664         * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
665         (WebCore::CoreAudioCaptureSource::create):
666         * platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.cpp:
667         (WebCore::MockGStreamerAudioCaptureSource::applyConstraints):
668         * platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.h:
669         * platform/mediastream/gstreamer/MockGStreamerVideoCaptureSource.cpp:
670         (WebCore::MockGStreamerVideoCaptureSource::applyConstraints):
671         * platform/mediastream/gstreamer/MockGStreamerVideoCaptureSource.h:
672
673 2019-02-07  Youenn Fablet  <youenn@apple.com>
674
675         Unable to sign in leetcode.
676         https://bugs.webkit.org/show_bug.cgi?id=194366
677         rdar://problem/47259025.
678
679         Reviewed by Chris Dumez.
680
681         In case a signal is passed as part of a FetchRequestInit,
682         the IDL binding code is throwing an exception in case signal is not an AbortSignal object.
683         This breaks an AbortSignal shim used in some web sites.
684         Relaxed the IDL binding rule by marking signal as any and doing the conversion in FetchRequest.
685
686         Test: http/wpt/fetch/request-abort.html
687         Also covered by manually signing in to leetcode.
688
689         * Modules/fetch/FetchRequest.cpp:
690         (WebCore::FetchRequest::initializeWith):
691         * Modules/fetch/FetchRequestInit.h:
692         (WebCore::FetchRequestInit::hasMembers const):
693         * Modules/fetch/FetchRequestInit.idl:
694
695 2019-02-07  Youenn Fablet  <youenn@apple.com>
696
697         Make to clear sources from UserMediaCaptureManagerProxy and UserMediaCaptureManager when no longer needed
698         https://bugs.webkit.org/show_bug.cgi?id=194312
699
700         Reviewed by Eric Carlson.
701
702         Add a way for sources to know when they are ended, i.e. that they will never be started again.
703         No observable change of behavior.
704
705         * platform/mediastream/RealtimeMediaSource.cpp:
706         (WebCore::RealtimeMediaSource::requestStop):
707         * platform/mediastream/RealtimeMediaSource.h:
708
709 2019-02-07  Jer Noble  <jer.noble@apple.com>
710
711         HTMLMediaElement registers wrong ScriptExecutionContext with its ActiveDOMObject parent class
712         https://bugs.webkit.org/show_bug.cgi?id=194360
713
714         HTMLMediaElement registers the Document used to create it with ActiveDOMObject, when it should
715         really use that Document's contextDocument(). Rather than just fix this in HTMLMediaElement,
716         make sure that the correct document is used everywhere by adding a new ActiveDOMObject constructor
717         taking a Document&, and making an explicitly deleted Document* constructor to catch any new cases.
718
719         Reviewed by Geoffrey Garen.
720
721         * Modules/applepay/ApplePaySession.cpp:
722         (WebCore::ApplePaySession::ApplePaySession):
723         * Modules/mediarecorder/MediaRecorder.cpp:
724         (WebCore::MediaRecorder::MediaRecorder):
725         * Modules/mediastream/MediaDevices.cpp:
726         (WebCore::MediaDevices::MediaDevices):
727         * Modules/mediastream/UserMediaRequest.cpp:
728         (WebCore::UserMediaRequest::UserMediaRequest):
729         * Modules/notifications/Notification.cpp:
730         (WebCore::Notification::Notification):
731         * Modules/paymentrequest/PaymentRequest.cpp:
732         (WebCore::PaymentRequest::PaymentRequest):
733         * Modules/webaudio/AudioContext.cpp:
734         (WebCore::AudioContext::AudioContext):
735         * animation/WebAnimation.cpp:
736         (WebCore::WebAnimation::WebAnimation):
737         * css/FontFaceSet.cpp:
738         (WebCore::FontFaceSet::FontFaceSet):
739         * dom/ActiveDOMObject.cpp:
740         (WebCore::ActiveDOMObject::ActiveDOMObject):
741         * dom/ActiveDOMObject.h:
742         * dom/Document.h:
743         (WebCore::ActiveDOMObject::ActiveDOMObject):
744         * html/HTMLMarqueeElement.cpp:
745         (WebCore::HTMLMarqueeElement::HTMLMarqueeElement):
746         * html/HTMLMediaElement.cpp:
747         (WebCore::HTMLMediaElement::HTMLMediaElement):
748         * html/HTMLSourceElement.cpp:
749         (WebCore::HTMLSourceElement::HTMLSourceElement):
750         * page/IntersectionObserver.cpp:
751         (WebCore::IntersectionObserver::IntersectionObserver):
752
753 2019-02-07  Zalan Bujtas  <zalan@apple.com>
754
755         [LFC][Out-of-flow] Use the containing block's padding width when computing min/max width.
756         https://bugs.webkit.org/show_bug.cgi?id=194391
757
758         Reviewed by Antti Koivisto.
759
760         The spec is not clear about this but that's what matches the current behaviour.
761
762         Test: fast/block/block-only/absolute-positioned-min-max-percentage-with-parent-padding.html
763
764         * layout/FormattingContext.cpp:
765         (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const):
766
767 2019-02-07  Zalan Bujtas  <zalan@apple.com>
768
769         [LFC] Use dedicated data structures for optional used values (input to geometry functions)
770         https://bugs.webkit.org/show_bug.cgi?id=194376
771
772         Reviewed by Antti Koivisto.
773
774         This is in preparation for being able to pass in the containing block's width as an optional used value.
775         During layout we always have a valid width for the containing block, however it's not the case while computing the preferred width.
776
777         * layout/FormattingContext.cpp:
778         (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const):
779         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):
780         * layout/FormattingContext.h:
781         (WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry): Deleted.
782         (WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry): Deleted.
783         (WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin): Deleted.
784         (WebCore::Layout::FormattingContext::Geometry::floatingWidthAndMargin): Deleted.
785         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin): Deleted.
786         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin): Deleted.
787         (): Deleted.
788         (WebCore::Layout::FormattingContext::Geometry::complicatedCases): Deleted.
789         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry): Deleted.
790         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry): Deleted.
791         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry): Deleted.
792         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry): Deleted.
793         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin): Deleted.
794         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin): Deleted.
795         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin): Deleted.
796         * layout/FormattingContextGeometry.cpp:
797         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
798         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
799         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
800         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
801         (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
802         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
803         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin):
804         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
805         (WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry):
806         (WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
807         (WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin):
808         (WebCore::Layout::FormattingContext::Geometry::floatingWidthAndMargin):
809         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin):
810         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
811         * layout/LayoutUnits.h:
812         * layout/blockformatting/BlockFormattingContext.cpp:
813         (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const):
814         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):
815         * layout/blockformatting/BlockFormattingContext.h:
816         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin): Deleted.
817         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin): Deleted.
818         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin): Deleted.
819         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin): Deleted.
820         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin): Deleted.
821         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
822         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
823         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
824         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin):
825         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
826         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
827         * layout/inlineformatting/InlineFormattingContext.cpp:
828         (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin const):
829         (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin const):
830         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
831         (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
832         (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin):
833         * page/FrameViewLayoutContext.cpp:
834         (WebCore::layoutUsingFormattingContext):
835
836 2019-02-07  Antti Koivisto  <antti@apple.com>
837
838         Infinite recursion via CachedResource::~CachedResource
839         https://bugs.webkit.org/show_bug.cgi?id=194378
840         <rdar://problem/42023295>
841
842         Reviewed by Daniel Bates.
843
844         I don't know the exact steps to trigger this but the mechanism seems clear.
845
846         1) An existing resource is removed from or replaced in CachedResourceLoader::m_documentResources map.
847         2) This decrements the handle count of resource and causes it be deleted.
848         3) CachedResource::~CachedResource calls m_owningCachedResourceLoader->removeCachedResource(*this). This only happens with
849            resources that are "owned" by CachedResourceLoader which is a rare special case (used by image document and if memory cache is disabled).
850         4) CachedResourceLoader::removeCachedResource looks up the resource from the map which causes a temporary CachedResourceHandle to be created.
851            This increments the handle count of the resource from 0 back to 1.
852         5) When the temporary dies, CachedResource::~CachedResource is called again and we cycle back to 3).
853
854         The fix here is simply to remove CachedResourceLoader::removeCachedResource call from ~CachedResource.
855         It is a leftover from when the map contained raw pointers instead of owning CachedResourceHandles.
856
857         Since m_documentResources map has a handle to the resource, the only way we are in the destructor is that the resource
858         has been removed from the map already (or is in process of being removed like in this crash). Any call that does anything
859         other than bail out is going to crash.
860
861         CachedResource::n_owningCachedResourceLoader member and CachedResourceLoader::removeCachedResource function only exist to
862         support this erranous call so they are removed as well.
863
864         * loader/ImageLoader.cpp:
865         (WebCore::ImageLoader::updateFromElement):
866         * loader/cache/CachedResource.cpp:
867         (WebCore::CachedResource::~CachedResource):
868
869         This is the substantive change. The rest just removes now-dead code.
870
871         * loader/cache/CachedResource.h:
872         (WebCore::CachedResource::setOwningCachedResourceLoader): Deleted.
873         * loader/cache/CachedResourceLoader.cpp:
874         (WebCore::CachedResourceLoader::~CachedResourceLoader):
875         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
876         (WebCore::CachedResourceLoader::requestResource):
877         (WebCore::CachedResourceLoader::loadResource):
878         (WebCore::CachedResourceLoader::garbageCollectDocumentResources):
879         (WebCore::CachedResourceLoader::removeCachedResource): Deleted.
880         * loader/cache/CachedResourceLoader.h:
881
882 2019-02-07  Miguel Gomez  <magomez@igalia.com>
883
884         [WPE] Implement GStreamer based holepunch
885         https://bugs.webkit.org/show_bug.cgi?id=193715
886
887         Reviewed by Xabier Rodriguez-Calvar.
888
889         Implement GStreamer based holepunch functionality. Instead of getting the video frames from the
890         video sink and drawing then, the player just draws a transparent rectangle on the position where
891         the video should be. MediaPlayerPrivateGStreamerBase will instantiate a platform dependant video
892         sink which will be in charge of displaying the video frames in some way (usually on a plane below
893         the browser), and will push empty frames to the compositor indicating that the rectangle to draw
894         should overwrite the existent content. TextureMapperPlatformLayerBuffer::HolePunchClient is used
895         to tell the video sink where to position the video so it's set below the browser transparent hole.
896
897         Added ManualTest wpe/video-player-holepunch.html to test the feature.
898
899         * platform/graphics/MediaPlayer.cpp:
900         (WebCore::MediaPlayer::shouldIgnoreIntrinsicSize):
901         * platform/graphics/MediaPlayer.h:
902         * platform/graphics/MediaPlayerPrivate.h:
903         (WebCore::MediaPlayerPrivateInterface::shouldIgnoreIntrinsicSize):
904         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
905         (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize const):
906         (WebCore::MediaPlayerPrivateGStreamerBase::swapBuffersIfNeeded):
907         (WebCore::setRectangleToVideoSink):
908         (WebCore::GStreamerHolePunchClient::GStreamerHolePunchClient):
909         (WebCore::MediaPlayerPrivateGStreamerBase::createHolePunchVideoSink):
910         (WebCore::MediaPlayerPrivateGStreamerBase::pushNextHolePunchBuffer):
911         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
912         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
913         * platform/graphics/texmap/TextureMapper.h:
914         * platform/graphics/texmap/TextureMapperGL.cpp:
915         (WebCore::TextureMapperGL::drawSolidColor):
916         * platform/graphics/texmap/TextureMapperGL.h:
917         * platform/graphics/texmap/TextureMapperLayer.cpp:
918         (WebCore::TextureMapperLayer::paintSelf):
919         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
920         (WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper):
921         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
922         (WebCore::TextureMapperPlatformLayerBuffer::setHolePunchClient):
923         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
924         (WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
925         * rendering/RenderVideo.cpp:
926         (WebCore::RenderVideo::videoBox const):
927
928 2019-02-06  Benjamin Poulain  <benjamin@webkit.org>
929
930         Unreviewed, rolling out r240759 and r240944.
931
932         Some timer uses are done off the main thread, WebCore::Timer
933         cannot be used
934
935         Reverted changesets:
936
937         "<rdar://problem/47570443> Responsiveness timers are too
938         expensive for frequent events"
939         https://bugs.webkit.org/show_bug.cgi?id=194003
940         https://trac.webkit.org/changeset/240759
941
942         "Use deferrable timer to restart the Responsiveness Timer on
943         each wheel event"
944         https://bugs.webkit.org/show_bug.cgi?id=194135
945         https://trac.webkit.org/changeset/240944
946
947 2019-02-06  Keith Rollin  <krollin@apple.com>
948
949         Update .xcfilelist files
950
951         Unreviewed build fix.
952
953         * DerivedSources-input.xcfilelist:
954         * DerivedSources-output.xcfilelist:
955
956 2019-02-06  Devin Rousso  <drousso@apple.com>
957
958         Web Inspector: DOM: don't send the entire function string with each event listener
959         https://bugs.webkit.org/show_bug.cgi?id=194293
960         <rdar://problem/47822809>
961
962         Reviewed by Joseph Pecoraro.
963
964         Test: inspector/dom/getEventListenersForNode.html
965
966         * inspector/agents/InspectorDOMAgent.cpp:
967         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
968
969 2019-02-06  Andy Estes  <aestes@apple.com>
970
971         [Payment Request] It should be possible to require a phonetic name for shipping contacts
972         https://bugs.webkit.org/show_bug.cgi?id=194311
973         <rdar://46733045>
974
975         Reviewed by Alex Christensen.
976
977         It should be possible to require that a shipping contact has a phonetic name in Payment Request.
978         To accomplish this, move requiredShippingContactFields from ApplePayPaymentRequest to
979         ApplePayRequestBase so that it can be used as part of an Apple Pay payment method data.
980
981         Since required shipping contact fields can now be specified both in
982         requiredShippingContactFields and PaymentOptions, we merge the required fields from these
983         two sources such that, e.g., email is required if it is specified in either place.
984
985         So that clients can detect this new feature, the API version number is bumped from 5 to 6.
986
987         Added test cases to ApplePayRequestShippingContact.https.html and ApplePayRequestShippingContactV3.https.html.
988
989         * DerivedSources.make:
990         * Modules/applepay/ApplePayPaymentRequest.h:
991         * Modules/applepay/ApplePayPaymentRequest.idl:
992         * Modules/applepay/ApplePayRequestBase.cpp:
993         (WebCore::convertAndValidate):
994         * Modules/applepay/ApplePayRequestBase.h:
995         * Modules/applepay/ApplePayRequestBase.idl:
996         * Modules/applepay/ApplePaySession.cpp:
997         (WebCore::convertAndValidate):
998         * Modules/applepay/PaymentCoordinatorClient.cpp: Added.
999         (WebCore::PaymentCoordinatorClient::supportsVersion):
1000         * Modules/applepay/PaymentCoordinatorClient.h:
1001         * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
1002         (WebCore::mergePaymentOptions):
1003         (WebCore::ApplePayPaymentHandler::show):
1004         * SourcesCocoa.txt:
1005         * WebCore.xcodeproj/project.pbxproj:
1006         * loader/EmptyClients.cpp:
1007         * testing/MockPaymentContactFields.h: Added.
1008         (WebCore::MockPaymentContactFields::MockPaymentContactFields):
1009         * testing/MockPaymentContactFields.idl: Added.
1010         * testing/MockPaymentCoordinator.cpp:
1011         (WebCore::MockPaymentCoordinator::showPaymentUI):
1012         (WebCore::MockPaymentCoordinator::supportsVersion): Deleted.
1013         * testing/MockPaymentCoordinator.h:
1014         * testing/MockPaymentCoordinator.idl:
1015
1016 2019-02-06  Yusuke Suzuki  <ysuzuki@apple.com>
1017
1018         [JSC] PrivateName to PublicName hash table is wasteful
1019         https://bugs.webkit.org/show_bug.cgi?id=194277
1020
1021         Reviewed by Michael Saboff.
1022
1023         Use WebCoreBuiltinNames instead of adding WebCore names to JSC CommonIdentifiers.
1024
1025         * bindings/js/JSDOMWindowCustom.cpp:
1026         (WebCore::addCrossOriginPropertyNames):
1027         * bindings/js/JSLocationCustom.cpp:
1028         (WebCore::getOwnPropertySlotCommon):
1029         (WebCore::putCommon):
1030         * bindings/js/WebCoreBuiltinNames.h:
1031
1032 2019-02-06  Keith Rollin  <krollin@apple.com>
1033
1034         Really enable the automatic checking and regenerations of .xcfilelists during builds
1035         https://bugs.webkit.org/show_bug.cgi?id=194357
1036         <rdar://problem/47861231>
1037
1038         Reviewed by Chris Dumez.
1039
1040         Bug 194124 was supposed to enable the automatic checking and
1041         regenerating of .xcfilelist files during the build. While related
1042         changes were included in that patch, the change to actually enable the
1043         operation somehow was omitted. This patch actually enables the
1044         operation. The check-xcfilelist.sh scripts now check
1045         WK_DISABLE_CHECK_XCFILELISTS, and if it's "1", opts-out the developer
1046         from the checking.
1047
1048         No new tests since there should be no observable behavior difference.
1049
1050         * Scripts/check-xcfilelists.sh:
1051
1052 2019-02-06  John Wilander  <wilander@apple.com>
1053
1054         Forward Ad Click Attribution data from HTMLAnchorElement::handleClick() to WebKit::NavigationActionData
1055         https://bugs.webkit.org/show_bug.cgi?id=194325
1056         <rdar://problem/47840283>
1057
1058         Reviewed by Chris Dumez.
1059
1060         No new tests. This is just data forwarding. Once the data is stored, I will create
1061         test infrastructure to query it.
1062
1063         * html/HTMLAnchorElement.cpp:
1064         (WebCore::HTMLAnchorElement::handleClick):
1065         * loader/AdClickAttribution.h:
1066         (WebCore::AdClickAttribution::encode const):
1067         (WebCore::AdClickAttribution::decode):
1068         (WebCore::AdClickAttribution::Conversion::encode const):
1069         (WebCore::AdClickAttribution::Conversion::decode):
1070             Infrastructure for IPC.
1071         * loader/FrameLoader.cpp:
1072         (WebCore::FrameLoader::urlSelected):
1073         (WebCore::FrameLoader::loadURLIntoChildFrame):
1074         (WebCore::FrameLoader::loadFrameRequest):
1075         (WebCore::FrameLoader::loadURL):
1076             These functions forward the optional WebCore::AdClickAttribution object
1077             FrameLoader::loadURL() creates the NavigationAction object and sets the
1078             WebCore::AdClickAttribution object on there.
1079         * loader/FrameLoader.h:
1080         (WebCore::FrameLoader::urlSelected):
1081         (WebCore::FrameLoader::loadURL):
1082         * loader/NavigationAction.h:
1083         (WebCore::NavigationAction::adClickAttribution):
1084         (WebCore::NavigationAction::setAdClickAttribution):
1085
1086 2019-02-06  Justin Fan  <justin_fan@apple.com>
1087
1088         [Web GPU] Implement supporting dictionaries for GPUTexture
1089         https://bugs.webkit.org/show_bug.cgi?id=194354
1090
1091         Reviewed by Dean Jackson.
1092
1093         Add dictionaries needed to create a GPUTextureDescriptor.
1094
1095         No new tests; no change in behavior. 
1096
1097         New interface and dictionaries added:
1098         * Modules/webgpu/GPUExtent3D.idl:
1099         * Modules/webgpu/GPUTextureDescriptor.idl:
1100         * Modules/webgpu/GPUTextureDimension.idl:
1101         * Modules/webgpu/GPUTextureUsage.idl:
1102         * platform/graphics/gpu/GPUExtent3D.h:
1103         * platform/graphics/gpu/GPUTextureDescriptor.h:
1104         * platform/graphics/gpu/GPUTextureDimension.h:
1105         * platform/graphics/gpu/GPUTextureUsage.h:
1106
1107         Update WebGPUTextureFormatEnum to GPUTextureFormat:
1108         * Modules/webgpu/WebGPUTextureFormatEnum.h: Removed.
1109         * Modules/webgpu/GPUTextureFormat.idl: Renamed from WebGPUTextureFormatEnum.idl and updated to hyphen-case.
1110         * platform/graphics/gpu/GPUTextureFormat.h: Renamed from GPUTextureFormatEnum and updated for hyphen-case IDL.
1111         * Modules/webgpu/WebGPUSwapChain.cpp:
1112         * Modules/webgpu/WebGPUSwapChain.h:
1113         * Modules/webgpu/WebGPUSwapChain.idl:
1114         * platform/graphics/gpu/GPUSwapChain.h:
1115         * platform/graphics/gpu/cocoa/GPUSwapChainMetal.mm:
1116         (WebCore::platformTextureFormatForGPUTextureFormat):
1117         (WebCore::GPUSwapChain::setFormat):
1118
1119         Update project files with new symbols:
1120         * CMakeLists.txt:
1121         * DerivedSources.make:
1122         * Sources.txt:
1123         * WebCore.xcodeproj/project.pbxproj:
1124         * bindings/js/WebCoreBuiltinNames.h:
1125
1126 2019-02-06  Dean Jackson  <dino@apple.com>
1127
1128         Fix potential build error in GPUDevice
1129         https://bugs.webkit.org/show_bug.cgi?id=194359
1130
1131         Reviewed by Joseph Pecoraro.
1132
1133         Add an UNUSED_PARAM for non-macOS platforms.
1134
1135         * platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
1136         (WebCore::GPUDevice::create):
1137
1138 2019-02-06  Daniel Bates  <dabates@apple.com>
1139
1140         Standardize on ControlKey instead of CtrlKey
1141         https://bugs.webkit.org/show_bug.cgi?id=194317
1142
1143         Reviewed by Tim Horton.
1144
1145         * dom/UIEventWithKeyState.cpp:
1146         (WebCore::UIEventWithKeyState::modifiersFromInitializer):
1147         (WebCore::UIEventWithKeyState::setModifierKeys):
1148         * dom/UIEventWithKeyState.h:
1149         (WebCore::UIEventWithKeyState::ctrlKey const):
1150         * page/ios/EventHandlerIOS.mm:
1151         (WebCore::EventHandler::accessKeyModifiers):
1152         * page/mac/EventHandlerMac.mm:
1153         (WebCore::EventHandler::accessKeyModifiers):
1154         * platform/PlatformEvent.h:
1155         (WebCore::PlatformEvent::controlKey const):
1156         (WebCore::PlatformEvent::PlatformEvent):
1157         (WebCore::PlatformEvent::ctrlKey const): Deleted.
1158         * platform/cocoa/KeyEventCocoa.mm:
1159         (WebCore::PlatformKeyboardEvent::getCurrentModifierState):
1160         * platform/gtk/PlatformKeyboardEventGtk.cpp:
1161         (WebCore::modifiersForGdkKeyEvent):
1162         * platform/gtk/PlatformMouseEventGtk.cpp:
1163         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1164         * platform/gtk/PlatformWheelEventGtk.cpp:
1165         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1166         * platform/ios/KeyEventIOS.mm:
1167         (WebCore::PlatformKeyboardEvent::currentStateOfModifierKeys):
1168         * platform/ios/PlatformEventFactoryIOS.mm:
1169         (WebCore::modifiersForEvent):
1170         * platform/mac/KeyEventMac.mm:
1171         (WebCore::PlatformKeyboardEvent::currentStateOfModifierKeys):
1172         * platform/mac/PlatformEventFactoryMac.mm:
1173         (WebCore::modifiersForEvent):
1174         * testing/Internals.cpp:
1175         (WebCore::Internals::accessKeyModifiers const):
1176
1177 2019-02-06  Alex Christensen  <achristensen@webkit.org>
1178
1179         Fix WatchOS build
1180         https://bugs.webkit.org/show_bug.cgi?id=194353
1181
1182         Rubber stamped by Tim Horton and Wenson Hsieh.
1183
1184         * rendering/RenderThemeIOS.mm:
1185         (WebCore::iconForAttachment):
1186
1187 2019-02-06  Olivier Blin  <olivier.blin@softathome.com>
1188
1189         [SVG] fix SVGURIReference build by including SVGElement
1190         https://bugs.webkit.org/show_bug.cgi?id=194292
1191
1192         Reviewed by Michael Catanzaro.
1193
1194         * svg/SVGURIReference.h:
1195         SVGURIReference is making use of SVGElement in its constructor, but
1196         it was not declared.
1197
1198         The issue was not seen in unified builds because it was grouped with
1199         other files including SVGElement.
1200
1201 2019-02-06  Zalan Bujtas  <zalan@apple.com>
1202
1203         [LFC][IFC] Move line layout code to a dedicated file
1204         https://bugs.webkit.org/show_bug.cgi?id=194328
1205
1206         Reviewed by Antti Koivisto.
1207
1208         * Sources.txt:
1209         * WebCore.xcodeproj/project.pbxproj:
1210         * layout/inlineformatting/InlineFormattingContext.cpp:
1211         (WebCore::Layout::InlineFormattingContext::layout const):
1212         (WebCore::Layout::isTrimmableContent): Deleted.
1213         (WebCore::Layout::InlineFormattingContext::initializeNewLine const): Deleted.
1214         (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const): Deleted.
1215         (WebCore::Layout::InlineFormattingContext::createFinalRuns const): Deleted.
1216         (WebCore::Layout::InlineFormattingContext::postProcessInlineRuns const): Deleted.
1217         (WebCore::Layout::InlineFormattingContext::closeLine const): Deleted.
1218         (WebCore::Layout::InlineFormattingContext::appendContentToLine const): Deleted.
1219         (WebCore::Layout::InlineFormattingContext::layoutInlineContent const): Deleted.
1220         (WebCore::Layout::InlineFormattingContext::computeFloatPosition const): Deleted.
1221         (WebCore::Layout::InlineFormattingContext::placeInFlowPositionedChildren const): Deleted.
1222         * layout/inlineformatting/InlineFormattingContext.h:
1223         (WebCore::Layout::InlineFormattingContext::LineLayout::Line::hasContent const):
1224         (WebCore::Layout::InlineFormattingContext::LineLayout::Line::isClosed const):
1225         (WebCore::Layout::InlineFormattingContext::LineLayout::Line::isFirstLine const):
1226         (WebCore::Layout::InlineFormattingContext::LineLayout::Line::runs):
1227         (WebCore::Layout::InlineFormattingContext::LineLayout::Line::contentLogicalLeft const):
1228         (WebCore::Layout::InlineFormattingContext::LineLayout::Line::availableWidth const):
1229         (WebCore::Layout::InlineFormattingContext::LineLayout::Line::lastRunType const):
1230         (WebCore::Layout::InlineFormattingContext::LineLayout::Line::logicalTop const):
1231         (WebCore::Layout::InlineFormattingContext::LineLayout::Line::logicalBottom const):
1232         (WebCore::Layout::InlineFormattingContext::LineLayout::Line::logicalHeight const):
1233         (WebCore::Layout::InlineFormattingContext::Line::hasContent const): Deleted.
1234         (WebCore::Layout::InlineFormattingContext::Line::isClosed const): Deleted.
1235         (WebCore::Layout::InlineFormattingContext::Line::isFirstLine const): Deleted.
1236         (WebCore::Layout::InlineFormattingContext::Line::runs): Deleted.
1237         (WebCore::Layout::InlineFormattingContext::Line::contentLogicalLeft const): Deleted.
1238         (WebCore::Layout::InlineFormattingContext::Line::availableWidth const): Deleted.
1239         (WebCore::Layout::InlineFormattingContext::Line::lastRunType const): Deleted.
1240         (WebCore::Layout::InlineFormattingContext::Line::logicalTop const): Deleted.
1241         (WebCore::Layout::InlineFormattingContext::Line::logicalBottom const): Deleted.
1242         (WebCore::Layout::InlineFormattingContext::Line::logicalHeight const): Deleted.
1243         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
1244         (WebCore::Layout::adjustedLineLogicalLeft): Deleted.
1245         (WebCore::Layout::InlineFormattingContext::Geometry::justifyRuns): Deleted.
1246         (WebCore::Layout::InlineFormattingContext::Geometry::computeExpansionOpportunities): Deleted.
1247         (WebCore::Layout::InlineFormattingContext::Geometry::alignRuns): Deleted.
1248         (WebCore::Layout::InlineFormattingContext::Geometry::runWidth): Deleted.
1249         * layout/inlineformatting/Line.cpp:
1250         (WebCore::Layout::InlineFormattingContext::LineLayout::Line::init):
1251         (WebCore::Layout::InlineFormattingContext::LineLayout::Line::adjustLogicalLeft):
1252         (WebCore::Layout::InlineFormattingContext::LineLayout::Line::adjustLogicalRight):
1253         (WebCore::Layout::InlineFormattingContext::LineLayout::Line::contentLogicalRight const):
1254         (WebCore::Layout::InlineFormattingContext::LineLayout::Line::appendContent):
1255         (WebCore::Layout::InlineFormattingContext::LineLayout::Line::close):
1256         (WebCore::Layout::InlineFormattingContext::Line::init): Deleted.
1257         (WebCore::Layout::InlineFormattingContext::Line::adjustLogicalLeft): Deleted.
1258         (WebCore::Layout::InlineFormattingContext::Line::adjustLogicalRight): Deleted.
1259         (WebCore::Layout::InlineFormattingContext::Line::contentLogicalRight const): Deleted.
1260         (WebCore::Layout::InlineFormattingContext::Line::appendContent): Deleted.
1261         (WebCore::Layout::InlineFormattingContext::Line::close): Deleted.
1262
1263 2019-02-06  Youenn Fablet  <youenn@apple.com>
1264
1265         CoreAudioCaptureSource should not configure its audio unit until it starts producing data
1266         https://bugs.webkit.org/show_bug.cgi?id=194310
1267
1268         Reviewed by Eric Carlson.
1269
1270         Delay the configuration of the audio unit until the source is instructed to start producing data.
1271         This allows the UIProcess to not start changing the audio unit when
1272         checking for constraints during getUserMedia call before the prompt.
1273         Covered by manual testing.
1274
1275         * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
1276         (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):
1277         (WebCore::CoreAudioCaptureSource::initializeToStartProducingData):
1278         (WebCore::CoreAudioCaptureSource::startProducingData):
1279         * platform/mediastream/mac/CoreAudioCaptureSource.h:
1280
1281 2019-02-06  Youenn Fablet  <youenn@apple.com>
1282
1283         Disable audio ducking at Audio Unit setup time
1284         https://bugs.webkit.org/show_bug.cgi?id=194303
1285
1286         Reviewed by Eric Carlson.
1287
1288         When creating a CoreAudioCaptureSource, the audio unit might be
1289         reconfigured if a past audio capture was done.
1290         This might trigger audio ducking which is undone in startInternal.
1291         In some cases, startInternal will never call start.
1292         In that case, the audio unit will continue ducking the other processing.
1293         To ensure ducking is disabled, unduck in setupAudioUnit as well as startInternal.
1294
1295         In addition to that, once a shared unit is created, it stays alive until the UIProcess exits.
1296         This might affect all applications.
1297         Instead, whenever the shared unit is stopped, clean it so as to restore the state as if no capture ever happened.
1298         This has noticeable effects in the quality of audio being played on bluetooth devices.
1299
1300         Covered by manual tests.
1301
1302         * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
1303         (WebCore::CoreAudioSharedUnit::setupAudioUnit):
1304         (WebCore::CoreAudioSharedUnit::unduck):
1305         (WebCore::CoreAudioSharedUnit::startInternal):
1306         (WebCore::CoreAudioSharedUnit::captureFailed):
1307         (WebCore::CoreAudioSharedUnit::stopProducingData):
1308
1309 2019-02-06  Antti Koivisto  <antti@apple.com>
1310
1311         RELEASE_ASSERT(!m_document.isResolvingTreeStyle()) in com.apple.WebKit.WebContent at WebCore: WebCore::StyleResolver::~StyleResolver
1312         https://bugs.webkit.org/show_bug.cgi?id=194333
1313         <rdar://problem/47822929>
1314
1315         Reviewed by Zalan Bujtas.
1316
1317         Content extensions may mutate the extension stylesheet in the middle of a style resolution as a result of
1318         the legacy animation code triggering a resource load.
1319
1320         Test: http/tests/contentextensions/css-display-none-keyframe.html
1321
1322         * style/StyleScope.cpp:
1323         (WebCore::Style::Scope::scheduleUpdate):
1324
1325         Avoid clearing the style resolver if we are in the middle of a style resolution.
1326         A better fix that avoid doing this in the first place is tracked by https://bugs.webkit.org/show_bug.cgi?id=194335.
1327
1328 2019-02-06  Pablo Saavedra  <psaavedra@igalia.com>
1329
1330         Build failure after r240315
1331         https://bugs.webkit.org/show_bug.cgi?id=194341
1332
1333         Reviewed by Wenson Hsieh.
1334
1335         * bindings/js/JSUndoItemCustom.cpp:
1336         (WebCore::JSUndoItemOwner::isReachableFromOpaqueRoots):
1337
1338 2019-02-05  Ryosuke Niwa  <rniwa@webkit.org>
1339
1340         REGRESSION (r240909): Release assert in FrameLoader::loadURL when navigating with a non-existent target name
1341         https://bugs.webkit.org/show_bug.cgi?id=194329
1342
1343         Reviewed by Geoffrey Garen.
1344
1345         The bug was caused by the code path for when navigating with a specific target frame name that does not exist
1346         never setting the load type of PolicyChecker. As a result, we would use whatever load type used in the previous
1347         navigation, resulting in this release assertion.
1348
1349         Updating the load type here should in theory fix the underlying bug r240909 was meant to catch & fix.
1350
1351         Test: fast/loader/navigate-with-new-target-after-back-forward-navigation.html
1352
1353         * loader/FrameLoader.cpp:
1354         (WebCore::FrameLoader::loadURL):
1355
1356 2019-02-05  Claudio Saavedra  <csaavedra@igalia.com>
1357
1358         [FreeType] Build fix for Debian stable
1359
1360         Unreviewed build fix.
1361
1362         Debian stable currently has a version of fontconfig that doesn't
1363         yet have FC_COLOR. #ifdef its use to fix the build.
1364
1365         * platform/graphics/freetype/FontCacheFreeType.cpp:
1366         (WebCore::FontCache::systemFallbackForCharacters):
1367
1368 2019-02-05  Alex Christensen  <achristensen@webkit.org>
1369
1370         Stop using blobRegistry in NetworkProcess
1371         https://bugs.webkit.org/show_bug.cgi?id=194027
1372
1373         Reviewed by Youenn Fablet.
1374
1375         Also stop using NetworkBlobRegistry::singleton.
1376         Instead, have the NetworkProcess own a NetworkBlobRegistry which owns a BlobRegistryImpl.
1377         We now have to resolve all blob file references while we still have a
1378         NetworkConnectionToWebProcess/NetworkProcess/NetworkBlobRegistry/BlobRegistryImpl instead of
1379         using the singleton after we have passed everything to the loading code, but it works the same
1380         as it did before.  We must consume the sandbox extension from the BlobRegistryImpl before using
1381         the resolved files, so I pass around a Vector<RefPtr<WebCore::BlobDataFileReference>> so we know
1382         which extensions to revoke.
1383
1384         * platform/network/BlobRegistryImpl.h:
1385         * platform/network/FormData.cpp:
1386         (WebCore::appendBlobResolved):
1387         (WebCore::FormData::resolveBlobReferences):
1388         * platform/network/FormData.h:
1389         * platform/network/cf/FormDataStreamCFNet.cpp:
1390         (WebCore::createHTTPBodyCFReadStream):
1391         * platform/network/curl/CurlFormDataStream.cpp:
1392         (WebCore::CurlFormDataStream::CurlFormDataStream):
1393
1394 2019-02-05  Truitt Savell  <tsavell@apple.com>
1395
1396         Unreviewed, rolling out r240984.
1397
1398         Revision casued two API timeouts
1399
1400         Reverted changeset:
1401
1402         "Stop using blobRegistry in NetworkProcess"
1403         https://bugs.webkit.org/show_bug.cgi?id=194027
1404         https://trac.webkit.org/changeset/240984
1405
1406 2019-02-05  Keith Rollin  <krollin@apple.com>
1407
1408         Enable the automatic checking and regenerations of .xcfilelists during builds
1409         https://bugs.webkit.org/show_bug.cgi?id=194124
1410         <rdar://problem/47721277>
1411
1412         Reviewed by Tim Horton.
1413
1414         Bug 193790 add a facility for checking -- during build time -- that
1415         any needed .xcfilelist files are up-to-date and for updating them if
1416         they are not. This facility was initially opt-in by setting
1417         WK_ENABLE_CHECK_XCFILELISTS until other pieces were in place and until
1418         the process seemed robust. Its now time to enable this facility and
1419         make it opt-out. If there is a need to disable this facility, set and
1420         export WK_DISABLE_CHECK_XCFILELISTS=1 in your environment before
1421         running `make` or `build-webkit`, or before running Xcode from the
1422         command line.
1423
1424         Additionally, remove the step that generates a list of source files
1425         going into the UnifiedSources build step. It's only necessarily to
1426         specify Sources.txt and SourcesCocoa.txt as inputs.
1427
1428         No new tests since there should be no observable behavior difference.
1429
1430         * UnifiedSources-input.xcfilelist: Removed.
1431         * WebCore.xcodeproj/project.pbxproj:
1432
1433 2019-02-05  Keith Rollin  <krollin@apple.com>
1434
1435         Update .xcfilelist files
1436         https://bugs.webkit.org/show_bug.cgi?id=194121
1437         <rdar://problem/47720863>
1438
1439         Reviewed by Tim Horton.
1440
1441         Preparatory to enabling the facility for automatically updating the
1442         .xcfilelist files, check in a freshly-updated set so that not everyone
1443         runs up against having to regenerate them themselves.
1444
1445         No new tests since there should be no observable behavior difference.
1446
1447         * DerivedSources-input.xcfilelist:
1448         * DerivedSources-output.xcfilelist:
1449
1450 2019-02-05  Alex Christensen  <achristensen@webkit.org>
1451
1452         Stop using blobRegistry in NetworkProcess
1453         https://bugs.webkit.org/show_bug.cgi?id=194027
1454
1455         Reviewed by Youenn Fablet.
1456
1457         Also stop using NetworkBlobRegistry::singleton.
1458         Instead, have the NetworkProcess own a NetworkBlobRegistry which owns a BlobRegistryImpl.
1459         We now have to resolve all blob file references while we still have a
1460         NetworkConnectionToWebProcess/NetworkProcess/NetworkBlobRegistry/BlobRegistryImpl instead of
1461         using the singleton after we have passed everything to the loading code, but it works the same
1462         as it did before.  We must consume the sandbox extension from the BlobRegistryImpl before using
1463         the resolved files, so I pass around a Vector<RefPtr<WebCore::BlobDataFileReference>> so we know
1464         which extensions to revoke.
1465
1466         * platform/network/BlobRegistryImpl.h:
1467         * platform/network/FormData.cpp:
1468         (WebCore::appendBlobResolved):
1469         (WebCore::FormData::resolveBlobReferences):
1470         * platform/network/FormData.h:
1471         * platform/network/cf/FormDataStreamCFNet.cpp:
1472         (WebCore::createHTTPBodyCFReadStream):
1473         * platform/network/curl/CurlFormDataStream.cpp:
1474         (WebCore::CurlFormDataStream::CurlFormDataStream):
1475
1476 2019-02-05  Ryan Haddad  <ryanhaddad@apple.com>
1477
1478         Unreviewed, rolling out r240742.
1479
1480         Causes crashes on iOS simulator.
1481
1482         Reverted changeset:
1483
1484         "[iOS] Keyups for non-modifier keys identified as "Dead" when
1485         not focused in a content-editable element"
1486         https://bugs.webkit.org/show_bug.cgi?id=192824
1487         https://trac.webkit.org/changeset/240742
1488
1489 2019-02-05  Zalan Bujtas  <zalan@apple.com>
1490
1491         [LFC][IFC] collectInlineContent should use pre-computed margins, paddings and borders
1492         https://bugs.webkit.org/show_bug.cgi?id=194269
1493
1494         Reviewed by Antti Koivisto.
1495
1496         In this patch we pre-compute the margins padding and borders for formatting context roots, replaced boxes and non-replaced containers.
1497         These property values are input to collectInlineContent's inline item detaching logic.
1498
1499         * layout/inlineformatting/InlineFormattingContext.cpp:
1500         (WebCore::Layout::nextInPreOrder):
1501         (WebCore::Layout::InlineFormattingContext::layout const):
1502         (WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPadding const):
1503         (WebCore::Layout::InlineFormattingContext::collectInlineContent const):
1504         * layout/inlineformatting/InlineFormattingContext.h:
1505         * layout/layouttree/LayoutBox.h: ran out bits. 
1506
1507 2019-02-05  Antoine Quint  <graouts@apple.com>
1508
1509         REGRESSION (r240579): com.apple.WebKit.WebContent at WebCore: WebCore::Document::absoluteEventRegionForNode
1510         https://bugs.webkit.org/show_bug.cgi?id=194284
1511         <rdar://problem/47774298>
1512
1513         Reviewed by Antti Koivisto.
1514
1515         The m_touchActionElements list needs to be HashSet<RefPtr<Element>> instead of HashSet<Element*>. It was initially storing raw pointers based on m_touchEventTargets
1516         which is an EventTargetSet (typedef’d to HashCountedSet<Node*>), but that's because these nodes have an event listener registered for them and as such are kept alive,
1517         whereas elements with a touch-action property aren’t. Elements are removed from this list from Document::nodeWillBeRemoved() and from Document::updateTouchActionElements(),
1518         the latter being called from Style::TreeResolver::resolveElement().
1519
1520         * dom/Document.cpp:
1521         (WebCore::Document::updateTouchActionElements):
1522         * dom/Document.h:
1523         (WebCore::Document::touchActionElements const):
1524
1525 2019-02-05  Benjamin Poulain  <benjamin@webkit.org>
1526
1527         Hit testing functions optimizations
1528         https://bugs.webkit.org/show_bug.cgi?id=194073
1529         <rdar://problem/47692312>
1530
1531         Reviewed by Zalan Bujtas.
1532
1533         This patch implements some easy optimizations that speed up
1534         hit testing without changing the algorithms.
1535
1536         * page/FrameViewLayoutContext.h:
1537         The code for:
1538             view().frameView().layoutContext().isPaintOffsetCacheEnabled()
1539         followed by:
1540             view().frameView().layoutContext().layoutState()
1541         was loading all the intermediate values twice and calling layoutState()
1542         twice.
1543
1544         By marking the function as pure, Clang can CSE the whole thing and
1545         remove the duplicated code.
1546
1547         * platform/graphics/LayoutRect.h:
1548         (WebCore::LayoutRect::isInfinite const):
1549         That one is pretty funny.
1550
1551         Since LayoutRect::isInfinite() was implemented before operator==() is
1552         declared, the compiler was falling back to the implicit convertion to FloatRect()
1553         before doing any comparison.
1554
1555         This explains a bunch of the convertions to float when using LayoutRect.
1556
1557         * rendering/RenderBox.cpp:
1558         (WebCore::RenderBox::mapLocalToContainer const):
1559         Just reoder to make the register nice and clean for the optimization described above.
1560
1561 2019-02-04  Yusuke Suzuki  <ysuzuki@apple.com>
1562
1563         [JSC] Shrink size of VM by lazily allocating IsoSubspaces for non-common types
1564         https://bugs.webkit.org/show_bug.cgi?id=193993
1565
1566         Reviewed by Keith Miller.
1567
1568         * bindings/scripts/CodeGeneratorJS.pm:
1569         (GenerateHeader):
1570         * bridge/runtime_method.h:
1571
1572 2019-02-04  Simon Fraser  <simon.fraser@apple.com>
1573
1574         Move some macOS/iOS scrolling code into the scrolling/cocoa directory
1575         https://bugs.webkit.org/show_bug.cgi?id=194245
1576
1577         Reviewed by Zalan Bujtas.
1578
1579         ScrollingTreeFixedNode and ScrollingTreeStickyNode are used on iOS and macOS, so move them to the cocoa
1580         directory.
1581
1582         Standardize on the ordering of ENABLE(ASYNC_SCROLLING) && PLATFORM(MAC).
1583
1584         Stop building ScrollingThread for iOS (it's never used), and stub out some functions so things build.
1585
1586         * SourcesCocoa.txt:
1587         * WebCore.xcodeproj/project.pbxproj:
1588         * page/scrolling/ScrollingThread.cpp:
1589         (WebCore::ScrollingThread::initializeRunLoop):
1590         (WebCore::ScrollingThread::wakeUpRunLoop):
1591         (WebCore::ScrollingThread::threadRunLoopSourceCallback):
1592         * page/scrolling/cocoa/ScrollingTreeFixedNode.h: Renamed from Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.h.
1593         * page/scrolling/cocoa/ScrollingTreeFixedNode.mm: Renamed from Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.mm.
1594         * page/scrolling/cocoa/ScrollingTreeStickyNode.h: Renamed from Source/WebCore/page/scrolling/mac/ScrollingTreeStickyNode.h.
1595         * page/scrolling/cocoa/ScrollingTreeStickyNode.mm: Renamed from Source/WebCore/page/scrolling/mac/ScrollingTreeStickyNode.mm.
1596         * page/scrolling/mac/ScrollingThreadMac.mm:
1597         * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h:
1598         * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
1599
1600 2019-02-04  Ms2ger  <Ms2ger@igalia.com>
1601
1602         [GTK][WPE] Need a function to convert internal URI to display ("pretty") URI
1603         https://bugs.webkit.org/show_bug.cgi?id=174816
1604
1605         Reviewed by Michael Catanzaro.
1606
1607         Tests: enabled fast/url/user-visible/.
1608
1609         * testing/Internals.cpp:
1610         (WebCore::Internals::userVisibleString): Enable method on all platforms.
1611
1612 2019-02-04  Fujii Hironori  <Hironori.Fujii@sony.com>
1613
1614         [curl] ASSERTION FAILED: !m_didNotifyResponse || m_multipartHandle
1615         https://bugs.webkit.org/show_bug.cgi?id=190895
1616
1617         Reviewed by Ross Kirsling.
1618
1619         An assertion was failing in CurlRequest::invokeDidReceiveResponse
1620         because DidReceiveResponse was already dispatched. This condition
1621         was met if CurlRequestScheduler::completeTransfer is called while
1622         waiting for the reply for the first DidReceiveResponse.
1623
1624         No new tests, covered by existing tests.
1625
1626         * platform/network/curl/CurlRequest.h:
1627         (WebCore::CurlRequest::needToInvokeDidReceiveResponse const):
1628         Return true if m_didNotifyResponse is false disregard to
1629         m_didReturnFromNotify.
1630
1631 2019-02-04  Said Abou-Hallawa  <said@apple.com>
1632
1633         [CG] Enable setAdditionalSupportedImageTypes for WK1
1634         https://bugs.webkit.org/show_bug.cgi?id=194190
1635
1636         Reviewed by Tim Horton.
1637
1638         Move the function webCoreStringVectorFromNSStringArray from WebKit to
1639         WebCore so it can be used by both WebKit and WebKitLegacy.
1640
1641         * platform/mac/StringUtilities.h:
1642         * platform/mac/StringUtilities.mm:
1643         (WebCore::webCoreStringVectorFromNSStringArray):
1644
1645 2019-02-04  Justin Fan  <justin_fan@apple.com>
1646
1647         [Web GPU] Code clean-up for RenderPipeline backend
1648         https://bugs.webkit.org/show_bug.cgi?id=194238
1649
1650         Reviewed by Dean Jackson.
1651
1652         Replace dot syntax setters with calls to setter methods, and remove unnecessary setter calls for 
1653         the input state's descriptor arrays.
1654
1655         Covered by existing tests; no change in behavior.
1656
1657         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
1658         (WebCore::tryCreateMtlDepthStencilState): Refactor to use implicit setters rather than dot syntax.
1659         (WebCore::setInputStateForPipelineDescriptor): Ditto, and remove unnecessary setter calls on array objects.
1660
1661 2019-02-04  Benjamin Poulain  <benjamin@webkit.org>
1662
1663         Use deferrable timer to restart the Responsiveness Timer on each wheel event
1664         https://bugs.webkit.org/show_bug.cgi?id=194135
1665         <rdar://problem/47724099>
1666
1667         Reviewed by Simon Fraser.
1668
1669         The original DeferrableOneShotTimer was not really deferrable.
1670         What it allows is to restart the count down from scratch after
1671         firing.
1672
1673         For this optimization, I want to keep the correct timing but avoid
1674         starting a real timer every time.
1675
1676         I renamed DeferrableOneShotTimer to ResettableOneShotTimer and
1677         created a real DeferrableOneShotTimer that support deadlines.
1678
1679         * css/CSSImageGeneratorValue.cpp:
1680         * html/HTMLPlugInImageElement.h:
1681         * loader/cache/CachedResource.h:
1682         * platform/Timer.cpp:
1683         (WebCore::DeferrableOneShotTimer::startOneShot):
1684         (WebCore::DeferrableOneShotTimer::fired):
1685         * platform/Timer.h:
1686         (WebCore::TimerBase::nextFireTime const):
1687         (WebCore::ResettableOneShotTimer::ResettableOneShotTimer):
1688         (WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer):
1689         (WebCore::DeferrableOneShotTimer::stop):
1690         (WebCore::DeferrableOneShotTimer::restart): Deleted.
1691         * platform/graphics/ca/TileController.h:
1692         * platform/graphics/cg/SubimageCacheWithTimer.h:
1693
1694 2019-02-04  Antoine Quint  <graouts@apple.com>
1695
1696         Use constants for pointer types
1697         https://bugs.webkit.org/show_bug.cgi?id=194232
1698
1699         Reviewed by Dean Jackson.
1700
1701         We cannot use an enum for the pointer type since a custom pointer type can be created by developers when creating a
1702         pointer event using JavaScript, but we can at least used string constants for the ones created internally.
1703
1704         * dom/PointerEvent.cpp:
1705         (WebCore::PointerEvent::mousePointerType):
1706         (WebCore::PointerEvent::penPointerType):
1707         (WebCore::PointerEvent::touchPointerType):
1708         * dom/PointerEvent.h:
1709         * dom/ios/PointerEventIOS.cpp:
1710
1711 2019-02-04  Zalan Bujtas  <zalan@apple.com>
1712
1713         [First paint] Adjust "finishedParsingMainDocument" flag by taking deferred and async scripts into account.
1714         https://bugs.webkit.org/show_bug.cgi?id=194168
1715
1716         Reviewed by Simon Fraser.
1717
1718         First paint should not be blocked by async or deferred scripts.
1719
1720         * page/FrameView.cpp:
1721         (WebCore::FrameView::qualifiesAsVisuallyNonEmpty const):
1722
1723 2019-02-04  Simon Fraser  <simon.fraser@apple.com>
1724
1725         Async overflow scroll with border-radius renders incorrectly
1726         https://bugs.webkit.org/show_bug.cgi?id=194205
1727         <rdar://problem/47771668>
1728
1729         Reviewed by Zalan Bujtas.
1730
1731         When an element has composited overflow:scroll and border-radius, we need to make a layer
1732         to clip to the inside of the border radius if necessary.
1733
1734         Existing code simply turned off needsDescendantsClippingLayer for composited scrolling
1735         layers, but now we check to see if the inner border is rounded. If we have both a m_childContainmentLayer
1736         and scrolling layers, we need to adjust the location of the scrolling layers (which are parented
1737         in m_childContainmentLayer).
1738
1739         Also fix offsetFromRenderer for these layers; it's positive for layers inset from the top left
1740         of the border box.
1741
1742         Tests: compositing/clipping/border-radius-async-overflow-clipping-layer.html
1743                compositing/clipping/border-radius-async-overflow-non-stacking.html
1744                compositing/clipping/border-radius-async-overflow-stacking.html
1745
1746         * rendering/RenderLayerBacking.cpp:
1747         (WebCore::RenderLayerBacking::updateConfiguration):
1748         (WebCore::RenderLayerBacking::updateGeometry):
1749         (WebCore::RenderLayerBacking::updateChildClippingStrategy): Layout is always up-to-date now, so remove the comment.
1750
1751 2019-02-04  Simon Fraser  <simon.fraser@apple.com>
1752
1753         PageOverlayController's layers should be created lazily
1754         https://bugs.webkit.org/show_bug.cgi?id=194199
1755
1756         Reviewed by Tim Horton.
1757
1758         Expose PageOverlayController::hasDocumentOverlays() and hasViewOverlays()
1759         and use them to only parent the overlay-hosting layers when necessary.
1760
1761         For document overlays, RenderLayerCompositor::appendDocumentOverlayLayers() can
1762         simply do nothing if there are none. Updates are triggered via Page::installedPageOverlaysChanged(),
1763         which calls FrameView::setNeedsCompositingConfigurationUpdate() to trigger the root layer
1764         compositing updates that parents the layerWithDocumentOverlays().
1765
1766         View overlays are added to the layer tree via the DrawingArea. When we go between having
1767         none and some view overlays, Page::installedPageOverlaysChanged() calls attachViewOverlayGraphicsLayer()
1768         on the ChromeClient, and the DrawingArea responds by calling updateRootLayers() and scheduling a
1769         compositing flush (this has to be done manually because view overlay layers are outside the
1770         subtree managed by RenderLayerCompositor).
1771         
1772         Now that GraphicsLayers are ref-counted, we can let the DrawingArea simply retain its m_viewOverlayRootLayer;
1773         there is no need for RenderLayerCompositor::attachRootLayer()/detachRootLayer() to do anything with view
1774         overlay layers. This implies that a page can navigate (new FrameView) and view overlays will persist, without
1775         having to be manually removed and re-added. We can also remove the Frame argument to attachViewOverlayGraphicsLayer().
1776
1777         * loader/EmptyClients.h:
1778         * page/ChromeClient.h:
1779         * page/FrameView.cpp:
1780         (WebCore::FrameView::setNeedsCompositingConfigurationUpdate): These functions need to schedule a compositing flush
1781         because there may be nothing else that does.
1782         (WebCore::FrameView::setNeedsCompositingGeometryUpdate):
1783         * page/Page.cpp:
1784         (WebCore::Page::installedPageOverlaysChanged):
1785         * page/Page.h:
1786         * page/PageOverlayController.cpp:
1787         (WebCore::PageOverlayController::hasDocumentOverlays const):
1788         (WebCore::PageOverlayController::hasViewOverlays const):
1789         (WebCore::PageOverlayController::attachViewOverlayLayers): PageOverlayController has the Page so it
1790         might as well be the one to call through the ChromeClient.
1791         (WebCore::PageOverlayController::detachViewOverlayLayers):
1792         (WebCore::PageOverlayController::installPageOverlay):
1793         (WebCore::PageOverlayController::uninstallPageOverlay):
1794         * page/PageOverlayController.h:
1795         * rendering/RenderLayerCompositor.cpp:
1796         (WebCore::RenderLayerCompositor::updateCompositingLayers): isFullUpdate is always true; remove it.
1797         (WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
1798         (WebCore::RenderLayerCompositor::attachRootLayer):
1799         (WebCore::RenderLayerCompositor::detachRootLayer):
1800
1801 2019-02-04  Eric Liang  <ericliang@apple.com>
1802
1803         When performing Increment or Decrement on sliders, check to see if the slider is disabled.
1804         https://bugs.webkit.org/show_bug.cgi?id=173497
1805
1806         Reviewed by Chris Fleizach.
1807
1808         Test: accessibility/set-value-not-work-for-disabled-sliders.html
1809
1810         * accessibility/AccessibilityNodeObject.cpp:
1811         (WebCore::AccessibilityNodeObject::alterSliderValue):
1812
1813 2019-02-04  Sihui Liu  <sihui_liu@apple.com>
1814
1815         IndexedDB: leak WebIDBConnectionToServer in layout tests
1816         https://bugs.webkit.org/show_bug.cgi?id=193688
1817         <rdar://problem/47353263>
1818
1819         Reviewed by Geoffrey Garen.
1820
1821         Let IDBConnectionToServer keep a WeakPtr of IDBConnectionToServerDelegate.
1822
1823         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
1824         (WebCore::IDBClient::IDBConnectionToServer::IDBConnectionToServer):
1825         * Modules/indexeddb/client/IDBConnectionToServer.h:
1826         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
1827
1828 2019-02-04  Youenn Fablet  <youenn@apple.com>
1829
1830         Make sure to remove the device observer in AVVideoCaptureSource
1831         https://bugs.webkit.org/show_bug.cgi?id=194181
1832         <rdar://problem/47739247>
1833
1834         Reviewed by Eric Carlson.
1835
1836         Make sure to remove the device observer when the observer is destroyed.
1837         To simplify things, add the observer in AVVideoCaptureSource constructor and remove it in the destructor.
1838
1839         Make also sure the session observer is also removed whenever the session is released by AVVideoCaptureSource.
1840
1841         Covered by manual test.
1842
1843        * platform/mediastream/mac/AVVideoCaptureSource.h:
1844         * platform/mediastream/mac/AVVideoCaptureSource.mm:
1845         (WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
1846         (WebCore::AVVideoCaptureSource::~AVVideoCaptureSource):
1847         (WebCore::AVVideoCaptureSource::initializeSession):
1848         (WebCore::AVVideoCaptureSource::clearSession):
1849         (WebCore::AVVideoCaptureSource::stopProducingData):
1850         (WebCore::AVVideoCaptureSource::setupSession):
1851
1852 2019-02-04  Antoine Quint  <graouts@apple.com>
1853
1854         Use a dedicated type instead of int32_t for pointer identifiers
1855         https://bugs.webkit.org/show_bug.cgi?id=194217
1856
1857         Reviewed by Antti Koivisto.
1858
1859         * WebCore.xcodeproj/project.pbxproj:
1860         * dom/PointerEvent.h:
1861         * dom/PointerID.h: Added.
1862         * page/PointerCaptureController.cpp:
1863         (WebCore::PointerCaptureController::setPointerCapture):
1864         (WebCore::PointerCaptureController::releasePointerCapture):
1865         (WebCore::PointerCaptureController::hasPointerCapture):
1866         (WebCore::PointerCaptureController::touchEndedOrWasCancelledForIdentifier):
1867         (WebCore::PointerCaptureController::hasCancelledPointerEventForIdentifier):
1868         (WebCore::PointerCaptureController::cancelPointer):
1869         * page/PointerCaptureController.h:
1870
1871 2019-02-04  Wenson Hsieh  <wenson_hsieh@apple.com>
1872
1873         [iOS] Unable to make a selection in jsfiddle.net using arrow keys when requesting desktop site
1874         Followup to https://bugs.webkit.org/show_bug.cgi?id=193758
1875
1876         Reviewed by Daniel Bates.
1877
1878         Put the iOS-specific behavior behind an EditingBehavior check, rather than a compile-time guard. No change in
1879         behavior.
1880
1881         * editing/EditingBehavior.h:
1882         (WebCore::EditingBehavior::shouldMoveSelectionToEndWhenFocusingTextInput const):
1883         * html/HTMLInputElement.cpp:
1884         (WebCore::HTMLInputElement::setDefaultSelectionAfterFocus):
1885
1886 2019-02-04  Zalan Bujtas  <zalan@apple.com>
1887
1888         [LFC][IFC] Make InlineFormattingContext::collectInlineContent non-recursive.
1889         https://bugs.webkit.org/show_bug.cgi?id=194210
1890
1891         Reviewed by Antti Koivisto.
1892
1893         Use iterative algorithm to collect inline content (and add breaking rules).
1894         This is in preparation for fixing the inline preferred width computation.  
1895
1896         * layout/Verification.cpp:
1897         (WebCore::Layout::resolveForRelativePositionIfNeeded):
1898         * layout/inlineformatting/InlineFormattingContext.cpp:
1899         (WebCore::Layout::addDetachingRules):
1900         (WebCore::Layout::createAndAppendInlineItem):
1901         (WebCore::Layout::InlineFormattingContext::collectInlineContent const):
1902         (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const): Deleted.
1903         * layout/inlineformatting/InlineFormattingContext.h:
1904
1905 2019-02-04  Michael Catanzaro  <mcatanzaro@igalia.com>
1906
1907         Unreviewed, fix unused variable warnings introduced in r240912
1908         https://bugs.webkit.org/show_bug.cgi?id=194198
1909         <rdar://problem/47776051>
1910
1911         * page/FrameView.cpp:
1912         (WebCore::FrameView::setNeedsCompositingConfigurationUpdate):
1913         (WebCore::FrameView::setNeedsCompositingGeometryUpdate):
1914
1915 2019-02-04  Frederic Wang  <fwang@igalia.com>
1916
1917         [css-scroll-snap] scroll-snap-align not honored on child with non-visible overflow
1918         https://bugs.webkit.org/show_bug.cgi?id=191816
1919
1920         Reviewed by Wenson Hsieh.
1921
1922         This patch fixes a bug that prevents children of a scroll container to create snap positions
1923         when they have non-visible overflow. This happens because for such a child, the function
1924         RenderBox::findEnclosingScrollableContainer() will return the child itself rather than the
1925         scroll container. To address that issue, we introduce a new
1926         RenderObject::enclosingScrollableContainerForSnapping() helper function that ensures that
1927         a real RenderBox ancestor is returned.
1928
1929         Test: css3/scroll-snap/scroll-snap-children-with-overflow.html
1930
1931         * page/scrolling/AxisScrollSnapOffsets.cpp:
1932         (WebCore::updateSnapOffsetsForScrollableArea): Use enclosingScrollableContainerForSnapping()
1933         so that we don't skip children with non-visible overflow.
1934         * rendering/RenderLayerModelObject.cpp:
1935         (WebCore::RenderLayerModelObject::styleDidChange): Ditto. The new function calls
1936         enclosingBox().
1937         * rendering/RenderObject.cpp:
1938         (WebCore::RenderObject::enclosingScrollableContainerForSnapping const): Return
1939         the scrollable container of the enclosing box. If it is actually the render object itself
1940         then start the search from the parent box instead.
1941         * rendering/RenderObject.h: Declare enclosingScrollableContainerForSnapping(). 
1942
1943 2019-02-04  Antti Koivisto  <antti@apple.com>
1944
1945         Rename GraphicsLayer and PlatformCALayer scrolling layer type enum values to be less ambiguous
1946         https://bugs.webkit.org/show_bug.cgi?id=194215
1947
1948         Reviewed by Frédéric Wang.
1949
1950         GraphicsLayer::Type::Scrolling -> GraphicsLayer::Type::ScrollContainer
1951         PlatformCALayer::LayerTypeScrollingLayer -> PlatformCALayer::LayerTypeScrollContainerLayer
1952
1953         * platform/graphics/GraphicsLayer.cpp:
1954         (WebCore::GraphicsLayer::supportsLayerType):
1955         * platform/graphics/GraphicsLayer.h:
1956         * platform/graphics/ca/GraphicsLayerCA.cpp:
1957         (WebCore::GraphicsLayer::supportsLayerType):
1958         (WebCore::GraphicsLayerCA::initialize):
1959         * platform/graphics/ca/PlatformCALayer.cpp:
1960         (WebCore::operator<<):
1961         * platform/graphics/ca/PlatformCALayer.h:
1962         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
1963         (WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
1964         (WebCore::PlatformCALayerCocoa::commonInit):
1965         * rendering/RenderLayerBacking.cpp:
1966         (WebCore::RenderLayerBacking::updateScrollingLayers):
1967         * rendering/RenderLayerCompositor.cpp:
1968         (WebCore::RenderLayerCompositor::ensureRootLayer):
1969
1970 2019-02-03  Antti Koivisto  <antti@apple.com>
1971
1972         [iOS] Tiles not created in large scrollable iframes
1973         https://bugs.webkit.org/show_bug.cgi?id=193665
1974
1975         Reviewed by Simon Fraser.
1976
1977         We are not syncing scroll position back to the graphics layer tree correctly.
1978
1979         Test by Frédéric Wang.
1980
1981         * page/scrolling/AsyncScrollingCoordinator.cpp:
1982         (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
1983         (WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
1984         (WebCore::AsyncScrollingCoordinator::reconcileScrollPosition):
1985
1986         Factor setting and syncing scrolling layer positions into a function.
1987         Use bounds.origin scrolling mechanic when scrollContainerLayer is present.
1988
1989         (WebCore::AsyncScrollingCoordinator::scrollableAreaScrollbarLayerDidChange):
1990         (WebCore::AsyncScrollingCoordinator::setSynchronousScrollingReasons):
1991         (WebCore::AsyncScrollingCoordinator::updateScrollLayerPosition): Deleted.
1992         * page/scrolling/AsyncScrollingCoordinator.h:
1993         * page/scrolling/ScrollingCoordinator.cpp:
1994         (WebCore::ScrollingCoordinator::scrollContainerLayerForFrameView):
1995         (WebCore::ScrollingCoordinator::scrolledContentsLayerForFrameView):
1996         (WebCore::ScrollingCoordinator::scrollLayerForFrameView): Deleted.
1997         * page/scrolling/ScrollingCoordinator.h:
1998         * rendering/RenderLayerCompositor.cpp:
1999
2000         Rename scrollLayer to scrolledContentsLayer according to out preferred naming scheme and use it in that role only.
2001         Add scrollContainerLayer as a separate layer. It is only constructed when using async scrolling on iOS.
2002
2003         (WebCore::RenderLayerCompositor::~RenderLayerCompositor):
2004         (WebCore::RenderLayerCompositor::customPositionForVisibleRectComputation const):
2005         (WebCore::RenderLayerCompositor::visibleRectForLayerFlushing const):
2006         (WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer):
2007         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
2008         (WebCore::RenderLayerCompositor::updateScrollLayerPosition):
2009         (WebCore::RenderLayerCompositor::frameViewDidScroll):
2010         (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
2011         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
2012         (WebCore::RenderLayerCompositor::updateLayerForHeader):
2013         (WebCore::RenderLayerCompositor::updateLayerForFooter):
2014         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
2015         (WebCore::RenderLayerCompositor::ensureRootLayer):
2016         (WebCore::RenderLayerCompositor::destroyRootLayer):
2017         (WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingRole):
2018         * rendering/RenderLayerCompositor.h:
2019
2020 2019-02-03  Simon Fraser  <simon.fraser@apple.com>
2021
2022         Make setNeedsLayout on the root more explicitly about triggering its side-effects
2023         https://bugs.webkit.org/show_bug.cgi?id=194198
2024
2025         Reviewed by Antti Koivisto.
2026
2027         Calling setNeedsLayout() on the FrameView or RenderView is an odd concept; the render tree
2028         generally manages its own dirty state.
2029
2030         Most callers of setNeedsLayout() on the root are really trying to trigger the side-effects
2031         of layout, like compositing updates, which are required when view configuration state, like
2032         headers, footers and transparency, change. These dependencies are currently implicit and
2033         poorly defined.
2034
2035         Renaming "setNeedsLayout" on FrameView is a step towards being more explicit about pure
2036         rendering updates, vs updates of downstream data strutures like compositing. It's now called
2037         setNeedsLayoutAfterViewConfigurationChange(). In addition, expose
2038         setNeedsCompositingConfigurationUpdate() and setNeedsCompositingGeometryUpdate() so callers
2039         can trigger the appropriate types of compositing updates on the root layer.
2040
2041         In addition, FrameViewLayoutContext::setNeedsLayoutAfterViewConfigurationChange() schedules a
2042         layout. Withtout this, some callers would dirty the RenderView's layout but rely on some
2043         other trigger to make the layout happen.
2044
2045         This cleanup was prompted by noticing that FrameView::setHeaderHeight() dirtied layout
2046         but never scheduled it, making banner insertion in MiniBrowser unreliable.
2047
2048         This patch also removes the aliasing of headerHeight/footerHeight between Page and
2049         FrameView. Banners are a property of Page, so FrameView fetches the banner heights
2050         from Page.
2051
2052         * page/FrameView.cpp:
2053         (WebCore::FrameView::headerHeight const):
2054         (WebCore::FrameView::footerHeight const):
2055         (WebCore::FrameView::availableContentSizeChanged):
2056         (WebCore::FrameView::setNeedsLayoutAfterViewConfigurationChange):
2057         (WebCore::FrameView::setNeedsCompositingConfigurationUpdate):
2058         (WebCore::FrameView::setNeedsCompositingGeometryUpdate):
2059         (WebCore::FrameView::scheduleSelectionUpdate):
2060         (WebCore::FrameView::setTransparent):
2061         (WebCore::FrameView::setBaseBackgroundColor):
2062         (WebCore::FrameView::setAutoSizeFixedMinimumHeight):
2063         (WebCore::FrameView::enableAutoSizeMode):
2064         (WebCore::FrameView::setHeaderHeight): Deleted.
2065         (WebCore::FrameView::setFooterHeight): Deleted.
2066         (WebCore::FrameView::setNeedsLayout): Deleted.
2067         * page/FrameView.h:
2068         * page/FrameViewLayoutContext.cpp:
2069         (WebCore::FrameViewLayoutContext::setNeedsLayoutAfterViewConfigurationChange):
2070         (WebCore::FrameViewLayoutContext::setNeedsLayout): Deleted.
2071         * page/FrameViewLayoutContext.h:
2072         * page/Page.cpp:
2073         (WebCore::Page::setPageScaleFactor):
2074         (WebCore::Page::setHeaderHeight):
2075         (WebCore::Page::setFooterHeight):
2076         (WebCore::Page::addHeaderWithHeight): Deleted.
2077         (WebCore::Page::addFooterWithHeight): Deleted.
2078         * page/Page.h:
2079         * rendering/RenderLayerCompositor.cpp:
2080         (WebCore::RenderLayerCompositor::updateBacking):
2081         * testing/Internals.cpp:
2082         (WebCore::Internals::resetToConsistentState):
2083         (WebCore::Internals::setHeaderHeight):
2084         (WebCore::Internals::setFooterHeight):
2085
2086 2019-02-03  John Wilander  <wilander@apple.com>
2087
2088         Parse and handle Ad Click Attribution attributes in HTMLAnchorElement::handleClick()
2089         https://bugs.webkit.org/show_bug.cgi?id=194104
2090         <rdar://problem/47649991>
2091
2092         Reviewed by Chris Dumez, Daniel Bates, and Darin Adler.
2093
2094         Test: http/tests/adClickAttribution/anchor-tag-attributes-validation.html
2095
2096         This patch adds parsing and validation of the two new Ad Click Attribution
2097         attributes in anchor elements: adcampaignid and addestination. The data is
2098         not yet forwarded into the loader.
2099
2100         * html/HTMLAnchorElement.cpp:
2101         (WebCore::HTMLAnchorElement::parseAdClickAttribution const):
2102         (WebCore::HTMLAnchorElement::handleClick):
2103             Now calls HTMLAnchorElement::parseAdClickAttribution().
2104         * html/HTMLAnchorElement.h:
2105         * loader/AdClickAttribution.h:
2106             Made WebCore::AdClickAttribution copyable since it's needed to have it be
2107             WTF::Optional. Also made AdClickAttribution::MaxEntropy public. Changed
2108             numeric types from unsigned short to uint32_t.
2109         (WebCore::AdClickAttribution::Campaign::isValid const):
2110         (WebCore::AdClickAttribution::Conversion::isValid const):
2111
2112 2019-02-03  Ryosuke Niwa  <rniwa@webkit.org>
2113
2114         Validate navigation policy decisions to avoid crashes in continueLoadAfterNavigationPolicy
2115         https://bugs.webkit.org/show_bug.cgi?id=194189
2116
2117         Reviewed by Geoffrey Garen.
2118
2119         Introduced PolicyCheckIdentifier to pair each navigation policy check request with a decision,
2120         and deployed it in PolicyChecker. The identifier is passed from WebContent process to UI process
2121         in WebKit2, and passed it back with the policy decision.
2122
2123         Because PolicyCheckIdentifier embeds the process identifier from which a navigation policy is checked,
2124         we would be able to detect when UI process had sent the decision to a wrong WebContent process.
2125
2126         This patch also adds release assertions to make sure history().provisionalItem() is set whenever
2127         we're requesting a navigation policy check.
2128
2129         These code changes should either:
2130         1. Fix crashes in FrameLoader::continueLoadAfterNavigationPolicy where isBackForwardLoadType would
2131            return true yet history().provisionalItem() is null.
2132         2. Detect a bug that UI process can send a navigation policy decision to a wrong WebContent process.
2133         3. Rule out the possibility that (2) exists.
2134
2135         * loader/DocumentLoader.cpp:
2136         (WebCore::DocumentLoader::willSendRequest):
2137         (WebCore::DocumentLoader::responseReceived):
2138         * loader/EmptyClients.cpp:
2139         (WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
2140         (WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2141         * loader/EmptyFrameLoaderClient.h:
2142         * loader/FrameLoader.cpp:
2143         (WebCore::FrameLoader::checkContentPolicy):
2144         (WebCore::FrameLoader::loadURL):
2145         (WebCore::FrameLoader::load):
2146         (WebCore::FrameLoader::loadWithDocumentLoader):
2147         (WebCore::FrameLoader::loadPostRequest):
2148         * loader/FrameLoader.h:
2149         * loader/FrameLoaderClient.h:
2150         * loader/FrameLoaderTypes.h:
2151         (WebCore::PolicyCheckIdentifier): Added.
2152         (WebCore::PolicyCheckIdentifier::operator== const): Added.
2153         (WebCore::PolicyCheckIdentifier::PolicyCheckIdentifier): Added.
2154         (WebCore::PolicyCheckIdentifier::encode const): Added.
2155         (WebCore::PolicyCheckIdentifier::decode): Added.
2156         * loader/PolicyChecker.cpp:
2157         (WebCore::PolicyCheckIdentifier::generate):
2158         (WebCore::PolicyCheckIdentifier::isValidFor): Returns true if the identifer matches. Also release asserts
2159         that the process ID is same, and that m_check is always not zero (meaning it's a generated value).
2160         The failure of these release assertions would indicate that there is a bug in UI process, which results in
2161         a policy decision response being sent to a wrong Web process.
2162         (WebCore::PolicyChecker::checkNavigationPolicy): Exit early if isValidFor fails.
2163         (WebCore::PolicyChecker::checkNewWindowPolicy):
2164
2165 2019-02-03  Antti Koivisto  <antti@apple.com>
2166
2167         Don't include ScrollCoordinator.h from Element.h
2168         https://bugs.webkit.org/show_bug.cgi?id=194206
2169
2170         Reviewed by Daniel Bates.
2171
2172         * dom/Element.h:
2173
2174 2019-02-03  Wenson Hsieh  <wenson_hsieh@apple.com>
2175
2176         Unable to move selection into editable roots with 0 height
2177         https://bugs.webkit.org/show_bug.cgi?id=194143
2178         <rdar://problem/47767284>
2179
2180         Reviewed by Ryosuke Niwa.
2181
2182         Currently, positions inside editable elements of height 0 are not considered to be candidates when
2183         canonicalizing a position to its visible counterpart. This prevents us from moving the selection into these
2184         editable roots at all. To fix this, we relax this constraint by allowing positions anchored by root editable
2185         elements to be candidates.
2186
2187         Test: editing/selection/insert-text-in-empty-content-editable.html
2188
2189         * dom/Position.cpp:
2190         (WebCore::Position::isCandidate const):
2191
2192 2019-02-03  Simon Fraser  <simon.fraser@apple.com>
2193
2194         Tidyup of Pagination and FrameView m_mediaType initialization
2195         https://bugs.webkit.org/show_bug.cgi?id=194203
2196
2197         Reviewed by Darin Adler.
2198
2199         Fix post-commit feedback on lines around code changed in r240901.
2200
2201         * page/FrameView.cpp:
2202         (WebCore::FrameView::FrameView):
2203         * page/FrameView.h:
2204         * rendering/Pagination.h:
2205         (WebCore::Pagination::operator!= const):
2206
2207 2019-02-03  Megan Gardner  <megan_gardner@apple.com>
2208
2209         Turn on Smart Paste
2210         https://bugs.webkit.org/show_bug.cgi?id=193786
2211
2212         Reviewed by Ryosuke Niwa.
2213
2214         Turned on a modified tests:
2215         LayoutTests/editing/pasteboard/smart-paste-001.html
2216         LayoutTests/editing/pasteboard/smart-paste-002.html
2217         LayoutTests/editing/pasteboard/smart-paste-003.html
2218         LayoutTests/editing/pasteboard/smart-paste-004.html
2219         LayoutTests/editing/pasteboard/smart-paste-005.html
2220         LayoutTests/editing/pasteboard/smart-paste-006.html
2221         LayoutTests/editing/pasteboard/smart-paste-007.html
2222         LayoutTests/editing/pasteboard/smart-paste-008.html
2223
2224         * platform/ios/PasteboardIOS.mm:
2225         (WebCore::Pasteboard::canSmartReplace):
2226         Turn on smart replace.
2227
2228 2019-02-02  Simon Fraser  <simon.fraser@apple.com>
2229
2230         Tidy up data memebers of FrameView and related classes to shrink class sizes
2231         https://bugs.webkit.org/show_bug.cgi?id=194197
2232
2233         Reviewed by Zalan Bujtas.
2234
2235         Make various enums 8-bit. Re-order data members of FrameView, FrameViewLayoutContext, Widget
2236         and ScrollView to optimize padding.
2237
2238         Use more data member initializers.
2239
2240         This shrinks FrameView from 1168 (144 padding bytes) to 1096 (96 padding bytes).
2241
2242         * dom/Element.h:
2243         * page/FrameView.cpp:
2244         (WebCore::FrameView::FrameView):
2245         * page/FrameView.h:
2246         * page/FrameViewLayoutContext.h:
2247         * platform/ScrollTypes.h:
2248         * platform/ScrollView.h: Data members should come after member functions.
2249         * platform/Widget.h:
2250         * rendering/Pagination.h:
2251         (WebCore::Pagination::Pagination): Deleted.
2252
2253 2019-02-02  Simon Fraser  <simon.fraser@apple.com>
2254
2255         Rename "scrollingLayer" in RenderLayerBacking to "scrollContainerLayer" for clarity
2256         https://bugs.webkit.org/show_bug.cgi?id=194194
2257
2258         Rubber-stampted by Antti Koivisto.
2259
2260         Our desired terminology is "scrollContainerLayer" for the outer, clipping layer
2261         for scrolling, and "scrolledContentsLayer" for the contents that move when you scroll.
2262
2263         * rendering/RenderLayerBacking.cpp:
2264         (WebCore::RenderLayerBacking::updateDebugIndicators):
2265         (WebCore::RenderLayerBacking::destroyGraphicsLayers):
2266         (WebCore::RenderLayerBacking::updateGeometry):
2267         (WebCore::RenderLayerBacking::setLocationOfScrolledContents):
2268         (WebCore::RenderLayerBacking::updateAfterDescendants):
2269         (WebCore::RenderLayerBacking::updateInternalHierarchy):
2270         (WebCore::RenderLayerBacking::updateDrawsContent):
2271         (WebCore::RenderLayerBacking::updateScrollingLayers):
2272         * rendering/RenderLayerBacking.h:
2273         * rendering/RenderLayerCompositor.cpp:
2274         (WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer):
2275         (WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingRole):
2276         (WebCore::LegacyWebKitScrollingLayerCoordinator::registerAllViewportConstrainedLayers):
2277         (WebCore::LegacyWebKitScrollingLayerCoordinator::updateScrollingLayer):
2278         (WebCore::LegacyWebKitScrollingLayerCoordinator::unregisterAllScrollingLayers):
2279         (WebCore::LegacyWebKitScrollingLayerCoordinator::removeScrollingLayer):
2280
2281 2019-02-02  Justin Fan  <justin_fan@apple.com>
2282
2283         [Web GPU] Fix GPURenderPassEncoder::setVertexBuffers and allow overlapping indices with GPUBindGroups
2284         https://bugs.webkit.org/show_bug.cgi?id=194125
2285
2286         Reviewed by Myles C. Maxfield.
2287
2288         GPURenderPassEncoder::setVertexBuffers is now actually written to set all buffers provided. In addition,
2289         shift vertex input buffer indices so that any resource bindings can bind vertex buffer resources to the same indices. 
2290
2291         Existing tests cover setVertexBuffers. Updated buffer-resource-triangles to assign bind groups and vertex buffers to the same index.
2292
2293         * Modules/webgpu/WHLSL/Metal/WHLSLVertexBufferIndexCalculator.cpp: Added.
2294         (WebCore::WHLSL::Metal::calculateVertexBufferIndex): Simple shifting function for vertex input buffer indices.
2295         * Modules/webgpu/WHLSL/Metal/WHLSLVertexBufferIndexCalculator.h: Added.
2296         * Modules/webgpu/WebGPUProgrammablePassEncoder.cpp:
2297         (WebCore::WebGPUProgrammablePassEncoder::setBindGroup const): Limit maximum bind group indices to 0 to 3.
2298         * Modules/webgpu/WebGPURenderPassEncoder.cpp: 
2299         (WebCore::WebGPURenderPassEncoder::setVertexBuffers): Limit vertex input indices to 0 to 15.
2300         * Modules/webgpu/WebGPURenderPassEncoder.h: Move IDL/bindings bug note to IDL file.
2301         * Modules/webgpu/WebGPURenderPassEncoder.idl: Ditto.
2302         * platform/graphics/gpu/GPULimits.h: Added. Home for Web GPU limits constants shared between files.
2303         * platform/graphics/gpu/GPURenderPassEncoder.h: Change IDL/bindings bug workaround to unsigned long long to prevent narrowing compared to spec.
2304         * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
2305         (WebCore::GPURenderPassEncoder::setVertexBuffers): Now properly calls Metal's setVertexBuffers. 
2306         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
2307         (WebCore::setInputStateForPipelineDescriptor): Fix validation checks for vertex attribute numbers and vertex buffer indices. 
2308
2309         Add symbols to project:
2310         * Sources.txt:
2311         * WebCore.xcodeproj/project.pbxproj:
2312
2313 2019-02-01  Simon Fraser  <simon.fraser@apple.com>
2314
2315         Async overflow scroll is jumpy on macOS if the main thread is busy
2316         https://bugs.webkit.org/show_bug.cgi?id=194184
2317         <rdar://problem/47758655>
2318
2319         Reviewed by Antti Koivisto.
2320
2321         This change extends to macOS some existing overflow-scroll functionality for iOS.
2322         When an async scroll is in process in the scroll thread (or UI process), we periodically
2323         message back to the web process main thread with scroll position updates. These
2324         can trigger post-scroll compositing updates, but we need to ensure that this update
2325         doesn't clobber the scroll position of the native layers, which would trigger
2326         stutters.
2327
2328         To do this we have the notion of a scroll position "sync" (ScrollingLayerPositionAction::Sync) which
2329         pokes the new value into the GraphicsLayer (hence making visible rect computations work), but doesn't
2330         propagate it to the platform layer. This patch wires up syncs for macOS during async overflow scrolling,
2331         coming out of AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll().
2332
2333         In RenderLayerBacking, m_scrollingContentsLayer is renamed to m_scrolledContentsLayer, and I added
2334         updateScrollOffset() and setLocationOfScrolledContents() to handle the set vs. sync, and to keep
2335         the iOS vs macOS differences in one function. This allows for more code sharing in RenderLayerBacking::updateGeometry().
2336
2337         There's a confusing bit in the m_childClippingMaskLayer code (trac.webkit.org/178029) where the setOffsetFromRenderer()
2338         just looks wrong; it should match m_scrollingLayer. This code is never hit for Cocoa, which never has m_childClippingMaskLayer.
2339
2340         * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
2341         (WebCore::ScrollingTreeOverflowScrollingNodeMac::setScrollPosition): Logging
2342         (WebCore::ScrollingTreeOverflowScrollingNodeMac::setScrollLayerPosition): Logging
2343         * rendering/RenderLayer.cpp:
2344         (WebCore::RenderLayer::RenderLayer):
2345         (WebCore::RenderLayer::scrollTo):
2346         * rendering/RenderLayer.h: Rename m_requiresScrollBoundsOriginUpdate to m_requiresScrollPositionReconciliation
2347         and make it available on all platforms. Just reorder m_adjustForIOSCaretWhenScrolling to reduce #ifdef nesting confusion.
2348         * rendering/RenderLayerBacking.cpp:
2349         (WebCore::RenderLayerBacking::updateDebugIndicators):
2350         (WebCore::RenderLayerBacking::destroyGraphicsLayers):
2351         (WebCore::RenderLayerBacking::updateGeometry):
2352         (WebCore::RenderLayerBacking::setLocationOfScrolledContents):
2353         (WebCore::RenderLayerBacking::updateScrollOffset):
2354         (WebCore::RenderLayerBacking::updateDrawsContent):
2355         (WebCore::RenderLayerBacking::updateScrollingLayers):
2356         (WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer const):
2357         (WebCore::RenderLayerBacking::parentForSublayers const):
2358         (WebCore::RenderLayerBacking::setContentsNeedDisplay):
2359         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
2360         (WebCore::RenderLayerBacking::paintContents):
2361         (WebCore::RenderLayerBacking::backingStoreMemoryEstimate const):
2362         * rendering/RenderLayerBacking.h:
2363
2364 2019-02-02  Zalan Bujtas  <zalan@apple.com>
2365
2366         [LFC] Initialize ICB's style with fixed width/height.
2367         https://bugs.webkit.org/show_bug.cgi?id=194188
2368
2369         Reviewed by Antti Koivisto.
2370
2371         Let's set ICB's logical width/height to Fixed so that it's available when we try to resolve a box's height
2372         in FormattingContext::Geometry::computedHeightValue() by using the containing block's height (ICB in this case).
2373
2374         * layout/LayoutState.cpp:
2375         (WebCore::Layout::LayoutState::LayoutState):
2376         * layout/LayoutState.h:
2377         * layout/layouttree/LayoutTreeBuilder.cpp:
2378         (WebCore::Layout::TreeBuilder::createLayoutTree):
2379
2380 2019-02-02  Zalan Bujtas  <zalan@apple.com>
2381
2382         [LFC] Add missing case to out-of-flow non-replaced horizontal used margin value computation
2383         https://bugs.webkit.org/show_bug.cgi?id=194185
2384
2385         Reviewed by Antti Koivisto.
2386
2387         If none of horizontal values (left, right, width, margin-left/right) are auto, then usedHorizontalMarginValues = computedHorizontalMarginValues.
2388
2389         Test: fast/block/block-only/absolute-position-left-right-margin.html
2390
2391         * layout/FormattingContextGeometry.cpp:
2392         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
2393
2394 2018-12-16  Darin Adler  <darin@apple.com>
2395
2396         Convert additional String::format clients to alternative approaches
2397         https://bugs.webkit.org/show_bug.cgi?id=192746
2398
2399         Reviewed by Alexey Proskuryakov.
2400
2401         This round of conversions covers less-trivial cases such as floating
2402         point numerals and hexadecimal. Not yet taking on pointer serialization
2403         ("%p") or padding with spaces of zero digits, so call sites using those
2404         have been left untouched.
2405
2406         In some cases these new idioms are a bit clumsy, and we could follow up
2407         with additional convenience functions to make them more elegant.
2408
2409         * Modules/indexeddb/IDBKeyData.cpp:
2410         (WebCore::IDBKeyData::loggingString const): Use more ASCIILiteral and
2411         more appendLiteral for efficiency. Use upperNibbleToLowercaseASCIIHexDigit,
2412         lowerNibbleToLowercaseASCIIHexDigit, and also makeString and FormattedNumber.
2413
2414         * css/MediaQueryEvaluator.cpp:
2415         (WebCore::aspectRatioValueAsString): Use makeString and FormattedNumber.
2416         Doing it this way makes it a little clearer that we have an unpleasant
2417         use of fixed 6-digit precision here.
2418
2419         * html/FTPDirectoryDocument.cpp:
2420         (WebCore::processFilesizeString): Use makeString and FormattedNumber.
2421         * html/track/VTTCue.cpp:
2422         (WebCore::VTTCueBox::applyCSSProperties): Ditto.
2423         * page/CaptionUserPreferencesMediaAF.cpp:
2424         (WebCore::CaptionUserPreferencesMediaAF::windowRoundedCornerRadiusCSS const): Ditto.
2425         * page/History.cpp:
2426         (WebCore::History::stateObjectAdded): Ditto.
2427         * page/cocoa/ResourceUsageOverlayCocoa.mm:
2428         (WebCore::formatByteNumber): Ditto.
2429         (WebCore::gcTimerString): Use String::number.
2430         (WebCore::ResourceUsageOverlay::platformDraw): Use makeString and FormattedNumber.
2431
2432         * page/scrolling/AxisScrollSnapOffsets.cpp:
2433         (WebCore::snapOffsetsToString): Removed some unnecessary copying in the for loop,
2434         use appendLiteral, and use appendFixedWidthNumber.
2435         (WebCore::snapOffsetRangesToString): Ditto.
2436         (WebCore::snapPortOrAreaToString): Use makeString and FormattedNumber.
2437
2438         * platform/animation/TimingFunction.cpp:
2439         (WebCore::TimingFunction::cssText const): Use makeString.
2440
2441         * platform/cocoa/KeyEventCocoa.mm:
2442         (WebCore::keyIdentifierForCharCode): Use makeString and the ASCIIHexDigit
2443         functions.
2444         * platform/graphics/Color.cpp:
2445         (WebCore::Color::nameForRenderTreeAsText const): Ditto.
2446
2447         * platform/mock/MockRealtimeVideoSource.cpp:
2448         (WebCore::MockRealtimeVideoSource::drawText): Use makeString and FormattedNumber.
2449
2450         * platform/text/PlatformLocale.cpp:
2451         (WebCore::DateTimeStringBuilder::visitField): Use String::numberToStringFixedWidth.
2452
2453 2019-02-01  Simon Fraser  <simon.fraser@apple.com>
2454
2455         Remove the unused layerForScrolling()
2456         https://bugs.webkit.org/show_bug.cgi?id=194180
2457
2458         Reviewed by Zalan Bujtas.
2459
2460         Remove ScrollableArea::layerForScrolling() and derivations. This was unused.
2461
2462         * page/FrameView.cpp:
2463         (WebCore::FrameView::layerForScrolling const): Deleted.
2464         * page/FrameView.h:
2465         * page/scrolling/ScrollingCoordinator.cpp:
2466         (WebCore::ScrollingCoordinator::scrollLayerForScrollableArea): Deleted.
2467         * page/scrolling/ScrollingCoordinator.h:
2468         * platform/ScrollableArea.h:
2469         (WebCore::ScrollableArea::layerForScrolling const): Deleted.
2470         * rendering/RenderLayer.cpp:
2471         (WebCore::RenderLayer::calculateClipRects const):
2472         * rendering/RenderLayer.h:
2473
2474 2019-02-01  Zalan Bujtas  <zalan@apple.com>
2475
2476         [LFC] Fix statically positioned replaced out-of-flow horizontal geometry
2477         https://bugs.webkit.org/show_bug.cgi?id=194163
2478
2479         Reviewed by Simon Fraser.
2480
2481         Fix a typo.
2482
2483         * layout/FormattingContextGeometry.cpp:
2484         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
2485
2486 2019-02-01  Chris Dumez  <cdumez@apple.com>
2487
2488         REGRESSION: Flaky ASSERTION FAILED: m_uncommittedState.state == State::Committed on http/tests/cookies/same-site/fetch-after-top-level-navigation-initiated-from-iframe-in-cross-origin-page.html
2489         https://bugs.webkit.org/show_bug.cgi?id=193740
2490         <rdar://problem/47527267>
2491
2492         Reviewed by Alex Christensen.
2493
2494         * loader/DocumentLoader.cpp:
2495         (WebCore::DocumentLoader::willSendRequest):
2496         (WebCore::DocumentLoader::continueAfterContentPolicy):
2497         * loader/FrameLoader.cpp:
2498         (WebCore::FrameLoader::loadURL):
2499         (WebCore::FrameLoader::loadWithDocumentLoader):
2500         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
2501         * loader/FrameLoader.h:
2502         * loader/FrameLoaderTypes.h:
2503         * loader/PolicyChecker.cpp:
2504         (WebCore::PolicyChecker::checkNavigationPolicy):
2505         (WebCore::PolicyChecker::checkNewWindowPolicy):
2506         * loader/PolicyChecker.h:
2507
2508 2019-02-01  Antoine Quint  <graouts@apple.com>
2509
2510         Dispatch pointercancel events when content is panned or zoomed on iOS
2511         https://bugs.webkit.org/show_bug.cgi?id=193962
2512         <rdar://problem/47629134>
2513
2514         Reviewed by Dean Jackson.
2515
2516         Expose two new methods on PointerCaptureController so that, given a pointer id, it can be established whether this pointer
2517         has been cancelled, which is important because a cancelled pointer should no longer dispatch any further pointer events, and
2518         to cancel a pointer.
2519
2520         Tests: pointerevents/ios/touch-action-pointercancel-pan-x.html
2521                pointerevents/ios/touch-action-pointercancel-pan-y.html
2522                pointerevents/ios/touch-action-pointercancel-pinch-zoom.html
2523
2524         * WebCore.xcodeproj/project.pbxproj: Make PointerCaptureController.h Private so that it can be imported from WebKit.
2525         * dom/PointerEvent.h: Remove an unnecessary #if ENABLE(POINTER_EVENTS) since the entire file is already contained in one.
2526         Then we add a new create() method that takes an event type, a pointer id and a pointer type (touch vs. pen) that we use
2527         to create pointercancel events in PointerCaptureController::cancelPointer().
2528         * page/Page.cpp:
2529         (WebCore::Page::Page): Pass the Page as a parameter when creating the PointerCaptureController.
2530         * page/PointerCaptureController.cpp:
2531         (WebCore::PointerCaptureController::PointerCaptureController): Add a Page reference to the constructor since we'll need
2532         the page to access its main frame's EventHandler to perform hit testing in case we do not have a capture target override
2533         in cancelPointer().
2534         (WebCore::PointerCaptureController::releasePointerCapture): Drive-by, remove the the implicit parameter since on iOS we
2535         don't need to differentiate. We'll bring this back for the macOS work.
2536         (WebCore::PointerCaptureController::hasCancelledPointerEventForIdentifier): New method we'll use when dispatching pointer
2537         events to identify whether a pointer id has already been cancelled which will allow for _not_ dispatching any further
2538         pointer events for this pointer id.
2539         (WebCore::PointerCaptureController::pointerEventWillBeDispatched): Keep track of the pointer type so we can preserve it
2540         when dispatching pointercancel events for a given pointer id.
2541         (WebCore::PointerCaptureController::cancelPointer): Dispatch a pointercancel for the provided pointer id, using the capture
2542         target override as the event's target, if there is one, and otherwise hit-testing at the provided location to figure out
2543         what the target should be.
2544         * page/PointerCaptureController.h: Switch the target overrides from Element* to RefPtr<Element> to ensure it may not be
2545         deleted while we still need them. Existing code already ensures these get set to nullptr.
2546
2547 2019-02-01  Jer Noble  <jer.noble@apple.com>
2548
2549         Make the WebKit default for media source based on the WebCore default.
2550         https://bugs.webkit.org/show_bug.cgi?id=194172
2551
2552         Reviewed by Eric Carlson.
2553
2554         * page/SettingsBase.h:
2555
2556 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
2557
2558         Web Inspector: Memory timeline starts from zero when both CPU and Memory timeline are enabled
2559         https://bugs.webkit.org/show_bug.cgi?id=194111
2560         <rdar://problem/47714555>
2561
2562         Rubber-stamped by Devin Rousso.
2563
2564         * page/ResourceUsageThread.cpp:
2565         (WebCore::ResourceUsageThread::waitUntilObservers):
2566         (WebCore::ResourceUsageThread::threadBody):
2567         Wait a short period of time before the first listener registers
2568         and we start sampling. This will allow multiple listeners to
2569         register, each that wants different data.
2570
2571 2019-02-01  Antti Koivisto  <antti@apple.com>
2572
2573         Don't use base layer() as the scroll layer in scrolling tree.
2574         https://bugs.webkit.org/show_bug.cgi?id=194160
2575
2576         Reviewed by Simon Fraser.
2577
2578         Maintain scrollContainerLayer() and scrolledContentsLayer() separately in ScrollingTreeScrollingNode.
2579
2580         * page/scrolling/AsyncScrollingCoordinator.cpp:
2581         (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
2582         (WebCore::AsyncScrollingCoordinator::setNodeLayers):
2583         * page/scrolling/AsyncScrollingCoordinator.h:
2584         * page/scrolling/ScrollingCoordinator.h:
2585         (WebCore::ScrollingCoordinator::setNodeLayers):
2586
2587         Turn the long layer parameter list into a struct.
2588
2589         * page/scrolling/ScrollingStateNode.cpp:
2590         (WebCore::ScrollingStateNode::ScrollingStateNode):
2591         (WebCore::ScrollingStateNode::setAllPropertiesChanged):
2592         (WebCore::ScrollingStateNode::setLayer):
2593         * page/scrolling/ScrollingStateNode.h:
2594         * page/scrolling/ScrollingStateScrollingNode.cpp:
2595         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
2596         (WebCore::ScrollingStateScrollingNode::setAllPropertiesChanged):
2597         (WebCore::ScrollingStateScrollingNode::setScrollContainerLayer):
2598         (WebCore::ScrollingStateScrollingNode::dumpProperties const):
2599         * page/scrolling/ScrollingStateScrollingNode.h:
2600         (WebCore::ScrollingStateScrollingNode::scrollContainerLayer const):
2601         * page/scrolling/ScrollingTree.cpp:
2602         (WebCore::ScrollingTree::commitTreeState):
2603         * page/scrolling/ScrollingTreeScrollingNode.cpp:
2604         (WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
2605         * page/scrolling/ScrollingTreeScrollingNode.h:
2606         (WebCore::ScrollingTreeScrollingNode::scrollContainerLayer const):
2607         (WebCore::ScrollingTreeScrollingNode::scrolledContentsLayer const):
2608         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
2609         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
2610         (WebCore::ScrollingTreeFrameScrollingNodeIOS::commitStateBeforeChildren):
2611         (WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollPosition const):
2612         (WebCore::ScrollingTreeFrameScrollingNodeIOS::setScrollLayerPosition):
2613         (WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollLayer const): Deleted.
2614         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
2615         (WebCore::ScrollingTreeFixedNode::commitStateBeforeChildren):
2616         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
2617         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2618         (WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren):
2619         (WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateAfterChildren):
2620         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollPosition const):
2621         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
2622         (WebCore::ScrollingTreeFrameScrollingNodeMac::exposedUnfilledArea const):
2623         * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h:
2624         * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
2625         (WebCore::ScrollingTreeOverflowScrollingNodeMac::commitStateBeforeChildren):
2626         (WebCore::ScrollingTreeOverflowScrollingNodeMac::scrollPosition const):
2627         (WebCore::ScrollingTreeOverflowScrollingNodeMac::setScrollLayerPosition):
2628         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
2629         (WebCore::ScrollingTreeStickyNode::commitStateBeforeChildren):
2630         * rendering/RenderLayerCompositor.cpp:
2631         (WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer):
2632         (WebCore::RenderLayerCompositor::updateScrollingNodeForViewportConstrainedRole):
2633         (WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingRole):
2634         (WebCore::RenderLayerCompositor::updateScrollingNodeForFrameHostingRole):
2635
2636 2019-02-01  Simon Fraser  <simon.fraser@apple.com>
2637
2638         REGRESSION (r240698): fast/scrolling/sticky-to-fixed.html can cause a crash
2639         https://bugs.webkit.org/show_bug.cgi?id=194134
2640         rdar://problem/47721210
2641
2642         Reviewed by Daniel Bates.
2643
2644         fast/scrolling/sticky-to-fixed.html changes the scrolling node type, which causes
2645         scrollingCoordinator->insertNode() to return a different ScrollingNodeID to the one
2646         passed in. We have to handle this, removing the node for the nodeID and unregistering
2647         the layer with the old nodeID.
2648
2649         * rendering/RenderLayerCompositor.cpp:
2650         (WebCore::RenderLayerCompositor::attachScrollingNode):
2651
2652 2019-02-01  Carlos Garcia Campos  <cgarcia@igalia.com>
2653
2654         REGRESSION(r239915): css3/font-feature-font-face-local.html failing on WPE
2655         https://bugs.webkit.org/show_bug.cgi?id=194008
2656
2657         Reviewed by Žan Doberšek.
2658
2659         We need to replace control characters with zero width space too.
2660
2661         * platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp:
2662         (WebCore::GlyphPage::fill):
2663         * platform/text/CharacterProperties.h:
2664         (WebCore::isControlCharacter):
2665
2666 2019-02-01  Carlos Garcia Campos  <cgarcia@igalia.com>
2667
2668         ComplexText: Test fast/text/word-space-nbsp.html fails when using complex text path
2669         https://bugs.webkit.org/show_bug.cgi?id=193279
2670
2671         Reviewed by Michael Catanzaro.
2672
2673         The fix applied in r135884 to WidthIterator should also be applied to ComplexTextController.
2674
2675         * platform/graphics/ComplexTextController.cpp:
2676         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
2677
2678 2019-02-01  Zalan Bujtas  <zalan@apple.com>
2679
2680         [LFC] Adjust replaced element's intrinsic ratio
2681         https://bugs.webkit.org/show_bug.cgi?id=194154
2682
2683         Reviewed by Antti Koivisto.
2684
2685         Decouple image and iframe replaced types and set intrinsic ratio accordingly.
2686
2687         * layout/layouttree/LayoutBox.cpp:
2688         (WebCore::Layout::Box::Box):
2689         * layout/layouttree/LayoutBox.h:
2690         (WebCore::Layout::Box::isReplaced const):
2691         (WebCore::Layout::Box::isIFrame const):
2692         (WebCore::Layout::Box::isImage const):
2693         * layout/layouttree/LayoutReplaced.cpp:
2694         (WebCore::Layout::Replaced::hasIntrinsicRatio const):
2695         (WebCore::Layout::Replaced::intrinsicRatio const):
2696         (WebCore::Layout::Replaced::hasAspectRatio const):
2697         * layout/layouttree/LayoutReplaced.h:
2698         * layout/layouttree/LayoutTreeBuilder.cpp:
2699         (WebCore::Layout::TreeBuilder::createSubTree):
2700
2701 2019-02-01  Zalan Bujtas  <zalan@apple.com>
2702
2703         [LFC] Set intrinsic size on Layout::Replaced
2704         https://bugs.webkit.org/show_bug.cgi?id=194139
2705
2706         Reviewed by Antti Koivisto.
2707
2708         Eventually Layout::Replaced will track intrinsic size internally until then let's query the RenderReplaced. 
2709
2710         * layout/layouttree/LayoutBox.h:
2711         (WebCore::Layout::Box::replaced):
2712         * layout/layouttree/LayoutReplaced.cpp:
2713         (WebCore::Layout::Replaced::hasIntrinsicWidth const):
2714         (WebCore::Layout::Replaced::hasIntrinsicHeight const):
2715         (WebCore::Layout::Replaced::intrinsicWidth const):
2716         (WebCore::Layout::Replaced::intrinsicHeight const):
2717         * layout/layouttree/LayoutReplaced.h:
2718         (WebCore::Layout::Replaced::setIntrinsicSize):
2719         (WebCore::Layout::Replaced::setIntrinsicRatio):
2720         * layout/layouttree/LayoutTreeBuilder.cpp:
2721         (WebCore::Layout::TreeBuilder::createSubTree):
2722         * rendering/RenderReplaced.h:
2723
2724 2019-02-01  Claudio Saavedra  <csaavedra@igalia.com>
2725
2726         Race-condition during scrolling thread creation
2727         https://bugs.webkit.org/show_bug.cgi?id=194016
2728
2729         Reviewed by Saam Barati.
2730
2731         There is a threading issue during the initialization
2732         of the scrolling thread caused by createThreadIfNeeded
2733         locking only on the creation of the thread but not on
2734         the initialization of the main loop, making it possible
2735         for a thread to try to spin the main loop before it's
2736         created.
2737
2738         Fix this by unconditionally waiting on the main loop
2739         being created. This makes it necessary to always hold
2740         the lock, even when the thread is already created.
2741
2742         * page/scrolling/ScrollingThread.cpp:
2743         (WebCore::ScrollingThread::createThreadIfNeeded):
2744
2745 2019-02-01  Simon Fraser  <simon.fraser@apple.com>
2746
2747         Use ScrollingNodeID in more places, and improve the name of a ScrollableArea function that returns a ScrollingNodeID
2748         https://bugs.webkit.org/show_bug.cgi?id=194126
2749
2750         Reviewed by Frédéric Wang.
2751         
2752         Change uint64_t ScrollableArea::scrollLayerID() to ScrollingNodeID ScrollableArea::scrollingNodeID()
2753         and fix callers.
2754
2755         * page/FrameView.cpp:
2756         (WebCore::FrameView::scrollingNodeID const):
2757         (WebCore::FrameView::scrollLayerID const): Deleted.
2758         * page/FrameView.h:
2759         * page/scrolling/AsyncScrollingCoordinator.cpp:
2760         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
2761         (WebCore::AsyncScrollingCoordinator::updateExpectsWheelEventTestTriggerWithFrameView):
2762         (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
2763         (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
2764         (WebCore::AsyncScrollingCoordinator::frameViewForScrollingNode const):
2765         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
2766         (WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
2767         (WebCore::AsyncScrollingCoordinator::scrollableAreaScrollbarLayerDidChange):
2768         (WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
2769         (WebCore::AsyncScrollingCoordinator::setSynchronousScrollingReasons):
2770         (WebCore::AsyncScrollingCoordinator::setActiveScrollSnapIndices):
2771         (WebCore::AsyncScrollingCoordinator::updateScrollSnapPropertiesWithFrameView):
2772         * page/scrolling/ScrollingCoordinatorTypes.h:
2773         * platform/ScrollTypes.h:
2774         * platform/ScrollableArea.h:
2775         (WebCore::ScrollableArea::scrollingNodeID const):
2776         (WebCore::ScrollableArea::scrollLayerID const): Deleted.
2777         * rendering/RenderLayerCompositor.cpp:
2778         (WebCore::RenderLayerCompositor::parentFrameContentLayers):
2779         (WebCore::RenderLayerCompositor::detachRootLayer):
2780
2781 2019-01-31  Myles C. Maxfield  <mmaxfield@apple.com>
2782
2783         [WHLSL] Expressions can't be copyable
2784         https://bugs.webkit.org/show_bug.cgi?id=194116
2785
2786         Reviewed by Keith Rollin.
2787
2788         Expressions have UniqueRef members, which can't be copied. Describe this constraint explicitly rather than implicitly.
2789
2790         No new tests because there is no behavior change.
2791
2792         * Modules/webgpu/WHLSL/AST/WHLSLEnumerationMemberLiteral.h:
2793         * Modules/webgpu/WHLSL/AST/WHLSLExpression.h:
2794
2795 2019-01-31  Takashi Komori  <Takashi.Komori@sony.com>
2796
2797         [Curl] Remove unnecessary member from NetworkStorageSession.
2798         https://bugs.webkit.org/show_bug.cgi?id=194137
2799
2800         Reviewed by Don Olmstead.
2801
2802         No new tests since there is no behavior change.
2803
2804         * platform/network/NetworkStorageSession.h:
2805         * platform/network/curl/NetworkStorageSessionCurl.cpp:
2806         (WebCore::NetworkStorageSession::NetworkStorageSession):
2807         (WebCore::NetworkStorageSession::context const): Deleted.
2808
2809 2019-01-31  Jer Noble  <jer.noble@apple.com>
2810
2811         NSInvalidArgumentException in [WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]
2812         https://bugs.webkit.org/show_bug.cgi?id=194123
2813         <rdar://problem/47721094>
2814
2815         Reviewed by Eric Carlson.
2816
2817         According to crash logs, AVSampleBufferDisplayLayer.error can go from an NSError* to nil; when such a change is KVO'd,
2818         the NSKeyValueChangeNewKey is a NSNull. Detect this state and bail out early.
2819
2820         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2821         (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
2822
2823 2019-01-31  Jer Noble  <jer.noble@apple.com>
2824
2825         [Cocoa][EME] AirPlaying a FairPlay-protected HLS stream fails to decrypt
2826         https://bugs.webkit.org/show_bug.cgi?id=194114
2827
2828         Reviewed by Eric Carlson.
2829
2830         The AVAssetResourceLoaderDelegate must explicitly... delegate responsibility for FairPlay key
2831         requests to the AVContentKeySession.
2832
2833         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2834         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
2835
2836 2019-01-31  Megan Gardner  <megan_gardner@apple.com>
2837
2838         Don't insert spaces at the beginning of a newline when using smart-copy-paste
2839         https://bugs.webkit.org/show_bug.cgi?id=194070
2840
2841         Reviewed by Tim Horton.
2842
2843         If our inserted content end is at the beginning of a paragraph, do not insert a space.
2844         Also, if our inserted content beginning is at the end of a paragraph, do not insert a space.
2845
2846         Test: editing/pasteboard/mac/copy-smartpaste-first-line-in-textarea.html
2847
2848         * editing/ReplaceSelectionCommand.cpp:
2849         (WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace):
2850
2851 2019-01-31  Justin Fan  <justin_fan@apple.com>
2852
2853         [WebGPU] Build fix: disable MTLCopyAllDevices call on non-Mac platforms
2854         https://bugs.webkit.org/show_bug.cgi?id=194120
2855
2856         Unreviewed build fix. 
2857
2858         No new tests; no change in behavior.
2859
2860         * platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
2861         (WebCore::GPUDevice::create): Wrap problem code in #if PLATFORM(MAC).
2862
2863 2019-01-31  Simon Fraser  <simon.fraser@apple.com>
2864
2865         Basic scrollability for async overflow scrolling on macOS
2866         https://bugs.webkit.org/show_bug.cgi?id=194093
2867
2868         Reviewed by Antti Koivisto.
2869
2870         Give a ScrollingTreeOverflowScrollingNodeMac a ScrollingTreeScrollingNodeDelegateMac and have it keep track
2871         of its layers so basic scrolling works for async overflow scroll.
2872
2873         * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h:
2874         * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
2875         (WebCore::ScrollingTreeOverflowScrollingNodeMac::create):
2876         (WebCore::ScrollingTreeOverflowScrollingNodeMac::ScrollingTreeOverflowScrollingNodeMac):
2877         (WebCore::ScrollingTreeOverflowScrollingNodeMac::commitStateBeforeChildren):
2878         (WebCore::ScrollingTreeOverflowScrollingNodeMac::commitStateAfterChildren):
2879         (WebCore::ScrollingTreeOverflowScrollingNodeMac::handleWheelEvent):
2880         (WebCore::ScrollingTreeOverflowScrollingNodeMac::scrollPosition const):
2881         (WebCore::ScrollingTreeOverflowScrollingNodeMac::setScrollPosition):
2882         (WebCore::ScrollingTreeOverflowScrollingNodeMac::setScrollPositionWithoutContentEdgeConstraints):
2883         (WebCore::ScrollingTreeOverflowScrollingNodeMac::setScrollLayerPosition):
2884         * rendering/RenderLayerBacking.cpp:
2885         (WebCore::RenderLayerBacking::updateScrollingLayers):
2886
2887 2019-01-31  Simon Fraser  <simon.fraser@apple.com>
2888
2889         Generalize ScrollingTreeScrollingNodeDelegate for use in macOS too, add a macOS subclass for frame/overflow scrolling
2890         https://bugs.webkit.org/show_bug.cgi?id=194080
2891
2892         Reviewed by Antti Koivisto.
2893
2894         To share code between ScrollingTreeFrameScrollingNodeMac and ScrollingTreeOverflowScrollingNodeMac, build ScrollingTreeScrollingNodeDelegate
2895         for macOS too, and add some helper functions to ScrollingTreeScrollingNodeDelegate.
2896
2897         Add a macOS subclass, ScrollingTreeScrollingNodeDelegateMac, which takes over the basic scrolling, rubber-banding
2898         and scroll snapping functionality from ScrollingTreeFrameScrollingNodeMac. The delegate owns the ScrollController and
2899         implements ScrollControllerClient.
2900
2901         ScrollingTreeFrameScrollingNodeMac now owns a ScrollingTreeScrollingNodeDelegateMac. A future patch
2902         will add one to ScrollingTreeOverflowScrollingNodeMac.
2903
2904         No behavior change.
2905
2906         * SourcesCocoa.txt:
2907         * WebCore.xcodeproj/project.pbxproj:
2908         * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
2909         (WebCore::ScrollingTreeFrameScrollingNode::scrollBy): Deleted.
2910         (WebCore::ScrollingTreeFrameScrollingNode::scrollByWithoutContentEdgeConstraints): Deleted.
2911         * page/scrolling/ScrollingTreeFrameScrollingNode.h:
2912         (WebCore::ScrollingTreeFrameScrollingNode::frameScaleFactor const):
2913         * page/scrolling/ScrollingTreeNode.cpp:
2914         (WebCore::ScrollingTreeNode::isRootNode const):
2915         * page/scrolling/ScrollingTreeNode.h:
2916         * page/scrolling/ScrollingTreeScrollingNode.cpp:
2917         (WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
2918         (WebCore::ScrollingTreeScrollingNode::scrollBy):
2919         (WebCore::ScrollingTreeScrollingNode::scrollByWithoutContentEdgeConstraints):
2920         * page/scrolling/ScrollingTreeScrollingNode.h:
2921         (WebCore::ScrollingTreeScrollingNode::expectsWheelEventTestTrigger const):
2922         * page/scrolling/ScrollingTreeScrollingNodeDelegate.cpp:
2923         * page/scrolling/ScrollingTreeScrollingNodeDelegate.h:
2924         (WebCore::ScrollingTreeScrollingNodeDelegate::scrollPosition const):
2925         (WebCore::ScrollingTreeScrollingNodeDelegate::minimumScrollPosition const):
2926         (WebCore::ScrollingTreeScrollingNodeDelegate::maximumScrollPosition const):
2927         (WebCore::ScrollingTreeScrollingNodeDelegate::scrollableAreaSize const):
2928         (WebCore::ScrollingTreeScrollingNodeDelegate::totalContentsSize const):
2929         (WebCore::ScrollingTreeScrollingNodeDelegate::hasEnabledHorizontalScrollbar const):
2930         (WebCore::ScrollingTreeScrollingNodeDelegate::hasEnabledVerticalScrollbar const):
2931         (WebCore::ScrollingTreeScrollingNodeDelegate::horizontalScrollElasticity const):
2932         (WebCore::ScrollingTreeScrollingNodeDelegate::verticalScrollElasticity const):
2933         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
2934         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2935         (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
2936         (WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren):
2937         (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent):
2938         (WebCore::ScrollingTreeFrameScrollingNodeMac::minimumScrollPosition const):
2939         (WebCore::ScrollingTreeFrameScrollingNodeMac::maximumScrollPosition const):
2940         (WebCore::newGestureIsStarting): Deleted.
2941         (WebCore::ScrollingTreeFrameScrollingNodeMac::isAlreadyPinnedInDirectionOfGesture): Deleted.
2942         (WebCore::ScrollingTreeFrameScrollingNodeMac::allowsHorizontalStretching): Deleted.
2943         (WebCore::ScrollingTreeFrameScrollingNodeMac::allowsVerticalStretching): Deleted.
2944         (WebCore::ScrollingTreeFrameScrollingNodeMac::stretchAmount): Deleted.
2945         (WebCore::ScrollingTreeFrameScrollingNodeMac::pinnedInDirection): Deleted.
2946         (WebCore::ScrollingTreeFrameScrollingNodeMac::canScrollHorizontally): Deleted.
2947         (WebCore::ScrollingTreeFrameScrollingNodeMac::canScrollVertically): Deleted.
2948         (WebCore::ScrollingTreeFrameScrollingNodeMac::shouldRubberBandInDirection): Deleted.
2949         (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollBy): Deleted.
2950         (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollByWithoutContentEdgeConstraints): Deleted.
2951         (WebCore::ScrollingTreeFrameScrollingNodeMac::stopSnapRubberbandTimer): Deleted.
2952         (WebCore::ScrollingTreeFrameScrollingNodeMac::adjustScrollPositionToBoundsIfNecessary): Deleted.
2953         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffset const): Deleted.
2954         (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollOnAxis): Deleted.
2955         (WebCore::ScrollingTreeFrameScrollingNodeMac::pageScaleFactor const): Deleted.
2956         (WebCore::ScrollingTreeFrameScrollingNodeMac::startScrollSnapTimer): Deleted.
2957         (WebCore::ScrollingTreeFrameScrollingNodeMac::stopScrollSnapTimer): Deleted.
2958         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollExtent const): Deleted.
2959         (WebCore::ScrollingTreeFrameScrollingNodeMac::viewportSize const): Deleted.
2960         (WebCore::ScrollingTreeFrameScrollingNodeMac::deferTestsForReason const): Deleted.
2961         (WebCore::ScrollingTreeFrameScrollingNodeMac::removeTestDeferralForReason const): Deleted.
2962         * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h: Copied from Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h.
2963         * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm: Added.
2964         (WebCore::ScrollingTreeScrollingNodeDelegateMac::ScrollingTreeScrollingNodeDelegateMac):
2965         (WebCore::ScrollingTreeScrollingNodeDelegateMac::updateScrollSnapPoints):
2966         (WebCore::ScrollingTreeScrollingNodeDelegateMac::setActiveScrollSnapIndexForAxis):
2967         (WebCore::ScrollingTreeScrollingNodeDelegateMac::activeScrollSnapIndexForAxis const):
2968         (WebCore::ScrollingTreeScrollingNodeDelegateMac::activeScrollSnapIndexDidChange const):
2969         (WebCore::ScrollingTreeScrollingNodeDelegateMac::handleWheelEvent):
2970         (WebCore::ScrollingTreeScrollingNodeDelegateMac::isScrollSnapInProgress const):
2971         (WebCore::newGestureIsStarting):
2972         (WebCore::ScrollingTreeScrollingNodeDelegateMac::isAlreadyPinnedInDirectionOfGesture):
2973         (WebCore::ScrollingTreeScrollingNodeDelegateMac::allowsHorizontalStretching):
2974         (WebCore::ScrollingTreeScrollingNodeDelegateMac::allowsVerticalStretching):
2975         (WebCore::ScrollingTreeScrollingNodeDelegateMac::stretchAmount):
2976         (WebCore::ScrollingTreeScrollingNodeDelegateMac::pinnedInDirection):
2977         (WebCore::ScrollingTreeScrollingNodeDelegateMac::canScrollHorizontally):
2978         (WebCore::ScrollingTreeScrollingNodeDelegateMac::canScrollVertically):
2979         (WebCore::ScrollingTreeScrollingNodeDelegateMac::shouldRubberBandInDirection):
2980         (WebCore::ScrollingTreeScrollingNodeDelegateMac::immediateScrollBy):
2981         (WebCore::ScrollingTreeScrollingNodeDelegateMac::immediateScrollByWithoutContentEdgeConstraints):
2982         (WebCore::ScrollingTreeScrollingNodeDelegateMac::stopSnapRubberbandTimer):
2983         (WebCore::ScrollingTreeScrollingNodeDelegateMac::adjustScrollPositionToBoundsIfNecessary):
2984         (WebCore::ScrollingTreeScrollingNodeDelegateMac::scrollOffset const):
2985         (WebCore::ScrollingTreeScrollingNodeDelegateMac::immediateScrollOnAxis):
2986         (WebCore::ScrollingTreeScrollingNodeDelegateMac::pageScaleFactor const):
2987         (WebCore::ScrollingTreeScrollingNodeDelegateMac::startScrollSnapTimer):
2988         (WebCore::ScrollingTreeScrollingNodeDelegateMac::stopScrollSnapTimer):
2989         (WebCore::ScrollingTreeScrollingNodeDelegateMac::scrollExtent const):
2990         (WebCore::ScrollingTreeScrollingNodeDelegateMac::viewportSize const):
2991         (WebCore::ScrollingTreeScrollingNodeDelegateMac::deferTestsForReason const):
2992         (WebCore::ScrollingTreeScrollingNodeDelegateMac::removeTestDeferralForReason const):
2993
2994 2019-01-31  Jer Noble  <jer.noble@apple.com>
2995
2996         [Mac] Requesting PiP from two different WebViews gets PiP window "stuck"
2997         https://bugs.webkit.org/show_bug.cgi?id=194099
2998         <rdar://problem/47271323>
2999
3000         Reviewed by Eric Carlson.
3001
3002         When a different client requests the PiP window, the PiP framework will call -pipDidClose: without
3003         first calling -pipActionStop:. This leaves the internal fullscreen state in a confused state where
3004         the WebView will attempt to re-enter PiP once it gets focus, and can lead to a state where the two
3005         WebViews will constantly try to steal PiP from one another, ad infinitum.
3006
3007         When receiving a notification that the PiP window closed when our internal state tells us that the
3008         close was not requested, notify the client that PiP mode was exited, allowing them to set their
3009         expected state to a correct and sane value.
3010
3011         * platform/mac/VideoFullscreenInterfaceMac.mm:
3012         (-[WebVideoFullscreenInterfaceMacObjC pipDidClose:]):
3013
3014 2019-01-31  Keith Rollin  <krollin@apple.com>
3015
3016         WebCore::WHLSL::AST::Expression copy constructor needs to be be default, not delete
3017         https://bugs.webkit.org/show_bug.cgi?id=194055
3018         <rdar://problem/47684570>
3019
3020         Reviewed by Myles C. Maxfield.
3021
3022         WebCore::WHLSL::AST::Expression has a deleted copy constructor.
3023         EnumerationMemberLiteral, a subclass, has a default copy constructor.
3024         Some compilers may complain that the latter's c'tor can't access the
3025         former's, because it doesn't exist. Fix this by marking Expression's
3026         c'tor as default.
3027
3028         No new tests since there should be no observable behavior difference.
3029
3030         * Modules/webgpu/WHLSL/AST/WHLSLExpression.h:
3031
3032 2019-01-31  Alex Christensen  <achristensen@webkit.org>
3033
3034         Revert r238819 which is unneeded and caused a performance regression.
3035         https://bugs.webkit.org/show_bug.cgi?id=192272
3036         <rdar://problem/46664625>
3037
3038         * loader/EmptyFrameLoaderClient.h:
3039         * loader/FrameLoader.cpp:
3040         (WebCore::FrameLoader::prepareForLoadStart):
3041         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
3042         (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
3043         * loader/FrameLoader.h:
3044         * loader/FrameLoaderClient.h:
3045
3046 2019-01-31  Justin Fan  <justin_fan@apple.com>
3047
3048         [WebGPU] WebGPUAdapterDescriptor -> GPURequestAdapterOptions and take powerPreference into account
3049         https://bugs.webkit.org/show_bug.cgi?id=194068
3050         <rdar://problem/47680215>
3051
3052         Reviewed by Dean Jackson.
3053         
3054         Per the Web GPU IDL, WebGPUAdapterDescriptor is now known as GPURequestAdapterOptions and is optional.
3055         In addition, Web GPU now actually attempts to return an integrated GPU when a low-power adapter is requested.
3056
3057         Test: adapter-options.html
3058
3059         * Modules/webgpu/GPURequestAdapterOptions.idl: Renamed from Source/WebCore/Modules/webgpu/WebGPUAdapterDescriptor.idl.
3060         * Modules/webgpu/WebGPU.cpp:
3061         (WebCore::WebGPU::requestAdapter const):
3062         * Modules/webgpu/WebGPU.h:
3063         * Modules/webgpu/WebGPU.idl:
3064         * Modules/webgpu/WebGPUAdapter.cpp:
3065         (WebCore::WebGPUAdapter::create):
3066         (WebCore::WebGPUAdapter::WebGPUAdapter):
3067         * Modules/webgpu/WebGPUAdapter.h:
3068         (WebCore::WebGPUAdapter::options const):
3069         * Modules/webgpu/WebGPUDevice.cpp:
3070         (WebCore::WebGPUDevice::create):
3071         * platform/graphics/gpu/GPUDevice.h:
3072         * platform/graphics/gpu/GPURequestAdapterOptions.h: Renamed from Source/WebCore/Modules/webgpu/WebGPUAdapterDescriptor.h.
3073         * platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
3074         (WebCore::GPUDevice::create):
3075
3076 2019-01-31  Jiewen Tan  <jiewen_tan@apple.com>
3077
3078         Formalize WebKitAdditions mechanism of LoadOptimizer
3079         https://bugs.webkit.org/show_bug.cgi?id=193886
3080         <rdar://problem/47696809>
3081
3082         Reviewed by Brent Fulgham.
3083
3084         Covered by existing tests.
3085
3086         * platform/network/ResourceRequestBase.h:
3087         Export isolatedCopy().
3088
3089 2019-01-31  Jer Noble  <jer.noble@apple.com>
3090
3091         [Cocoa][EME] Modern EME uses a different path for SecureStop data than Legacy EME
3092         https://bugs.webkit.org/show_bug.cgi?id=193988
3093
3094         Reviewed by Jon Lee.
3095
3096         Modern EME is writing SecureStop data as a file at the same path as the
3097         directory used by Legacy EME; meaning, when Modern EME attempts to write
3098         to that file, it will fail because a directory exists at the same path.
3099
3100         Add a migration step to take care of those instances where Modern EME Secure
3101         Stop data was already written to disk, and move that previously written data
3102         to the correct file path.
3103
3104         * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:
3105         * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
3106         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::initializeWithConfiguration):
3107         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::setStorageDirectory):
3108         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense):
3109         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::loadSession):
3110         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::removeSessionData):
3111         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::ensureSession):
3112
3113 2019-01-31  Antti Koivisto  <antti@apple.com>
3114
3115         Call the frame main contents layer "rootContentsLayer" consistently.
3116         https://bugs.webkit.org/show_bug.cgi?id=194089
3117
3118         Reviewed by Simon Fraser.
3119
3120         This is currently called "rootContentLayer" in the compositor and "scrolledContentsLayer" in the scrolling tree.
3121         We want to reserve term "scrolledContentsLayer" to mean the direct child layer of the  scroll container layer
3122         without any positioning oddities (which this isn't).
3123
3124         * page/scrolling/AsyncScrollingCoordinator.cpp:
3125         (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
3126         (WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
3127         (WebCore::AsyncScrollingCoordinator::setNodeLayers):
3128
3129         Set the rootContentsLayer for frame. It is only used by the Mac frame scrolling code.
3130
3131         * page/scrolling/AsyncScrollingCoordinator.h:
3132         * page/scrolling/ScrollingCoordinator.cpp:
3133         (WebCore::ScrollingCoordinator::rootContentsLayerForFrameView):
3134         (WebCore::ScrollingCoordinator::rootContentLayerForFrameView): Deleted.
3135         * page/scrolling/ScrollingCoordinator.h:
3136         (WebCore::ScrollingCoordinator::setNodeLayers):
3137         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
3138         (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
3139         (WebCore::ScrollingStateFrameScrollingNode::setAllPropertiesChanged):
3140         (WebCore::ScrollingStateFrameScrollingNode::setRootContentsLayer):
3141         (WebCore::ScrollingStateFrameScrollingNode::dumpProperties const):
3142         * page/scrolling/ScrollingStateFrameScrollingNode.h:
3143
3144         Introduce rootContentLayer for frames only.
3145
3146         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
3147         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3148         (WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren):
3149         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
3150
3151         Switch to using rootContentsLayer.
3152
3153         * rendering/RenderLayerCompositor.cpp:
3154         (WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer):
3155         (WebCore::RenderLayerCompositor::updateCompositingLayers):
3156         (WebCore::RenderLayerCompositor::updateRootContentLayerClipping):
3157         (WebCore::RenderLayerCompositor::layerTreeAsText):
3158         (WebCore::RenderLayerCompositor::rootGraphicsLayer const):
3159         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
3160         (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
3161         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
3162         (WebCore::RenderLayerCompositor::updateLayerForHeader):
3163         (WebCore::RenderLayerCompositor::updateLayerForFooter):
3164         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
3165         (WebCore::RenderLayerCompositor::ensureRootLayer):
3166         (WebCore::RenderLayerCompositor::destroyRootLayer):
3167         (WebCore::RenderLayerCompositor::attachRootLayer):
3168         (WebCore::RenderLayerCompositor::detachRootLayer):
3169         (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
3170         (WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingRole):
3171
3172         Pass rootContentsLayer separately for frames only.
3173         Pass null as frame scrolledContentsLayer until these are rearranged (it is not used).
3174
3175         * rendering/RenderLayerCompositor.h:
3176
3177 2019-01-31  Keith Rollin  <krollin@apple.com>
3178
3179         GCGamepad is deprecated
3180         https://bugs.webkit.org/show_bug.cgi?id=194056
3181         <rdar://problem/47685010>
3182
3183         Reviewed by Brady Eidson.
3184
3185         GCGamepad is deprecated, resulting in compiler warnings. Address this
3186         for now by employing ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END.
3187
3188         No new tests since there should be no observable behavior difference.
3189
3190         * platform/gamepad/cocoa/GameControllerGamepad.mm:
3191         (WebCore::GameControllerGamepad::setupAsGamepad):
3192
3193 2019-01-31  Darin Adler  <darin@apple.com>
3194
3195         Simplify and streamline code that creates an appropriate document based on MIME type
3196         https://bugs.webkit.org/show_bug.cgi?id=193756
3197
3198         Reviewed by Chris Dumez.
3199
3200         * dom/DOMImplementation.cpp:
3201         (WebCore::DOMImplementation::createDocument): Use equalLettersIgnoringASCIICase rather
3202         than == for all the MIME type checks. Use MIMETypeRegistry::isSupportedImageMIMEType
3203         instead of Image::supportsType. Rearranged checks so that all the combinations that
3204         that take precedence over plug-ins are checked first, fixing some unimportant edge
3205         cases where the plug-in database is initialized and doesn't need to be. Straightened
3206         out the logic for various special types so that the checks are more independent from
3207         each other and hence easier to understand.
3208
3209 2019-01-31  Alicia Boya García  <aboya@igalia.com>
3210
3211         [MSE][GStreamer] Unreviewed debug build fix, obsolete assert
3212
3213         Since m_playerPrivate is now a reference, it no longer has a default
3214         cast to bool. But there is also no longer a need to assert it's non
3215         null, so just remove the assert.
3216
3217         * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
3218         (WebCore::MediaSourceClientGStreamerMSE::append):
3219
3220 2019-01-31  Alicia Boya García  <aboya@igalia.com>
3221
3222         [MSE][GStreamer] Use reference instead of pointer in m_playerPrivate
3223         https://bugs.webkit.org/show_bug.cgi?id=194091
3224
3225         Reviewed by Xabier Rodriguez-Calvar.
3226
3227         Since the pointer is initialized with the class, it's never null and
3228         never changes, it's preferrable to use a reference instead of a
3229         pointer.
3230
3231         * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
3232         (WebCore::MediaSourceClientGStreamerMSE::MediaSourceClientGStreamerMSE):
3233         (WebCore::MediaSourceClientGStreamerMSE::addSourceBuffer):
3234         (WebCore::MediaSourceClientGStreamerMSE::durationChanged):
3235         (WebCore::MediaSourceClientGStreamerMSE::abort):
3236         (WebCore::MediaSourceClientGStreamerMSE::resetParserState):
3237         (WebCore::MediaSourceClientGStreamerMSE::append):
3238         (WebCore::MediaSourceClientGStreamerMSE::markEndOfStream):
3239         (WebCore::MediaSourceClientGStreamerMSE::removedFromMediaSource):
3240         (WebCore::MediaSourceClientGStreamerMSE::flush):
3241         (WebCore::MediaSourceClientGStreamerMSE::enqueueSample):
3242         (WebCore::MediaSourceClientGStreamerMSE::allSamplesInTrackEnqueued):
3243         (WebCore::MediaSourceClientGStreamerMSE::webKitMediaSrc):
3244         * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.h:
3245
3246 2019-01-31  Alexander Mikhaylenko  <exalm7659@gmail.com>
3247
3248         [GTK] Momentum scrolling stops abruptly before websites end
3249         https://bugs.webkit.org/show_bug.cgi?id=193350
3250
3251         Reviewed by Carlos Garcia Campos.
3252
3253         Don't immediately set velocity to 0 when position reaches upper or bottom limit.
3254         Instead, set it to the overshot distance, so that position exactly matches upper
3255         or lower limit on the next frame, and then clamp velocity to 0 using the existing
3256         mechanism.
3257
3258         * platform/ScrollAnimationKinetic.cpp:
3259         (WebCore::ScrollAnimationKinetic::PerAxisData::animateScroll):
3260
3261 2019-01-31  Michael Catanzaro  <mcatanzaro@igalia.com>
3262
3263         Unreviewed, fix incorrect string format
3264         https://bugs.webkit.org/show_bug.cgi?id=193907
3265         <rdar://problem/47604080>
3266
3267         * page/scrolling/ScrollingTree.cpp:
3268         (WebCore::ScrollingTree::commitTreeState):
3269
3270 2019-01-30  Simon Fraser  <simon.fraser@apple.com>
3271
3272         [Mac] Implement basic hit testing in the scrolling tree
3273         https://bugs.webkit.org/show_bug.cgi?id=172917
3274         <rdar://problem/34215516>
3275
3276         Reviewed by Antti Koivisto.
3277
3278         First steps to getting hit testing of scrolling nodes in the scrolling tree. Based on patch
3279         by Frédéric Wang.
3280
3281         First we pipe the "async scrolling enabled" setting through to the ScrollingTree via
3282         the root node (like the other settings; weird, but that's how it's done). For now,
3283         we hit test in the scrolling tree if either async overflow or frame scrolling are enabled
3284         (it's hard to deal with one without the other).
3285
3286         Nodes in the scrolling tree implement scrollingNodeForPoint() to implement hit testing.
3287         Two helper functions exist to simplify coordinate conversion: parentToLocalPoint()
3288         and localToContentsPoint(). Child nodes are hit-testing in reverse order to find nodes
3289         hightest in Z first. Only scrolling nodes are returned (not sure if we'll ever need
3290         to hit-test non-scrolling nodes). Nodes use parentRelativeScrollableRect and scroll positions
3291         to do these point mappings.
3292
3293         handleWheelEvent() is changed to return a ScrollingEventResult.
3294
3295         Latching is not correct with this change when async frame scrolling is enabled. That needs
3296         to be fixed separately.
3297
3298         No tests yet; for ease of testing, I'd like to add an Internals API to hit-test the
3299         scrolling tree, rather than doing eventSender stuff everywhere.
3300
3301         * page/scrolling/AsyncScrollingCoordinator.cpp:
3302         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
3303         (WebCore::AsyncScrollingCoordinator::asyncFrameOrOverflowScrollingEnabled const):
3304         * page/scrolling/AsyncScrollingCoordinator.h:
3305         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
3306         (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
3307         (WebCore::ScrollingStateFrameScrollingNode::setAllPropertiesChanged):
3308         (WebCore::ScrollingStateFrameScrollingNode::setAsyncFrameOrOverflowScrollingEnabled):
3309         * page/scrolling/ScrollingStateFrameScrollingNode.h:
3310         * page/scrolling/ScrollingTree.cpp:
3311         (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
3312         (WebCore::ScrollingTree::handleWheelEvent):
3313         (WebCore::ScrollingTree::commitTreeState):
3314         (WebCore::ScrollingTree::setAsyncFrameOrOverflowScrollingEnabled):
3315         * page/scrolling/ScrollingTree.h:
3316         (WebCore::ScrollingTree::asyncFrameOrOverflowScrollingEnabled const):
3317         * page/scrolling/ScrollingTreeFrameHostingNode.cpp:
3318         (WebCore::ScrollingTreeFrameHostingNode::parentToLocalPoint const):
3319         * page/scrolling/ScrollingTreeFrameHostingNode.h:
3320         * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
3321         (WebCore::ScrollingTreeFrameScrollingNode::parentToLocalPoint const):
3322         (WebCore::ScrollingTreeFrameScrollingNode::localToContentsPoint const):
3323         * page/scrolling/ScrollingTreeFrameScrollingNode.h:
3324         * page/scrolling/ScrollingTreeNode.cpp:
3325         (WebCore::ScrollingTreeNode::scrollingNodeForPoint const):
3326         * page/scrolling/ScrollingTreeNode.h:
3327         (WebCore::ScrollingTreeNode::children const):
3328         (WebCore::ScrollingTreeNode::parentToLocalPoint const):
3329         (WebCore::ScrollingTreeNode::localToContentsPoint const):
3330         * page/scrolling/ScrollingTreeScrollingNode.cpp:
3331         (WebCore::ScrollingTreeScrollingNode::scrollLimitReached const):
3332         (WebCore::ScrollingTreeScrollingNode::parentToLocalPoint const):
3333         (WebCore::ScrollingTreeScrollingNode::localToContentsPoint const):
3334         (WebCore::ScrollingTreeScrollingNode::scrollingNodeForPoint const):
3335         * page/scrolling/ScrollingTreeScrollingNode.h:
3336         * page/scrolling/ThreadedScrollingTree.cpp:
3337         (WebCore::ThreadedScrollingTree::handleWheelEvent):
3338         * page/scrolling/ThreadedScrollingTree.h:
3339         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
3340         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
3341         (WebCore::ScrollingTreeFrameScrollingNodeIOS::handleWheelEvent):
3342         * page/scrolling/ios/ScrollingTreeIOS.h:
3343         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
3344         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3345         (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent):
3346         * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h:
3347
3348 2019-01-31  Alicia Boya García  <aboya@igalia.com>
3349
3350         [MSE][GStreamer] Remove unused GstFlowReturn in AppendPipeline methods
3351         https://bugs.webkit.org/show_bug.cgi?id=194067
3352
3353         Reviewed by Xabier Rodriguez-Calvar.
3354
3355         A couple methods in AppendPipeline were returning GstFlowReturn
3356         despite there being no codepath (sans assertions) where values other
3357         than GST_FLOW_OK are returned.
3358
3359         Therefore, it makes sense to just make these methods return void.
3360
3361         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
3362         (WebCore::AppendPipeline::pushNewBuffer):
3363         (WebCore::AppendPipeline::handleAppsinkNewSampleFromStreamingThread):
3364         * platform/graphics/gstreamer/mse/AppendPipeline.h:
3365         * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
3366         (WebCore::MediaSourceClientGStreamerMSE::append):
3367         * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.h:
3368         * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
3369         (WebCore::SourceBufferPrivateGStreamer::append):
3370
3371 2019-01-31  Alicia Boya García  <aboya@igalia.com>
3372
3373         [MSE][GStreamer] Remove if (m_playerPrivate) from MediaSourceClientGStreamerMSE
3374         https://bugs.webkit.org/show_bug.cgi?id=194069
3375
3376         Reviewed by Xabier Rodriguez-Calvar.
3377
3378         m_playerPrivate is non-NULL since MediaSourceClientGStreamerMSE
3379         creation well until its destruction.
3380
3381         The only case that could make a NULL m_playerPrivate is
3382         clearPlayerPrivate() but that method is not used anymore.
3383
3384         * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
3385         (WebCore::MediaSourceClientGStreamerMSE::addSourceBuffer):
3386         (WebCore::MediaSourceClientGStreamerMSE::durationChanged):
3387         (WebCore::MediaSourceClientGStreamerMSE::abort):
3388         (WebCore::MediaSourceClientGStreamerMSE::resetParserState):
3389         (WebCore::MediaSourceClientGStreamerMSE::markEndOfStream):
3390         (WebCore::MediaSourceClientGStreamerMSE::removedFromMediaSource):
3391         (WebCore::MediaSourceClientGStreamerMSE::flush):
3392         (WebCore::MediaSourceClientGStreamerMSE::enqueueSample):
3393         (WebCore::MediaSourceClientGStreamerMSE::allSamplesInTrackEnqueued):
3394         (WebCore::MediaSourceClientGStreamerMSE::webKitMediaSrc):
3395         (WebCore::MediaSourceClientGStreamerMSE::clearPlayerPrivate): Deleted.
3396         * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.h:
3397
3398 2019-01-31  Thibault Saunier  <tsaunier@igalia.com>
3399
3400         [GStreamer][WebRTC] Avoid returning FLUSHING when it is not the case in GStreamerMediaStreamSource
3401         https://bugs.webkit.org/show_bug.cgi?id=194087
3402
3403         Basically GstFlowCombiner was mostly designed for element that have 1 sinkpad and several srcpad
3404         meaning that it makes sense that when any of the downstream pad is returning flushing, you should
3405         return FLUSHING upstream. But in our case we have several sinkpads and FLUSHING should be returned
3406         *only* if the internally linked srcpad is FLUSHING otherwise we might end up setting the upstream
3407         source element task to PAUSED (because downstream returned flushing) on a branch that was not
3408         flushing!
3409
3410         Reviewed by Philippe Normand.
3411
3412         This is a theorical race we can't really cover with tests.
3413
3414         * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
3415         (WebCore::webkitMediaStreamSrcChain):
3416
3417 2019-01-31  Zalan Bujtas  <zalan@apple.com>
3418
3419         [LFC] Margin before/after/start/end initial value is 0 and not auto.
3420         https://bugs.webkit.org/show_bug.cgi?id=194090
3421
3422         Reviewed by Antti Koivisto.
3423
3424         Don't treat it like auto.
3425
3426         * layout/FormattingContextGeometry.cpp:
3427         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
3428         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
3429
3430 2019-01-31  Zalan Bujtas  <zalan@apple.com>
3431
3432         [LFC] Use the used margin values in outOfFlowReplacedHorizontalGeometry consistently
3433         https://bugs.webkit.org/show_bug.cgi?id=194074
3434
3435         Reviewed by Antti Koivisto.
3436
3437         Check the used margin variables whether we already computed start/end values.
3438
3439         Test: fast/block/block-only/absolute-position-with-margin-auto-simple2.html
3440
3441         * layout/FormattingContextGeometry.cpp:
3442         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
3443
3444 2019-01-31  Zalan Bujtas  <zalan@apple.com>
3445
3446         [LFC][BFC] Add support for block level replaced box.
3447         https://bugs.webkit.org/show_bug.cgi?id=194071
3448
3449         Reviewed by Antti Koivisto.
3450
3451         * layout/layouttree/LayoutBox.cpp:
3452         (WebCore::Layout::Box::Box):
3453         * layout/layouttree/LayoutBox.h:
3454         * layout/layouttree/LayoutTreeBuilder.cpp:
3455         (WebCore::Layout::TreeBuilder::createSubTree):
3456         (WebCore::Layout::outputLayoutBox):
3457
3458 2019-01-31  Chris Fleizach  <cfleizach@apple.com>
3459
3460         ASSERTION FAILED: cache under WebCore::AXObjectCache::postTextStateChangePlatformNotification
3461         https://bugs.webkit.org/show_bug.cgi?id=189094
3462         <rdar://problem/43853526>
3463
3464         Reviewed by Zalan Bujtas.
3465
3466         Protect against access to objects and cache's that can be removed while an object is still in memory.
3467
3468         Unskipped flaky tests on mac-wk2.
3469
3470         * accessibility/mac/AXObjectCacheMac.mm:
3471         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
3472         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3473         (textMarkerForVisiblePosition):
3474         (textMarkerRangeFromVisiblePositions):
3475
3476 2019-01-30  Chris Dumez  <cdumez@apple.com>
3477
3478         Regression(PSON) History navigations to twitter.com lead to a 403 HTTP error
3479         https://bugs.webkit.org/show_bug.cgi?id=194023
3480         <rdar://problem/47417981>
3481
3482         Reviewed by Geoffrey Garen.
3483
3484         The issue was caused by the 'isTopSite' flag not getting properly set on the network request
3485         in case of a cross-site history navigation (with process-swap). As a result, twitter.com was
3486         not getting its same-site lax cookies.
3487
3488         The 'isTopSite' flag normally gets set by FrameLoader::addExtraFieldsToRequest(), but we were
3489         bypassing this method entirely when continuing a load in a new process after a swap. This was
3490         intentional as the network request is normally already fully populated by the previous process
3491         and we do not want the new process to modify the request in any way (e.g. we would not want to
3492         add a Origin header back after it was removed by the previous process). However, in case of a
3493         History navigation, we do not actually pass a request along from one process to another. Instead,
3494         we pass a HistoryItem and then build a fresh new request from the HistoryItem in the new process.
3495         In this case, we *want* addExtraFieldsToRequest() to be called on the new request, even though
3496         we are technically continuing a load in a new process.
3497
3498         We thus address the issue by bypassing FrameLoader::addExtraFieldsToRequest() only if we're
3499         continuing a load with a request and not when we're continuing a load with a HistoryItem.
3500
3501         Test: http/tests/cookies/same-site/lax-samesite-cookie-after-cross-site-history-load.php
3502
3503         * loader/FrameLoader.cpp:
3504         (WebCore::FrameLoader::load):
3505         (WebCore::FrameLoader::loadWithDocumentLoader):
3506         (WebCore::FrameLoader::addExtraFieldsToRequest):
3507         (WebCore::FrameLoader::loadDifferentDocumentItem):
3508         * loader/FrameLoader.h:
3509         (WebCore::FrameLoader::shouldTreatCurrentLoadAsContinuingLoad const):
3510
3511 2019-01-30  Justin Fan  <justin_fan@apple.com>
3512
3513         [WebGPU] Support GPUDepthStencilStateDescriptor
3514         https://bugs.webkit.org/show_bug.cgi?id=194048
3515         <rdar://problem/46289645>
3516
3517         Reviewed by Dean Jackson.
3518
3519         Implement GPUDepthStencilStateDescriptor to specify a MTLDepthStencilState that is set on the command encoder.
3520
3521         Existing tests cover changes to pipeline. Behavior does not change as DepthStencilState has no effect 
3522         without a depth texture attached.
3523
3524         New interface files added:
3525         * Modules/webgpu/GPUCompareFunction.idl:
3526         * Modules/webgpu/GPUDepthStencilStateDescriptor.idl:
3527         * platform/graphics/gpu/GPUCompareFunction.h:
3528         * platform/graphics/gpu/GPUDepthStencilStateDescriptor.h:
3529
3530         Modifications:
3531         * Modules/webgpu/WebGPUDevice.cpp: Include depthStencilState when creating pipeline.
3532         (WebCore::WebGPUDevice::createRenderPipeline const):
3533         * Modules/webgpu/WebGPURenderPipelineDescriptor.h: Add depthStencilState to the descriptor.
3534         * Modules/webgpu/WebGPURenderPipelineDescriptor.idl: Ditto.
3535         * platform/graphics/gpu/GPURenderPipeline.h: Ditto.
3536         (WebCore::GPURenderPipeline::depthStencilState const): Getter.
3537         (WebCore::GPURenderPipeline::platformRenderPipeline const):
3538         * platform/graphics/gpu/GPURenderPipelineDescriptor.h: Update constructor to take depthStencilState.
3539         (WebCore::GPURenderPipelineDescriptor::GPURenderPipelineDescriptor):
3540         * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm: Setting pipeline also sets the included depthStencilState.
3541         (WebCore::GPURenderPassEncoder::setPipeline):
3542         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm: Convert DepthStencilStateDescriptor to MTLDepthStencilState.
3543         (WebCore::validateAndConvertDepthCompareFunctionToMtl):
3544         (WebCore::tryCreateMtlDepthStencilState):
3545         (WebCore::tryCreateMtlRenderPipelineState): Refactored logic out of GPURenderPipeline::create.
3546         (WebCore::GPURenderPipeline::create):
3547         (WebCore::GPURenderPipeline::GPURenderPipeline):
3548
3549         Added symbols for CompareFunction, DepthStencilStateDescriptor to the project:
3550         * CMakeLists.txt:
3551         * DerivedSources.make:
3552         * Sources.txt:
3553         * WebCore.xcodeproj/project.pbxproj:
3554
3555         * Modules/webgpu/WebGPUDevice.idl: Cleaned up IDL to match current version.
3556
3557 2019-01-30  Jer Noble  <jer.noble@apple.com>
3558
3559         [Cocoa][EME] persistent-usage-record data not issued after MediaKeySession.remove()
3560         https://bugs.webkit.org/show_bug.cgi?id=193984
3561
3562         Reviewed by Eric Carlson.
3563
3564         MediaKeySession.sessionId is empty during the CDMInstance->requestLicense success callback handler. The
3565         KVO notification that AVContentKeySession.contentProtectionSessionIdentifier changed isn't called until
3566         after the -[AVContentKeyRequest makeStreamingContentKeyRequestDataForApp:contentIdentifier:options:completionHandler:]
3567         completion handler is called.
3568
3569         Explicitly ask for the -contentProtectionSessionIdentifier inside that handler, and just in case the sessionID
3570         changes after that, add a new client callback method to notify the MediaKeySession that the ID has changed.
3571
3572         * Modules/encryptedmedia/MediaKeySession.cpp:
3573         (WebCore::MediaKeySession::sessionIdChanged):
3574         * Modules/encryptedmedia/MediaKeySession.h:
3575         * platform/encryptedmedia/CDMInstanceSession.h:
3576         * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
3577         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRequest):
3578         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::nextRequest):
3579
3580 2019-01-30  Keith Rollin  <krollin@apple.com>
3581
3582         FloatWithRect has invalid and inaccessible default constructor
3583         https://bugs.webkit.org/show_bug.cgi?id=194057
3584         <rdar://problem/47685211>
3585
3586         Reviewed by Zalan Bujtas.
3587
3588         FloatWithRect has a default constructor declared as 'default'. This
3589         constructor is invalid because FloatWithRect has a data member that's
3590         a reference that will not get initialized with this constructor. Since
3591         it's invalid, and since it's private and not accessed by anything,
3592         remove this constructor.
3593
3594         No new tests since there should be no observable behavior difference.
3595
3596         * rendering/line/LineLayoutState.h:
3597
3598 2019-01-30  Daniel Bates  <dabates@apple.com>
3599
3600         [iOS] Keyups for non-modifier keys identified as "Dead" when not focused in a content-editable element
3601         https://bugs.webkit.org/show_bug.cgi?id=192824
3602         <rdar://problem/47100332>
3603
3604         Reviewed by Wenson Hsieh.
3605
3606         When building with USE(UIKIT_KEYBOARD_ADDITIONS) enabled, normalize input strings for some more key codes
3607         now that hardware key events to non-editable elements use the same code path as for editable elements. 
3608
3609         * platform/ios/KeyEventIOS.mm:
3610         (WebCore::windowsKeyCodeForCharCode): Demarcate mappings that are only needed when building with
3611         !USE(UIKIT_KEYBOARD_ADDITIONS) in the hope that one day we can remove this code.
3612         (WebCore::isFunctionKey): Ditto.
3613         * platform/ios/WebEvent.mm:
3614         (normalizedStringWithAppKitCompatibilityMapping): Normalize some more input strings when building with
3615         USE(UIKIT_KEYBOARD_ADDITIONS) enabled.
3616
3617 2019-01-30  Jer Noble  <jer.noble@apple.com>
3618
3619         Ensure ENABLE_MEDIA_SOURCE is defined inside DerivedSources.make
3620         https://bugs.webkit.org/show_bug.cgi?id=194063
3621
3622         Reviewed by Jon Lee.
3623
3624         * DerivedSources.make:
3625
3626 2019-01-30  Youenn Fablet  <youenn@apple.com>
3627
3628         Refactor ServiceWorkerJob management by ServiceWorkerContainer to make it more memory safe
3629         https://bugs.webkit.org/show_bug.cgi?id=193747
3630         <rdar://problem/47498196>
3631
3632         Reviewed by Chris Dumez.
3633
3634         Make ServiceWorkerJob be no longer ref counted.
3635         Instead its lifetime is fully controlled by ServiceWorkerContainer.
3636
3637         Make sure that a failing load will remove the job from ServiceWorkerContainer job map.
3638         This allows to ensure that these jobs do not stay forever.
3639         Before the patch, the jobs map was never cleared, which is creating a ref cycle whenever a job is not succesful.
3640
3641         Before the patch, unsetPendingActivity was only called for successful jobs finishing.
3642         In case of failing loads, ServiceWorkerContainer would leak.
3643         Make sure that setPendingActivity/unsetPendingActivity is balanced by storing
3644         a pending activity in the job map next to the job.
3645
3646         When ServiceWorkerContainer is stopped, notify that all jobs are cancelled to NetworkProcess.
3647         This makes these jobs in NetworkProcess-side to not stay until the corresponding WebProcess is gone.
3648
3649         Simplify ServiceWorkerJob promise rejection handling so that it is clear when promise is rejected and when it is not.
3650         Update type of exception to be SecurityError when load fails due to AccessControl.
3651
3652         Covered by existing tests.
3653
3654         * workers/service/ServiceWorkerContainer.cpp:
3655         (WebCore::ServiceWorkerContainer::addRegistration):
3656         (WebCore::ServiceWorkerContainer::removeRegistration):
3657         (WebCore::ServiceWorkerContainer::updateRegistration):
3658         (WebCore::ServiceWorkerContainer::scheduleJob):
3659         (WebCore::ServiceWorkerContainer::jobFailedWithException):
3660         (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
3661         (WebCore::ServiceWorkerContainer::jobResolvedWithUnregistrationResult):
3662         (WebCore::ServiceWorkerContainer::jobFailedLoadingScript):
3663         (WebCore::ServiceWorkerContainer::jobDidFinish):
3664         (WebCore::ServiceWorkerContainer::stop):
3665         (WebCore::ServiceWorkerContainer::job):
3666         * workers/service/ServiceWorkerContainer.h:
3667         * workers/service/ServiceWorkerJob.cpp:
3668         (WebCore::ServiceWorkerJob::failedWithException):
3669         (WebCore::ServiceWorkerJob::resolvedWithRegistration):
3670         (WebCore::ServiceWorkerJob::resolvedWithUnregistrationResult):
3671         (WebCore::ServiceWorkerJob::startScriptFetch):
3672         (WebCore::ServiceWorkerJob::didReceiveResponse):
3673         (WebCore::ServiceWorkerJob::notifyFinished):
3674         (WebCore::ServiceWorkerJob::cancelPendingLoad):
3675         * workers/service/ServiceWorkerJob.h:
3676         (WebCore::ServiceWorkerJob::hasPromise const):
3677         (WebCore::ServiceWorkerJob::takePromise):
3678         * workers/service/ServiceWorkerJobClient.h:
3679         * workers/service/server/SWServerJobQueue.cpp:
3680         (WebCore::SWServerJobQueue::scriptFetchFinished):
3681
3682 2019-01-30  Dean Jackson  <dino@apple.com>
3683
3684         PointerEvents - tiltX and tiltY are reversed
3685         https://bugs.webkit.org/show_bug.cgi?id=194032
3686         <rdar://problem/47674184>
3687
3688         Reviewed by Jon Lee.
3689
3690         I got tiltX and tiltY the wrong way around.
3691
3692         * dom/ios/PointerEventIOS.cpp: Flip the values.
3693
3694 2019-01-30  Zalan Bujtas  <zalan@apple.com>
3695
3696         [LFC][IFC] nextBreakablePosition returns the same position on hyphen characters
3697         https://bugs.webkit.org/show_bug.cgi?id=194001
3698
3699         Reviewed by Antti Koivisto.
3700
3701         Skip to the next position manually. This is exactly what we do in simple line layout.
3702
3703         * layout/inlineformatting/InlineRunProvider.cpp:
3704         (WebCore::Layout::InlineRunProvider::moveToNextBreakablePosition):
3705
3706 2019-01-30  Simon Fraser  <simon.fraser@apple.com>
3707
3708         Add some basic geometry information to the scrolling tree
3709         https://bugs.webkit.org/show_bug.cgi?id=194002
3710         rdar://problem/47656294
3711
3712         Reviewed by Antti Koivisto.
3713
3714         To allow hit-testing in the scrolling tree, store a parent-relative scrollable
3715         rect in "scrolling" and "frame hosting" nodes. This is a rect whose size is the size
3716         of the scrollable area, and whose origin is relative to the parent scrolling tree node.
3717         
3718         Frame hosting nodes need this rect because they take care of the geometry offset between
3719         an iframe and its scrolling tree ancestor in the parent document.
3720         
3721         Based on a patch by Frédéric Wang in bug 172917.
3722
3723         * page/scrolling/AsyncScrollingCoordinator.cpp:
3724         (WebCore::AsyncScrollingCoordinator::setScrollingNodeGeometry):
3725         * page/scrolling/ScrollingStateFrameHostingNode.cpp:
3726         (WebCore::ScrollingStateFrameHostingNode::ScrollingStateFrameHostingNode):
3727         (WebCore::ScrollingStateFrameHostingNode::setAllPropertiesChanged):
3728         (WebCore::ScrollingStateFrameHostingNode::setParentRelativeScrollableRect):
3729         (WebCore::ScrollingStateFrameHostingNode::dumpProperties const):
3730         * page/scrolling/ScrollingStateFrameHostingNode.h:
3731         * page/scrolling/ScrollingTreeFrameHostingNode.cpp:
3732         (WebCore::ScrollingTreeFrameHostingNode::commitStateBeforeChildren):
3733         (WebCore::ScrollingTreeFrameHostingNode::dumpProperties const):
3734         * page/scrolling/ScrollingTreeFrameHostingNode.h:
3735         (WebCore::ScrollingTreeFrameHostingNode::parentRelativeScrollableRect const):
3736         * rendering/RenderLayer.h:
3737         * rendering/RenderLayerBacking.cpp:
3738         (WebCore::RenderLayerBacking::updateScrollingLayers):
3739         * rendering/RenderLayerCompositor.cpp:
3740         (WebCore::RenderLayerCompositor::computeFrameScrollingGeometry const):
3741         (WebCore::RenderLayerCompositor::computeFrameHostingGeometry const):
3742         (WebCore::RenderLayerCompositor::computeOverflowScrollingGeometry const):
3743         (WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingRole):
3744         (WebCore::RenderLayerCompositor::updateScrollingNodeForFrameHostingRole):
3745         (WebCore::RenderLayerCompositor::updateScrollSnapPropertiesWithFrameView const):
3746         (WebCore::RenderLayerCompositor::updateScrollSnapPropertiesWithFrameView): Deleted.
3747         * rendering/RenderLayerCompositor.h:
3748
3749 2019-01-30  Zalan Bujtas  <zalan@apple.com>
3750
3751         [LFC] Use the used margin values in outOfFlowReplacedVerticalGeometry consistently
3752         https://bugs.webkit.org/show_bug.cgi?id=194020
3753
3754         Reviewed by Antti Koivisto.
3755
3756         Check the used margin variables whether we already computed before/after values.
3757
3758         Test: fast/block/block-only/absolute-position-with-margin-auto-simple.html
3759
3760         * layout/FormattingContextGeometry.cpp:
3761         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
3762
3763 2019-01-30  Chris Fleizach  <cfleizach@apple.com>
3764
3765         AX: Support color well on iOS
3766         https://bugs.webkit.org/show_bug.cgi?id=194010
3767
3768         Reviewed by Joanmarie Diggs.
3769
3770         Test: accessibility/ios-simulator/color-well.html
3771
3772         Add support for color well on iOS.
3773
3774         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3775         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
3776         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
3777         (-[WebAccessibilityObjectWrapper accessibilityRoleDescription]):
3778         (-[WebAccessibilityObjectWrapper accessibilityColorStringValue]):
3779         * en.lproj/Localizable.strings:
3780         * platform/LocalizedStrings.cpp:
3781         (WebCore::AXColorWellText):
3782         * platform/LocalizedStrings.h:
3783
3784 2019-01-30  Chris Fleizach  <cfleizach@apple.com>
3785
3786         AX: Role=switch not returning correct accessibilityValue
3787         https://bugs.webkit.org/show_bug.cgi?id=194006
3788
3789         Reviewed by Joanmarie Diggs.
3790
3791         Return the toggle state of a role=switch element.        
3792
3793         Test: accessibility/ios-simulator/role-switch.html
3794
3795         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3796         (-[WebAccessibilityObjectWrapper accessibilityValue]):
3797
3798 2019-01-29  Rob Buis  <rbuis@igalia.com>
3799
3800         Align with Fetch on data: URLs
3801         https://bugs.webkit.org/show_bug.cgi?id=182325
3802
3803         Reviewed by Alex Christensen.
3804
3805         Implement most remaining steps for data: URL processing [1].
3806         Serialization is still to be implemented.
3807
3808         To make the code in DataURLDecoder::parseMediaType more efficient,
3809         refactor ParsedContentType so that validation and parsing is done
3810         in one pass.
3811
3812         Test: web-platform-tests/fetch/data-urls/processing.any.js
3813
3814         [1] https://fetch.spec.whatwg.org/#data-urls
3815
3816         * Modules/encryptedmedia/CDM.cpp:
3817         (WebCore::CDM::getSupportedCapabilitiesForAudioVideoType):
3818         * platform/network/DataURLDecoder.cpp:
3819         (WebCore::DataURLDecoder::parseMediaType):
3820         (WebCore::DataURLDecoder::DecodeTask::process):
3821         * platform/network/MIMEHeader.cpp:
3822         (WebCore::MIMEHeader::parseHeader):
3823         * platform/network/ParsedContentType.cpp:
3824         (WebCore::containsNewline):
3825         (WebCore::ParsedContentType::parseContentType):
3826         (WebCore::ParsedContentType::create):
3827         (WebCore::isValidContentType):
3828         (WebCore::ParsedContentType::ParsedContentType):
3829         (WebCore::DummyParsedContentType::setContentType const): Deleted.
3830         (WebCore::DummyParsedContentType::setContentTypeParameter const): Deleted.
3831         (WebCore::parseContentType): Deleted.
3832         * platform/network/ParsedContentType.h:
3833
3834 2019-01-29  Eric Carlson  <eric.carlson@apple.com>
3835
3836         [MSE] add more source buffer logging
3837         https://bugs.webkit.org/show_bug.cgi?id=193995
3838         <rdar://problem/47650399>
3839
3840         Reviewed by Jon Lee.
3841
3842         No new tests, no functional change.
3843
3844         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3845         (WebCore::SourceBufferPrivateAVFObjC::resetParserState):
3846         (WebCore::SourceBufferPrivateAVFObjC::setReadyState):
3847         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
3848         (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
3849         (WebCore::SourceBufferPrivateAVFObjC::willSeek):
3850         (WebCore::SourceBufferPrivateAVFObjC::setDecompressionSession):
3851
3852 2019-01-29  Simon Fraser  <simon.fraser@apple.com>
3853
3854         Add nodes to the scrolling tree in z-index order.
3855         https://bugs.webkit.org/show_bug.cgi?id=192529
3856         <rdar://problem/47402708>
3857
3858         Reviewed by Dean Jackson.
3859
3860         We currently add nodes to the scrolling tree via RenderLayerBacking::updateGeometry() and some other places.
3861         This is sub-optimal, because we don't readily know the scrolling ancestor at these times, so have to do RenderLayer
3862         walks to find them.
3863
3864         With this change we update the scrolling tree during the RenderLayerCompositor::updateBackingAndHierarchy()
3865         tree walk, storing state along the way so we always know our scrolling tree ancestor, and the sibling index
3866         (which makes it so that the scrolling tree correctly reflects layer z-order).
3867
3868         The reattachSubframeScrollLayers() code path is removed, since we can now reliably parent frame nodes via FrameHosting
3869         nodes in their parent document.
3870
3871         There is also some minor cleanup around RenderLayerBacking teardown; it used to be the case that cleanup in ~RenderLayerBacking
3872         was hard because the backing was already disconnected from its owning RenderLayer, so I added RenderLayerBacking::willBeDestroyed()
3873         to do work that requires that layer->backing() is still valid. This allows for fewer callsites for detachFromScrollingCoordinator().
3874
3875         updateScrollCoordinatedLayersAfterFlushIncludingSubframes() is now iOS-only because it's only relevant for iOS WK1,
3876         and m_scrollCoordinatedLayers can be moved to LegacyWebKitScrollingLayerCoordinator.
3877
3878         Tests: scrollingcoordinator/scrolling-tree/overflow-in-fixed.html
3879                scrollingcoordinator/scrolling-tree/scrolling-tree-is-z-order.html
3880
3881         * page/scrolling/ScrollingStateTree.cpp:
3882         (WebCore::ScrollingStateTree::insertNode):
3883         * page/scrolling/ScrollingTreeNode.cpp:
3884         (WebCore::ScrollingTreeNode::~ScrollingTreeNode):
3885         * platform/Logging.cpp:
3886         (WebCore::initializeLogChannelsIfNecessary):
3887         * rendering/RenderLayer.cpp:
3888         (WebCore::RenderLayer::setParent):
3889         (WebCore::RenderLayer::calculateClipRects const):
3890         * rendering/RenderLayerBacking.cpp:
3891         (WebCore::RenderLayerBacking::~RenderLayerBacking):
3892         (WebCore::RenderLayerBacking::willBeDestroyed):
3893         (WebCore::RenderLayerBacking::updateGeometry):
3894         (WebCore::RenderLayerBacking::updateBackgroundLayer):
3895         (WebCore::RenderLayerBacking::coordinatedScrollingRoles const):
3896         * rendering/RenderLayerBacking.h:
3897         * rendering/RenderLayerCompositor.cpp:
3898         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
3899         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayersAfterFlush):
3900         (WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer):
3901         (WebCore::frameHostingNodeForFrame):
3902         (WebCore::RenderLayerCompositor::updateCompositingLayers):
3903         (WebCore::RenderLayerCompositor::updateBackingAndHierarchy):
3904         (WebCore::RenderLayerCompositor::updateBacking):
3905         (WebCore::RenderLayerCompositor::layerWillBeRemoved):
3906         (WebCore::RenderLayerCompositor::setIsInWindow):
3907         (WebCore::RenderLayerCompositor::clearBackingForLayerIncludingDescendants):
3908         (WebCore::RenderLayerCompositor::useCoordinatedScrollingForLayer const):
3909         (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers):
3910         (WebCore::RenderLayerCompositor::attachScrollingNode):
3911         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayerWithRole):
3912         (WebCore::RenderLayerCompositor::updateScrollCoordinationForLayer):
3913         (WebCore::RenderLayerCompositor::updateScrollingNodeForViewportConstrainedRole):
3914         (WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingRole):
3915         (WebCore::RenderLayerCompositor::updateScrollingNodeForFrameHostingRole):
3916         (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
3917         (WebCore::RenderLayerCompositor::didAddScrollingLayer):
3918         (WebCore::LegacyWebKitScrollingLayerCoordinator::registerAllViewportConstrainedLayers):
3919         (WebCore::LegacyWebKitScrollingLayerCoordinator::addScrollingLayer):
3920         (WebCore::LegacyWebKitScrollingLayerCoordinator::removeScrollingLayer):
3921         (WebCore::LegacyWebKitScrollingLayerCoordinator::removeLayer):
3922         (WebCore::LegacyWebKitScrollingLayerCoordinator::addViewportConstrainedLayer):
3923         (WebCore::LegacyWebKitScrollingLayerCoordinator::removeViewportConstrainedLayer):
3924         (WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush): Deleted.
3925         (WebCore::RenderLayerCompositor::setCompositingParent): Deleted. This was always called with a null parentLayer, so was a no-op.
3926         (WebCore::RenderLayerCompositor::removeCompositedChildren): Deleted.
3927         (WebCore::RenderLayerCompositor::fixedRootBackgroundLayerChanged): Deleted. The work happens via didChangePlatformLayerForLayer() now.
3928         (WebCore::canCoordinateScrollingForLayer): Deleted.
3929         (WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus): Deleted.
3930         (WebCore::enclosingScrollingNodeID): Deleted.
3931         (WebCore::scrollCoordinatedAncestorInParentOfFrame): Deleted.
3932         (WebCore::RenderLayerCompositor::reattachSubframeScrollLayers): Deleted.
3933         (WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame): Deleted.
3934         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): Deleted.
3935         * rendering/RenderLayerCompositor.h:
3936