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