2e8d75716c616530179e37b43e54f4c9c698b8ca
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2019-04-20  Jer Noble  <jer.noble@apple.com>
2
3         REGRESSION(r243958): Unnecessary deactivation of AudioSession (PLT Regression)
4         https://bugs.webkit.org/show_bug.cgi?id=197123
5         <rdar://problem/49783264>
6
7         Reviewed by Per Arne Vollan.
8
9         Only set m_becameActive if we actually activated the AudioSession before starting playback. This
10         avoids unnecessarily deactivating the AudioSession in processWillSuspend().
11
12         * platform/audio/PlatformMediaSessionManager.cpp:
13         (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
14
15 2019-04-19  Devin Rousso  <drousso@apple.com>
16
17         Web Inspector: Timelines: CPU: ensure that tracking stops when disconnecting Web Inspector
18         https://bugs.webkit.org/show_bug.cgi?id=197115
19         <rdar://problem/49877875>
20
21         Reviewed by Joseph Pecoraro.
22
23         * inspector/agents/InspectorCPUProfilerAgent.cpp:
24         (WebCore::InspectorCPUProfilerAgent::willDestroyFrontendAndBackend):
25
26 2019-04-19  Devin Rousso  <drousso@apple.com>
27
28         Web Inspector: REGRESSION: Elements: "Inspect Element" context menu often doesn't select that element
29         https://bugs.webkit.org/show_bug.cgi?id=197091
30         <rdar://problem/49953728>
31
32         Reviewed by Joseph Pecoraro.
33
34         Delay the `inspect` event fron firing with the focued node until the frontend has had a
35         chance to request the document. Otherwise, requesting the document clears the mapping of
36         node-to-id, so the focused node's id would no longer be valid.
37
38         * inspector/agents/InspectorDOMAgent.cpp:
39         (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
40         (WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
41         (WebCore::InspectorDOMAgent::getDocument):
42         (WebCore::InspectorDOMAgent::focusNode):
43         (WebCore::InspectorDOMAgent::didCommitLoad):
44
45 2019-04-19  John Wilander  <wilander@apple.com>
46
47         Disable Ad Click Attribution in ephemeral sessions and make sure conversion requests use an ephemeral, stateless session
48         https://bugs.webkit.org/show_bug.cgi?id=197108
49         <rdar://problem/49918702>
50
51         Reviewed by Alex Christensen.
52
53         Tests: http/tests/adClickAttribution/conversion-disabled-in-ephemeral-session.html
54                http/tests/adClickAttribution/store-disabled-in-ephemeral-session.html
55
56         * html/HTMLAnchorElement.cpp:
57         (WebCore::HTMLAnchorElement::parseAdClickAttribution const):
58             Early return for ephemeral sessions.
59         * loader/ResourceLoader.cpp:
60         (WebCore::ResourceLoader::shouldUseCredentialStorage):
61             Now returns false for StoredCredentialsPolicy:EphemeralStatelessCookieless.
62         * platform/network/StoredCredentialsPolicy.h:
63             Added enum value EphemeralStatelessCookieless.
64
65 2019-04-19  Timothy Hatcher  <timothy@apple.com>
66
67         Standardize the <meta name="color-scheme"> separator.
68         https://bugs.webkit.org/show_bug.cgi?id=193931
69         rdar://problem/49995929
70
71         Reviewed by Darin Adler.
72
73         Tests: css-dark-mode/color-scheme-meta.html
74
75         * dom/Document.cpp:
76         (WebCore::processColorSchemeString): Use isHTMLSpace insead of isColorSchemeSeparator and isASCIISpace.
77         (WebCore::isColorSchemeSeparator): Deleted.
78
79 2019-04-19  Wenson Hsieh  <wenson_hsieh@apple.com>
80
81         [iOS] Add quirks to disable autocorrection and autocapitalization in hidden editable areas on some websites
82         https://bugs.webkit.org/show_bug.cgi?id=197102
83         <rdar://problem/49864669>
84
85         Reviewed by Ryosuke Niwa.
86
87         Add a quirk to disable autocorrection and autocapitalization in hidden editable areas.
88
89         * page/Quirks.cpp:
90         (WebCore::shouldSuppressAutocorrectionAndAutocaptializationInHiddenEditableAreasForHost):
91         (WebCore::Quirks::shouldSuppressAutocorrectionAndAutocaptializationInHiddenEditableAreas const):
92         * page/Quirks.h:
93
94 2019-04-18  Fujii Hironori  <Hironori.Fujii@sony.com>
95
96         Implement KeyedDecoderGeneric and KeyedEncoderGeneric
97         https://bugs.webkit.org/show_bug.cgi?id=186410
98
99         Reviewed by Don Olmstead.
100
101         Implemented KeyedDecoderGeneric and KeyedEncoderGeneric by using
102         WTF::Persistence::Decoder and WTF::Persistence::Encoder.
103
104         No new tests. Covered by existing tests.
105
106         * PlatformWin.cmake: Added KeyedDecoderGeneric.cpp and
107         KeyedEncoderGeneric.cpp, and removed KeyedDecoderCF.cpp and
108         KeyedEncoderCF.cpp for WinCairo port.
109         * platform/generic/KeyedDecoderGeneric.cpp:
110         * platform/generic/KeyedDecoderGeneric.h:
111         * platform/generic/KeyedEncoderGeneric.cpp:
112         * platform/generic/KeyedEncoderGeneric.h:
113
114 2019-04-18  Ross Kirsling  <ross.kirsling@sony.com>
115
116         [WinCairo] Non-unified build fails to link Tools
117         https://bugs.webkit.org/show_bug.cgi?id=196866
118
119         Reviewed by Fujii Hironori.
120
121         * CMakeLists.txt:
122         Drive-by fix -- don't disable string pooling when building WebCoreTestSupport.
123         (This should have been part of r235203.)
124
125 2019-04-18  Commit Queue  <commit-queue@webkit.org>
126
127         Unreviewed, rolling out r244434.
128         https://bugs.webkit.org/show_bug.cgi?id=197089
129
130         caused 1 API test failure (Requested by zalan on #webkit).
131
132         Reverted changeset:
133
134         "Regression (r244291): Broken API Test
135         AutoLayoutRenderingProgressRelativeOrdering"
136         https://bugs.webkit.org/show_bug.cgi?id=196948
137         https://trac.webkit.org/changeset/244434
138
139 2019-04-18  Don Olmstead  <don.olmstead@sony.com>
140
141         [CMake] Make WebCore headers copies
142         https://bugs.webkit.org/show_bug.cgi?id=182512
143         <rdar://problem/37510435>
144
145         Unreviewed build fix.
146
147         Add new header from r244440.
148
149         * Headers.cmake:
150
151 2019-04-18  Don Olmstead  <don.olmstead@sony.com>
152
153         [CMake] Make WebCore headers copies
154         https://bugs.webkit.org/show_bug.cgi?id=182512
155         <rdar://problem/37510435>
156
157         Reviewed by Alex Christensen.
158
159         The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was
160         originally Windows only but now this is enabled for all CMake based ports.
161
162         Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and
163         tests. Shared headers are within Headers.cmake while port and platform specific headers
164         are in their respective CMake files. Listing out all headers is preferred because globbing
165         will break the build whenever a file is added.
166
167         All include directories within the WebCore source tree are now PRIVATE. They were
168         modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets
169         which will prevent erroneous includes in targets dependent on WebCore.
170
171         * CMakeLists.txt:
172         * Headers.cmake: Added.
173         * PlatformAppleWin.cmake:
174         * PlatformGTK.cmake:
175         * PlatformMac.cmake:
176         * PlatformPlayStation.cmake:
177         * PlatformWPE.cmake:
178         * PlatformWin.cmake:
179         * PlatformWinCairo.cmake:
180         * platform/Cairo.cmake:
181         * platform/Curl.cmake:
182         * platform/FreeType.cmake:
183         * platform/GStreamer.cmake:
184         * platform/HolePunch.cmake:
185         * platform/ImageDecoders.cmake:
186         * platform/Soup.cmake: Added.
187         * platform/TextureMapper.cmake:
188
189 2019-04-18  Justin Fan  <justin_fan@apple.com>
190
191         [Web GPU] Implement API default values
192         https://bugs.webkit.org/show_bug.cgi?id=197032
193
194         Reviewed by Myles C. Maxfield.
195
196         Add default values and 'required' qualifiers recently merged to the WebGPU API.
197
198         WebGPU tests specifying these default values have been updated to rely on them for functionality.
199
200         * Modules/webgpu/GPUBindGroupLayoutBinding.idl:
201         * Modules/webgpu/GPUBindGroupLayoutDescriptor.idl:
202         * Modules/webgpu/GPUBlendDescriptor.idl:
203         * Modules/webgpu/GPUBufferDescriptor.idl:
204         * Modules/webgpu/GPUColor.idl:
205         * Modules/webgpu/GPUColorStateDescriptor.idl:
206         * Modules/webgpu/GPUDepthStencilStateDescriptor.idl:
207         * Modules/webgpu/GPUExtent3D.idl:
208         * Modules/webgpu/GPUInputStateDescriptor.idl:
209         * Modules/webgpu/GPUOrigin3D.h:
210         * Modules/webgpu/GPUOrigin3D.idl:
211         * Modules/webgpu/GPURequestAdapterOptions.idl:
212         * Modules/webgpu/GPUTextureDescriptor.idl:
213         * Modules/webgpu/GPUVertexAttributeDescriptor.idl:
214         * Modules/webgpu/GPUVertexInputDescriptor.idl:
215         * Modules/webgpu/WebGPUBindGroupBinding.idl:
216         * Modules/webgpu/WebGPUBindGroupDescriptor.idl:
217         * Modules/webgpu/WebGPUBufferBinding.h:
218         * Modules/webgpu/WebGPUBufferBinding.idl:
219         * Modules/webgpu/WebGPUCommandEncoder.idl:
220         * Modules/webgpu/WebGPUPipelineDescriptorBase.idl:
221         * Modules/webgpu/WebGPUPipelineLayoutDescriptor.idl:
222         * Modules/webgpu/WebGPUPipelineStageDescriptor.idl:
223         * Modules/webgpu/WebGPURenderPassDescriptor.idl:
224         * Modules/webgpu/WebGPURenderPipelineDescriptor.cpp:
225         (WebCore::WebGPURenderPipelineDescriptor::tryCreateGPURenderPipelineDescriptor const):
226         * Modules/webgpu/WebGPURenderPipelineDescriptor.h:
227         * Modules/webgpu/WebGPURenderPipelineDescriptor.idl:
228         * Modules/webgpu/WebGPUShaderModuleDescriptor.idl:
229         * platform/graphics/gpu/GPUBlendDescriptor.h:
230         * platform/graphics/gpu/GPUColorStateDescriptor.h:
231         * platform/graphics/gpu/GPUCommandBuffer.h:
232         * platform/graphics/gpu/GPUDepthStencilStateDescriptor.h:
233         * platform/graphics/gpu/GPURenderPassDescriptor.h:
234         * platform/graphics/gpu/GPURenderPipelineDescriptor.h:
235         (WebCore::GPURenderPipelineDescriptor::GPURenderPipelineDescriptor):
236         * platform/graphics/gpu/GPURequestAdapterOptions.h:
237         * platform/graphics/gpu/GPUTextureDescriptor.h:
238         * platform/graphics/gpu/GPUVertexAttributeDescriptor.h:
239         * platform/graphics/gpu/GPUVertexInputDescriptor.h:
240         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
241         (WebCore::convertRenderPipelineDescriptor):
242         (WebCore::trySetFunctionsForPipelineDescriptor):
243
244 2019-04-18  Jer Noble  <jer.noble@apple.com>
245
246         Refactoring: Pull all fullscreen code out of Document and into its own helper class
247         https://bugs.webkit.org/show_bug.cgi?id=197017
248
249         Reviewed by Eric Carlson.
250
251         * CMakeLists.txt:
252         * DerivedSources-input.xcfilelist:
253         * DerivedSources-output.xcfilelist:
254         * DerivedSources.make:
255         * Sources.txt:
256         * WebCore.xcodeproj/project.pbxproj:
257         * css/CSSDefaultStyleSheets.cpp:
258         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
259         * css/SelectorCheckerTestFunctions.h:
260         (WebCore::matchesFullScreenPseudoClass):
261         (WebCore::matchesFullScreenAnimatingFullScreenTransitionPseudoClass):
262         (WebCore::matchesFullScreenDocumentPseudoClass):
263         (WebCore::matchesFullScreenControlsHiddenPseudoClass):
264         * dom/Document.cpp:
265         (WebCore::Document::removedLastRef):
266         (WebCore::Document::prepareForDestruction):
267         (WebCore::Document::nodeChildrenWillBeRemoved):
268         (WebCore::Document::nodeWillBeRemoved):
269         (WebCore::isAttributeOnAllOwners): Deleted.
270         (WebCore::Document::fullScreenIsAllowedForElement const): Deleted.
271         (WebCore::Document::requestFullScreenForElement): Deleted.
272         (WebCore::Document::webkitCancelFullScreen): Deleted.
273         (WebCore::Document::webkitExitFullscreen): Deleted.
274         (WebCore::Document::webkitFullscreenEnabled const): Deleted.
275         (WebCore::unwrapFullScreenRenderer): Deleted.
276         (WebCore::Document::webkitWillEnterFullScreen): Deleted.
277         (WebCore::Document::webkitDidEnterFullScreen): Deleted.
278         (WebCore::Document::webkitWillExitFullScreen): Deleted.
279         (WebCore::Document::webkitDidExitFullScreen): Deleted.
280         (WebCore::Document::setFullScreenRenderer): Deleted.
281         (WebCore::Document::dispatchFullScreenChangeEvents): Deleted.
282         (WebCore::Document::dispatchFullScreenChangeOrErrorEvent): Deleted.
283         (WebCore::Document::fullScreenElementRemoved): Deleted.
284         (WebCore::Document::adjustFullScreenElementOnNodeRemoval): Deleted.
285         (WebCore::Document::isAnimatingFullScreen const): Deleted.
286         (WebCore::Document::setAnimatingFullScreen): Deleted.
287         (WebCore::Document::areFullscreenControlsHidden const): Deleted.
288         (WebCore::Document::setFullscreenControlsHidden): Deleted.
289         (WebCore::Document::clearFullscreenElementStack): Deleted.
290         (WebCore::Document::popFullscreenElementStack): Deleted.
291         (WebCore::Document::pushFullscreenElementStack): Deleted.
292         (WebCore::Document::addDocumentToFullScreenChangeEventQueue): Deleted.
293         * dom/Document.h:
294         (WebCore::Document::fullscreenManager):
295         (WebCore::Document::webkitIsFullScreen const): Deleted.
296         (WebCore::Document::webkitFullScreenKeyboardInputAllowed const): Deleted.
297         (WebCore::Document::webkitCurrentFullScreenElement const): Deleted.
298         (WebCore::Document::webkitCurrentFullScreenElementForBindings const): Deleted.
299         (WebCore::Document::fullScreenRenderer const): Deleted.
300         (WebCore::Document::webkitFullscreenElement const): Deleted.
301         (WebCore::Document::webkitFullscreenElementForBindings const): Deleted.
302         * dom/Document.idl:
303         * dom/DocumentFullscreen.h:
304         (WebCore::DocumentFullscreen::webkitFullscreenEnabled):
305         (WebCore::DocumentFullscreen::webkitFullscreenElement):
306         (WebCore::DocumentFullscreen::webkitExitFullscreen):
307         (WebCore::DocumentFullscreen::webkitIsFullScreen):
308         (WebCore::DocumentFullscreen::webkitFullScreenKeyboardInputAllowed):
309         (WebCore::DocumentFullscreen::webkitCurrentFullScreenElement):
310         (WebCore::DocumentFullscreen::webkitCancelFullScreen):
311         * dom/DocumentFullscreen.idl:
312         * dom/Element.cpp:
313         (WebCore::Element::webkitRequestFullscreen):
314         * dom/EventPath.cpp:
315         (WebCore::shouldEventCrossShadowBoundary):
316         * dom/FullscreenManager.cpp: Added.
317         (WebCore::isAttributeOnAllOwners):
318         (WebCore::FullscreenManager::FullscreenManager):
319         (WebCore::FullscreenManager::fullscreenIsAllowedForElement const):
320         (WebCore::FullscreenManager::requestFullscreenForElement):
321         (WebCore::FullscreenManager::cancelFullscreen):
322         (WebCore::FullscreenManager::requestExitFullscreen):
323         (WebCore::FullscreenManager::exitFullscreen):
324         (WebCore::FullscreenManager::isFullscreenEnabled const):
325         (WebCore::unwrapFullscreenRenderer):
326         (WebCore::FullscreenManager::willEnterFullscreen):
327         (WebCore::FullscreenManager::didEnterFullscreen):
328         (WebCore::FullscreenManager::willExitFullscreen):
329         (WebCore::FullscreenManager::didExitFullscreen):
330         (WebCore::FullscreenManager::setFullscreenRenderer):
331         (WebCore::FullscreenManager::dispatchFullscreenChangeEvents):
332         (WebCore::FullscreenManager::dispatchFullscreenChangeOrErrorEvent):
333         (WebCore::FullscreenManager::fullscreenElementRemoved):
334         (WebCore::FullscreenManager::adjustFullscreenElementOnNodeRemoval):
335         (WebCore::FullscreenManager::isAnimatingFullscreen const):
336         (WebCore::FullscreenManager::setAnimatingFullscreen):
337         (WebCore::FullscreenManager::areFullscreenControlsHidden const):
338         (WebCore::FullscreenManager::setFullscreenControlsHidden):
339         (WebCore::FullscreenManager::clear):
340         (WebCore::FullscreenManager::emptyEventQueue):
341         (WebCore::FullscreenManager::clearFullscreenElementStack):
342         (WebCore::FullscreenManager::popFullscreenElementStack):
343         (WebCore::FullscreenManager::pushFullscreenElementStack):
344         (WebCore::FullscreenManager::addDocumentToFullscreenChangeEventQueue):
345         * dom/FullscreenManager.h: Added.
346         (WebCore::FullscreenManager::document):
347         (WebCore::FullscreenManager::document const):
348         (WebCore::FullscreenManager::topDocument const):
349         (WebCore::FullscreenManager::page const):
350         (WebCore::FullscreenManager::frame const):
351         (WebCore::FullscreenManager::documentElement const):
352         (WebCore::FullscreenManager::hasLivingRenderTree const):
353         (WebCore::FullscreenManager::pageCacheState const):
354         (WebCore::FullscreenManager::scheduleFullStyleRebuild):
355         (WebCore::FullscreenManager::fullscreenElement const):
356         (WebCore::FullscreenManager::isFullscreen const):
357         (WebCore::FullscreenManager::isFullscreenKeyboardInputAllowed const):
358         (WebCore::FullscreenManager::currentFullscreenElement const):
359         (WebCore::FullscreenManager::fullscreenRenderer const):
360         * html/HTMLMediaElement.cpp:
361         (WebCore::HTMLMediaElement::isFullscreen const):
362         (WebCore::HTMLMediaElement::isStandardFullscreen const):
363         (WebCore::HTMLMediaElement::enterFullscreen):
364         (WebCore::HTMLMediaElement::exitFullscreen):
365         * html/MediaElementSession.cpp:
366         (WebCore::MediaElementSession::canShowControlsManager const):
367         * html/shadow/MediaControlElements.cpp:
368         (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
369         * inspector/agents/InspectorDOMAgent.cpp:
370         * page/EventHandler.cpp:
371         (WebCore::EventHandler::isKeyEventAllowedInFullScreen const):
372         (WebCore::EventHandler::internalKeyEvent):
373         * page/Page.cpp:
374         (WebCore::Page::setFullscreenControlsHidden):
375         * rendering/RenderFullScreen.cpp:
376         (WebCore::RenderFullScreen::wrapNewRenderer):
377         (WebCore::RenderFullScreen::wrapExistingRenderer):
378         * rendering/RenderLayerCompositor.cpp:
379         (WebCore::isDescendantOfFullScreenLayer):
380         * rendering/updating/RenderTreeBuilder.h:
381         * rendering/updating/RenderTreeBuilderInline.cpp:
382         (WebCore::RenderTreeBuilder::Inline::splitInlines):
383         * rendering/updating/RenderTreeUpdater.cpp:
384         (WebCore::RenderTreeUpdater::createRenderer):
385         * style/StyleSharingResolver.cpp:
386         (WebCore::Style::SharingResolver::canShareStyleWithElement const):
387         * testing/Internals.cpp:
388         (WebCore::Internals::webkitWillEnterFullScreenForElement):
389         (WebCore::Internals::webkitDidEnterFullScreenForElement):
390         (WebCore::Internals::webkitWillExitFullScreenForElement):
391         (WebCore::Internals::webkitDidExitFullScreenForElement):
392         (WebCore::Internals::isAnimatingFullScreen const):
393
394 2019-04-18  Jer Noble  <jer.noble@apple.com>
395
396         Add support for parsing FairPlayStreaming PSSH boxes.
397         https://bugs.webkit.org/show_bug.cgi?id=197064
398
399         Reviewed by Eric Carlson.
400
401         API Tests: ISO.ISOFairPlayStreamingPsshBox
402
403         Add a new set of ISOBox classes for parsing the contents of a FairPlayStreaming PSSH box,
404         and add support for this new box to CDMFairPlayStreaming.
405
406         Drive-by fix: add an explicit include for MainThread.h to LibWebRTCProviderCocoa.cpp.
407
408         * SourcesCocoa.txt:
409         * WebCore.xcodeproj/project.pbxproj:
410         * platform/graphics/FourCC.h:
411         * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:
412         (WebCore::CDMPrivateFairPlayStreaming::cencName):
413         (WebCore::fairPlaySystemID):
414         (WebCore::extractSchemeAndKeyIdFromCenc):
415         (WebCore::CDMPrivateFairPlayStreaming::extractKeyIDsCenc):
416         (WebCore::CDMPrivateFairPlayStreaming::sanitizeCenc):
417         (WebCore::validInitDataTypes):
418         (WebCore::CDMFactory::platformRegisterFactories):
419         * platform/graphics/avfoundation/CDMFairPlayStreaming.h:
420         * platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.cpp: Added.
421         (WebCore::ISOFairPlayStreamingPsshBox::fairPlaySystemID):
422         (WebCore::ISOFairPlayStreamingInfoBox::parse):
423         (WebCore::ISOFairPlayStreamingKeyRequestInfoBox::parse):
424         (WebCore::ISOFairPlayStreamingKeyAssetIdBox::parse):
425         (WebCore::ISOFairPlayStreamingKeyContextBox::parse):
426         (WebCore::ISOFairPlayStreamingKeyVersionListBox::parse):
427         (WebCore::ISOFairPlayStreamingKeyRequestBox::parse):
428         (WebCore::ISOFairPlayStreamingInitDataBox::parse):
429         (WebCore::ISOFairPlayStreamingPsshBox::parse):
430         * platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h: Added.
431         * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
432
433 2019-04-18  Sihui Liu  <sihui_liu@apple.com>
434
435         Blob type cannot be stored correctly in IDB when IDBObjectStore has autoIncrement and keyPath options
436         https://bugs.webkit.org/show_bug.cgi?id=196128
437         <rdar://problem/49562115>
438
439         Reviewed by Geoffrey Garen.
440
441         If a key is auto-generated, it should become a property of the value object. Network process would perform the 
442         key injection by deserializing IDBValue into script value, setting the property, serializing the result and 
443         storing it in a database record. But network process does not have a JSDOMGlobalObject, so it would fail to 
444         deserialize types including Blob and File.
445
446         To solve this issue, we move the key injection to web process and let network process store the original value 
447         it gets. In this case, when web process asks for some value, network process should return key, value and key 
448         path so that web process can decide whether it should perform a key injection before returning the result. Note
449         that the auto-generated key would always be stored as the key in a ObjectStore record.
450
451         Test: storage/indexeddb/modern/objectstore-autoincrement-types.html
452
453         * Modules/indexeddb/IDBCursor.cpp:
454         (WebCore::IDBCursor::setGetResult):
455         * Modules/indexeddb/IDBCursor.h:
456         (WebCore::IDBCursor::primaryKeyPath):
457         * Modules/indexeddb/IDBGetAllResult.cpp:
458         (WebCore::IDBGetAllResult::isolatedCopy):
459         (WebCore::IDBGetAllResult::addKey):
460         (WebCore::IDBGetAllResult::addValue):
461         (WebCore::IDBGetAllResult::keys const):
462         (WebCore::IDBGetAllResult::values const):
463         (WebCore::IDBGetAllResult::allBlobFilePaths const):
464         (WebCore::isolatedCopyOfVariant): Deleted.
465
466         * Modules/indexeddb/IDBGetAllResult.h: Introduce an IDBKeyPath parameter. Also replace Variant with two Vectors,
467         because we only needed to store either key or value before, and now the stored value could be incomplete.
468         (WebCore::IDBGetAllResult::IDBGetAllResult):
469         (WebCore::IDBGetAllResult::keyPath const):
470         (WebCore::IDBGetAllResult::encode const):
471         (WebCore::IDBGetAllResult::decode):
472
473         * Modules/indexeddb/IDBGetResult.cpp:
474         (WebCore::IDBGetResult::setValue):
475         * Modules/indexeddb/IDBGetResult.h:
476         (WebCore::IDBGetResult::IDBGetResult):
477         (WebCore::IDBGetResult::keyPath const):
478         * Modules/indexeddb/IDBRequest.cpp:
479         (WebCore::IDBRequest::setResult):
480         (WebCore::IDBRequest::setResultToStructuredClone):
481         * Modules/indexeddb/IDBRequest.h:
482         * Modules/indexeddb/IDBTransaction.cpp:
483         (WebCore::IDBTransaction::didGetAllRecordsOnServer):
484         (WebCore::IDBTransaction::didGetRecordOnServer):
485         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
486         (WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
487         * Modules/indexeddb/server/MemoryIndex.cpp:
488         (WebCore::IDBServer::MemoryIndex::getResultForKeyRange const):
489         (WebCore::IDBServer::MemoryIndex::getAllRecords const):
490         * Modules/indexeddb/server/MemoryIndexCursor.cpp:
491         (WebCore::IDBServer::MemoryIndexCursor::currentData):
492         * Modules/indexeddb/server/MemoryObjectStore.cpp:
493         (WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord):
494         (WebCore::IDBServer::MemoryObjectStore::populateIndexWithExistingRecords):
495         (WebCore::IDBServer::MemoryObjectStore::getAllRecords const):
496         * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
497         (WebCore::IDBServer::MemoryObjectStoreCursor::currentData):
498         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
499         (WebCore::IDBServer::SQLiteIDBBackingStore::updateOneIndexForAddRecord):
500         (WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
501         (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
502         (WebCore::IDBServer::SQLiteIDBBackingStore::cachedStatementForGetAllObjectStoreRecords):
503         (WebCore::IDBServer::SQLiteIDBBackingStore::getAllObjectStoreRecords):
504         (WebCore::IDBServer::SQLiteIDBBackingStore::getAllIndexRecords):
505         (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
506         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey):
507         (WebCore::IDBServer::SQLiteIDBBackingStore::openCursor):
508         (WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
509         * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
510         (WebCore::IDBServer::SQLiteIDBCursor::currentData):
511         * Modules/indexeddb/server/SQLiteIDBCursor.h:
512         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
513
514         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd): Remove the key injection from network process. 
515         UniqueIDBDatabase stores any value it gets from IDBClient.
516
517         * Modules/indexeddb/shared/IDBResultData.cpp:
518         (WebCore::IDBResultData::getResultRef):
519         * Modules/indexeddb/shared/IDBResultData.h:
520
521         * bindings/js/IDBBindingUtilities.cpp:
522         (WebCore::injectIDBKeyIntoScriptValue): If property is read-only, set would fail and injectKeyIntoResult would
523         return null, but we expect it to return result as long as the property value is the same as target. Therefore, 
524         we can add an early return here.
525
526         (WebCore::createKeyPathArray):
527         (WebCore::generateIndexKeyForValue): We used to generate IndexKey from value stored in database but now the
528         value gets stored does not include auto-generated key, as we remove the key injection from network process. In 
529         this case if the IDBIndex has the same key path as the auto-generated key, IndexKey would be failed to create
530         for it cannot extract auto-generated key from value. Since the auto-generated key would always be the key in 
531         database record, we could use value of that key when we find a match in key path.
532
533         (WebCore::deserializeIDBValueWithKeyInjection): If the key path in the result is single entry, the key is 
534         probably auto-generated, so we could inject the result key into the result value unconditionally.
535
536         * bindings/js/IDBBindingUtilities.h:
537         * bindings/js/JSIDBCursorWithValueCustom.cpp:
538         (WebCore::JSIDBCursorWithValue::value const):
539         * bindings/js/JSIDBRequestCustom.cpp:
540         (WebCore::JSIDBRequest::result const):
541
542 2019-04-18  Zalan Bujtas  <zalan@apple.com>
543
544         Regression (r244291): Broken API Test AutoLayoutRenderingProgressRelativeOrdering
545         https://bugs.webkit.org/show_bug.cgi?id=196948
546         <rdar://problem/49927131>
547
548         Reviewed by Tim Horton.
549
550         * page/FrameView.cpp:
551         (WebCore::FrameView::setContentsSize):
552         (WebCore::FrameView::autoSizeIfEnabled):
553         * page/FrameView.h:
554
555 2019-04-18  Shawn Roberts  <sroberts@apple.com>
556
557         Unreviewed manual rollout of r244248 and r244409
558         Causing assertion failures on Mac WK2 Debug builds
559         https://bugs.webkit.org/show_bug.cgi?id=195623
560
561         * loader/LinkLoader.cpp:
562         (WebCore::LinkLoader::prefetchIfNeeded):
563         * loader/ResourceLoadInfo.cpp:
564         (WebCore::toResourceType):
565         * loader/ResourceLoadInfo.h:
566         * loader/ResourceLoader.cpp:
567         (WebCore::ResourceLoader::willSendRequestInternal):
568         * loader/cache/CachedResourceLoader.cpp:
569         (WebCore::CachedResourceLoader::requestResource):
570
571 2019-04-18  Antti Koivisto  <antti@apple.com>
572
573         Tile update problems in iframe after scrolling page too soon after load
574         https://bugs.webkit.org/show_bug.cgi?id=197057
575         <rdar://problem/49913663>
576
577         Reviewed by Simon Fraser.
578
579         We end up destroying FrameHosting scrolling node when we shouldn't.
580
581         No test, despite attempts I couldn't get this state to stick. The problem is that in
582         most cases the destroying scrolling node gets immediately recreated and connected again.
583         Getting into testably buggy state requires some very specific layer tree configuration update.
584
585         * rendering/RenderLayerBacking.cpp:
586         (WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
587
588         Test the right thing.
589
590 2019-04-18  Antoine Quint  <graouts@apple.com>
591
592         [Pointer Events WPT] Unskip imported/w3c/web-platform-tests/pointerevents/pointerevent_lostpointercapture_for_disconnected_node.html
593         https://bugs.webkit.org/show_bug.cgi?id=197004
594
595         Reviewed by Antti Koivisto.
596
597         We need to release pointer capture when an element that has pointer capture is disconnected from the DOM.
598
599         * dom/Element.cpp:
600         (WebCore::Element::removedFromAncestor): Notify the PointerCaptureController that an element was disconnected.
601         * dom/PointerEvent.cpp:
602         (WebCore::PointerEvent::create): Broaden createPointerCancelEvent() to take in an event type so that we may use it to create a
603         lostpointercapture event as well.
604         (WebCore::PointerEvent::createPointerCancelEvent): Deleted.
605         * dom/PointerEvent.h:
606         * page/PointerCaptureController.cpp:
607         (WebCore::PointerCaptureController::elementWasRemoved): Check whether the provided element matches one of the target overrides recorded
608         in the map of captured pointer IDs.
609         (WebCore::PointerCaptureController::pointerEventWasDispatched): This block of code was actually useless in this location, the new code
610         added in elementWasRemoved() performs the actions that the spec text mandates.
611         (WebCore::PointerCaptureController::cancelPointer): Replace the call to createPointerCancelEvent() with one to create().
612         * page/PointerCaptureController.h:
613
614 2019-04-17  Antoine Quint  <graouts@apple.com>
615
616         [Pointer Events WPT] Unskip imported/w3c/web-platform-tests/pointerevents/pointerevent_on_event_handlers.html
617         https://bugs.webkit.org/show_bug.cgi?id=197006
618
619         Reviewed by Antti Koivisto.
620
621         Add support for on* HTML attributes and JS properties for pointer events.
622
623         * dom/GlobalEventHandlers.idl:
624         * html/HTMLAttributeNames.in:
625         * html/HTMLElement.cpp:
626         (WebCore::HTMLElement::createEventHandlerNameMap):
627
628 2019-04-17  Timothy Hatcher  <timothy@apple.com>
629
630         Standardize the `<meta name="color-scheme">` separator.
631         https://bugs.webkit.org/show_bug.cgi?id=193931
632
633         Reviewed by Simon Fraser.
634
635         Drop support for comma as a valid seperator in <meta name="color-scheme"> to
636         match the proposal being tracked by: https://github.com/whatwg/html/issues/4504
637
638         Tests: css-dark-mode/color-scheme-meta.html
639                css-dark-mode/older-syntax/supported-color-schemes-meta.html
640
641         * dom/Document.cpp:
642         (WebCore::isColorSchemeSeparator): Drop support for comma.
643
644 2019-04-17  Timothy Hatcher  <timothy@apple.com>
645
646         Rename `supported-color-schemes` to `color-scheme`.
647         https://bugs.webkit.org/show_bug.cgi?id=197016
648         rdar://problem/49980259
649
650         Reviewed by Simon Fraser.
651
652         Changed `supported-color-schemes` to `color-scheme` to follow the spec changes
653         being tracked by: https://github.com/w3c/csswg-drafts/issues/3807
654
655         The old `supported-color-schemes` is now an alias of `color-scheme` for compatibility.
656
657         Tests: css-dark-mode/color-scheme-css-parse.html
658                css-dark-mode/color-scheme-css.html
659                css-dark-mode/color-scheme-meta.html
660                css-dark-mode/color-scheme-priority.html
661                css-dark-mode/color-scheme-scrollbar.html
662                css-dark-mode/older-syntax/supported-color-schemes-css.html
663                css-dark-mode/older-syntax/supported-color-schemes-meta.html
664                css-dark-mode/older-systems/color-scheme-css.html
665                css-dark-mode/older-systems/color-scheme-meta.html
666
667         * WebCore.xcodeproj/project.pbxproj:
668         * css/CSSComputedStyleDeclaration.cpp:
669         (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
670         * css/CSSProperties.json:
671         * css/CSSValueKeywords.in:
672         * css/StyleBuilderConverter.h:
673         (WebCore::StyleBuilderConverter::updateColorScheme):
674         (WebCore::StyleBuilderConverter::convertColorScheme):
675         (WebCore::StyleBuilderConverter::updateSupportedColorSchemes): Deleted.
676         (WebCore::StyleBuilderConverter::convertSupportedColorSchemes): Deleted.
677         * css/StyleBuilderCustom.h:
678         (WebCore::StyleBuilderCustom::applyValueColorScheme):
679         (WebCore::StyleBuilderCustom::applyValueSupportedColorSchemes): Deleted.
680         * css/StyleResolver.cpp:
681         (WebCore::StyleResolver::applyMatchedProperties):
682         * css/parser/CSSPropertyParser.cpp:
683         (WebCore::consumeColorScheme):
684         (WebCore::CSSPropertyParser::parseSingleValue):
685         (WebCore::consumeSupportedColorSchemes): Deleted.
686         * dom/Document.cpp:
687         (WebCore::processColorSchemeString):
688         (WebCore::Document::processColorScheme):
689         (WebCore::Document::useDarkAppearance const):
690         (WebCore::processColorSchemes): Deleted.
691         (WebCore::Document::processSupportedColorSchemes): Deleted.
692         * dom/Document.h:
693         * html/HTMLMetaElement.cpp:
694         (WebCore::HTMLMetaElement::process):
695         * page/FrameView.cpp:
696         (WebCore::FrameView::rendererForColorScheme const):
697         (WebCore::FrameView::useDarkAppearance const):
698         (WebCore::FrameView::styleColorOptions const):
699         (WebCore::FrameView::rendererForSupportedColorSchemes const): Deleted.
700         * page/FrameView.h:
701         * rendering/style/RenderStyle.cpp:
702         (WebCore::rareInheritedDataChangeRequiresRepaint):
703         * rendering/style/RenderStyle.h:
704         (WebCore::RenderStyle::colorScheme const):
705         (WebCore::RenderStyle::setHasExplicitlySetColorScheme):
706         (WebCore::RenderStyle::hasExplicitlySetColorScheme const):
707         (WebCore::RenderStyle::setColorScheme):
708         (WebCore::RenderStyle::initialColorScheme):
709         (WebCore::RenderStyle::NonInheritedFlags::operator== const):
710         (WebCore::RenderStyle::supportedColorSchemes const): Deleted.
711         (WebCore::RenderStyle::setHasExplicitlySetSupportedColorSchemes): Deleted.
712         (WebCore::RenderStyle::hasExplicitlySetSupportedColorSchemes const): Deleted.
713         (WebCore::RenderStyle::setSupportedColorSchemes): Deleted.
714         (WebCore::RenderStyle::initialSupportedColorSchemes): Deleted.
715         * rendering/style/RenderStyleConstants.h:
716         * rendering/style/StyleColorScheme.h: Renamed from Source/WebCore/rendering/style/StyleSupportedColorSchemes.h.
717         (WebCore::StyleColorScheme::StyleColorScheme):
718         (WebCore::StyleColorScheme::operator== const):
719         (WebCore::StyleColorScheme::operator!= const):
720         (WebCore::StyleColorScheme::isAuto const):
721         (WebCore::StyleColorScheme::isOnly const):
722         (WebCore::StyleColorScheme::colorScheme const):
723         (WebCore::StyleColorScheme::add):
724         (WebCore::StyleColorScheme::contains const):
725         (WebCore::StyleColorScheme::setAllowsTransformations):
726         (WebCore::StyleColorScheme::allowsTransformations const):
727         * rendering/style/StyleRareInheritedData.cpp:
728         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
729         (WebCore::StyleRareInheritedData::operator== const):
730         * rendering/style/StyleRareInheritedData.h:
731
732 2019-04-17  Justin Fan  <justin_fan@apple.com>
733
734         [Web GPU] GPUComputePassEncoder::dispatch number of thread groups, not grid size
735         https://bugs.webkit.org/show_bug.cgi?id=196984
736
737         Reviewed by Myles C. Maxfield.
738
739         Test: Updated compute-squares.html.
740
741         * platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm:
742         (WebCore::GPUComputePassEncoder::dispatch):
743
744 2019-04-17  Andy Estes  <aestes@apple.com>
745
746         [iOS] Support multiple file selection in UIDocumentPickerViewController
747         https://bugs.webkit.org/show_bug.cgi?id=197014
748         <rdar://problem/49963514>
749
750         Reviewed by Tim Horton.
751
752         * platform/LocalizedStrings.h:
753         Exported multipleFileUploadText().
754
755 2019-04-17  John Wilander  <wilander@apple.com>
756
757         Add prioritization of ad click conversions and cleaning of sent ad click conversions
758         https://bugs.webkit.org/show_bug.cgi?id=196934
759         <rdar://problem/49917773>
760
761         Reviewed by Chris Dumez.
762
763         Tests: http/tests/adClickAttribution/second-attribution-converted-with-higher-priority.html
764                http/tests/adClickAttribution/second-attribution-converted-with-lower-priority.html
765                http/tests/adClickAttribution/second-conversion-with-higher-priority.html
766                http/tests/adClickAttribution/second-conversion-with-lower-priority.html
767
768         * loader/AdClickAttribution.cpp:
769         (WebCore::AdClickAttribution::hasHigherPriorityThan const):
770             Added to facilitate priority comparison between two attributions.
771         * loader/AdClickAttribution.h:
772         (WebCore::AdClickAttribution::Destination::Destination):
773             Added a WTF::HashTableDeletedValueType constructor and changed the copy constructor to
774             a move constructor.
775         (WebCore::AdClickAttribution::isEmpty const):
776
777 2019-04-17  Devin Rousso  <drousso@apple.com>
778
779         AX: AccessibilityObject::parentObject() doesn't need to be pure virtual
780         https://bugs.webkit.org/show_bug.cgi?id=197026
781         <rdar://problem/49448209>
782
783         Reviewed by Timothy Hatcher.
784
785         * accessibility/AccessibilityObject.h:
786         (WebCore::AccessibilityObject::parentObject const):
787
788 2019-04-17  Zalan Bujtas  <zalan@apple.com>
789
790         [ContentChangeObserver] Use aria role as a hint whether a tap should result in a synthetic click
791         https://bugs.webkit.org/show_bug.cgi?id=196988
792         <rdar://problem/49955328>
793
794         Reviewed by Simon Fraser.
795
796         Test: fast/events/touch/ios/content-observation/tap-on-input-looking-div-with-role.html
797
798         * accessibility/AccessibilityObject.h:
799
800 2019-04-17  Alex Christensen  <achristensen@webkit.org>
801
802         WebSocketHandshake should not know about a Document
803         https://bugs.webkit.org/show_bug.cgi?id=196468
804
805         Reviewed by Tim Horton.
806
807         I'll need to move WebSocketHandshake to the NetworkProcess for rdar://problem/46287028
808         It currently uses the Document pointer for 3 things:
809         1. To get the user agent, which we can pass in as a creation parameter.
810         2. To get the origin, which we can also pass in as a creation parameter.
811         3. To get cookies for the web inspector.  We can pass in a functor instead and have the inspector provide cookies itself.
812
813         * Modules/websockets/WebSocketChannel.cpp:
814         (WebCore::WebSocketChannel::connect):
815         (WebCore::WebSocketChannel::disconnect):
816         (WebCore::WebSocketChannel::didOpenSocketStream):
817         (WebCore::WebSocketChannel::clientHandshakeRequest):
818         * Modules/websockets/WebSocketChannel.h:
819         (WebCore::WebSocketChannel::document):
820         * Modules/websockets/WebSocketHandshake.cpp:
821         (WebCore::WebSocketHandshake::WebSocketHandshake):
822         (WebCore::WebSocketHandshake::clientHandshakeMessage const):
823         (WebCore::WebSocketHandshake::clientHandshakeRequest const):
824         (WebCore::WebSocketHandshake::clientOrigin const): Deleted.
825         (WebCore::WebSocketHandshake::clientHandshakeCookieRequestHeaderFieldProxy const): Deleted.
826         (WebCore::WebSocketHandshake::clearDocument): Deleted.
827         * Modules/websockets/WebSocketHandshake.h:
828         * inspector/agents/InspectorNetworkAgent.cpp:
829         (WebCore::InspectorNetworkAgent::enable):
830
831 2019-04-17  Timothy Hatcher  <timothy@apple.com>
832
833         Unreviewed build fix for iOSMac after r244223.
834
835         * platform/audio/ios/AudioSessionIOS.mm:
836         (WebCore::AudioSession::routeSharingPolicy const): Add ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END
837         around AVAudioSessionRouteSharingPolicyLongForm use.
838
839 2019-04-17  Chris Dumez  <cdumez@apple.com>
840
841         Remember device orientation permission for the duration of the browsing session
842         https://bugs.webkit.org/show_bug.cgi?id=196992
843         <rdar://problem/49946067>
844
845         Reviewed by Alex Christensen.
846
847         Use DeviceOrientationOrMotionPermissionState type more consistently in the code base
848         instead of bool or Optional<bool>. Added "Prompt" value to this enumeration which is the
849         default state and which indicates we should ask the client.
850
851         * WebCore.xcodeproj/project.pbxproj:
852         * dom/DeviceOrientationAndMotionAccessController.cpp:
853         (WebCore::DeviceOrientationAndMotionAccessController::DeviceOrientationAndMotionAccessController):
854         (WebCore::DeviceOrientationAndMotionAccessController::shouldAllowAccess):
855         * dom/DeviceOrientationAndMotionAccessController.h:
856         (WebCore::DeviceOrientationAndMotionAccessController::accessState const):
857         * dom/DeviceOrientationOrMotionEvent.cpp:
858         (WebCore::DeviceOrientationOrMotionEvent::requestPermission):
859         * dom/DeviceOrientationOrMotionPermissionState.h:
860         * loader/DocumentLoader.h:
861         (WebCore::DocumentLoader::deviceOrientationAndMotionAccessState const):
862         (WebCore::DocumentLoader::setDeviceOrientationAndMotionAccessState):
863         * page/ChromeClient.h:
864         * page/DOMWindow.cpp:
865         (WebCore::DOMWindow::isAllowedToAddDeviceMotionOrientationListener const):
866
867 2019-04-17  Rob Buis  <rbuis@igalia.com>
868
869         XMLHttpRequest has the wrong fallback encoding
870         https://bugs.webkit.org/show_bug.cgi?id=191741
871
872         Reviewed by Alex Christensen.
873
874         Allow overriding the response charset as specified here:
875         https://xhr.spec.whatwg.org/#final-charset
876
877         Behavior matches Firefox and Chrome.
878
879         Tests: imported/w3c/web-platform-tests/encoding/replacement-encodings.any.html
880                imported/w3c/web-platform-tests/encoding/replacement-encodings.any.worker.html
881                imported/w3c/web-platform-tests/encoding/unsupported-encodings.any.html
882                imported/w3c/web-platform-tests/encoding/unsupported-encodings.any.worker.html
883
884         * xml/XMLHttpRequest.cpp:
885         (WebCore::XMLHttpRequest::finalResponseCharset const):
886         (WebCore::XMLHttpRequest::createDecoder const):
887         * xml/XMLHttpRequest.h:
888
889 2019-04-16  Antoine Quint  <graouts@apple.com>
890
891         Opt Google Maps into simulated mouse events dispatch quirk
892         https://bugs.webkit.org/show_bug.cgi?id=196965
893         <rdar://problem/49934766>
894
895         Reviewed by Dean Jackson.
896
897         Use the correct Google Maps path.
898
899         * page/Quirks.cpp:
900         (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
901
902 2019-04-16  Antoine Quint  <graouts@apple.com>
903
904         Opt flipkart.com into simulated mouse events dispatch quirk
905         https://bugs.webkit.org/show_bug.cgi?id=196961
906         <rdar://problem/49648520>
907
908         Reviewed by Dean Jackson.
909
910         * page/Quirks.cpp:
911         (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
912
913 2019-04-16  Antoine Quint  <graouts@apple.com>
914
915         Opt MSN.com into simulated mouse events dispatch quirk
916         https://bugs.webkit.org/show_bug.cgi?id=196960
917         <rdar://problem/49403260>
918
919         Reviewed by Dean Jackson.
920
921         * page/Quirks.cpp:
922         (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
923
924 2019-04-16  Zan Dobersek  <zdobersek@igalia.com>
925
926         ScalableImageDecoder: don't forcefully decode image data when querying frame completeness, duration
927         https://bugs.webkit.org/show_bug.cgi?id=191354
928         <rdar://problem/46123406>
929
930         Reviewed by Michael Catanzaro.
931
932         ScalableImageDecoder::frameIsCompleteAtIndex() should only check the
933         index validity and, if the index is valid, check for completeness of the
934         corresponding frame. ScalableImageDecoder::frameDurationAtIndex() should
935         also only retrieve duration for already-complete frames, or expand the
936         default 0-second value according to the flashing-protection rule when
937         the target frame is not yet complete.
938
939         Both methods avoid calling ScalableImageDecoder::frameBufferAtIndex()
940         as that method goes on and decodes image data to determine specific
941         information. The ImageSource class that's querying this information
942         doesn't anticipate this, and doesn't handle the increased memory
943         consumption of the decoded data, leaving MemoryCache in the blind about
944         the image resource's actual amount of consumed memory. ImageSource can
945         instead gracefully handle any incomplete frame by marking the decoding
946         status for this frame as only partial.
947
948         * platform/image-decoders/ScalableImageDecoder.cpp:
949         (WebCore::ScalableImageDecoder::frameIsCompleteAtIndex const):
950         (WebCore::ScalableImageDecoder::frameHasAlphaAtIndex const):
951         (WebCore::ScalableImageDecoder::frameDurationAtIndex const):
952
953 2019-04-16  Ross Kirsling  <ross.kirsling@sony.com>
954
955         Unreviewed non-unified build fix after r244307.
956
957         * page/DiagnosticLoggingClient.h:
958
959 2019-04-16  Chris Dumez  <cdumez@apple.com>
960
961         URL set by document.open() is not communicated to the UIProcess
962         https://bugs.webkit.org/show_bug.cgi?id=196941
963         <rdar://problem/49237544>
964
965         Reviewed by Geoff Garen.
966
967         Notify the FrameLoaderClient whenever an explicit open was done and provide it with
968         the latest document URL.
969
970         * loader/FrameLoader.cpp:
971         (WebCore::FrameLoader::didExplicitOpen):
972         * loader/FrameLoaderClient.h:
973
974 2019-04-16  Timothy Hatcher  <timothy@apple.com>
975
976         FrameView base background color always starts white.
977         https://bugs.webkit.org/show_bug.cgi?id=196976
978
979         Reviewed by Beth Dakin.
980
981         * page/FrameView.cpp:
982         (WebCore::FrameView::setBaseBackgroundColor): Bail early if the base background
983         color did not change.
984
985 2019-04-16  Devin Rousso  <drousso@apple.com>
986
987         Unprefix -webkit-sticky
988         https://bugs.webkit.org/show_bug.cgi?id=196962
989         <rdar://problem/40903458>
990
991         Reviewed by Simon Fraser.
992
993         Updated existing tests.
994
995         This change doesn't modify functionality, only exposing a new unprefixed CSS value.
996
997         * css/CSSProperties.json:
998         * css/CSSValueKeywords.in:
999
1000         * css/CSSPrimitiveValueMappings.h:
1001         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1002         (WebCore::CSSPrimitiveValue::operator PositionType const):
1003
1004         * css/parser/CSSParserFastPaths.cpp:
1005         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
1006
1007         * editing/EditingStyle.cpp:
1008         (WebCore::EditingStyle::convertPositionStyle):
1009
1010 2019-04-16  Commit Queue  <commit-queue@webkit.org>
1011
1012         Unreviewed, rolling out r244321.
1013         https://bugs.webkit.org/show_bug.cgi?id=196968
1014
1015         Causing all WK2 Debug builds to exit early after Assertion
1016         failures. (Requested by ShawnRoberts on #webkit).
1017
1018         Reverted changeset:
1019
1020         "URL set by document.open() is not communicated to the
1021         UIProcess"
1022         https://bugs.webkit.org/show_bug.cgi?id=196941
1023         https://trac.webkit.org/changeset/244321
1024
1025 2019-04-16  Caitlin Potter  <caitp@igalia.com>
1026
1027         [JSC] Filter DontEnum properties in ProxyObject::getOwnPropertyNames()
1028         https://bugs.webkit.org/show_bug.cgi?id=176810
1029
1030         Reviewed by Saam Barati.
1031
1032         Previously, there was a comment here indicating uncertainty of whether it
1033         was necessary to filter DontEnum properties explicitly or not. It turns
1034         out that it was necessary in the case of JSC ProxyObjects.
1035
1036         This patch adds DontEnum filtering for ProxyObjects, however we continue
1037         to explicitly filter them in JSDOMConvertRecord, which needs to use the
1038         property descriptor after filtering. This change prevents observably
1039         fetching the property descriptor twice per property.
1040
1041         * bindings/js/JSDOMConvertRecord.h:
1042
1043 2019-04-15  Antoine Quint  <graouts@apple.com>
1044
1045         [iOS] Redundant pointer events causes material design buttons to flush twice
1046         https://bugs.webkit.org/show_bug.cgi?id=196914
1047         <rdar://problem/49571860>
1048
1049         Reviewed by Dean Jackson.
1050
1051         Test: pointerevents/ios/pointer-event-order.html
1052
1053         Do not dispatch pointer events for mouse events on iOS since we're already dispatching them when processing touch events.
1054
1055         * dom/Element.cpp:
1056         (WebCore::Element::dispatchMouseEvent):
1057
1058 2019-04-15  John Wilander  <wilander@apple.com>
1059
1060         Add a query string nonce to LayoutTests/http/tests/adClickAttribution/send-attribution-conversion-request.html to address flakiness
1061         https://bugs.webkit.org/show_bug.cgi?id=196955
1062
1063         Unreviewed test gardening. The WebCore change is only in a dedicated
1064         test function.
1065
1066         No new tests. Existing test updated.
1067
1068         * loader/AdClickAttribution.cpp:
1069         (WebCore::AdClickAttribution::urlForTesting const):
1070             Now preserves the query string in the test URL.
1071
1072 2019-04-15  Chris Dumez  <cdumez@apple.com>
1073
1074         URL set by document.open() is not communicated to the UIProcess
1075         https://bugs.webkit.org/show_bug.cgi?id=196941
1076         <rdar://problem/49237544>
1077
1078         Reviewed by Geoffrey Garen.
1079
1080         Notify the FrameLoaderClient whenever an explicit open was done and provide it with
1081         the latest document URL.
1082
1083         * loader/FrameLoader.cpp:
1084         (WebCore::FrameLoader::didExplicitOpen):
1085         * loader/FrameLoaderClient.h:
1086
1087 2019-04-15  Eike Rathke  <erack@redhat.com>
1088
1089         Fix logic flow for error log
1090         https://bugs.webkit.org/show_bug.cgi?id=196933
1091
1092         Reviewed by Alexey Proskuryakov.
1093
1094         Missing block braces logged an error always, not just
1095         if (actionIfInvalid == Complain).
1096
1097         * html/HTMLMediaElement.cpp:
1098         (WebCore::HTMLMediaElement::isSafeToLoadURL):
1099
1100 2019-04-15  Myles C. Maxfield  <mmaxfield@apple.com>
1101
1102         [Cocoa] FontPlatformData objects aren't cached at all when using font-family:system-ui
1103         https://bugs.webkit.org/show_bug.cgi?id=196846
1104         <rdar://problem/49499971>
1105
1106         Reviewed by Simon Fraser and Darin Adler.
1107
1108         When adding the special codepath for system-ui to behave as an entire list of fonts rather than a single item,
1109         I never added a cache for the FontPlatformData objects that codepath creates. The non-system-ui codepath already
1110         has a cache in fontPlatformDataCache() in FontCache.cpp.
1111
1112         This patch causes a 16.8x performance improvement on the attached benchmark.
1113
1114         Test: PerformanceTests/Layout/system-ui-rebuild-emoji.html
1115
1116         * page/cocoa/MemoryReleaseCocoa.mm:
1117         (WebCore::platformReleaseMemory):
1118         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1119         (WebCore::invalidateFontCache):
1120         * platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:
1121         (WebCore::FontFamilySpecificationKey::FontFamilySpecificationKey):
1122         (WebCore::FontFamilySpecificationKey::operator== const):
1123         (WebCore::FontFamilySpecificationKey::operator!= const):
1124         (WebCore::FontFamilySpecificationKey::isHashTableDeletedValue const):
1125         (WebCore::FontFamilySpecificationKey::computeHash const):
1126         (WebCore::FontFamilySpecificationKeyHash::hash):
1127         (WebCore::FontFamilySpecificationKeyHash::equal):
1128         (WebCore::fontMap):
1129         (WebCore::clearFontFamilySpecificationCoreTextCache):
1130         (WebCore::FontFamilySpecificationCoreText::fontRanges const):
1131         * platform/graphics/cocoa/FontFamilySpecificationCoreText.h:
1132         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
1133         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
1134         (WebCore::safeCFEqual): Deleted.
1135
1136 2019-04-15  Devin Rousso  <drousso@apple.com>
1137
1138         Web Inspector: fake value descriptors for promises add a catch handler, preventing "rejectionhandled" events from being fired
1139         https://bugs.webkit.org/show_bug.cgi?id=196484
1140         <rdar://problem/49114725>
1141
1142         Reviewed by Joseph Pecoraro.
1143
1144         Test: inspector/runtime/promise-native-getter.html
1145
1146         Mark errors created from getters as being `isNativeGetterTypeError`.
1147
1148         * bindings/js/JSDOMExceptionHandling.cpp:
1149         (WebCore::throwGetterTypeError):
1150         (WebCore::rejectPromiseWithGetterTypeError):
1151         (WebCore::rejectPromiseWithThisTypeError):
1152
1153         * bindings/js/JSDOMGlobalObject.cpp:
1154         (WebCore::makeGetterTypeErrorForBuiltins):
1155
1156         * bindings/js/JSDOMPromiseDeferred.h:
1157         * bindings/js/JSDOMPromiseDeferred.cpp:
1158         (WebCore::createRejectedPromiseWithTypeError):
1159
1160         * Modules/streams/WritableStream.js:
1161         (getter.closed):
1162         (getter.ready):
1163
1164 2019-04-15  Jer Noble  <jer.noble@apple.com>
1165
1166         Add a DiagnosticLogging method taking an arbitrary dictionary of values.
1167         https://bugs.webkit.org/show_bug.cgi?id=196773
1168
1169         Reviewed by Alex Christensen.
1170
1171         * page/DiagnosticLoggingClient.h:
1172
1173 2019-04-15  Justin Fan  <justin_fan@apple.com>
1174
1175         Let WTF::convertSafely deduce types from arguments.
1176
1177         Reviewer's (Darin Adler) follow-up to https://bugs.webkit.org/show_bug.cgi?id=196793.
1178
1179         * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
1180         (WebCore::GPUBuffer::tryCreate):
1181         * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
1182         (WebCore::GPUCommandBuffer::copyBufferToTexture):
1183         (WebCore::GPUCommandBuffer::copyTextureToBuffer):
1184         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
1185         (WebCore::trySetInputStateForPipelineDescriptor):
1186
1187 2019-04-12  Ryosuke Niwa  <rniwa@webkit.org>
1188
1189         Throw TypeError when custom element constructor returns a wrong element or tries to create itself
1190         https://bugs.webkit.org/show_bug.cgi?id=196892
1191
1192         Reviewed by Dean Jackson.
1193
1194         Throw TypeError instead of InvalidStateError for consistency. This updates WebKit's custom elements
1195         implementation for https://github.com/whatwg/html/pull/4525.
1196
1197         Tests: imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode.html
1198                imported/w3c/web-platform-tests/custom-elements/upgrading/upgrading-parser-created-element.html
1199
1200         * bindings/js/JSCustomElementInterface.cpp:
1201         (WebCore::JSCustomElementInterface::upgradeElement):
1202         * bindings/js/JSHTMLElementCustom.cpp:
1203         (WebCore::constructJSHTMLElement):
1204
1205 2019-04-15  Don Olmstead  <don.olmstead@sony.com>
1206
1207         [CMake] WebCore derived sources should only be referenced inside WebCore
1208         https://bugs.webkit.org/show_bug.cgi?id=196904
1209
1210         Reviewed by Konstantin Tokarev.
1211
1212         Use WebCore_DERIVED_SOURCES_DIR instead of DERIVED_SOURCES_WEBCORE_DIR.
1213
1214         * CMakeLists.txt:
1215         * PlatformGTK.cmake:
1216         * PlatformWin.cmake:
1217         * WebCoreMacros.cmake:
1218
1219 2019-04-15  John Wilander  <wilander@apple.com>
1220
1221         Send delayed Ad Click Attribution conversion requests to the click source
1222         https://bugs.webkit.org/show_bug.cgi?id=196838
1223         <rdar://problem/47650157>
1224
1225         Reviewed by Chris Dumez and Youenn Fablet.
1226
1227         WebCore::AdClickAttribution now:
1228         - Sets m_earliestTimeToSend correctly based on WallTime::now().
1229         - Allows for a test override of the base URL for conversions.
1230         - Holds state for whether or not a conversion request has been sent.
1231         - Outputs m_earliestTimeToSend and m_conversion->hasBeenSent in toString().
1232         - Returns m_earliestTimeToSend as a result of a call to
1233         convertAndGetEarliestTimeToSend() which used to be called setConversion().
1234
1235         Test: http/tests/adClickAttribution/send-attribution-conversion-request.html
1236
1237         * loader/AdClickAttribution.cpp:
1238         (WebCore::AdClickAttribution::convertAndGetEarliestTimeToSend):
1239         (WebCore::AdClickAttribution::url const):
1240         (WebCore::AdClickAttribution::urlForTesting const):
1241         (WebCore::AdClickAttribution::markConversionAsSent):
1242         (WebCore::AdClickAttribution::wasConversionSent const):
1243         (WebCore::AdClickAttribution::toString const):
1244         (WebCore::AdClickAttribution::setConversion): Deleted.
1245             Renamed convertAndGetEarliestTimeToSend().
1246         * loader/AdClickAttribution.h:
1247         (WebCore::AdClickAttribution::Conversion::Conversion):
1248         (WebCore::AdClickAttribution::Conversion::encode const):
1249         (WebCore::AdClickAttribution::Conversion::decode):
1250         * platform/Timer.h:
1251             Now exports nextFireInterval.
1252
1253 2019-04-15  Chris Dumez  <cdumez@apple.com>
1254
1255         Regression(r237903) Speedometer 2 is 1-2% regressed on iOS
1256         https://bugs.webkit.org/show_bug.cgi?id=196841
1257         <rdar://problem/45957016>
1258
1259         Reviewed by Myles C. Maxfield.
1260
1261         Speedometer 2 content does not use the text-underline-offset and text-decoration-thickness
1262         features that were added in r237903 so I looked for behavior changes in the context of
1263         Speedometer from r237903. I found that RenderStyle::changeAffectsVisualOverflow() started
1264         returning true a lot more often after r237903. The reason is that r237903 dropped the
1265         visualOverflowForDecorations() checks in this method and started returning true a lot
1266         more as a result.
1267
1268         To restore previous behavior, this patch adds back the visualOverflowForDecorations() checks
1269         that were dropped in r237903. I have verified that with this patch,
1270         RenderStyle::changeAffectsVisualOverflow() returns true as many times as it used to before
1271         r237903.
1272
1273         * rendering/style/RenderStyle.cpp:
1274         (WebCore::RenderStyle::changeAffectsVisualOverflow const):
1275
1276 2019-04-15  Said Abou-Hallawa  <said@apple.com>
1277
1278         ASSERT fires when removing a disallowed clone from the shadow tree without reseting its corresponding element
1279         https://bugs.webkit.org/show_bug.cgi?id=196895
1280
1281         Reviewed by Darin Adler.
1282
1283         When cloning elements to the shadow tree of an SVGUseElement, the
1284         corresponding element links are set from the clones to the originals.
1285         Later some of the elements may be disallowed to exist in the shadow tree.
1286         For example the SVGPatternElement is disallowed and has to be removed 
1287         even after cloning. The problem is the corresponding elements are not
1288         reset to null. Usually this is not a problem because the removed elements
1289         will be deleted and the destructor of SVGElement will reset the corresponding
1290         element links. However in some cases, the cloned element is referenced
1291         from another SVGElement, for example the target of a SVGTRefElement. In
1292         this case the clone won't be deleted but it will be linked to the original
1293         and the event listeners won't be copied from the original. When the
1294         original is deleted, its event listeners have to be removed. The event
1295         listeners of the clones also ave to be removed. But because the event
1296         listeners of the original were not copied when cloning, the assertion in
1297         SVGElement::removeEventListener() fires.
1298
1299         Test: svg/custom/use-disallowed-element-clear-corresponding-element.html
1300
1301         * svg/SVGUseElement.cpp:
1302         (WebCore::disassociateAndRemoveClones):
1303
1304 2019-04-15  Devin Rousso  <drousso@apple.com>
1305
1306         Web Inspector: DOMDebugger: "Attribute Modified" breakpoints pause after the modification occurs for the style attribute
1307         https://bugs.webkit.org/show_bug.cgi?id=196556
1308         <rdar://problem/49570681>
1309
1310         Reviewed by Timothy Hatcher.
1311
1312         Test: inspector/dom-debugger/attribute-modified-style.html
1313
1314         * css/PropertySetCSSStyleDeclaration.h:
1315         * css/PropertySetCSSStyleDeclaration.cpp:
1316         (WebCore::StyleAttributeMutationScope::~StyleAttributeMutationScope):
1317         (WebCore::InlineCSSStyleDeclaration::willMutate): Added.
1318
1319         * dom/StyledElement.cpp:
1320         (WebCore::StyledElement::styleAttributeChanged):
1321         (WebCore::StyledElement::inlineStyleChanged):
1322
1323         * inspector/InspectorInstrumentation.h:
1324         (WebCore::InspectorInstrumentation::willInvalidateStyleAttr): Added.
1325         (WebCore::InspectorInstrumentation::didInvalidateStyleAttr):
1326         * inspector/InspectorInstrumentation.cpp:
1327         (WebCore::InspectorInstrumentation::willInvalidateStyleAttrImpl): Added.
1328         (WebCore::InspectorInstrumentation::didInvalidateStyleAttrImpl):
1329
1330         * inspector/agents/InspectorDOMAgent.h:
1331         * inspector/agents/InspectorDOMAgent.cpp:
1332         (WebCore::InspectorDOMAgent::didInvalidateStyleAttr):
1333
1334         * inspector/agents/InspectorDOMDebuggerAgent.h:
1335         * inspector/agents/InspectorDOMDebuggerAgent.cpp:
1336         (WebCore::InspectorDOMDebuggerAgent::willInvalidateStyleAttr): Added.
1337         (WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr): Deleted.
1338
1339 2019-04-15  Devin Rousso  <drousso@apple.com>
1340
1341         Web Inspector: Elements: event listener change events should only be fired for the selected node and it's ancestors
1342         https://bugs.webkit.org/show_bug.cgi?id=196887
1343         <rdar://problem/49870627>
1344
1345         Reviewed by Timothy Hatcher.
1346
1347         Test: inspector/dom/event-listener-add-remove.html
1348               inspector/dom/event-listener-inspected-node.html
1349
1350         * inspector/agents/InspectorDOMAgent.h:
1351         * inspector/agents/InspectorDOMAgent.cpp:
1352         (WebCore::InspectorDOMAgent::getEventListenersForNode):
1353         (WebCore::InspectorDOMAgent::setInspectedNode):
1354         (WebCore::InspectorDOMAgent::didAddEventListener):
1355         (WebCore::InspectorDOMAgent::willRemoveEventListener):
1356
1357 2019-04-15  Antoine Quint  <graouts@apple.com>
1358
1359         Ensure iOS layout traits are used for media controls in modern compatibility mode
1360         https://bugs.webkit.org/show_bug.cgi?id=196812
1361         <rdar://problem/47460637>
1362
1363         Unreviewed. Speculative fix for test regressions on open-source bots.
1364
1365         * Modules/modern-media-controls/media/media-controller.js:
1366         (MediaController.prototype.get layoutTraits):
1367
1368 2019-04-11  Antoine Quint  <graouts@apple.com>
1369
1370         Ensure iOS layout traits are used for media controls in modern compatibility mode
1371         https://bugs.webkit.org/show_bug.cgi?id=196812
1372         <rdar://problem/47460637>
1373
1374         Reviewed by Dean Jackson.
1375
1376         Test: media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode.html
1377
1378         Instead of looking at the UA string, check whether we support touches which is the correct indicator of whether we should
1379         be using the iOS layout traits for media controls.
1380
1381         * Modules/modern-media-controls/media/media-controller.js:
1382         (MediaController.prototype.get layoutTraits):
1383
1384 2019-04-14  Rob Buis  <rbuis@igalia.com>
1385
1386         Link prefetch not useful for top-level navigation
1387         https://bugs.webkit.org/show_bug.cgi?id=195623
1388
1389         Reviewed by Youenn Fablet.
1390
1391         Cache cross-domain top-level prefetches in a dedicated cache and not in the
1392         memory cache. Ignore prefetches for content extension checks.
1393
1394         Tests: http/tests/cache/link-prefetch-main-resource-iframe.html
1395                http/tests/cache/link-prefetch-main-resource.html
1396
1397         * loader/LinkLoader.cpp:
1398         (WebCore::LinkLoader::prefetchIfNeeded):
1399         * loader/ResourceLoadInfo.cpp:
1400         (WebCore::toResourceType):
1401         * loader/ResourceLoadInfo.h:
1402         * loader/ResourceLoader.cpp:
1403         (WebCore::ResourceLoader::willSendRequestInternal):
1404         * loader/cache/CachedResourceLoader.cpp:
1405         (WebCore::CachedResourceLoader::requestResource):
1406
1407 2019-04-14  Dean Jackson  <dino@apple.com>
1408
1409         Extract UTI mapping and allow for additions
1410         https://bugs.webkit.org/show_bug.cgi?id=196822
1411         <rdar://problem/49822339>
1412
1413         Reviewed by Darin Adler
1414
1415         Post landing feedback on minimizing String constructors.
1416
1417         * platform/network/mac/UTIUtilities.mm:
1418         (WebCore::MIMETypeFromUTITree):
1419         (WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
1420
1421 2019-04-14  Don Olmstead  <don.olmstead@sony.com>
1422
1423         [CMake] JavaScriptCore derived sources should only be referenced inside JavaScriptCore
1424         https://bugs.webkit.org/show_bug.cgi?id=196742
1425
1426         Reviewed by Konstantin Tokarev.
1427
1428         Don't set JavaScriptCore_SCRIPTS_DIR now that it is set within WebKitFS.
1429
1430         * CMakeLists.txt:
1431
1432 2019-04-12  Antoine Quint  <graouts@apple.com>
1433
1434         Provide a quirk to disable Pointer Events
1435         https://bugs.webkit.org/show_bug.cgi?id=196877
1436         <rdar://problem/49863470>
1437
1438         Reviewed by Dean Jackson.
1439
1440         Add a quirk to disable Pointer Events. We also opt a website that has compatibility issues with Pointer Events into this new quirk.
1441
1442         * dom/PointerEvent.idl:
1443         * page/Quirks.cpp:
1444         (WebCore::Quirks::shouldDisablePointerEventsQuirk const):
1445         * page/Quirks.h:
1446         * page/scrolling/ScrollingCoordinator.cpp:
1447         (WebCore::ScrollingCoordinator::absoluteEventTrackingRegionsForFrame const):
1448         * style/StyleTreeResolver.cpp:
1449         (WebCore::Style::TreeResolver::resolveElement):
1450
1451 2019-04-12  Wenson Hsieh  <wenson_hsieh@apple.com>
1452
1453         Enable modern compatibility mode by default in WKWebView on some devices
1454         https://bugs.webkit.org/show_bug.cgi?id=196883
1455         <rdar://problem/49864527>
1456
1457         Reviewed by Tim Horton.
1458
1459         Add a new helper function to determine whether an app is pre-installed on iOS, for the purposes of ensuring
1460         compatibility with existing Apple apps that are not affected by linked-on-or-after. This involves all apps with
1461         a bundle ID that begins with "com.apple.".
1462
1463         * platform/RuntimeApplicationChecks.h:
1464         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
1465         (WebCore::setApplicationBundleIdentifier):
1466         (WebCore::applicationBundleStartsWith):
1467         (WebCore::IOSApplication::isAppleApplication):
1468
1469 2019-04-12  Justin Fan  <justin_fan@apple.com>
1470
1471         [Web GPU] Prevent narrowing conversions during Metal function calls on 32-bit platforms
1472         https://bugs.webkit.org/show_bug.cgi?id=196793
1473
1474         Reviewed by Darin Adler.
1475
1476         On 32-bit platforms, NSUInteger is 32-bit, which limits certain Web GPU parameters. 
1477         Ensure that valid parameters are properly converted to NSUInteger for Metal calls, regardless of platform.
1478
1479         * platform/graphics/gpu/GPUBuffer.h:
1480         (WebCore::GPUBuffer::byteLength const):
1481         * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
1482         (WebCore::tryGetResourceAsBufferBinding):
1483         (WebCore::setBufferOnEncoder):
1484         * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
1485         (WebCore::GPUBuffer::validateBufferUsage):
1486         (WebCore::GPUBuffer::tryCreate):
1487         (WebCore::GPUBuffer::GPUBuffer):
1488         (WebCore::GPUBuffer::setSubData):
1489         * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
1490         (WebCore::GPUCommandBuffer::copyBufferToBuffer):
1491         (WebCore::GPUCommandBuffer::copyBufferToTexture):
1492         (WebCore::GPUCommandBuffer::copyTextureToBuffer):
1493         * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
1494         (WebCore::GPURenderPassEncoder::drawIndexed):
1495         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
1496         (WebCore::trySetInputStateForPipelineDescriptor):
1497
1498 2019-04-12  Ross Kirsling  <ross.kirsling@sony.com>
1499
1500         Unreviewed fix for non-unified build.
1501
1502         * dom/ScriptedAnimationController.h:
1503         Add missing include from r244182.
1504
1505 2019-04-11  Ryosuke Niwa  <rniwa@webkit.org>
1506
1507         WebThread should run at a higher priority than user initiated
1508         https://bugs.webkit.org/show_bug.cgi?id=196849
1509         <rdar://problem/46851062>
1510
1511         Reviewed by Geoffrey Garen.
1512
1513         Use QOS_CLASS_USER_INTERACTIVE on WebThread with -10 relative priority so that WebThread
1514         won't wait for other threads with priority 30-37 but does not content with the main thread.
1515
1516         Also removed the call to pthread_attr_setschedparam which disables QoS.
1517
1518         This improves the blocked time in StartWebThread from 2~3ms to 250μs while cold launching
1519         iBooks to an opened book.
1520
1521         * platform/ios/wak/WebCoreThread.mm:
1522         (StartWebThread): Replaced 200 * 4096 by 800 * KB for a better readability.
1523
1524 2019-04-12  Ryosuke Niwa  <rniwa@webkit.org>
1525
1526         Add CSS Shadow Parts as a feature under consideration
1527         https://bugs.webkit.org/show_bug.cgi?id=196835
1528
1529         Reviewed by Antti Koivisto.
1530
1531         This feature is under consideration.
1532
1533         * features.json:
1534
1535 2019-04-12  Ross Kirsling  <ross.kirsling@sony.com>
1536
1537         WebKit should build successfully even with -DENABLE_UNIFIED_BUILDS=OFF
1538         https://bugs.webkit.org/show_bug.cgi?id=196845
1539
1540         Reviewed by Ryosuke Niwa.
1541
1542         * html/canvas/CanvasRenderingContext2DBase.cpp:
1543         (WebCore::CanvasRenderingContext2DBase::FontProxy::initialize):
1544         (WebCore::CanvasRenderingContext2DBase::FontProxy::fontMetrics const):
1545         (WebCore::CanvasRenderingContext2DBase::FontProxy::fontDescription const):
1546         (WebCore::CanvasRenderingContext2DBase::FontProxy::width const):
1547         (WebCore::CanvasRenderingContext2DBase::FontProxy::drawBidiText const):
1548         (WebCore::CanvasRenderingContext2DBase::beginCompositeLayer):
1549         (WebCore::CanvasRenderingContext2DBase::endCompositeLayer):
1550         Remove inline specifier to address linking errors (regardless of CMake platform).
1551         Doing this in a .cpp file interferes with symbol creation.
1552
1553         * Modules/mediastream/MediaStreamTrack.cpp:
1554         * Modules/webvr/VREyeParameters.cpp:
1555         * Modules/webvr/VRFrameData.cpp:
1556         * Modules/webvr/VRPose.cpp:
1557         * accessibility/AccessibilityList.cpp:
1558         * accessibility/isolatedtree/AXIsolatedTree.cpp:
1559         * accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
1560         * bindings/js/JSDOMConvertWebGL.cpp:
1561         * bindings/js/JSHistoryCustom.cpp:
1562         * bindings/js/JSIDBCursorWithValueCustom.cpp:
1563         * bindings/js/JSPerformanceObserverCustom.cpp:
1564         * bindings/js/WindowProxy.cpp:
1565         * platform/ColorData.gperf:
1566         * platform/mediastream/RealtimeMediaSourceSettings.cpp:
1567         * platform/network/DNSResolveQueue.cpp:
1568         * workers/service/ServiceWorkerClientQueryOptions.h:
1569         * workers/service/ServiceWorkerContainer.cpp:
1570         Add missing includes to address compiler errors on GTK.
1571
1572 2019-04-12  Zalan Bujtas  <zalan@apple.com>
1573
1574         REGRESSION (r244098): [ Mac WK1 ] Layout Test fast/dynamic/paused-event-dispatch.html is Timing out
1575         https://bugs.webkit.org/show_bug.cgi?id=196789
1576         <rdar://problem/49855255>
1577
1578         Reviewed by Tim Horton.
1579
1580         Disable auto-sizing mode at the start of each test.
1581
1582         * testing/Internals.cpp:
1583         (WebCore::Internals::resetToConsistentState):
1584
1585 2019-04-12  Eric Carlson  <eric.carlson@apple.com>
1586
1587         Update AudioSession route sharing policy
1588         https://bugs.webkit.org/show_bug.cgi?id=196776
1589         <rdar://problem/46501611>
1590
1591         Reviewed by Jer Noble.
1592
1593         No new tests, updated an API test.
1594
1595         * platform/audio/AudioSession.cpp:
1596         (WebCore::convertEnumerationToString):
1597         * platform/audio/AudioSession.h:
1598         (WTF::LogArgument<WebCore::RouteSharingPolicy>::toString):
1599         (WTF::LogArgument<WebCore::AudioSession::CategoryType>::toString):
1600         * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
1601         (MediaSessionManagerCocoa::updateSessionState):
1602         * platform/audio/ios/AudioSessionIOS.mm:
1603         (WebCore::AudioSession::setCategory):
1604         (WebCore::AudioSession::routeSharingPolicy const):
1605         * platform/audio/mac/AudioSessionMac.cpp:
1606         (WebCore::AudioSession::setCategory):
1607
1608 2019-04-12  Antoine Quint  <graouts@apple.com>
1609
1610         Opt some websites into the simulated mouse events dispatch quirk when in modern compatibility mode
1611         https://bugs.webkit.org/show_bug.cgi?id=196830
1612         <rdar://problem/49124313>
1613
1614         Reviewed by Wenson Hsieh.
1615
1616         We add a new policy to determine whether simulated mouse events dispatch are allowed and use it to determine whether the
1617         simulated mouse events dispatch quirk can be used for a given website. We then check the domain name for the current page's
1618         document to see if it matches some known websites that require this quirk.
1619
1620         We needed to add some calls into Quirks::shouldDispatchSimulateMouseEvents() where we used to only consult the RuntimeEnabledFeature
1621         flag to ensure we correctly created touch regions for simulated mouse events.
1622
1623         * dom/EventNames.h:
1624         (WebCore::EventNames::isTouchRelatedEventType const):
1625         * dom/Node.cpp:
1626         (WebCore::Node::moveNodeToNewDocument):
1627         (WebCore::tryAddEventListener):
1628         (WebCore::tryRemoveEventListener):
1629         (WebCore::Node::defaultEventHandler):
1630         * loader/DocumentLoader.h:
1631         (WebCore::DocumentLoader::simulatedMouseEventsDispatchPolicy const):
1632         (WebCore::DocumentLoader::setSimulatedMouseEventsDispatchPolicy):
1633         * page/DOMWindow.cpp:
1634         (WebCore::DOMWindow::addEventListener):
1635         (WebCore::DOMWindow::removeEventListener):
1636         * page/Quirks.cpp:
1637         (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
1638         (WebCore::Quirks::shouldDispatchSimulateMouseEvents const): Deleted.
1639         * page/Quirks.h:
1640
1641 2019-04-11  Simon Fraser  <simon.fraser@apple.com>
1642
1643         [iOS WK2] Wrong scrolling behavior for nested absolute position elements inside overflow scroll
1644         https://bugs.webkit.org/show_bug.cgi?id=196146
1645
1646         Reviewed by Antti Koivisto.
1647         
1648         computeCoordinatedPositioningForLayer() failed to handle nested positions elements
1649         inside overflow scroll, because it only walked up to the first containing block of
1650         a nested position:absolute. We need to walk all the way up the ancestor layer chain,
1651         looking at containing block, scroller and composited ancestor relationships.
1652
1653         Make this code easier to understand by writing it in terms of "is foo scrolled by bar", rather than
1654         trying to collapse all the logic into a single ancestor walk, which was really hard. This is a few
1655         more ancestor traversals, but we now only run this code if there's composited scrolling
1656         in the ancestor chain.
1657
1658         Tests: scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow.html
1659                scrollingcoordinator/scrolling-tree/nested-absolute-in-overflow.html
1660                scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow.html
1661                scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow.html
1662
1663         * rendering/RenderLayerCompositor.cpp:
1664         (WebCore::enclosingCompositedScrollingLayer):
1665         (WebCore::isScrolledByOverflowScrollLayer):
1666         (WebCore::isNonScrolledLayerInsideScrolledCompositedAncestor):
1667         (WebCore::RenderLayerCompositor::layerContainingBlockCrossesCoordinatedScrollingBoundary):
1668         (WebCore::collectStationaryLayerRelatedOverflowNodes):
1669         (WebCore::RenderLayerCompositor::computeCoordinatedPositioningForLayer const):
1670         (WebCore::collectRelatedCoordinatedScrollingNodes):
1671         (WebCore::layerParentedAcrossCoordinatedScrollingBoundary): Deleted.
1672
1673 2019-04-12  Manuel Rego Casasnovas  <rego@igalia.com>
1674
1675         [css-flex][css-grid] Fix synthesized baseline
1676         https://bugs.webkit.org/show_bug.cgi?id=196312
1677
1678         Reviewed by Javier Fernandez.
1679
1680         When a flex or grid container has no baseline,
1681         its baseline should be synthesized from the border edges.
1682         The same happens for flex and grid items.
1683         
1684         Right now we were using the content box in some cases
1685         and even using the margin box in a particular scenario.
1686         The patch fixes this.
1687         
1688         At the same time this is also fixing the baseline for
1689         inline flex/grid containers to make it interoperable with Firefox.
1690         Inline blocks have a special behavior per legacy reasons,
1691         which applies to inline flex/grid containers when they have no items;
1692         otherwise the items should be used to compute its baseline.
1693         See more at: https://github.com/w3c/csswg-drafts/issues/3416
1694
1695         Note that we need to keep current behavior for buttons,
1696         as the flexbox spec doesn't apply to them.
1697
1698         Tests: css3/flexbox/flexbox-baseline-margins.html
1699                fast/css-grid-layout/grid-baseline-margins-1.html
1700                fast/css-grid-layout/grid-baseline-margins-2.html
1701                imported/w3c/web-platform-tests/css/css-align/baseline-rules/synthesized-baseline-flexbox-001.html
1702                imported/w3c/web-platform-tests/css/css-align/baseline-rules/synthesized-baseline-grid-001.html
1703                imported/w3c/web-platform-tests/css/css-align/baseline-rules/synthesized-baseline-inline-block-001.html
1704
1705         * rendering/RenderButton.cpp:
1706         (WebCore::synthesizedBaselineFromContentBox):
1707         (WebCore::RenderButton::baselinePosition const):
1708         * rendering/RenderButton.h:
1709         * rendering/RenderFlexibleBox.cpp:
1710         (WebCore::synthesizedBaselineFromBorderBox):
1711         (WebCore::RenderFlexibleBox::baselinePosition const):
1712         (WebCore::RenderFlexibleBox::firstLineBaseline const):
1713         (WebCore::RenderFlexibleBox::inlineBlockBaseline const):
1714         * rendering/RenderGrid.cpp:
1715         (WebCore::RenderGrid::baselinePosition const):
1716         (WebCore::RenderGrid::inlineBlockBaseline const):
1717
1718 2019-04-11  Simon Fraser  <simon.fraser@apple.com>
1719
1720         Avoid doing positioned scrolling tree node work for layers not inside overflow:scroll
1721         https://bugs.webkit.org/show_bug.cgi?id=196848
1722
1723         Reviewed by Zalan Bujtas.
1724
1725         Maintain a bit on RenderLayer which says if a layer has a composited scrolling ancestor
1726         in the layer tree. We only need to do work related to making positioned scrolling tree nodes
1727         for layers which are layer tree descendants of overflow:scroll.
1728
1729         * rendering/RenderLayer.cpp:
1730         (WebCore::RenderLayer::RenderLayer):
1731         (WebCore::RenderLayer::updateLayerPositions):
1732         (WebCore::outputPaintOrderTreeLegend):
1733         (WebCore::outputPaintOrderTreeRecursive):
1734         * rendering/RenderLayer.h:
1735         * rendering/RenderLayerCompositor.cpp:
1736         (WebCore::RenderLayerCompositor::requiresCompositingForPosition const):
1737         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const):
1738         (WebCore::RenderLayerCompositor::isViewportConstrainedFixedOrStickyLayer const):
1739         (WebCore::RenderLayerCompositor::fixedLayerIntersectsViewport const):
1740         (WebCore::RenderLayerCompositor::computeCoordinatedPositioningForLayer const):
1741
1742 2019-04-11  Zalan Bujtas  <zalan@apple.com>
1743
1744         Try to fix Windows build.
1745
1746         * page/PrintContext.cpp:
1747         (WebCore::PrintContext::computedPageMargin):
1748
1749 2019-04-11  Megan Gardner  <megan_gardner@apple.com>
1750
1751         Update 'Save Image' to more clear instructions
1752         https://bugs.webkit.org/show_bug.cgi?id=196833
1753         <rdar://problem/47446845>
1754
1755         Reviewed by Wenson Hsieh.
1756
1757         Not testable, UI change only.
1758
1759         * en.lproj/Localizable.strings:
1760
1761 2019-04-11  Zalan Bujtas  <zalan@apple.com>
1762
1763         Add @page margin support
1764         https://bugs.webkit.org/show_bug.cgi?id=196680
1765         <rdar://problem/45217707>
1766
1767         Reviewed by Tim Horton.
1768
1769         This patch adds support for @page margin. This feature is currently behind a runtime flag and is off by default.
1770         We resolve the @page margin values in the WebProcess (currently no pseudo class is supported) and transfer them to the UIProcess through computedPagesCallback.
1771         UIProcess is responsible for applying these new values on the printer. We also re-compute the available width/height for the current printing context
1772         in the WebProcess if needed (see PrintInfo for current printer margins).
1773
1774         Tests: printing/page-with-10mm-left-margin.html
1775                printing/page-with-zero-margin.html
1776
1777         * page/PrintContext.cpp:
1778         (WebCore::PrintContext::computedPageMargin):
1779         (WebCore::PrintContext::computedPageSize):
1780         * page/PrintContext.h:
1781         * page/RuntimeEnabledFeatures.h:
1782         (WebCore::RuntimeEnabledFeatures::pageAtRuleSupportEnabled const):
1783         (WebCore::RuntimeEnabledFeatures::setPageAtRuleSupportEnabled):
1784
1785 2019-04-11  Dean Jackson  <dino@apple.com>
1786
1787         Extract UTI mapping and allow for additions
1788         https://bugs.webkit.org/show_bug.cgi?id=196822
1789         <rdar://problem/49822339>
1790
1791         Reviewed by Tim Horton.
1792
1793         Add an ADDITIONAL_SYSTEM_PREVIEW_TYPES macro to the list
1794         of accepted MIME types. And add a new helper to map
1795         MIME types to UTI types when the system was unable to
1796         find an existing type.
1797
1798         * platform/MIMETypeRegistry.cpp:
1799         (WebCore::MIMETypeRegistry::systemPreviewMIMETypes):
1800         * platform/network/mac/UTIUtilities.mm:
1801         (WebCore::UTIFromUnknownMIMEType):
1802         (WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
1803
1804 2019-04-09  Ryosuke Niwa  <rniwa@webkit.org>
1805
1806         [iOS] Moving backwards by word granularity does not work if the previous line was inside another block element
1807         https://bugs.webkit.org/show_bug.cgi?id=196670
1808
1809         Reviewed by Wenson Hsieh.
1810
1811         The bug was ultimately caused by two reasons:
1812          1. On iOS, previousWordPositionBoundary would identify a blank line as a word boundary.
1813          2. SimplifiedBackwardsTextIterator generates a new line character (\n) between two block elements.
1814
1815         When moving backwards by word granularity, therefore, previousBoundary would encounter a new line created by (2)
1816         and then previousWordPositionBoundary would identify it as a word boundary.
1817
1818         Fixed the bug (2) by adding the same check as TextIterator::exitNode has to avoid generating an extra new line
1819         character following an exiting new line character. Also added internals.rangeAsTextUsingBackwardsTextIterator
1820         to make SimplifiedBackwardsTextIterator directly testable in layout tests.
1821
1822         This fix unveiled an unrelated bug when moving backwards with sentence granularity at the beginning of a line.
1823         In this case, WebKit was previously feeding ICU with the previous line's content followed by two new lines,
1824         which constituted a new sentence. However after the fix, ICU no longer detects a new sentence after the end
1825         of the prevous line. This patch, therefore, introduces a new optional argument to previousBoundary which forces
1826         the succeeding paragraph's content (i.e. the content of the line from which we're moving backwards with sentence
1827         granularity) to be fed to ICU. This fixes the bug that we were previously not being able to move backwards
1828         with sentence granularity at the beginning of a line as indicated by the new tests.
1829
1830         Tests: editing/selection/extend-selection-backward-at-beginning-of-line-by-sentence-granularity.html
1831                editing/selection/extend-selection-backward-at-beginning-of-line-by-word-granularity.html
1832                editing/selection/move-selection-backward-at-beginning-of-line-by-sentence-granularity.html
1833                editing/selection/move-selection-backward-at-beginning-of-line-by-word-granularity.html
1834                editing/text-iterator/backwards-text-iterator-basic.html
1835
1836         * accessibility/AXObjectCache.cpp:
1837         (WebCore::AXObjectCache::previousBoundary): Fixed the bug that moving backwards with sentence granularity at
1838         the beginning of a line does not work like we did in VisibleUnits. See the description below. It's tested by
1839         an existing layout test accessibility/mac/text-marker-sentence-nav.html, which would fail without this fix.
1840         (WebCore::AXObjectCache::startCharacterOffsetOfSentence):
1841         * accessibility/AXObjectCache.h:
1842         (WebCore::CharacterOffset::isEqual const):
1843         * editing/TextIterator.cpp:
1844         (WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode): Fixed the bug that we were generating two line
1845         lines between block elements. This fixes the bug that moving backwards with word granularity at the beginning
1846         of a line fails on iOS.
1847         (WebCore::plainTextUsingBackwardsTextIteratorForTesting): Added.
1848         * editing/TextIterator.h:
1849         * editing/VisibleUnits.cpp:
1850         (WebCore::previousBoundary): Added the code to extract the succeeding paragraph's content as context for ICU.
1851         This fixes the bug that moving backwards with sentence granularity at the beginning of a line fails.
1852         Limit the length of backwards iteration at the current position to avoid traversing backwards beyond
1853         the current position, and fixed a bug that an early return for the text node was not taking the suffix length
1854         into account when deciding whether next position resides in the starting container node or not.
1855         (WebCore::startSentenceBoundary):
1856         (WebCore::startOfSentence):
1857         * testing/Internals.cpp:
1858         (WebCore::Internals::rangeAsTextUsingBackwardsTextIterator): Added.
1859         * testing/Internals.h:
1860         * testing/Internals.idl:
1861
1862 2019-04-11  Wenson Hsieh  <wenson_hsieh@apple.com>
1863
1864         Allow the MediaSource API to be enabled via website policy
1865         https://bugs.webkit.org/show_bug.cgi?id=196429
1866         <rdar://problem/48774333>
1867
1868         Reviewed by Tim Horton.
1869
1870         Add support in DocumentLoader for adjusting page settings using its per-site policies. See WebKit ChangeLog for
1871         more detail (in particular, the implementation of applyToDocumentLoader).
1872
1873         Test: fast/media/ios/ipad/enable-MediaSource-API-in-modern-compatibility-mode.html
1874
1875         * loader/DocumentLoader.cpp:
1876         (WebCore::DocumentLoader::applyPoliciesToSettings const):
1877         (WebCore::DocumentLoader::attachToFrame):
1878         * loader/DocumentLoader.h:
1879
1880         Add an enum class for MediaSource policies; while we're at it, make all of these enum values 8 bits wide.
1881
1882         (WebCore::DocumentLoader::mediaSourcePolicy const):
1883         (WebCore::DocumentLoader::setMediaSourcePolicy):
1884
1885 2019-04-11  Youenn Fablet  <youenn@apple.com>
1886
1887         Support RTCDataChannel blob binaryType
1888         https://bugs.webkit.org/show_bug.cgi?id=196821
1889
1890         Reviewed by Eric Carlson.
1891
1892         Add support for receiving blobs.
1893         Default value is still left to 'arraybuffer' which is not spec compliant.
1894         Covered by rebased test.
1895
1896         * Modules/mediastream/RTCDataChannel.cpp:
1897         (WebCore::RTCDataChannel::setBinaryType):
1898         (WebCore::RTCDataChannel::didReceiveRawData):
1899
1900 2019-04-11  Devin Rousso  <drousso@apple.com>
1901
1902         Web Inspector: Timelines: can't reliably stop/start a recording
1903         https://bugs.webkit.org/show_bug.cgi?id=196778
1904         <rdar://problem/47606798>
1905
1906         Reviewed by Timothy Hatcher.
1907
1908         * inspector/agents/InspectorTimelineAgent.cpp:
1909         (WebCore::InspectorTimelineAgent::startProgrammaticCapture):
1910         (WebCore::InspectorTimelineAgent::stopProgrammaticCapture):
1911         It is possible to determine when programmatic capturing starts/stops in the frontend based
1912         on the state when the backend causes the state to change, such as if the state is "inactive"
1913         when the frontend is told that the backend has started capturing.
1914
1915         * inspector/agents/InspectorCPUProfilerAgent.cpp:
1916         (WebCore::InspectorCPUProfilerAgent::stopTracking):
1917         * inspector/agents/InspectorMemoryAgent.cpp:
1918         (WebCore::InspectorMemoryAgent::stopTracking):
1919         Send an end timestamp to match other instruments.
1920
1921 2019-04-11  Truitt Savell  <tsavell@apple.com>
1922
1923         Unreviewed, rolling out r244158.
1924
1925         Casued 8 inspector/timeline/ test failures.
1926
1927         Reverted changeset:
1928
1929         "Web Inspector: Timelines: can't reliably stop/start a
1930         recording"
1931         https://bugs.webkit.org/show_bug.cgi?id=196778
1932         https://trac.webkit.org/changeset/244158
1933
1934 2019-04-11  Pablo Saavedra  <psaavedra@igalia.com>
1935
1936         [WPE] Build error with ENABLE_VIDEO=OFF after r244078
1937         https://bugs.webkit.org/show_bug.cgi?id=196811
1938
1939         createGenericCue() is only defined when VIDEO_TRACK is enabled.
1940
1941         Reviewed by Eric Carlson.
1942
1943         * testing/Internals.cpp:
1944         (WebCore::Internals::createGenericCue):
1945         * testing/Internals.h:
1946
1947 2019-04-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1948
1949         [GTK] Layout test accessibility/aria-hidden-false-works-in-subtrees.html fails after r184890
1950         https://bugs.webkit.org/show_bug.cgi?id=146718
1951         <rdar://problem/21722487>
1952
1953         Reviewed by Joanmarie Diggs.
1954
1955         Allow to get the text under element for nodes hidden in DOM but explicitly exposed to accessibility with
1956         aria-hidden="false".
1957
1958         Fixes: accessibility/aria-hidden-false-works-in-subtrees.html
1959
1960         * accessibility/AccessibilityNodeObject.cpp:
1961         (WebCore::AccessibilityNodeObject::textUnderElement const):
1962         * accessibility/atk/WebKitAccessible.cpp:
1963         (roleIsTextType): Also consider ApplicationGroup role as text elements, so that <div>text</div> is equivalent to
1964         <div role="roup">test</div>.
1965
1966 2019-04-10  Said Abou-Hallawa  <sabouhallawa@apple.com>
1967
1968         requestAnimationFrame should execute before the next frame
1969         https://bugs.webkit.org/show_bug.cgi?id=177484
1970
1971         Reviewed by Simon Fraser.
1972
1973         This change fixes these issues with animation timing:
1974
1975         1. Calling the requestAnimationFrame callbacks would have happened when
1976            the DisplayLink fires. This may have happened even if the frame is
1977            missed and no display is committed.
1978
1979         2. Style changes and layout triggered by script could trigger painting
1980            at more than 60fps. CoreAnimation commits could happen at more than
1981            60fps, although WindowServer will throttle those, and only some will
1982            be shown on the screen.
1983
1984         This change introduces a new paint scheduling model where painting is
1985         driven by a "RenderingUpdateScheduler", which only triggers paints once
1986         per 16.7ms frame.
1987
1988         Code that previously scheduled a compositing layer flush now schedules a
1989         "RenderingUpdate", and that update is driven by a DisplayRefreshMonitor
1990         callback. When the render happens, we service requestAnimationFrame callbacks,
1991         Web Animations, intersection observations and resize observations per the
1992         "Update the rendering" step of the HTML Event Loop specification:
1993         <https://html.spec.whatwg.org/multipage/webappapis.html#update-the-rendering>.
1994
1995         In the future, more rendering steps will be added to this code.
1996
1997         * Sources.txt:
1998         * WebCore.xcodeproj/project.pbxproj:
1999         * accessibility/mac/AXObjectCacheMac.mm:
2000         (WebCore::AXObjectCache::platformHandleFocusedUIElementChanged):
2001         Fix layout tests by adding null check.
2002
2003         * animation/DocumentAnimationScheduler.cpp: Removed.
2004         * animation/DocumentAnimationScheduler.h: Removed.
2005         * animation/DocumentTimeline.cpp:
2006         (WebCore::DocumentTimeline::DocumentTimeline):
2007         (WebCore::DocumentTimeline::updateThrottlingState):
2008         (WebCore::DocumentTimeline::suspendAnimations):
2009         (WebCore::DocumentTimeline::resumeAnimations):
2010         (WebCore::DocumentTimeline::liveCurrentTime const):
2011         (WebCore::DocumentTimeline::currentTime):
2012         (WebCore::DocumentTimeline::cacheCurrentTime):
2013         (WebCore::DocumentTimeline::animationTimingDidChange):
2014         (WebCore::DocumentTimeline::scheduleAnimationResolution):
2015         (WebCore::DocumentTimeline::unscheduleAnimationResolution):
2016         (WebCore::DocumentTimeline::updateAnimationsAndSendEvents):
2017         (WebCore::DocumentTimeline::internalUpdateAnimationsAndSendEvents):
2018         (WebCore::DocumentTimeline::scheduleNextTick):
2019         (WebCore::DocumentTimeline::updateListOfElementsWithRunningAcceleratedAnimationsForElement):
2020         Simplify this function by handling the case of no-animations separately.
2021
2022         (WebCore::DocumentTimeline::resolveAnimationsForElement):
2023         Simplify the loop and delete hasPendingAcceleratedAnimations because it
2024         is initialized to true and is not changed inside the loop.
2025
2026         (WebCore::DocumentTimeline::scheduleAnimationResolutionIfNeeded): Deleted.
2027         (WebCore::DocumentTimeline::animationResolutionTimerFired): Deleted.
2028         * animation/DocumentTimeline.h:
2029         * dom/Document.cpp:
2030         (WebCore::Document::resolveStyle):
2031         There is no need to force update in resolveStyle(). notifyFlushRequired()
2032         will be called eventually which will scheduleRenderingUpdate().
2033
2034         (WebCore::Document::prepareForDestruction):
2035         (WebCore::Document::updateAnimationsAndSendEvents):
2036         (WebCore::Document::serviceRequestAnimationFrameCallbacks):
2037         (WebCore::Document::windowScreenDidChange):
2038         (WebCore::Document::scheduleRenderingUpdate):
2039         (WebCore::Document::updateIntersectionObservations):
2040         (WebCore::Document::addResizeObserver):
2041         (WebCore::Document::updateResizeObservations):
2042         (WebCore::Document::scheduleForcedIntersectionObservationUpdate): Deleted.
2043         (WebCore::Document::scheduleResizeObservations): Deleted.
2044         (WebCore::Document::animationScheduler): Deleted.
2045         No need to schedule web-animations, intersection observations and resize
2046         observations updates separately. All of them will be updated through the
2047         "Update the rendering" step, i.e. Page::updateRendering().        
2048
2049         * dom/Document.h:
2050         (WebCore::Document::numberOfIntersectionObservers const):
2051         * dom/ScriptedAnimationController.cpp:
2052         (WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks):
2053         (WebCore::ScriptedAnimationController::scheduleAnimation):
2054         (WebCore::ScriptedAnimationController::animationTimerFired):
2055         (WebCore::ScriptedAnimationController::serviceScriptedAnimations): Deleted.
2056         (WebCore::ScriptedAnimationController::documentAnimationSchedulerDidFire): Deleted.
2057         * dom/ScriptedAnimationController.h:
2058         * page/FrameView.cpp:
2059         (WebCore::FrameView::didLayout):
2060         (WebCore::FrameView::viewportContentsChanged):
2061         * page/FrameViewLayoutContext.cpp:
2062         (WebCore::FrameViewLayoutContext::layoutTimerFired):
2063         * page/IntersectionObserver.cpp:
2064         (WebCore::IntersectionObserver::observe):
2065         * page/Page.cpp:
2066         (WebCore::Page::Page):
2067         (WebCore::Page::layoutIfNeeded):
2068         (WebCore::Page::updateRendering):
2069         (WebCore::Page::renderingUpdateScheduler):
2070         (WebCore::Page::willDisplayPage): Deleted.
2071         (WebCore::Page::addDocumentNeedingIntersectionObservationUpdate): Deleted.
2072         (WebCore::Page::updateIntersectionObservations): Deleted.
2073         (WebCore::Page::scheduleForcedIntersectionObservationUpdate): Deleted.
2074         (WebCore::Page::hasResizeObservers const): Deleted.
2075         (WebCore::Page::gatherDocumentsNeedingResizeObservationCheck): Deleted.
2076         (WebCore::Page::checkResizeObservations): Deleted.
2077         (WebCore::Page::scheduleResizeObservations): Deleted.
2078         (WebCore::Page::notifyResizeObservers): Deleted.
2079         * page/Page.h:
2080         (WebCore::Page::setNeedsCheckResizeObservations): Deleted.
2081         (WebCore::Page::needsCheckResizeObservations const): Deleted.
2082         The IntersectionObserver and the ResizeObserver do not need to schedule
2083         their own timers. The RenderingUpdateScheduler will schedule the "Update
2084         the rendering" step in which these obverses will be served.
2085
2086         * page/PageOverlayController.cpp:
2087         (WebCore::PageOverlayController::didChangeViewExposedRect):
2088         (WebCore::PageOverlayController::notifyFlushRequired):
2089         Force committing the layers to be 60 fps at maximum.
2090
2091         * page/RenderingUpdateScheduler.cpp: Added.
2092         (WebCore::RenderingUpdateScheduler::RenderingUpdateScheduler):
2093         (WebCore::RenderingUpdateScheduler::scheduleRenderingUpdate):
2094         (WebCore::RenderingUpdateScheduler::isScheduled const):
2095         (WebCore::RenderingUpdateScheduler::startTimer):
2096         (WebCore::RenderingUpdateScheduler::clearScheduled):
2097         (WebCore::RenderingUpdateScheduler::createDisplayRefreshMonitor const):
2098         (WebCore::RenderingUpdateScheduler::windowScreenDidChange):
2099         (WebCore::RenderingUpdateScheduler::displayRefreshFired):
2100         (WebCore::RenderingUpdateScheduler::scheduleCompositingLayerFlush):
2101         * page/RenderingUpdateScheduler.h: Added.
2102         (WebCore::RenderingUpdateScheduler::create):
2103         * page/ResizeObserver.cpp:
2104         (WebCore::ResizeObserver::observe):
2105         (WebCore::ResizeObserver::scheduleObservations): Deleted.
2106         * page/ResizeObserver.h:
2107         (WebCore::ResizeObserver::hasActiveObservations const):
2108         * page/ios/ContentChangeObserver.h:
2109         * page/mac/ServicesOverlayController.mm:
2110         (WebCore::ServicesOverlayController::Highlight::notifyFlushRequired):
2111         * page/scrolling/ScrollingStateTree.cpp:
2112         * rendering/RenderLayerCompositor.cpp:
2113         (WebCore::RenderLayerCompositor::scheduleLayerFlushNow):
2114         (WebCore::RenderLayerCompositor::layerTreeAsText):
2115
2116 2019-04-10  Ryosuke Niwa  <rniwa@webkit.org>
2117
2118         Nullptr crash in CompositeEditCommand::moveParagraphs when root editable element goes away
2119         https://bugs.webkit.org/show_bug.cgi?id=193027
2120
2121         Reviewed by Wenson Hsieh.
2122
2123         Added an early exit when the root editable element (editing host in HTML5 spec terminology) is null
2124         during CompositeEditCommand::moveParagraphs. This could happen when the website does something crazy
2125         like removing contenteditable content attribute during DOM mutations or when the destination becomes
2126         disconnected (orphaned) from the document due to bugs elsewhere in the codebase.
2127
2128         Test: editing/deleting/merge-paragraphs-null-root-editable-element-crash.html
2129
2130         * editing/CompositeEditCommand.cpp:
2131         (WebCore::CompositeEditCommand::moveParagraphs): Added an early exit.
2132
2133 2019-04-10  Devin Rousso  <drousso@apple.com>
2134
2135         Web Inspector: save sheet should be anchored underneath the tab bar when detached
2136         https://bugs.webkit.org/show_bug.cgi?id=196722
2137         <rdar://problem/49613280>
2138
2139         Reviewed by Timothy Hatcher.
2140
2141         No web observable change.
2142
2143         * inspector/InspectorFrontendClient.h:
2144         (WebCore::InspectorFrontendClient::changeSheetRect): Added.
2145
2146         * inspector/InspectorFrontendClientLocal.h:
2147         * inspector/InspectorFrontendClientLocal.cpp:
2148         (WebCore::InspectorFrontendClientLocal::changeSheetRect): Added.
2149
2150         * inspector/InspectorFrontendHost.idl:
2151         * inspector/InspectorFrontendHost.h:
2152         * inspector/InspectorFrontendHost.cpp:
2153         (WebCore::InspectorFrontendHost::setSheetRect): Added.
2154
2155         * testing/Internals.cpp:
2156         (WebCore::InspectorStubFrontend::setSheetRect): Added.
2157
2158 2019-04-10  Devin Rousso  <drousso@apple.com>
2159
2160         Web Inspector: Inspector: lazily create the agent
2161         https://bugs.webkit.org/show_bug.cgi?id=195971
2162         <rdar://problem/49039645>
2163
2164         Reviewed by Joseph Pecoraro.
2165
2166         No change in functionality.
2167
2168         * inspector/InspectorController.h:
2169         * inspector/InspectorController.cpp:
2170         (WebCore::InspectorController::InspectorController):
2171         (WebCore::InspectorController::createLazyAgents):
2172         (WebCore::InspectorController::evaluateForTestInFrontend):
2173         (WebCore::InspectorController::ensureInspectorAgent):
2174
2175 2019-04-10  Megan Gardner  <megan_gardner@apple.com>
2176
2177         Remove unneeded extern C
2178         https://bugs.webkit.org/show_bug.cgi?id=196786
2179
2180         Reviewed by Tim Horton.
2181
2182         No tests needed, just needs to compile.
2183
2184         Removing staging hack for Reveal framework.
2185
2186         * editing/cocoa/DictionaryLookup.mm:
2187
2188 2019-04-10  Devin Rousso  <drousso@apple.com>
2189
2190         Web Inspector: REGRESSION: lazy agents used outside of frontend/instrumentation can be accessed before being created
2191         https://bugs.webkit.org/show_bug.cgi?id=196725
2192         <rdar://problem/49669810>
2193
2194         Reviewed by Timothy Hatcher.
2195
2196         Move the logic for creating the `InspectorPageAgent` and `InspectorDOMAgent` into separate
2197         functions so that callers into `InspectorController` can be guaranteed to have a valid
2198         instance of the agent.
2199
2200         This doesn't interfere with the `Page.enable` command, as it doesn't clear any saved state.
2201         There is no `DOM.enable` command, so there's no issue there either.
2202
2203         * inspector/InspectorController.h:
2204         (WebCore::InspectorController::pageAgent): Deleted.
2205         * inspector/InspectorController.cpp:
2206         (WebCore::InspectorController::createLazyAgents):
2207         (WebCore::InspectorController::inspect):
2208         (WebCore::InspectorController::hideHighlight):
2209         (WebCore::InspectorController::ensureDOMAgent): Added.
2210         (WebCore::InspectorController::ensurePageAgent): Added.
2211
2212         * inspector/InspectorFrontendClientLocal.cpp:
2213         (WebCore::InspectorFrontendClientLocal::showMainResourceForFrame):
2214
2215 2019-04-10  Alex Christensen  <achristensen@webkit.org>
2216
2217         Add SPI WKNavigationResponse._downloadAttribute
2218         https://bugs.webkit.org/show_bug.cgi?id=196755
2219         <rdar://49587365>
2220
2221         Reviewed by Brady Eidson.
2222
2223         Covered by an API test that validates the attribute is correctly sent through the FrameLoader to the API.
2224         When a user clicks on a link with a download attribute, the download attribute should be used as the suggested filename sometimes.
2225         The application needs this information after it has received the response in order to make fully informed decisions about downloads.
2226         In order to get this attribute to the decidePolicyForNavigationResponse, we need to store the attribute on the DocumentLoader
2227         from the FrameLoadRequest then send it from the DocumentLoader when the response is received.
2228
2229         * loader/DocumentLoader.h:
2230         (WebCore::DocumentLoader::setDownloadAttribute):
2231         (WebCore::DocumentLoader::downloadAttribute const):
2232         * loader/EmptyFrameLoaderClient.h:
2233         * loader/FrameLoader.cpp:
2234         (WebCore::FrameLoader::checkContentPolicy):
2235         (WebCore::FrameLoader::loadURL):
2236         (WebCore::FrameLoader::loadWithNavigationAction):
2237         (WebCore::FrameLoader::loadPostRequest):
2238         * loader/FrameLoader.h:
2239         (WebCore::FrameLoader::loadWithNavigationAction):
2240         * loader/FrameLoaderClient.h:
2241
2242 2019-04-10  Youenn Fablet  <youenn@apple.com>
2243
2244         SWClientConnection should not double hop to fire some events
2245         https://bugs.webkit.org/show_bug.cgi?id=196735
2246
2247         Reviewed by Alex Christensen.
2248
2249         Some events, like postMessage in service workers is hopping from main thread to service worker thread to dispatch events.
2250         Some other events, like service worker state update, are hopping from main thread to service worker thread, then posting a task to dispatch events.
2251         This may create ordering problems.
2252
2253         To fix the issue, we now hop to the service worker thread and dispatch the events.
2254         In addition, for documents, we post a task and do the whole service worker processing in it.
2255         This ensures that some tests, like whether there is a service worker container,
2256         or creation of a service worker are done consistently.
2257
2258         Covered by unflaked test.
2259
2260         * workers/service/SWClientConnection.cpp:
2261         (WebCore::SWClientConnection::updateRegistrationState):
2262         (WebCore::SWClientConnection::updateWorkerState):
2263         (WebCore::SWClientConnection::fireUpdateFoundEvent):
2264         (WebCore::SWClientConnection::notifyClientsOfControllerChange):
2265         * workers/service/ServiceWorker.cpp:
2266         (WebCore::ServiceWorker::updateState):
2267         * workers/service/ServiceWorker.h:
2268         * workers/service/ServiceWorkerContainer.cpp:
2269         (WebCore::ServiceWorkerContainer::updateRegistrationState):
2270         (WebCore::ServiceWorkerContainer::fireUpdateFoundEvent):
2271         (WebCore::ServiceWorkerContainer::fireControllerChangeEvent):
2272         * workers/service/ServiceWorkerContainer.h:
2273         * workers/service/ServiceWorkerJob.cpp:
2274         (WebCore::ServiceWorkerJob::notifyFinished):
2275         Notify of the script URL in the error message.
2276         This will help diagnose flakiness issues.
2277         * workers/service/ServiceWorkerRegistration.cpp:
2278         (WebCore::ServiceWorkerRegistration::fireUpdateFoundEvent):
2279         * workers/service/ServiceWorkerRegistration.h:
2280
2281 2019-04-10  Devin Rousso  <drousso@apple.com>
2282
2283         Web Inspector: Timelines: can't reliably stop/start a recording
2284         https://bugs.webkit.org/show_bug.cgi?id=196778
2285         <rdar://problem/47606798>
2286
2287         Reviewed by Timothy Hatcher.
2288
2289         * inspector/agents/InspectorTimelineAgent.cpp:
2290         (WebCore::InspectorTimelineAgent::startProgrammaticCapture):
2291         (WebCore::InspectorTimelineAgent::stopProgrammaticCapture):
2292         It is possible to determine when programmatic capturing starts/stops in the frontend based
2293         on the state when the backend causes the state to change, such as if the state is "inactive"
2294         when the frontend is told that the backend has started capturing.
2295
2296         * inspector/agents/InspectorCPUProfilerAgent.cpp:
2297         (WebCore::InspectorCPUProfilerAgent::stopTracking):
2298         * inspector/agents/InspectorMemoryAgent.cpp:
2299         (WebCore::InspectorMemoryAgent::stopTracking):
2300         Send an end timestamp to match other instruments.
2301
2302 2019-04-10  Tim Horton  <timothy_horton@apple.com>
2303
2304         Add modern API for overriding the page's specified viewport configuration
2305         https://bugs.webkit.org/show_bug.cgi?id=167734
2306         <rdar://problem/30331795>
2307
2308         Reviewed by Simon Fraser.
2309
2310         New API test: WebKit.OverrideViewportArguments
2311
2312         * dom/Document.cpp:
2313         (WebCore::Document::updateViewportArguments):
2314         * dom/Document.h:
2315         (WebCore::Document::viewportArguments const):
2316         Make the viewportArguments() getter respect the overridden arguments.
2317
2318         * dom/ViewportArguments.cpp:
2319         (WebCore::numericPrefix):
2320         (WebCore::findSizeValue):
2321         (WebCore::findScaleValue):
2322         (WebCore::findBooleanValue):
2323         (WebCore::parseViewportFitValue):
2324         (WebCore::viewportErrorMessage):
2325         (WebCore::reportViewportWarning):
2326         (WebCore::setViewportFeature):
2327         * dom/ViewportArguments.h:
2328         Make it possible to parse ViewportArguments without a Document, so
2329         that it can be used in the UI process. We only used the Document for
2330         two things: error reporting, and getting the state of one setting.
2331         Refactor error handling to use a passed-arund function, and add a
2332         variant of setViewportFeature() that doesn't take a Document.
2333
2334 2019-04-10  Justin Fan  <justin_fan@apple.com>
2335
2336         [Web GPU] Indexed drawing and GPUCommandEncoder crash prevention
2337         https://bugs.webkit.org/show_bug.cgi?id=196758
2338
2339         Reviewed by Dean Jackson.
2340
2341         Test: webgpu/draw-indexed-triangles.html
2342
2343         Implement GPURenderPassEncoder::setIndexBuffer and GPURenderPassEncoder::drawIndexed to enable indexed drawing.
2344         Disable GPUCommandEncoders with active pass encoders from being submitted or encoding blits. 
2345
2346         Prevent active GPUCommandEncoders from being submitted or encoding blit commands:
2347         * Modules/webgpu/WebGPUCommandEncoder.cpp:
2348         (WebCore::WebGPUCommandEncoder::finish):
2349         * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
2350         (WebCore::GPUCommandBuffer::copyBufferToBuffer):
2351         (WebCore::GPUCommandBuffer::copyBufferToTexture):
2352         (WebCore::GPUCommandBuffer::copyTextureToBuffer):
2353         (WebCore::GPUCommandBuffer::copyTextureToTexture):
2354
2355         Implement GPURenderPassEncoder::setIndexBuffer and GPURenderPassEncoder::drawIndexed:
2356         * Modules/webgpu/WebGPURenderPassEncoder.cpp:
2357         (WebCore::WebGPURenderPassEncoder::setIndexBuffer):
2358         (WebCore::WebGPURenderPassEncoder::setVertexBuffers): Remove unnecessary move operations.
2359         (WebCore::WebGPURenderPassEncoder::drawIndexed): Added.
2360         * Modules/webgpu/WebGPURenderPassEncoder.h:
2361         * Modules/webgpu/WebGPURenderPassEncoder.idl:
2362         * platform/graphics/gpu/GPUBuffer.h:
2363         (WebCore::GPUBuffer::isIndex const):
2364         * platform/graphics/gpu/GPUInputStateDescriptor.h:
2365         * platform/graphics/gpu/GPURenderPassEncoder.h: Cache the index buffer, as Metal does not set the index buffer separate from the draw call.
2366         * platform/graphics/gpu/GPURenderPipeline.h:
2367         (WebCore::GPURenderPipeline::indexFormat const):
2368         * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
2369         (WebCore::GPURenderPassEncoder::setIndexBuffer):
2370         (WebCore::GPURenderPassEncoder::setVertexBuffers):
2371         (WebCore::mtlPrimitiveTypeForGPUPrimitiveTopology):
2372         (WebCore::GPURenderPassEncoder::draw):
2373         (WebCore::mtlIndexTypeForGPUIndexFormat): Added.
2374         (WebCore::GPURenderPassEncoder::drawIndexed): Added.
2375         (WebCore::primitiveTypeForGPUPrimitiveTopology): Deleted.
2376         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
2377         (WebCore::GPURenderPipeline::tryCreate):
2378         (WebCore::GPURenderPipeline::GPURenderPipeline):
2379
2380 2019-04-09  Ryosuke Niwa  <rniwa@webkit.org>
2381
2382         OfflineAudioDestinationNode::startRendering leaks OfflineAudioDestinationNode if offlineRender exists early
2383         https://bugs.webkit.org/show_bug.cgi?id=196759
2384
2385         Reviewed by Eric Carlson.
2386
2387         OfflineAudioDestinationNode::startRendering unconditionally ref's itself before invoking offlineRender() in a new thread.
2388         But offlineRender can early exit without ever calling deref() in the main thread, leading to the leak of
2389         OfflineAudioDestinationNode. Fixed the leak by always calling deref in the main thread after calling offlineRender().
2390
2391         Also removed the debug assertion in offlineRender which always hits when we run the relevant test.
2392
2393         Test: imported/w3c/web-platform-tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/current-time-block-size.html
2394
2395         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
2396         (WebCore::OfflineAudioDestinationNode::startRendering):
2397         (WebCore::OfflineAudioDestinationNode::offlineRender):
2398         (WebCore::OfflineAudioDestinationNode::notifyComplete): Merged into startRendering.
2399         * Modules/webaudio/OfflineAudioDestinationNode.h:
2400
2401 2019-04-10  Megan Gardner  <megan_gardner@apple.com>
2402
2403         Fix text autoscrolling when typing in modern webkit
2404         https://bugs.webkit.org/show_bug.cgi?id=196718
2405         <rdar://problem/49225507>
2406
2407         Reviewed by Tim Horton.
2408
2409         Tests: fast/events/autoscroll-when-input-is-offscreen.html
2410                fast/events/autoscroll-with-software-keyboard.html
2411
2412         We have been relying on UIKit to scroll editable text, but
2413         since we cannot give them enough information for them to always
2414         do the right thing, we should just do all the work in WebKit.
2415         This has the added benifit of fixing some tricky autoscrolling
2416         bugs that have cropped up recently.
2417
2418         * editing/Editor.cpp:
2419         (WebCore::Editor::insertTextWithoutSendingTextEvent):
2420         (WebCore::Editor::revealSelectionAfterEditingOperation):
2421         We should be scrolling the main frame in WebKit. We have been relying on UIKit,
2422         but we cannot give them enough information to guarantee a correct scroll, so just
2423         do all the work in WebKit.
2424         * page/FrameView.cpp:
2425         (WebCore::FrameView::unobscuredContentRectExpandedByContentInsets const):
2426         Update to use the rect that is actually visible, accounting for the software keyboard.
2427
2428 2019-04-10  Ross Kirsling  <ross.kirsling@sony.com>
2429
2430         WebCore should build successfully even with -DENABLE_UNIFIED_BUILDS=OFF
2431         https://bugs.webkit.org/show_bug.cgi?id=196762
2432
2433         Reviewed by Ryosuke Niwa.
2434
2435         * Modules/indexeddb/IDBCursor.h:
2436         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
2437         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
2438         * Modules/websockets/WebSocketFrame.cpp:
2439         * accessibility/AccessibilityARIAGridRow.cpp:
2440         (WebCore::AccessibilityARIAGridRow::parentTable const):
2441         * accessibility/AccessibilityObject.cpp:
2442         * accessibility/AccessibilityRenderObject.cpp:
2443         * animation/CSSAnimation.cpp:
2444         * animation/DeclarativeAnimation.cpp:
2445         * bindings/js/DOMGCOutputConstraint.h:
2446         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2447         (WebCore::root):
2448         (WebCore::JSCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots):
2449         (WebCore::JSCanvasRenderingContext2D::visitAdditionalChildren):
2450         * bindings/js/JSDOMConvertNumbers.cpp:
2451         * bindings/js/JSDOMWindowCustom.cpp:
2452         * bindings/js/JSExtendableMessageEventCustom.cpp:
2453         * bindings/js/SerializedScriptValue.cpp:
2454         * css/CSSFontFaceSource.cpp:
2455         * css/CSSFontFaceSource.h:
2456         * css/MediaQueryMatcher.h:
2457         * css/parser/CSSPropertyParserHelpers.cpp:
2458         * dom/DocumentParser.cpp:
2459         * dom/EventPath.cpp:
2460         * dom/MouseEvent.h:
2461         * dom/SpectreGadget.cpp:
2462         * dom/SpectreGadget.h:
2463         * editing/ChangeListTypeCommand.cpp:
2464         * editing/EditAction.cpp:
2465         * editing/ReplaceSelectionCommand.cpp:
2466         * editing/TextGranularity.h:
2467         * html/HTMLFormControlsCollection.cpp:
2468         * html/HTMLImageElement.cpp:
2469         * html/canvas/CanvasRenderingContext2DBase.cpp:
2470         * inspector/InspectorController.cpp:
2471         * inspector/agents/InspectorApplicationCacheAgent.cpp:
2472         * inspector/agents/InspectorCanvasAgent.cpp:
2473         * inspector/agents/WebHeapAgent.cpp:
2474         * inspector/agents/page/PageAuditAgent.cpp:
2475         * inspector/agents/page/PageConsoleAgent.cpp:
2476         * inspector/agents/page/PageNetworkAgent.cpp:
2477         * inspector/agents/worker/WorkerAuditAgent.cpp:
2478         * loader/CrossOriginAccessControl.h:
2479         * loader/CrossOriginPreflightResultCache.h:
2480         * loader/NavigationAction.cpp:
2481         * loader/ResourceLoadObserver.cpp:
2482         * page/FrameTree.cpp:
2483         * page/IntersectionObserver.cpp:
2484         * page/PageConfiguration.cpp:
2485         * page/PerformanceResourceTiming.cpp:
2486         * page/ResizeObservation.cpp:
2487         * page/UndoManager.cpp:
2488         * plugins/PluginData.cpp:
2489         * rendering/Grid.h:
2490         * rendering/GridBaselineAlignment.cpp:
2491         * rendering/GridBaselineAlignment.h:
2492         * rendering/GridLayoutFunctions.cpp:
2493         * rendering/GridLayoutFunctions.h:
2494         * rendering/GridTrackSizingAlgorithm.h:
2495         * rendering/RenderDeprecatedFlexibleBox.cpp:
2496         * rendering/RenderFlexibleBox.cpp:
2497         * rendering/RenderIFrame.cpp:
2498         * rendering/RenderLayerFilters.cpp:
2499         * rendering/TextDecorationPainter.cpp:
2500         * rendering/TextDecorationPainter.h:
2501         * rendering/TextPainter.cpp:
2502         * rendering/TextPainter.h:
2503         * rendering/style/StyleRareNonInheritedData.cpp:
2504         * rendering/style/StyleRareNonInheritedData.h:
2505         * rendering/svg/SVGRenderSupport.h:
2506         * rendering/updating/RenderTreeBuilder.cpp:
2507         * rendering/updating/RenderTreeBuilderSVG.cpp:
2508         * style/InlineTextBoxStyle.cpp:
2509         * style/InlineTextBoxStyle.h:
2510         * style/StylePendingResources.cpp:
2511         * svg/SVGMatrix.h:
2512         * svg/SVGViewSpec.h:
2513         * svg/SVGZoomAndPan.h:
2514         * workers/WorkerScriptLoader.cpp:
2515         * workers/WorkerScriptLoader.h:
2516         * workers/service/ServiceWorker.cpp:
2517         * workers/service/ServiceWorkerClientData.cpp:
2518         * workers/service/ServiceWorkerClients.cpp:
2519         * workers/service/ServiceWorkerClients.h:
2520         * workers/service/ServiceWorkerGlobalScope.cpp:
2521         * workers/service/ServiceWorkerJob.cpp:
2522         * workers/service/ServiceWorkerProvider.cpp:
2523         * workers/service/context/ServiceWorkerFetch.cpp:
2524         * workers/service/context/ServiceWorkerInspectorProxy.h:
2525         * workers/service/context/ServiceWorkerThread.cpp:
2526         * workers/service/context/ServiceWorkerThreadProxy.cpp:
2527         * workers/service/server/SWServerJobQueue.cpp:
2528         * workers/service/server/SWServerToContextConnection.cpp:
2529         * workers/service/server/SWServerWorker.cpp:
2530         * workers/service/server/SWServerWorker.h:
2531         * worklets/Worklet.h:
2532
2533 2019-04-10  Antoine Quint  <graouts@apple.com>
2534
2535         Enable Pointer Events on watchOS
2536         https://bugs.webkit.org/show_bug.cgi?id=196771
2537         <rdar://problem/49040909>
2538
2539         Reviewed by Dean Jackson.
2540
2541         * Configurations/FeatureDefines.xcconfig:
2542
2543 2019-04-10  Youenn Fablet  <youenn@apple.com>
2544
2545         Delay initialization of quota users until the first quota request
2546         https://bugs.webkit.org/show_bug.cgi?id=196467
2547
2548         Reviewed by Chris Dumez.
2549
2550         Instead of triggering initialization of each user when being added,
2551         delay initialization until the first call to requestSpace with a non zero task size.
2552         This will make sure we do not load Cache API information in memory or check for
2553         IDB space until actually necessary.
2554
2555         To implement that, move from a HashSet of being initialized users to a HashMap where the key is user and
2556         the value is the user initialization state.
2557
2558         When removing a user, delay the call to processPendingRequest so that a synchronous call to addUser
2559         can be taken into consideration.
2560
2561         This unflakes some Cache API tests as these tests do clear the Cache API and check for the clearing result.
2562         Clearing the caches triggers a removeUser/addUser dance which then triggers initialization of the Caches structure.
2563
2564         Covered by existing tests.
2565
2566         * storage/StorageQuotaManager.cpp:
2567         (WebCore::StorageQuotaManager::initializeUsersIfNeeded):
2568         (WebCore::StorageQuotaManager::askUserToInitialize):
2569         (WebCore::StorageQuotaManager::addUser):
2570         (WebCore::StorageQuotaManager::requestSpace):
2571         * storage/StorageQuotaManager.h:
2572
2573 2019-04-10  Philippe Normand  <pnormand@igalia.com>
2574
2575         there is no vp8 support in youtube.com/html5 page with libwebkit2gtk 2.24 (MSE enabled)
2576         https://bugs.webkit.org/show_bug.cgi?id=196615
2577
2578         Reviewed by Xabier Rodriguez-Calvar.
2579
2580         Add vp8.0 and vp9.0 in supported mime-types if the corresponding video decoders are found.
2581
2582         No new tests, existing web-platform-tests cover this change.
2583
2584         * platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
2585         (WebCore::GStreamerRegistryScanner::initialize):
2586
2587 2019-04-10  Philippe Normand  <pnormand@igalia.com>
2588
2589         [GStreamer] Adaptive streaming playback broken with GStreamer < 1.12
2590         https://bugs.webkit.org/show_bug.cgi?id=196765
2591
2592         Reviewed by Xabier Rodriguez-Calvar.
2593
2594         Without the following patch in gst-plugins-bad, the uridownloader
2595         doesn't relay need-context messages to its parent, so in our case
2596         the player can't share its context with secondary webkitwebsrc
2597         elements and a RELEASE_ASSERT is hit in the WebProcess.
2598
2599         So the workaround is to use again webkit+ protocol prefixes for
2600         GStreamer versions older than 1.12.
2601
2602         https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/commit/8cf858fb27919e1d631223375f81b98055623733
2603
2604         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2605         (WebCore::convertToInternalProtocol):
2606         (WebCore::MediaPlayerPrivateGStreamer::setPlaybinURL):
2607         (WebCore::MediaPlayerPrivateGStreamer::loadFull):
2608         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
2609         (WebCore::MediaPlayerPrivateGStreamer::wouldTaintOrigin const):
2610         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2611         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2612         (webKitWebSrcStart):
2613         (webKitWebSrcGetProtocols):
2614         (convertPlaybinURI):
2615         (webKitWebSrcSetUri):
2616         (CachedResourceStreamingClient::responseReceived):
2617         (webKitSrcWouldTaintOrigin):
2618         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.h:
2619
2620 2019-04-10  Carlos Garcia Campos  <cgarcia@igalia.com>
2621
2622         [ATK] Defer the emision of AtkObject::children-changed signal after layout is done
2623         https://bugs.webkit.org/show_bug.cgi?id=187948
2624
2625         Reviewed by Michael Catanzaro.
2626
2627         The signal AtkObject::children-changed is emitted from AXObjectCache::attachWrapper() and
2628         AXObjectCache::detachWrapper(). Both can be called in the middle of a layout, so we need to defer the emission
2629         of the signal after the layout is done, to avoid other atk entry points from being called at that point, since
2630         most of them update the backing store at the beginning.
2631
2632         Fixes: accessibility/children-changed-sends-notification.html
2633
2634         * accessibility/AXObjectCache.cpp:
2635         (WebCore::AXObjectCache::performDeferredCacheUpdate): Call platformPerformDeferredCacheUpdate().
2636         * accessibility/AXObjectCache.h:
2637         * accessibility/atk/AXObjectCacheAtk.cpp:
2638         (WebCore::wrapperParent): Helper to get the AtkObject parent of a given WebKitAccessible.
2639         (WebCore::AXObjectCache::detachWrapper): Add wrapper to m_deferredDetachedWrapperList.
2640         (WebCore::AXObjectCache::attachWrapper): Add object to m_deferredAttachedWrapperObjectList.
2641         (WebCore::AXObjectCache::platformPerformDeferredCacheUpdate): Emit AtkObject::children-changed::add for objects
2642         in m_deferredAttachedWrapperObjectList and AtkObject::children-changed::remove for wrappers in m_deferredDetachedWrapperList.
2643         * accessibility/ios/AXObjectCacheIOS.mm:
2644         (WebCore::AXObjectCache::platformPerformDeferredCacheUpdate):
2645         * accessibility/mac/AXObjectCacheMac.mm:
2646         (WebCore::AXObjectCache::platformPerformDeferredCacheUpdate):
2647         * accessibility/win/AXObjectCacheWin.cpp:
2648         (WebCore::AXObjectCache::platformPerformDeferredCacheUpdate):
2649         * accessibility/wpe/AXObjectCacheWPE.cpp:
2650         (WebCore::AXObjectCache::platformPerformDeferredCacheUpdate):
2651
2652 2019-04-10  Carlos Garcia Campos  <cgarcia@igalia.com>
2653
2654         [ATK] Test accessibility/insert-children-assert.html is crashing since added in r216980
2655         https://bugs.webkit.org/show_bug.cgi?id=172281
2656         <rdar://problem/37030990>
2657
2658         Reviewed by Joanmarie Diggs.
2659
2660         The crash happens because at some point the test tries to get the anonymous block text, getting the RenderText as
2661         first child and RenderFullScreen as last child and the latter doesn't have a node. This is because in atk we do
2662         things differently, we don't include the static text elements individually, but parent element uses
2663         textUnderElement() to get all the pieces together. We can just turn the asserts into actual nullptr checks.
2664
2665         Fixes: accessibility/insert-children-assert.html
2666
2667         * accessibility/AccessibilityRenderObject.cpp:
2668         (WebCore::AccessibilityRenderObject::textUnderElement const):
2669
2670 2019-04-09  Keith Rollin  <krollin@apple.com>
2671
2672         Unreviewed build maintenance -- update .xcfilelists.
2673
2674         * DerivedSources-input.xcfilelist:
2675         * DerivedSources-output.xcfilelist:
2676
2677 2019-04-09  Zalan Bujtas  <zalan@apple.com>
2678
2679         [AutoSizing] Avoid making text paragraphs scroll horizontally when there is a wide table
2680         https://bugs.webkit.org/show_bug.cgi?id=196743
2681         <rdar://problem/43897551>
2682
2683         Reviewed by Tim Horton.
2684
2685         This patch changes the auto size behavior by using fixed constraint (instead of a min/max pair) to compute the content height.
2686         Now with the initial containing block width is firmly set to auto-sizing width, the overflow content will not stretch the ICB. Instead it overflows the ICB
2687         and triggers scrolling the same way the non-auto-sizing mode does.
2688
2689         * page/FrameView.cpp:
2690         (WebCore::FrameView::autoSizeIfEnabled):
2691         (WebCore::FrameView::enableAutoSizeMode):
2692         * page/FrameView.h:
2693         * testing/Internals.cpp:
2694         (WebCore::Internals::enableAutoSizeMode):
2695         * testing/Internals.h:
2696         * testing/Internals.idl:
2697
2698 2019-04-09  Youenn Fablet  <youenn@apple.com>
2699
2700         Close service worker database on network process suspension
2701         https://bugs.webkit.org/show_bug.cgi?id=196623
2702         <rdar://problem/48930869>
2703
2704         Reviewed by Alex Christensen.
2705
2706         Add suspend/resume support to SWServer.
2707         On suspend, close the service worker database and stop pushing for changes.
2708         On resume, push changes if needed.
2709
2710         * workers/service/server/RegistrationDatabase.cpp:
2711         (WebCore::RegistrationDatabase::close):
2712         * workers/service/server/RegistrationDatabase.h:
2713         (WebCore::RegistrationDatabase::isClosed const): Deleted.
2714         * workers/service/server/RegistrationStore.cpp:
2715         (WebCore::RegistrationStore::closeDatabase):
2716         * workers/service/server/RegistrationStore.cpp:
2717         (WebCore::RegistrationStore::pushChangesToDatabase):
2718         (WebCore::RegistrationStore::clearAll):
2719         (WebCore::RegistrationStore::startSuspension):
2720         (WebCore::RegistrationStore::endSuspension):
2721         * workers/service/server/RegistrationStore.h:
2722         * workers/service/server/SWServer.cpp:
2723         (WebCore::SWServer::startSuspension):
2724         (WebCore::SWServer::endSuspension):
2725         * workers/service/server/SWServer.h:
2726
2727 2019-04-09  Justin Fan  <justin_fan@apple.com>
2728
2729         [Web GPU] GPURenderPassEncoder updates: setBlendColor, setViewport, setScissorRect
2730         https://bugs.webkit.org/show_bug.cgi?id=196719
2731
2732         Reviewed by Myles C. Maxfield.
2733
2734         Implement setBlendColor, setViewport, and setScissorRect for GPURenderPassEncoder.
2735
2736         Tests: webgpu/viewport-scissor-rect-triangle-strip.html, webgpu/blend-color-triangle-strip.html
2737
2738         * Modules/webgpu/WebGPURenderPassEncoder.cpp:
2739         (WebCore::WebGPURenderPassEncoder::setBlendColor):
2740         (WebCore::WebGPURenderPassEncoder::setViewport):
2741         (WebCore::WebGPURenderPassEncoder::setScissorRect):
2742         * Modules/webgpu/WebGPURenderPassEncoder.h:
2743         * Modules/webgpu/WebGPURenderPassEncoder.idl:
2744         * platform/graphics/gpu/GPURenderPassEncoder.h:
2745         * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
2746         (WebCore::GPURenderPassEncoder::setBlendColor):
2747         (WebCore::GPURenderPassEncoder::setViewport):
2748         (WebCore::GPURenderPassEncoder::setScissorRect):
2749
2750 2019-04-09  Andy Estes  <aestes@apple.com>
2751
2752         [Apple Pay] Add release logging to PaymentCoordinator
2753         https://bugs.webkit.org/show_bug.cgi?id=196738
2754
2755         Reviewed by Alex Christensen.
2756
2757         When allowed, log interactions with PaymentCoordinator to os_log to help diagnose Apple Pay bugs.
2758
2759         The following information might be logged: names of functions called, merchant API versions,
2760         boolean results of canMakePayments(), boolean results of beginPaymentSession(), whether
2761         completePaymentSession() was called with a final state result, boolean results of
2762         shouldAllowApplePay(), whether a document has evaluated user agent scripts or is running
2763         user scripts, and whether a client supports unrestricted Apple Pay.
2764
2765         * Modules/applepay/PaymentCoordinator.cpp:
2766         (WebCore::PaymentCoordinator::supportsVersion const):
2767         (WebCore::PaymentCoordinator::canMakePayments):
2768         (WebCore::PaymentCoordinator::canMakePaymentsWithActiveCard):
2769         (WebCore::PaymentCoordinator::openPaymentSetup):
2770         (WebCore::PaymentCoordinator::beginPaymentSession):
2771         (WebCore::PaymentCoordinator::completeMerchantValidation):
2772         (WebCore::PaymentCoordinator::completeShippingMethodSelection):
2773         (WebCore::PaymentCoordinator::completeShippingContactSelection):
2774         (WebCore::PaymentCoordinator::completePaymentMethodSelection):
2775         (WebCore::PaymentCoordinator::completePaymentSession):
2776         (WebCore::PaymentCoordinator::abortPaymentSession):
2777         (WebCore::PaymentCoordinator::cancelPaymentSession):
2778         (WebCore::PaymentCoordinator::validateMerchant):
2779         (WebCore::PaymentCoordinator::didAuthorizePayment):
2780         (WebCore::PaymentCoordinator::didSelectPaymentMethod):
2781         (WebCore::PaymentCoordinator::didSelectShippingMethod):
2782         (WebCore::PaymentCoordinator::didSelectShippingContact):
2783         (WebCore::PaymentCoordinator::didCancelPaymentSession):
2784         (WebCore::PaymentCoordinator::shouldAllowApplePay const):
2785         (WebCore::PaymentCoordinator::shouldAllowUserAgentScripts const):
2786         * Modules/applepay/PaymentCoordinatorClient.h:
2787         (WebCore::PaymentCoordinatorClient::isAlwaysOnLoggingAllowed const):
2788         * platform/Logging.h:
2789         * testing/MockPaymentCoordinator.h:
2790
2791 2019-04-09  John Wilander  <wilander@apple.com>
2792
2793         Pick up Ad Click Attribution conversions in NetworkResourceLoader::willSendRedirectedRequest()
2794         https://bugs.webkit.org/show_bug.cgi?id=196558
2795         <rdar://problem/47650245>
2796
2797         Reviewed by Youenn Fablet.
2798
2799         Tests: http/tests/adClickAttribution/attribution-conversion-through-cross-site-image-redirect.html
2800                http/tests/adClickAttribution/attribution-conversion-through-image-redirect-with-priority.html
2801                http/tests/adClickAttribution/attribution-conversion-through-image-redirect-without-priority.html
2802
2803         The existing API tests were expanded too.
2804
2805         * html/HTMLAnchorElement.cpp:
2806         (WebCore::HTMLAnchorElement::parseAdClickAttribution const):
2807            Enhanced the use of AdClickAttribution::MaxEntropy.
2808         * loader/AdClickAttribution.cpp:
2809         (WebCore::AdClickAttribution::parseConversionRequest):
2810             New function to parse and validate URLs with a path starting with
2811             /.well-known/ad-click-attribution/.
2812         (WebCore::AdClickAttribution::toString const):
2813             Added output for the conversion priority for testing purposes.
2814         * loader/AdClickAttribution.h:
2815         (WebCore::AdClickAttribution::Campaign::isValid const):
2816         (WebCore::AdClickAttribution::Conversion::isValid const):
2817            Enhanced the use of AdClickAttribution::MaxEntropy.
2818
2819 2019-04-09  Don Olmstead  <don.olmstead@sony.com>
2820
2821         [CMake] Apple builds should use ICU_INCLUDE_DIRS
2822         https://bugs.webkit.org/show_bug.cgi?id=196720
2823
2824         Reviewed by Konstantin Tokarev.
2825
2826         * PlatformMac.cmake:
2827
2828 2019-04-09  Jer Noble  <jer.noble@apple.com>
2829
2830         Test for: 196095 Inband Text Track cues interspersed with Data cues can display out of order.
2831         https://bugs.webkit.org/show_bug.cgi?id=196097
2832
2833         Reviewed by Eric Carlson.
2834
2835         Test: media/track/track-in-band-metadata-display-order.html
2836
2837         Add a method in Internals to create a TextTrackCueGeneric (which can normally only be created
2838         by parsing an in-band media track). This requires adding IDL for TextTrackCueGeneric, and exporting
2839         TextTrackCueGeneric for testing.
2840
2841         Drive-by fixes:
2842
2843         Add runtime logging to MediaControlTextTrackContainerElement. This necessitates modifying the
2844         parentMediaElement() method to take a const Node*, and const_cast that constness away in order to return
2845         a HTMLMediaElement*
2846
2847         TextTrackCue, VTTCue, TextTrackCueGeneric, and DataCue should all use the WTF TypeCasts macros to
2848         enable use of is<> and downcast<>.
2849
2850         * Source/WebCore/CMakeLists.txt:
2851         * DerivedSources-input.xcfilelist:
2852         * DerivedSources-output.xcfilelist:
2853         * DerivedSources.make:
2854         * WebCore.xcodeproj/project.pbxproj:
2855         * Sources.txt:
2856         * html/shadow/MediaControlElementTypes.cpp:
2857         (WebCore::parentMediaElement):
2858         * html/shadow/MediaControlElementTypes.h:
2859         * html/shadow/MediaControlElements.cpp:
2860         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
2861         (WebCore::MediaControlTextTrackContainerElement::logger const):
2862         (WebCore::MediaControlTextTrackContainerElement::logIdentifier const):
2863         (WebCore::MediaControlTextTrackContainerElement::logChannel const):
2864         * html/shadow/MediaControlElements.h:
2865         * html/track/DataCue.h:
2866         (isType):
2867         * html/track/TextTrackCueGeneric.h:
2868         (isType):
2869         * html/track/TextTrackCueGeneric.idl: Added.
2870         * html/track/VTTCue.h:
2871         (isType):
2872         * testing/Internals.cpp:
2873         (WebCore::Internals::createGenericCue):
2874         * testing/Internals.h:
2875         * testing/Internals.idl:
2876
2877 2019-04-09  Sihui Liu  <sihui_liu@apple.com>
2878
2879         Remove unnecessary network process assertion for IDB close
2880         https://bugs.webkit.org/show_bug.cgi?id=196693
2881
2882         Reviewed by Geoffrey Garen.
2883
2884         We already took assertion at WebCore::SQLiteDatabase::close.
2885
2886         * Modules/indexeddb/server/IDBServer.cpp:
2887         (WebCore::IDBServer::IDBServer::create):
2888         (WebCore::IDBServer::IDBServer::IDBServer):
2889         (WebCore::IDBServer::m_quotaManagerGetter): Deleted.
2890         (WebCore::IDBServer::IDBServer::closeDatabase): Deleted.
2891         (WebCore::IDBServer::IDBServer::didCloseDatabase): Deleted.
2892         * Modules/indexeddb/server/IDBServer.h:
2893         (WebCore::IDBServer::IDBServer::create): Deleted.
2894         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2895         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
2896         (WebCore::IDBServer::UniqueIDBDatabase::scheduleShutdownForClose):
2897         (WebCore::IDBServer::UniqueIDBDatabase::didShutdownForClose):
2898         (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
2899         (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):
2900         (WebCore::IDBServer::UniqueIDBDatabase::notifyServerAboutClose): Deleted.
2901         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2902
2903 2019-04-09  Eike Rathke  <erack@redhat.com>
2904
2905         Initialize trackTypeAsString for call to GST_INFO_OBJECT() in TrackType::Text
2906         https://bugs.webkit.org/show_bug.cgi?id=196350
2907
2908         Reviewed by Xabier Rodriguez-Calvar.
2909
2910         trackTypeAsString was uninitialized in the
2911         TrackPrivateBaseGStreamer::TrackType::Text case when calling
2912         GST_INFO_OBJECT().
2913
2914         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2915         (WebCore::MediaPlayerPrivateGStreamer::enableTrack):
2916
2917 2019-04-09  Carlos Garcia Campos  <cgarcia@igalia.com>
2918
2919         [ATK] Cleanup WebKitAccessibleHyperlink
2920         https://bugs.webkit.org/show_bug.cgi?id=196602
2921
2922         Reviewed by Michael Catanzaro.
2923
2924         Cleanups:
2925
2926          - Rename webkitAccessibleHyperlinkNew() as webkitAccessibleHyperlinkGetOrCreate() and move the code to get/set
2927            the object data here.
2928          - Use WEBKIT_DEFINE_TYPE instead of custom type registration. This ensures that all CStrings used in private
2929            struct are no longer leaked.
2930          - Remove all confusing core() functions and simply use webkitAccessibleGetAccessibilityObject().
2931          - Use nullptr instead of 0 and other coding style issues.
2932
2933         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
2934         (webkitAccessibleHyperlinkActionDoAction):
2935         (webkitAccessibleHyperlinkActionGetNActions):
2936         (webkitAccessibleHyperlinkActionGetDescription):
2937         (webkitAccessibleHyperlinkActionGetKeybinding):
2938         (webkitAccessibleHyperlinkActionGetName):
2939         (atk_action_interface_init):
2940         (webkitAccessibleHyperlinkGetURI):
2941         (webkitAccessibleHyperlinkGetObject):
2942         (rangeLengthForObject):
2943         (webkitAccessibleHyperlinkGetStartIndex):
2944         (webkitAccessibleHyperlinkGetEndIndex):
2945         (webkitAccessibleHyperlinkIsValid):
2946         (webkitAccessibleHyperlinkGetNAnchors):
2947         (webkitAccessibleHyperlinkIsSelectedLink):
2948         (webkitAccessibleHyperlinkGetProperty):
2949         (webkitAccessibleHyperlinkSetProperty):
2950         (webkit_accessible_hyperlink_class_init):
2951         (webkitAccessibleHyperlinkGetOrCreate):
2952         (core): Deleted.
2953         (atkActionInterfaceInit): Deleted.
2954         (getRangeLengthForObject): Deleted.
2955         (webkitAccessibleHyperlinkFinalize): Deleted.
2956         (webkitAccessibleHyperlinkClassInit): Deleted.
2957         (webkitAccessibleHyperlinkInit): Deleted.
2958         (webkitAccessibleHyperlinkGetType): Deleted.
2959         (webkitAccessibleHyperlinkNew): Deleted.
2960         (webkitAccessibleHyperlinkGetAccessibilityObject): Deleted.
2961         * accessibility/atk/WebKitAccessibleHyperlink.h:
2962         * accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp:
2963         (webkitAccessibleHyperlinkImplGetHyperlink):
2964         (webkitAccessibleHyperlinkImplInterfaceInit):
2965
2966 2019-04-08  Simon Fraser  <simon.fraser@apple.com>
2967
2968         Remove some iOS #ifdefs around sticky-related code
2969         https://bugs.webkit.org/show_bug.cgi?id=196726
2970
2971         Reviewed by Zalan Bujtas.
2972
2973         Now that async overflow scrolling can be enabled on macOS, RenderLayerCompositor::isAsyncScrollableStickyLayer()
2974         should not have iOS-only code.
2975
2976         The answer to the FIXME in RenderLayerCompositor::computeStickyViewportConstraints is obvious: composited
2977         overflow:scroll can be the container for sticky. The assertion can be removed.
2978
2979         * rendering/RenderLayer.cpp: Fix spacing in some logging.
2980         (WebCore::outputPaintOrderTreeRecursive):
2981         * rendering/RenderLayerCompositor.cpp:
2982         (WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer const):
2983         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints const):
2984
2985 2019-04-08  Don Olmstead  <don.olmstead@sony.com>
2986
2987         [CMake][WinCairo] Separate copied headers into different directories
2988         https://bugs.webkit.org/show_bug.cgi?id=196655
2989
2990         Reviewed by Michael Catanzaro.
2991
2992         * CMakeLists.txt:
2993         * PlatformWin.cmake:
2994
2995 2019-04-08  Chris Fleizach  <cfleizach@apple.com>
2996
2997         AX: Automatically compute accessibility labels for Apple Pay buttons
2998         https://bugs.webkit.org/show_bug.cgi?id=196661
2999
3000         Reviewed by Joanmarie Diggs.
3001
3002         Detect Apple Pay buttons and return a standard role and label for them based on their type.
3003
3004         Test: accessibility/mac/apple-pay-labels.html
3005               accessibility/mac/apple-pay-session-v4.html
3006
3007         * accessibility/AccessibilityNodeObject.cpp:
3008         (WebCore::AccessibilityNodeObject::isControl const):
3009         * accessibility/AccessibilityNodeObject.h:
3010         * accessibility/AccessibilityRenderObject.cpp:
3011         (WebCore::AccessibilityRenderObject::applePayButtonDescription const):
3012         (WebCore::AccessibilityRenderObject::titleElementText const):
3013         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
3014         (WebCore::AccessibilityRenderObject::isApplePayButton const):
3015         (WebCore::AccessibilityRenderObject::applePayButtonType const):
3016         * accessibility/AccessibilityRenderObject.h:
3017         * en.lproj/Localizable.strings:
3018         * platform/LocalizedStrings.cpp:
3019         (WebCore::AXApplePayPlainLabel):
3020         (WebCore::AXApplePayBuyLabel):
3021         (WebCore::AXApplePaySetupLabel):
3022         (WebCore::AXApplePayDonateLabel):
3023         (WebCore::AXApplePayCheckOutLabel):
3024         (WebCore::AXApplePayBookLabel):
3025         (WebCore::AXApplePaySubscribeLabel):
3026         * platform/LocalizedStrings.h:
3027
3028 2019-04-08  Chris Fleizach  <cfleizach@apple.com>
3029
3030         AX: Support API: accessibilityReplaceRange:withText
3031         https://bugs.webkit.org/show_bug.cgi?id=196636
3032
3033         Reviewed by Daniel Bates.
3034
3035         Support this platform API on mac to provide a way to replace a range of editable text.
3036
3037         Test: accessibility/mac/replace-text-with-range.html
3038
3039         * accessibility/AccessibilityObject.cpp:
3040         (WebCore::AccessibilityObject::replaceTextInRange):
3041         * accessibility/AccessibilityObject.h:
3042         * accessibility/mac/AccessibilityObjectBase.mm:
3043         (WebCore::PlainTextRange::PlainTextRange):
3044         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3045         (-[WebAccessibilityObjectWrapper accessibilityReplaceRange:withText:]):
3046
3047 2019-04-08  Wenson Hsieh  <wenson_hsieh@apple.com>
3048
3049         [iOS] Do not allow starting selection drags when selection views are not visible
3050         https://bugs.webkit.org/show_bug.cgi?id=196686
3051         <rdar://problem/49399192>
3052
3053         Reviewed by Tim Horton.
3054
3055         See WebKit ChangeLog for more details.
3056
3057         Tests:  DragAndDropTests.CanDragImageWhenNotFirstResponder
3058                 DragAndDropTests.DoNotPerformSelectionDragWhenNotFirstResponder
3059
3060         * page/DragController.cpp:
3061         (WebCore::DragController::draggableElement const):
3062
3063         Make this respect the case where m_dragSourceAction does not include DragSourceActionSelection. All the other
3064         drag source types are currently consulted in this method, with the exception of DragSourceActionSelection.
3065
3066 2019-04-08  Youenn Fablet  <youenn@apple.com>
3067
3068         Add a test to check for the service worker process name
3069         https://bugs.webkit.org/show_bug.cgi?id=196621
3070
3071         Reviewed by Chris Dumez.
3072
3073         Add a service worker internal API to get process name.
3074         Covered by updated test.
3075
3076         * WebCore.xcodeproj/project.pbxproj:
3077         * testing/ServiceWorkerInternals.cpp:
3078         (WebCore::ServiceWorkerInternals::processName const):
3079         * testing/ServiceWorkerInternals.h:
3080         * testing/ServiceWorkerInternals.idl:
3081         * testing/ServiceWorkerInternals.mm: Added.
3082
3083 2019-04-08  Yusuke Suzuki  <ysuzuki@apple.com>
3084
3085         Unreviewed, speculative fix for build failure in old macOS after r243887
3086         https://bugs.webkit.org/show_bug.cgi?id=196475
3087
3088         * dom/NodeList.h:
3089
3090 2019-04-08  Justin Fan  <justin_fan@apple.com>
3091
3092         [Web GPU] Fix Web GPU experimental feature on iOS
3093         https://bugs.webkit.org/show_bug.cgi?id=196632
3094
3095         Reviewed by Myles C. Maxfield.
3096
3097         Add feature conditionals for iOS 11.
3098         Properly make Web GPU available on iOS 11+.
3099
3100         * Configurations/FeatureDefines.xcconfig:
3101         * Configurations/WebKitTargetConditionals.xcconfig:
3102
3103 2019-04-08  Timothy Hatcher  <timothy@apple.com>
3104
3105         Unreviewed build fix for iOSMac after r243893.
3106         https://bugs.webkit.org/show_bug.cgi?id=196707
3107
3108         * dom/Element.cpp:
3109         (WebCore::parentCrossingFrameBoundaries): Remove ENABLE(POINTER_EVENTS) since computedTouchActions()
3110         no longer uses parentCrossingFrameBoundaries().
3111
3112 2019-04-08  Youenn Fablet  <youenn@apple.com>
3113
3114         Lazily construct Navigator serviceWorker
3115         https://bugs.webkit.org/show_bug.cgi?id=196692
3116
3117         Reviewed by Chris Dumez.
3118
3119         Make NavigatorBase a ContextDestructionObserver.
3120         This allows to get the navigator script execution context.
3121         Use it when creating the navigator ServiceWorkerContainer object.
3122         For GC, introduce serviceWorkerIfAny which returns the container if created.
3123         No JS observable change of behavior.
3124         Covered by existing tests.
3125
3126         * bindings/js/JSNavigatorCustom.cpp:
3127         (WebCore::JSNavigator::visitAdditionalChildren):
3128         * bindings/js/JSWorkerNavigatorCustom.cpp:
3129         (WebCore::JSWorkerNavigator::visitAdditionalChildren):
3130         * page/NavigatorBase.cpp:
3131         (WebCore::NavigatorBase::NavigatorBase):
3132         (WebCore::NavigatorBase::serviceWorkerIfAny):
3133         (WebCore::NavigatorBase::serviceWorker):
3134         * page/NavigatorBase.h:
3135
3136 2019-04-08  Antti Koivisto  <antti@apple.com>
3137
3138         Update touch-action region on property changes
3139         https://bugs.webkit.org/show_bug.cgi?id=196608
3140
3141         Reviewed by Simon Fraser.
3142
3143         Test: pointerevents/ios/touch-action-region-dynamic.html
3144
3145         * rendering/EventRegion.cpp:
3146         (WebCore::EventRegion::touchActionsForPoint const):
3147
3148         Correctly return 'auto' when nothing is found from the regions (this code is not used yet).
3149
3150         * rendering/RenderElement.cpp:
3151         (WebCore::RenderElement::styleWillChange):
3152
3153         React to 'touch-action' property changes, similarly to 'pointer-events'.
3154
3155         * rendering/RenderLayer.cpp:
3156         (WebCore::RenderLayer::invalidateEventRegion):
3157
3158         Test if need to invalidate.
3159
3160         * rendering/RenderLayerBacking.cpp:
3161         (WebCore::RenderLayerBacking::setContentsNeedDisplay):
3162         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
3163
3164         Call invalidateEventRegion explicitly instead of relying on compositing update. This ensures
3165         that we update the top level event region correctly when we have touch-actions.
3166
3167 2019-04-08  Javier Fernandez  <jfernandez@igalia.com>
3168
3169         Implement white-space:break-spaces value
3170         https://bugs.webkit.org/show_bug.cgi?id=177327
3171
3172         Reviewed by Myles Maxfield and Zalan Bujtas.
3173
3174         Finally the CSS WG decided [1] to move back the 'break-spaces' value to
3175         the 'white-space' property. This makes the parsing logic easier than
3176         the previous approach of using the 'overflow-wrap' property.
3177
3178         This new value prevents the white-space sequence to collapse and gives
3179         breaking opportunities after every preserved white-space.
3180
3181         https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces
3182
3183         Additionally, unlike 'pre-wrap', non-collapsible spaces or tabs at the
3184         end of a line cannot be hung or visually collapsed, since we want them
3185         to be preserved and broken.
3186
3187         [1] https://github.com/w3c/csswg-drafts/pull/2841
3188
3189         Tests: imported/w3c/web-platform-tests/css/css-text/overflow-wrap/overflow-wrap-break-word-008.html
3190                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-003.html
3191                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-009.html
3192
3193         * css/CSSPrimitiveValueMappings.h:
3194         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): New mapping for CSSVaueBreakSpaces.
3195         (WebCore::CSSPrimitiveValue::operator WhiteSpace const): New value BreakSpaces for the Whitespace enum.
3196         * css/CSSProperties.json: new 'break-spaces' value for the 'white-space' property.
3197         * css/CSSValueKeywords.in: new break-spaces keyword
3198         * css/parser/CSSParserFastPaths.cpp:
3199         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
3200         * rendering/SimpleLineLayout.cpp:  The SimpleLineLayut codepath must handle properly the new behavior of preserved whitespaces.
3201         (WebCore::SimpleLineLayout::LineState::hasTrailingWhitespace const): Require that m_trailingWhitespaceWidth being greater than zero.
3202         (WebCore::SimpleLineLayout::LineState::hasWhitespaceFragments const): New function to detect former whitespae fragments that could be breaking opportunities.
3203         (WebCore::SimpleLineLayout::removeTrailingWhitespace): The 'break-spaces' feature forbids to remove any trailing whitespace.
3204         (WebCore::SimpleLineLayout::firstFragment): We have now leading whitespace sequences comming from the previous line.
3205         (WebCore::SimpleLineLayout::createLineRuns): We should revert some breaking opportunities if others were formerly found in the line.
3206         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
3207         (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style): New style fields to determine whether the break-space feature is being used. Also split out the break-all and breal-all values.
3208         * rendering/SimpleLineLayoutTextFragmentIterator.h:
3209         * rendering/line/BreakingContext.h: Different codepath but similar changes to properly handle the new behavior of preserved whitespace.
3210         (WebCore::BreakingContext::BreakingContext): New class field to determine whether there are some whitespace that may prevent the word ot be broken.
3211         (WebCore::BreakingContext::handleText): New line-breaking logic to implement the break-spaces behavior.
3212         (WebCore::BreakingContext::trailingSpacesHang): Cases where the preserved breakspaces should hand or overflow.
3213         * rendering/style/RenderStyle.h:
3214         (WebCore::RenderStyle::collapseWhiteSpace): With break-spaces collapsing whitespaces is not allowed.
3215         (WebCore::RenderStyle::breakOnlyAfterWhiteSpace const): Add the WhiteSpace::BreakSpaces to this group.
3216         * rendering/style/RenderStyleConstants.h: A new constan added.
3217
3218 2019-04-08  Youenn Fablet  <youenn@apple.com>
3219
3220         LibWebRTCMediaEndpoint does not need to hop to the signaling thread to gather stats
3221         https://bugs.webkit.org/show_bug.cgi?id=196697
3222         <rdar://problem/47477113>
3223
3224         Reviewed by Eric Carlson.
3225
3226         It is not thread safe to use m_backend in another thread than the main thread.
3227         It is not useful anymore to hop to the signaling thread to gather stats.
3228         No change of behavior.
3229
3230         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
3231         (WebCore::LibWebRTCMediaEndpoint::getStats):
3232         (WebCore::LibWebRTCMediaEndpoint::gatherStatsForLogging):
3233
3234 2019-04-08  Antoine Quint  <graouts@apple.com>
3235
3236         [ Mac WK2 iOS Debug ] REGRESSION(r233667) Layout Test imported/w3c/web-platform-tests/web-animations/interfaces/DocumentTimeline/constructor.html is a flaky failure
3237         https://bugs.webkit.org/show_bug.cgi?id=195233
3238         <rdar://problem/48527231>
3239
3240         Reviewed by Dean Jackson.
3241
3242         We need to create the "main" document timeline (document.timeline) if it doesn't already exist and use its current time as a basis for any other DocumentTimeline instance.
3243
3244         * animation/DocumentTimeline.cpp:
3245         (WebCore::DocumentTimeline::currentTime):
3246
3247 2019-04-08  Antoine Quint  <graouts@apple.com>
3248
3249         [Web Animations] JS wrapper may be deleted while animation is yet to dispatch its finish event
3250         https://bugs.webkit.org/show_bug.cgi?id=196118
3251         <rdar://problem/46614137>
3252
3253         Reviewed by Chris Dumez.
3254
3255         Test: webanimations/js-wrapper-kept-alive.html
3256
3257         We need to teach WebAnimation to keep its JS wrapper alive if it's relevant or could become relevant again by virtue of having a timeline.
3258         We also need to ensure that the new implementation of hasPendingActivity() does not interfere with the ability of pages to enter the page
3259         cache when running animations.
3260
3261         * animation/WebAnimation.cpp:
3262         (WebCore::WebAnimation::canSuspendForDocumentSuspension const):
3263         (WebCore::WebAnimation::stop):
3264         (WebCore::WebAnimation::hasPendingActivity const):
3265         * animation/WebAnimation.h:
3266
3267 2019-04-08  Eric Liang  <ericliang@apple.com>
3268
3269         AX: <svg> elements with labels and no accessible contents are exposed as empty AXGroups
3270         https://bugs.webkit.org/show_bug.cgi?id=156774
3271
3272         Reviewed by Chris Fleizach.
3273
3274         Labelled SVGs without accessible descendants are exposed as AXImage rather than groups.
3275
3276         Unlabelled equivalents are not exposed. Otherwise, SVGs with accessible descendants are exposed as AXGroup. 
3277         Also added back functionalities from last patch of determining whether a SVG element should be ignored.
3278         
3279         Test: accessibility/svg-shape-labelled.html
3280
3281         * accessibility/AccessibilityRenderObject.cpp:
3282         (WebCore::AccessibilityRenderObject::updateRoleAfterChildrenCreation):
3283         * accessibility/AccessibilitySVGElement.cpp:
3284         (WebCore::AccessibilitySVGElement::computeAccessibilityIsIgnored const):
3285
3286 2019-04-08  Youenn Fablet  <youenn@apple.com>
3287
3288         Make sure UniqueIDBDatabaseConnection unregisters itself even if its database is gone
3289         https://bugs.webkit.org/show_bug.cgi?id=196651
3290
3291         Reviewed by Brady Eidson.
3292
3293         In UniqueIDBDatabase methods, many operations are refing the transaction
3294         so that it stays alive until a quota check decision is made.
3295         This extends the lifetime of the transaction which may be lasting
3296         longer than its database that may be cleared without waiting for the quota check decisions.
3297
3298         We therefore need to make sure that the transaction is cleaning itself correctly at destruction time.
3299
3300         Make sure that the transaction is unregistering itself from its IDBServer.
3301         To do so, the transaction keeps a weak ref to the IDBServer.
3302
3303         This is timing sensitive hence difficult to test.
3304
3305         * Modules/indexeddb/server/IDBServer.h:
3306         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
3307         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didAbortTransaction):
3308         Like done below for UniqueIDBDatabaseConnection::didCommitTransaction,
3309         add a check to ensure that either the database is we are in an error case.
3310         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
3311         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
3312         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::~UniqueIDBDatabaseTransaction):
3313         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
3314
3315 2019-04-08  Christopher Reid  <chris.reid@sony.com>
3316
3317         Undefined Behavior: m_experimentalImageMenuEnabled isn't initialized in HTMLImageElement when SERVICE_CONTROLS is disabled
3318         https://bugs.webkit.org/show_bug.cgi?id=196664
3319
3320         Reviewed by Ross Kirsling.
3321
3322         No observable change in behavior.
3323
3324         Initialize m_experimentalImageMenuEnabled regardless of ENABLE(SERVICE_CONTROLS)
3325
3326         * html/HTMLImageElement.cpp:
3327
3328 2019-04-08  Ryan Haddad  <ryanhaddad@apple.com>
3329
3330         Unreviewed, rolling out r243943.
3331
3332         Caused test262 failures.
3333
3334         Reverted changeset:
3335
3336         "[JSC] Filter DontEnum properties in
3337         ProxyObject::getOwnPropertyNames()"
3338         https://bugs.webkit.org/show_bug.cgi?id=176810
3339         https://trac.webkit.org/changeset/243943
3340
3341 2019-04-05  Sergio Villar Senin  <svillar@igalia.com>
3342
3343         [GTK][WPE] outlook.live.com displays old-fashioned UI
3344         https://bugs.webkit.org/show_bug.cgi?id=196642
3345
3346         Reviewed by Carlos Garcia Campos.
3347
3348         The new good looking UI is shown as long as pretend we're a Mac in the UA.
3349
3350         * platform/UserAgentQuirks.cpp:
3351         (WebCore::urlRequiresChromeBrowser):
3352
3353 2019-04-08  Carlos Garcia Campos  <cgarcia@igalia.com>
3354
3355         [ATK] Cleanup accessible wrapper base class
3356         https://bugs.webkit.org/show_bug.cgi?id=196601
3357
3358         Reviewed by Mario Sanchez Prada.
3359
3360         Cleanups:
3361
3362          - Rename WebKitAccessibleWrapperAtk cpp and header as WebKitAccessible for consistency with the class name.
3363          - Use WEBKIT_DEFINE_TYPE instead of custom type registration. This ensures that all CStrings used in private
3364            struct are no longer leaked.
3365          - Move core object pointer to the private struct.
3366          - Remove confusing core() function and simply get the core object from the private struct.
3367          - Use nullptr instead of 0 and other coding style issues.
3368          - Rename cacheAndReturnAtkProperty as webkitAccessibleCacheAndReturnAtkProperty and use WebKitAccessible as
3369            instance parameter.
3370          - Make webkitAccessibleGetAccessibilityObject() return a reference, since we use a fallback object on detach it
3371            never returns nullptr.
3372          - Move objectFocusedAndCaretOffsetUnignored() to WebKitAccessibleUtil.
3373
3374         * SourcesGTK.txt:
3375         * accessibility/atk/AXObjectCacheAtk.cpp:
3376         * accessibility/atk/WebKitAccessible.cpp: Renamed from Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp.
3377         (webkitAccessibleGetName):
3378         (webkitAccessibleGetDescription):
3379         (setAtkRelationSetFromCoreObject):
3380         (isRootObject):
3381         (webkitAccessibleGetParent):
3382         (webkitAccessibleGetNChildren):
3383         (webkitAccessibleRefChild):
3384         (webkitAccessibleGetIndexInParent):
3385         (webkitAccessibleGetAttributes):
3386         (atkRole):
3387         (webkitAccessibleGetRole):
3388         (webkitAccessibleRefStateSet):
3389         (webkitAccessibleRefRelationSet):
3390         (webkitAccessibleInit):
3391         (webkitAccessibleGetObjectLocale):
3392         (webkit_accessible_class_init):
3393         (interfaceMaskFromObject):
3394         (uniqueAccessibilityTypeName):
3395         (accessibilityTypeFromObject):
3396         (webkitAccessibleNew):
3397         (webkitAccessibleGetAccessibilityObject):
3398         (webkitAccessibleDetach):
3399         (webkitAccessibleIsDetached):
3400         (webkitAccessibleCacheAndReturnAtkProperty):
3401         * accessibility/atk/WebKitAccessible.h: Renamed from Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.h.
3402         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
3403         (core):
3404         * accessibility/atk/WebKitAccessibleInterfaceAction.cpp:
3405         (core):
3406         (webkitAccessibleActionGetKeybinding):
3407         (webkitAccessibleActionGetName):
3408         * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
3409         (core):
3410         * accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:
3411         (core):
3412         (documentAttributeValue):
3413         * accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp:
3414         (core):
3415         * accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp:
3416         (core):
3417         * accessibility/atk/WebKitAccessibleInterfaceImage.cpp:
3418         (core):
3419         (webkitAccessibleImageGetImageDescription):
3420         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
3421         (core):
3422         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
3423         (core):
3424         * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
3425         (core):
3426         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
3427         (core):
3428         * accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
3429         (core):
3430         * accessibility/atk/WebKitAccessibleUtil.cpp:
3431         (objectFocusedAndCaretOffsetUnignored):
3432         * accessibility/atk/WebKitAccessibleUtil.h:
3433         * editing/atk/FrameSelectionAtk.cpp:
3434
3435 2019-04-06  Antti Koivisto  <antti@apple.com>
3436
3437