Unreviewed, speculative build fix for WinCairo, part 2
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2019-08-16  Yusuke Suzuki  <ysuzuki@apple.com>
2
3         Unreviewed, speculative build fix for WinCairo, part 2
4         https://bugs.webkit.org/show_bug.cgi?id=200526
5
6         * Modules/indexeddb/server/IDBSerializationContext.h:
7
8 2019-08-16  Yusuke Suzuki  <ysuzuki@apple.com>
9
10         Unreviewed, speculative build fix for WinCairo
11         https://bugs.webkit.org/show_bug.cgi?id=200526
12
13         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
14
15 2019-08-15  Yusuke Suzuki  <ysuzuki@apple.com>
16
17         [WTF] Add makeUnique<T>, which ensures T is fast-allocated, WTF_MAKE_FAST_ALLOCATED annotation part
18         https://bugs.webkit.org/show_bug.cgi?id=200620
19
20         Reviewed by Geoffrey Garen.
21
22         * Modules/encryptedmedia/legacy/LegacyCDM.h:
23         (WebCore::LegacyCDM::keySystem const): Deleted.
24         (WebCore::LegacyCDM::client const): Deleted.
25         (WebCore::LegacyCDM::setClient): Deleted.
26         * Modules/encryptedmedia/legacy/LegacyCDMPrivate.h:
27         * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.h:
28         * Modules/webaudio/AsyncAudioDecoder.h:
29         (WebCore::AsyncAudioDecoder::DecodingTask::audioData): Deleted.
30         (WebCore::AsyncAudioDecoder::DecodingTask::sampleRate const): Deleted.
31         (WebCore::AsyncAudioDecoder::DecodingTask::successCallback): Deleted.
32         (WebCore::AsyncAudioDecoder::DecodingTask::errorCallback): Deleted.
33         (WebCore::AsyncAudioDecoder::DecodingTask::audioBuffer): Deleted.
34         * Modules/webauthn/AuthenticatorCoordinator.h:
35         * Modules/webdatabase/SQLStatement.h:
36         (WebCore::SQLStatement::hasStatementCallback const): Deleted.
37         (WebCore::SQLStatement::hasStatementErrorCallback const): Deleted.
38         * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:
39         * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h:
40         * Modules/webgpu/WHLSL/WHLSLResolvingType.h:
41         * bindings/js/DOMPromiseProxy.h:
42         * bindings/js/GCController.h:
43         * bridge/jsc/BridgeJSC.h:
44         * contentextensions/ContentExtensionsBackend.h:
45         * dom/FullscreenManager.h:
46         (WebCore::FullscreenManager::document): Deleted.
47         (WebCore::FullscreenManager::document const): Deleted.
48         (WebCore::FullscreenManager::topDocument const): Deleted.
49         (WebCore::FullscreenManager::page const): Deleted.
50         (WebCore::FullscreenManager::frame const): Deleted.
51         (WebCore::FullscreenManager::documentElement const): Deleted.
52         (WebCore::FullscreenManager::hasLivingRenderTree const): Deleted.
53         (WebCore::FullscreenManager::pageCacheState const): Deleted.
54         (WebCore::FullscreenManager::scheduleFullStyleRebuild): Deleted.
55         (WebCore::FullscreenManager::fullscreenElement const): Deleted.
56         (WebCore::FullscreenManager::isFullscreen const): Deleted.
57         (WebCore::FullscreenManager::isFullscreenKeyboardInputAllowed const): Deleted.
58         (WebCore::FullscreenManager::currentFullscreenElement const): Deleted.
59         * dom/Microtasks.h:
60         (WebCore::MicrotaskQueue::vm const): Deleted.
61         * editing/CompositeEditCommand.h:
62         * editing/mac/AlternativeTextUIController.h:
63         * html/HTMLMediaElement.h:
64         * inspector/InspectorFrontendClientLocal.h:
65         * inspector/agents/WebHeapAgent.cpp:
66         * layout/displaytree/DisplayRun.h:
67         * layout/inlineformatting/InlineItem.h:
68         * layout/inlineformatting/InlineLine.h:
69         * layout/tableformatting/TableGrid.h:
70         * loader/FrameLoader.h:
71         (WebCore::FrameLoader::frame const): Deleted.
72         (WebCore::FrameLoader::policyChecker const): Deleted.
73         (WebCore::FrameLoader::history const): Deleted.
74         (WebCore::FrameLoader::notifier const): Deleted.
75         (WebCore::FrameLoader::subframeLoader const): Deleted.
76         (WebCore::FrameLoader::mixedContentChecker const): Deleted.
77         (WebCore::FrameLoader::urlSelected): Deleted.
78         (WebCore::FrameLoader::reload): Deleted.
79         (WebCore::FrameLoader::requestedHistoryItem const): Deleted.
80         (WebCore::FrameLoader::documentLoader const): Deleted.
81         (WebCore::FrameLoader::policyDocumentLoader const): Deleted.
82         (WebCore::FrameLoader::provisionalDocumentLoader const): Deleted.
83         (WebCore::FrameLoader::state const): Deleted.
84         (WebCore::FrameLoader::shouldReportResourceTimingToParentFrame const): Deleted.
85         (WebCore::FrameLoader::client const): Deleted.
86         (WebCore::FrameLoader::forceSandboxFlags): Deleted.
87         (WebCore::FrameLoader::hasOpenedFrames const): Deleted.
88         (WebCore::FrameLoader::setLoadsSynchronously): Deleted.
89         (WebCore::FrameLoader::loadsSynchronously const): Deleted.
90         (WebCore::FrameLoader::stateMachine): Deleted.
91         (WebCore::FrameLoader::quickRedirectComing const): Deleted.
92         (WebCore::FrameLoader::pageDismissalEventBeingDispatched const): Deleted.
93         (WebCore::FrameLoader::previousURL const): Deleted.
94         (WebCore::FrameLoader::setOverrideCachePolicyForTesting): Deleted.
95         (WebCore::FrameLoader::setOverrideResourceLoadPriorityForTesting): Deleted.
96         (WebCore::FrameLoader::setStrictRawResourceValidationPolicyDisabledForTesting): Deleted.
97         (WebCore::FrameLoader::isStrictRawResourceValidationPolicyDisabledForTesting): Deleted.
98         (WebCore::FrameLoader::provisionalLoadErrorBeingHandledURL const): Deleted.
99         (WebCore::FrameLoader::setProvisionalLoadErrorBeingHandledURL): Deleted.
100         (WebCore::FrameLoader::isReloadingFromOrigin const): Deleted.
101         (WebCore::FrameLoader::setAlwaysAllowLocalWebarchive): Deleted.
102         (WebCore::FrameLoader::alwaysAllowLocalWebarchive const): Deleted.
103         (WebCore::FrameLoader::loadWithDocumentLoader): Deleted.
104         (WebCore::FrameLoader::loadWithNavigationAction): Deleted.
105         (WebCore::FrameLoader::shouldTreatCurrentLoadAsContinuingLoad const): Deleted.
106         * loader/NavigationDisabler.h:
107         * loader/NavigationScheduler.h:
108         * loader/cache/CachedResource.h:
109         * loader/cache/CachedSVGDocumentReference.h:
110         (WebCore::CachedSVGDocumentReference::loadRequested const): Deleted.
111         (WebCore::CachedSVGDocumentReference::document): Deleted.
112         * loader/ios/PreviewLoader.h:
113         * page/CaptionUserPreferences.h:
114         * page/PrewarmInformation.h:
115         * page/ResizeObserver.h:
116         * page/SuspendableTimer.h:
117         * page/csp/ContentSecurityPolicyDirective.h:
118         * page/ios/ContentChangeObserver.h:
119         * page/ios/DOMTimerHoldingTank.h:
120         * page/linux/ResourceUsageOverlayLinux.cpp:
121         * page/mac/TextIndicatorWindow.h:
122         * page/scrolling/ScrollSnapOffsetsInfo.h:
123         * page/scrolling/ScrollingMomentumCalculator.h:
124         * platform/CPUMonitor.h:
125         * platform/FileMonitor.h:
126         * platform/ScrollAnimation.h:
127         * platform/SuddenTermination.h:
128         * platform/audio/AudioBus.h:
129         (WebCore::AudioBus::numberOfChannels const): Deleted.
130         (WebCore::AudioBus::channel): Deleted.
131         (WebCore::AudioBus::channel const): Deleted.
132         (WebCore::AudioBus::length const): Deleted.
133         (WebCore::AudioBus::sampleRate const): Deleted.
134         (WebCore::AudioBus::setSampleRate): Deleted.
135         (WebCore::AudioBus::reset): Deleted.
136         (WebCore::AudioBus::AudioBus): Deleted.
137         * platform/audio/AudioChannel.h:
138         (WebCore::AudioChannel::AudioChannel): Deleted.
139         (WebCore::AudioChannel::set): Deleted.
140         (WebCore::AudioChannel::length const): Deleted.
141         (WebCore::AudioChannel::mutableData): Deleted.
142         (WebCore::AudioChannel::data const): Deleted.
143         (WebCore::AudioChannel::zero): Deleted.
144         (WebCore::AudioChannel::clearSilentFlag): Deleted.
145         (WebCore::AudioChannel::isSilent const): Deleted.
146         * platform/audio/AudioFIFO.h:
147         (WebCore::AudioFIFO::framesInFifo const): Deleted.
148         (WebCore::AudioFIFO::updateIndex): Deleted.
149         * platform/audio/AudioPullFIFO.h:
150         * platform/audio/AudioResampler.h:
151         (WebCore::AudioResampler::rate const): Deleted.
152         * platform/audio/AudioResamplerKernel.h:
153         * platform/audio/AudioSession.cpp:
154         * platform/audio/AudioSession.h:
155         (WebCore::AudioSession::isActive const): Deleted.
156         * platform/audio/Biquad.h:
157         * platform/audio/Cone.h:
158         (WebCore::ConeEffect::setInnerAngle): Deleted.
159         (WebCore::ConeEffect::innerAngle const): Deleted.
160         (WebCore::ConeEffect::setOuterAngle): Deleted.
161         (WebCore::ConeEffect::outerAngle const): Deleted.
162         (WebCore::ConeEffect::setOuterGain): Deleted.
163         (WebCore::ConeEffect::outerGain const): Deleted.
164         * platform/audio/DenormalDisabler.h:
165         (WebCore::DenormalDisabler::DenormalDisabler): Deleted.
166         (WebCore::DenormalDisabler::~DenormalDisabler): Deleted.
167         (WebCore::DenormalDisabler::flushDenormalFloatToZero): Deleted.
168         (WebCore::DenormalDisabler::getCSR): Deleted.
169         (WebCore::DenormalDisabler::setCSR): Deleted.
170         * platform/audio/DirectConvolver.h:
171         * platform/audio/Distance.h:
172         (WebCore::DistanceEffect::model): Deleted.
173         (WebCore::DistanceEffect::setModel): Deleted.
174         (WebCore::DistanceEffect::setRefDistance): Deleted.
175         (WebCore::DistanceEffect::setMaxDistance): Deleted.
176         (WebCore::DistanceEffect::setRolloffFactor): Deleted.
177         (WebCore::DistanceEffect::refDistance const): Deleted.
178         (WebCore::DistanceEffect::maxDistance const): Deleted.
179         (WebCore::DistanceEffect::rolloffFactor const): Deleted.
180         * platform/audio/DownSampler.h:
181         * platform/audio/DynamicsCompressor.h:
182         (WebCore::DynamicsCompressor::sampleRate const): Deleted.
183         (WebCore::DynamicsCompressor::nyquist const): Deleted.
184         (WebCore::DynamicsCompressor::tailTime const): Deleted.
185         (WebCore::DynamicsCompressor::latencyTime const): Deleted.
186         * platform/audio/DynamicsCompressorKernel.h:
187         (WebCore::DynamicsCompressorKernel::latencyFrames const): Deleted.
188         (WebCore::DynamicsCompressorKernel::sampleRate const): Deleted.
189         (WebCore::DynamicsCompressorKernel::meteringGain const): Deleted.
190         * platform/audio/EqualPowerPanner.h:
191         * platform/audio/FFTConvolver.h:
192         (WebCore::FFTConvolver::fftSize const): Deleted.
193         * platform/audio/HRTFDatabase.h:
194         (WebCore::HRTFDatabase::numberOfAzimuths): Deleted.
195         (WebCore::HRTFDatabase::sampleRate const): Deleted.
196         * platform/audio/HRTFElevation.h:
197         (WebCore::HRTFElevation::HRTFElevation): Deleted.
198         (WebCore::HRTFElevation::kernelListL): Deleted.
199         (WebCore::HRTFElevation::kernelListR): Deleted.
200         (WebCore::HRTFElevation::elevationAngle const): Deleted.
201         (WebCore::HRTFElevation::numberOfAzimuths const): Deleted.
202         (WebCore::HRTFElevation::sampleRate const): Deleted.
203         * platform/audio/HRTFPanner.h:
204         (WebCore::HRTFPanner::fftSize const): Deleted.
205         (WebCore::HRTFPanner::sampleRate const): Deleted.
206         * platform/audio/MultiChannelResampler.h:
207         * platform/audio/PlatformAudioData.h:
208         * platform/audio/Reverb.h:
209         (WebCore::Reverb::impulseResponseLength const): Deleted.
210         * platform/audio/ReverbAccumulationBuffer.h:
211         (WebCore::ReverbAccumulationBuffer::readIndex const): Deleted.
212         (WebCore::ReverbAccumulationBuffer::readTimeFrame const): Deleted.
213         * platform/audio/ReverbConvolver.h:
214         (WebCore::ReverbConvolver::impulseResponseLength const): Deleted.
215         (WebCore::ReverbConvolver::inputBuffer): Deleted.
216         (WebCore::ReverbConvolver::useBackgroundThreads const): Deleted.
217         * platform/audio/ReverbConvolverStage.h:
218         (WebCore::ReverbConvolverStage::inputReadIndex const): Deleted.
219         * platform/audio/ReverbInputBuffer.h:
220         (WebCore::ReverbInputBuffer::writeIndex const): Deleted.
221         * platform/audio/SincResampler.h:
222         * platform/audio/UpSampler.h:
223         * platform/audio/ZeroPole.h:
224         (WebCore::ZeroPole::ZeroPole): Deleted.
225         (WebCore::ZeroPole::reset): Deleted.
226         (WebCore::ZeroPole::setZero): Deleted.
227         (WebCore::ZeroPole::setPole): Deleted.
228         (WebCore::ZeroPole::zero const): Deleted.
229         (WebCore::ZeroPole::pole const): Deleted.
230         * platform/audio/cocoa/WebAudioBufferList.h:
231         (WebCore::WebAudioBufferList::list const): Deleted.
232         (WebCore::WebAudioBufferList::operator AudioBufferList& const): Deleted.
233         (WebCore::WebAudioBufferList::kind const): Deleted.
234         * platform/audio/ios/AudioSessionIOS.mm:
235         * platform/audio/mac/CARingBuffer.h:
236         * platform/encryptedmedia/clearkey/CDMClearKey.h:
237         * platform/gamepad/mac/HIDGamepad.h:
238         * platform/graphics/FloatPoint.h:
239         * platform/graphics/Font.h:
240         * platform/graphics/GraphicsContext.h:
241         * platform/graphics/GraphicsContext3DPrivate.h:
242         * platform/graphics/GraphicsContextImpl.h:
243         * platform/graphics/GraphicsLayer.cpp:
244         * platform/graphics/LegacyCDMSession.h:
245         * platform/graphics/Region.h:
246         * platform/graphics/VelocityData.h:
247         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h:
248         * platform/graphics/avfoundation/CDMFairPlayStreaming.h:
249         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h:
250         * platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:
251         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
252         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
253         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
254         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
255         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
256         * platform/graphics/ca/GraphicsLayerCA.h:
257         * platform/graphics/cairo/FontCustomPlatformData.h:
258         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
259         * platform/graphics/cairo/PlatformContextCairo.h:
260         * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
261         * platform/graphics/cv/ImageRotationSessionVT.h:
262         (WebCore::ImageRotationSessionVT::RotationProperties::isIdentity const): Deleted.
263         (WebCore::ImageRotationSessionVT::transform const): Deleted.
264         (WebCore::ImageRotationSessionVT::rotationProperties const): Deleted.
265         (WebCore::ImageRotationSessionVT::size): Deleted.
266         (WebCore::ImageRotationSessionVT::rotatedSize): Deleted.
267         * platform/graphics/cv/PixelBufferConformerCV.h:
268         * platform/graphics/cv/TextureCacheCV.h:
269         * platform/graphics/cv/VideoTextureCopierCV.h:
270         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
271         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
272         * platform/graphics/gstreamer/VideoTextureCopierGStreamer.h:
273         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
274         * platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h:
275         * platform/graphics/iso/ISOBox.h:
276         * platform/graphics/iso/ISOOriginalFormatBox.h:
277         * platform/graphics/iso/ISOProtectionSchemeInfoBox.h:
278         * platform/graphics/iso/ISOSchemeInformationBox.h:
279         * platform/graphics/iso/ISOSchemeTypeBox.h:
280         * platform/graphics/iso/ISOTrackEncryptionBox.h:
281         * platform/graphics/iso/ISOVTTCue.cpp:
282         (WebCore::ISOStringBox::contents): Deleted.
283         * platform/graphics/iso/ISOVTTCue.h:
284         (WebCore::ISOWebVTTCue::boxTypeName): Deleted.
285         (WebCore::ISOWebVTTCue::presentationTime const): Deleted.
286         (WebCore::ISOWebVTTCue::duration const): Deleted.
287         (WebCore::ISOWebVTTCue::sourceID const): Deleted.
288         (WebCore::ISOWebVTTCue::id const): Deleted.
289         (WebCore::ISOWebVTTCue::originalStartTime const): Deleted.
290         (WebCore::ISOWebVTTCue::settings const): Deleted.
291         (WebCore::ISOWebVTTCue::cueText const): Deleted.
292         * platform/graphics/nicosia/NicosiaPaintingOperation.h:
293         * platform/graphics/nicosia/texmap/NicosiaBackingStoreTextureMapperImpl.h:
294         * platform/graphics/nicosia/texmap/NicosiaCompositionLayerTextureMapperImpl.h:
295         * platform/graphics/nicosia/texmap/NicosiaContentLayerTextureMapperImpl.h:
296         * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.h:
297         * platform/graphics/nicosia/texmap/NicosiaImageBackingTextureMapperImpl.h:
298         * platform/graphics/opengl/Extensions3DOpenGLCommon.h:
299         * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h:
300         * platform/graphics/texmap/coordinated/Tile.h:
301         * platform/graphics/win/FontCustomPlatformData.h:
302         * platform/graphics/win/FullScreenController.cpp:
303         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h:
304         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
305         * platform/graphics/win/PlatformContextDirect2D.h:
306         * platform/graphics/win/WKCAImageQueue.cpp:
307         * platform/gtk/PasteboardHelper.cpp:
308         * platform/ios/LegacyTileGrid.h:
309         * platform/mediarecorder/MediaRecorderPrivateAVFImpl.h:
310         * platform/mediastream/gstreamer/GStreamerAudioData.h:
311         (WebCore::GStreamerAudioData::GStreamerAudioData): Deleted.
312         (WebCore::GStreamerAudioData::getSample): Deleted.
313         (WebCore::GStreamerAudioData::getAudioInfo): Deleted.
314         (WebCore::GStreamerAudioData::kind const): Deleted.
315         * platform/mediastream/gstreamer/GStreamerCapturer.h:
316         * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
317         * platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.h:
318         * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
319         * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.h:
320         * platform/mediastream/libwebrtc/LibWebRTCDTMFSenderBackend.h:
321         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
322         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
323         * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.h:
324         * platform/mock/MediaPlaybackTargetPickerMock.h:
325         * platform/mock/RTCDataChannelHandlerMock.h:
326         * platform/network/ResourceErrorBase.h:
327         * platform/network/curl/CookieJarDB.h:
328         * platform/network/curl/CurlCacheEntry.h:
329         * platform/network/curl/CurlContext.h:
330         * platform/network/curl/CurlMultipartHandle.h:
331         * platform/network/curl/CurlRequestScheduler.h:
332         * platform/network/curl/CurlSSLVerifier.h:
333         * platform/network/ios/PreviewConverter.h:
334         * platform/network/soup/NetworkStorageSessionSoup.cpp:
335         * platform/vr/openvr/VRPlatformDisplayOpenVR.h:
336         * platform/vr/openvr/VRPlatformManagerOpenVR.h:
337         * rendering/HitTestResult.h:
338         * rendering/LayerOverlapMap.cpp:
339         * rendering/RenderLayerCompositor.h:
340         * rendering/svg/RenderSVGResourceMasker.h:
341         * replay/UserInputBridge.h:
342         * svg/graphics/filters/SVGFilterBuilder.h:
343         * svg/properties/SVGAttributeAnimator.h:
344         * svg/properties/SVGDecoratedProperty.h:
345         * svg/properties/SVGPropertyAnimatorFactory.h:
346         * testing/InternalSettings.cpp:
347         * testing/LegacyMockCDM.cpp:
348         * testing/LegacyMockCDM.h:
349         * testing/MockCDMFactory.h:
350         * workers/WorkerEventQueue.cpp:
351         * workers/WorkerEventQueue.h:
352         * workers/service/ServiceWorkerContainer.h:
353         * worklets/PaintWorkletGlobalScope.h:
354         * xml/XMLErrors.h:
355         * xml/parser/XMLDocumentParserLibxml2.cpp:
356
357 2019-08-15  Zalan Bujtas  <zalan@apple.com>
358
359         [ContentChangeObserver] Rename contentVisibilityDidChange to elementDidBecomeVisible
360         https://bugs.webkit.org/show_bug.cgi?id=200780
361         <rdar://problem/54358330>
362
363         Reviewed by Simon Fraser.
364
365         "elementDidBecomeVisible" name is more accurate and also we'll probably start tracking changes from visible to hidden soon.
366
367         * page/ios/ContentChangeObserver.cpp:
368         (WebCore::ContentChangeObserver::didFinishTransition):
369         (WebCore::ContentChangeObserver::visibilityChangedFromHiddenToVisible):
370         (WebCore::ContentChangeObserver::adjustObservedState):
371         (WebCore::ContentChangeObserver::StyleChangeScope::~StyleChangeScope):
372         (WebCore::ContentChangeObserver::contentVisibilityDidChange): Deleted.
373         * page/ios/ContentChangeObserver.h:
374
375 2019-08-15  Zalan Bujtas  <zalan@apple.com>
376
377         [ContentChangeObserver] Keep track of all the visibility candidates.
378         https://bugs.webkit.org/show_bug.cgi?id=200777
379         <rdar://problem/54356331>
380
381         Reviewed by Simon Fraser.
382
383         In order to find out whether a visible (and actionable) content change happened, we need to keep track of all the candidate elements.
384
385         Test: fast/events/touch/ios/content-observation/going-from-hidden-to-visible-and-to-hidden2.html
386
387         * page/ios/ContentChangeObserver.cpp:
388         (WebCore::ContentChangeObserver::reset):
389         (WebCore::ContentChangeObserver::rendererWillBeDestroyed):
390         (WebCore::ContentChangeObserver::contentVisibilityDidChange):
391         (WebCore::ContentChangeObserver::shouldObserveVisibilityChangeForElement):
392         * page/ios/ContentChangeObserver.h:
393
394 2019-08-15  Myles C. Maxfield  <mmaxfield@apple.com>
395
396         [WHLSL] Add unary plus
397         https://bugs.webkit.org/show_bug.cgi?id=200753
398
399         Reviewed by Saam Barati.
400
401         HLSL has these, so we should too.
402
403         Test: webgpu/whlsl/vector-matrix-addition-subtraction.html
404
405         * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
406
407 2019-08-15  Myles C. Maxfield  <mmaxfield@apple.com>
408
409         [WHLSL] Matrices should have constructors that take a flattened list of scalars
410         https://bugs.webkit.org/show_bug.cgi?id=200804
411
412         Reviewed by Saam Barati.
413
414         HLSL has them, so we should too.
415
416         Test: webgpu/whlsl/matrix-constructors-list-of-scalars.html
417
418         * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
419
420 2019-08-15  Sihui Liu  <sihui_liu@apple.com>
421
422         Use one VM per thread for IDB serialization work in network process
423         https://bugs.webkit.org/show_bug.cgi?id=200526
424
425         Reviewed by Geoffrey Garen.
426
427         We had one static VM in UniqueIDBDatabase for serialization/deserialization in MemoryObjectStore. This VM was 
428         never destroyed and could be used on different background threads.
429  
430         We also had one VM per SQLiteIDBBackingStore for serialization/deserialization in SQLiteIDBBackingStore. If 
431         there were multiple IndexedDB databases of the same session opened, we would have multiple VMs created
432         on the same thread. Each VM has its memory allocator and garbage collector, which takes up memory.
433  
434         To be more memory efficient and safe, we can use one VM per thread in the network process, and create/destroy
435         the VMs on demand.
436
437         * Modules/indexeddb/server/IDBSerializationContext.cpp: Added.
438         (WebCore::IDBServer::IDBSerializationContext::getOrCreateIDBSerializationContext):
439         (WebCore::IDBServer::IDBSerializationContext::~IDBSerializationContext):
440         (WebCore::IDBServer::IDBSerializationContext::initializeVM):
441         (WebCore::IDBServer::IDBSerializationContext::vm):
442         (WebCore::IDBServer::IDBSerializationContext::execState):
443         (WebCore::IDBServer::IDBSerializationContext::IDBSerializationContext):
444         * Modules/indexeddb/server/IDBSerializationContext.h: Added.
445         * Modules/indexeddb/server/IDBServer.cpp:
446         (WebCore::IDBServer::IDBServer::createBackingStore):
447         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
448         (WebCore::IDBServer::MemoryIDBBackingStore::create):
449         (WebCore::IDBServer::MemoryIDBBackingStore::MemoryIDBBackingStore):
450         (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
451         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
452         * Modules/indexeddb/server/MemoryObjectStore.cpp:
453         (WebCore::IDBServer::MemoryObjectStore::create):
454         (WebCore::IDBServer::MemoryObjectStore::MemoryObjectStore):
455         (WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord):
456         (WebCore::IDBServer::MemoryObjectStore::populateIndexWithExistingRecords):
457         * Modules/indexeddb/server/MemoryObjectStore.h:
458         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
459         (WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):
460         (WebCore::IDBServer::SQLiteIDBBackingStore::~SQLiteIDBBackingStore):
461         (WebCore::IDBServer::SQLiteIDBBackingStore::updateOneIndexForAddRecord):
462         (WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
463         (WebCore::IDBServer::SQLiteIDBBackingStore::initializeVM): Deleted.
464         (WebCore::IDBServer::SQLiteIDBBackingStore::vm): Deleted.
465         (WebCore::IDBServer::SQLiteIDBBackingStore::globalObject): Deleted.
466         * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
467         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
468         (WebCore::IDBServer::UniqueIDBDatabase::databaseThreadVM): Deleted.
469         (WebCore::IDBServer::UniqueIDBDatabase::databaseThreadExecState): Deleted.
470         * Modules/indexeddb/server/UniqueIDBDatabase.h:
471         * Sources.txt:
472
473 2019-08-15  Zalan Bujtas  <zalan@apple.com>
474
475         [ContentChangeObserver] Dispatch synthetic click when the visibility candidate element becomes hidden again.
476         https://bugs.webkit.org/show_bug.cgi?id=200773
477         <rdar://problem/54351728>
478
479         Reviewed by Simon Fraser.
480
481         This patch fixes the case when the candidate element (going from hidden to visible) becomes hidden by the end of the observation window. It essentially means that no visible change has happened
482         and we should proceed with dispatching the synthetic click event.
483         We now keep track of the candidate element and reset the visiblity state when it loses its renderer.
484
485         Test: fast/events/touch/ios/content-observation/going-from-hidden-to-visible-and-to-hidden.html
486
487         * page/ios/ContentChangeObserver.cpp:
488         (WebCore::ContentChangeObserver::didAddTransition):
489         (WebCore::ContentChangeObserver::didFinishTransition):
490         (WebCore::ContentChangeObserver::didInstallDOMTimer):
491         (WebCore::ContentChangeObserver::reset):
492         (WebCore::ContentChangeObserver::rendererWillBeDestroyed):
493         (WebCore::ContentChangeObserver::contentVisibilityDidChange):
494         (WebCore::ContentChangeObserver::touchEventDidStart):
495         (WebCore::ContentChangeObserver::touchEventDidFinish):
496         (WebCore::ContentChangeObserver::mouseMovedDidStart):
497         (WebCore::ContentChangeObserver::mouseMovedDidFinish):
498         (WebCore::ContentChangeObserver::adjustObservedState):
499         (WebCore::ContentChangeObserver::StyleChangeScope::~StyleChangeScope):
500         (WebCore::ContentChangeObserver::hasDeterminateState const): Deleted.
501         * page/ios/ContentChangeObserver.h:
502         (WebCore::ContentChangeObserver::hasObservedTransition const):
503         (WebCore::ContentChangeObserver::setTouchEventIsBeingDispatched):
504         (WebCore::ContentChangeObserver::isTouchEventBeingDispatched const):
505         (WebCore::ContentChangeObserver::setMouseMovedEventIsBeingDispatched):
506         (WebCore::ContentChangeObserver::isMouseMovedEventBeingDispatched const):
507         (WebCore::ContentChangeObserver::isObservingContentChanges const):
508
509 2019-08-15  Justin Fan  <justin_fan@apple.com>
510
511         Unreviewed suggested patch follow-up to https://bugs.webkit.org/show_bug.cgi?id=200740.
512
513         * platform/graphics/gpu/GPURequestAdapterOptions.h:
514         (): Deleted.
515
516 2019-08-15  Brent Fulgham  <bfulgham@apple.com>
517
518         [FTW] Support web fonts
519         https://bugs.webkit.org/show_bug.cgi?id=200771
520         <rdar://problem/54350291>
521
522         Reviewed by Dean Jackson.
523
524         The current code path for handling web fonts uses 'AddFontMemResourceEx'. Unfortunately, this only updates the font caches used by GDI, and is not exposed to DirectWrite.
525
526         This patch does the following:
527         1. Moves some code into a new DirectWriteUtilities file, similar to how Direct2D is handled, so we
528            can share code in more places.
529         2. After adding the font to GDI, it adds the font information to the DirectWrite font cache.
530         3. Add logic to check the overall system DirectWrite fonts, as well as the custom font cache used
531            for downloaded fonts.
532
533         * PlatformFTW.cmake: Add DirectWriteUtilities.cpp
534         * css/CSSFontFaceSource.cpp:
535         * loader/cache/CachedFont.cpp:
536         * loader/cache/CachedSVGFont.cpp:
537         * platform/graphics/Font.cpp:
538         * platform/graphics/Font.h:
539         * platform/graphics/FontCache.cpp:
540         * platform/graphics/FontPlatformData.cpp:
541         * platform/graphics/FontPlatformData.h:
542         * platform/graphics/opentype/OpenTypeUtilities.cpp:
543         (WebCore::renameAndActivateFont):
544         * platform/graphics/win/DirectWriteUtilities.cpp: Added.
545         * platform/graphics/win/DirectWriteUtilities.h: Added.
546         * platform/graphics/win/FontCacheWin.cpp:
547         (WebCore::createGDIFont):
548         * platform/graphics/win/FontCascadeDirect2D.cpp:
549         * platform/graphics/win/FontCustomPlatformData.cpp:
550         (WebCore::FontCustomPlatformData::fontPlatformData):
551         * platform/graphics/win/FontPlatformDataDirect2D.cpp:
552         (WebCore::FontPlatformData::platformDataInit):
553         (WebCore::FontPlatformData::FontPlatformData):
554         (WebCore::FontPlatformData::createFallbackFont):
555         * platform/graphics/win/FontPlatformDataWin.cpp:
556         * platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp:
557         (WebCore::GlyphPage::fill):
558         * platform/graphics/win/GraphicsContextDirect2D.cpp:
559         * platform/graphics/win/SimpleFontDataDirect2D.cpp:
560         (WebCore::Font::systemDWriteFactory): Deleted.
561         (WebCore::Font::systemDWriteGdiInterop): Deleted.
562         * platform/graphics/win/SimpleFontDataWin.cpp:
563
564 2019-08-15  Jer Noble  <jer.noble@apple.com>
565
566         [Cocoa] Adopt -preventDisplaySleepForVideoPlayback
567         https://bugs.webkit.org/show_bug.cgi?id=200774
568
569         Reviewed by Eric Carlson.
570
571         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
572         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
573
574 2019-08-15  Robin Morisset  <rmorisset@apple.com>
575
576         [WHLSL] Don't accept operator&& or operator|| in the Lexer
577         https://bugs.webkit.org/show_bug.cgi?id=200785
578
579         Reviewed by Saam Barati.
580
581         Implementing && or || as function calls would lose us short-circuiting.
582
583         2 new tests in LayoutTests/webgpu/whlsl/lexing.html
584
585         * Modules/webgpu/WHLSL/WHLSLLexer.cpp:
586         (WebCore::WHLSL::Lexer::consumeTokenFromStream):
587
588 2019-08-15  Saam Barati  <sbarati@apple.com>
589
590         Unreviewed. Debug build fix after r248730.
591
592         * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
593         (WebCore::WHLSL::Metal::inlineNativeFunction):
594
595 2019-08-15  Devin Rousso  <drousso@apple.com>
596
597         Web Inspector: support `console.screenshot` with detached <canvas>
598         https://bugs.webkit.org/show_bug.cgi?id=200723
599
600         Reviewed by Joseph Pecoraro.
601
602         * page/PageConsoleClient.cpp:
603         (WebCore::snapshotCanvas): Added.
604         (WebCore::PageConsoleClient::screenshot):
605
606 2019-08-15  Sihui Liu  <sihui_liu@apple.com>
607
608         Some improvements on web storage
609         https://bugs.webkit.org/show_bug.cgi?id=200373
610
611         Reviewed by Geoffrey Garen.
612
613         Remove storage type EphemeralLocalStorage, which is used for localStorage in ephemeral session, and use 
614         LocalStorage instead.
615
616         Add SessionID to StorageNamespace to make StorageNamespace session-specific.
617
618         No new test, updating existing tests for new behavior.
619
620         * loader/EmptyClients.cpp:
621         (WebCore::EmptyStorageNamespaceProvider::createLocalStorageNamespace):
622         (WebCore::EmptyStorageNamespaceProvider::createTransientLocalStorageNamespace):
623         (WebCore::EmptyStorageNamespaceProvider::createEphemeralLocalStorageNamespace): Deleted.
624
625         * page/Chrome.cpp:
626         (WebCore::Chrome::createWindow const): ephemeral localStorage of different windows will connect to the same 
627         StorageArea in network process, so no need to copy from parent window to child window.
628
629         * page/DOMWindow.cpp:
630         (WebCore::DOMWindow::prewarmLocalStorageIfNecessary): localStorage will be prewarmed in network process in the
631         initialization of StorageAreaMap.
632
633         * page/Page.cpp:
634         (WebCore::m_applicationManifest):
635         (WebCore::Page::~Page):
636         (WebCore::Page::setSessionID):
637         (WebCore::Page::ephemeralLocalStorage): Deleted.
638         (WebCore::Page::setEphemeralLocalStorage): Deleted.
639         (WebCore::Page::setStorageNamespaceProvider): Deleted.
640         * page/Page.h:
641         (WebCore::Page::storageNamespaceProvider):
642         * storage/Storage.cpp:
643         (WebCore::Storage::prewarm): Deleted.
644         * storage/Storage.h:
645         * storage/StorageArea.h:
646         (WebCore::StorageArea::closeDatabaseIfIdle):
647         (WebCore::StorageArea::prewarm): Deleted.
648         * storage/StorageNamespace.h:
649         * storage/StorageNamespaceProvider.cpp:
650         (WebCore::StorageNamespaceProvider::~StorageNamespaceProvider):
651         (WebCore::StorageNamespaceProvider::localStorageArea):
652         (WebCore::StorageNamespaceProvider::localStorageNamespace):
653         (WebCore::StorageNamespaceProvider::transientLocalStorageNamespace):
654         (WebCore::StorageNamespaceProvider::enableLegacyPrivateBrowsingForTesting): change SessionID of storageNamespace
655         and update every StorageArea in this namespace.
656         (WebCore::StorageNamespaceProvider::addPage): Deleted.
657         (WebCore::StorageNamespaceProvider::removePage): Deleted.
658         * storage/StorageNamespaceProvider.h:
659         * storage/StorageType.h:
660         (WebCore::isLocalStorage):
661
662 2019-08-15  Saam Barati  <sbarati@apple.com>
663
664         [WHLSL] Make length, clamp, operator+, operator-, operator*, operator/, operator[], operator[]=, operator.xy, operator.xy=, native
665         https://bugs.webkit.org/show_bug.cgi?id=200700
666
667         Reviewed by Robin Morisset.
668
669         This makes us 50% faster in compute_boids.
670
671         Tests: webgpu/whlsl/clamp-stdlib.html
672                webgpu/whlsl/length-stdlib.html
673                webgpu/whlsl/operator-div.html
674                webgpu/whlsl/operator-minus.html
675                webgpu/whlsl/operator-plus.html
676                webgpu/whlsl/operator-times.html
677                webgpu/whlsl/operator-vector-assign.html
678                webgpu/whlsl/operator-vector-load.html
679                webgpu/whlsl/operator-xy.html
680
681         * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
682         (WebCore::WHLSL::Metal::inlineNativeFunction):
683         * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
684         * Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.cpp:
685         (WebCore::WHLSL::includeStandardLibrary):
686
687 2019-08-15  Robin Morisset  <rmorisset@apple.com>
688
689         [WHLSL] Trivial clean-up of the MSL code generated
690         https://bugs.webkit.org/show_bug.cgi?id=200525
691
692         Reviewed by Darin Adler.
693
694         Emit simpler code for ternary expressions
695         Remove duplicate {} around functions
696
697         No new tests as it is covered by the existing ones.
698
699         * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
700         (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
701
702 2019-08-15  Youenn Fablet  <youenn@apple.com>
703
704         Always create a Document with a valid SessionID
705         https://bugs.webkit.org/show_bug.cgi?id=200727
706
707         Reviewed by Alex Christensen.
708
709         Pass a valid SessionID to the Document constructor.
710         This allows getting us closer to use SessionID like ObjectIdentifier.
711         Add a SessionID getter from Frame and use it when constructing a Document.
712         Otherwise, retrieve the SessionID from the corresponding context.
713         No change of behavior.
714
715         * dom/DOMImplementation.cpp:
716         (WebCore::createXMLDocument):
717         (WebCore::DOMImplementation::createDocument):
718         (WebCore::DOMImplementation::createHTMLDocument):
719         * dom/DOMImplementation.h:
720         * dom/Document.cpp:
721         (WebCore::Document::Document):
722         (WebCore::m_undoManager):
723         (WebCore::Document::create):
724         (WebCore::Document::createNonRenderedPlaceholder):
725         (WebCore::Document::cloneDocumentWithoutChildren const):
726         (WebCore::Document::ensureTemplateDocument):
727         * dom/Document.h:
728         (WebCore::Document::create):
729         (WebCore::Document::createNonRenderedPlaceholder): Deleted.
730         * dom/XMLDocument.h:
731         (WebCore::XMLDocument::create):
732         (WebCore::XMLDocument::createXHTML):
733         (WebCore::XMLDocument::XMLDocument):
734         * html/FTPDirectoryDocument.cpp:
735         (WebCore::FTPDirectoryDocument::FTPDirectoryDocument):
736         * html/FTPDirectoryDocument.h:
737         * html/HTMLDocument.cpp:
738         (WebCore::HTMLDocument::createSynthesizedDocument):
739         (WebCore::HTMLDocument::HTMLDocument):
740         (WebCore::HTMLDocument::cloneDocumentWithoutChildren const):
741         * html/HTMLDocument.h:
742         (WebCore::HTMLDocument::create):
743         (WebCore::HTMLDocument::createSynthesizedDocument): Deleted.
744         * html/ImageDocument.cpp:
745         (WebCore::ImageDocument::ImageDocument):
746         * html/MediaDocument.cpp:
747         (WebCore::MediaDocument::MediaDocument):
748         * html/MediaDocument.h:
749         * html/PluginDocument.cpp:
750         (WebCore::PluginDocument::PluginDocument):
751         * html/PluginDocument.h:
752         * html/TextDocument.cpp:
753         (WebCore::TextDocument::TextDocument):
754         * html/TextDocument.h:
755         * inspector/DOMPatchSupport.cpp:
756         (WebCore::DOMPatchSupport::patchDocument):
757         * loader/DocumentWriter.cpp:
758         (WebCore::DocumentWriter::createDocument):
759         (WebCore::DocumentWriter::begin):
760         * loader/SinkDocument.cpp:
761         (WebCore::SinkDocument::SinkDocument):
762         * loader/SinkDocument.h:
763         * loader/cache/CachedSVGDocument.cpp:
764         (WebCore::CachedSVGDocument::finishLoading):
765         * loader/cache/CachedSVGFont.cpp:
766         (WebCore::CachedSVGFont::ensureCustomFontData):
767         * page/Frame.cpp:
768         (WebCore::Frame::sessionID const):
769         * page/Frame.h:
770         * svg/SVGDocument.cpp:
771         (WebCore::SVGDocument::SVGDocument):
772         (WebCore::SVGDocument::cloneDocumentWithoutChildren const):
773         * svg/SVGDocument.h:
774         (WebCore::SVGDocument::create):
775         * xml/DOMParser.cpp:
776         (WebCore::DOMParser::parseFromString):
777         * xml/DOMParser.h:
778         * xml/DOMParser.idl:
779         * xml/XMLHttpRequest.cpp:
780         * xml/XSLTProcessor.cpp:
781         (WebCore::XSLTProcessor::createDocumentFromSource):
782
783 2019-08-15  Antti Koivisto  <antti@apple.com>
784
785         Negative size box with border radius causes hang under WebCore::approximateAsRegion
786         https://bugs.webkit.org/show_bug.cgi?id=200769
787         <rdar://problem/53380674>
788
789         Reviewed by Alex Christensen.
790
791         If a box's width or height computes negative the rounded border rect will also be negative.
792         This caused near-infinite loop during rounded border region approximation.
793
794         Test: fast/css/border-radius-negative-size.html
795
796         * platform/graphics/RoundedRect.cpp:
797         (WebCore::approximateAsRegion):
798
799         Bail out if the region is empty (which includes negative sizes).
800         For safety also limit the number of rectangles we generate for corner arc approximation.
801
802 2019-08-15  Thibault Saunier  <tsaunier@igalia.com>
803
804         [GStreamer] Deal with slow buffer consumption in GStreamerMediaStreamSource
805         https://bugs.webkit.org/show_bug.cgi?id=200633
806
807         Refactoring the GStreamerMediaStreamSource factoring out streams specific
808         data in a dedicated structure.
809
810         Reviewed by Philippe Normand.
811
812         No new tests, since I do not see how to reproduce that in a test in a simple way,
813         this aims at enhancing user experience when running under high load.
814
815         * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
816         (WebCore::_WebKitMediaStreamSrc::SourceData::reset):
817         (WebCore::_WebKitMediaStreamSrc::SourceData::src):
818         (WebCore::_WebKitMediaStreamSrc::SourceData::setSrc):
819         (WebCore::_WebKitMediaStreamSrc::SourceData::isUsed):
820         (WebCore::_WebKitMediaStreamSrc::SourceData::pushSample):
821         (WebCore::webkitMediaStreamSrcDispose):
822         (WebCore::webkit_media_stream_src_init):
823         (WebCore::webkitMediaStreamSrcNeedDataCb):
824         (WebCore::webkitMediaStreamSrcEnoughDataCb):
825         (WebCore::webkitMediaStreamSrcSetupAppSrc):
826         (WebCore::webkitMediaStreamSrcRemoveTrackByType):
827         (WebCore::webkitMediaStreamSrcPushVideoSample):
828         (WebCore::webkitMediaStreamSrcPushAudioSample):
829
830 2019-08-15  Youenn Fablet  <youenn@apple.com>
831
832         Make mock libwebrtc tests run with unified plan
833         https://bugs.webkit.org/show_bug.cgi?id=200713
834
835         Reviewed by Alex Christensen.
836
837         Update mock endpoint to pass mock webrtc tests with unified plan.
838         This requires implementing support for mock transceivers.
839         Covered by existing tests.
840
841         * testing/Internals.cpp:
842         (WebCore::Internals::useMockRTCPeerConnectionFactory):
843         Update assert to mandate unified plan.
844         * testing/MockLibWebRTCPeerConnection.cpp:
845         (WebCore::MockLibWebRTCPeerConnection::~MockLibWebRTCPeerConnection):
846         (WebCore::MockLibWebRTCPeerConnection::GetTransceivers const):
847         (WebCore::MockLibWebRTCPeerConnection::AddTrack):
848         (WebCore::MockLibWebRTCPeerConnection::RemoveTrack):
849         (WebCore::MockLibWebRTCPeerConnection::CreateOffer):
850         (WebCore::MockLibWebRTCPeerConnection::CreateAnswer):
851         * testing/MockLibWebRTCPeerConnection.h:
852         (WebCore::MockRtpSender::MockRtpSender):
853         (WebCore::MockRtpReceiver::id const):
854         (WebCore::MockRtpReceiver::GetParameters const):
855         (WebCore::MockRtpReceiver::SetParameters):
856         (WebCore::MockRtpReceiver::SetObserver):
857         (WebCore::MockRtpTransceiver::MockRtpTransceiver):
858         (WebCore::MockLibWebRTCPeerConnection::MockLibWebRTCPeerConnection):
859         (WebCore::MockLibWebRTCPeerConnection::gotLocalDescription):
860
861 2019-08-15  Chris Dumez  <cdumez@apple.com>
862
863         Unreviewed WinCairo build fix after r248713.
864
865         * platform/network/curl/NetworkStorageSessionCurl.cpp:
866         (WebCore::NetworkStorageSession::setCookiesFromDOM const):
867         (WebCore::NetworkStorageSession::cookiesForDOM const):
868         (WebCore::NetworkStorageSession::getRawCookies const):
869         (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const):
870
871 2019-08-15  Simon Fraser  <simon.fraser@apple.com>
872
873         Use ObjectIdentifier<FrameIdentifierType> for frameIDs
874         https://bugs.webkit.org/show_bug.cgi?id=199986
875
876         Reviewed by Ryosuke Niwa.
877
878         Use the strongly-typed FrameIdentifier instead of uint64_t as frame identifiers everywhere.
879
880         * WebCore.xcodeproj/project.pbxproj:
881         * loader/CookieJar.cpp:
882         (WebCore::CookieJar::cookies const):
883         (WebCore::CookieJar::setCookies):
884         (WebCore::CookieJar::cookieRequestHeaderFieldValue const):
885         (WebCore::CookieJar::getRawCookies const):
886         * loader/CookieJar.h:
887         * loader/EmptyFrameLoaderClient.h:
888         * loader/FrameLoaderClient.h:
889         * loader/NavigationAction.cpp:
890         * loader/NavigationAction.h:
891         (WebCore::NavigationAction::Requester::frameID const):
892         * page/ChromeClient.h:
893         * page/GlobalFrameIdentifier.h:
894         (WebCore::GlobalFrameIdentifier::decode):
895         * platform/network/CookieRequestHeaderFieldProxy.h:
896         * platform/network/NetworkStorageSession.cpp:
897         (WebCore::NetworkStorageSession::shouldBlockCookies const):
898         (WebCore::NetworkStorageSession::hasStorageAccess const):
899         (WebCore::NetworkStorageSession::grantStorageAccess):
900         (WebCore::NetworkStorageSession::removeStorageAccessForFrame):
901         * platform/network/NetworkStorageSession.h:
902         * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
903         (WebCore::cookiesForURL):
904         (WebCore::cookiesForSession):
905         (WebCore::NetworkStorageSession::cookiesForDOM const):
906         (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const):
907         (WebCore::NetworkStorageSession::setCookiesFromDOM const):
908         (WebCore::NetworkStorageSession::getRawCookies const):
909
910 2019-08-15  Thibault Saunier  <tsaunier@igalia.com>
911
912         [GStreamer][WebRTC]: openh264 encoder bitrate is in bits per second
913         https://bugs.webkit.org/show_bug.cgi?id=200578
914
915         Reviewed by Philippe Normand.
916
917         Not really testable as is.
918
919         * platform/mediastream/libwebrtc/GStreamerVideoEncoder.cpp:
920         (gst_webrtc_video_encoder_class_init):
921
922 2019-08-14  Alexey Shvayka  <shvaikalesh@gmail.com>
923
924         Error thrown during "acceptNode" lookup is overridden
925         https://bugs.webkit.org/show_bug.cgi?id=200735
926
927         Reviewed by Ross Kirsling.
928
929         Test: imported/w3c/web-platform-tests/dom/traversal/TreeWalker-acceptNode-filter-expected.html
930
931         * bindings/js/JSCallbackData.cpp:
932         (WebCore::JSCallbackData::invokeCallback): Catch and return exception of callback->get call.
933
934 2019-08-14  Myles C. Maxfield  <mmaxfield@apple.com>
935
936         [WHLSL] Variables shouldn't be able to have void type
937         https://bugs.webkit.org/show_bug.cgi?id=200751
938
939         Reviewed by Robin Morisset.
940
941         Trivial fix. Found by https://github.com/gpuweb/WHLSL/issues/320.
942
943         Test: webgpu/whlsl/void-variable-parameter.html
944
945         * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
946         (WebCore::WHLSL::Checker::visit):
947
948 2019-08-14  Justin Fan  <justin_fan@apple.com>
949
950         [WebGPU] Use of WebGPU should not force discrete GPU
951         https://bugs.webkit.org/show_bug.cgi?id=200740
952
953         Reviewed by Myles C. Maxfield.
954
955         Request a low-power device from Metal by default.
956
957         No change in testable behavior.
958
959         * platform/graphics/gpu/GPURequestAdapterOptions.h:
960         * platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
961         (WebCore::GPUDevice::tryCreate):
962
963 2019-08-14  Chris Dumez  <cdumez@apple.com>
964
965         Potentially non thread-safe usage of WebCore::MediaSample
966         https://bugs.webkit.org/show_bug.cgi?id=200734
967
968         Reviewed by Eric Carlson.
969
970         ImageSource is a main thread object but ends up getting passed to a background queue for image
971         decoding. In some cases, the background queue ends up being the last one holding a ref to the
972         ImageSource which ends up destroying the ImageSource on a background thread. Doing so is not
973         safe as shown by the crash.
974
975         To address the issue, have ImageSource subclass ThreadSafeRefCounted<ImageSource, WTF::DestructionThread::Main>
976         so that it is always destroyed on the main thread.
977
978         No new tests, currently crashing on the debug bots.
979
980         * platform/graphics/ImageSource.cpp:
981         (WebCore::ImageSource::ImageSource):
982         (WebCore::ImageSource::~ImageSource):
983         * platform/graphics/ImageSource.h:
984
985 2019-08-14  Ryan Haddad  <ryanhaddad@apple.com>
986
987         Unreviewed, rolling out r248526.
988
989         Caused two IndexedDB perf tests to fail
990
991         Reverted changeset:
992
993         "Remove IDB-specific quota"
994         https://bugs.webkit.org/show_bug.cgi?id=196545
995         https://trac.webkit.org/changeset/248526
996
997 2019-08-14  Keith Rollin  <krollin@apple.com>
998
999         Remove support for macOS < 10.13
1000         https://bugs.webkit.org/show_bug.cgi?id=200694
1001         <rdar://problem/54278851>
1002
1003         Reviewed by Youenn Fablet.
1004
1005         Update conditionals that reference __MAC_OS_X_VERSION_MIN_REQUIRED and
1006         __MAC_OS_X_VERSION_MAX_ALLOWED, assuming that they both have values >=
1007         101300. This means that expressions like
1008         "__MAC_OS_X_VERSION_MIN_REQUIRED < 101300" are always False and
1009         "__MAC_OS_X_VERSION_MIN_REQUIRED >= 101300" are always True.
1010
1011         No new tests -- no added or changed functionality.
1012
1013         * Modules/applepay/cocoa/PaymentContactCocoa.mm:
1014         (WebCore::subLocality):
1015         (WebCore::setSubLocality):
1016         (WebCore::subAdministrativeArea):
1017         (WebCore::setSubAdministrativeArea):
1018         * WebCorePrefix.h:
1019         * crypto/mac/CryptoKeyRSAMac.cpp:
1020         * editing/cocoa/WebContentReaderCocoa.mm:
1021         * page/mac/TextIndicatorWindow.mm:
1022         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
1023         * platform/PlatformScreen.h:
1024         * platform/cocoa/NetworkExtensionContentFilter.mm:
1025         (WebCore::NetworkExtensionContentFilter::initialize):
1026         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1027         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesLastModifiedTime const):
1028         (WebCore::MediaPlayerPrivateAVFoundationObjC::liveUpdateInterval const):
1029         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1030         (WebCore::FontDatabase::fontForPostScriptName):
1031         (WebCore::variationCapabilitiesForFontDescriptor):
1032         (WebCore::FontCache::lastResortFallbackFont):
1033         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1034         (WebCore::cascadeToLastResortAndVariationsFontDescriptor):
1035         * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
1036         (WebCore::setGPUByRegistryID):
1037         (WebCore::GraphicsContext3D::GraphicsContext3D):
1038         (WebCore::GraphicsContext3D::screenDidChange):
1039         (WebCore::setGPUByDisplayMask): Deleted.
1040         * platform/graphics/cv/VideoTextureCopierCV.cpp:
1041         * platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
1042         (WebCore::isAcceptableDevice):
1043         * platform/graphics/mac/FontCacheMac.mm:
1044         (WebCore::platformFontWithFamilySpecialCase):
1045         * platform/graphics/mac/FontCustomPlatformData.cpp:
1046         (WebCore::createFontCustomPlatformData):
1047         * platform/mac/DragImageMac.mm:
1048         (WebCore::LinkImageLayout::LinkImageLayout):
1049         (WebCore::createDragImageForLink):
1050         * platform/mac/PlatformScreenMac.mm:
1051         (WebCore::collectScreenProperties):
1052         (WebCore::gpuIDForDisplayMask):
1053         * platform/mac/WebPlaybackControlsManager.h:
1054         * platform/mac/WebPlaybackControlsManager.mm:
1055         (toAVTouchBarMediaSelectionOptionType):
1056         (mediaSelectionOptions):
1057         (-[WebPlaybackControlsManager generateFunctionBarThumbnailsForTimes:size:completionHandler:]): Deleted.
1058         (-[WebPlaybackControlsManager generateFunctionBarAudioAmplitudeSamples:completionHandler:]): Deleted.
1059         (-[WebPlaybackControlsManager canBeginFunctionBarScrubbing]): Deleted.
1060         (-[WebPlaybackControlsManager beginFunctionBarScrubbing]): Deleted.
1061         (-[WebPlaybackControlsManager endFunctionBarScrubbing]): Deleted.
1062         * rendering/RenderThemeMac.mm:
1063         (WebCore::RenderThemeMac::platformActiveTextSearchHighlightColor const):
1064         (WebCore::RenderThemeMac::systemColor const):
1065
1066 2019-08-14  Zalan Bujtas  <zalan@apple.com>
1067
1068         [ContentChangeObserver] Any previously destroyed renderer should not be considered a candidate for content observation.
1069         https://bugs.webkit.org/show_bug.cgi?id=200732
1070         <rdar://problem/54319654>
1071
1072         Reviewed by Simon Fraser.
1073
1074         A visible element should not be considered a candidate to content change observation when it loses the visiblity status momentarily.
1075         This patch extends the check of re-constructed renderers for the duration of the content change observation (as opposed to just a single render tree update cycle)
1076
1077         Test: fast/events/touch/ios/content-observation/visible-content-gains-new-renderer2.html
1078
1079         * page/ios/ContentChangeObserver.cpp:
1080         (WebCore::ContentChangeObserver::reset):
1081         (WebCore::ContentChangeObserver::rendererWillBeDestroyed):
1082         (WebCore::ContentChangeObserver::adjustObservedState):
1083         (WebCore::ContentChangeObserver::renderTreeUpdateDidStart): Deleted.
1084         (WebCore::ContentChangeObserver::renderTreeUpdateDidFinish): Deleted.
1085         (WebCore::ContentChangeObserver::stopContentObservation): Deleted.
1086         (WebCore::ContentChangeObserver::willDestroyRenderer): Deleted.
1087         (WebCore::ContentChangeObserver::RenderTreeUpdateScope::RenderTreeUpdateScope): Deleted.
1088         (WebCore::ContentChangeObserver::RenderTreeUpdateScope::~RenderTreeUpdateScope): Deleted.
1089         * page/ios/ContentChangeObserver.h:
1090         (WebCore::ContentChangeObserver::isObservingContentChanges const):
1091         * rendering/RenderElement.cpp:
1092         (WebCore::RenderElement::willBeDestroyed):
1093         * rendering/updating/RenderTreeUpdater.cpp:
1094         (WebCore::RenderTreeUpdater::updateRenderTree):
1095         (WebCore::RenderTreeUpdater::tearDownRenderers):
1096
1097 2019-08-14  Andy Estes  <aestes@apple.com>
1098
1099         [Cocoa] Add some WKA extension points
1100         https://bugs.webkit.org/show_bug.cgi?id=200506
1101         <rdar://problem/51682474>
1102
1103         Reviewed by Tim Horton.
1104
1105         * Modules/applepay/ApplePayPayment.h:
1106         * Modules/applepay/ApplePayPaymentMethod.h:
1107         * Modules/applepay/ApplePayRequestBase.cpp:
1108         (WebCore::finishConverting):
1109         (WebCore::convertAndValidate):
1110         * Modules/applepay/ApplePayRequestBase.h:
1111         * Modules/applepay/ApplePaySessionPaymentRequest.h:
1112         * Modules/applepay/PaymentCoordinatorClient.cpp:
1113         (WebCore::PaymentCoordinatorClient::supportsVersion):
1114         * Modules/applepay/cocoa/PaymentCocoa.mm:
1115         (WebCore::convert):
1116         * Modules/applepay/cocoa/PaymentMethodCocoa.mm:
1117         (WebCore::finishConverting):
1118         (WebCore::convert):
1119
1120 2019-08-14  Devin Rousso  <drousso@apple.com>
1121
1122         Web Inspector: support `console.screenshot` with dataURL strings
1123         https://bugs.webkit.org/show_bug.cgi?id=199307
1124
1125         Reviewed by Joseph Pecoraro.
1126
1127         Test: inspector/console/console-screenshot.html
1128
1129         * page/PageConsoleClient.cpp:
1130         (WebCore::PageConsoleClient::screenshot):
1131
1132 2019-08-14  Zalan Bujtas  <zalan@apple.com>
1133
1134         [ContentChangeObserver] Stop content change observation explicitly.
1135         https://bugs.webkit.org/show_bug.cgi?id=200689
1136         <rdar://problem/54274887>
1137
1138         Reviewed by Simon Fraser.
1139
1140         This helps to clean up some temporary state. There are 2 exit points when content observation needs to stop.
1141         1. Soon after the synthetic mouseMove event when we decide not to continue with further observation (see WebPage::handleSyntheticClick)
1142         2. When we asynchronously notify the client about the visible content change after all pending events have been processed.
1143
1144         * page/ios/ContentChangeObserver.cpp:
1145         (WebCore::ContentChangeObserver::stopContentObservation):
1146         (WebCore::ContentChangeObserver::adjustObservedState):
1147         * page/ios/ContentChangeObserver.h:
1148         (WebCore::ContentChangeObserver::stopContentObservation const):
1149         (WebCore::ContentChangeObserver::isObservingContentChanges const):
1150         (WebCore::ContentChangeObserver::observedContentChange const): Deleted.
1151
1152 2019-08-14  Youenn Fablet  <youenn@apple.com>
1153
1154         Update Worker::notifyFinished to not use emptySessionID
1155         https://bugs.webkit.org/show_bug.cgi?id=200710
1156
1157         Reviewed by Alex Christensen.
1158
1159         No change of behavior.
1160
1161         Exit early if context is gone since we should not dispatch events or create worker.
1162         Make sure to unset pending activity using a ScopeExit.
1163
1164         * workers/Worker.cpp:
1165         (WebCore::Worker::notifyFinished):
1166
1167 2019-08-14  Zalan Bujtas  <zalan@apple.com>
1168
1169         [LFC][TFC] Implement TableFormattingContext::computePreferredWidthForColumns
1170         https://bugs.webkit.org/show_bug.cgi?id=200701
1171         <rdar://problem/54287828>
1172
1173         Reviewed by Antti Koivisto.
1174
1175         Compute cells' min/max width first.
1176
1177         * layout/tableformatting/TableFormattingContext.cpp:
1178         (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns const):
1179         * layout/tableformatting/TableGrid.cpp:
1180         (WebCore::Layout::TableGrid::slot):
1181         (WebCore::Layout::TableGrid::appendCell):
1182         * layout/tableformatting/TableGrid.h:
1183         (WebCore::Layout::TableGrid::cells):
1184
1185 2019-08-14  Youenn Fablet  <youenn@apple.com>
1186
1187         ThreadableBlobRegistry::blobSize should take a SessionID as parameter
1188         https://bugs.webkit.org/show_bug.cgi?id=200671
1189
1190         Reviewed by Alex Christensen.
1191
1192         Update FormData to compute its byte size based on a SessionID.
1193         We keep a WK1 byte length computation for FormDataElement.
1194         Update FormData call sites accordingly.
1195         Update CacheStorageConnection to implement a SessionID getter.
1196         No change of behavior.
1197
1198         * Modules/cache/CacheStorageConnection.cpp:
1199         (WebCore::CacheStorageConnection::computeRealBodySize):
1200         (WebCore::computeRealBodySize): Deleted.
1201         * Modules/cache/CacheStorageConnection.h:
1202         * Modules/cache/WorkerCacheStorageConnection.cpp:
1203         (WebCore::WorkerCacheStorageConnection::sessionID const):
1204         * Modules/cache/WorkerCacheStorageConnection.h:
1205         * fileapi/Blob.cpp:
1206         (WebCore::Blob::size const):
1207         * fileapi/ThreadableBlobRegistry.cpp:
1208         (WebCore::ThreadableBlobRegistry::blobSize):
1209         * fileapi/ThreadableBlobRegistry.h:
1210         * loader/cache/KeepaliveRequestTracker.cpp:
1211         (WebCore::KeepaliveRequestTracker::tryRegisterRequest):
1212         (WebCore::KeepaliveRequestTracker::registerRequest):
1213         (WebCore::KeepaliveRequestTracker::unregisterRequest):
1214         * page/CacheStorageProvider.h:
1215         (WebCore::CacheStorageProvider::createCacheStorageConnection):
1216         * platform/network/BlobRegistry.h:
1217         * platform/network/FormData.cpp:
1218         (WebCore::computeLengthInBytes):
1219         (WebCore::FormDataElement::lengthInBytes const):
1220         (WebCore::FormData::lengthInBytes const):
1221         * platform/network/FormData.h:
1222         * platform/network/cf/FormDataStreamCFNet.cpp:
1223         (WebCore::createHTTPBodyCFReadStream):
1224         * platform/network/curl/CurlFormDataStream.cpp:
1225         (WebCore::m_sessionID):
1226         (WebCore::CurlFormDataStream::computeContentLength):
1227         (WebCore::CurlFormDataStream::CurlFormDataStream): Deleted.
1228         * platform/network/curl/CurlFormDataStream.h:
1229         * platform/network/curl/CurlRequest.cpp:
1230         (WebCore::CurlRequest::CurlRequest):
1231         * platform/network/curl/CurlRequest.h:
1232         (WebCore::CurlRequest::create):
1233
1234         * xml/XMLHttpRequest.cpp:
1235         (WebCore::XMLHttpRequest::createRequest):
1236
1237 2019-08-14  Antti Koivisto  <antti@apple.com>
1238
1239         Remove TouchActionData
1240         https://bugs.webkit.org/show_bug.cgi?id=199668
1241
1242         * dom/Element.cpp:
1243         (WebCore::Element::nearestScrollingNodeIDUsingTouchOverflowScrolling const): Deleted.
1244
1245         As a follow-up also remove this now-unused function.
1246
1247         * dom/Element.h:
1248
1249 2019-08-14  Youenn Fablet  <youenn@apple.com>
1250
1251         Remove SessionID default constructor
1252         https://bugs.webkit.org/show_bug.cgi?id=200669
1253
1254         Reviewed by Alex Christensen.
1255
1256         Remove SessionID default constructor
1257
1258         Update CookieRequestHeaderFiledProxy decoder to use an Optional<SessionID>.
1259         Update ServiceWorkerContextData accordingly.
1260         Update RegistrationStore/RegistrationDatabase to store a map of changed registration as follows:
1261         - The RegistrationStore map contains an Optional value. In case of removing, the map will contain WTF::nullopt.
1262         - RegistrationDatabase computes two vectors for removed registrations and updated registrations.
1263
1264         No change of behavior.
1265
1266         * dom/Document.cpp:
1267         * loader/CookieJar.cpp:
1268         (WebCore::CookieJar::cookieRequestHeaderFieldProxy):
1269         * platform/network/CookieRequestHeaderFieldProxy.h:
1270         (WebCore::CookieRequestHeaderFieldProxy::decode):
1271         * workers/Worker.cpp:
1272         (WebCore::Worker::notifyFinished):
1273         * workers/service/ServiceWorkerContextData.h:
1274         (WebCore::ServiceWorkerContextData::decode):
1275         * workers/service/server/RegistrationDatabase.cpp:
1276         (WebCore::RegistrationDatabase::pushChanges):
1277         (WebCore::RegistrationDatabase::doPushChanges):
1278         * workers/service/server/RegistrationDatabase.h:
1279         * workers/service/server/RegistrationStore.cpp:
1280         (WebCore::RegistrationStore::pushChangesToDatabase):
1281         (WebCore::RegistrationStore::clearAll):
1282         (WebCore::RegistrationStore::flushChanges):
1283         (WebCore::RegistrationStore::startSuspension):
1284         (WebCore::RegistrationStore::removeRegistration):
1285         * workers/service/server/RegistrationStore.h:
1286
1287 2019-08-14  Youenn Fablet  <youenn@apple.com>
1288
1289         Make privateBrowsingStateDidChange take an explicit SessionID
1290         https://bugs.webkit.org/show_bug.cgi?id=200666
1291
1292         Reviewed by Alex Christensen.
1293
1294         Instead of stating that the page session ID changed and get it from the page,
1295         pass it directly to privateBrowsingStateDidChange.
1296         No change of behavior.
1297
1298         * dom/Document.cpp:
1299         (WebCore::Document::privateBrowsingStateDidChange):
1300         * dom/Document.h:
1301         * dom/Element.h:
1302         (WebCore::Element::privateBrowsingStateDidChange):
1303         * html/HTMLMediaElement.cpp:
1304         (WebCore::HTMLMediaElement::privateBrowsingStateDidChange):
1305         * html/HTMLMediaElement.h:
1306         * page/Page.cpp:
1307         (WebCore::Page::setSessionID):
1308
1309 2019-08-13  Sam Weinig  <weinig@apple.com>
1310
1311         Fix the WPE build.
1312
1313         * platform/libwpe/PlatformKeyboardEventLibWPE.cpp:
1314         (WebCore::PlatformKeyboardEvent::keyValueForWPEKeyCode):
1315         (WebCore::PlatformKeyboardEvent::singleCharacterString):
1316         Update for rename from StringBuilder::append(UChar32) to StringBuilder::appendCharacter(UChar32).
1317
1318 2019-08-13  Sam Weinig  <weinig@apple.com>
1319
1320         Rename StringBuilder::append(UChar32) to StringBuilder::appendCharacter(UChar32) to avoid accidental change in behavior when replacing append with flexibleAppend
1321         https://bugs.webkit.org/show_bug.cgi?id=200675
1322
1323         Reviewed by Darin Adler.
1324
1325         * bindings/js/JSDOMConvertStrings.cpp:
1326         (WebCore::stringToUSVString):
1327         * css/CSSMarkup.cpp:
1328         (WebCore::serializeCharacter):
1329         (WebCore::serializeIdentifier):
1330         (WebCore::serializeString):
1331         * css/parser/CSSTokenizer.cpp:
1332         (WebCore::CSSTokenizer::consumeStringTokenUntil):
1333         (WebCore::CSSTokenizer::consumeUrlToken):
1334         (WebCore::CSSTokenizer::consumeName):
1335         * html/parser/HTMLEntityParser.cpp:
1336         (WebCore::HTMLEntityParser::consumeNamedEntity):
1337         * platform/mock/mediasource/MockBox.cpp:
1338         (WebCore::MockBox::peekType):
1339         (WebCore::MockTrackBox::MockTrackBox):
1340         * rendering/RenderText.cpp:
1341         (WebCore::capitalize):
1342         * xml/parser/CharacterReferenceParserInlines.h:
1343         (WebCore::consumeCharacterReference):
1344         Update for rename from StringBuilder::append(UChar32) to StringBuilder::appendCharacter(UChar32).
1345
1346 2019-08-13  Saam Barati  <sbarati@apple.com>
1347
1348         [WHLSL] Make lexing faster
1349         https://bugs.webkit.org/show_bug.cgi?id=200596
1350
1351         Reviewed by Myles C. Maxfield.
1352
1353         Previously, our lexer would just branch on a series of string compares.
1354         We'd have code like this to match keywords:
1355         ```
1356         ...
1357         if (matchCurrent("false"))
1358             return FalseToken;
1359         if (matchCurrent("true"))
1360             return TrueToken;
1361         ...
1362         ```
1363         
1364         However, this is extremely inefficient. We now lex using a trie, which means
1365         we never backtrack in the lexer.
1366         
1367         This patch is a 3ms speedup in compute_boids.
1368
1369         Tests: webgpu/whlsl/lexing.html
1370                webgpu/whlsl/literals.html
1371
1372         * Modules/webgpu/WHLSL/WHLSLLexer.cpp:
1373         (WebCore::WHLSL::isValidIdentifierStart):
1374         (WebCore::WHLSL::isValidNonStartingIdentifierChar):
1375         (WebCore::WHLSL::isHexadecimalCharacter):
1376         (WebCore::WHLSL::isDigit):
1377         (WebCore::WHLSL::Lexer::consumeTokenFromStream):
1378         (WebCore::WHLSL::Lexer::recognizeKeyword): Deleted.
1379         (WebCore::WHLSL::Lexer::coreDecimalIntLiteral const): Deleted.
1380         (WebCore::WHLSL::Lexer::decimalIntLiteral const): Deleted.
1381         (WebCore::WHLSL::Lexer::decimalUintLiteral const): Deleted.
1382         (WebCore::WHLSL::Lexer::coreHexadecimalIntLiteral const): Deleted.
1383         (WebCore::WHLSL::Lexer::hexadecimalIntLiteral const): Deleted.
1384         (WebCore::WHLSL::Lexer::hexadecimalUintLiteral const): Deleted.
1385         (WebCore::WHLSL::Lexer::intLiteral const): Deleted.
1386         (WebCore::WHLSL::Lexer::uintLiteral const): Deleted.
1387         (WebCore::WHLSL::Lexer::digit const): Deleted.
1388         (WebCore::WHLSL::Lexer::digitStar const): Deleted.
1389         (WebCore::WHLSL::Lexer::character const): Deleted.
1390         (WebCore::WHLSL::Lexer::coreFloatLiteralType1 const): Deleted.
1391         (WebCore::WHLSL::Lexer::coreFloatLiteral const): Deleted.
1392         (WebCore::WHLSL::Lexer::floatLiteral const): Deleted.
1393         (WebCore::WHLSL::Lexer::validIdentifier const): Deleted.
1394         (WebCore::WHLSL::Lexer::identifier const): Deleted.
1395         (WebCore::WHLSL::Lexer::completeOperatorName const): Deleted.
1396         * Modules/webgpu/WHLSL/WHLSLLexer.h:
1397         (WebCore::WHLSL::Lexer::string const): Deleted.
1398
1399 2019-08-13  Said Abou-Hallawa  <sabouhallawa@apple.com>
1400
1401         shouldRespectImageOrientation should be a value in ImageOrientation
1402         https://bugs.webkit.org/show_bug.cgi?id=200553
1403
1404         Reviewed by Simon Fraser.
1405
1406         This patch is a step towards implementing the css image-orientation.
1407
1408         Instead of having ImageOrientationEnum, ImageOrientationDescription,
1409         ImageOrientation and RespectImageOrientationEnum we are going to have a
1410         single structure named 'ImageOrientation' which is a wrapper for the enum
1411         type "Orientation".
1412
1413         This structure will have a constructor and casting operator such that
1414         assigning an enum value and comparing with an enum value will be done
1415         implicitly.
1416
1417         RespectImageOrientation is represented as a new enum value 'FromImage'.
1418
1419         * Sources.txt:
1420         * WebCore.xcodeproj/project.pbxproj:
1421         * css/CSSPrimitiveValueMappings.h:
1422         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1423         (WebCore::CSSPrimitiveValue::operator ImageOrientation const):
1424         (WebCore::CSSPrimitiveValue::operator ImageOrientationEnum const): Deleted.
1425         * dom/DataTransfer.cpp:
1426         (WebCore::DataTransfer::createDragImage const):
1427         * html/HTMLCanvasElement.cpp:
1428         (WebCore::HTMLCanvasElement::paint):
1429         * loader/cache/CachedImage.cpp:
1430         (WebCore::CachedImage::imageSizeForRenderer const):
1431         * page/DragController.cpp:
1432         (WebCore::DragController::doImageDrag):
1433         * platform/DragImage.cpp:
1434         (WebCore::createDragImageFromSnapshot):
1435         (WebCore::createDragImageFromImage):
1436         * platform/DragImage.h:
1437         * platform/graphics/BitmapImage.cpp:
1438         (WebCore::BitmapImage::draw):
1439         (WebCore::BitmapImage::drawPattern):
1440         * platform/graphics/BitmapImage.h:
1441         * platform/graphics/CrossfadeGeneratedImage.cpp:
1442         (WebCore::CrossfadeGeneratedImage::draw):
1443         * platform/graphics/CrossfadeGeneratedImage.h:
1444         * platform/graphics/CustomPaintImage.cpp:
1445         (WebCore::CustomPaintImage::draw):
1446         * platform/graphics/CustomPaintImage.h:
1447         * platform/graphics/GeneratedImage.h:
1448         * platform/graphics/GradientImage.cpp:
1449         (WebCore::GradientImage::draw):
1450         * platform/graphics/GradientImage.h:
1451         * platform/graphics/GraphicsContext.cpp:
1452         (WebCore::GraphicsContext::drawImage):
1453         (WebCore::GraphicsContext::drawTiledImage):
1454         * platform/graphics/GraphicsContext.h:
1455         (WebCore::ImagePaintingOptions::ImagePaintingOptions):
1456         * platform/graphics/GraphicsContextImpl.cpp:
1457         (WebCore::GraphicsContextImpl::drawImageImpl):
1458         (WebCore::GraphicsContextImpl::drawTiledImageImpl):
1459         * platform/graphics/Image.cpp:
1460         (WebCore::Image::drawTiled):
1461         * platform/graphics/Image.h:
1462         * platform/graphics/ImageFrame.h:
1463         * platform/graphics/ImageOrientation.cpp: Removed.
1464         * platform/graphics/ImageOrientation.h:
1465         (WebCore::ImageOrientation::ImageOrientation):
1466         (WebCore::ImageOrientation::fromEXIFValue):
1467         (WebCore::ImageOrientation::operator Orientation const):
1468         (WebCore::ImageOrientation::usesWidthAsHeight const):
1469         (WebCore::ImageOrientation::transformFromDefault const):
1470         (WebCore::ImageOrientation::isValidOrientation):
1471         (WebCore::ImageOrientation::isValidEXIFOrientation):
1472         (WebCore::ImageOrientationDescription::ImageOrientationDescription): Deleted.
1473         (WebCore::ImageOrientationDescription::setRespectImageOrientation): Deleted.
1474         (WebCore::ImageOrientationDescription::respectImageOrientation): Deleted.
1475         (WebCore::ImageOrientationDescription::setImageOrientationEnum): Deleted.
1476         (WebCore::ImageOrientationDescription::imageOrientation): Deleted.
1477         (WebCore::ImageOrientation::operator ImageOrientationEnum const): Deleted.
1478         (WebCore::ImageOrientation::operator== const): Deleted.
1479         (WebCore::ImageOrientation::operator!= const): Deleted.
1480         * platform/graphics/ImageSource.cpp:
1481         (WebCore::ImageSource::dump):
1482         * platform/graphics/NamedImageGeneratedImage.cpp:
1483         (WebCore::NamedImageGeneratedImage::draw):
1484         * platform/graphics/NamedImageGeneratedImage.h:
1485         * platform/graphics/NativeImage.h:
1486         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
1487         (WebCore::ImageDecoderAVFObjC::frameOrientationAtIndex const):
1488         * platform/graphics/cairo/CairoOperations.cpp:
1489         (WebCore::Cairo::drawShadowLayerBuffer):
1490         (WebCore::Cairo::drawShadowImage):
1491         (WebCore::Cairo::drawNativeImage):
1492         * platform/graphics/cairo/ImageBufferCairo.cpp:
1493         (WebCore::ImageBuffer::draw):
1494         * platform/graphics/cairo/NativeImageCairo.cpp:
1495         (WebCore::drawNativeImage):
1496         * platform/graphics/cg/GraphicsContextCG.cpp:
1497         (WebCore::GraphicsContext::drawNativeImage):
1498         * platform/graphics/cg/ImageDecoderCG.cpp:
1499         (WebCore::orientationFromProperties):
1500         (WebCore::ImageDecoderCG::frameOrientationAtIndex const):
1501         * platform/graphics/cg/NativeImageCG.cpp:
1502         (WebCore::drawNativeImage):
1503         * platform/graphics/cg/PDFDocumentImage.cpp:
1504         (WebCore::PDFDocumentImage::draw):
1505         * platform/graphics/cg/PDFDocumentImage.h:
1506         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1507         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
1508         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1509         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
1510         (WebCore::MediaPlayerPrivateGStreamerBase::setVideoSourceOrientation):
1511         (WebCore::MediaPlayerPrivateGStreamerBase::updateTextureMapperFlags):
1512         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1513         * platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:
1514         (WebCore::VideoTextureCopierGStreamer::updateTextureSpaceMatrix):
1515         (WebCore::VideoTextureCopierGStreamer::copyVideoTextureToPlatformTexture):
1516         * platform/graphics/gstreamer/VideoTextureCopierGStreamer.h:
1517         * platform/graphics/win/Direct2DOperations.cpp:
1518         (WebCore::Direct2D::drawNativeImage):
1519         * platform/graphics/win/ImageCGWin.cpp:
1520         (WebCore::BitmapImage::getHBITMAPOfSize):
1521         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
1522         * platform/graphics/win/ImageCairoWin.cpp:
1523         (WebCore::BitmapImage::getHBITMAPOfSize):
1524         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
1525         * platform/graphics/win/ImageDecoderDirect2D.cpp:
1526         (WebCore::ImageDecoderDirect2D::frameOrientationAtIndex const):
1527         * platform/graphics/win/ImageDirect2D.cpp:
1528         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
1529         * platform/graphics/win/NativeImageDirect2D.cpp:
1530         (WebCore::drawNativeImage):
1531         * platform/gtk/DragImageGtk.cpp:
1532         (WebCore::createDragImageFromImage):
1533         * platform/image-decoders/ScalableImageDecoderFrame.h:
1534         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
1535         (WebCore::readImageOrientation):
1536         * platform/ios/DragImageIOS.mm:
1537         (WebCore::createDragImageFromImage):
1538         * platform/mac/DragImageMac.mm:
1539         (WebCore::createDragImageFromImage):
1540         * platform/win/DragImageCGWin.cpp:
1541         (WebCore::createDragImageFromImage):
1542         * platform/win/DragImageCairoWin.cpp:
1543         (WebCore::createDragImageFromImage):
1544         * platform/win/DragImageDirect2D.cpp:
1545         (WebCore::createDragImageFromImage):
1546         * rendering/RenderBoxModelObject.cpp:
1547         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1548         * rendering/RenderElement.cpp:
1549         (WebCore::RenderElement::imageOrientation const):
1550         (WebCore::RenderElement::shouldRespectImageOrientation const): Deleted.
1551         * rendering/RenderElement.h:
1552         * rendering/RenderEmbeddedObject.cpp:
1553         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
1554         * rendering/RenderImage.cpp:
1555         (WebCore::RenderImage::paintReplaced):
1556         (WebCore::RenderImage::paintIntoRect):
1557         * rendering/RenderLayerBacking.cpp:
1558         (WebCore::RenderLayerBacking::isDirectlyCompositedImage const):
1559         * rendering/RenderSnapshottedPlugIn.cpp:
1560         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
1561         * rendering/style/RenderStyle.h:
1562         (WebCore::RenderStyle::setImageOrientation):
1563         (WebCore::RenderStyle::initialImageOrientation):
1564         (WebCore::RenderStyle::imageOrientation const):
1565         * rendering/style/StyleRareInheritedData.h:
1566         * svg/graphics/SVGImage.cpp:
1567         (WebCore::SVGImage::drawForContainer):
1568         (WebCore::SVGImage::nativeImageForCurrentFrame):
1569         (WebCore::SVGImage::nativeImage):
1570         (WebCore::SVGImage::draw):
1571         * svg/graphics/SVGImage.h:
1572         * svg/graphics/SVGImageForContainer.cpp:
1573         (WebCore::SVGImageForContainer::draw):
1574         * svg/graphics/SVGImageForContainer.h:
1575
1576 2019-08-13  Robin Morisset  <rmorisset@apple.com>
1577
1578         [WHLSL] Move Qualifiers and Semantic from VariableDeclaration to VariableDeclaration::RareData
1579         https://bugs.webkit.org/show_bug.cgi?id=200696
1580
1581         Reviewed by Myles C. Maxfield.
1582
1583         Shrinking VariableDeclaration by 16 bytes in the common case.
1584
1585         No new tests as there is no intended functional change.
1586
1587         * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:
1588
1589 2019-08-13  Robin Morisset  <rmorisset@apple.com>
1590
1591         [WHLSL] Don't generate empty comma expressions for bare ';'
1592         https://bugs.webkit.org/show_bug.cgi?id=200681
1593
1594         Reviewed by Myles C. Maxfield.
1595
1596         Currently we emit a comma expression with no sub-expression for bare ';', as well as for the initialization of for loops with no initializers.
1597         This crashes the Checker, as it tries to access the last sub-expression of comma expressions.
1598         Instead we should generate an empty statement block for that case.
1599
1600         This problem was found (and originally fixed before the commit was reverted) in https://bugs.webkit.org/show_bug.cgi?id=199726.
1601         I am just isolating the fix here for easier review and debugging.
1602
1603         New test: LayoutTests/webgpu/whlsl/for-loop.html
1604
1605         * Modules/webgpu/WHLSL/AST/WHLSLForLoop.h:
1606         * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
1607         (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
1608         * Modules/webgpu/WHLSL/WHLSLASTDumper.cpp:
1609         (WebCore::WHLSL::ASTDumper::visit):
1610         * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
1611         (WebCore::WHLSL::Checker::visit):
1612         * Modules/webgpu/WHLSL/WHLSLParser.cpp:
1613         (WebCore::WHLSL::Parser::parseForLoop):
1614         (WebCore::WHLSL::Parser::parseStatement):
1615         (WebCore::WHLSL::Parser::parseEffectfulExpression):
1616         * Modules/webgpu/WHLSL/WHLSLParser.h:
1617         * Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
1618         (WebCore::WHLSL::Visitor::visit):
1619
1620 2019-08-13  Daniel Bates  <dabates@apple.com>
1621
1622         Focus rings are black
1623         https://bugs.webkit.org/show_bug.cgi?id=200593
1624         <rdar://problem/54145925>
1625
1626         Reviewed by Wenson Hsieh.
1627
1628         Work around <rdar://problem/50838886> and make focus rings a pretty blue.
1629
1630         * rendering/RenderThemeIOS.mm:
1631         (WebCore::RenderThemeIOS::platformFocusRingColor const):
1632
1633 2019-08-13  Zalan Bujtas  <zalan@apple.com>
1634
1635         [ContentChangeObserver] adjustStateAndNotifyContentChangeIfNeeded should check isObservationTimeWindowActive()
1636         https://bugs.webkit.org/show_bug.cgi?id=200687
1637         <rdar://problem/54271221>
1638
1639         Reviewed by Simon Fraser.
1640
1641         Move the check to adjustStateAndNotifyContentChangeIfNeeded.
1642
1643         * page/ios/ContentChangeObserver.cpp:
1644         (WebCore::ContentChangeObserver::adjustObservedState):
1645
1646 2019-08-13  John Wilander  <wilander@apple.com>
1647
1648         Resource Load Statistics: Switch NSURLSession on top navigation to prevalent resource with user interaction
1649         https://bugs.webkit.org/show_bug.cgi?id=200642
1650         <rdar://problem/53962073>
1651
1652         Reviewed by Alex Christensen.
1653
1654         Tests: http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction.html
1655                http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction.html
1656
1657         This patch splits m_registrableDomainsToBlockCookieFor in WebCore:NetworkStorageSession into:
1658         - m_registrableDomainsToBlockAndDeleteCookiesFor
1659         - m_registrableDomainsToBlockButKeepCookiesFor
1660         ... to support different network load policies based on this distinction.
1661
1662         * page/RuntimeEnabledFeatures.h:
1663         (WebCore::RuntimeEnabledFeatures::setITPSessionSwitchingEnabled):
1664         (WebCore::RuntimeEnabledFeatures::itpSessionSwitchingEnabled const):
1665         * page/Settings.yaml:
1666         * platform/network/NetworkStorageSession.cpp:
1667         (WebCore::NetworkStorageSession::shouldBlockThirdPartyCookies const):
1668         (WebCore::NetworkStorageSession::shouldBlockThirdPartyCookiesButKeepFirstPartyCookiesFor const):
1669         (WebCore::NetworkStorageSession::setPrevalentDomainsToBlockAndDeleteCookiesFor):
1670         (WebCore::NetworkStorageSession::setPrevalentDomainsToBlockButKeepCookiesFor):
1671         (WebCore::NetworkStorageSession::removePrevalentDomains):
1672         (WebCore::NetworkStorageSession::setPrevalentDomainsToBlockCookiesFor): Deleted.
1673         * platform/network/NetworkStorageSession.h:
1674
1675 2019-08-13  Zalan Bujtas  <zalan@apple.com>
1676
1677         [ContentChangeObserver] setShouldObserveDOMTimerScheduling and setShouldObserveTransitions are always called in pairs.
1678         https://bugs.webkit.org/show_bug.cgi?id=200685
1679         <rdar://problem/54269778>
1680
1681         Reviewed by Simon Fraser.
1682
1683         Let's merge these 2 functions.
1684
1685         * page/ios/ContentChangeObserver.cpp:
1686         (WebCore::ContentChangeObserver::stopObservingPendingActivities):
1687         (WebCore::ContentChangeObserver::adjustObservedState):
1688         * page/ios/ContentChangeObserver.h:
1689         (WebCore::ContentChangeObserver::isObservingDOMTimerScheduling const):
1690         (WebCore::ContentChangeObserver::isObservingContentChanges const):
1691         (WebCore::ContentChangeObserver::setShouldObserveDOMTimerSchedulingAndTransitions):
1692         (WebCore::ContentChangeObserver::setShouldObserveDOMTimerScheduling): Deleted.
1693         (WebCore::ContentChangeObserver::setShouldObserveTransitions): Deleted.
1694
1695 2019-08-13  Zalan Bujtas  <zalan@apple.com>
1696
1697         [ContentChangeObserver] Scope events in adjustObservedState
1698         https://bugs.webkit.org/show_bug.cgi?id=200679
1699         <rdar://problem/54266172>
1700
1701         Reviewed by Simon Fraser.
1702
1703         This is in preparation for simplifying adjustObservedState.
1704
1705         * page/ios/ContentChangeObserver.cpp:
1706         (WebCore::ContentChangeObserver::didFinishTransition):
1707         (WebCore::ContentChangeObserver::adjustObservedState):
1708         * page/ios/ContentChangeObserver.h:
1709
1710 2019-08-13  Justin Fan  <justin_fan@apple.com>
1711
1712         [WebGPU] Improve GPUBindGroup performance using one device-shared argument MTLBuffer
1713         https://bugs.webkit.org/show_bug.cgi?id=200606
1714
1715         Reviewed by Myles C. Maxfield.
1716
1717         Manage all argument buffer storage for GPUBindGroups in one large MTLBuffer for a GPUDevice.
1718         Vastly improves GPUProgrammablePassEncoder.setBindGroup performance; in alpha MotionMark WebGPU benchmark,
1719         score improves from ~12000 to ~90000.
1720
1721         No expected change in WebGPU behavior, though bind-groups.html has been updated to cover more cases.
1722
1723         * Modules/webgpu/WebGPUDevice.cpp:
1724         (WebCore::WebGPUDevice::createBindGroup const):
1725         * SourcesCocoa.txt:
1726         * WebCore.xcodeproj/project.pbxproj:
1727         * platform/graphics/gpu/GPUBindGroup.h: No longer manages one unique MTLBuffer per MTLArgumentEncoder.
1728         (WebCore::GPUBindGroup::argumentBuffer const): Delegates to GPUBindGroupAllocator for current argument buffer.
1729         (WebCore::GPUBindGroup::vertexArgsBuffer const): Deleted.
1730         (WebCore::GPUBindGroup::fragmentArgsBuffer const): Deleted.
1731         (WebCore::GPUBindGroup::computeArgsBuffer const): Deleted.
1732         * platform/graphics/gpu/GPUBindGroupAllocator.h: Added. Allocates MTLBuffer for and assigns offsets for argument buffers.
1733         (WebCore::GPUBindGroupAllocator::argumentBuffer const):
1734         * platform/graphics/gpu/GPUBindGroupLayout.h:
1735         * platform/graphics/gpu/GPUBuffer.h: Move MTLResourceUsage calculation to GPUBuffer construction.
1736         (WebCore::GPUBuffer::platformUsage const):
1737         * platform/graphics/gpu/GPUComputePassEncoder.h: Prevent any potiential narrowing issues, as offset can be large.
1738         * platform/graphics/gpu/GPUDevice.cpp: Now owns a GPUBindGroupAllocator for owning all its argument buffer storage.
1739         (WebCore::GPUDevice::tryCreateBindGroup const):
1740         * platform/graphics/gpu/GPUDevice.h:
1741         * platform/graphics/gpu/GPUProgrammablePassEncoder.h:
1742         (WebCore::GPUProgrammablePassEncoder::setVertexBuffer):
1743         (WebCore::GPUProgrammablePassEncoder::setFragmentBuffer):
1744         (WebCore::GPUProgrammablePassEncoder::setComputeBuffer):
1745         * platform/graphics/gpu/GPURenderPassEncoder.h:
1746         * platform/graphics/gpu/GPUTexture.h: Move MTLResourceUsage calculation to GPUTexture construction.
1747         (WebCore::GPUTexture::platformUsage const):
1748         * platform/graphics/gpu/cocoa/GPUBindGroupAllocatorMetal.mm: Added.
1749         (WebCore::GPUBindGroupAllocator::create):
1750         (WebCore::GPUBindGroupAllocator::GPUBindGroupAllocator):
1751         (WebCore::GPUBindGroupAllocator::allocateAndSetEncoders): Ensures that MTLArgumentEncoders have appropriate allocation for encoding.
1752         (WebCore::GPUBindGroupAllocator::reallocate): Create new MTLBuffer large enough for new encoder requirement, and copy over old argument buffer data.
1753         (WebCore::GPUBindGroupAllocator::tryReset): For now, resets argument buffer if all GPUBindGroups created with this allocator are destroyed.
1754         * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
1755         (WebCore::tryGetResourceAsBufferBinding): Add size check.
1756         (WebCore::GPUBindGroup::tryCreate): No longer owns new MTLBuffers. Requests argument buffer space from GPUBindGroupAllocator.
1757         (WebCore::GPUBindGroup::GPUBindGroup):
1758         (WebCore::GPUBindGroup::~GPUBindGroup): Remind allocator to check for possible reset.
1759         (WebCore::tryCreateArgumentBuffer): Deleted.
1760         * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
1761         (WebCore::GPUBuffer::GPUBuffer):
1762         * platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm:
1763         (WebCore::GPUComputePassEncoder::setComputeBuffer):
1764         * platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
1765         * platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm:
1766         (WebCore::GPUProgrammablePassEncoder::setBindGroup): No need to recalculate usage every time. Set appropriate argument buffer and offsets for new bind group model.
1767         * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
1768         (WebCore::GPURenderPassEncoder::setVertexBuffer):
1769         (WebCore::GPURenderPassEncoder::setFragmentBuffer):
1770         * platform/graphics/gpu/cocoa/GPUTextureMetal.mm:
1771         (WebCore::GPUTexture::GPUTexture):
1772
1773 2019-08-13  Antti Koivisto  <antti@apple.com>
1774
1775         Event region collection should take clipping into account
1776         https://bugs.webkit.org/show_bug.cgi?id=200668
1777         <rdar://problem/53826561>
1778
1779         Reviewed by Simon Fraser.
1780
1781         Test: pointerevents/ios/touch-action-region-clip-and-transform.html
1782
1783         * rendering/EventRegion.cpp:
1784         (WebCore::EventRegionContext::pushClip):
1785         (WebCore::EventRegionContext::popClip):
1786
1787         Maintain clip rect stack.
1788
1789         (WebCore::EventRegionContext::unite):
1790
1791         Apply both transforms and clipping.
1792
1793         * rendering/EventRegion.h:
1794         * rendering/RenderBlock.cpp:
1795         * rendering/RenderBox.cpp:
1796         (WebCore::RenderBox::pushContentsClip):
1797         (WebCore::RenderBox::popContentsClip):
1798
1799         Update clip for non-self-painting layers.
1800
1801         * rendering/RenderLayer.cpp:
1802         (WebCore::RenderLayer::clipToRect):
1803         (WebCore::RenderLayer::restoreClip):
1804
1805         Update clip for self-painting layers.
1806
1807 2019-08-13  Devin Rousso  <drousso@apple.com>
1808
1809         Web Inspector: Styles: show @supports CSS groupings
1810         https://bugs.webkit.org/show_bug.cgi?id=200419
1811         <rdar://problem/53971948>
1812
1813         Reviewed by Joseph Pecoraro.
1814
1815         Test: inspector/css/getMatchedStylesForNode.html
1816
1817         * inspector/InspectorStyleSheet.cpp:
1818         (WebCore::buildArrayForGroupings): Added.
1819         (WebCore::InspectorStyleSheet::buildObjectForRule):
1820         (WebCore::buildMediaObject): Deleted.
1821         (WebCore::fillMediaListChain): Deleted.
1822
1823         * css/MediaList.h:
1824         * css/MediaList.cpp:
1825         (WebCore::MediaQuerySet::MediaQuerySet):
1826         Remove the `lastLine` as it was never set by anyone and wasn't used by Web Inspector.
1827
1828 2019-08-13  Sihui Liu  <sihui_liu@apple.com>
1829
1830         Make sure UniqueIDBDatabaseConnection unregister itself from IDBServer
1831         https://bugs.webkit.org/show_bug.cgi?id=200650
1832         <rdar://problem/54236010>
1833
1834         Reviewed by Youenn Fablet.
1835
1836         We register UniqueIDBDatabaseConnection unconditionally to IDBServer but fail to unregister if UniqueIDBDatabase
1837         of UniqueIDBDatabaseConnection is gone.
1838
1839         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
1840         (WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection):
1841         (WebCore::IDBServer::UniqueIDBDatabaseConnection::~UniqueIDBDatabaseConnection):
1842         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
1843         (WebCore::IDBServer::UniqueIDBDatabaseConnection::server):
1844         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
1845         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
1846         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::~UniqueIDBDatabaseTransaction):
1847         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
1848
1849 2019-08-13  Zalan Bujtas  <zalan@apple.com>
1850
1851         [LFC][TFC] Introduce TableGrid
1852         https://bugs.webkit.org/show_bug.cgi?id=200656
1853         <rdar://problem/54240833>
1854
1855         Reviewed by Antti Koivisto.
1856
1857         table grid:
1858         A matrix containing as many rows and columns as needed to describe the position of all the table-rows
1859         and table-cells of a table-root, as determined by the grid-dimensioning algorithm.
1860         Each row of the grid might correspond to a table-row, and each column to a table-column.
1861
1862         slot of the table grid:
1863         A slot (r,c) is an available space created by the intersection of a row r and a column c in the table grid.
1864
1865         https://www.w3.org/TR/css-tables-3/#terminology
1866
1867         * Sources.txt:
1868         * WebCore.xcodeproj/project.pbxproj:
1869         * layout/layouttree/LayoutBox.h:
1870         (WebCore::Layout::Box::isTableHeader const):
1871         (WebCore::Layout::Box::isTableBody const):
1872         (WebCore::Layout::Box::isTableFooter const):
1873         * layout/layouttree/LayoutTreeBuilder.cpp:
1874         (WebCore::Layout::TreeBuilder::createLayoutBox):
1875         * layout/tableformatting/TableFormattingContext.cpp:
1876         (WebCore::Layout::TableFormattingContext::layout const):
1877         (WebCore::Layout::TableFormattingContext::ensureTableGrid const):
1878         (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns const):
1879         (WebCore::Layout::TableFormattingContext::computeTableWidth const):
1880         (WebCore::Layout::TableFormattingContext::distributeAvailabeWidth const):
1881         (WebCore::Layout::TableFormattingContext::computeTableHeight const):
1882         (WebCore::Layout::TableFormattingContext::distributeAvailableHeight const):
1883         * layout/tableformatting/TableFormattingContext.h:
1884         (WebCore::Layout::TableFormattingContext::formattingState const):
1885         * layout/tableformatting/TableFormattingState.h:
1886         (WebCore::Layout::TableFormattingState::tableGrid):
1887         * layout/tableformatting/TableGrid.cpp: Added.
1888         (WebCore::Layout::TableGrid::CellInfo::CellInfo):
1889         (WebCore::Layout::TableGrid::SlotInfo::SlotInfo):
1890         (WebCore::Layout::TableGrid::TableGrid):
1891         (WebCore::Layout::TableGrid::appendCell):
1892         (WebCore::Layout::TableGrid::insertCell):
1893         (WebCore::Layout::TableGrid::removeCell):
1894         * layout/tableformatting/TableGrid.h: Copied from Source/WebCore/layout/tableformatting/TableFormattingContext.h.
1895
1896 2019-08-13  Zalan Bujtas  <zalan@apple.com>
1897
1898         [LFC][TFC] Add rowSpan and colSpan to Box
1899         https://bugs.webkit.org/show_bug.cgi?id=200654
1900         <rdar://problem/54239281>
1901
1902         Reviewed by Antti Koivisto.
1903
1904         colSpan and rowSpan are not part of the RenderStyle. We eventually need to find a more appropriate place for the "random DOM things".
1905
1906         * layout/layouttree/LayoutBox.cpp:
1907         (WebCore::Layout::Box::setRowSpan):
1908         (WebCore::Layout::Box::setColumnSpan):
1909         (WebCore::Layout::Box::rowSpan const):
1910         (WebCore::Layout::Box::columnSpan const):
1911         * layout/layouttree/LayoutBox.h:
1912         * layout/layouttree/LayoutTreeBuilder.cpp:
1913         (WebCore::Layout::TreeBuilder::createLayoutBox):
1914
1915 2019-08-13  Youenn Fablet  <youenn@apple.com>
1916
1917         Blob registries should be keyed by session IDs
1918         https://bugs.webkit.org/show_bug.cgi?id=200567
1919         <rdar://problem/54120212>
1920
1921         Reviewed by Alex Christensen.
1922
1923         Pass session IDs to all BlobRegistry methods in particular ThreadableLoaderRegistry.
1924         The only exception is blobSize which should be dealt with a follow-up patch.
1925         blobSize blob registry is retrieved from the connection -> sessionID map in Network Process.
1926         Covered by existing tests.
1927
1928         * Modules/fetch/FetchLoader.cpp:
1929         (WebCore::FetchLoader::~FetchLoader):
1930         (WebCore::FetchLoader::startLoadingBlobURL):
1931         * Modules/fetch/FetchLoader.h:
1932         * fileapi/FileReaderLoader.cpp:
1933         (WebCore::FileReaderLoader::~FileReaderLoader):
1934         (WebCore::FileReaderLoader::start):
1935         * fileapi/FileReaderLoader.h:
1936         * fileapi/ThreadableBlobRegistry.cpp:
1937         (WebCore::ThreadableBlobRegistry::registerFileBlobURL):
1938         (WebCore::ThreadableBlobRegistry::registerBlobURL):
1939         (WebCore::ThreadableBlobRegistry::registerBlobURLOptionallyFileBacked):
1940         * fileapi/ThreadableBlobRegistry.h:
1941         * html/PublicURLManager.cpp:
1942         * loader/PolicyChecker.cpp:
1943         (WebCore::PolicyChecker::extendBlobURLLifetimeIfNecessary const):
1944         * platform/network/BlobRegistry.h:
1945         * platform/network/BlobRegistryImpl.cpp:
1946         (WebCore::createBlobResourceHandle):
1947         (WebCore::loadBlobResourceSynchronously):
1948         (WebCore::BlobRegistryImpl::filesInBlob const):
1949         * platform/network/BlobRegistryImpl.h:
1950         * platform/network/FormData.cpp:
1951         (WebCore::appendBlobResolved):
1952         (WebCore::FormData::resolveBlobReferences):
1953         * platform/network/FormData.h:
1954         * platform/network/cf/FormDataStreamCFNet.cpp:
1955         (WebCore::createHTTPBodyCFReadStream):
1956         * platform/network/soup/ResourceRequest.h:
1957         * platform/network/soup/ResourceRequestSoup.cpp:
1958         (WebCore::ResourceRequest::updateSoupMessageBody const):
1959         (WebCore::ResourceRequest::updateSoupMessage const):
1960
1961 2019-08-13  Youenn Fablet  <youenn@apple.com>
1962
1963         User Agent and SessionID should be given to NetworkRTCProvider to set up the correct proxy information
1964         https://bugs.webkit.org/show_bug.cgi?id=200583
1965
1966         Reviewed by Eric Carlson.
1967
1968         Use a socket factory that is specific to the user agent and session ID.
1969         This factory is stored in the media endpoint.
1970         Not testable without proxy infrastructure.
1971
1972         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
1973         (WebCore::LibWebRTCMediaEndpoint::setConfiguration):
1974         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
1975         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
1976         (WebCore::LibWebRTCProvider::createPeerConnection):
1977         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
1978
1979 2019-08-12  Ryosuke Niwa  <rniwa@webkit.org>
1980
1981         FrameLoader::open can execute scritps via style recalc in Frame::setDocument
1982         https://bugs.webkit.org/show_bug.cgi?id=200377
1983
1984         Reviewed by Antti Koivisto.
1985
1986         Fixed the bug that FrameLoader::open can execute arbitrary author scripts via post style update callbacks
1987         by adding PostResolutionCallbackDisabler, WidgetHierarchyUpdatesSuspensionScope, and NavigationDisabler
1988         to CachedFrameBase::restore and FrameLoader::open.
1989
1990         This ensures all frames are restored from the page cache before any of them would start running scripts.
1991
1992         Test: fast/frames/restoring-page-cache-should-not-run-scripts-via-style-update.html
1993
1994         * history/CachedFrame.cpp:
1995         (WebCore::CachedFrameBase::restore):
1996         * loader/FrameLoader.cpp:
1997         (WebCore::FrameLoader::open):
1998         * page/FrameViewLayoutContext.cpp:
1999         (WebCore::FrameViewLayoutContext::layout): Fixed the debug assertion. The layout of a document may be
2000         updated while we're preparing to put a page into the page cache.
2001         * rendering/RenderLayerCompositor.cpp:
2002         (WebCore::RenderLayerCompositor::updateCompositingLayers): Ditto.
2003
2004 2019-08-12  Sam Weinig  <weinig@apple.com>
2005
2006         Replace multiparameter overloads of append() in StringBuilder as a first step toward standardizinging on the flexibleAppend() implementation
2007         https://bugs.webkit.org/show_bug.cgi?id=200614
2008
2009         Reviewed by Darin Adler.
2010
2011         Renames StringBuilder::append(const LChar*, unsigned), StringBuilder::append(const UChar*, unsigned) and 
2012         StringBuilder::append(const char*, unsigned) to StringBuilder::appendCharacters(...).
2013         
2014         Renames StringBuilder::append(const String& string, unsigned offset, unsigned length) to 
2015         StringBuilder::appendSubstring(...).
2016
2017         * dom/Range.cpp:
2018         (WebCore::Range::toString const):
2019         * editing/Editing.cpp:
2020         (WebCore::stringWithRebalancedWhitespace):
2021         * editing/MarkupAccumulator.cpp:
2022         (WebCore::appendCharactersReplacingEntitiesInternal):
2023         * editing/TextIterator.cpp:
2024         (WebCore::TextIteratorCopyableText::appendToStringBuilder const):
2025         * html/HTMLTextFormControlElement.cpp:
2026         (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks const):
2027         * html/parser/HTMLTokenizer.cpp:
2028         (WebCore::HTMLTokenizer::bufferedCharacters const):
2029         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2030         (WebCore::InbandTextTrackPrivateAVF::processNativeSamples):
2031         * platform/text/SegmentedString.cpp:
2032         (WebCore::SegmentedString::Substring::appendTo const):
2033         * platform/text/TextCodecICU.cpp:
2034         (WebCore::TextCodecICU::decode):
2035         * xml/XSLTProcessorLibxslt.cpp:
2036         (WebCore::writeToStringBuilder):
2037         Update for renames.
2038
2039 2019-08-12  Adrian Perez de Castro  <aperez@igalia.com>
2040
2041         [WPE][GTK] Fix building without unified sources
2042         https://bugs.webkit.org/show_bug.cgi?id=200641
2043
2044         Reviewed by Žan Doberšek.
2045
2046         * CMakeLists.txt: Add WebCore as the list of libraries to link into WebCoreTestSupport, to
2047         avoid underlinking, which makes it possible to link with LDFLAGS="-Wl,--no-undefined".
2048         * editing/WebCorePasteboardFileReader.h: Add missing inclusion of the pal/SessionID.h
2049         header.
2050
2051 2019-08-12  Yusuke Suzuki  <ysuzuki@apple.com>
2052
2053         [WTF][JSC] Make JSC and WTF aggressively-fast-malloced
2054         https://bugs.webkit.org/show_bug.cgi?id=200611
2055
2056         Reviewed by Saam Barati.
2057
2058         Changed the accessor since we changed std::unique_ptr to Ref for this field.
2059
2060         No behavior change.
2061
2062         * bindings/js/WorkerScriptController.cpp:
2063         (WebCore::WorkerScriptController::addTimerSetNotification):
2064         (WebCore::WorkerScriptController::removeTimerSetNotification):
2065
2066 2019-08-12  Youenn Fablet  <youenn@apple.com>
2067
2068         Make Blob::m_size an Optional
2069         https://bugs.webkit.org/show_bug.cgi?id=200617
2070
2071         Reviewed by Alex Christensen.
2072
2073         Use an Optional instead of -1 to know that m_size is initialized or not.
2074         No change of behavior.
2075
2076         Refactoring to make all Blob members private.
2077         Remove one static Blob create method.
2078
2079         Covered by existing tests.
2080
2081         * Modules/fetch/FetchBody.cpp:
2082         (WebCore::FetchBody::fromFormData):
2083         * fileapi/Blob.cpp:
2084         (WebCore::Blob::Blob):
2085         (WebCore::Blob::size const):
2086         * fileapi/Blob.h:
2087         (WebCore::Blob::setInternalURL):
2088         * fileapi/File.cpp:
2089         (WebCore::File::create):
2090         (WebCore::File::File):
2091         (WebCore::File::computeNameAndContentType):
2092         * fileapi/File.h:
2093         * html/FileListCreator.cpp:
2094         (WebCore::FileListCreator::createFileList):
2095
2096 2019-08-12  Chris Dumez  <cdumez@apple.com>
2097
2098         GPUBuffer seems to be ref'd / deref'd from multiple thread concurrently but is not ThreadSafeRefCounted
2099         https://bugs.webkit.org/show_bug.cgi?id=200629
2100
2101         Reviewed by Geoffrey Garen.
2102
2103         Make sure GPUBuffer only gets ref'd / deref'd on the main thread, since it is not
2104         ThreadSafeRefCounted.
2105
2106         * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
2107         (WebCore::GPUBuffer::commandBufferCommitted):
2108         (WebCore::GPUBuffer::commandBufferCompleted):
2109
2110 2019-08-12  Thibault Saunier  <tsaunier@igalia.com>
2111
2112         [GStreamer][WebRTC] Handle broken data in the libwebrtc GStreamer decoders
2113         https://bugs.webkit.org/show_bug.cgi?id=200584
2114
2115         Reviewed by Philippe Normand.
2116
2117         Listening to parsers warnings and error messages (synchronously so that we react
2118         right away) and requesting keyframes from the peer.
2119
2120         Also simplify the decoder code by trying to make decoding happen
2121         in one single pass, also hiding away GStreamer threading and allowing
2122         us to react as soon as the decoder/parser fails.
2123
2124         * platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp:
2125         (WebCore::GStreamerVideoDecoder::GStreamerVideoDecoder):
2126         (WebCore::GStreamerVideoDecoder::pullSample):
2127         (WebCore::H264Decoder::H264Decoder):
2128         * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
2129
2130 2019-08-12  Antti Koivisto  <antti@apple.com>
2131
2132         Only construct ComplexLineLayout when needed
2133         https://bugs.webkit.org/show_bug.cgi?id=200625
2134
2135         Reviewed by Zalan Bujtas.
2136
2137         * rendering/ComplexLineLayout.cpp:
2138         (WebCore::ComplexLineLayout::createInlineBoxForRenderer):
2139         (WebCore::ComplexLineLayout::createLineBoxes):
2140         (WebCore::ComplexLineLayout::constructLine):
2141         (WebCore::ComplexLineLayout::updateLogicalWidthForAlignment):
2142
2143         Make static so this can be invoked without constructing complex line layout (from startAlignedOffsetForLine).
2144
2145         (WebCore::ComplexLineLayout::computeInlineDirectionPositionsForSegment):
2146         (WebCore::ComplexLineLayout::deleteEllipsisLineBoxes):
2147         (WebCore::ComplexLineLayout::checkLinesForTextOverflow):
2148         (WebCore::ComplexLineLayout::startAlignedOffsetForLine): Deleted.
2149
2150         This is also used in block layout to set static positions of positioned objects.
2151         Move to RenderBlockFlow where its only caller is.
2152
2153         * rendering/ComplexLineLayout.h:
2154         * rendering/RenderBlockFlow.cpp:
2155         (WebCore::RenderBlockFlow::RenderBlockFlow):
2156         (WebCore::RenderBlockFlow::willBeDestroyed):
2157         (WebCore::RenderBlockFlow::layoutInlineChildren):
2158         (WebCore::RenderBlockFlow::updateStaticInlinePositionForChild):
2159         (WebCore::RenderBlockFlow::startAlignedOffsetForLine):
2160         (WebCore::RenderBlockFlow::deleteLines):
2161         (WebCore::RenderBlockFlow::hitTestInlineChildren):
2162         (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
2163         (WebCore::RenderBlockFlow::paintInlineChildren):
2164         (WebCore::RenderBlockFlow::hasLines const):
2165         (WebCore::RenderBlockFlow::layoutSimpleLines):
2166         (WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout):
2167         (WebCore::RenderBlockFlow::ensureLineBoxes):
2168         * rendering/RenderBlockFlow.h:
2169         (WebCore::RenderBlockFlow::firstRootBox const):
2170         (WebCore::RenderBlockFlow::lastRootBox const):
2171         (WebCore::RenderBlockFlow::complexLineLayout):
2172         (WebCore::RenderBlockFlow::lineBoxes): Deleted.
2173         (WebCore::RenderBlockFlow::lineBoxes const): Deleted.
2174         * rendering/RootInlineBox.cpp:
2175         (WebCore::RootInlineBox::removeLineBoxFromRenderObject):
2176         (WebCore::RootInlineBox::extractLineBoxFromRenderObject):
2177         (WebCore::RootInlineBox::attachLineBoxToRenderObject):
2178         * rendering/SimpleLineLayoutFunctions.cpp:
2179         (WebCore::SimpleLineLayout::generateLineBoxTree):
2180
2181 2019-08-12  Youenn Fablet  <youenn@apple.com>
2182
2183         Remove IDBValue::m_sessionID
2184         https://bugs.webkit.org/show_bug.cgi?id=199320
2185
2186         Reviewed by Alex Christensen.
2187
2188         Remove sessionID from IDBValue.
2189         This does not seem to be really used in any way.
2190         No change of behavior.
2191
2192         * Modules/indexeddb/IDBValue.cpp:
2193         (WebCore::IDBValue::IDBValue):
2194         * Modules/indexeddb/IDBValue.h:
2195         (WebCore::IDBValue::blobURLs const):
2196         (WebCore::IDBValue::encode const):
2197         (WebCore::IDBValue::decode):
2198         (WebCore::IDBValue::sessionID const): Deleted.
2199         * Modules/indexeddb/shared/IDBRequestData.cpp:
2200         (WebCore::IDBRequestData::isolatedCopy):
2201         * Modules/indexeddb/shared/IDBRequestData.h:
2202         (WebCore::IDBRequestData::databaseIdentifier const):
2203         (WebCore::IDBRequestData::decode):
2204         * bindings/js/IDBBindingUtilities.cpp:
2205         (WebCore::deserializeIDBValueToJSValue):
2206         * bindings/js/SerializedScriptValue.cpp:
2207         (WebCore::CloneSerializer::serialize):
2208         (WebCore::CloneSerializer::CloneSerializer):
2209         (WebCore::CloneSerializer::dumpIfTerminal):
2210         (WebCore::CloneDeserializer::deserialize):
2211         (WebCore::CloneDeserializer::CloneDeserializer):
2212         (WebCore::SerializedScriptValue::SerializedScriptValue):
2213         (WebCore::SerializedScriptValue::create):
2214         (WebCore::SerializedScriptValue::deserialize):
2215         (WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDB):
2216         * bindings/js/SerializedScriptValue.h:
2217         (WebCore::SerializedScriptValue::sessionID const): Deleted.
2218
2219 2019-08-12  Youenn Fablet  <youenn@apple.com>
2220
2221         Remove IDB-specific quota
2222         https://bugs.webkit.org/show_bug.cgi?id=196545
2223
2224         Reviewed by Alex Christensen.
2225
2226         No change of behavior as IDB specific quota is no longer used.
2227         Instead a global quota is used. This quota currently handles IDB and Cache API.
2228
2229         * Modules/indexeddb/server/IDBBackingStore.h:
2230         * Modules/indexeddb/server/IDBServer.cpp:
2231         (WebCore::IDBServer::IDBServer::createBackingStore):
2232         (WebCore::IDBServer::IDBServer::setPerOriginQuota): Deleted.
2233         * Modules/indexeddb/server/IDBServer.h:
2234         (WebCore::IDBServer::IDBServer::perOriginQuota const): Deleted.
2235         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
2236         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
2237         (WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):
2238         (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
2239         (WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
2240         (WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore):
2241         (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
2242         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord):
2243         (WebCore::IDBServer::SQLiteIDBBackingStore::renameIndex):
2244         (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
2245         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedSetKeyGeneratorValue):
2246         (WebCore::IDBServer::SQLiteIDBBackingStore::quotaForOrigin const): Deleted.
2247         (WebCore::IDBServer::SQLiteIDBBackingStore::maximumSize const): Deleted.
2248         * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
2249         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2250         (WebCore::IDBServer::UniqueIDBDatabase::setQuota): Deleted.
2251         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2252
2253 2019-08-11  Alicia Boya García  <aboya@igalia.com>
2254
2255         [MSE][GStreamer] Don't use vorbisparse
2256         https://bugs.webkit.org/show_bug.cgi?id=200622
2257
2258         Reviewed by Philippe Normand.
2259
2260         This patch has been splitted from the original WebKitMediaSrc rework
2261         patch (https://bugs.webkit.org/show_bug.cgi?id=199719).
2262
2263         Unlike other parsers, vorbisparse has latency (in the sense that when
2264         it gets a chain call with a series of complete frames, it may not emit
2265         the parsed frames until another chain in the future), which makes it
2266         inappropriate for AppendPipeline, as there is no good way I know to
2267         flush it.
2268
2269         But actually vorbisparse is not known to be necessary and it was only
2270         introduced for consistency with other formats. Parsers are used in
2271         AppendPipeline to reconstruct information that is lost due to poor
2272         muxes. There have been no reported cases of this being a problem with
2273         Vorbis in WebM, so I'm just removing the parser.
2274
2275         Fixes imported/w3c/web-platform-tests/media-source/mediasource-config-change-webm-a-bitrate.html
2276
2277         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
2278         (WebCore::createOptionalParserForFormat):
2279
2280 2019-08-11  Antti Koivisto  <antti@apple.com>
2281
2282         Factor complex line layout path out from RenderBlockFlow
2283         https://bugs.webkit.org/show_bug.cgi?id=200612
2284
2285         Reviewed by Zalan Bujtas.
2286
2287         This patch factors the line layout code that is currently part of the RenderBlockFlow and lives in RenderBlockLineLayout.cpp
2288         into a new ComplexLineLayout class. ComplexLineLayout is a member of RenderBlockFlow.
2289
2290         In the future we can stop constructing ComplexLineLayout at all when using other line layout paths.
2291
2292         * Sources.txt:
2293         * WebCore.xcodeproj/project.pbxproj:
2294         * rendering/ComplexLineLayout.cpp: Copied from Source/WebCore/rendering/RenderBlockLineLayout.cpp.
2295         (WebCore::ComplexLineLayout::ComplexLineLayout):
2296         (WebCore::ComplexLineLayout::appendRunsForObject):
2297         (WebCore::ComplexLineLayout::createRootInlineBox):
2298         (WebCore::ComplexLineLayout::createAndAppendRootInlineBox):
2299         (WebCore::ComplexLineLayout::createInlineBoxForRenderer):
2300         (WebCore::ComplexLineLayout::createLineBoxes):
2301         (WebCore::ComplexLineLayout::constructLine):
2302         (WebCore::ComplexLineLayout::textAlignmentForLine const):
2303         (WebCore::ComplexLineLayout::setMarginsForRubyRun):
2304         (WebCore::ComplexLineLayout::updateRubyForJustifiedText):
2305         (WebCore::ComplexLineLayout::computeExpansionForJustifiedText):
2306         (WebCore::ComplexLineLayout::updateLogicalWidthForAlignment):
2307         (WebCore::ComplexLineLayout::computeInlineDirectionPositionsForLine):
2308         (WebCore::ComplexLineLayout::computeInlineDirectionPositionsForSegment):
2309         (WebCore::ComplexLineLayout::removeInlineBox const):
2310         (WebCore::ComplexLineLayout::computeBlockDirectionPositionsForLine):
2311         (WebCore::ComplexLineLayout::handleTrailingSpaces):
2312         (WebCore::ComplexLineLayout::appendFloatingObjectToLastLine):
2313         (WebCore::ComplexLineLayout::createLineBoxesFromBidiRuns):
2314         (WebCore::ComplexLineLayout::layoutRunsAndFloats):
2315         (WebCore::ComplexLineLayout::restartLayoutRunsAndFloatsInRange):
2316         (WebCore::ComplexLineLayout::layoutRunsAndFloatsInRange):
2317         (WebCore::ComplexLineLayout::reattachCleanLineFloats):
2318         (WebCore::ComplexLineLayout::linkToEndLineIfNeeded):
2319         (WebCore::ComplexLineLayout::layoutLineBoxes):
2320         (WebCore::ComplexLineLayout::checkFloatInCleanLine):
2321         (WebCore::ComplexLineLayout::determineStartPosition):
2322         (WebCore::ComplexLineLayout::determineEndPosition):
2323         (WebCore::ComplexLineLayout::checkPaginationAndFloatsAtEndLine):
2324         (WebCore::ComplexLineLayout::lineWidthForPaginatedLineChanged const):
2325         (WebCore::ComplexLineLayout::matchedEndLine):
2326         (WebCore::ComplexLineLayout::addOverflowFromInlineChildren):
2327         (WebCore::ComplexLineLayout::deleteEllipsisLineBoxes):
2328         (WebCore::ComplexLineLayout::checkLinesForTextOverflow):
2329         (WebCore::ComplexLineLayout::positionNewFloatOnLine):
2330         (WebCore::ComplexLineLayout::startAlignedOffsetForLine):
2331         (WebCore::ComplexLineLayout::updateFragmentForLine const):
2332         (WebCore::ComplexLineLayout::style const):
2333         (WebCore::ComplexLineLayout::layoutContext const):
2334         (WebCore::RenderBlockFlow::appendRunsForObject): Deleted.
2335         (WebCore::RenderBlockFlow::createRootInlineBox): Deleted.
2336         (WebCore::RenderBlockFlow::createAndAppendRootInlineBox): Deleted.
2337         (WebCore::createInlineBoxForRenderer): Deleted.
2338         (WebCore::RenderBlockFlow::createLineBoxes): Deleted.
2339         (WebCore::RenderBlockFlow::constructLine): Deleted.
2340         (WebCore::RenderBlockFlow::textAlignmentForLine const): Deleted.
2341         (WebCore::RenderBlockFlow::setMarginsForRubyRun): Deleted.
2342         (WebCore::RenderBlockFlow::updateRubyForJustifiedText): Deleted.
2343         (WebCore::RenderBlockFlow::computeExpansionForJustifiedText): Deleted.
2344         (WebCore::RenderBlockFlow::updateLogicalWidthForAlignment): Deleted.
2345         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine): Deleted.
2346         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment): Deleted.
2347         (WebCore::RenderBlockFlow::removeInlineBox const): Deleted.
2348         (WebCore::RenderBlockFlow::computeBlockDirectionPositionsForLine): Deleted.
2349         (WebCore::RenderBlockFlow::handleTrailingSpaces): Deleted.
2350         (WebCore::RenderBlockFlow::appendFloatingObjectToLastLine): Deleted.
2351         (WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns): Deleted.
2352         (WebCore::RenderBlockFlow::layoutRunsAndFloats): Deleted.
2353         (WebCore::RenderBlockFlow::restartLayoutRunsAndFloatsInRange): Deleted.
2354         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): Deleted.
2355         (WebCore::RenderBlockFlow::reattachCleanLineFloats): Deleted.
2356         (WebCore::RenderBlockFlow::linkToEndLineIfNeeded): Deleted.
2357         (WebCore::RenderBlockFlow::layoutLineBoxes): Deleted.
2358         (WebCore::RenderBlockFlow::checkFloatInCleanLine): Deleted.
2359         (WebCore::RenderBlockFlow::determineStartPosition): Deleted.
2360         (WebCore::RenderBlockFlow::determineEndPosition): Deleted.
2361         (WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine): Deleted.
2362         (WebCore::RenderBlockFlow::lineWidthForPaginatedLineChanged const): Deleted.
2363         (WebCore::RenderBlockFlow::matchedEndLine): Deleted.
2364         (WebCore::RenderBlock::generatesLineBoxesForInlineChild): Deleted.
2365         (WebCore::RenderBlockFlow::addOverflowFromInlineChildren): Deleted.
2366         (WebCore::RenderBlockFlow::deleteEllipsisLineBoxes): Deleted.
2367         (WebCore::RenderBlockFlow::checkLinesForTextOverflow): Deleted.
2368         (WebCore::RenderBlockFlow::positionNewFloatOnLine): Deleted.
2369         (WebCore::RenderBlockFlow::startAlignedOffsetForLine): Deleted.
2370         (WebCore::RenderBlockFlow::updateFragmentForLine const): Deleted.
2371         * rendering/ComplexLineLayout.h: Added.
2372         (WebCore::ComplexLineLayout::lineBoxes):
2373         (WebCore::ComplexLineLayout::lineBoxes const):
2374         (WebCore::ComplexLineLayout::firstRootBox const):
2375         (WebCore::ComplexLineLayout::lastRootBox const):
2376         * rendering/InlineIterator.h:
2377         (WebCore::IsolateTracker::addFakeRunIfNecessary):
2378         (WebCore::InlineBidiResolver::appendRunInternal):
2379         * rendering/RenderBlock.h:
2380         * rendering/RenderBlockFlow.cpp:
2381         (WebCore::RenderBlockFlow::RenderBlockFlow):
2382         (WebCore::RenderBlockFlow::willBeDestroyed):
2383         (WebCore::RenderBlockFlow::layoutInlineChildren):
2384         (WebCore::RenderBlockFlow::updateStaticInlinePositionForChild):
2385         (WebCore::RenderBlockFlow::deleteLines):
2386         (WebCore::RenderBlockFlow::hitTestInlineChildren):
2387         (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
2388         (WebCore::RenderBlockFlow::paintInlineChildren):
2389         (WebCore::RenderBlockFlow::layoutSimpleLines):
2390         (WebCore::RenderBlockFlow::ensureLineBoxes):
2391         * rendering/RenderBlockFlow.h:
2392         (WebCore::RenderBlockFlow::lineBoxes):
2393         (WebCore::RenderBlockFlow::lineBoxes const):
2394         (WebCore::RenderBlockFlow::firstRootBox const):
2395         (WebCore::RenderBlockFlow::lastRootBox const):
2396         (WebCore::RenderBlockFlow::floatingObjects):
2397         (WebCore::RenderBlockFlow::complexLineLayout):
2398         (WebCore::RenderBlockFlow::overrideTextAlignmentForLine const):
2399         (WebCore::RenderBlockFlow::adjustInlineDirectionLineBounds const):
2400         * rendering/RenderBlockLineLayout.cpp: Removed.
2401         * rendering/RenderRubyBase.cpp:
2402         (WebCore::RenderRubyBase::overrideTextAlignmentForLine const):
2403         (WebCore::RenderRubyBase::textAlignmentForLine const): Deleted.
2404         * rendering/RenderRubyBase.h:
2405         * rendering/RenderRubyText.cpp:
2406         (WebCore::RenderRubyText::overrideTextAlignmentForLine const):
2407         (WebCore::RenderRubyText::textAlignmentForLine const): Deleted.
2408         * rendering/RenderRubyText.h:
2409         * rendering/SimpleLineLayoutFunctions.cpp:
2410         (WebCore::SimpleLineLayout::generateLineBoxTree):
2411         * rendering/line/LineBreaker.cpp:
2412         (WebCore::LineBreaker::skipLeadingWhitespace):
2413         * rendering/line/LineBreaker.h:
2414         (WebCore::LineBreaker::positionNewFloatOnLine):
2415         * rendering/line/LineInlineHeaders.h:
2416         (WebCore::setStaticPositions):
2417         * rendering/svg/RenderSVGText.cpp:
2418         (WebCore::RenderSVGText::createRootInlineBox): Deleted.
2419         * rendering/svg/RenderSVGText.h:
2420         * rendering/updating/RenderTreeBuilderList.cpp:
2421         (WebCore::generatesLineBoxesForInlineChild):
2422         (WebCore::getParentOfFirstLineBox):
2423
2424 2019-08-10  Simon Fraser  <simon.fraser@apple.com>
2425
2426         REGRESSION (r245974): Missing content on habitburger.com, amazon.com
2427         https://bugs.webkit.org/show_bug.cgi?id=200618
2428         rdar://problem/53920224
2429
2430         Reviewed by Zalan Bujtas.
2431
2432         In r245974 TileController::adjustTileCoverageRect() started to intersect the coverage
2433         rect with the bounds of the layer, which is wrong because this coverage rect is passed down
2434         to descendant layers, and they may project outside the bounds of this tiled layer.
2435         
2436         This caused missing dropdowns on amazon.com, and a missing menu on habitburger.com on iPhone.
2437
2438         The fix is to just not do the intersection with the bounds. TileGrid::getTileIndexRangeForRect()
2439         already ensures that we never make tiles outside the bounds of a TileController.
2440
2441         Test: compositing/backing/layer-outside-tiled-parent.html
2442
2443         * platform/graphics/ca/TileController.cpp:
2444         (WebCore::TileController::adjustTileCoverageRect):
2445         * platform/graphics/ca/TileGrid.cpp:
2446         (WebCore::TileGrid::ensureTilesForRect):
2447
2448 2019-08-10  Andres Gonzalez  <andresg_22@apple.com>
2449
2450         Accessibility client cannot navigate to internal links targets on iOS.
2451         https://bugs.webkit.org/show_bug.cgi?id=200559
2452         <rdar://problem/45242534>
2453
2454         Reviewed by Zalan Bujtas.
2455
2456         The cause of the problem on iOS is that AccessibilityObject::firstAccessibleObjectFromNode
2457         used in AccessibilityRenderObject::linkedUIElements may return an object
2458         that is ignored by accessibility clients on iOS, and thus the client
2459         would not track the target of an internal link. This change ensures that
2460         accessibilityLinkedElement will return a valid accessibility element to
2461         the client, if it is exists.
2462         * accessibility/AccessibilityObject.cpp:
2463         (WebCore::AccessibilityObject::firstAccessibleObjectFromNode):
2464         (WebCore::firstAccessibleObjectFromNode):
2465         * accessibility/AccessibilityObject.h:
2466         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2467         (-[WebAccessibilityObjectWrapper accessibilityLinkedElement]):
2468
2469 2019-08-10  Youenn Fablet  <youenn@apple.com>
2470
2471         Blob should store its session ID
2472         https://bugs.webkit.org/show_bug.cgi?id=200572
2473
2474         Reviewed by Darin Adler.
2475
2476         Blob at creation time now initializes its session ID.
2477         This will allow in the future to call blob registry routines with it.
2478         Update all call sites to provide the session ID.
2479
2480         No observable change.
2481
2482         * Modules/entriesapi/DOMFileSystem.cpp:
2483         (WebCore::DOMFileSystem::getFile):
2484         * Modules/fetch/FetchBody.cpp:
2485         (WebCore::FetchBody::fromFormData):
2486         * Modules/fetch/FetchBody.h:
2487         * Modules/fetch/FetchBodyConsumer.cpp:
2488         (WebCore::blobFromData):
2489         (WebCore::resolveWithTypeAndData):
2490         (WebCore::FetchBodyConsumer::resolve):
2491         (WebCore::FetchBodyConsumer::takeAsBlob):
2492         * Modules/fetch/FetchBodyConsumer.h:
2493         * Modules/fetch/FetchBodyOwner.cpp:
2494         (WebCore::FetchBodyOwner::blob):
2495         * Modules/mediarecorder/MediaRecorder.cpp:
2496         (WebCore::MediaRecorder::createRecordingDataBlob):
2497         * Modules/mediastream/RTCDataChannel.cpp:
2498         (WebCore::RTCDataChannel::didReceiveRawData):
2499         * Modules/websockets/WebSocket.cpp:
2500         (WebCore::WebSocket::didReceiveBinaryData):
2501         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
2502         (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
2503         * bindings/js/JSDOMPromiseDeferred.h:
2504         (WebCore::DeferredPromise::sessionID const):
2505         * bindings/js/SerializedScriptValue.cpp:
2506         (WebCore::CloneDeserializer::readFile):
2507         (WebCore::CloneDeserializer::readTerminal):
2508         * dom/DataTransfer.cpp:
2509         (WebCore::DataTransfer::DataTransfer):
2510         (WebCore::DataTransfer::createForCopyAndPaste):
2511         (WebCore::DataTransfer::filesFromPasteboardAndItemList const):
2512         (WebCore::DataTransfer::createForInputEvent):
2513         (WebCore::DataTransfer::createForDrag):
2514         (WebCore::DataTransfer::createForDragStartEvent):
2515         (WebCore::DataTransfer::createForDrop):
2516         (WebCore::DataTransfer::createForUpdatingDropTarget):
2517         * dom/DataTransfer.h:
2518         * dom/Document.cpp:
2519         (WebCore::Document::originIdentifierForPasteboard const):
2520         * dom/Document.h:
2521         * editing/ReplaceRangeWithTextCommand.cpp:
2522         (WebCore::ReplaceRangeWithTextCommand::inputEventDataTransfer const):
2523         * editing/ReplaceSelectionCommand.cpp:
2524         (WebCore::ReplaceSelectionCommand::inputEventDataTransfer const):
2525         * editing/SpellingCorrectionCommand.cpp:
2526         (WebCore::SpellingCorrectionCommand::inputEventDataTransfer const):
2527         * editing/TypingCommand.cpp:
2528         (WebCore::TypingCommand::inputEventDataTransfer const):
2529         * editing/WebCorePasteboardFileReader.cpp:
2530         (WebCore::WebCorePasteboardFileReader::readFilename):
2531         (WebCore::WebCorePasteboardFileReader::readBuffer):
2532         * editing/WebCorePasteboardFileReader.h:
2533         * editing/cocoa/WebContentReaderCocoa.mm:
2534         (WebCore::createFragmentForImageAttachment):
2535         (WebCore::replaceRichContentWithAttachments):
2536         (WebCore::createFragmentAndAddResources):
2537         (WebCore::sanitizeMarkupWithArchive):
2538         (WebCore::WebContentReader::readImage):
2539         (WebCore::attachmentForFilePath):
2540         (WebCore::attachmentForData):
2541         * editing/markup.cpp:
2542         (WebCore::restoreAttachmentElementsInFragment):
2543         * fileapi/Blob.cpp:
2544         (WebCore::Blob::Blob):
2545         * fileapi/Blob.h:
2546         (WebCore::Blob::create):
2547         (WebCore::Blob::deserialize):
2548         (WebCore::Blob::slice const):
2549         * fileapi/Blob.idl:
2550         * fileapi/File.cpp:
2551         (WebCore::File::createWithRelativePath):
2552         (WebCore::File::File):
2553         * fileapi/File.h:
2554         * fileapi/File.idl:
2555         * html/FileInputType.cpp:
2556         (WebCore::FileInputType::appendFormData const):
2557         (WebCore::FileInputType::filesChosen):
2558         * html/FileListCreator.cpp:
2559         (WebCore::appendDirectoryFiles):
2560         (WebCore::FileListCreator::FileListCreator):
2561         (WebCore::FileListCreator::createFileList):
2562         * html/FileListCreator.h:
2563         (WebCore::FileListCreator::create):
2564         * html/HTMLAttachmentElement.cpp:
2565         (WebCore::HTMLAttachmentElement::updateEnclosingImageWithData):
2566         * html/HTMLCanvasElement.cpp:
2567         (WebCore::HTMLCanvasElement::toBlob):
2568         * page/EventHandler.cpp:
2569         (WebCore::EventHandler::handleDrag):
2570         * testing/Internals.cpp:
2571         (WebCore::Internals::createFile):
2572         * testing/ServiceWorkerInternals.cpp:
2573         (WebCore::ServiceWorkerInternals::createOpaqueWithBlobBodyResponse):
2574         * workers/service/context/ServiceWorkerFetch.cpp:
2575         (WebCore::ServiceWorkerFetch::dispatchFetchEvent):
2576         * xml/XMLHttpRequest.cpp:
2577         (WebCore::XMLHttpRequest::createResponseBlob):
2578
2579 2019-08-10  Alex Christensen  <achristensen@webkit.org>
2580
2581         Disable ContentChangeObserver TouchEvent adjustment on youtube.com on iOS in mobile browsing mode
2582         https://bugs.webkit.org/show_bug.cgi?id=200609
2583         <rdar://problem/54015403>
2584
2585         Reviewed by Maciej Stachowiak.
2586
2587         When watching a youtube video on iOS with "Autoplay" switched to off,
2588         upon finishing the video all clicks anywhere on the page are effectively ignored.
2589         Disabling ContentChangeObserver's TouchEvent adjustment fixes this bug.  I verified this manually.
2590         This switch was introduced in r242621, and it disables part of a new feature, so there is low risk of fallout.
2591
2592         * loader/DocumentLoader.h:
2593         (WebCore::DocumentLoader::setAllowContentChangeObserverQuirk):
2594         (WebCore::DocumentLoader::allowContentChangeObserverQuirk const):
2595         * page/Quirks.cpp:
2596         (WebCore::Quirks::shouldDisableContentChangeObserverTouchEventAdjustment const):
2597         * page/Quirks.h:
2598         * page/ios/ContentChangeObserver.cpp:
2599         (WebCore::ContentChangeObserver::touchEventDidStart):
2600
2601 2019-08-10  Said Abou-Hallawa  <sabouhallawa@apple.com>
2602
2603         [iOS] Add a quirk for gmail.com messages on iPhone iOS13
2604         https://bugs.webkit.org/show_bug.cgi?id=200605
2605
2606         Reviewed by Maciej Stachowiak.
2607
2608         Add a quirk which sets the user agent for gmail.com messages on iPhone
2609         OS 13 to be iPhone OS 12. This is a workaround for a gmail.com bug till
2610         it is fixed.
2611
2612         * page/Quirks.cpp:
2613         (WebCore::Quirks::shouldAvoidUsingIOS13ForGmail const):
2614         * page/Quirks.h:
2615         * platform/UserAgent.h:
2616         * platform/ios/UserAgentIOS.mm:
2617         (WebCore::osNameForUserAgent):
2618         (WebCore::standardUserAgentWithApplicationName):
2619         * platform/mac/UserAgentMac.mm:
2620         (WebCore::standardUserAgentWithApplicationName):
2621
2622 2019-08-10  Thibault Saunier  <tsaunier@igalia.com>
2623
2624         [GStreamer][WebRTC] Remove unused GstAdapter
2625         https://bugs.webkit.org/show_bug.cgi?id=200585
2626
2627         Reviewed by Philippe Normand.
2628
2629         Minor "refactoring"
2630
2631         * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
2632         (WebCore::GStreamerVideoEncoder::GStreamerVideoEncoder):
2633
2634 2019-08-10  Antti Koivisto  <antti@apple.com>
2635
2636         Can’t sort videos on a YouTube channel page on iPad
2637         https://bugs.webkit.org/show_bug.cgi?id=200573
2638         <rdar://problem/53415195>
2639
2640         Reviewed by Darin Adler.
2641
2642         Add a quirk to make touch events non-cancelable (preventDefault() does nothing).
2643
2644         * page/Quirks.cpp:
2645         (WebCore::Quirks::shouldMakeTouchEventNonCancelableForTarget const):
2646         * page/Quirks.h:
2647
2648 2019-08-10  Devin Rousso  <drousso@apple.com>
2649
2650         Web Inspector: REGRESSION(r248454): WK1 inspector frontend client doesn't queue messages to the frontend before it's loaded
2651         https://bugs.webkit.org/show_bug.cgi?id=200587
2652
2653         Reviewed by Joseph Pecoraro.
2654
2655         WK1 inspector sends messages to the frontend using `WebCore::InspectorClient::doDispatchMessageOnFrontendPage`,
2656         which does not do any sort of queueing to wait until the frontend is loaded (`InspectorFrontendHost.loaded()`).
2657
2658         Now that we are sending messages immediately, we should always queue.
2659
2660         Covered by existing tests (which were failing after r248454, and now won't fail).
2661
2662         * inspector/InspectorFrontendClientLocal.h:
2663         * inspector/InspectorFrontendClientLocal.cpp:
2664         (WebCore::InspectorFrontendClientLocal::setDockingUnavailable):
2665         (WebCore::InspectorFrontendClientLocal::setAttachedWindow):
2666         (WebCore::InspectorFrontendClientLocal::setDebuggingEnabled):
2667         (WebCore::InspectorFrontendClientLocal::setTimelineProfilingEnabled):
2668         (WebCore::InspectorFrontendClientLocal::startProfilingJavaScript):
2669         (WebCore::InspectorFrontendClientLocal::stopProfilingJavaScript):
2670         (WebCore::InspectorFrontendClientLocal::showConsole):
2671         (WebCore::InspectorFrontendClientLocal::showResources):
2672         (WebCore::InspectorFrontendClientLocal::showMainResourceForFrame):
2673         (WebCore::InspectorFrontendClientLocal::dispatch): Added.
2674         (WebCore::InspectorFrontendClientLocal::dispatchMessage): Added.
2675         (WebCore::InspectorFrontendClientLocal::dispatchMessageAsync): Added.
2676         (WebCore::InspectorFrontendClientLocal::evaluateOnLoad):
2677         Provide additional ways for subclasses to call other `InspectorFrontendAPI` methods using
2678         the "on load" queue.
2679
2680         * testing/Internals.cpp:
2681         (WebCore::InspectorStubFrontend::sendMessageToFrontend):
2682         (WebCore::InspectorStubFrontend::frontendLoaded): Deleted.
2683         Leverage the base `InspectorFrontendClientLocal`'s functions for queueing messages.
2684
2685         * inspector/InspectorClient.h:
2686         * inspector/InspectorClient.cpp: Removed.
2687         (WebCore::InspectorClient::doDispatchMessageOnFrontendPage): Deleted.
2688
2689         * inspector/agents/InspectorTimelineAgent.cpp:
2690         Add missing include.
2691
2692         * Sources.txt:
2693         * WebCore.xcodeproj/project.pbxproj:
2694
2695 2019-08-09  Yusuke Suzuki  <ysuzuki@apple.com>
2696
2697         Universal XSS in JSObject::putInlineSlow and JSValue::putToPrimitive
2698         https://bugs.webkit.org/show_bug.cgi?id=199864
2699
2700         Reviewed by Saam Barati.
2701
2702         Test: http/tests/security/cross-frame-access-object-put-optimization.html
2703
2704         * bindings/js/JSDOMWindowCustom.cpp:
2705         (WebCore::JSDOMWindow::doPutPropertySecurityCheck):
2706         * bindings/js/JSLocationCustom.cpp:
2707         (WebCore::JSLocation::doPutPropertySecurityCheck):
2708         * bindings/scripts/CodeGeneratorJS.pm:
2709         (GenerateHeader):
2710         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
2711
2712 2019-08-09  Saam Barati  <sbarati@apple.com>
2713
2714         When I did the devirtualization of the AST in r248488, I needed to
2715         update the various type checks under the Type class hierarchy
2716         operate on Type itself, since we now downcast straight from Type
2717         instead of UnnamedType, ResolvableType, and NamedType.
2718
2719         * Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
2720         * Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
2721         * Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h:
2722         * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h:
2723         * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.h:
2724         * Modules/webgpu/WHLSL/AST/WHLSLNamedType.h:
2725         * Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h:
2726         * Modules/webgpu/WHLSL/AST/WHLSLNullLiteralType.h:
2727         * Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
2728         * Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
2729         * Modules/webgpu/WHLSL/AST/WHLSLResolvableType.h:
2730         * Modules/webgpu/WHLSL/AST/WHLSLStructureDefinition.h:
2731         * Modules/webgpu/WHLSL/AST/WHLSLTypeDefinition.h:
2732         * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
2733         * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
2734         * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.h:
2735
2736 2019-08-09  Chris Dumez  <cdumez@apple.com>
2737
2738         Possible non-thread safe usage of RefCounted in ~VideoFullscreenControllerContext()
2739         https://bugs.webkit.org/show_bug.cgi?id=200599
2740
2741         Reviewed by Geoffrey Garen.
2742
2743         WebVideoFullscreenControllerAVKit's m_playbackModel & m_fullscreenModel data members are
2744         WebThread objects so we need to make sure we grab the WebThread lock before dereferencing
2745         them in the WebVideoFullscreenControllerAVKit destructor, when destroyed on the UIThread.
2746
2747         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2748         (VideoFullscreenControllerContext::~VideoFullscreenControllerContext):
2749
2750 2019-08-09  Ali Juma  <ajuma@chromium.org>
2751
2752         Don't allow cross-origin iframes to autofocus
2753         https://bugs.webkit.org/show_bug.cgi?id=200515
2754         <rdar://problem/54092988>
2755
2756         Reviewed by Ryosuke Niwa.
2757
2758         According to Step 6 in the WhatWG Spec (https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofocusing-a-form-control:-the-autofocus-attribute),
2759         the 'autofocus' attribute shouldn't work for cross-origin iframes.
2760
2761         This change is based on the Blink change (patch by <mustaq@chromium.org>):
2762         <https://chromium-review.googlesource.com/c/chromium/src/+/1593026>
2763
2764         Also disallow cross-origin iframes from focusing programmatically without ever having
2765         had any user interaction.
2766
2767         * dom/Element.cpp: Check if an invalid frame is trying to grab the focus.
2768         (WebCore::Element::focus):
2769         * html/HTMLFormControlElement.cpp: Check if the focus is moving to an invalid frame.
2770         (WebCore::shouldAutofocus):
2771         * page/DOMWindow.cpp: Check if an invalid frame is trying to grab the focus.
2772         (WebCore::DOMWindow::focus):
2773
2774 2019-08-09  Saam Barati  <sbarati@apple.com>
2775
2776         [WHLSL] Devirtualize the AST
2777         https://bugs.webkit.org/show_bug.cgi?id=200522
2778
2779         Reviewed by Robin Morisset.
2780
2781         This patch devirtualizes the AST for Type, Expression, and Statement.
2782         We now have an enum which represents all the concrete types in the
2783         three hierarchies. Doing dynamic dispatch is implemented as a switch
2784         on that type enum.
2785         
2786         The interesting part of this patch is how to handle destruction. We do
2787         this by defining a custom deleter for all nodes in the AST. This ensures
2788         that when they're used inside UniqueRef, unique_ptr, Ref, and RefPtr,
2789         we do dynamic dispatch when we delete the object. This allows each base
2790         class to define a "destroy" method which does dynamic dispatch on type
2791         and calls the appropriate delete. We also mark all non-concrete nodes
2792         in all type hierarchies with a protected destructor, which ensures it's
2793         never called except from within the concrete child classes. We allow
2794         all concrete classes to have public destructors, as it's valid for
2795         their destructors to be called explicitly since there is no need for
2796         dynamic dispatch in such scenarios. All concrete classes are also marked
2797         as final.
2798         
2799         This is a 3ms speedup on compute_boids, which is about a 10% improvement
2800         in the WHLSL compiler.
2801
2802         * Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
2803         * Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
2804         * Modules/webgpu/WHLSL/AST/WHLSLAssignmentExpression.h:
2805         (WebCore::WHLSL::AST::AssignmentExpression::AssignmentExpression): Deleted.
2806         (WebCore::WHLSL::AST::AssignmentExpression::left): Deleted.
2807         (WebCore::WHLSL::AST::AssignmentExpression::right): Deleted.
2808         (WebCore::WHLSL::AST::AssignmentExpression::takeRight): Deleted.
2809         * Modules/webgpu/WHLSL/AST/WHLSLBlock.h:
2810         (WebCore::WHLSL::AST::Block::Block): Deleted.
2811         (WebCore::WHLSL::AST::Block::statements): Deleted.
2812         * Modules/webgpu/WHLSL/AST/WHLSLBooleanLiteral.h:
2813         (WebCore::WHLSL::AST::BooleanLiteral::BooleanLiteral): Deleted.
2814         (WebCore::WHLSL::AST::BooleanLiteral::value const): Deleted.
2815         (WebCore::WHLSL::AST::BooleanLiteral::clone const): Deleted.
2816         * Modules/webgpu/WHLSL/AST/WHLSLBreak.h:
2817         (WebCore::WHLSL::AST::Break::Break): Deleted.
2818         * Modules/webgpu/WHLSL/AST/WHLSLCallExpression.h:
2819         (WebCore::WHLSL::AST::CallExpression::CallExpression): Deleted.
2820         (WebCore::WHLSL::AST::CallExpression::arguments): Deleted.
2821         (WebCore::WHLSL::AST::CallExpression::name): Deleted.
2822         (WebCore::WHLSL::AST::CallExpression::setCastData): Deleted.
2823         (WebCore::WHLSL::AST::CallExpression::isCast): Deleted.
2824         (WebCore::WHLSL::AST::CallExpression::castReturnType): Deleted.
2825         (WebCore::WHLSL::AST::CallExpression::function): Deleted.
2826         (WebCore::WHLSL::AST::CallExpression::setFunction): Deleted.
2827         * Modules/webgpu/WHLSL/AST/WHLSLCommaExpression.h:
2828         (WebCore::WHLSL::AST::CommaExpression::CommaExpression): Deleted.
2829         (WebCore::WHLSL::AST::CommaExpression::list): Deleted.
2830         * Modules/webgpu/WHLSL/AST/WHLSLConstantExpression.h:
2831         (WebCore::WHLSL::AST::ConstantExpression::ConstantExpression): Deleted.
2832         (WebCore::WHLSL::AST::ConstantExpression::integerLiteral): Deleted.
2833         (WebCore::WHLSL::AST::ConstantExpression::visit): Deleted.
2834         (WebCore::WHLSL::AST::ConstantExpression::visit const): Deleted.
2835         (WebCore::WHLSL::AST::ConstantExpression::clone const): Deleted.
2836         (WebCore::WHLSL::AST::ConstantExpression::matches const): Deleted.
2837         * Modules/webgpu/WHLSL/AST/WHLSLContinue.h:
2838         (WebCore::WHLSL::AST::Continue::Continue): Deleted.
2839         * Modules/webgpu/WHLSL/AST/WHLSLDefaultDelete.h: Added.
2840         * Modules/webgpu/WHLSL/AST/WHLSLDereferenceExpression.h:
2841         (WebCore::WHLSL::AST::DereferenceExpression::DereferenceExpression): Deleted.
2842         (WebCore::WHLSL::AST::DereferenceExpression::pointer): Deleted.
2843         * Modules/webgpu/WHLSL/AST/WHLSLDoWhileLoop.h:
2844         (WebCore::WHLSL::AST::DoWhileLoop::DoWhileLoop): Deleted.
2845         (WebCore::WHLSL::AST::DoWhileLoop::body): Deleted.
2846         (WebCore::WHLSL::AST::DoWhileLoop::conditional): Deleted.
2847         * Modules/webgpu/WHLSL/AST/WHLSLDotExpression.h:
2848         (WebCore::WHLSL::AST::DotExpression::DotExpression): Deleted.
2849         (WebCore::WHLSL::AST::DotExpression::fieldName): Deleted.
2850         * Modules/webgpu/WHLSL/AST/WHLSLEffectfulExpressionStatement.h:
2851         (WebCore::WHLSL::AST::EffectfulExpressionStatement::EffectfulExpressionStatement): Deleted.
2852         (WebCore::WHLSL::AST::EffectfulExpressionStatement::effectfulExpression): Deleted.
2853         * Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h:
2854         (WebCore::WHLSL::AST::EnumerationDefinition::EnumerationDefinition): Deleted.
2855         (WebCore::WHLSL::AST::EnumerationDefinition::type): Deleted.
2856         (WebCore::WHLSL::AST::EnumerationDefinition::add): Deleted.
2857         (WebCore::WHLSL::AST::EnumerationDefinition::memberByName): Deleted.
2858         (WebCore::WHLSL::AST::EnumerationDefinition::enumerationMembers): Deleted.
2859         * Modules/webgpu/WHLSL/AST/WHLSLEnumerationMemberLiteral.h:
2860         (WebCore::WHLSL::AST::EnumerationMemberLiteral::EnumerationMemberLiteral): Deleted.
2861         (WebCore::WHLSL::AST::EnumerationMemberLiteral::wrap): Deleted.
2862         (WebCore::WHLSL::AST::EnumerationMemberLiteral::left const): Deleted.
2863         (WebCore::WHLSL::AST::EnumerationMemberLiteral::right const): Deleted.
2864         (WebCore::WHLSL::AST::EnumerationMemberLiteral::clone const): Deleted.
2865         (WebCore::WHLSL::AST::EnumerationMemberLiteral::enumerationDefinition): Deleted.
2866         (WebCore::WHLSL::AST::EnumerationMemberLiteral::enumerationDefinition const): Deleted.
2867         (WebCore::WHLSL::AST::EnumerationMemberLiteral::enumerationMember): Deleted.
2868         (WebCore::WHLSL::AST::EnumerationMemberLiteral::enumerationMember const): Deleted.
2869         (WebCore::WHLSL::AST::EnumerationMemberLiteral::setEnumerationMember): Deleted.
2870         * Modules/webgpu/WHLSL/AST/WHLSLExpression.cpp: Added.
2871         (WebCore::WHLSL::AST::Expression::destroy):
2872         (WebCore::WHLSL::AST::PropertyAccessExpression::getterFunctionName const):
2873         (WebCore::WHLSL::AST::PropertyAccessExpression::setterFunctionName const):
2874         (WebCore::WHLSL::AST::PropertyAccessExpression::anderFunctionName const):
2875         * Modules/webgpu/WHLSL/AST/WHLSLExpression.h:
2876         (WebCore::WHLSL::AST::Expression::Expression):
2877         (WebCore::WHLSL::AST::Expression::kind const):
2878         (WebCore::WHLSL::AST::Expression::isAssignmentExpression const):
2879         (WebCore::WHLSL::AST::Expression::isBooleanLiteral const):
2880         (WebCore::WHLSL::AST::Expression::isCallExpression const):
2881         (WebCore::WHLSL::AST::Expression::isCommaExpression const):
2882         (WebCore::WHLSL::AST::Expression::isDereferenceExpression const):
2883         (WebCore::WHLSL::AST::Expression::isDotExpression const):
2884         (WebCore::WHLSL::AST::Expression::isGlobalVariableReference const):
2885         (WebCore::WHLSL::AST::Expression::isFloatLiteral const):
2886         (WebCore::WHLSL::AST::Expression::isIndexExpression const):
2887         (WebCore::WHLSL::AST::Expression::isIntegerLiteral const):
2888         (WebCore::WHLSL::AST::Expression::isLogicalExpression const):
2889         (WebCore::WHLSL::AST::Expression::isLogicalNotExpression const):
2890         (WebCore::WHLSL::AST::Expression::isMakeArrayReferenceExpression const):
2891         (WebCore::WHLSL::AST::Expression::isMakePointerExpression const):
2892         (WebCore::WHLSL::AST::Expression::isNullLiteral const):
2893         (WebCore::WHLSL::AST::Expression::isPropertyAccessExpression const):
2894         (WebCore::WHLSL::AST::Expression::isReadModifyWriteExpression const):
2895         (WebCore::WHLSL::AST::Expression::isTernaryExpression const):
2896         (WebCore::WHLSL::AST::Expression::isUnsignedIntegerLiteral const):
2897         (WebCore::WHLSL::AST::Expression::isVariableReference const):
2898         (WebCore::WHLSL::AST::Expression::isEnumerationMemberLiteral const):
2899         (WebCore::WHLSL::AST::Expression::codeLocation const):
2900         (WebCore::WHLSL::AST::Expression::updateCodeLocation):
2901         * Modules/webgpu/WHLSL/AST/WHLSLFallthrough.h:
2902         (WebCore::WHLSL::AST::Fallthrough::Fallthrough): Deleted.
2903         * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteral.h:
2904         (WebCore::WHLSL::AST::FloatLiteral::FloatLiteral): Deleted.
2905         (WebCore::WHLSL::AST::FloatLiteral::type): Deleted.
2906         (WebCore::WHLSL::AST::FloatLiteral::value const): Deleted.
2907         (WebCore::WHLSL::AST::FloatLiteral::clone const): Deleted.
2908         * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.cpp:
2909         (WebCore::WHLSL::AST::FloatLiteralType::FloatLiteralType):
2910         * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h:
2911         (WebCore::WHLSL::AST::FloatLiteralType::value const): Deleted.
2912         (WebCore::WHLSL::AST::FloatLiteralType::preferredType): Deleted.
2913         * Modules/webgpu/WHLSL/AST/WHLSLForLoop.h:
2914         (WebCore::WHLSL::AST::ForLoop::ForLoop): Deleted.
2915         (WebCore::WHLSL::AST::ForLoop::~ForLoop): Deleted.
2916         (WebCore::WHLSL::AST::ForLoop::initialization): Deleted.
2917         (WebCore::WHLSL::AST::ForLoop::condition): Deleted.
2918         (WebCore::WHLSL::AST::ForLoop::increment): Deleted.
2919         (WebCore::WHLSL::AST::ForLoop::body): Deleted.
2920         * Modules/webgpu/WHLSL/AST/WHLSLGlobalVariableReference.h:
2921         (WebCore::WHLSL::AST::GlobalVariableReference::GlobalVariableReference): Deleted.
2922         (WebCore::WHLSL::AST::GlobalVariableReference::structField): Deleted.
2923         (WebCore::WHLSL::AST::GlobalVariableReference::base): Deleted.
2924         * Modules/webgpu/WHLSL/AST/WHLSLIfStatement.h:
2925         (WebCore::WHLSL::AST::IfStatement::IfStatement): Deleted.
2926         (WebCore::WHLSL::AST::IfStatement::conditional): Deleted.
2927         (WebCore::WHLSL::AST::IfStatement::body): Deleted.
2928         (WebCore::WHLSL::AST::IfStatement::elseBody): Deleted.
2929         * Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h:
2930         (WebCore::WHLSL::AST::IndexExpression::IndexExpression): Deleted.
2931         (WebCore::WHLSL::AST::IndexExpression::indexExpression): Deleted.
2932         (WebCore::WHLSL::AST::IndexExpression::takeIndex): Deleted.
2933         * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteral.h:
2934         (WebCore::WHLSL::AST::IntegerLiteral::IntegerLiteral): Deleted.
2935         (WebCore::WHLSL::AST::IntegerLiteral::type): Deleted.
2936         (WebCore::WHLSL::AST::IntegerLiteral::value const): Deleted.
2937         (WebCore::WHLSL::AST::IntegerLiteral::clone const): Deleted.
2938         * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.cpp:
2939         (WebCore::WHLSL::AST::IntegerLiteralType::IntegerLiteralType):
2940         * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.h:
2941         (WebCore::WHLSL::AST::IntegerLiteralType::value const): Deleted.
2942         (WebCore::WHLSL::AST::IntegerLiteralType::preferredType): Deleted.
2943         * Modules/webgpu/WHLSL/AST/WHLSLLogicalExpression.h:
2944         (WebCore::WHLSL::AST::LogicalExpression::LogicalExpression): Deleted.
2945         (WebCore::WHLSL::AST::LogicalExpression::type const): Deleted.
2946         (WebCore::WHLSL::AST::LogicalExpression::left): Deleted.
2947         (WebCore::WHLSL::AST::LogicalExpression::right): Deleted.
2948         * Modules/webgpu/WHLSL/AST/WHLSLLogicalNotExpression.h:
2949         (WebCore::WHLSL::AST::LogicalNotExpression::LogicalNotExpression): Deleted.
2950         (WebCore::WHLSL::AST::LogicalNotExpression::operand): Deleted.
2951         * Modules/webgpu/WHLSL/AST/WHLSLMakeArrayReferenceExpression.h:
2952         (WebCore::WHLSL::AST::MakeArrayReferenceExpression::MakeArrayReferenceExpression): Deleted.
2953         (WebCore::WHLSL::AST::MakeArrayReferenceExpression::leftValue): Deleted.
2954         (WebCore::WHLSL::AST::MakeArrayReferenceExpression::mightEscape const): Deleted.
2955         * Modules/webgpu/WHLSL/AST/WHLSLMakePointerExpression.h:
2956         (WebCore::WHLSL::AST::MakePointerExpression::MakePointerExpression): Deleted.
2957         (WebCore::WHLSL::AST::MakePointerExpression::leftValue): Deleted.
2958         (WebCore::WHLSL::AST::MakePointerExpression::mightEscape const): Deleted.
2959         * Modules/webgpu/WHLSL/AST/WHLSLNamedType.h:
2960         (WebCore::WHLSL::AST::NamedType::NamedType):
2961         (WebCore::WHLSL::AST::NamedType::unifyNodeImpl):
2962         (): Deleted.
2963         (WebCore::WHLSL::AST::NamedType::isTypeDefinition const): Deleted.
2964         (WebCore::WHLSL::AST::NamedType::isStructureDefinition const): Deleted.
2965         (WebCore::WHLSL::AST::NamedType::isEnumerationDefinition const): Deleted.
2966         (WebCore::WHLSL::AST::NamedType::isNativeTypeDeclaration const): Deleted.
2967         (WebCore::WHLSL::AST::NamedType::unifyNode const): Deleted.
2968         (WebCore::WHLSL::AST::NamedType::unifyNode): Deleted.
2969         * Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h:
2970         (WebCore::WHLSL::AST::NativeTypeDeclaration::NativeTypeDeclaration): Deleted.
2971         (WebCore::WHLSL::AST::NativeTypeDeclaration::typeArguments): Deleted.
2972         (WebCore::WHLSL::AST::NativeTypeDeclaration::isInt const): Deleted.
2973         (WebCore::WHLSL::AST::NativeTypeDeclaration::isNumber const): Deleted.
2974         (WebCore::WHLSL::AST::NativeTypeDeclaration::isFloating const): Deleted.
2975         (WebCore::WHLSL::AST::NativeTypeDeclaration::isAtomic const): Deleted.
2976         (WebCore::WHLSL::AST::NativeTypeDeclaration::isVector const): Deleted.
2977         (WebCore::WHLSL::AST::NativeTypeDeclaration::isMatrix const): Deleted.
2978         (WebCore::WHLSL::AST::NativeTypeDeclaration::isOpaqueType const): Deleted.
2979         (WebCore::WHLSL::AST::NativeTypeDeclaration::isTexture const): Deleted.
2980         (WebCore::WHLSL::AST::NativeTypeDeclaration::isTextureArray const): Deleted.
2981         (WebCore::WHLSL::AST::NativeTypeDeclaration::isDepthTexture const): Deleted.
2982         (WebCore::WHLSL::AST::NativeTypeDeclaration::isWritableTexture const): Deleted.
2983         (WebCore::WHLSL::AST::NativeTypeDeclaration::textureDimension const): Deleted.
2984         (WebCore::WHLSL::AST::NativeTypeDeclaration::isSigned const): Deleted.
2985         (WebCore::WHLSL::AST::NativeTypeDeclaration::std::function<bool const): Deleted.
2986         (WebCore::WHLSL::AST::NativeTypeDeclaration::std::function<int64_t const): Deleted.
2987         (WebCore::WHLSL::AST::NativeTypeDeclaration::iterateAllValues): Deleted.
2988         (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsInt): Deleted.
2989         (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsNumber): Deleted.
2990         (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsFloating): Deleted.
2991         (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsAtomic): Deleted.
2992         (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsVector): Deleted.
2993         (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsMatrix): Deleted.
2994         (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsOpaqueType): Deleted.
2995         (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsTexture): Deleted.
2996         (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsTextureArray): Deleted.
2997         (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsDepthTexture): Deleted.
2998         (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsWritableTexture): Deleted.
2999         (WebCore::WHLSL::AST::NativeTypeDeclaration::setTextureDimension): Deleted.
3000         (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsSigned): Deleted.
3001         (WebCore::WHLSL::AST::NativeTypeDeclaration::setCanRepresentInteger): Deleted.
3002         (WebCore::WHLSL::AST::NativeTypeDeclaration::setCanRepresentUnsignedInteger): Deleted.
3003         (WebCore::WHLSL::AST::NativeTypeDeclaration::setCanRepresentFloat): Deleted.
3004         (WebCore::WHLSL::AST::NativeTypeDeclaration::setSuccessor): Deleted.
3005         (WebCore::WHLSL::AST::NativeTypeDeclaration::setFormatValueFromInteger): Deleted.
3006         (WebCore::WHLSL::AST::NativeTypeDeclaration::setFormatValueFromUnsignedInteger): Deleted.
3007         (WebCore::WHLSL::AST::NativeTypeDeclaration::setIterateAllValues): Deleted.
3008         * Modules/webgpu/WHLSL/AST/WHLSLNullLiteral.h:
3009         (WebCore::WHLSL::AST::NullLiteral::NullLiteral): Deleted.
3010         (WebCore::WHLSL::AST::NullLiteral::type): Deleted.
3011         (WebCore::WHLSL::AST::NullLiteral::clone const): Deleted.
3012         * Modules/webgpu/WHLSL/AST/WHLSLNullLiteralType.h:
3013         * Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
3014         * Modules/webgpu/WHLSL/AST/WHLSLPropertyAccessExpression.h:
3015         (WebCore::WHLSL::AST::PropertyAccessExpression::PropertyAccessExpression):
3016         * Modules/webgpu/WHLSL/AST/WHLSLReadModifyWriteExpression.h:
3017         (WebCore::WHLSL::AST::ReadModifyWriteExpression::create): Deleted.
3018         (WebCore::WHLSL::AST::ReadModifyWriteExpression::setNewValueExpression): Deleted.
3019         (WebCore::WHLSL::AST::ReadModifyWriteExpression::setResultExpression): Deleted.
3020         (WebCore::WHLSL::AST::ReadModifyWriteExpression::oldVariableReference): Deleted.
3021         (WebCore::WHLSL::AST::ReadModifyWriteExpression::newVariableReference): Deleted.
3022         (WebCore::WHLSL::AST::ReadModifyWriteExpression::leftValue): Deleted.
3023         (WebCore::WHLSL::AST::ReadModifyWriteExpression::oldValue): Deleted.
3024         (WebCore::WHLSL::AST::ReadModifyWriteExpression::newValue): Deleted.
3025         (WebCore::WHLSL::AST::ReadModifyWriteExpression::newValueExpression): Deleted.
3026         (WebCore::WHLSL::AST::ReadModifyWriteExpression::resultExpression): Deleted.
3027         (WebCore::WHLSL::AST::ReadModifyWriteExpression::takeLeftValue): Deleted.
3028         (WebCore::WHLSL::AST::ReadModifyWriteExpression::takeOldValue): Deleted.
3029         (WebCore::WHLSL::AST::ReadModifyWriteExpression::takeNewValue): Deleted.
3030         (WebCore::WHLSL::AST::ReadModifyWriteExpression::takeNewValueExpression): Deleted.
3031         (WebCore::WHLSL::AST::ReadModifyWriteExpression::takeResultExpression): Deleted.
3032         (WebCore::WHLSL::AST::ReadModifyWriteExpression::ReadModifyWriteExpression): Deleted.
3033         * Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
3034         (WebCore::WHLSL::AST::ReferenceType::ReferenceType):
3035         * Modules/webgpu/WHLSL/AST/WHLSLResolvableType.h:
3036         (WebCore::WHLSL::AST::ResolvableType::ResolvableType):
3037         (): Deleted.
3038         (WebCore::WHLSL::AST::ResolvableType::isFloatLiteralType const): Deleted.
3039         (WebCore::WHLSL::AST::ResolvableType::isIntegerLiteralType const): Deleted.
3040         (WebCore::WHLSL::AST::ResolvableType::isNullLiteralType const): Deleted.
3041         (WebCore::WHLSL::AST::ResolvableType::isUnsignedIntegerLiteralType const): Deleted.
3042         * Modules/webgpu/WHLSL/AST/WHLSLReturn.h:
3043         (WebCore::WHLSL::AST::Return::Return): Deleted.
3044         (WebCore::WHLSL::AST::Return::value): Deleted.
3045         * Modules/webgpu/WHLSL/AST/WHLSLStatement.cpp: Added.
3046         (WebCore::WHLSL::AST::Statement::destroy):
3047         * Modules/webgpu/WHLSL/AST/WHLSLStatement.h:
3048         (WebCore::WHLSL::AST::Statement::Statement):
3049         (WebCore::WHLSL::AST::Statement::kind const):
3050         (WebCore::WHLSL::AST::Statement::isBlock const):
3051         (WebCore::WHLSL::AST::Statement::isBreak const):
3052         (WebCore::WHLSL::AST::Statement::isContinue const):
3053         (WebCore::WHLSL::AST::Statement::isDoWhileLoop const):
3054         (WebCore::WHLSL::AST::Statement::isEffectfulExpressionStatement const):
3055         (WebCore::WHLSL::AST::Statement::isFallthrough const):
3056         (WebCore::WHLSL::AST::Statement::isForLoop const):
3057         (WebCore::WHLSL::AST::Statement::isIfStatement const):
3058         (WebCore::WHLSL::AST::Statement::isReturn const):
3059         (WebCore::WHLSL::AST::Statement::isStatementList const):
3060         (WebCore::WHLSL::AST::Statement::isSwitchCase const):
3061         (WebCore::WHLSL::AST::Statement::isSwitchStatement const):
3062         (WebCore::WHLSL::AST::Statement::isVariableDeclarationsStatement const):
3063         (WebCore::WHLSL::AST::Statement::isWhileLoop const):
3064         (WebCore::WHLSL::AST::Statement::codeLocation const):
3065         (WebCore::WHLSL::AST::Statement::updateCodeLocation):
3066         * Modules/webgpu/WHLSL/AST/WHLSLStatementList.h:
3067         (WebCore::WHLSL::AST::StatementList::StatementList): Deleted.
3068         (WebCore::WHLSL::AST::StatementList::statements): Deleted.
3069         * Modules/webgpu/WHLSL/AST/WHLSLStructureDefinition.h:
3070         (WebCore::WHLSL::AST::StructureDefinition::StructureDefinition): Deleted.
3071         (WebCore::WHLSL::AST::StructureDefinition::structureElements): Deleted.
3072         (WebCore::WHLSL::AST::StructureDefinition::find): Deleted.
3073         * Modules/webgpu/WHLSL/AST/WHLSLStructureElement.h:
3074         (WebCore::WHLSL::AST::StructureElement::StructureElement): Deleted.
3075         (WebCore::WHLSL::AST::StructureElement::codeLocation const): Deleted.
3076         (WebCore::WHLSL::AST::StructureElement::type): Deleted.
3077         (WebCore::WHLSL::AST::StructureElement::name): Deleted.
3078         (WebCore::WHLSL::AST::StructureElement::semantic): Deleted.
3079         * Modules/webgpu/WHLSL/AST/WHLSLSwitchCase.h:
3080         (WebCore::WHLSL::AST::SwitchCase::SwitchCase): Deleted.
3081         (WebCore::WHLSL::AST::SwitchCase::value): Deleted.
3082         (WebCore::WHLSL::AST::SwitchCase::block): Deleted.
3083         * Modules/webgpu/WHLSL/AST/WHLSLSwitchStatement.h:
3084         (WebCore::WHLSL::AST::SwitchStatement::SwitchStatement): Deleted.
3085         (WebCore::WHLSL::AST::SwitchStatement::value): Deleted.
3086         (WebCore::WHLSL::AST::SwitchStatement::switchCases): Deleted.
3087         * Modules/webgpu/WHLSL/AST/WHLSLTernaryExpression.h:
3088         (WebCore::WHLSL::AST::TernaryExpression::TernaryExpression): Deleted.
3089         (WebCore::WHLSL::AST::TernaryExpression::predicate): Deleted.
3090         (WebCore::WHLSL::AST::TernaryExpression::bodyExpression): Deleted.
3091         (WebCore::WHLSL::AST::TernaryExpression::elseExpression): Deleted.
3092         * Modules/webgpu/WHLSL/AST/WHLSLType.cpp: Added.
3093         (WebCore::WHLSL::AST::Type::destroy):
3094         (WebCore::WHLSL::AST::Type::unifyNode):
3095         (WebCore::WHLSL::AST::ResolvableType::canResolve const):
3096         (WebCore::WHLSL::AST::ResolvableType::conversionCost const):
3097         (WebCore::WHLSL::AST::UnnamedType::toString const):
3098         * Modules/webgpu/WHLSL/AST/WHLSLType.h:
3099         (WebCore::WHLSL::AST::Type::Type):
3100         (WebCore::WHLSL::AST::Type::kind const):
3101         (WebCore::WHLSL::AST::Type::isUnnamedType const):
3102         (WebCore::WHLSL::AST::Type::isNamedType const):
3103         (WebCore::WHLSL::AST::Type::isResolvableType const):
3104         (WebCore::WHLSL::AST::Type::isTypeReference const):
3105         (WebCore::WHLSL::AST::Type::isPointerType const):
3106         (WebCore::WHLSL::AST::Type::isArrayReferenceType const):
3107         (WebCore::WHLSL::AST::Type::isArrayType const):
3108         (WebCore::WHLSL::AST::Type::isReferenceType const):
3109         (WebCore::WHLSL::AST::Type::isTypeDefinition const):
3110         (WebCore::WHLSL::AST::Type::isStructureDefinition const):
3111         (WebCore::WHLSL::AST::Type::isEnumerationDefinition const):
3112         (WebCore::WHLSL::AST::Type::isNativeTypeDeclaration const):
3113         (WebCore::WHLSL::AST::Type::isFloatLiteralType const):
3114         (WebCore::WHLSL::AST::Type::isIntegerLiteralType const):
3115         (WebCore::WHLSL::AST::Type::isNullLiteralType const):
3116         (WebCore::WHLSL::AST::Type::isUnsignedIntegerLiteralType const):
3117         (WebCore::WHLSL::AST::Type::unifyNode const):
3118         * Modules/webgpu/WHLSL/AST/WHLSLTypeDefinition.h:
3119         (WebCore::WHLSL::AST::TypeDefinition::TypeDefinition): Deleted.
3120         (WebCore::WHLSL::AST::TypeDefinition::type): Deleted.
3121         * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
3122         * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.cpp:
3123         (WebCore::WHLSL::AST::UnnamedType::hash const):
3124         (WebCore::WHLSL::AST::UnnamedType::operator== const):
3125         * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
3126         (WebCore::WHLSL::AST::UnnamedType::UnnamedType):
3127         (WebCore::WHLSL::AST::UnnamedType::unifyNodeImpl):
3128         (): Deleted.
3129         (WebCore::WHLSL::AST::UnnamedType::kind const): Deleted.
3130         (WebCore::WHLSL::AST::UnnamedType::isTypeReference const): Deleted.
3131         (WebCore::WHLSL::AST::UnnamedType::isPointerType const): Deleted.
3132         (WebCore::WHLSL::AST::UnnamedType::isArrayReferenceType const): Deleted.
3133         (WebCore::WHLSL::AST::UnnamedType::isArrayType const): Deleted.
3134         (WebCore::WHLSL::AST::UnnamedType::isReferenceType const): Deleted.
3135         (WebCore::WHLSL::AST::UnnamedType::unifyNode const): Deleted.
3136         (WebCore::WHLSL::AST::UnnamedType::unifyNode): Deleted.
3137         * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteral.h:
3138         (WebCore::WHLSL::AST::UnsignedIntegerLiteral::UnsignedIntegerLiteral): Deleted.
3139         (WebCore::WHLSL::AST::UnsignedIntegerLiteral::type): Deleted.
3140         (WebCore::WHLSL::AST::UnsignedIntegerLiteral::value const): Deleted.
3141         (WebCore::WHLSL::AST::UnsignedIntegerLiteral::clone const): Deleted.
3142         * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.cpp:
3143         (WebCore::WHLSL::AST::UnsignedIntegerLiteralType::UnsignedIntegerLiteralType):
3144         * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.h:
3145         (WebCore::WHLSL::AST::UnsignedIntegerLiteralType::value const): Deleted.
3146         (WebCore::WHLSL::AST::UnsignedIntegerLiteralType::preferredType): Deleted.
3147         * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclarationsStatement.h:
3148         (WebCore::WHLSL::AST::VariableDeclarationsStatement::VariableDeclarationsStatement): Deleted.
3149         (WebCore::WHLSL::AST::VariableDeclarationsStatement::variableDeclarations): Deleted.
3150         * Modules/webgpu/WHLSL/AST/WHLSLVariableReference.h:
3151         (WebCore::WHLSL::AST::VariableReference::VariableReference): Deleted.
3152         (WebCore::WHLSL::AST::VariableReference::wrap): Deleted.
3153         (WebCore::WHLSL::AST::VariableReference::name): Deleted.
3154         (WebCore::WHLSL::AST::VariableReference::variable): Deleted.
3155         (WebCore::WHLSL::AST::VariableReference::setVariable): Deleted.
3156         * Modules/webgpu/WHLSL/AST/WHLSLWhileLoop.h:
3157         (WebCore::WHLSL::AST::WhileLoop::WhileLoop): Deleted.
3158         (WebCore::WHLSL::AST::WhileLoop::conditional): Deleted.
3159         (WebCore::WHLSL::AST::WhileLoop::body): Deleted.
3160         * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
3161         (WebCore::WHLSL::Metal::BaseTypeNameNode::isPointerTypeNameNode const):
3162         (WebCore::WHLSL::Metal::BaseTypeNameNode::isArrayReferenceTypeNameNode const):
3163         (WebCore::WHLSL::Metal::BaseTypeNameNode::isArrayTypeNameNode const):
3164         (WebCore::WHLSL::Metal::TypeNamer::createNameNode):
3165         (WebCore::WHLSL::Metal::parent):
3166         (WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition):
3167         * Modules/webgpu/WHLSL/WHLSLParser.cpp:
3168         (WebCore::WHLSL::Parser::parseSuffixOperator):
3169         (WebCore::WHLSL::Parser::completeAssignment):
3170         (WebCore::WHLSL::Parser::parsePossiblePrefix):
3171         * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
3172         * Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
3173         (WebCore::WHLSL::Visitor::visit):
3174         * Sources.txt:
3175         * WebCore.xcodeproj/project.pbxproj:
3176         * workers/WorkerScriptLoader.h:
3177
3178 2019-08-09  Youenn Fablet  <youenn@apple.com>
3179
3180         Pass a ScriptExecutionContext as input to register/unregister URLRegistry routines
3181         https://bugs.webkit.org/show_bug.cgi?id=200571
3182
3183         Reviewed by Darin Adler.
3184
3185         Passing a ScriptExecutionContext to register/unregister routines will allow
3186         to have session ID based handling for blobs, in particular to use session partitioned blob registries.
3187         No change of behavior.
3188
3189         * Modules/mediasource/MediaSourceRegistry.cpp:
3190         (WebCore::MediaSourceRegistry::registerURL):
3191         (WebCore::MediaSourceRegistry::unregisterURL):
3192         * Modules/mediasource/MediaSourceRegistry.h:
3193         * fileapi/Blob.cpp:
3194         (WebCore::BlobURLRegistry::registerURL):
3195         (WebCore::BlobURLRegistry::unregisterURL):
3196         * html/DOMURL.cpp:
3197         (WebCore::DOMURL::createPublicURL):
3198         * html/PublicURLManager.cpp:
3199         (WebCore::PublicURLManager::registerURL):
3200         (WebCore::PublicURLManager::revoke):
3201         (WebCore::PublicURLManager::stop):
3202         * html/PublicURLManager.h:
3203         * html/URLRegistry.h:
3204
3205 2019-08-09  Alex Christensen  <achristensen@webkit.org>
3206
3207         Disable CSSOM View Scrolling API for IMDb iOS app
3208         https://bugs.webkit.org/show_bug.cgi?id=200586
3209         <rdar://problem/53645833>
3210
3211         Reviewed by Simon Fraser.
3212
3213         They are calling scrollHeight on the HTML element and it is running new code introduced in r235806
3214         Disable this new feature until they update their app to use the iOS13 SDK.
3215
3216         * platform/RuntimeApplicationChecks.h:
3217         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
3218         (WebCore::IOSApplication::isIMDb):
3219
3220 2019-08-09  Youenn Fablet  <youenn@apple.com>
3221
3222         Remove MediaStreamRegistry
3223         https://bugs.webkit.org/show_bug.cgi?id=200570
3224
3225         Reviewed by Eric Carlson.
3226
3227         MediaStream cannot be registered as an URL by JavaScript.
3228         Remove MediaStreamRegistry and the 'src' loading specific handling in HTMLMediaElement.
3229         Implement ending of capture track by directly handling MediaStreamTrack which is more accurate.
3230         No change of behavior.
3231
3232         * Modules/mediastream/MediaStream.cpp:
3233         (WebCore::MediaStream::MediaStream):
3234         (WebCore::MediaStream::~MediaStream):
3235         (WebCore::MediaStream::stop):
3236         * Modules/mediastream/MediaStream.h:
3237         * Modules/mediastream/MediaStreamRegistry.cpp: Removed.
3238         * Modules/mediastream/MediaStreamRegistry.h: Removed.
3239         * Modules/mediastream/MediaStreamTrack.cpp:
3240         (WebCore::MediaStreamTrack::MediaStreamTrack):
3241         (WebCore::MediaStreamTrack::~MediaStreamTrack):
3242         (WebCore::MediaStreamTrack::endCapture):
3243         * Modules/mediastream/MediaStreamTrack.h:
3244         * Sources.txt:
3245         * WebCore.xcodeproj/project.pbxproj:
3246         * dom/Document.cpp:
3247         (WebCore::Document::stopMediaCapture):
3248         * html/HTMLMediaElement.cpp:
3249         (WebCore::HTMLMediaElement::loadResource):
3250
3251 2019-08-09  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
3252
3253         [GL][GStreamer] activate wrapped shared context
3254         https://bugs.webkit.org/show_bug.cgi?id=196966
3255
3256         Reviewed by Žan Doberšek.
3257
3258         This patch consists in four parts:
3259
3260         1\ When the media player is instantiated, and it is intended to
3261         render textures, it will create a wrapped object of the
3262         application's GL context, and in order to populate the wrapped
3263         object with the GL vtable, the context has to be current. Thus,
3264         this patch makes current the shared WebKit application context,
3265         and populate the wrapped GstGLContext by activating it and filling
3266         in it. Afterwards, the wrapped context is deactivated.
3267
3268         2\ This patch makes GL texture use the RGBA color space, thus the
3269         color transformation is done in GStreamer, and no further color
3270         transformation is required in WebKit.
3271
3272         3\ Since it is not necessary to modify behavior if the decoder is
3273         imxvpudecoder, its identification and label were removed.
3274
3275         4\ As only RGBA is used, the old color conversions when rendering
3276         using Cairo (fallback) were changed to convert the RGBA, as in
3277         GStreamer's format, to ARGB32, as in Cairo format -which depends
3278         on endianness.
3279
3280         No new tests because there is no behavior change.
3281
3282         * platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
3283         (WebCore::ImageGStreamer::ImageGStreamer): Only convert GStreamer
3284         RGBA to Cairo RGB32.
3285         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3286         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Removes
3287         the IMX VPU identification.
3288         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3289         (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
3290         Intializes the wrapped GL Context.
3291         (WebCore::MediaPlayerPrivateGStreamerBase::updateTextureMapperFlags):
3292         Removes frame's color conversion.
3293         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSinkGL):
3294         Instead of parsing a string, the GstCaps are created manually, and
3295         it is set to appsink, rather than a filtered linking.
3296         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
3297         Removes ImxVPU enumeration value.
3298         * platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:
3299         Adds NoConvert option to texture copier, setting an identity
3300         matrix.
3301         (WebCore::VideoTextureCopierGStreamer::updateColorConversionMatrix):
3302         * platform/graphics/gstreamer/VideoTextureCopierGStreamer.h: Adds
3303         NoConvert enumeration value.
3304
3305 2019-08-09  Ryosuke Niwa  <rniwa@webkit.org>
3306
3307         REGRESSION (iOS 13): united.com web forms do not respond to taps
3308         https://bugs.webkit.org/show_bug.cgi?id=200531
3309
3310         Reviewed by Antti Koivisto and Wenson Hsieh.
3311
3312         The bug is caused by the content change observer detecting “Site Feedback” link at the bottom of
3313         the page (https://www.united.com/ual/en/US/account/enroll/default) constantly getting re-generated
3314         in every frame via requestAnimationFrame when the page is opened with iPhone UA string.
3315         Note that the content re-generation can be reproduced even in Chrome if iPhone UA string is used.
3316
3317         Ignore this constant content change in ContentChangeObserver as a site specific quirk.
3318
3319         In the future, we should make ContentChangeObserver observe the final location of each element
3320         being observed so that we can ignore content that like this which is placed outside the viewport,
3321         and/or far away from where the user tapped.
3322
3323         * page/Quirks.cpp:
3324         (WebCore::Quirks::shouldIgnoreContentChange const): Added.
3325         * page/Quirks.h:
3326         * page/ios/ContentChangeObserver.cpp:
3327         (WebCore::ContentChangeObserver::shouldObserveVisibilityChangeForElement):
3328
3329 2019-08-08  Devin Rousso  <drousso@apple.com>
3330
3331         Web Inspector: Page: don't allow the domain to be disabled
3332         https://bugs.webkit.org/show_bug.cgi?id=200109
3333
3334         Reviewed by Brian Burg.
3335
3336         The `PageAgent` is relied on by many of the other agents, so much so that it doesn't make
3337         sense to support the ability to "disable" (as well as "enable") the agent.
3338
3339         When the first frontend connects, we should treat the `PageAgent` as active and available.
3340
3341         * inspector/agents/InspectorPageAgent.h:
3342         * inspector/agents/InspectorPageAgent.cpp:
3343         (WebCore::InspectorPageAgent::didCreateFrontendAndBackend):
3344         (WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
3345         (WebCore::InspectorPageAgent::timestamp):
3346         (WebCore::InspectorPageAgent::enable): Deleted.
3347         (WebCore::InspectorPageAgent::disable): Deleted.
3348
3349         * inspector/agents/InspectorApplicationCacheAgent.cpp:
3350         (WebCore::InspectorApplicationCacheAgent::updateApplicationCacheStatus):
3351         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
3352         (WebCore::InspectorApplicationCacheAgent::assertFrameWithDocumentLoader):
3353         * inspector/agents/InspectorCSSAgent.cpp:
3354         (WebCore::InspectorCSSAgent::createStyleSheet):
3355         * inspector/agents/InspectorDOMAgent.cpp:
3356         (WebCore::InspectorDOMAgent::highlightSelector):
3357         (WebCore::InspectorDOMAgent::highlightFrame):
3358         (WebCore::InspectorDOMAgent::buildObjectForNode):
3359         * inspector/agents/InspectorTimelineAgent.cpp:
3360         (WebCore::InspectorTimelineAgent::setFrameIdentifier):
3361         * inspector/agents/page/PageNetworkAgent.cpp:
3362         (WebCore::PageNetworkAgent::loaderIdentifier):
3363         (WebCore::PageNetworkAgent::frameIdentifier):
3364         (WebCore::PageNetworkAgent::scriptExecutionContext):
3365         * inspector/agents/page/PageRuntimeAgent.cpp:
3366         (WebCore::PageRuntimeAgent::didCreateMainWorldContext):
3367         (WebCore::PageRuntimeAgent::reportExecutionContextCreation):
3368
3369         * testing/Internals.cpp:
3370         (WebCore::InspectorStubFrontend::InspectorStubFrontend):
3371         (WebCore::InspectorStubFrontend::frontendLoaded): Added.
3372         (WebCore::InspectorStubFrontend::closeWindow):
3373         (WebCore::InspectorStubFrontend::sendMessageToFrontend):
3374         (WebCore::InspectorStubFrontend::frontendPage): Deleted.
3375         Ensure that the backend always gets notified via `InspectorFrontendHost.loaded` so that
3376         messages being sent to the frontend are batched.
3377
3378 2019-08-08  Chris Lord  <clord@igalia.com>
3379
3380         Short-cut WebGLRenderingContext::getParameter() for ALPHA_BITS when alpha channel is disabled
3381         https://bugs.webkit.org/show_bug.cgi?id=200499
3382
3383         Reviewed by Darin Adler.
3384
3385         This patch adds a shortcut when a framebuffer isn't bound on WebGL
3386         canvases when retrieving ALPHA_BITS.
3387
3388         No new tests, covered by existing tests.
3389
3390         * html/canvas/WebGLRenderingContext.cpp:
3391         (WebCore::WebGLRenderingContext::getParameter):
3392         Return 0 for ALPHA_BITS if canvas has no alpha component.
3393         * html/canvas/WebGL2RenderingContext.cpp: