[WPE] Use Widget bounds for PlatformScreen rectangle information
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2019-01-07  Zan Dobersek  <zdobersek@igalia.com>
2
3         [WPE] Use Widget bounds for PlatformScreen rectangle information
4         https://bugs.webkit.org/show_bug.cgi?id=193190
5
6         Reviewed by Philippe Normand.
7
8         Provide a better screen area estimate in screenRect() and
9         screenAvailableRect() return values than the current 1240x640 value by
10         using the Widget's bounds rectangle.
11
12         This approach is only factually correct when the Widget-associated view
13         is displayed in fullscreen, but it provides a better estimate even when
14         displayed in any other case as well. WPE doesn't provide specific API
15         that could enable the embedding environment to provide this information.
16
17         * platform/wpe/PlatformScreenWPE.cpp:
18         (WebCore::screenRect): Return bounds of the Widget object.
19         (WebCore::screenAvailableRect): Relay the call to screenRect().
20
21 2019-01-07  Zan Dobersek  <zdobersek@igalia.com>
22
23         Make Gradient::gradientSpaceTransform(), Pattern::patternSpaceTransform() methods const
24         https://bugs.webkit.org/show_bug.cgi?id=193189
25
26         Reviewed by Philippe Normand.
27
28         The transform getter methods on the Gradient and Pattern classes both
29         return const references to the transform objects, and don't modify any
30         internal state. They should be marked const accordingly, allowing
31         invocations of these two methods through const references to Gradient
32         and Pattern objects.
33
34         * platform/graphics/Gradient.h:
35         (WebCore::Gradient::gradientSpaceTransform): Now const.
36         * platform/graphics/Pattern.h:
37         (WebCore::Pattern::patternSpaceTransform): Now const.
38
39 2019-01-07  Zan Dobersek  <zdobersek@igalia.com>
40
41         REGRESSION(r239636): ImageDecoder::setEncodedDataStatusChangeCallback() can be called on a null decoder
42         https://bugs.webkit.org/show_bug.cgi?id=193187
43
44         Reviewed by Philippe Normand.
45
46         * platform/graphics/ImageSource.cpp:
47         (WebCore::ImageSource::ensureDecoderAvailable): Bail before calling the
48         setEncodedDataStatusChangeCallback() method when the returned
49         ImageDecoder object is null.
50
51 2019-01-06  Zan Dobersek  <zdobersek@igalia.com>
52
53         [Nicosia] Take over CoordinatedGraphics-named implementation of async scrolling classes
54         https://bugs.webkit.org/show_bug.cgi?id=193133
55
56         Reviewed by Michael Catanzaro.
57
58         Move the CoordinatedGraphics-specific files under
59         page/scrolling/coordinatedgraphics/ to page/scrolling/nicosia/, along
60         with renaming the files and classes accordingly. Implementation will
61         only depend on the Nicosia-specific layer structure and is not specific
62         to the CoordinatedGraphics system.
63
64         * PlatformPlayStation.cmake:
65         * SourcesGTK.txt:
66         * SourcesWPE.txt:
67         * page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp.
68         * page/scrolling/nicosia/ScrollingCoordinatorNicosia.h: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h.
69         * page/scrolling/nicosia/ScrollingStateNodeNicosia.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingStateNodeCoordinatedGraphics.cpp.
70         * page/scrolling/nicosia/ScrollingTreeFixedNode.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeFixedNode.cpp.
71         * page/scrolling/nicosia/ScrollingTreeFixedNode.h: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeFixedNode.h.
72         * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeFrameScrollingNodeCoordinatedGraphics.cpp.
73         * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeFrameScrollingNodeCoordinatedGraphics.h.
74         * page/scrolling/nicosia/ScrollingTreeNicosia.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeCoordinatedGraphics.cpp.
75         * page/scrolling/nicosia/ScrollingTreeNicosia.h: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeCoordinatedGraphics.h.
76         * page/scrolling/nicosia/ScrollingTreeStickyNode.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeStickyNode.cpp.
77         * page/scrolling/nicosia/ScrollingTreeStickyNode.h: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeStickyNode.h.
78         * platform/TextureMapper.cmake:
79
80 2019-01-06  Jiewen Tan  <jiewen_tan@apple.com>
81
82         [WebAuthN] Import U2F command/response converters from Chromium
83         https://bugs.webkit.org/show_bug.cgi?id=193150
84         <rdar://problem/47054028>
85
86         Reviewed by Brent Fulgham.
87
88         This patch imports Chromium's U2F command/response converters:
89         https://fidoalliance.org/specs/fido-v2.0-id-20180227/fido-client-to-authenticator-protocol-v2.0-id-20180227.html#u2f-interoperability
90         1. It directly imports the following files and suit them to WebKit's coding style:
91         https://cs.chromium.org/chromium/src/device/fido/u2f_command_constructor.cc?l=1&rcl=db624110317d01efa78cd32e7be1524190e1beb0
92         https://cs.chromium.org/chromium/src/device/fido/u2f_command_constructor.h?rcl=db624110317d01efa78cd32e7be1524190e1beb0
93         https://cs.chromium.org/chromium/src/device/fido/u2f_command_constructor_unittest.cc?rcl=db624110317d01efa78cd32e7be1524190e1beb0
94         2. It gathers the following methods into U2fResponseConverter:
95         AuthenticatorMakeCredentialResponse::CreateFromU2fRegisterResponse()
96         AuthenticatorGetAssertionResponse::CreateFromU2fSignResponse()
97         3. It also updates FidoConstants.h, FidoTestData.h and CtapResponseTest.cpp accordingly.
98
99         Besides importing stuff from Chroimum, it also gathers a bunch of constants and helper functions into WebAuthenticationConstants.h
100         and WebAuthenticationUtils.h. It also fixes Bug 183534: 2) and 7).
101
102         Covered by API tests.
103
104         * Modules/webauthn/AuthenticatorCoordinator.cpp:
105         (WebCore::AuthenticatorCoordinatorInternal::produceClientDataJsonHash):
106         * Modules/webauthn/WebAuthenticationConstants.h: Copied from Source/WebCore/Modules/webauthn/COSEConstants.h.
107         * Modules/webauthn/WebAuthenticationUtils.cpp: Added.
108         (WebCore::convertBytesToVector):
109         (WebCore::produceRpIdHash):
110         (WebCore::encodeES256PublicKeyAsCBOR):
111         (WebCore::buildAttestedCredentialData):
112         (WebCore::buildAuthData):
113         (WebCore::buildAttestationObject):
114         * Modules/webauthn/WebAuthenticationUtils.h: Renamed from Source/WebCore/Modules/webauthn/COSEConstants.h.
115         * Modules/webauthn/fido/DeviceResponseConverter.cpp:
116         (fido::getCredentialId):
117         (fido::readCTAPGetInfoResponse):
118         * Modules/webauthn/fido/FidoConstants.h:
119         * Modules/webauthn/fido/U2fCommandConstructor.cpp: Added.
120         (fido::WebCore::constructU2fRegisterCommand):
121         (fido::WebCore::constructU2fSignCommand):
122         (fido::isConvertibleToU2fRegisterCommand):
123         (fido::isConvertibleToU2fSignCommand):
124         (fido::convertToU2fRegisterCommand):
125         (fido::convertToU2fCheckOnlySignCommand):
126         (fido::convertToU2fSignCommand):
127         (fido::constructBogusU2fRegistrationCommand):
128         * Modules/webauthn/fido/U2fCommandConstructor.h: Added.
129         * Modules/webauthn/fido/U2fResponseConverter.cpp: Added.
130         (fido::WebCore::extractECPublicKeyFromU2fRegistrationResponse):
131         (fido::WebCore::extractCredentialIdFromU2fRegistrationResponse):
132         (fido::WebCore::createAttestedCredentialDataFromU2fRegisterResponse):
133         (fido::WebCore::parseX509Length):
134         (fido::WebCore::createFidoAttestationStatementFromU2fRegisterResponse):
135         (fido::readU2fRegisterResponse):
136         (fido::readFromU2fSignResponse):
137         * Modules/webauthn/fido/U2fResponseConverter.h: Added.
138         * Modules/webgpu/WebGPUCommandBuffer.cpp:
139         * Sources.txt:
140         * WebCore.xcodeproj/project.pbxproj:
141
142 2019-01-06  David Kilzer  <ddkilzer@apple.com>
143
144         Leak of WTF::Function objects in WebCore::CryptoKeyRSA::generatePair() (64-80 bytes each) in com.apple.WebKit.WebContent running WebKit layout tests
145         <https://webkit.org/b/193177>
146         <rdar://problem/47072196>
147
148         Reviewed by Saam Barati.
149
150         * crypto/mac/CryptoKeyRSAMac.cpp:
151         (WebCore::CryptoKeyRSA::generatePair): Fix the leak by changing
152         raw pointers to heap-allocated __block variables to hold the
153         WTF::Function objects until they are consumed within the block
154         passed to dispatch_async().  The __block variables act like
155         captured variables in a C++ lambda and have the same lifetime as
156         the block that they are captured in.  Note that we would have to
157         convert the source file from C++ to Objective-C++ to use a C++
158         lambda functor with dispatch_async(), which creates its own
159         issue because the comipiler requires a copy constructor to
160         convert the C++ lambda to a block functor, but the copy
161         constructor for the C++ lambda is implicitly deleted because the
162         WTF::Function copy constructor is explicitly deleted.  Whew!
163
164 2019-01-06  Pablo Saavedra  <psaavedra@igalia.com>
165
166         [WPE][GTK] Building with ENABLE_VIDEO=OFF fails trying to use Document MediaPlayback functions.
167         https://bugs.webkit.org/show_bug.cgi?id=193174
168
169         Reviewed by Michael Catanzaro.
170
171         * page/Page.cpp:
172         (WebCore::Page::stopAllMediaPlayback):
173         (WebCore::Page::suspendAllMediaPlayback):
174         (WebCore::Page::resumeAllMediaPlayback):
175
176 2019-01-05  David Kilzer  <ddkilzer@apple.com>
177
178         Leak of two CCRSACryptorRef (4.0 Kbytes/1 page each) in com.apple.WebKit.WebContent running WebKit layout tests
179         <https://webkit.org/b/193154>
180         <rdar://problem/47052993>
181
182         Reviewed by Brent Fulgham.
183
184         Broadly:
185         - Fix leaks by switching from using raw pointers to using
186           std::unique_ptr<>.
187         - Introduce PlatformRSAKeyContainer type to handle different
188           std::unique_ptr<> on each platform.
189         - Get rid of custom CryptoKeyRSA destructors since the
190           std::unique_ptr<> handles that with a Deleter.
191         - Initialize stack variables to nullptr.
192
193         * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
194         (WebCore::CryptoKeyRSA::create):
195         (WebCore::CryptoKeyRSA::CryptoKeyRSA):
196         (WebCore::CryptoKeyRSA::keySizeInBits const):
197         (WebCore::CryptoKeyRSA::generatePair):
198         (WebCore::CryptoKeyRSA::importSpki):
199         (WebCore::CryptoKeyRSA::importPkcs8):
200         (WebCore::CryptoKeyRSA::exportSpki const):
201         (WebCore::CryptoKeyRSA::exportPkcs8 const):
202         (WebCore::CryptoKeyRSA::algorithm const):
203         (WebCore::CryptoKeyRSA::exportData const):
204         (WebCore::CryptoKeyRSA::~CryptoKeyRSA): Deleted.
205         * crypto/keys/CryptoKeyRSA.h:
206         (WebCore::CCRSACryptorRefDeleter::operator() const):
207         * crypto/mac/CryptoKeyRSAMac.cpp:
208         (WebCore::getPublicKeyComponents):
209         (WebCore::getPrivateKeyComponents):
210         (WebCore::CryptoKeyRSA::CryptoKeyRSA):
211         (WebCore::CryptoKeyRSA::create):
212         (WebCore::CryptoKeyRSA::exportData const):
213         (WebCore::CryptoKeyRSA::generatePair):
214         (WebCore::CryptoKeyRSA::importSpki):
215         (WebCore::CryptoKeyRSA::importPkcs8):
216         (WebCore::CryptoKeyRSA::~CryptoKeyRSA): Deleted.
217
218 2019-01-05  Zalan Bujtas  <zalan@apple.com>
219
220         Incorrect clipping across compositing boundary.
221         https://bugs.webkit.org/show_bug.cgi?id=193172
222         <rdar://problem/44693008>
223
224         Reviewed by Simon Fraser.
225
226         Use temporary cliprect type when crossing compositing boundary to prevent cliprect caching.
227
228         The issue here is that RenderLayer::backgroundClipRect() could cross compositing boundary by calling parentClipRects() which triggers
229         clip rect update using the wrong painting root. This happens when the layer hierarchy and the compositing context do not match.
230         For clip rect computation, we need to climb up on the layer hierarchy (calling parent layer's cliprect functions)
231         but we also need to make sure that the computed cliprects on any given layer are cached only when the painting root is correct.
232         It ensures that when we paint a layer (with the painting root as entry point), the cached cliprects are always based on its onw painting root. 
233
234         Test: compositing/clipping/cached-cliprect-with-compositing-boundary.html
235
236         * rendering/RenderLayer.cpp:
237         (WebCore::RenderLayer::calculateClipRects const):
238
239 2019-01-05  Youenn Fablet  <youenn@apple.com>
240
241         Service Worker fetch should obey its referrer policy
242         https://bugs.webkit.org/show_bug.cgi?id=193152
243
244         Reviewed by Chris Dumez.
245
246         Pass referrer policy retrieved when fetching the service worker script to the SWServer.
247         The SWServer then stores it persistently and sends it to the manager creating service workers.
248         This manager will then set the referrer policy on the dummy Document of the corresponding service worker.
249
250         Covered by rebased test.
251
252         * workers/WorkerScriptLoader.cpp:
253         (WebCore::WorkerScriptLoader::didReceiveResponse):
254         * workers/WorkerScriptLoader.h:
255         (WebCore::WorkerScriptLoader::referrerPolicy const):
256         * workers/service/SWClientConnection.cpp:
257         (WebCore::SWClientConnection::failedFetchingScript):
258         * workers/service/ServiceWorkerContainer.cpp:
259         (WebCore::ServiceWorkerContainer::jobFinishedLoadingScript):
260         * workers/service/ServiceWorkerContainer.h:
261         * workers/service/ServiceWorkerContextData.cpp:
262         (WebCore::ServiceWorkerContextData::isolatedCopy const):
263         * workers/service/ServiceWorkerContextData.h:
264         (WebCore::ServiceWorkerContextData::encode const):
265         (WebCore::ServiceWorkerContextData::decode):
266         * workers/service/ServiceWorkerFetchResult.h:
267         (WebCore::ServiceWorkerFetchResult::encode const):
268         (WebCore::ServiceWorkerFetchResult::decode):
269         * workers/service/ServiceWorkerJob.cpp:
270         (WebCore::ServiceWorkerJob::notifyFinished):
271         * workers/service/ServiceWorkerJobClient.h:
272         * workers/service/context/ServiceWorkerThreadProxy.cpp:
273         (WebCore::createPageForServiceWorker):
274         * workers/service/server/RegistrationDatabase.cpp:
275         (WebCore::recordsTableSchema):
276         (WebCore::RegistrationDatabase::doPushChanges):
277         (WebCore::RegistrationDatabase::importRecords):
278         * workers/service/server/SWServer.cpp:
279         (WebCore::SWServer::addRegistrationFromStore):
280         (WebCore::SWServer::updateWorker):
281         (WebCore::SWServer::installContextData):
282         * workers/service/server/SWServer.h:
283         * workers/service/server/SWServerJobQueue.cpp:
284         (WebCore::SWServerJobQueue::scriptFetchFinished):
285         * workers/service/server/SWServerWorker.cpp:
286         (WebCore::SWServerWorker::SWServerWorker):
287         (WebCore::SWServerWorker::contextData const):
288         * workers/service/server/SWServerWorker.h:
289
290 2019-01-04  Simon Fraser  <simon.fraser@apple.com>
291
292         Factor legacy WK1 code for fixed and scrolling layers into their own helper class
293         https://bugs.webkit.org/show_bug.cgi?id=193165
294
295         Reviewed by Frédéric Wang.
296
297         RenderLayerCompositor has some code to handle registration of viewport-constrained
298         and scrolling layers which is specific to iOS WK1. To reduce pollution, move this
299         into its own helper class called LegacyWebKitScrollingLayerCoordinator, which is only
300         allocated for iOS WK1.
301         
302         iOS WK1 never has a ScrollingCoordinator, so rather than the check for scrollingCoordinator(),
303         we know that we only made a LegacyWebKitScrollingLayerCoordinator when there's a platform widget
304         (i.e. WK1).
305         
306         * page/ChromeClient.h:
307         * rendering/RenderLayerCompositor.cpp:
308         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
309         (WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush):
310         (WebCore::RenderLayerCompositor::didFlushChangesForLayer):
311         (WebCore::RenderLayerCompositor::setIsInWindow):
312         (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking): No longer check the page cache state; now we
313         destroy the render tree of pages in the page cache, so we should never hit this code path.
314         (WebCore::RenderLayerCompositor::didAddScrollingLayer):
315         (WebCore::LegacyWebKitScrollingLayerCoordinator::registerAllViewportConstrainedLayers):
316         (WebCore::LegacyWebKitScrollingLayerCoordinator::unregisterAllViewportConstrainedLayers):
317         (WebCore::scrollbarHasDisplayNone):
318         (WebCore::LegacyWebKitScrollingLayerCoordinator::updateScrollingLayer):
319         (WebCore::LegacyWebKitScrollingLayerCoordinator::registerAllScrollingLayers):
320         (WebCore::LegacyWebKitScrollingLayerCoordinator::registerScrollingLayersNeedingUpdate):
321         (WebCore::LegacyWebKitScrollingLayerCoordinator::unregisterAllScrollingLayers):
322         (WebCore::LegacyWebKitScrollingLayerCoordinator::addScrollingLayer):
323         (WebCore::LegacyWebKitScrollingLayerCoordinator::removeScrollingLayer):
324         (WebCore::LegacyWebKitScrollingLayerCoordinator::didFlushChangesForLayer):
325         (WebCore::updateScrollingLayerWithClient): Deleted.
326         (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers): Deleted.
327         (WebCore::RenderLayerCompositor::unregisterAllViewportConstrainedLayers): Deleted.
328         (WebCore::RenderLayerCompositor::registerAllScrollingLayers): Deleted.
329         (WebCore::RenderLayerCompositor::unregisterAllScrollingLayers): Deleted.
330         * rendering/RenderLayerCompositor.h:
331         (WebCore::LegacyWebKitScrollingLayerCoordinator::LegacyWebKitScrollingLayerCoordinator):
332         * workers/service/ServiceWorkerContainer.cpp:
333         (WebCore::ServiceWorkerContainer::~ServiceWorkerContainer):
334
335 2019-01-05  Zalan Bujtas  <zalan@apple.com>
336
337         [LFC] VerticalMargin should only have the used values.
338         https://bugs.webkit.org/show_bug.cgi?id=193168
339
340         Reviewed by Antti Koivisto.
341
342         Split VerticalMargin into ComputedVerticalMargin and UsedVerticalMargin.
343         ComputedVerticalMargin holds the computed (optional) values while UsedVerticalMargin holds both the
344         collapsed (optional) and the non-collapsed values.
345
346         * layout/FormattingContext.cpp:
347         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):
348         * layout/FormattingContext.h:
349         * layout/FormattingContextGeometry.cpp:
350         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
351         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
352         (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
353         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin):
354         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
355         (WebCore::Layout::FormattingContext::Geometry::computedVerticalMargin):
356         (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedVerticalMarginValue): Deleted.
357         * layout/FormattingContextQuirks.cpp:
358         (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
359         * layout/LayoutUnits.h:
360         * layout/MarginTypes.h:
361         (WebCore::Layout::UsedVerticalMargin::before const):
362         (WebCore::Layout::UsedVerticalMargin::after const):
363         (WebCore::Layout::UsedVerticalMargin::nonCollapsedValues const):
364         (WebCore::Layout::UsedVerticalMargin::collapsedValues const):
365         (WebCore::Layout::UsedVerticalMargin::hasCollapsedValues const):
366         (WebCore::Layout::UsedVerticalMargin::setCollapsedValues):
367         (WebCore::Layout::UsedVerticalMargin::UsedVerticalMargin):
368         (WebCore::Layout::VerticalMargin::nonCollapsedValues const): Deleted.
369         (WebCore::Layout::VerticalMargin::collapsedValues const): Deleted.
370         (WebCore::Layout::VerticalMargin::setCollapsedValues): Deleted.
371         (WebCore::Layout::VerticalMargin::VerticalMargin): Deleted.
372         (WebCore::Layout::VerticalMargin::usedValues const): Deleted.
373         * layout/blockformatting/BlockFormattingContext.cpp:
374         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):
375         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
376         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
377         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
378         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
379         (WebCore::Layout::BlockFormattingContext::Quirks::stretchedHeight):
380         * layout/blockformatting/BlockMarginCollapse.cpp:
381         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginBefore):
382         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginAfter):
383         * layout/displaytree/DisplayBox.h:
384         (WebCore::Display::Box::setVerticalMargin):
385         (WebCore::Display::Box::verticalMargin const):
386         (WebCore::Display::Box::marginBefore const):
387         (WebCore::Display::Box::marginAfter const):
388         * layout/floats/FloatingContext.cpp:
389         (WebCore::Layout::FloatingContext::verticalPositionWithClearance const):
390         * layout/inlineformatting/InlineFormattingContext.cpp:
391         (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin const):
392
393 2019-01-04  Daniel Bates  <dabates@apple.com>
394
395         REGRESSION (r238522): Erratic scrolling on Google flights search result page and vrbo.com
396         https://bugs.webkit.org/show_bug.cgi?id=192996
397         <rdar://problem/46573552>
398
399         Reviewed by Simon Fraser.
400
401         Only scroll a text field if its inner text size changes and it is the currently active and
402         focused element on the page.
403
404         Test: fast/scrolling/page-should-not-scroll-on-unfocused-text-field-layout.html
405
406         * rendering/RenderTextControlSingleLine.cpp:
407         (WebCore::RenderTextControlSingleLine::layout):
408
409 2019-01-04  Alex Christensen  <achristensen@webkit.org>
410
411         Progress towards fixing Mac CMake build
412         https://bugs.webkit.org/show_bug.cgi?id=193105
413
414         Reviewed by Don Olmstead.
415
416         * PlatformMac.cmake:
417         * Sources.txt:
418         * SourcesCocoa.txt:
419         * WebCore.xcodeproj/project.pbxproj:
420         * platform/graphics/gpu/GPURenderPassEncoder.h:
421
422 2019-01-04  Zalan Bujtas  <zalan@apple.com>
423
424         [iOS] ERROR: post-layout: dirty renderer(s) in WebCore::RenderTreeNeedsLayoutChecker::~RenderTreeNeedsLayoutChecker()
425         https://bugs.webkit.org/show_bug.cgi?id=189608
426         <rdar://problem/44473299>
427
428         Reviewed by Simon Fraser.
429
430         When a frameset/iframe is hidden and we skip layout, clear the dirty flag on its subtree as well.
431
432         Covered by fast/frames/invalid-frameset.html.
433
434         * rendering/RenderFrameSet.cpp:
435         (WebCore::clearSiblingSubtrees):
436         (WebCore::RenderFrameSet::positionFrames):
437         (WebCore::RenderFrameSet::positionFramesWithFlattening):
438
439 2019-01-04  Youenn Fablet  <youenn@apple.com>
440
441         [Fetch API] Implement abortable fetch
442         https://bugs.webkit.org/show_bug.cgi?id=174980
443         <rdar://problem/46861402>
444
445         Reviewed by Chris Dumez.
446
447         Add an AbortSignal to FetchRequest.
448
449         Add support for AbortSignal algorithm.
450         The fetch request signal is added an algorithm to abort the fetch.
451         Update clone algorithm to let signal of the cloned request be following the origin request.
452
453         Update ReadableStream error handling to return an exception instead of a string.
454         This allows passing an AbortError instead of a TypeError as previously done.
455
456         Update FetchBodyOwner to store a loading error either as an exception or as a resource error.
457         The latter is used for passing the error from service worker back to the page.
458         The former is used to pass it to ReadableStream or body accessors.
459
460         Covered by enabled tests.
461
462         * Modules/cache/DOMCache.cpp:
463         (WebCore::DOMCache::put):
464         * Modules/fetch/FetchBody.cpp:
465         (WebCore::FetchBody::consumeAsStream):
466         (WebCore::FetchBody::loadingFailed):
467         * Modules/fetch/FetchBody.h:
468         * Modules/fetch/FetchBodyConsumer.cpp:
469         (WebCore::FetchBodyConsumer::loadingFailed):
470         * Modules/fetch/FetchBodyConsumer.h:
471         * Modules/fetch/FetchBodyOwner.cpp:
472         (WebCore::FetchBodyOwner::arrayBuffer):
473         (WebCore::FetchBodyOwner::blob):
474         (WebCore::FetchBodyOwner::cloneBody):
475         (WebCore::FetchBodyOwner::formData):
476         (WebCore::FetchBodyOwner::json):
477         (WebCore::FetchBodyOwner::text):
478         (WebCore::FetchBodyOwner::loadBlob):
479         (WebCore::FetchBodyOwner::blobLoadingFailed):
480         (WebCore::FetchBodyOwner::consumeBodyAsStream):
481         (WebCore::FetchBodyOwner::setLoadingError):
482         * Modules/fetch/FetchBodyOwner.h:
483         (WebCore::FetchBodyOwner::loadingError const):
484         (WebCore::FetchBodyOwner::loadingException const):
485         * Modules/fetch/FetchBodySource.cpp:
486         (WebCore::FetchBodySource::error):
487         * Modules/fetch/FetchBodySource.h:
488         * Modules/fetch/FetchRequest.cpp:
489         (WebCore::FetchRequest::initializeWith):
490         (WebCore::FetchRequest::clone):
491         * Modules/fetch/FetchRequest.h:
492         (WebCore::FetchRequest::FetchRequest):
493         * Modules/fetch/FetchRequest.idl:
494         * Modules/fetch/FetchRequestInit.h:
495         (WebCore::FetchRequestInit::hasMembers const):
496         * Modules/fetch/FetchRequestInit.idl:
497         * Modules/fetch/FetchResponse.cpp:
498         (WebCore::FetchResponse::clone):
499         (WebCore::FetchResponse::fetch):
500         (WebCore::FetchResponse::BodyLoader::didFail):
501         * Modules/fetch/FetchResponse.h:
502         * bindings/js/ReadableStreamDefaultController.h:
503         (WebCore::ReadableStreamDefaultController::error):
504         * dom/AbortSignal.cpp:
505         (WebCore::AbortSignal::abort):
506         (WebCore::AbortSignal::follow):
507         * dom/AbortSignal.h:
508
509 2019-01-04  Brent Fulgham  <bfulgham@apple.com>
510
511         Parsed protocol of javascript URLs with embedded newlines and carriage returns do not match parsed protocol in Chrome and Firefox
512         https://bugs.webkit.org/show_bug.cgi?id=193155
513         <rdar://problem/40230982>
514
515         Reviewed by Chris Dumez.
516
517         Test: fast/loader/comment-only-javascript-url.html
518
519         Make a special case for URLs beginning with 'javascript:'. We should always
520         treat these as JS URLs, even if the content contained within the URL
521         string might match other parts of the URL parsing spec.
522
523         * html/URLUtils.h:
524         (WebCore::URLUtils<T>::protocol const):
525
526 2019-01-04  Jer Noble  <jer.noble@apple.com>
527
528         [WebKitLegacy] Media playback pauses on scroll
529         https://bugs.webkit.org/show_bug.cgi?id=192829
530
531         Reviewed by Eric Carlson.
532
533         New API tests:
534             WebKitLegacy.ScrollingDoesNotPauseMedia
535             WKWebView.StopAllMediaPlayback
536             WKWebView.SuspendResumeAllMediaPlayback
537
538         Do not use suspendActiveDOMObjects(ReasonForSuspension::PageWillBeSuspended) to pause
539         video. Roll back the changes to HTMLMediaElement, and introduce a new set of Page calls
540         suspendAllMediaPlayback() & resumeAllMediaPlayback() which replaces the removed bahavior.
541
542         * dom/Document.cpp:
543         (WebCore::Document::~Document):
544         (WebCore::Document::stopAllMediaPlayback):
545         (WebCore::Document::suspendAllMediaPlayback):
546         (WebCore::Document::resumeAllMediaPlayback):
547         * dom/Document.h:
548         * html/HTMLMediaElement.cpp:
549         (WebCore::HTMLMediaElement::HTMLMediaElement):
550         (WebCore::HTMLMediaElement::parseAttribute):
551         (WebCore::HTMLMediaElement::didFinishInsertingNode):
552         (WebCore::HTMLMediaElement::setSrcObject):
553         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
554         (WebCore::HTMLMediaElement::suspend):
555         (WebCore::HTMLMediaElement::resume):
556         (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless const):
557         * html/HTMLMediaElement.h:
558         (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless const): Deleted.
559         * html/MediaElementSession.cpp:
560         (WebCore::MediaElementSession::playbackPermitted const):
561         * page/Page.cpp:
562         (WebCore::Page::stopAllMediaPlayback):
563         (WebCore::Page::suspendAllMediaPlayback):
564         (WebCore::Page::resumeAllMediaPlayback):
565         * page/Page.h:
566         (WebCore::Page::mediaPlaybackIsSuspended):
567         * platform/audio/PlatformMediaSession.h:
568         * platform/audio/PlatformMediaSessionManager.cpp:
569         (WebCore::PlatformMediaSessionManager::suspendAllMediaPlaybackForDocument):
570         (WebCore::PlatformMediaSessionManager::resumeAllMediaPlaybackForDocument):
571         * platform/audio/PlatformMediaSessionManager.h:
572
573 2019-01-04  Chris Dumez  <cdumez@apple.com>
574
575         Add support for toggling device orientation API support per site
576         https://bugs.webkit.org/show_bug.cgi?id=193143
577         <rdar://problem/46605724>
578
579         Reviewed by Alex Christensen.
580
581         Add support for toggling device orientation API support per site via _WKWebsitePolicies.
582
583         * dom/Document.cpp:
584         (WebCore::Document::simulateDeviceOrientationChange):
585         * dom/Document.h:
586         * loader/DocumentLoader.h:
587         (WebCore::DocumentLoader::deviceOrientationEventEnabled const):
588         (WebCore::DocumentLoader::setDeviceOrientationEventEnabled):
589         * page/DOMWindow.cpp:
590         (WebCore::DOMWindow::addEventListener):
591
592 2019-01-04  Jer Noble  <jer.noble@apple.com>
593
594         Web Content process main thread blocked beneath ImageDecoderAVFObjC::readSamples for many seconds on imgur.com
595         https://bugs.webkit.org/show_bug.cgi?id=191806
596         <rdar://problem/46151477>
597
598         Reviewed by Dean Jackson.
599
600         Test: http/tests/images/mp4-partial-load.html
601
602         Rather than use an AVAssetReaderTrackOutput, which will load both sample metadata and sample data
603         synchronously when a sample is requested, use AVAssetReaderSampleReferenceOutput, which only loads
604         sample metadata, including the byte offset and byte length of the sample data. By waiting until the
605         AVAsset signals that it's own metadata is loaded, we can safely parse all the sample metadata without
606         blocking on network loads. Once enough data is loaded, we can replace the byte reference and offset
607         attachements in the sample with actual data, and mark the sample as "complete".
608
609         Because the existing ImageSource assumes that image data parsing will occur synchronously, and that
610         synchronous parsing could cause a hang if the metadata is not loaded, add a new callback method which
611         allows the ImageSource to be notified when the encodedDataStatus changes. The ImageSource notifies the
612         CacheImage, which notifies the RenderImage, and thus the asynchronous parsing will kick off the
613         renderer's animation loop.
614
615         * loader/cache/CachedImage.cpp:
616         (WebCore::CachedImage::CachedImageObserver::encodedDataStatusChanged):
617         (WebCore::CachedImage::encodedDataStatusChanged):
618         * loader/cache/CachedImage.h:
619         * platform/graphics/ImageDecoder.h:
620         (WebCore::ImageDecoder::setEncodedDataStatusChangeCallback):
621         * platform/graphics/ImageObserver.h:
622         (WebCore::ImageObserver::encodedDataStatusChanged):
623         * platform/graphics/ImageSource.cpp:
624         (WebCore::ImageSource::ensureDecoderAvailable):
625         (WebCore::ImageSource::encodedDataStatusChanged):
626         (WebCore::ImageSource::frameDecodingStatusAtIndex):
627         * platform/graphics/ImageSource.h:
628         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h:
629         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
630         (-[WebCoreSharedBufferResourceLoaderDelegate data]):
631         (WebCore::ImageDecoderAVFObjCSample::byteRange const):
632         (WebCore::ImageDecoderAVFObjC::readSamples):
633         (WebCore::ImageDecoderAVFObjC::setEncodedDataStatusChangeCallback):
634         (WebCore::ImageDecoderAVFObjC::encodedDataStatus const):
635         (WebCore::ImageDecoderAVFObjC::frameIsCompleteAtIndex const):
636         (WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex):
637         (WebCore::ImageDecoderAVFObjC::sampleIsComplete const):
638
639 2019-01-04  Youenn Fablet  <youenn@apple.com>
640
641         CSP violation reports should bypass CSP checks
642         https://bugs.webkit.org/show_bug.cgi?id=192857
643         <rdar://problem/46887236>
644
645         Reviewed by Chris Dumez.
646
647         For ping loads, pass the option to do CSP checks from PingLoader to LoaderStrategy.
648         This new option is unused by WebKit Legacy.
649         It is used by WebKit loader strategy to only send any CSP response header to network process
650         in case CSP checks should be done.
651
652         This option is used to disable CSP checks for Ping Loads that report CSP violations.
653
654         Test: http/wpt/fetch/csp-reports-bypass-csp-checks.html
655
656         * loader/LoaderStrategy.h:
657         * loader/PingLoader.cpp:
658         (WebCore::PingLoader::loadImage):
659         (WebCore::PingLoader::sendPing):
660         (WebCore::PingLoader::sendViolationReport):
661         (WebCore::PingLoader::startPingLoad):
662         * loader/PingLoader.h:
663         * loader/cache/CachedResource.cpp:
664         (WebCore::CachedResource::load):
665
666 2019-01-04  Wenson Hsieh  <wenson_hsieh@apple.com>
667
668         [Cocoa] Merge WebEditCommandProxy::nameForEditAction and undoNameForEditAction into a single function
669         https://bugs.webkit.org/show_bug.cgi?id=193129
670
671         Reviewed by Tim Horton.
672
673         Adds a new helper function that returns the undo/redo name for a given EditAction. No change in behavior.
674
675         * Sources.txt:
676         * WebCore.xcodeproj/project.pbxproj:
677         * editing/EditAction.cpp: Copied from Source/WebKit/UIProcess/WebEditCommandProxy.cpp.
678         (WebCore::nameForUndoRedo):
679         * editing/EditAction.h:
680         * editing/Editor.cpp:
681
682 2019-01-03  Matt Rajca  <mrajca@apple.com>
683
684         Make DidPlayMediaPreventedFromPlaying autoplay event more generic.
685         https://bugs.webkit.org/show_bug.cgi?id=193128
686         rdar://34554231
687
688         Reviewed by Jer Noble.
689
690         Today, the "DidPlayMediaPreventedFromPlaying" autoplay event is only sent for
691         media prevented from autoplaying. It could be generalized to a "DidPlayMediaWithUserGesture"
692         event along with a flag that indicates whether or not autoplay was actually prevented.
693         Moreover, we can include a flag that indicates whether the media element in question
694         is main content. Clients will then know in more cases when media was played with a user
695         gesture, whether or not it has audio, as well as its main content status. While the main
696         content heuristics may not be perfect, they covered the top 20 video-centric websites that
697         this was tested with and are meant to be used by clients for data evaluation purposes.
698
699         As part of this, the PlaybackWithoutUserGesture enum was renamed to AutoplayEventPlaybackState
700         since it now also applies to cases where there is a user gesture. The
701         `m_playbackWithoutUserGestureStartedTime` member variable was also removed in favor of
702         `playbackStartedTime` which also covers all the cases we care about.
703
704         Tests: existing API tests were updated to reflect the new names. New API tests
705         were added for the new case in which the "DidPlayMediaWithUserGesture" event is sent.
706
707         * html/HTMLMediaElement.cpp:
708         (WebCore::convertEnumerationToString): Update to new enum cases.
709         (WebCore::HTMLMediaElement::setReadyState): Ditto.
710         (WebCore::HTMLMediaElement::play): Ditto.
711         (WebCore::HTMLMediaElement::playInternal): Also cover the case where
712          playback was not prevented but there was a user gesture.
713         (WebCore::HTMLMediaElement::pauseInternal): Use new name.
714         (WebCore::HTMLMediaElement::setVolume): Use new name.
715         (WebCore::HTMLMediaElement::playbackProgressTimerFired): Dispatch the
716          DidPlayMediaWithUserGesture event when playback was started with a user
717          gesture as well.
718         (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): Use new name.
719         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Ditto.
720         (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): Ditto.
721         (WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer): Ditto.
722         (WebCore::HTMLMediaElement::handleAutoplayEvent): Pass along new media state.
723         (WebCore::HTMLMediaElement::userDidInterfereWithAutoplay): Use new name.
724         (WebCore::HTMLMediaElement::setAutoplayEventPlaybackState): Stop setting
725          m_playbackWithoutUserGestureStartedTime in favor of using playbackStartedTime.
726         (WebCore::HTMLMediaElement::updateShouldPlay): Use new name.
727         (WebCore::HTMLMediaElement::setPlaybackWithoutUserGesture): Renamed.
728         * html/HTMLMediaElement.h:
729         (WTF::LogArgument<WebCore::HTMLMediaElement::AutoplayEventPlaybackState>::toString): Renamed from...
730         (WTF::LogArgument<WebCore::HTMLMediaElement::PlaybackWithoutUserGesture>::toString):
731         * html/MediaElementSession.cpp:
732         (WebCore::MediaElementSession::isMainContentForPurposesOfAutoplayEvents const): Don't
733          do the hit testing check for the purposes of autoplay events. It seems to fail on the
734          basic Vimeo player due to overlapping divs.
735         (WebCore::isElementMainContentForPurposesOfAutoplay):
736         (WebCore::MediaElementSession::updateIsMainContent const): Keep the existing behavior
737          here of hit testing.
738         (WebCore::isMainContentForPurposesOfAutoplay): Renamed.
739         * html/MediaElementSession.h:
740         * page/AutoplayEvent.h:
741
742 2019-01-04  Youenn Fablet  <youenn@apple.com>
743
744         Crash in WebCore::ServiceWorkerGlobalScope
745         https://bugs.webkit.org/show_bug.cgi?id=192513
746         <rdar://problem/46563880>
747
748         Reviewed by Alex Christensen.
749
750         Store the identifier in its own variable to make sure we do not use workerThread after being moved.
751
752         * workers/service/ServiceWorkerGlobalScope.cpp:
753         (WebCore::ServiceWorkerGlobalScope::skipWaiting):
754
755 2019-01-04  Chris Fleizach  <cfleizach@apple.com>
756
757         AX: String check: "Rule" does not reflect the meaning of the <hr> html tag
758         https://bugs.webkit.org/show_bug.cgi?id=193041
759         <rdar://problem/46954090>
760
761         Reviewed by Zalan Bujtas.
762
763         * en.lproj/Localizable.strings:
764         * platform/cocoa/LocalizedStringsCocoa.mm:
765         (WebCore::AXHorizontalRuleDescriptionText):
766
767 2019-01-04  Zalan Bujtas  <zalan@apple.com>
768
769         [LFC] ComputedHorizontalMargin should have optional members
770         https://bugs.webkit.org/show_bug.cgi?id=193131
771
772         Reviewed by Antti Koivisto.
773
774         Split HorizontalMargin into UsedHorizontalMargin and ComputedHorizontalMargin. ComputedHorizontalMargin's members are optional.
775         (see computed vs used values)
776
777         * layout/FormattingContext.h:
778         * layout/FormattingContextGeometry.cpp:
779         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
780         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
781         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
782         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
783         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
784         (WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin):
785         (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedHorizontalMarginValue): Deleted.
786         * layout/LayoutUnits.h:
787         * layout/MarginTypes.h:
788         * layout/Verification.cpp:
789         (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
790         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
791         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
792         * layout/displaytree/DisplayBox.h:
793         (WebCore::Display::Box::setHorizontalMargin):
794         (WebCore::Display::Box::setHorizontalComputedMargin):
795         (WebCore::Display::Box::computedMarginStart const):
796         (WebCore::Display::Box::computedMarginEnd const):
797         * layout/floats/FloatAvoider.h:
798         (WebCore::Layout::FloatAvoider::marginStart const):
799         (WebCore::Layout::FloatAvoider::marginEnd const):
800         * layout/inlineformatting/InlineFormattingContext.cpp:
801         (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
802         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
803         (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
804
805 2019-01-04  Zalan Bujtas  <zalan@apple.com>
806
807         [LFC][BFC] Use computedValue and usedValue consistently
808         https://bugs.webkit.org/show_bug.cgi?id=193059
809
810         Reviewed by Antti Koivisto.
811
812         https://www.w3.org/TR/CSS22/cascade.html#value-stages
813
814         6.1.2 Computed values
815         Specified values are resolved to computed values during the cascade; for example URIs are made absolute and 'em' and 'ex' units
816         are computed to pixel or absolute lengths. Computing a value never requires the user agent to render the document...
817
818         6.1.3 Used values
819         Computed values are processed as far as possible without formatting the document. Some values, however, can only be determined when the document
820         is being laid out. For example, if the width of an element is set to be a certain percentage of its containing block, the width cannot be determined
821         until the width of the containing block has been determined. The used value is the result of taking the computed value and resolving any remaining
822         dependencies into an absolute value.
823
824         * layout/FormattingContext.cpp:
825         (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const):
826         * layout/FormattingContextGeometry.cpp:
827         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
828         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
829         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
830         (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
831         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
832         * layout/LayoutState.cpp:
833         (WebCore::Layout::LayoutState::LayoutState):
834         * layout/LayoutUnits.h:
835         * layout/Verification.cpp:
836         (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
837         * layout/blockformatting/BlockFormattingContext.cpp:
838         (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const):
839         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
840         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
841         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin):
842         * layout/displaytree/DisplayBox.cpp:
843         (WebCore::Display::Box::Box):
844         * layout/displaytree/DisplayBox.h:
845         (WebCore::Display::Box::setHasValidHorizontalComputedMargin):
846         (WebCore::Display::Box::setHorizontalComputedMargin):
847         (WebCore::Display::Box::computedMarginStart const):
848         (WebCore::Display::Box::computedMarginEnd const):
849         (WebCore::Display::Box::setHasValidHorizontalNonComputedMargin): Deleted.
850         (WebCore::Display::Box::setHorizontalNonComputedMargin): Deleted.
851         (WebCore::Display::Box::nonComputedMarginStart const): Deleted.
852         (WebCore::Display::Box::nonComputedMarginEnd const): Deleted.
853         * layout/floats/FloatAvoider.h:
854         (WebCore::Layout::FloatAvoider::marginStart const):
855         (WebCore::Layout::FloatAvoider::marginEnd const):
856         * layout/inlineformatting/InlineFormattingContext.cpp:
857         (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin const):
858
859 2019-01-03  Zalan Bujtas  <zalan@apple.com>
860
861         REGRESSION: -webkit-appearance test case crashes
862         https://bugs.webkit.org/show_bug.cgi?id=189302
863         <rdar://problem/44143049>
864
865         Reviewed by Wenson Hsieh.
866
867         The painting and the layout positions of the cancel button need to match in order to be able to interact with it.
868         This patch removes the previous position inlining attempts.
869
870         Test: fast/forms/webkit-appearance-searchfield-cancel-button-crash.html
871
872         * rendering/RenderThemeMac.mm:
873         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
874
875 2019-01-03  David Kilzer  <ddkilzer@apple.com>
876
877         Leak of WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback (48 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
878         <https://webkit.org/b/193122>
879         <rdar://problem/47022987>
880
881         Reviewed by Youenn Fablet.
882
883         * Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp:
884         (WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback::AddRef const):
885         (WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback::Release const):
886         - Remove `final` keyword so that
887           `new rtc::RefCountedObject<RTCCertificateGeneratorCallback>()`
888           can be called.
889         (WebCore::LibWebRTCCertificateGenerator::generateCertificate):
890         - To fix the leak call
891           `new rtc::RefCountedObject<RTCCertificateGeneratorCallback>()`
892           to create the object.
893
894 2019-01-03  Simon Fraser  <simon.fraser@apple.com>
895
896         REGRESSION (r238090): After showing the Find banner or tab bar, hit tests are vertically offset (or painting is not offset)
897         https://bugs.webkit.org/show_bug.cgi?id=193124
898         rdar://problem/46755409
899
900         Reviewed by Tim Horton.
901
902         Top content inset feeds into scrolling tree geometry, so when it changes we need to trigger
903         an update of the root scrolling node, which happens via RenderLayerBacking::updateGeometry().
904         So set a dirty bit on the root layer in frameViewDidChangeSize(), which is called from the code
905         path that runs when top content inset changes.
906
907         Find banner behavior is not easily testable. platform/mac/fast/events/content-inset-hit-testing.html did not detect the regression.
908
909         * rendering/RenderLayerCompositor.cpp:
910         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
911
912 2019-01-03  Chris Dumez  <cdumez@apple.com>
913
914         Potential infinite recursion in isFrameFamiliarWith(Frame&, Frame&)
915         https://bugs.webkit.org/show_bug.cgi?id=192997
916         <rdar://problem/46217271>
917
918         Reviewed by Antti Koivisto.
919
920         isFrameFamiliarWith(Frame&, Frame&) was called recursively using the passed frames' openers.
921         The issue is that a Frame can be its opener. There could also be a cycle in the opener chain.
922
923         To address the issue, simplify isFrameFamiliarWith() so that it is no longer recursive. We now
924         only check if the frames belong to the same pages or if their openers do. We no longer check
925         openers' opener and up.
926
927         Note that this function is used to check if a frame is allowed to target another. In practice,
928         it is unlikely to be useful to navigate an opener's opener and an openee's openee.
929
930         Tests: fast/dom/Window/window-open-opener-cycle.html
931                fast/dom/Window/window-open-self-as-opener.html
932
933         * page/FrameTree.cpp:
934         (WebCore::isFrameFamiliarWith):
935
936 2019-01-02  Simon Fraser  <simon.fraser@apple.com>
937
938         REGRESSION (r239306): Don't disable font smoothing in transparent layers on macOS Mojave and later
939         https://bugs.webkit.org/show_bug.cgi?id=193095
940         <rdar://problem/47014944>
941
942         Reviewed by Zalan Bujtas.
943         
944         In r239306 we stopped making CALayers for font-smoothed text when not necessary on macOS Mojave
945         and later. However, we still turned off smoothing for non-opaque layers (setShouldSmoothFonts(false)),
946         which continues to affect the appearance of text.
947         
948         Fix by only calling setShouldSmoothFonts(false) when the OS supports font smoothing.
949
950         Test: compositing/contents-format/subpixel-antialiased-text.html
951
952         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
953         (WebCore::PlatformCALayer::drawLayerContents):
954
955 2019-01-02  David Kilzer  <ddkilzer@apple.com>
956
957         Leak of CMSampleBuffer (752 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
958         <https://webkit.org/b/193016>
959         <rdar://problem/46925703>
960
961         Reviewed by Simon Fraser.
962
963         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
964         (WebCore::copySampleBufferWithCurrentTimeStamp):
965         - Change to return RetainPtr<CMSampleBufferRef>.
966         - Check return value of CMSampleBufferCreateCopyWithNewTiming().
967         (WebCore::MediaRecorderPrivateWriter::appendVideoSampleBuffer):
968         - Check return value of copySampleBufferWithCurrentTimeStamp().
969         - Fix leak by using RetainPtr<CMSampleBufferRef> returned from
970           copySampleBufferWithCurrentTimeStamp() instead of leaking
971           `bufferWithCurrentTime` by using retainPtr().
972         (WebCore::createAudioFormatDescription):
973         - Extract method from appendAudioSampleBuffer() to return
974           RetainPtr<CMFormatDescriptionRef> after calling
975           CMAudioFormatDescriptionCreate().
976         - Check return value of CMAudioFormatDescriptionCreate().
977         (WebCore::createAudioSampleBufferWithPacketDescriptions):
978         - Extract method from appendAudioSampleBuffer() to return
979           RetainPtr<CMSampleBufferRef> after calling
980           CMAudioSampleBufferCreateWithPacketDescriptions().
981         (WebCore::MediaRecorderPrivateWriter::appendAudioSampleBuffer):
982         - Check return values of createAudioFormatDescription() and
983           createAudioSampleBufferWithPacketDescriptions().
984         - Fix leaks by extracting code into helper methods that return
985           RetainPtr<> objects instead of leaking CMFormatDescriptionRef
986           directly or leaking `sampleBuffer` by using retainPtr().
987
988 2019-01-02  Wenson Hsieh  <wenson_hsieh@apple.com>
989
990         Add support for using the current text selection as the find string on iOS
991         https://bugs.webkit.org/show_bug.cgi?id=193034
992         <rdar://problem/45138739>
993
994         Reviewed by Tim Horton.
995
996         Add support for "TakeFindStringFromSelection" on iOS. Unlike macOS, iOS does not have a notion of a "find
997         pasteboard" like macOS; instead, we handle this editing command by sending the selection string to the UI
998         process, where it is exposed via WebKit SPI so that clients that present find-in-page UI (i.e. MobileSafari) are
999         able to trigger find-in-page with this string.
1000
1001         Test: WebKit.UseSelectionAsFindString
1002
1003         * editing/Editor.cpp:
1004         (WebCore::Editor::canCopyExcludingStandaloneImages const):
1005
1006         Make this helper function cross-platform.
1007
1008         * editing/Editor.h:
1009         * editing/EditorCommand.cpp:
1010         (WebCore::createCommandMap):
1011         * editing/cocoa/EditorCocoa.mm:
1012         (WebCore::Editor::takeFindStringFromSelection):
1013
1014         Move this from EditorMac to EditorCocoa, and implement it on iOS by calling into the editor client to update the
1015         find string (see WebKit/ChangeLog for more details).
1016
1017         * editing/mac/EditorMac.mm:
1018         (WebCore::Editor::canCopyExcludingStandaloneImages): Deleted.
1019         (WebCore::Editor::takeFindStringFromSelection): Deleted.
1020         * loader/EmptyClients.cpp:
1021         * page/EditorClient.h:
1022
1023         Add a new editor client method to send the string for find-in-page to the UI process.
1024
1025 2019-01-02  Devin Rousso  <webkit@devinrousso.com>
1026
1027         Web Inspector: Implement `queryObjects` Command Line API
1028         https://bugs.webkit.org/show_bug.cgi?id=176766
1029         <rdar://problem/34890689>
1030
1031         Reviewed by Joseph Pecoraro.
1032
1033         Test: inspector/console/queryObjects.html
1034
1035         * inspector/CommandLineAPIModuleSource.js:
1036         (CommandLineAPI):
1037         (CommandLineAPIImpl.prototype.queryObjects): Added.
1038
1039 2019-01-02  Charles Vazac  <cvazac@gmail.com>
1040
1041         Fix resourcetimingbufferfull bubbles attribute
1042         https://bugs.webkit.org/show_bug.cgi?id=193087
1043
1044         Reviewed by Chris Dumez.
1045
1046         This change is covered by web-platform-tests [1].
1047
1048         [1] https://github.com/web-platform-tests/wpt/blob/master/resource-timing/buffer-full-when-populate-entries.html#L20
1049
1050         * page/Performance.cpp:
1051         (WebCore::Performance::resourceTimingBufferFullTimerFired):
1052
1053 2019-01-02  Simon Fraser  <simon.fraser@apple.com>
1054
1055         Rename LayerScrollCoordinationRole to ScrollCoordinationRole and make an enum class
1056         https://bugs.webkit.org/show_bug.cgi?id=193010
1057
1058         Reviewed by Zalan Bujtas.
1059
1060         Move the enum LayerScrollCoordinationRole from RenderLayer.h to RenderLayerCompositor.h,
1061         and make it an enum class.
1062
1063         * page/FrameView.cpp:
1064         (WebCore::FrameView::scrollLayerID const):
1065         * rendering/RenderLayer.h:
1066         * rendering/RenderLayerBacking.cpp:
1067         (WebCore::RenderLayerBacking::~RenderLayerBacking):
1068         (WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
1069         (WebCore::operator<<):
1070         * rendering/RenderLayerBacking.h:
1071         * rendering/RenderLayerCompositor.cpp:
1072         (WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus):
1073         (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers):
1074         (WebCore::scrollCoordinationRoleForNodeType):
1075         (WebCore::RenderLayerCompositor::attachScrollingNode):
1076         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
1077         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
1078         (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
1079         * rendering/RenderLayerCompositor.h:
1080
1081 2019-01-02  Simon Fraser  <simon.fraser@apple.com>
1082
1083         Don't spin up a CalcParser if the current token is not a function token
1084         https://bugs.webkit.org/show_bug.cgi?id=193067
1085
1086         Reviewed by Zalan Bujtas.
1087
1088         Various functions in CSSPropertyParserHelpers fall back to trying to parse
1089         a calc expression if the normal parsing fails. Don't do this unless the
1090         current token is a function token, which should be slightly more efficient.
1091
1092         * css/parser/CSSPropertyParserHelpers.cpp:
1093         (WebCore::CSSPropertyParserHelpers::consumeInteger):
1094         (WebCore::CSSPropertyParserHelpers::consumePositiveIntegerRaw):
1095         (WebCore::CSSPropertyParserHelpers::consumeNumberRaw):
1096         (WebCore::CSSPropertyParserHelpers::consumeNumber):
1097         (WebCore::CSSPropertyParserHelpers::consumeFontWeightNumber):
1098         (WebCore::CSSPropertyParserHelpers::consumeLength):
1099         (WebCore::CSSPropertyParserHelpers::consumePercent):
1100         (WebCore::CSSPropertyParserHelpers::consumeLengthOrPercent):
1101         (WebCore::CSSPropertyParserHelpers::consumeAngle):
1102         (WebCore::CSSPropertyParserHelpers::consumeAngleOrPercent):
1103         (WebCore::CSSPropertyParserHelpers::consumeTime):
1104
1105 2019-01-02  Simon Fraser  <simon.fraser@apple.com>
1106
1107         Support css-color-4 rgb functions
1108         https://bugs.webkit.org/show_bug.cgi?id=192321
1109
1110         Reviewed by Zalan Bujtas.
1111         
1112         Support the new rgb()/rgba() syntax described in https://drafts.csswg.org/css-color/#rgb-functions.
1113         The differences are:
1114         1. There is a new comma-free syntax, where the optional alpha is separated by a slash:
1115             rgb(128 34 56)
1116             rgb(128 34 56 / 50%)
1117         2. Floating point values are allowed, and rounded:
1118             rgb(128.5 34.2 56.5) becomes rgb(129 34 57)
1119         3. rgba() is a pure alias for rgb(), so these are equivalent:
1120             rgb(128 34 56 / 50%)
1121             rgba(128 34 56 / 50%)
1122             
1123         hsl()/hsla() parsing was already updated to this new syntax in r230861.
1124
1125         Tested by tests in imported/w3c/web-platform-tests/css/css-color/
1126
1127         * css/parser/CSSPropertyParserHelpers.cpp:
1128         (WebCore::CSSPropertyParserHelpers::clampRGBComponent):
1129         (WebCore::CSSPropertyParserHelpers::parseRGBParameters):
1130         (WebCore::CSSPropertyParserHelpers::parseColorFunction):
1131
1132 2019-01-02  Simon Fraser  <simon.fraser@apple.com>
1133
1134         Handle calc() expressions in gradient color stops
1135         https://bugs.webkit.org/show_bug.cgi?id=193066
1136         rdar://problem/46961985
1137
1138         Reviewed by Sam Weinig.
1139         
1140         Fix two issues that prevented calc() expressions from working in conic-gradient color stops,
1141         for the angle or percent value. First, consumeAngleOrPercent() needs to look for CalculationCategory::Percent
1142         calc values as well as angle ones.
1143
1144         Second, CSSPrimitiveValue::isAngle() needs to use primitiveType() (which takes calc into account),
1145         just as isPx() etc do.
1146
1147         Test: fast/gradients/conic-calc-stop-position.html
1148
1149         * css/CSSPrimitiveValue.h:
1150         (WebCore::CSSPrimitiveValue::isAngle const):
1151         * css/parser/CSSPropertyParserHelpers.cpp:
1152         (WebCore::CSSPropertyParserHelpers::consumeAngleOrPercent):
1153         (WebCore::CSSPropertyParserHelpers::consumeGradientColorStops):
1154
1155 2018-12-31  Keith Miller  <keith_miller@apple.com>
1156
1157         SourceProviders should use an actual URL instead of a string
1158         https://bugs.webkit.org/show_bug.cgi?id=192734
1159
1160         Reviewed by Yusuke Suzuki.
1161
1162         Remove ScriptSourceCode's URL member and make the url() method
1163         reference the URL on the SourceProvider. Also, avoid some
1164         ref count churn.
1165
1166         Additionally, this patch fixes an existing bug in
1167         WorkletGlobalScope() that would use a ScriptSourceCode after
1168         WTFMoving it.
1169
1170         * bindings/js/CachedScriptSourceProvider.h:
1171         (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
1172         * bindings/js/ScheduledAction.cpp:
1173         (WebCore::ScheduledAction::execute):
1174         * bindings/js/ScriptController.cpp:
1175         (WebCore::ScriptController::executeScriptInWorld):
1176         (WebCore::ScriptController::executeScript):
1177         * bindings/js/ScriptSourceCode.h:
1178         (WebCore::ScriptSourceCode::ScriptSourceCode):
1179         (WebCore::ScriptSourceCode::m_code):
1180         (WebCore::ScriptSourceCode::url const):
1181         (WebCore::ScriptSourceCode::m_url): Deleted.
1182         * dom/ScriptElement.cpp:
1183         (WebCore::ScriptElement::prepareScript):
1184         (WebCore::ScriptElement::requestModuleScript):
1185         (WebCore::ScriptElement::executePendingScript):
1186         * html/HTMLMediaElement.cpp:
1187         (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
1188         * page/Frame.cpp:
1189         (WebCore::Frame::injectUserScriptImmediately):
1190         * workers/WorkerGlobalScope.cpp:
1191         (WebCore::WorkerGlobalScope::importScripts):
1192         * workers/WorkerThread.cpp:
1193         (WebCore::WorkerThread::workerThread):
1194         * worklets/WorkletGlobalScope.cpp:
1195         (WebCore::WorkletGlobalScope::WorkletGlobalScope):
1196         * xml/parser/XMLDocumentParserLibxml2.cpp:
1197         (WebCore::XMLDocumentParser::endElementNs):
1198
1199 2019-01-01  Jeff Miller  <jeffm@apple.com>
1200
1201         Update user-visible copyright strings to include 2019
1202         https://bugs.webkit.org/show_bug.cgi?id=192811
1203
1204         Reviewed by Mark Lam.
1205
1206         * Info.plist:
1207
1208 2018-12-30  David Kilzer  <ddkilzer@apple.com>
1209
1210         clang-tidy: Save 8 padding bytes on WebCore::BorderEdge
1211         <https://webkit.org/b/193058>
1212         <rdar://problem/46979275>
1213
1214         Reviewed by Yusuke Suzuki.
1215
1216         * rendering/BorderEdge.cpp:
1217         (WebCore::BorderEdge::BorderEdge): Reorder initialization to
1218         match new instance variable order.
1219         * rendering/BorderEdge.h: Reorder instance variables to save
1220         8 padding bytes.
1221
1222 2018-12-28  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
1223
1224         [JSC] Remove one indirection in JSObject::toStringName
1225         https://bugs.webkit.org/show_bug.cgi?id=193037
1226
1227         Reviewed by Keith Miller.
1228
1229         Use old JSObject::toStringName function here.
1230
1231         * bindings/js/JSDOMConstructorBase.cpp:
1232         (WebCore::JSDOMConstructorBase::className):
1233         (WebCore::JSDOMConstructorBase::toStringName):
1234         * bindings/js/JSDOMConstructorBase.h:
1235         (WebCore::JSDOMConstructorBase::className): Deleted.
1236
1237 2018-12-27  Alex Christensen  <achristensen@webkit.org>
1238
1239         Resurrect Mac CMake build
1240         https://bugs.webkit.org/show_bug.cgi?id=192658
1241
1242         Reviewed by Yusuke Suzuki.
1243
1244         This makes it so JSC and most of WebCore builds.
1245         WebCore's use of ARC seems inconsistent, so I'll fix that later.
1246
1247         * PlatformMac.cmake:
1248         * config.h:
1249
1250 2018-12-26  Jim Mason  <jmason@ibinx.com>
1251
1252         [FreeType] Restore conditional compilation logic for recent HarfBuzz refactoring
1253         https://bugs.webkit.org/show_bug.cgi?id=193036
1254
1255         Reviewed by Michael Catanzaro.
1256
1257         * platform/graphics/FontPlatformData.h:
1258         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1259
1260 2018-12-24  Fujii Hironori  <Hironori.Fujii@sony.com>
1261
1262         Remove "using namespace std;"
1263         https://bugs.webkit.org/show_bug.cgi?id=192973
1264         <rdar://problem/46937309>
1265
1266         Unreviewed Windows port Debug builds fix.
1267
1268         No new tests since no behavior changes.
1269
1270         * accessibility/win/AXObjectCacheWin.cpp:
1271         (WebCore::AXObjectCache::postPlatformNotification): Add "std::" prefix to numeric_limits in ASSERT macro.
1272
1273 2018-12-24  Fujii Hironori  <Hironori.Fujii@sony.com>
1274
1275         Remove "using namespace std;"
1276         https://bugs.webkit.org/show_bug.cgi?id=192973
1277
1278         Reviewed by Alex Christensen.
1279
1280         Removed "using namespace std" statement, and use std:: prefix.
1281
1282         No new tests since no behavior changes.
1283
1284         * accessibility/win/AXObjectCacheWin.cpp:
1285         * platform/graphics/GraphicsContext3DPrivate.cpp:
1286         * platform/graphics/cairo/ImageBufferCairo.cpp:
1287         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
1288         * platform/graphics/win/FontWin.cpp:
1289         (WebCore::FontCascade::floatWidthForComplexText const):
1290         * platform/graphics/win/GraphicsContextCGWin.cpp:
1291         * platform/graphics/win/GraphicsContextCairoWin.cpp:
1292         * platform/graphics/win/GraphicsContextDirect2D.cpp:
1293         * platform/graphics/win/GraphicsContextWin.cpp:
1294         * platform/graphics/win/SimpleFontDataCGWin.cpp:
1295         * platform/graphics/win/UniscribeController.cpp:
1296         (WebCore::UniscribeController::UniscribeController):
1297         (WebCore::UniscribeController::shapeAndPlaceItem):
1298         * platform/image-decoders/ScalableImageDecoder.cpp:
1299         * platform/text/LocaleICU.cpp:
1300         * platform/text/win/LocaleWin.cpp:
1301         * platform/win/ScrollbarThemeWin.cpp:
1302         * rendering/RenderRubyRun.cpp:
1303         (WebCore::RenderRubyRun::layoutBlock):
1304         * rendering/RenderThemeWin.cpp:
1305         (WebCore::RenderThemeWin::adjustMenuListButtonStyle const):
1306         (WebCore::RenderThemeWin::paintSearchFieldCancelButton):
1307         (WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle const):
1308         (WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle const):
1309         (WebCore::RenderThemeWin::paintSearchFieldResultsDecorationPart):
1310         (WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle const):
1311         (WebCore::RenderThemeWin::paintSearchFieldResultsButton):
1312
1313 2018-12-24  Simon Fraser  <simon.fraser@apple.com>
1314
1315         Change ScrollingNodeType to an enum class
1316         https://bugs.webkit.org/show_bug.cgi?id=193009
1317
1318         Reviewed by Zalan Bujtas.
1319
1320         Change the ScrollingNodeType enum to an enum class.
1321         
1322         No behavior change.
1323
1324         * page/scrolling/AsyncScrollingCoordinator.cpp:
1325         (WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
1326         * page/scrolling/ScrollingCoordinator.cpp:
1327         (WebCore::operator<<):
1328         * page/scrolling/ScrollingCoordinator.h:
1329         * page/scrolling/ScrollingStateFixedNode.cpp:
1330         (WebCore::ScrollingStateFixedNode::ScrollingStateFixedNode):
1331         * page/scrolling/ScrollingStateNode.h:
1332         (WebCore::ScrollingStateNode::isFixedNode const):
1333         (WebCore::ScrollingStateNode::isStickyNode const):
1334         (WebCore::ScrollingStateNode::isFrameScrollingNode const):
1335         (WebCore::ScrollingStateNode::isOverflowScrollingNode const):
1336         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
1337         (WebCore::ScrollingStateOverflowScrollingNode::ScrollingStateOverflowScrollingNode):
1338         * page/scrolling/ScrollingStateStickyNode.cpp:
1339         (WebCore::ScrollingStateStickyNode::ScrollingStateStickyNode):
1340         * page/scrolling/ScrollingStateTree.cpp:
1341         (WebCore::ScrollingStateTree::createNode):
1342         (WebCore::ScrollingStateTree::attachNode):
1343         * page/scrolling/ScrollingTreeNode.h:
1344         (WebCore::ScrollingTreeNode::isFixedNode const):
1345         (WebCore::ScrollingTreeNode::isStickyNode const):
1346         (WebCore::ScrollingTreeNode::isFrameScrollingNode const):
1347         (WebCore::ScrollingTreeNode::isOverflowScrollingNode const):
1348         * page/scrolling/ScrollingTreeOverflowScrollingNode.cpp:
1349         (WebCore::ScrollingTreeOverflowScrollingNode::ScrollingTreeOverflowScrollingNode):
1350         * page/scrolling/ios/ScrollingTreeIOS.cpp:
1351         (WebCore::ScrollingTreeIOS::createScrollingTreeNode):
1352         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
1353         (WebCore::ScrollingTreeFixedNode::ScrollingTreeFixedNode):
1354         * page/scrolling/mac/ScrollingTreeMac.cpp:
1355         (ScrollingTreeMac::createScrollingTreeNode):
1356         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
1357         (WebCore::ScrollingTreeStickyNode::ScrollingTreeStickyNode):
1358         * platform/graphics/GraphicsLayerClient.h:
1359         * rendering/RenderLayerCompositor.cpp:
1360         (WebCore::RenderLayerCompositor::reattachSubframeScrollLayers):
1361         (WebCore::scrollCoordinationRoleForNodeType):
1362         (WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame):
1363         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
1364
1365 2018-12-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1366
1367         [HarfBuzz] Width not correctly reported as 0 for zero font size
1368         https://bugs.webkit.org/show_bug.cgi?id=192986
1369
1370         Reviewed by Michael Catanzaro.
1371
1372         Fixes test fast/text/font-size-zero.html
1373
1374         * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
1375         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Use empty advances for glyphs when the font
1376         size is zero.
1377
1378 2018-12-20  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
1379
1380         Use Ref<> as much as possible
1381         https://bugs.webkit.org/show_bug.cgi?id=192808
1382
1383         Reviewed by Alex Christensen.
1384
1385         * Modules/encryptedmedia/NavigatorEME.cpp:
1386         (WebCore::NavigatorEME::requestMediaKeySystemAccess):
1387         * Modules/fetch/FetchBody.cpp:
1388         (WebCore::FetchBody::bodyAsFormData const):
1389         * Modules/geolocation/Geolocation.cpp:
1390         (WebCore::Geolocation::getCurrentPosition):
1391         (WebCore::Geolocation::watchPosition):
1392         * Modules/indexeddb/IDBDatabase.cpp:
1393         (WebCore::IDBDatabase::objectStoreNames const):
1394         * Modules/indexeddb/IDBDatabase.h:
1395         * Modules/indexeddb/IDBObjectStore.cpp:
1396         (WebCore::IDBObjectStore::indexNames const):
1397         * Modules/indexeddb/IDBObjectStore.h:
1398         * Modules/indexeddb/IDBTransaction.cpp:
1399         (WebCore::IDBTransaction::scheduleOperation):
1400         * Modules/indexeddb/IDBTransaction.h:
1401         * Modules/indexeddb/client/TransactionOperation.h:
1402         (WebCore::IDBClient::createTransactionOperation):
1403         * Modules/mediastream/MediaDevices.cpp:
1404         (WebCore::MediaDevices::getUserMedia const):
1405         (WebCore::MediaDevices::getDisplayMedia const):
1406         * Modules/mediastream/UserMediaRequest.cpp:
1407         (WebCore::UserMediaRequest::create):
1408         * Modules/mediastream/UserMediaRequest.h:
1409         * Modules/webaudio/AudioParam.cpp:
1410         (WebCore::AudioParam::calculateFinalValues):
1411         * Modules/webaudio/ScriptProcessorNode.cpp:
1412         (WebCore::ScriptProcessorNode::initialize):
1413         * Modules/webdatabase/SQLStatement.cpp:
1414         (WebCore::SQLStatement::execute):
1415         * Modules/webgpu/WebGPU.cpp:
1416         (WebCore::WebGPU::requestAdapter const):
1417         * Modules/webgpu/WebGPUAdapter.cpp:
1418         (WebCore::WebGPUAdapter::create):
1419         * Modules/webgpu/WebGPUAdapter.h:
1420         * Modules/webgpu/WebGPUBuffer.cpp:
1421         (WebCore::WebGPUBuffer::create):
1422         * Modules/webgpu/WebGPUBuffer.h:
1423         * Modules/webgpu/WebGPUCommandBuffer.cpp:
1424         (WebCore::WebGPUCommandBuffer::create):
1425         (WebCore::WebGPUCommandBuffer::beginRenderPass):
1426         * Modules/webgpu/WebGPUCommandBuffer.h:
1427         * Modules/webgpu/WebGPUDevice.cpp:
1428         (WebCore::WebGPUDevice::create):
1429         (WebCore::WebGPUDevice::createBuffer const):
1430         (WebCore::WebGPUDevice::createShaderModule const):
1431         (WebCore::WebGPUDevice::createRenderPipeline const):
1432         (WebCore::WebGPUDevice::createCommandBuffer const):
1433         * Modules/webgpu/WebGPURenderPassEncoder.cpp:
1434         (WebCore::WebGPURenderPassEncoder::create):
1435         * Modules/webgpu/WebGPURenderPassEncoder.h:
1436         * Modules/webgpu/WebGPURenderPipeline.cpp:
1437         (WebCore::WebGPURenderPipeline::create):
1438         * Modules/webgpu/WebGPURenderPipeline.h:
1439         * Modules/webgpu/WebGPUShaderModule.cpp:
1440         (WebCore::WebGPUShaderModule::create):
1441         * Modules/webgpu/WebGPUShaderModule.h:
1442         * Modules/webgpu/WebGPUTexture.cpp:
1443         (WebCore::WebGPUTexture::createDefaultTextureView):
1444         * Modules/webgpu/WebGPUTextureView.cpp:
1445         (WebCore::WebGPUTextureView::create):
1446         * Modules/webgpu/WebGPUTextureView.h:
1447         * accessibility/AXObjectCache.cpp:
1448         (WebCore::AXObjectCache::rangeMatchesTextNearRange):
1449         * accessibility/atk/AXObjectCacheAtk.cpp:
1450         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
1451         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
1452         (webkitAccessibleHyperlinkGetStartIndex):
1453         (webkitAccessibleHyperlinkGetEndIndex):
1454         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1455         (getSelectionOffsetsForObject):
1456         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1457         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
1458         * bindings/js/JSDOMGlobalObjectTask.cpp:
1459         * bindings/js/JSDOMWindowBase.cpp:
1460         (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
1461         * bindings/js/JSWorkerGlobalScopeBase.cpp:
1462         (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
1463         * bindings/js/ScriptControllerMac.mm:
1464         (WebCore::ScriptController::createScriptInstanceForWidget):
1465         * bindings/js/SerializedScriptValue.cpp:
1466         (WebCore::CloneDeserializer::readTerminal):
1467         (WebCore::SerializedScriptValue::create):
1468         * bridge/objc/objc_instance.h:
1469         * bridge/objc/objc_instance.mm:
1470         (ObjcInstance::create):
1471         * css/CSSComputedStyleDeclaration.cpp:
1472         (WebCore::ComputedStyleExtractor::currentColorOrValidColor const):
1473         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties):
1474         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand):
1475         (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
1476         * css/CSSComputedStyleDeclaration.h:
1477         * css/CSSFontFaceSource.cpp:
1478         (WebCore::CSSFontFaceSource::load):
1479         * css/CSSStyleSheet.cpp:
1480         (WebCore::CSSStyleSheet::rules):
1481         * css/FontFace.cpp:
1482         (WebCore::FontFace::unicodeRange const):
1483         (WebCore::FontFace::featureSettings const):
1484         * css/InspectorCSSOMWrappers.cpp:
1485         (WebCore::InspectorCSSOMWrappers::collectFromStyleSheetContents):
1486         * css/SVGCSSComputedStyleDeclaration.cpp:
1487         (WebCore::strokeDashArrayToCSSValueList):
1488         (WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor const):
1489         * css/StyleResolver.cpp:
1490         (WebCore::StyleResolver::createFilterOperations):
1491         * css/StyleRule.cpp:
1492         (WebCore::StyleRuleBase::createCSSOMWrapper const):
1493         * css/StyleRule.h:
1494         * dom/ChildListMutationScope.cpp:
1495         (WebCore::ChildListMutationAccumulator::getOrCreate):
1496         * dom/ChildListMutationScope.h:
1497         * dom/DocumentMarkerController.cpp:
1498         (WebCore::updateRenderedRectsForMarker):
1499         * dom/InlineStyleSheetOwner.cpp:
1500         (WebCore::InlineStyleSheetOwner::createSheet):
1501         * dom/PointerEvent.h:
1502         * dom/UserGestureIndicator.h:
1503         (WebCore::UserGestureToken::create):
1504         * editing/AlternativeTextController.cpp:
1505         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
1506         (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
1507         (WebCore::AlternativeTextController::respondToUnappliedEditing):
1508         (WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
1509         (WebCore::AlternativeTextController::respondToMarkerAtEndOfWord):
1510         * editing/ApplyStyleCommand.cpp:
1511         (WebCore::ApplyStyleCommand::applyBlockStyle):
1512         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
1513         * editing/CompositeEditCommand.cpp:
1514         (WebCore::CompositeEditCommand::targetRanges const):
1515         (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
1516         (WebCore::CompositeEditCommand::moveParagraphs):
1517         * editing/DeleteSelectionCommand.cpp:
1518         (WebCore::DeleteSelectionCommand::mergeParagraphs):
1519         * editing/Editing.cpp:
1520         (WebCore::visiblePositionForIndexUsingCharacterIterator):
1521         * editing/EditingStyle.cpp:
1522         (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
1523         (WebCore::EditingStyle::conflictsWithInlineStyleOfElement const):
1524         (WebCore::EditingStyle::prepareToApplyAt):
1525         (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
1526         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
1527         (WebCore::EditingStyle::removeStyleFromRulesAndContext):
1528         (WebCore::extractPropertiesNotIn):
1529         * editing/Editor.cpp:
1530         (WebCore::Editor::setBaseWritingDirection):
1531         (WebCore::Editor::setComposition):
1532         * editing/EditorCommand.cpp:
1533         (WebCore::executeApplyParagraphStyle):
1534         (WebCore::executeMakeTextWritingDirectionLeftToRight):
1535         (WebCore::executeMakeTextWritingDirectionNatural):
1536         (WebCore::executeMakeTextWritingDirectionRightToLeft):
1537         * editing/FormatBlockCommand.cpp:
1538         (WebCore::FormatBlockCommand::formatRange):
1539         * editing/RemoveFormatCommand.cpp:
1540         (WebCore::RemoveFormatCommand::doApply):
1541         * editing/ReplaceRangeWithTextCommand.cpp:
1542         (WebCore::ReplaceRangeWithTextCommand::targetRanges const):
1543         * editing/ReplaceSelectionCommand.cpp:
1544         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
1545         (WebCore::handleStyleSpansBeforeInsertion):
1546         (WebCore::ReplaceSelectionCommand::handleStyleSpans):
1547         * editing/SpellingCorrectionCommand.cpp:
1548         (WebCore::SpellingCorrectionCommand::targetRanges const):
1549         * editing/TextCheckingHelper.cpp:
1550         (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
1551         * editing/TypingCommand.cpp:
1552         (WebCore::TypingCommand::insertText):
1553         (WebCore::TypingCommand::willAddTypingToOpenCommand):
1554         * editing/VisibleUnits.cpp:
1555         (WebCore::distanceBetweenPositions):
1556         * editing/cocoa/EditorCocoa.mm:
1557         (WebCore::Editor::selectionInWebArchiveFormat):
1558         * editing/ios/DictationCommandIOS.cpp:
1559         (WebCore::DictationCommandIOS::doApply):
1560         * editing/ios/EditorIOS.mm:
1561         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
1562         (WebCore::Editor::removeUnchangeableStyles):
1563         (WebCore::Editor::writeImageToPasteboard):
1564         * editing/mac/EditorMac.mm:
1565         (WebCore::Editor::replaceNodeFromPasteboard):
1566         (WebCore::Editor::imageInWebArchiveFormat):
1567         * editing/markup.cpp:
1568         (WebCore::styleFromMatchedRulesAndInlineDecl):
1569         (WebCore::createFragmentForTransformToFragment):
1570         * fileapi/FileReaderLoader.cpp:
1571         (WebCore::FileReaderLoader::didFinishLoading):
1572         * html/FTPDirectoryDocument.cpp:
1573         (WebCore::createTemplateDocumentData):
1574         * html/HTMLMediaElement.cpp:
1575         (WebCore::HTMLMediaElement::scheduleEvent):
1576         (WebCore::HTMLMediaElement::createMediaControls):
1577         * html/HTMLTableElement.cpp:
1578         (WebCore::HTMLTableElement::createSharedCellStyle):
1579         * html/HTMLTableElement.h:
1580         * html/URLUtils.h:
1581         (WebCore::URLUtils<T>::origin const):
1582         * html/parser/HTMLConstructionSite.cpp:
1583         (WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface):
1584         * html/shadow/TextControlInnerElements.cpp:
1585         (WebCore::TextControlInnerElement::resolveCustomStyle):
1586         * html/track/WebVTTParser.cpp:
1587         (WebCore::WebVTTParser::createNewCue):
1588         * inspector/DOMPatchSupport.cpp:
1589         * inspector/InspectorCanvas.cpp:
1590         (WebCore::InspectorCanvas::buildInitialState):
1591         (WebCore::InspectorCanvas::buildAction):
1592         * inspector/InspectorFrontendClientLocal.cpp:
1593         (WebCore::InspectorFrontendClientLocal::openInNewTab):
1594         * inspector/InspectorStyleSheet.cpp:
1595         (WebCore::asCSSRuleList):
1596         (WebCore::InspectorStyle::styleWithProperties const):
1597         (WebCore::InspectorStyleSheet::ensureSourceData):
1598         * inspector/agents/InspectorCanvasAgent.cpp:
1599         (WebCore::InspectorCanvasAgent::didCreateCanvasRenderingContext):
1600         * inspector/agents/InspectorIndexedDBAgent.cpp:
1601         (WebCore::Inspector::keyPathFromIDBKeyPath):
1602         * inspector/agents/InspectorPageAgent.cpp:
1603         (WebCore::InspectorPageAgent::archive):
1604         * loader/EmptyClients.cpp:
1605         (WebCore::EmptyStorageNamespaceProvider::createSessionStorageNamespace):
1606         (WebCore::EmptyStorageNamespaceProvider::createLocalStorageNamespace):
1607         (WebCore::EmptyStorageNamespaceProvider::createEphemeralLocalStorageNamespace):
1608         (WebCore::EmptyStorageNamespaceProvider::createTransientLocalStorageNamespace):
1609         * loader/FrameLoader.cpp:
1610         (WebCore::FrameLoader::loadURL):
1611         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
1612         (WebCore::FrameLoader::loadDifferentDocumentItem):
1613         * loader/WorkerThreadableLoader.cpp:
1614         (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
1615         * loader/archive/mhtml/MHTMLParser.cpp:
1616         (WebCore::MHTMLParser::addResourceToArchive):
1617         (WebCore::MHTMLParser::parseNextPart):
1618         * loader/cache/MemoryCache.cpp:
1619         (WebCore::MemoryCache::addImageToCache):
1620         (WebCore::MemoryCache::removeResourcesWithOrigin):
1621         * page/DOMWindow.cpp:
1622         (WebCore::DOMWindow::getMatchedCSSRules const):
1623         (WebCore::DOMWindow::createWindow):
1624         * page/EventHandler.cpp:
1625         (WebCore::textDistance):
1626         * page/Page.cpp:
1627         (WebCore::Page::userStyleSheet const):
1628         * page/animation/CSSPropertyAnimation.cpp:
1629         (WebCore::blendFilterOperations):
1630         * page/ios/FrameIOS.mm:
1631         (WebCore::Frame::initWithSimpleHTMLDocument):
1632         (WebCore::Frame::interpretationsForCurrentRoot const):
1633         * page/mac/ServicesOverlayController.mm:
1634         (WebCore::ServicesOverlayController::Highlight::fadeIn):
1635         (WebCore::ServicesOverlayController::Highlight::fadeOut):
1636         * platform/SharedBuffer.cpp:
1637         (WebCore::SharedBuffer::tryCreateArrayBuffer const):
1638         * platform/audio/HRTFElevation.cpp:
1639         (WebCore::HRTFElevation::calculateKernelsForAzimuthElevation):
1640         * platform/audio/SincResampler.cpp:
1641         (WebCore::SincResampler::consumeSource):
1642         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
1643         (WebCore::AudioFileReader::createBus):
1644         * platform/audio/mac/AudioFileReaderMac.cpp:
1645         (WebCore::AudioFileReader::createBus):
1646         * platform/graphics/Icon.h:
1647         (WebCore::Icon::create):
1648         * platform/graphics/InbandTextTrackPrivate.h:
1649         (WebCore::InbandTextTrackPrivate::create):
1650         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1651         (WebCore::AVFWrapper::shouldWaitForLoadingOfResource):
1652         * platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.h:
1653         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1654         (WebCore::fulfillRequestWithKeyData):
1655         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
1656         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
1657         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
1658         (WebCore::MediaSourcePrivateAVFObjC::create):
1659         (WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer):
1660         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
1661         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1662         (WebCore::SourceBufferPrivateAVFObjC::create):
1663         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
1664         * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h:
1665         * platform/graphics/ca/TileController.cpp:
1666         (WebCore::TileController::createTileLayer):
1667         * platform/graphics/ca/TileController.h:
1668         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
1669         (WebCore::CACFLayerTreeHost::acceleratedCompositingAvailable):
1670         (WebCore::CACFLayerTreeHost::create):
1671         * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
1672         (WebCore::GPUBuffer::create):
1673         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1674         (WebCore::MediaPlayerPrivateGStreamer::updateTracks):
1675         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
1676         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
1677         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
1678         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
1679         (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
1680         (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
1681         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1682         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
1683         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
1684         (WebCore::AppendPipeline::appsinkNewSample):
1685         * platform/graphics/iso/ISOProtectionSystemSpecificHeaderBox.cpp:
1686         (WebCore::ISOProtectionSystemSpecificHeaderBox::parse):
1687         * platform/graphics/iso/ISOTrackEncryptionBox.cpp:
1688         (WebCore::ISOTrackEncryptionBox::parse):
1689         * platform/graphics/texmap/TextureMapperAnimation.cpp:
1690         (WebCore::applyFilterAnimation):
1691         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
1692         (WebCore::TextureMapperPlatformLayerBuffer::clone):
1693         * platform/graphics/transforms/TransformOperations.cpp:
1694         (WebCore::TransformOperations::blendByMatchingOperations const):
1695         * platform/image-decoders/ico/ICOImageDecoder.cpp:
1696         (WebCore::ICOImageDecoder::setDataForPNGDecoderAtIndex):
1697         * platform/mock/mediasource/MockBox.cpp:
1698         (WebCore::MockInitializationBox::MockInitializationBox):
1699         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
1700         (WebCore::MockSourceBufferPrivate::create):
1701         (WebCore::MockSourceBufferPrivate::append):
1702         * platform/mock/mediasource/MockSourceBufferPrivate.h:
1703         * platform/mock/mediasource/MockTracks.h:
1704         (WebCore::MockTextTrackPrivate::create):
1705         (WebCore::MockVideoTrackPrivate::create):
1706         * platform/network/FormData.h:
1707         (WebCore::FormData::decode):
1708         * platform/network/cocoa/CookieStorageObserver.h:
1709         * platform/network/cocoa/CookieStorageObserver.mm:
1710         (WebCore::CookieStorageObserver::create):
1711         * platform/network/soup/ResourceRequestSoup.cpp:
1712         (WebCore::appendEncodedBlobItemToSoupMessageBody):
1713         (WebCore::ResourceRequest::updateSoupMessageBody const):
1714         * platform/text/hyphen/HyphenationLibHyphen.cpp:
1715         (WebCore::HyphenationDictionary::createNull):
1716         (WebCore::HyphenationDictionary::create):
1717         * platform/win/SearchPopupMenuWin.cpp:
1718         (WebCore::SearchPopupMenuWin::SearchPopupMenuWin):
1719         (WebCore::SearchPopupMenuWin::popupMenu):
1720         * platform/win/SearchPopupMenuWin.h:
1721         * rendering/RenderThemeIOS.mm:
1722         (WebCore::applyCommonButtonPaddingToStyle):
1723         (WebCore::RenderThemeIOS::paintProgressBar):
1724         (WebCore::RenderThemeIOS::adjustButtonStyle const):
1725         (WebCore::paintAttachmentIcon):
1726         * rendering/svg/SVGRenderTreeAsText.cpp:
1727         (WebCore::writeSVGResourceContainer):
1728         * storage/Storage.cpp:
1729         (WebCore::Storage::create):
1730         (WebCore::Storage::Storage):
1731         * storage/Storage.h:
1732         (WebCore::Storage::area const):
1733         * storage/StorageNamespace.h:
1734         * storage/StorageNamespaceProvider.cpp:
1735         (WebCore::StorageNamespaceProvider::localStorageArea):
1736         * storage/StorageNamespaceProvider.h:
1737         * svg/SVGElement.cpp:
1738         (WebCore::SVGElement::getPresentationAttribute):
1739         * svg/SVGFEBlendElement.cpp:
1740         (WebCore::SVGFEBlendElement::build):
1741         * svg/SVGFEColorMatrixElement.cpp:
1742         (WebCore::SVGFEColorMatrixElement::build):
1743         * svg/SVGFEComponentTransferElement.cpp:
1744         (WebCore::SVGFEComponentTransferElement::build):
1745         * svg/SVGFECompositeElement.cpp:
1746         (WebCore::SVGFECompositeElement::build):
1747         * svg/SVGFEDiffuseLightingElement.cpp:
1748         (WebCore::SVGFEDiffuseLightingElement::build):
1749         * svg/SVGFEDisplacementMapElement.cpp:
1750         (WebCore::SVGFEDisplacementMapElement::build):
1751         * svg/SVGFEDropShadowElement.cpp:
1752         (WebCore::SVGFEDropShadowElement::build):
1753         * svg/SVGFEGaussianBlurElement.cpp:
1754         (WebCore::SVGFEGaussianBlurElement::build):
1755         * svg/SVGFEMergeElement.cpp:
1756         (WebCore::SVGFEMergeElement::build):
1757         * svg/SVGFEMorphologyElement.cpp:
1758         (WebCore::SVGFEMorphologyElement::build):
1759         * svg/SVGFEOffsetElement.cpp:
1760         (WebCore::SVGFEOffsetElement::build):
1761         * svg/SVGFESpecularLightingElement.cpp:
1762         (WebCore::SVGFESpecularLightingElement::build):
1763         * svg/SVGFETileElement.cpp:
1764         (WebCore::SVGFETileElement::build):
1765         * testing/GCObservation.h:
1766         * xml/XSLTProcessor.cpp:
1767         (WebCore::XSLTProcessor::createDocumentFromSource):
1768         * xml/parser/XMLDocumentParser.cpp:
1769         (WebCore::XMLDocumentParser::parseDocumentFragment):
1770
1771 2018-12-21  Chris Dumez  <cdumez@apple.com>
1772
1773         navigator.userAgent in service workers does not reflect customUserAgent set by client
1774         https://bugs.webkit.org/show_bug.cgi?id=192951
1775
1776         Reviewed by Youenn Fablet.
1777
1778         Whenever a service worker client registers itself, also pass its effective user agent.
1779         In the network process, for each origin, we store the latest client's user agent and
1780         use it when starting the service worker.
1781
1782         * dom/Document.cpp:
1783         (WebCore::Document::setServiceWorkerConnection):
1784         * loader/DocumentLoader.cpp:
1785         (WebCore::DocumentLoader::registerTemporaryServiceWorkerClient):
1786         * workers/service/SWClientConnection.h:
1787         * workers/service/server/SWServer.cpp:
1788         (WebCore::SWServer::serviceWorkerClientUserAgent const):
1789         (WebCore::SWServer::installContextData):
1790         (WebCore::SWServer::runServiceWorker):
1791         (WebCore::SWServer::registerServiceWorkerClient):
1792         * workers/service/server/SWServer.h:
1793         * workers/service/server/SWServerToContextConnection.h:
1794         * workers/service/server/SWServerWorker.cpp:
1795         (WebCore::SWServerWorker::userAgent const):
1796         * workers/service/server/SWServerWorker.h:
1797
1798 2018-12-21  Youenn Fablet  <youenn@apple.com>
1799
1800         RTCRtpSender.setParameters() does set active parameter
1801         https://bugs.webkit.org/show_bug.cgi?id=192848
1802
1803         Reviewed by Eric Carlson.
1804
1805         Covered by updated test.
1806
1807         * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
1808         (WebCore::updateRTCRtpSendParameters):
1809         The routine was updating the local value, not the out parameter.
1810
1811 2018-12-21  Eric Carlson  <eric.carlson@apple.com>
1812
1813         'ended' Event doesn't fire on MediaStreamTrack when a USB camera is unplugged
1814         https://bugs.webkit.org/show_bug.cgi?id=187896
1815         <rdar://problem/42681445>
1816
1817         Reviewed by Jer Noble.
1818
1819         No new tests, tested manually.
1820
1821         * platform/mediastream/mac/AVVideoCaptureSource.h:
1822         * platform/mediastream/mac/AVVideoCaptureSource.mm:
1823         (WebCore::AVVideoCaptureSource::deviceDisconnected):
1824         (-[WebCoreAVVideoCaptureSourceObserver addNotificationObservers]):
1825         (-[WebCoreAVVideoCaptureSourceObserver removeNotificationObservers]):
1826         (-[WebCoreAVVideoCaptureSourceObserver deviceConnectedDidChange:]):
1827         * platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
1828         (WebCore::deviceHasInputStreams):
1829         (WebCore::isValidCaptureDevice):
1830         (WebCore::CoreAudioCaptureDeviceManager::coreAudioCaptureDevices):
1831         (WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices):
1832         (WebCore::CoreAudioCaptureDeviceManager::devicesChanged): Deleted.
1833         * platform/mediastream/mac/CoreAudioCaptureDeviceManager.h:
1834         * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
1835         (WebCore::CoreAudioSharedUnit::setCaptureDevice):
1836         (WebCore::CoreAudioSharedUnit::devicesChanged):
1837         (WebCore::CoreAudioSharedUnit::startProducingData):
1838         (WebCore::CoreAudioSharedUnit::startInternal):
1839         (WebCore::CoreAudioSharedUnit::verifyIsCapturing):
1840         (WebCore::CoreAudioSharedUnit::captureFailed):
1841         (WebCore::CoreAudioCaptureSourceFactory::devicesChanged):
1842         (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):
1843         (WebCore::CoreAudioSharedUnit::setCaptureDeviceID): Deleted.
1844         * platform/mediastream/mac/CoreAudioCaptureSource.h:
1845
1846 2018-12-20  Ryosuke Niwa  <rniwa@webkit.org>
1847
1848         REGRESSION(r239353): iOS WK1 Assertion failure in notifyChildNodeRemoved while running
1849         TestWebKitAPI.QuickLook.LegacyQuickLookContent
1850         https://bugs.webkit.org/show_bug.cgi?id=192859
1851         <rdar://problem/46887237>
1852
1853         Reviewed by Antti Koivisto.
1854
1855         After r239353, ScriptDisallowedScope::InMainThread::isScriptAllowed() may return false when the web thread
1856         is inside a delegate callback even when there is a ScriptDisallowedScope defined.
1857
1858         Replace the existign debug assertions which assert !ScriptDisallowedScope::InMainThread::isScriptAllowed()
1859         by a newly added ScriptDisallowedScope::InMainThread::hasDisallowedScope to avoid hitting this assertion.
1860
1861         Tests: TestWebKitAPI.QuickLook.LegacyQuickLookContent
1862
1863         * dom/ContainerNodeAlgorithms.cpp:
1864         (WebCore::notifyChildNodeInserted):
1865         (WebCore::notifyChildNodeRemoved):
1866         * dom/Document.cpp:
1867         (WebCore::Document::nodeChildrenWillBeRemoved):
1868         (WebCore::Document::nodeWillBeRemoved):
1869         * dom/ScriptDisallowedScope.h:
1870         (WebCore::ScriptDisallowedScope::InMainThread::hasDisallowedScope):
1871         * html/HTMLFormElement.cpp:
1872         (WebCore:: const):
1873
1874 2018-12-21  Joseph Pecoraro  <pecoraro@apple.com>
1875
1876         Update status of some WebCore features in features.json
1877         https://bugs.webkit.org/show_bug.cgi?id=192998
1878
1879         Reviewed by Tim Horton.
1880
1881         * features.json:
1882         - Variation Fonts: Supported
1883         - Conic Gradients: Supported in Preview
1884         - Web Share: Supported in Preview
1885         - <datalist>: Supported in Preview
1886         - Intersection Observers: Supported in Preview
1887
1888 2018-12-21  Zalan Bujtas  <zalan@apple.com>
1889
1890         [iOS] Using file upload can trigger a crash under RenderThemeIOS::paintFileUploadIconDecorations()
1891         https://bugs.webkit.org/show_bug.cgi?id=192357
1892         <rdar://problem/42852260>
1893
1894         Reviewed by Simon Fraser.
1895
1896         Do not try to paint the file picker when painting is disabled.
1897
1898         * rendering/RenderFileUploadControl.cpp:
1899         (WebCore::RenderFileUploadControl::paintObject):
1900
1901 2018-12-21  Jiewen Tan  <jiewen_tan@apple.com>
1902
1903         [WebAuthN] userPresence should always be true
1904         https://bugs.webkit.org/show_bug.cgi?id=192835
1905         <rdar://problem/46538788>
1906
1907         Reviewed by Brent Fulgham.
1908
1909         In the current spec as of 7 August 2018, userPresence is suggested to set to the inverse of userVerification.
1910         This doesn't comply with the CTAP spec. Details in: https://github.com/w3c/webauthn/issues/1123.
1911         After discussing with other members of the working group, we decided to make userPresence always default to true.
1912
1913         Covered by exisiting tests.
1914
1915         * Modules/webauthn/fido/DeviceRequestConverter.cpp:
1916         (fido::encodeGetAssertionRequestAsCBOR):
1917
1918 2018-12-21  Jiewen Tan  <jiewen_tan@apple.com>
1919
1920         [WebAuthN] Import an APDU coder from Chromium
1921         https://bugs.webkit.org/show_bug.cgi?id=192949
1922         <rdar://problem/46879933>
1923
1924         Reviewed by Brent Fulgham.
1925
1926         This patch imports an APDU coder from Chromium. Here is the documentation:
1927         https://fidoalliance.org/specs/fido-u2f-v1.2-ps-20170411/fido-u2f-raw-message-formats-v1.2-ps-20170411.html#u2f-message-framing
1928         APDU is a binary format to frame any U2F requests/responses into binaries. It is equivalent to CBOR in CTAP2.
1929
1930         Here is a list of files that are imported from Chromium:
1931         https://cs.chromium.org/chromium/src/components/apdu/apdu_command.cc?rcl=a2f290c10d132f53518e7f99d5635ee814ff8090
1932         https://cs.chromium.org/chromium/src/components/apdu/apdu_command.h?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
1933         https://cs.chromium.org/chromium/src/components/apdu/apdu_response.cc?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
1934         https://cs.chromium.org/chromium/src/components/apdu/apdu_response.h?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
1935         https://cs.chromium.org/chromium/src/components/apdu/apdu_unittest.cc?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
1936
1937         Covered by API tests.
1938
1939         * Modules/webauthn/apdu/ApduCommand.cpp: Added.
1940         (apdu::ApduCommand::createFromMessage):
1941         (apdu::ApduCommand::ApduCommand):
1942         (apdu::ApduCommand::getEncodedCommand const):
1943         * Modules/webauthn/apdu/ApduCommand.h: Added.
1944         * Modules/webauthn/apdu/ApduResponse.cpp: Added.
1945         (apdu::ApduResponse::createFromMessage):
1946         (apdu::ApduResponse::ApduResponse):
1947         (apdu::ApduResponse::getEncodedResponse const):
1948         * Modules/webauthn/apdu/ApduResponse.h: Added.
1949         * Sources.txt:
1950         * WebCore.xcodeproj/project.pbxproj:
1951
1952 2018-12-21  Jer Noble  <jer.noble@apple.com>
1953
1954         Convert raw CDMSessionMediaSourceAVFObjC pointer in MediaPlayerPrivateMediaSourceAVFObjC
1955         https://bugs.webkit.org/show_bug.cgi?id=192985
1956         <rdar://problem/46750743>
1957
1958         Reviewed by Eric Carlson.
1959
1960         Make m_session a RefPtr; drive-by fix: make m_mediaElement in WebKitMediaKeys a WeakPtr.
1961
1962         * Modules/encryptedmedia/legacy/WebKitMediaKeys.cpp:
1963         (WebCore::WebKitMediaKeys::setMediaElement):
1964         * Modules/encryptedmedia/legacy/WebKitMediaKeys.h:
1965         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
1966         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1967         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1968         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
1969         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):
1970
1971 2018-12-21  Justin Michaud  <justin_michaud@apple.com>
1972
1973         CSS variables don't work for colors in "border" property
1974         https://bugs.webkit.org/show_bug.cgi?id=192922
1975
1976         Reviewed by Simon Fraser.
1977
1978         ParseColorFunction no longer consumes anything if the color was not valid.
1979
1980         Test: css-custom-properties-api/border-variable-parsing.html
1981
1982         * css/parser/CSSPropertyParserHelpers.cpp:
1983         (WebCore::CSSPropertyParserHelpers::parseColorFunction):
1984
1985 2018-12-21  Justin Fan  <justin_fan@apple.com>
1986
1987         [WebGPU] GPUBindGroupLayout refactoring: no HashMap, and failure logging
1988         https://bugs.webkit.org/show_bug.cgi?id=192990
1989
1990         Reviewed by Myles C. Maxfield.
1991
1992         Refactor away the unnecessary HashMaps when creating MTLArgumentEncoders in GPUBindGroupLayout creation.
1993         Also update GPUBindGroupLayout::create -> tryCreate, in order to better handle Objective-C exceptions.
1994
1995         No new tests; no change in behavior.
1996
1997         * Modules/webgpu/WebGPUBindGroupLayout.cpp:
1998         (WebCore::WebGPUBindGroupLayout::create):
1999         (WebCore::WebGPUBindGroupLayout::WebGPUBindGroupLayout):
2000         * Modules/webgpu/WebGPUBindGroupLayout.h:
2001         (WebCore::WebGPUBindGroupLayout::bindGroupLayout const):
2002         * Modules/webgpu/WebGPUDevice.cpp:
2003         (WebCore::WebGPUDevice::createBindGroupLayout const):
2004         * platform/graphics/gpu/GPUBindGroupLayout.h:
2005         * platform/graphics/gpu/GPUDevice.cpp:
2006         (WebCore::GPUDevice::tryCreateBindGroupLayout const): Renamed from ::create*. Now returning a RefPtr. 
2007         (WebCore::GPUDevice::createBindGroupLayout const): Deleted.
2008         * platform/graphics/gpu/GPUDevice.h:
2009         * platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:
2010         (WebCore::appendArgumentToArray):
2011         (WebCore::newEncoder):
2012         (WebCore::GPUBindGroupLayout::tryCreate): Renamed from ::create. Now returning a RefPtr.
2013         (WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
2014         (WebCore::appendArgumentToArrayInMap): Deleted.
2015         (WebCore::GPUBindGroupLayout::create): Deleted.
2016
2017         Deleted unneeded GPUBindGroupLayout.cpp:
2018         * Sources.txt:
2019         * WebCore.xcodeproj/project.pbxproj:
2020         * platform/graphics/gpu/GPUBindGroupLayout.cpp: Removed.
2021
2022 2018-12-21  Alejandro G. Castro  <alex@igalia.com>
2023
2024         [GTK][WPE] Add DeviceIdHashSaltStorage disk persistence
2025         https://bugs.webkit.org/show_bug.cgi?id=190466
2026
2027         Reviewed by Youenn Fablet.
2028
2029         Added persistency to the DeviceIdHashSaltStorage.
2030
2031         * platform/glib/FileSystemGlib.cpp:
2032         (WebCore::FileSystem::getFileSize): Implemented this function to
2033         allow sharing code with the statistics storage class.
2034         * platform/glib/KeyedDecoderGlib.cpp:
2035         (WebCore::KeyedDecoderGlib::dictionaryFromGVariant): Added a
2036         condition to control situations where the key is empty, it can
2037         happen if the user modifies the file in the disk.
2038         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp: Add include
2039         to make work compilation with debug, unified builds.
2040
2041 2018-12-21  Zalan Bujtas  <zalan@apple.com>
2042
2043         Synchronous media query evaluation could destroy current Frame/FrameView.
2044         https://bugs.webkit.org/show_bug.cgi?id=192781
2045         <rdar://problem/34416793>
2046
2047         Reviewed by Chris Dumez.
2048
2049         Protect Frame and FrameView when coming back from printing and check if the current Frame/FrameView/FrameLoader objects are still valid.
2050
2051         Test: printing/print-with-media-query-destory.html
2052
2053         * loader/DocumentLoader.cpp:
2054         (WebCore::DocumentLoader::finishedLoading):
2055         * page/Frame.cpp:
2056         (WebCore::Frame::setPrinting):
2057         * page/FrameView.cpp:
2058         (WebCore::FrameView::forceLayoutForPagination):
2059         * page/PrintContext.cpp:
2060         (WebCore::PrintContext::PrintContext):
2061         (WebCore::PrintContext::computePageRects):
2062         (WebCore::PrintContext::computePageRectsWithPageSizeInternal):
2063         (WebCore::PrintContext::begin):
2064         (WebCore::PrintContext::computeAutomaticScaleFactor):
2065         (WebCore::PrintContext::spoolPage):
2066         (WebCore::PrintContext::spoolRect):
2067         (WebCore::PrintContext::end):
2068         * page/PrintContext.h:
2069         (WebCore::PrintContext::frame const): Deleted.
2070
2071 2018-12-21  Wenson Hsieh  <wenson_hsieh@apple.com>
2072
2073         Setting the file wrapper and content type of an attachment to a PDF should update its image
2074         https://bugs.webkit.org/show_bug.cgi?id=192984
2075         <rdar://problem/46798028>
2076
2077         Reviewed by Tim Horton.
2078
2079         Allow PDF data to be used to update enclosing image elements when setting the file wrapper for an attachment.
2080         Covered by a new API test: WKAttachmentTests.SetFileWrapperForPDFImageAttachment.
2081
2082         * html/HTMLAttachmentElement.cpp:
2083         (WebCore::mimeTypeIsSuitableForInlineImageAttachment):
2084         (WebCore::HTMLAttachmentElement::updateEnclosingImageWithData):
2085
2086 2018-12-21  Justin Michaud  <justin_michaud@apple.com>
2087
2088         Repeated background images with zero size should display the background color
2089         https://bugs.webkit.org/show_bug.cgi?id=192962
2090
2091         Reviewed by Antti Koivisto.
2092
2093         Test: fast/backgrounds/background-repeat-with-zero-size.html
2094
2095         * platform/LengthSize.h:
2096         (WebCore::LengthSize::isEmpty const):
2097         * rendering/RenderBoxModelObject.cpp:
2098         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2099         * rendering/style/FillLayer.h:
2100         (WebCore::FillLayer::isEmpty const):
2101
2102 2018-12-21  Manuel Rego Casasnovas  <rego@igalia.com>
2103
2104         [css-grid] Fix percentages in relative offsets for grid items
2105         https://bugs.webkit.org/show_bug.cgi?id=190492
2106
2107         Reviewed by Sergio Villar Senin.
2108
2109         The method RenderBoxModelObject::relativePositionOffset() was not considering the case of grid items,
2110         where the containing block is the grid area.
2111         The patch modifies the method so the new code uses overrideContainingBlockContentWidth|Height when required.
2112
2113         Test: imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-relative-offsets-002.html
2114
2115         * rendering/RenderBox.cpp: Implement the physical versions of the already existent methods.
2116         (WebCore::RenderBox::overrideContainingBlockContentWidth const):
2117         (WebCore::RenderBox::overrideContainingBlockContentHeight const):
2118         (WebCore::RenderBox::hasOverrideContainingBlockContentWidth const):
2119         (WebCore::RenderBox::hasOverrideContainingBlockContentHeight const):
2120         * rendering/RenderBox.h:
2121         * rendering/RenderBoxModelObject.cpp:
2122         (WebCore::RenderBoxModelObject::relativePositionOffset const): Modified method
2123         to take into account overrideContainingBlockContentWidth|Height for grid items.
2124         * rendering/RenderBoxModelObject.h: Added new headers for physical virtual methods
2125         that will be overridden in RenderBox.
2126         (WebCore::RenderBoxModelObject::overrideContainingBlockContentWidth const):
2127         (WebCore::RenderBoxModelObject::overrideContainingBlockContentHeight const):
2128         (WebCore::RenderBoxModelObject::hasOverrideContainingBlockContentWidth const):
2129         (WebCore::RenderBoxModelObject::hasOverrideContainingBlockContentHeight const):
2130
2131 2018-12-20  Justin Fan  <justin_fan@apple.com>
2132
2133         [WebGPU] Convert WebGPUBindGroups into MTLArgumentEncoders
2134         https://bugs.webkit.org/show_bug.cgi?id=192956
2135
2136         Reviewed by Myles Maxfield.
2137
2138         No testable behavior change. Existing tests cover possible crashing.
2139
2140         Add GPUBindGroupLayoutMetal.mm:
2141         * SourcesCocoa.txt:
2142         * WebCore.xcodeproj/project.pbxproj:
2143
2144         Flesh out GPUBindGroupLayout::create:
2145         * platform/graphics/gpu/GPUBindGroupLayout.cpp:
2146         * platform/graphics/gpu/GPUBindGroupLayout.h:
2147         * platform/graphics/gpu/GPUDevice.cpp:
2148         (WebCore::GPUDevice::createBindGroupLayout const):
2149         * platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm: Added.
2150         (WebCore::appendArgumentToArrayInMap): Added.
2151         (WebCore::GPUBindGroupLayout::create):
2152         (WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
2153         (WebCore::MTLDataTypeForBindingType): Added.
2154
2155 2018-12-20  Michael Catanzaro  <mcatanzaro@igalia.com>
2156
2157         Unreviewed, remove stray #pragma once added to .cpp file
2158
2159         * svg/properties/SVGAttributeOwnerProxy.cpp:
2160
2161 2018-12-20  Justin Michaud  <justin_michaud@apple.com>
2162
2163         Adding runtime-enabled attribute to Element prevents inlining property access
2164         https://bugs.webkit.org/show_bug.cgi?id=192901
2165
2166         Add a call to flattenDictionaryObject after disabling runtime-enabled attributes.
2167
2168         Reviewed by Ryosuke Niwa.
2169
2170         * bindings/scripts/CodeGeneratorJS.pm:
2171         (GenerateImplementation):
2172         * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
2173         (WebCore::JSTestEnabledBySettingPrototype::finishCreation):
2174         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2175         (WebCore::JSTestGenerateIsReachablePrototype::finishCreation):
2176         * bindings/scripts/test/JS/JSTestNode.cpp:
2177         (WebCore::JSTestNodePrototype::finishCreation):
2178         * bindings/scripts/test/JS/JSTestObj.cpp:
2179         (WebCore::JSTestObjPrototype::finishCreation):
2180
2181 2018-12-20  Chris Dumez  <cdumez@apple.com>
2182
2183         Use Optional::hasValue() instead of Optional::has_value()
2184         https://bugs.webkit.org/show_bug.cgi?id=192948
2185
2186         Reviewed by Tim Horton.
2187
2188         * bindings/js/DOMPromiseProxy.h:
2189         (WebCore::DOMPromiseProxy<IDLType>::isFulfilled const):
2190         (WebCore::DOMPromiseProxy<IDLVoid>::isFulfilled const):
2191         (WebCore::DOMPromiseProxyWithResolveCallback<IDLType>::isFulfilled const):
2192         * dom/DataTransferItemList.h:
2193         (WebCore::DataTransferItemList::hasItems const):
2194         * dom/EventTarget.cpp:
2195         (WebCore::EventTarget::addEventListener):
2196         * html/HTMLMediaElement.cpp:
2197         (WebCore::HTMLMediaElement::captionDisplayMode):
2198         * platform/graphics/MediaPlayer.cpp:
2199         (WebCore::MediaPlayer::wouldTaintOrigin const):
2200         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
2201         (WebCore::AppendPipeline::parseDemuxerSrcPadCaps):
2202         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
2203         (WebCore::MediaPlayerPrivateGStreamerMSE::trackDetected):
2204         * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
2205         (webKitMediaSrcUpdatePresentationSize):
2206         * platform/mac/NSScrollerImpDetails.mm:
2207         (WebCore::ScrollerStyle::recommendedScrollerStyle):
2208         * rendering/RenderListItem.cpp:
2209         (WebCore::RenderListItem::setExplicitValue):
2210
2211 2018-12-20  Chris Dumez  <cdumez@apple.com>
2212
2213         Move HTTPS_UPGRADE code behind a runtime flag, off by default
2214         https://bugs.webkit.org/show_bug.cgi?id=192937
2215
2216         Reviewed by Youenn Fablet.
2217
2218         Move HTTPS_UPGRADE code behind a runtime flag, off by default and drop the build time flag.
2219
2220         * page/Settings.yaml:
2221
2222 2018-12-20  Youenn Fablet  <youenn@apple.com>
2223
2224         Remove custom constructors of ReadableStreamDefaultReader and ReadableStreamBYOBReader
2225         https://bugs.webkit.org/show_bug.cgi?id=192838
2226
2227         Reviewed by Chris Dumez.
2228
2229         Generate constructor code in case of a Private but not Public constructor.
2230         Make sure this is correctly exposed in global objects.
2231         Add JS built-in constructor implementations for those two objects.
2232
2233         Also add JS built-in constructors for controller and byob request.
2234         To keep existing behavior, JS built-ins calling these constructors need to pass
2235         an additional parameter that allows making the difference between a JS builtin caller or a JS caller.
2236         In the latter case, the constructor will throw.
2237
2238         Covered by existing tests, no observable change of behavior.
2239
2240         * Modules/streams/ReadableByteStreamController.idl:
2241         * Modules/streams/ReadableByteStreamController.js:
2242         (initializeReadableByteStreamController):
2243         (getter.byobRequest):
2244         * Modules/streams/ReadableByteStreamInternals.js:
2245         (privateInitializeReadableByteStreamController): Deleted.
2246         (privateInitializeReadableStreamBYOBRequest): Deleted.
2247         * Modules/streams/ReadableStream.js:
2248         (initializeReadableStream):
2249         * Modules/streams/ReadableStreamBYOBReader.js:
2250         (initializeReadableStreamBYOBReader):
2251         * Modules/streams/ReadableStreamBYOBRequest.idl:
2252         * Modules/streams/ReadableStreamBYOBRequest.js:
2253         (initializeReadableStreamBYOBRequest):
2254         * Modules/streams/ReadableStreamDefaultController.idl:
2255         * Modules/streams/ReadableStreamDefaultController.js:
2256         (initializeReadableStreamDefaultController):
2257         (enqueue):
2258         * Modules/streams/ReadableStreamDefaultReader.js:
2259         (initializeReadableStreamDefaultReader):
2260         * Modules/streams/ReadableStreamInternals.js:
2261         (readableStreamDefaultControllerError): Deleted.
2262         * Sources.txt:
2263         * UnifiedSources-input.xcfilelist:
2264         * WebCore.xcodeproj/project.pbxproj:
2265         * bindings/js/JSDOMBuiltinConstructor.h:
2266         * bindings/js/JSDOMGlobalObject.cpp:
2267         (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
2268         * bindings/js/JSReadableStreamPrivateConstructors.cpp: Removed.
2269         * bindings/js/JSReadableStreamPrivateConstructors.h: Removed.
2270         * bindings/scripts/CodeGeneratorJS.pm:
2271         (GeneratePropertiesHashTable):
2272         * bindings/scripts/preprocess-idls.pl:
2273         (shouldExposeInterface):
2274
2275 2018-12-20  Jiewen Tan  <jiewen_tan@apple.com>
2276
2277         [WebAuthN] Remove hash from Client Data
2278         https://bugs.webkit.org/show_bug.cgi?id=192727
2279         <rdar://problem/46746673>
2280
2281         Reviewed by Brent Fulgham.
2282
2283         The hash algorithm for hashing the client data is enforced to SHA_256 in the latest spec:
2284         https://www.w3.org/TR/webauthn/#sec-client-data. Therefore, we should remove it.
2285
2286         Covered by existing tests.
2287
2288         * Modules/webauthn/AuthenticatorCoordinator.cpp:
2289         (WebCore::AuthenticatorCoordinatorInternal::produceClientDataJson):
2290
2291 2018-12-20  Jiewen Tan  <jiewen_tan@apple.com>
2292
2293         [WebAuthN] Add a runtime flag for local authenticator
2294         https://bugs.webkit.org/show_bug.cgi?id=192792
2295         <rdar://problem/46798738>
2296
2297         Reviewed by Brent Fulgham.
2298
2299         No tests.
2300
2301         This patch adds a runtime flag for local authenticator and removes ways to
2302         set the runtime flag for web authentication in LegacyWebKit.
2303
2304         * page/RuntimeEnabledFeatures.h:
2305         (WebCore::RuntimeEnabledFeatures::setWebAuthenticationLocalAuthenticatorEnabled):
2306         (WebCore::RuntimeEnabledFeatures::webAuthenticationLocalAuthenticatorEnabled const):
2307
2308 2018-12-20  Jeremy Jones  <jeremyj@apple.com>
2309
2310         Pointer lock causes abandoned documents
2311         https://bugs.webkit.org/show_bug.cgi?id=188727
2312         rdar://problem/44248197
2313         
2314         Reviewed by Simon Fraser.
2315
2316         Fixes --world-leaks in these tests:
2317
2318         pointer-lock/locked-element-removed-from-dom.html
2319         pointer-lock/mouse-event-delivery.html
2320         fast/shadow-dom/pointerlockelement-in-slot.html
2321
2322         PointerLockController now uses WeakPtr instead of RefPtr because it has no need to extend the lifetime of a document.
2323
2324         * page/PointerLockController.cpp:
2325         (WebCore::PointerLockController::elementRemoved):
2326         (WebCore::PointerLockController::documentDetached):
2327         (WebCore::PointerLockController::didAcquirePointerLock):
2328         * page/PointerLockController.h:
2329
2330 2018-12-20  Chris Dumez  <cdumez@apple.com>
2331
2332         Use Optional::valueOr() instead of Optional::value_or()
2333         https://bugs.webkit.org/show_bug.cgi?id=192933
2334
2335         Reviewed by Geoffrey Garen.
2336
2337         * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
2338         (WebCore::convert):
2339         (WebCore::ApplePayPaymentHandler::didAuthorizePayment):
2340         * Modules/encryptedmedia/MediaKeySession.cpp:
2341         (WebCore::MediaKeySession::load):
2342         * Modules/indexeddb/IDBDatabaseIdentifier.h:
2343         (WebCore::IDBDatabaseIdentifier::hash const):
2344         * Modules/indexeddb/IDBFactory.cpp:
2345         (WebCore::IDBFactory::open):
2346         * Modules/mediastream/MediaStreamTrack.cpp:
2347         (WebCore::MediaStreamTrack::applyConstraints):
2348         * Modules/mediastream/RTCDTMFSender.cpp:
2349         (WebCore::RTCDTMFSender::insertDTMF):
2350         * Modules/webdatabase/SQLTransaction.cpp:
2351         (WebCore::SQLTransaction::executeSql):
2352         * Modules/webvr/VRFrameData.cpp:
2353         (WebCore::VRFrameData::update):
2354         * animation/AnimationTimeline.cpp:
2355         (WebCore::AnimationTimeline::updateCSSTransitionsForElement):
2356         * animation/DeclarativeAnimation.cpp:
2357         (WebCore::DeclarativeAnimation::cancel):
2358         (WebCore::DeclarativeAnimation::invalidateDOMEvents):
2359         * animation/KeyframeEffect.cpp:
2360         (WebCore::computeMissingKeyframeOffsets):
2361         (WebCore::KeyframeEffect::applyPendingAcceleratedActions):
2362         * animation/WebAnimation.cpp:
2363         (WebCore::WebAnimation::runPendingPlayTask):
2364         (WebCore::WebAnimation::runPendingPauseTask):
2365         * bindings/js/SerializedScriptValue.cpp:
2366         (WebCore::CloneSerializer::write):
2367         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
2368         (WebCore::CryptoAlgorithmHMAC::generateKey):
2369         (WebCore::CryptoAlgorithmHMAC::importKey):
2370         * crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp:
2371         (WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
2372         (WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):
2373         * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
2374         (WebCore::CryptoKeyRSA::importSpki):
2375         (WebCore::CryptoKeyRSA::importPkcs8):
2376         * crypto/keys/CryptoKeyRSA.cpp:
2377         (WebCore::CryptoKeyRSA::importJwk):
2378         * crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:
2379         (WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
2380         (WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):
2381         * crypto/mac/CryptoKeyRSAMac.cpp:
2382         (WebCore::CryptoKeyRSA::importSpki):
2383         (WebCore::CryptoKeyRSA::importPkcs8):
2384         * css/CSSComputedStyleDeclaration.cpp:
2385         (WebCore::counterToCSSValue):
2386         * css/CSSFontFace.cpp:
2387         (WebCore::calculateItalicRange):
2388         * css/CSSPrimitiveValue.cpp:
2389         (WebCore::CSSPrimitiveValue::doubleValue const):
2390         * css/CSSStyleSheet.cpp:
2391         (WebCore::CSSStyleSheet::addRule):
2392         * css/DOMMatrix.cpp:
2393         (WebCore::DOMMatrix::rotateSelf):
2394         * css/DOMMatrixReadOnly.cpp:
2395         (WebCore::DOMMatrixReadOnly::validateAndFixup):
2396         * css/StyleBuilderCustom.h:
2397         (WebCore::StyleBuilderCustom::applyValueCounter):
2398         * css/parser/MediaQueryParser.cpp:
2399         (WebCore::MediaQueryParser::commitMediaQuery):
2400         * dom/Document.h:
2401         (WebCore::Document::referrerPolicy const):
2402         * dom/Element.cpp:
2403         (WebCore::toScrollAlignment):
2404         * dom/EventTarget.cpp:
2405         (WebCore::EventTarget::addEventListener):
2406         * dom/MutationObserver.cpp:
2407         (WebCore::MutationObserver::observe):
2408         * editing/cocoa/FontAttributeChangesCocoa.mm:
2409         (WebCore::FontChanges::platformFontFamilyNameForCSS const):
2410         * fileapi/File.cpp:
2411         (WebCore::File::File):
2412         * html/DOMTokenList.cpp:
2413         (WebCore::DOMTokenList::toggle):
2414         * html/HTMLOListElement.h:
2415         * html/ImageBitmap.cpp:
2416         (WebCore::croppedSourceRectangleWithFormatting):
2417         * html/canvas/CanvasPattern.cpp:
2418         (WebCore::CanvasPattern::setTransform):
2419         * html/canvas/CanvasRenderingContext2DBase.cpp:
2420         (WebCore::CanvasRenderingContext2DBase::setTransform):
2421         (WebCore::CanvasRenderingContext2DBase::isPointInPathInternal):
2422         (WebCore::CanvasRenderingContext2DBase::isPointInStrokeInternal):
2423         * html/canvas/Path2D.cpp:
2424         (WebCore::Path2D::addPath):
2425         * inspector/InspectorCanvas.cpp:
2426         (WebCore::InspectorCanvas::buildAction):
2427         * inspector/InspectorFrontendHost.cpp:
2428         (WebCore::populateContextMenu):
2429         * layout/FormattingContext.cpp:
2430         (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
2431         * layout/FormattingContextGeometry.cpp:
2432         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
2433         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
2434         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
2435         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
2436         (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
2437         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
2438         (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset):
2439         (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedHorizontalMarginValue):
2440         (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedVerticalMarginValue):
2441         * layout/FormattingContextQuirks.cpp:
2442         (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
2443         * layout/MarginTypes.h:
2444         (WebCore::Layout::VerticalMargin::usedValues const):
2445         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2446         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
2447         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
2448         (WebCore::Layout::BlockFormattingContext::Geometry::instrinsicWidthConstraints):
2449         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
2450         (WebCore::Layout::BlockFormattingContext::Quirks::stretchedHeight):
2451         * layout/displaytree/DisplayBox.h:
2452         (WebCore::Display::Box::width const):
2453         (WebCore::Display::Box::height const):
2454         (WebCore::Display::Box::contentBoxTop const):
2455         (WebCore::Display::Box::contentBoxLeft const):
2456         * layout/floats/FloatingContext.cpp:
2457         (WebCore::Layout::Iterator::set):
2458         * layout/inlineformatting/InlineFormattingContext.cpp:
2459         (WebCore::Layout::InlineFormattingContext::appendContentToLine const):
2460         (WebCore::Layout::InlineFormattingContext::placeInFlowPositionedChildren const):
2461         * loader/FrameLoader.cpp:
2462         (WebCore::FrameLoader::urlSelected):
2463         * loader/NavigationAction.cpp:
2464         * page/FrameView.cpp:
2465         (WebCore::FrameView::setLayoutViewportOverrideRect):
2466         (WebCore::FrameView::documentToAbsoluteScaleFactor const):
2467         (WebCore::FrameView::viewportSizeForCSSViewportUnits const):
2468         * page/Page.cpp:
2469         (WebCore::Page::setLowPowerModeEnabledOverrideForTesting):
2470         * page/SecurityOriginData.cpp:
2471         (WebCore::SecurityOriginData::databaseIdentifier const):
2472         * page/SecurityOriginData.h:
2473         (WebCore::SecurityOriginDataHash::hash):
2474         * page/SecurityOriginHash.h:
2475         (WebCore::SecurityOriginHash::hash):
2476         * page/ViewportConfiguration.cpp:
2477         (WebCore::ViewportConfiguration::setViewLayoutSize):
2478         * page/WindowFeatures.cpp:
2479         (WebCore::parseDialogFeatures):
2480         * page/animation/AnimationBase.cpp:
2481         (WebCore::AnimationBase::updateStateMachine):
2482         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
2483         (WebCore::AnimationBase::getTimeToNextEvent const):
2484         (WebCore::AnimationBase::freezeAtTime):
2485         (WebCore::AnimationBase::getElapsedTime const):
2486         * page/animation/CSSAnimationController.cpp:
2487         (WebCore::CSSAnimationControllerPrivate::updateAnimationTimer):
2488         * page/cocoa/ResourceUsageThreadCocoa.mm:
2489         (WebCore::ResourceUsageThread::platformThreadBody):
2490         * page/linux/ResourceUsageThreadLinux.cpp:
2491         (WebCore::ResourceUsageThread::platformThreadBody):
2492         * platform/graphics/ComplexTextController.cpp:
2493         (WebCore::ComplexTextController::offsetForPosition):
2494         * platform/graphics/FontCache.h:
2495         (WebCore::FontDescriptionKey::computeHash const):
2496         * platform/graphics/FontCascade.cpp:
2497         (WebCore::FontCascade::drawText const):
2498         (WebCore::FontCascade::drawEmphasisMarks const):
2499         (WebCore::FontCascade::displayListForTextRun const):
2500         (WebCore::FontCascade::adjustSelectionRectForText const):
2501         (WebCore::FontCascade::codePath const):
2502         * platform/graphics/FontSelectionAlgorithm.cpp:
2503         (WebCore::FontSelectionAlgorithm::styleDistance const):
2504         * platform/graphics/FontSelectionAlgorithm.h:
2505         (WebCore::operator<<):
2506         (WebCore::FontSelectionSpecifiedCapabilities::computeWeight const):
2507         (WebCore::FontSelectionSpecifiedCapabilities::computeWidth const):
2508         (WebCore::FontSelectionSpecifiedCapabilities::computeSlope const):
2509         * platform/graphics/ShadowBlur.cpp:
2510         (WebCore::ShadowBlur::calculateLayerBoundingRect):
2511         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
2512         (WebCore::WebCoreAVCFResourceLoader::startLoading):
2513         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2514         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
2515         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
2516         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext):
2517         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2518         (WebCore::SourceBufferPrivateAVFObjC::naturalSize):
2519         * platform/graphics/ca/GraphicsLayerCA.cpp:
2520         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
2521         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2522         (WebCore::preparePlatformFont):
2523         * platform/graphics/filters/FETurbulence.cpp:
2524         (WebCore::FETurbulence::fillRegion const):
2525         * platform/graphics/gstreamer/GStreamerCommon.cpp:
2526         (WebCore::initializeGStreamer):
2527         * platform/graphics/texmap/TextureMapperLayer.cpp:
2528         (WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica):
2529         (WebCore::TextureMapperLayer::replicaTransform):
2530         (WebCore::TextureMapperLayer::syncAnimations):
2531         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2532         (WebCore::CoordinatedGraphicsLayer::transformedVisibleRect):
2533         (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
2534         * platform/graphics/transforms/TransformState.cpp:
2535         (WebCore::TransformState::mappedPoint const):
2536         (WebCore::TransformState::mapQuad const):
2537         (WebCore::TransformState::flattenWithTransform):
2538         * platform/network/CacheValidation.cpp:
2539         (WebCore::computeCurrentAge):
2540         (WebCore::computeFreshnessLifetimeForHTTPFamily):
2541         * platform/network/NetworkStateNotifier.cpp:
2542         (WebCore::NetworkStateNotifier::onLine):
2543         * rendering/FloatingObjects.cpp:
2544         (WebCore::FindNextFloatLogicalBottomAdapter::nextLogicalBottom const):
2545         (WebCore::FindNextFloatLogicalBottomAdapter::nextShapeLogicalBottom const):
2546         * rendering/GridBaselineAlignment.cpp:
2547         (WebCore::GridBaselineAlignment::ascentForChild const):
2548         * rendering/GridTrackSizingAlgorithm.cpp:
2549         (WebCore::GridTrack::setGrowthLimit):
2550         (WebCore::GridTrackSizingAlgorithm::initialBaseSize const):
2551         (WebCore::GridTrackSizingAlgorithm::initialGrowthLimit const):
2552         (WebCore::GridTrackSizingAlgorithm::sizeTrackToFitNonSpanningItem):
2553         (WebCore::sortByGridTrackGrowthPotential):
2554         (WebCore::GridTrackSizingAlgorithm::estimatedGridAreaBreadthForChild const):
2555         (WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const):
2556         (WebCore::GridTrackSizingAlgorithm::initializeTrackSizes):
2557         * rendering/PaintInfo.h:
2558         (WebCore::PaintInfo::applyTransform):
2559         * rendering/RenderBox.cpp:
2560         (WebCore::RenderBox::computeLogicalHeight const):
2561         * rendering/RenderCounter.cpp:
2562         (WebCore::planCounter):
2563         * rendering/RenderDeprecatedFlexibleBox.cpp:
2564         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
2565         * rendering/RenderFlexibleBox.cpp:
2566         (WebCore::RenderFlexibleBox::baselinePosition const):
2567         (WebCore::RenderFlexibleBox::marginBoxAscentForChild):
2568         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
2569         * rendering/RenderGrid.cpp:
2570         (WebCore::RenderGrid::gridGap const):
2571         (WebCore::RenderGrid::baselinePosition const):
2572         * rendering/RenderLayer.cpp:
2573         (WebCore::RenderLayer::paintLayerByApplyingTransform):
2574         * rendering/RenderListBox.cpp:
2575         (WebCore::RenderListBox::paintItem):
2576         (WebCore::RenderListBox::listIndexIsVisible):
2577         * rendering/RenderMultiColumnSet.cpp:
2578         (WebCore::RenderMultiColumnSet::calculateMaxColumnHeight const):
2579         * rendering/RenderTable.cpp:
2580         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
2581         * rendering/RenderTableCell.cpp:
2582         (WebCore::RenderTableCell::cellBaselinePosition const):
2583         * rendering/RenderTableSection.cpp:
2584         (WebCore::RenderTableSection::firstLineBaseline const):
2585         * rendering/RenderText.cpp:
2586         (WebCore::RenderText::computePreferredLogicalWidths):
2587         (WebCore::RenderText::previousOffset const):
2588         (WebCore::RenderText::previousOffsetForBackwardDeletion const):
2589         (WebCore::RenderText::nextOffset const):
2590         (WebCore::RenderText::stringView const):
2591         * rendering/RenderView.cpp:
2592         (WebCore::RenderView::layout):
2593         * rendering/mathml/RenderMathMLBlock.cpp:
2594         (WebCore::RenderMathMLBlock::baselinePosition const):
2595         * rendering/mathml/RenderMathMLBlock.h:
2596         (WebCore::RenderMathMLBlock::ascentForChild):
2597         * rendering/style/GridPosition.cpp:
2598         (WebCore::GridPosition::max):
2599         * rendering/style/TextUnderlineOffset.h:
2600         (WebCore::TextUnderlineOffset::lengthOr const):
2601         * rendering/svg/RenderSVGContainer.cpp:
2602         (WebCore::RenderSVGContainer::nodeAtFloatPoint):
2603         * rendering/svg/RenderSVGForeignObject.cpp:
2604         (WebCore::RenderSVGForeignObject::nodeAtFloatPoint):
2605         * rendering/svg/RenderSVGImage.cpp:
2606         (WebCore::RenderSVGImage::nodeAtFloatPoint):
2607         * rendering/svg/RenderSVGResourceClipper.cpp:
2608         (WebCore::RenderSVGResourceClipper::hitTestClipContent):
2609         * rendering/svg/RenderSVGResourceFilter.cpp:
2610         (WebCore::RenderSVGResourceFilter::postApplyResource):
2611         * rendering/svg/RenderSVGRoot.cpp:
2612         (WebCore::RenderSVGRoot::nodeAtPoint):
2613         * rendering/svg/RenderSVGShape.cpp:
2614         (WebCore::RenderSVGShape::nodeAtFloatPoint):
2615         * rendering/svg/RenderSVGText.cpp:
2616         (WebCore::RenderSVGText::nodeAtFloatPoint):
2617         * rendering/svg/SVGRenderingContext.cpp:
2618         (WebCore::SVGRenderingContext::clipToImageBuffer):
2619         * svg/SVGToOTFFontConversion.cpp:
2620         (WebCore::SVGToOTFFontConverter::processGlyphElement):
2621         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
2622
2623 2018-12-20  Jer Noble  <jer.noble@apple.com>
2624
2625         REGRESSION (r239419): heap-use-after-free in AudioSourceProviderAVFObjC::finalizeCallback()
2626         https://bugs.webkit.org/show_bug.cgi?id=192941
2627         <rdar://problem/46874096>
2628
2629         Reviewed by Brent Fulgham.
2630
2631         Don't delete the locked lock before unlocking the lock. 
2632
2633         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
2634         (WebCore::AudioSourceProviderAVFObjC::finalizeCallback):
2635
2636 2018-12-20  Keith Rollin  <krollin@apple.com>
2637
2638         Improve release-level page-load logging
2639         https://bugs.webkit.org/show_bug.cgi?id=192872
2640         <rdar://problem/46850309>
2641
2642         Reviewed by Chris Dumez.
2643
2644         There are a number of reported bugs that are difficult or impossible
2645         to track down with our current level of logging. Additionally, some
2646         software groups lower in the page-loading stack have requested logging
2647         sufficient for tracking a user-visible error message down to the
2648         requested resource that caused the message. Add more-comprehensive
2649         logging to address these issues/requests.
2650
2651         No new tests -- no changed functionality.
2652
2653         * loader/DocumentLoader.cpp:
2654         (WebCore::DocumentLoader::setMainDocumentError):
2655         (WebCore::DocumentLoader::mainReceivedError):
2656         (WebCore::DocumentLoader::stopLoading):
2657         (WebCore::DocumentLoader::notifyFinished):
2658         (WebCore::DocumentLoader::willSendRequest):
2659         (WebCore::DocumentLoader::continueAfterContentPolicy):
2660         (WebCore::DocumentLoader::startLoadingMainResource):
2661         (WebCore::DocumentLoader::loadMainResource):
2662         (WebCore::DocumentLoader::cancelMainResourceLoad):
2663         * loader/FrameLoader.cpp:
2664         (WebCore::FrameLoader::urlSelected):
2665         (WebCore::FrameLoader::loadURLIntoChildFrame):
2666         (WebCore::FrameLoader::loadArchive):
2667         (WebCore::FrameLoader::loadInSameDocument):
2668         (WebCore::FrameLoader::loadFrameRequest):
2669         (WebCore::FrameLoader::loadURL):
2670         (WebCore::FrameLoader::load):
2671         (WebCore::FrameLoader::loadWithNavigationAction):
2672         (WebCore::FrameLoader::loadWithDocumentLoader):
2673         (WebCore::FrameLoader::reloadWithOverrideEncoding):
2674         (WebCore::FrameLoader::reload):
2675         (WebCore::FrameLoader::setState):
2676         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2677         (WebCore::FrameLoader::loadPostRequest):
2678         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
2679         (WebCore::FrameLoader::loadDifferentDocumentItem):
2680         * loader/ProgressTracker.cpp:
2681         (WebCore::ProgressItem::ProgressItem):
2682         (WebCore::ProgressTracker::reset):
2683         (WebCore::ProgressTracker::progressStarted):
2684         (WebCore::ProgressTracker::progressCompleted):
2685         (WebCore::ProgressTracker::finalProgressComplete):
2686         (WebCore::ProgressTracker::incrementProgress):
2687         (WebCore::ProgressTracker::completeProgress):
2688         (WebCore::ProgressTracker::isAlwaysOnLoggingAllowed const):
2689         * loader/ProgressTracker.h:
2690         * loader/ResourceLoader.cpp:
2691         (WebCore::ResourceLoader::loadDataURL):
2692         (WebCore::ResourceLoader::willSendRequestInternal):
2693         (WebCore::ResourceLoader::didFinishLoading):
2694         (WebCore::ResourceLoader::didFail):
2695         (WebCore::ResourceLoader::willSendRequestAsync):
2696         (WebCore::ResourceLoader::wasBlocked):
2697         (WebCore::ResourceLoader::cannotShowURL):
2698         * loader/SubresourceLoader.cpp:
2699         (WebCore::SubresourceLoader::willSendRequestInternal):
2700         (WebCore::=):
2701         (WebCore::SubresourceLoader::didReceiveResponse):
2702         (WebCore::SubresourceLoader::didFinishLoading):
2703         (WebCore::SubresourceLoader::didFail):
2704         (WebCore::SubresourceLoader::willCancel):
2705         * loader/cache/CachedResource.cpp:
2706         (WebCore::CachedResource::load):
2707
2708 2018-12-20  Jeremy Jones  <jeremyj@apple.com>
2709
2710         Switch tabs before retuning PiP video to inline.
2711         https://bugs.webkit.org/show_bug.cgi?id=192767
2712         rdar://problem/46006046
2713
2714         Reviewed by Jer Noble.
2715
2716         No new tests because this code path only happens with a user action on system UI.
2717
2718         When exiting PiP, notify the fullscreen change observer so it can restore client UI state before exiting.
2719
2720         * platform/mac/VideoFullscreenInterfaceMac.mm:
2721         (-[WebVideoFullscreenInterfaceMacObjC pipShouldClose:]):
2722
2723 2018-12-19  Michael Catanzaro  <mcatanzaro@igalia.com>
2724
2725         Unreviewed, fix GTK build after r239410
2726
2727         It added a new file to the build, breaking the unified sources magic that obscured a bug in
2728         URLSoup.h. It forward-declares URL, but this never worked unless the URL.h header was
2729         included via another source file in the unified source bundle.
2730
2731         * platform/network/soup/URLSoup.h:
2732
2733 2018-12-19  Chris Dumez  <cdumez@apple.com>
2734
2735         wtf/Optional.h: move-constructor and move-assignment operator should disengage the value being moved from
2736         https://bugs.webkit.org/show_bug.cgi?id=192728
2737         <rdar://problem/46746779>
2738
2739         Reviewed by Geoff Garen.
2740
2741         * Modules/*:
2742         * animation/*:
2743         * bindings/*:
2744         * crypto/*:
2745         * css/*:
2746         * dom/*:
2747         * editing/*:
2748         * fileapi/*:
2749         * html/*:
2750         * inspector/*:
2751         * layout/*:
2752         * loader/*:
2753         * mathml/*:
2754         * page/*:
2755         * platform/*:
2756         * plugins/*:
2757         * rendering/*:
2758         * testing/*:
2759         * workers/*:
2760         * xml/*:
2761
2762 2018-12-19  Jer Noble  <jer.noble@apple.com>
2763
2764         Leak of MTAudioProcessingTap (304 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
2765         https://bugs.webkit.org/show_bug.cgi?id=192896
2766         <rdar://46732186>
2767
2768         Reviewed by Eric Carlson.
2769
2770         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
2771         (WebCore::AudioSourceProviderAVFObjC::initCallback):
2772
2773 2018-12-19  Timothy Hatcher  <timothy@apple.com>
2774
2775         REGRESSION (r232991): Switching to dark mode in Mail does not update the message view to be transparent
2776         https://bugs.webkit.org/show_bug.cgi?id=188891
2777         rdar://problem/42344352
2778
2779         Reviewed by Simon Fraser.
2780
2781         * rendering/RenderLayerCompositor.cpp:
2782         (WebCore::RenderLayerCompositor::rootBackgroundColorOrTransparencyChanged):
2783         Don't return early when m_layerForOverhangAreas is null to avoid skipping
2784         setRootLayerConfigurationNeedsUpdate() and scheduleCompositingLayerUpdate().
2785
2786 2018-12-19  Justin Fan  <justin_fan@apple.com>
2787
2788         [WebGPU] Add stubs for WebGPUPipelineLayout/Descriptor and device::createPipelineLayout
2789         https://bugs.webkit.org/show_bug.cgi?id=192843
2790         <rdar://problem/46820395>
2791
2792         Reviewed by Myles Maxfield.
2793
2794         Test: webgpu/pipeline-layouts.html
2795
2796         Implement the emtpy WebGPUPipelineLayout interface, and enable creation via WebGPUDevice::createPipelineLayout:
2797         * Modules/webgpu/WebGPUBindGroupLayout.cpp:
2798         (WebCore::WebGPUBindGroupLayout::WebGPUBindGroupLayout):
2799         * Modules/webgpu/WebGPUBindGroupLayout.h:
2800         (WebCore::WebGPUBindGroupLayout::bindGroupLayout const): Added getter.
2801         * Modules/webgpu/WebGPUDevice.cpp:
2802         (WebCore::WebGPUDevice::createPipelineLayout const): Added.
2803         * Modules/webgpu/WebGPUDevice.h:
2804         * Modules/webgpu/WebGPUDevice.idl: Enable createPipelineLayout.
2805         * Modules/webgpu/WebGPUPipelineLayout.cpp: Added.
2806         (WebCore::WebGPUPipelineLayout::create):
2807         (WebCore::WebGPUPipelineLayout::WebGPUPipelineLayout):
2808         * Modules/webgpu/WebGPUPipelineLayout.h: Added.
2809         * Modules/webgpu/WebGPUPipelineLayout.idl: Added.
2810         * Modules/webgpu/WebGPUPipelineLayoutDescriptor.h: Added.
2811         * Modules/webgpu/WebGPUPipelineLayoutDescriptor.idl: Added.
2812         * platform/graphics/gpu/GPUDevice.cpp:
2813         (WebCore::GPUDevice::createPipelineLayout const): Added.
2814         * platform/graphics/gpu/GPUDevice.h:
2815         * platform/graphics/gpu/GPUPipelineLayout.cpp: Added.
2816         (WebCore::GPUPipelineLayout::create):
2817         (WebCore::GPUPipelineLayout::GPUPipelineLayout):
2818         * platform/graphics/gpu/GPUPipelineLayout.h: Added.
2819         * platform/graphics/gpu/GPUPipelineLayoutDescriptor.h: Added.
2820
2821         Add files and symbols to project:
2822         * CMakeLists.txt:
2823         * DerivedSources.make:
2824         * Sources.txt:
2825         * WebCore.xcodeproj/project.pbxproj:
2826         * bindings/js/WebCoreBuiltinNames.h:
2827
2828         Add missing include:
2829         * Modules/webgpu/WebGPUQueue.h:
2830
2831 2018-12-18  Ryosuke Niwa  <rniwa@webkit.org>
2832
2833         SVGUseElement::findTarget should return nullptr when there is a cycle
2834         https://bugs.webkit.org/show_bug.cgi?id=192840
2835
2836         Reviewed by Tim Horton.
2837
2838         r233366 added an early return to updateShadowTree() when there is a cycle between an use element and its target.
2839         Consolidate this cycle detection code with the one in SVGUseElement::findTarget which detected cycles when
2840         the SVG use element itself had a corresponding element.
2841
2842         No new tests since there should be no behavioral change.
2843
2844         * svg/SVGUseElement.cpp:
2845         (WebCore::SVGUseElement::updateShadowTree):
2846         (WebCore::SVGUseElement::findTarget const):
2847
2848 2018-12-19  Myles C. Maxfield  <mmaxfield@apple.com>
2849
2850         [WHLSL] Add a handwritten lexer
2851         https://bugs.webkit.org/show_bug.cgi?id=192294
2852
2853         Reviewed by Jon Lee.
2854
2855         This is infrastructure necessary for https://bugs.webkit.org/show_bug.cgi?id=192355. The
2856         implementation matches the lexing rules in the spec (specifically, the rules that start
2857         with an uppercase letter). The spec is at
2858         https://github.com/gpuweb/WHLSL/blob/master/Spec/WHLSL.g4.
2859
2860         This patch also modifies the lexer according to https://github.com/gpuweb/WHLSL/pull/283.
2861
2862         No new tests because the lexer isn't hooked up yet; there are tests in the parser,
2863         once that gets committed.
2864
2865         * Modules/webgpu/WHLSL/WHLSLLexer.cpp: Added.
2866         (WebCore::WHLSL::Lexer::Token::typeName):
2867         (WebCore::WHLSL::Lexer::recognizeKeyword):
2868         (WebCore::WHLSL::Lexer::consumeTokenFromStream):
2869         (WebCore::WHLSL::Lexer::skipWhitespaceAndComments):
2870         (WebCore::WHLSL::isWhitespace):
2871         (WebCore::WHLSL::isNewline):
2872         (WebCore::WHLSL::Lexer::skipWhitespace):
2873         (WebCore::WHLSL::Lexer::skipLineComment):
2874         (WebCore::WHLSL::Lexer::skipLongComment):
2875         (WebCore::WHLSL::Lexer::coreDecimalIntLiteral const):
2876         (WebCore::WHLSL::Lexer::decimalIntLiteral const):
2877         (WebCore::WHLSL::Lexer::decimalUintLiteral const):
2878         (WebCore::WHLSL::isHexadecimalCharacter):
2879         (WebCore::WHLSL::Lexer::coreHexadecimalIntLiteral const):
2880         (WebCore::WHLSL::Lexer::hexadecimalIntLiteral const):
2881         (WebCore::WHLSL::Lexer::hexadecimalUintLiteral const):
2882         (WebCore::WHLSL::Lexer::intLiteral const):
2883         (WebCore::WHLSL::Lexer::uintLiteral const):
2884         (WebCore::WHLSL::Lexer::digit const):
2885         (WebCore::WHLSL::Lexer::digitStar const):
2886         (WebCore::WHLSL::Lexer::character const):
2887         (WebCore::WHLSL::Lexer::coreFloatLiteralType1 const):
2888         (WebCore::WHLSL::Lexer::coreFloatLiteral const):
2889         (WebCore::WHLSL::Lexer::floatLiteral const):
2890         (WebCore::WHLSL::Lexer::validIdentifier const):
2891         (WebCore::WHLSL::Lexer::identifier const):
2892         (WebCore::WHLSL::Lexer::operatorName const):
2893         * Modules/webgpu/WHLSL/WHLSLLexer.h: Added.
2894         (WebCore::WHLSL::Lexer::Lexer):
2895         (WebCore::WHLSL::Lexer::consumeToken):
2896         (WebCore::WHLSL::Lexer::unconsumeToken):
2897         (WebCore::WHLSL::Lexer::state const):
2898         (WebCore::WHLSL::Lexer::setState):
2899         (WebCore::WHLSL::Lexer::isFullyConsumed const):
2900         (WebCore::WHLSL::Lexer::errorString):
2901         (WebCore::WHLSL::Lexer::string const):
2902         (WebCore::WHLSL::Lexer::anyCharacter const):
2903         * Sources.txt:
2904         * WebCore.xcodeproj/project.pbxproj:
2905
2906 2018-12-18  Simon Fraser  <simon.fraser@apple.com>
2907
2908         Web Inspector: Timelines: correctly label Intersection Observer callbacks
2909         https://bugs.webkit.org/show_bug.cgi?id=192669
2910         <rdar://problem/46702490>
2911
2912         Reviewed by Joseph Pecoraro.
2913
2914         Add InspectorInstrumentation::willFireObserverCallback() and use it to wrap calls
2915         to Intersection Observer, Performance Observer and Mutation Observer callbacks so 
2916         that they get correctly labeled in the Inspector timeline.
2917
2918         * dom/MutationObserver.cpp:
2919         (WebCore::MutationObserver::deliver):
2920         * en.lproj/Localizable.strings:
2921         * inspector/InspectorInstrumentation.cpp:
2922         (WebCore::InspectorInstrumentation::willFireObserverCallbackImpl):
2923         (WebCore::InspectorInstrumentation::didFireObserverCallbackImpl):
2924         * inspector/InspectorInstrumentation.h:
2925         (WebCore::InspectorInstrumentation::willFireObserverCallback):
2926         (WebCore::InspectorInstrumentation::didFireObserverCallback):
2927         * inspector/TimelineRecordFactory.cpp:
2928         (WebCore::TimelineRecordFactory::createObserverCallbackData):
2929         * inspector/TimelineRecordFactory.h:
2930         * inspector/agents/InspectorTimelineAgent.cpp:
2931         (WebCore::InspectorTimelineAgent::willFireObserverCallback):
2932         (WebCore::InspectorTimelineAgent::didFireObserverCallback):
2933         (WebCore::toProtocol):
2934         * inspector/agents/InspectorTimelineAgent.h:
2935         * page/IntersectionObserver.cpp:
2936         (WebCore::IntersectionObserver::notify):
2937         * page/PerformanceObserver.cpp:
2938         (WebCore::PerformanceObserver::deliver):
2939
2940 2018-12-19  Claudio Saavedra  <csaavedra@igalia.com>
2941
2942         ContentExtensions: DFANode.cpp:66:44: error: narrowing conversion of '-1' from 'int' to 'char' inside { }
2943         https://bugs.webkit.org/show_bug.cgi?id=192854
2944
2945         Reviewed by Alex Christensen.
2946
2947         * contentextensions/DFANode.h: Define CharRange's chars as signed
2948
2949 2018-12-19  Youenn Fablet  <youenn@apple.com>
2950
2951         Remove RTCRtpTransceiver.setDirection
2952         https://bugs.webkit.org/show_bug.cgi?id=192869
2953
2954         Reviewed by Alex Christensen.
2955
2956         Covered by rebased test.
2957
2958         * Modules/mediastream/RTCRtpTransceiver.idl:
2959
2960 2018-12-19  Jer Noble  <jer.noble@apple.com>
2961
2962         Force synchronous decode in WebCoreDecompressionSession::decodeSampleSync()
2963         https://bugs.webkit.org/show_bug.cgi?id=192856
2964         <rdar://problem/46843245>
2965
2966         Reviewed by Alex Christensen.
2967
2968         Some decoders exposed through VideoToolbox will decode asynchronously even when 
2969         kVTDecodeInfo_Asynchronous is not set. Force synchronous behavior with a Semaphore.
2970
2971         * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
2972         (WebCore::WebCoreDecompressionSession::decodeSampleSync):
2973
2974 2018-12-19  Megan Gardner  <megan_gardner@apple.com>
2975
2976         Allow clients to set the navigator platform
2977         https://bugs.webkit.org/show_bug.cgi?id=192735
2978
2979         Reviewed by Tim Horton.
2980
2981         Expanded TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm.
2982
2983         Lots of piping to allow the setting of a custom navigator platform.
2984
2985         * loader/DocumentLoader.h:
2986         (WebCore::DocumentLoader::setCustomNavigatorPlatform):
2987         (WebCore::DocumentLoader::customNavigatorPlatform const):
2988         * loader/FrameLoader.cpp:
2989         (WebCore::FrameLoader::navigatorPlatform const):
2990         * loader/FrameLoader.h:
2991         * page/Navigator.cpp:
2992         (WebCore::Navigator::platform const):
2993         * page/Navigator.h:
2994         * page/NavigatorBase.cpp:
2995         (WebCore::NavigatorBase::platform const):
2996         (WebCore::NavigatorBase::platform): Deleted.
2997         * page/NavigatorBase.h:
2998
2999 2018-12-19  Ryan Haddad  <ryanhaddad@apple.com>
3000
3001         Unreviewed, rolling out r239347.
3002
3003         Caused the leaks bot to hit an exception and the new test
3004         crashes on certain configurations.
3005
3006         Reverted changeset:
3007
3008         "Synchronous media query evaluation could destroy current
3009         Frame/FrameView."
3010         https://bugs.webkit.org/show_bug.cgi?id=192781
3011         https://trac.webkit.org/changeset/239347
3012
3013 2018-12-19  Truitt Savell  <tsavell@apple.com>
3014
3015         Unreviewed, rolling out r239358.
3016
3017         Revision caused imported/w3c/web-platform-tests/IndexedDB/ to
3018         crash on Debug bots
3019
3020         Reverted changeset:
3021
3022         "Clean up IndexedDB files between tests"
3023         https://bugs.webkit.org/show_bug.cgi?id=192796
3024         https://trac.webkit.org/changeset/239358
3025
3026 2018-12-19  Don Olmstead  <don.olmstead@sony.com>
3027
3028         Sync some include directories in WebCore
3029         https://bugs.webkit.org/show_bug.cgi?id=192819
3030
3031         Reviewed by Michael Catanzaro.
3032
3033         Added missing include directories around features that have only been enabled on
3034         Apple ports. Removes obsolete directories from list and moves harfbuzz directories
3035         into the freetype cmake file.
3036
3037         * CMakeLists.txt:
3038         * platform/FreeType.cmake:
3039
3040 2018-12-19  Alicia Boya García  <aboya@igalia.com>
3041
3042         [MSE] Remove unused method: stopAskingForMoreSamples()
3043         https://bugs.webkit.org/show_bug.cgi?id=192754
3044
3045         Reviewed by Xabier Rodriguez-Calvar.
3046
3047         The stopAskingForMoreSamples() method from SourceBufferPrivate is not
3048         being used by anyone. SourceBuffer is not calling it and no
3049         SourceBufferPrivate is implementing it. Let's remove that noise.
3050
3051         * platform/graphics/SourceBufferPrivate.h:
3052         (WebCore::SourceBufferPrivate::setActive):
3053         (WebCore::SourceBufferPrivate::stopAskingForMoreSamples): Deleted.
3054         * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
3055         (WebCore::SourceBufferPrivateGStreamer::stopAskingForMoreSamples): Deleted.
3056         * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:
3057
3058 2018-12-19  Alicia Boya García  <aboya@igalia.com>
3059
3060         [MSE] Remove dead code: sourceBufferPrivateSeekToTime()
3061         https://bugs.webkit.org/show_bug.cgi?id=192827
3062
3063         Reviewed by Xabier Rodriguez-Calvar.
3064
3065         This patch makes two dead code removal changes in
3066         SourceBufferPrivateClient:
3067
3068         First, sourceBufferPrivateFastSeekTimeForMediaTime() is made pure
3069         virtual in SourceBufferPrivateClient. Since SourceBufferPrivateClient
3070         is only inherited by SourceBuffer, it makes no sense to have default
3071         implementations there (they will never be used), moreso it being a
3072         client interface.
3073
3074         Second, sourceBufferPrivateSeekToTime() is removed entirely. It used
3075         to had an empty implementation, which SourceBuffer did not overwrite,
3076         therefore making any calls to it useless.
3077
3078         All calls to sourceBufferPrivateSeekToTime() have been removed:
3079
3080         SourceBufferPrivateAVFObjC::seekToTime(), which was also dead code
3081         itself, used to call this method. This patch deletes it completely.
3082
3083         MockSourceBufferPrivate::seekToTime(), which only called this empty
3084         method, has also been removed along with its only usage in
3085         MockMediaSourcePrivate::seekToTime().
3086
3087         * platform/graphics/SourceBufferPrivateClient.h:
3088         (WebCore::SourceBufferPrivateClient::sourceBufferPrivateFastSeekTimeForMediaTime): Deleted.
3089         (WebCore::SourceBufferPrivateClient::sourceBufferPrivateSeekToTime): Deleted.
3090         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
3091         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3092         (WebCore::SourceBufferPrivateAVFObjC::seekToTime): Deleted.
3093         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
3094         (WebCore::MockMediaSourcePrivate::seekToTime):
3095         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
3096         (WebCore::MockSourceBufferPrivate::seekToTime): Deleted.
3097         * platform/mock/mediasource/MockSourceBufferPrivate.h:
3098
3099 2018-12-19  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3100
3101         [EME] MediaKeySystemConfiguration distinctiveIdentifier and persistentState should default to optional
3102         https://bugs.webkit.org/show_bug.cgi?id=192815
3103
3104         Reviewed by Jer Noble.
3105
3106         https://www.w3.org/TR/encrypted-media/#dom-mediakeysystemconfiguration
3107         says that distinctiveIdentifier and persistentState default to
3108         optional. Our implementation does not define a default leaving it
3109         to the first option of the enum, which currently is Required.
3110
3111         * platform/encryptedmedia/CDMKeySystemConfiguration.h:
3112
3113 2018-12-19  Rob Buis  <rbuis@igalia.com>
3114
3115         Merge parseAccessControlExposeHeadersAllowList into parseAccessControlAllowList
3116         https://bugs.webkit.org/show_bug.cgi?id=192288
3117
3118         Reviewed by Frédéric Wang.
3119
3120         Prefer return value to out parameter for parseAccessControlAllowList.
3121
3122         * loader/CrossOriginPreflightResultCache.cpp:
3123         (WebCore::CrossOriginPreflightResultCacheItem::parse):
3124         * platform/network/HTTPParsers.h:
3125         (WebCore::parseAccessControlAllowList):
3126         * platform/network/ResourceResponseBase.cpp:
3127         (WebCore::ResourceResponseBase::filter):
3128         (WebCore::ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingToTainting):
3129
3130 2018-12-18  Zan Dobersek  <zdobersek@igalia.com>
3131
3132         REGRESSION(r235165): [GTK][WPE] Garbled rendering on GitLab
3133         https://bugs.webkit.org/show_bug.cgi?id=192230
3134
3135         Reviewed by Carlos Garcia Campos.
3136
3137         Single tile can after r235165 be assigned multiple content updates
3138         without a commit occurring between each update, whereas before these
3139         commits were done for each update.
3140
3141         To avoid repeating updates for a single tile purging information about
3142         the previous update, these updates are now accumulated inside a Vector
3143         and then iterated over during the commit phase.
3144
3145         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
3146         (WebCore::CoordinatedBackingStoreTile::addUpdate):
3147         (WebCore::CoordinatedBackingStoreTile::swapBuffers):
3148         (WebCore::CoordinatedBackingStore::updateTile):
3149         (WebCore::CoordinatedBackingStoreTile::setBackBuffer): Deleted.
3150         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.h:
3151         (WebCore::CoordinatedBackingStoreTile::scale const):
3152
3153 2018-12-18  Wenson Hsieh  <wenson_hsieh@apple.com>
3154
3155         [iOS] A copied text selection is pasted as a web archive attachment in the entry view in Messages
3156         https://bugs.webkit.org/show_bug.cgi?id=192842
3157         <rdar://problem/46823586>
3158
3159         Reviewed by Tim Horton.
3160
3161         Temporarily revert a behavior change introduced by r238661, where we now add "com.apple.webarchive" as a
3162         registered UTI when dragging or copying a text selection. This broke the Messages app on iOS, which currently
3163         inserts a copied or dragged text selection from WebKit-based views as a web archive file attachment. A fix for
3164         this is internally tracked in <rdar://problem/46830277>.
3165
3166         * platform/ios/PlatformPasteboardIOS.mm:
3167         (WebCore::PlatformPasteboard::write):
3168
3169 2018-12-18  Michael Catanzaro  <mcatanzaro@igalia.com>
3170
3171         Unreviewed, add a missing UNUSED_PARAM()
3172
3173         * Modules/mediarecorder/MediaRecorder.cpp:
3174         (WebCore::MediaRecorder::getPrivateImpl):
3175
3176 2018-12-18  Justin Michaud  <justin_michaud@apple.com>
3177
3178         Update CSS Properties and Values API to use new cycle fallback behaviour
3179         https://bugs.webkit.org/show_bug.cgi?id=192800
3180
3181         Reviewed by Antti Koivisto.
3182
3183         Make CSS variables that are registered and involved in a cycle be treated as invalid. This also fixes a crash in the
3184         wpt tests where relative units and calc() in a registered property's initial value would break things instead of failing. 
3185
3186         * css/CSSCustomPropertyValue.h:
3187         * css/CSSVariableReferenceValue.cpp:
3188         (WebCore::resolveVariableReference):
3189         * css/DOMCSSRegisterCustomProperty.cpp:
3190         (WebCore::DOMCSSRegisterCustomProperty::registerProperty):
3191         * css/StyleResolver.cpp:
3192         (WebCore::StyleResolver::applyCascadedCustomProperty):
3193         * css/parser/CSSPropertyParser.cpp:
3194         (WebCore::CSSPropertyParser::parseTypedCustomPropertyValue):
3195
3196 2018-12-18  Daniel Bates  <dabates@apple.com>
3197
3198         Wrong value for key property in keydown and keyup events generated holding Control key
3199         https://bugs.webkit.org/show_bug.cgi?id=192788
3200         <rdar://problem/46795214>
3201
3202         Reviewed by Wenson Hsieh.
3203
3204         Similar to what we do on Mac, compute the DOM key property from the characters ignoring
3205         modifier keys input string when the Control key is held down.
3206
3207         * platform/ios/PlatformEventFactoryIOS.mm:
3208         (WebCore::keyForKeyEvent):
3209         * platform/mac/PlatformEventFactoryMac.mm:
3210         (WebCore::keyForKeyEvent):
3211
3212 2018-12-18  Sihui Liu  <sihui_liu@apple.com>
3213
3214         Clean up IndexedDB files between tests
3215         https://bugs.webkit.org/show_bug.cgi?id=192796
3216
3217         Reviewed by Geoffrey Garen.
3218
3219         We should clean up the IndexedDB files between tests to make sure each test is independent of others.
3220
3221         This patch also fixes some issues in IDB.
3222
3223         Covered by existing tests.
3224
3225         * Modules/indexeddb/server/IDBServer.cpp:
3226         (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesModifiedSince):
3227         We should shut down all open databases instead of databases from open database connections before deleting 
3228         files, because database starts accessing files before connection to database is established.
3229
3230         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3231         (WebCore::IDBServer::UniqueIDBDatabase::shutdownForClose):
3232         We should shutdown database after tasks in queue are completed, because tasks have pointer of UniqueIDBDatabase 
3233         and UniqueIDBDatabase can be destructed after shutdown.
3234
3235         (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
3236         didDeleteBackingStore can be posted to main thread after immediateCloseForUserDelete, and timer should not be 
3237         invoked during the hard close.
3238
3239         (WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
3240         Tasks like didOpenBackingStore could be posted from database thread to main thread after 
3241         immediateCloseForUserDelete, but we know the backing store will be deleted soon, so no need to handle any 
3242         database operation. 
3243
3244         (WebCore::IDBServer::UniqueIDBDatabase::performPrefetchCursor):
3245         performPrefetchCursor needs to be aware of whether UniqueIDBDatabase is being closed, so that it will not access 
3246         m_backingStore when m_backingStore may already be deleted. 
3247
3248         (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):
3249         immediateCloseForUserDelete does not handle transactions that are in the process of commit or abort. 
3250         m_objectStoreTransactionCounts and m_objectStoreWriteTransactions may be used by those transactions in 
3251         transactionCompleted, so they do not need to be cleared here.
3252
3253 2018-12-18  Myles C. Maxfield  <mmaxfield@apple.com>
3254
3255         Thick overlines and line-throughs grow in the wrong direction
3256         https://bugs.webkit.org/show_bug.cgi?id=192264
3257
3258         Reviewed by Dean Jackson.
3259
3260         Overlines should grow upward, and line-throughs should stay centered.
3261
3262         Test: fast/css3-text/css3-text-decoration/text-decoration-thicknes-overline-grow-direction.html
3263
3264         * rendering/TextDecorationPainter.cpp:
3265         (WebCore::TextDecorationPainter::paintTextDecoration):
3266         * style/InlineTextBoxStyle.cpp:
3267         (WebCore::visualOverflowForDecorations):
3268
3269 2018-12-18  Ryosuke Niwa  <rniwa@webkit.org>
3270
3271         Some iOS app crash in FrameLoader::checkCompleted
3272         https://bugs.webkit.org/show_bug.cgi?id=192804
3273         <rdar://problem/44240573>
3274
3275         Reviewed by Tim Horton.
3276
3277         It's possible for the main thread to call into WebCore / UIWebView selectors while Web thread
3278         is trying to send a delegate message. Disable the release assertion while this is happening
3279         so that iOS app would not crash.
3280
3281         Unfortunately no new test as there is no way to easily test UIWebView in iOS,
3282         and this requires a race between the web thread & the main thread.
3283
3284         * dom/ScriptDisallowedScope.h:
3285         (WebCore::ScriptDisallowedScope::InMainThread::isScriptAllowed):
3286         * platform/ios/wak/WebCoreThread.h:
3287         * platform/ios/wak/WebCoreThread.mm:
3288         (WebThreadDelegateMessageScope::WebThreadDelegateMessageScope):
3289         (WebThreadDelegateMessageScope::~WebThreadDelegateMessageScope):
3290         (SendDelegateMessage):
3291
3292 2018-12-18  David Kilzer  <ddkilzer@apple.com>
3293
3294         clang-tidy: Use const reference for MediaTime parameter to prevent object copy
3295         <https://webkit.org/b/192814>
3296
3297         Reviewed by Mark Lam.
3298
3299         * bindings/js/JSDOMConvertNumbers.h:
3300         (WebCore::JSConverter<IDLUnrestrictedDouble>::convert):
3301
3302 2018-12-18  Justin Fan  <justin_fan@apple.com>
3303
3304         [WebGPU] BindGroupLayout and Device::createBindGroupLayout
3305         https://bugs.webkit.org/show_bug.cgi?id=192817
3306
3307         Reviewed by Dean Jackson.
3308
3309         Update bind-group-layouts to test new functionality.
3310
3311         Implement the emtpy WebGPUBindGroupLayout interface, and enable creation via WebGPUDevice::createBindGroupLayout:
3312         * Modules/webgpu/WebGPUBindGroupLayout.cpp: Added.
3313         (WebCore::WebGPUBindGroupLayout::create):
3314         (WebCore::WebGPUBindGroupLayout::WebGPUBindGroupLayout):
3315         * Modules/webgpu/WebGPUBindGroupLayout.h: Added.
3316         * Modules/webgpu/WebGPUBindGroupLayout.idl: Added. Empty interface for now.
3317         * Modules/webgpu/WebGPUDevice.cpp:
3318         (WebCore::WebGPUDevice::createBindGroupLayout const): Added.
3319         * Modules/webgpu/WebGPUDevice.h:
3320         * Modules/webgpu/WebGPUDevice.idl:
3321         * platform/graphics/gpu/GPUBindGroupLayout.cpp: Added.
3322         (WebCore::GPUBindGroupLayout::tryCreate):
3323         (WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
3324         * platform/graphics/gpu/GPUBindGroupLayout.h: Added.
3325         * platform/graphics/gpu/GPUDevice.cpp:
3326         (WebCore::GPUDevice::tryCreateBindGroupLayout const): Added.
3327         * platform/graphics/gpu/GPUDevice.h:
3328
3329         Add files and symbols to project:
3330         * CMakeLists.txt:
3331         * DerivedSources.make:
3332         * Sources.txt:
3333         * WebCore.xcodeproj/project.pbxproj:
3334         * bindings/js/WebCoreBuiltinNames.h:
3335
3336         Missing includes that were previously provided via UnifiedSources:
3337         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
3338         * platform/sql/SQLiteFileSystem.h:
3339
3340 2018-12-18  Youenn Fablet  <youenn@apple.com>
3341
3342         Make ReadableStreamXX constructs use PrivateIdentifier
3343         https://bugs.webkit.org/show_bug.cgi?id=192771
3344
3345         Reviewed by Chris Dumez.
3346
3347         PrivateIdentifier is a better name for making sure a given construct does not show up in the global scope.
3348         Covered by existing binding tests.
3349
3350         * Modules/streams/ReadableByteStreamController.idl:
3351         * Modules/streams/ReadableStreamBYOBReader.idl:
3352         * Modules/streams/ReadableStreamBYOBRequest.idl:
3353         * Modules/streams/ReadableStreamDefaultController.idl:
3354         * Modules/streams/ReadableStreamDefaultReader.idl:
3355         * bindings/scripts/CodeGeneratorJS.pm:
3356         (NeedsConstructorProperty):
3357         * bindings/scripts/preprocess-idls.pl:
3358         (shouldExposeInterface):
3359         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: Removed.
3360         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h: Removed.
3361         * bindings/scripts/test/TestCustomConstructor.idl: Removed.
3362
3363 2018-12-18  Zalan Bujtas  <zalan@apple.com>
3364
3365         Synchronous media query evaluation could destroy current Frame/FrameView.
3366         https://bugs.webkit.org/show_bug.cgi?id=192781
3367         <rdar://problem/34416793>
3368
3369         Reviewed by Chris Dumez.
3370
3371         Protect Frame and FrameView when coming back from printing and check if the current Frame/FrameView/FrameLoader objects are still valid.
3372
3373         Test: printing/print-with-media-query-destory.html
3374
3375         * loader/DocumentLoader.cpp:
3376         (WebCore::DocumentLoader::finishedLoading):
3377         * page/Frame.cpp:
3378         (WebCore::Frame::setPrinting):
3379         * page/FrameView.cpp:
3380         (WebCore::FrameView::forceLayoutForPagination):
3381
3382 2018-12-18  Joseph Pecoraro  <pecoraro@apple.com>
3383
3384         Web Inspector: m3u8 content not shown, it should be text
3385         https://bugs.webkit.org/show_bug.cgi?id=192731
3386         <rdar://problem/46747728>
3387
3388         Reviewed by Devin Rousso.
3389
3390         * inspector/NetworkResourcesData.cpp:
3391         (WebCore::NetworkResourcesData::setResourceContent):
3392         Don't clobber data if setting empty content on a resource that has content.
3393
3394         * inspector/agents/InspectorNetworkAgent.cpp:
3395         (WebCore::InspectorNetworkAgent::shouldTreatAsText):
3396         Additional non-"text/" mime types that can be treated as text.
3397
3398         * platform/MIMETypeRegistry.cpp:
3399         (WebCore::MIMETypeRegistry::isTextMediaPlaylistMIMEType):
3400         * platform/MIMETypeRegistry.h:
3401         Detect media playlist mime types that are text (m3u8/m3u).
3402
3403 2018-12-18  Daniel Bates  <dabates@apple.com>
3404
3405         Remove <meta http-equiv=set-cookie> support
3406         https://bugs.webkit.org/show_bug.cgi?id=185077
3407         <rdar://problem/41791397>
3408
3409         Reviewed by Brent Fulgham.
3410
3411         Remove support for the HTTP-equiv. pragma Set-Cookie to set a cookie. In <https://github.com/whatwg/html/pull/3649>
3412         the HTML living standard was ammended to define this pragma as no-op. Chrome and Edge have also
3413         removed support for this pragma and Firefox has an open bug to remove it.
3414
3415         * dom/Document.cpp:
3416         (WebCore::Document::processHttpEquiv): Emit a message that the Set-Cookie pragma is obsolete and
3417         was ignored instead of setting the cookie.
3418         * html/parser/XSSAuditor.cpp:
3419         (WebCore::isDangerousHTTPEquiv): We no longer need to consider the Set-Cookie pragma
3420         as dangerous and erase attribute http-equiv when we find it because we no longer honor
3421         this pragma.
3422
3423 2018-12-18  Justin Michaud  <justin_michaud@apple.com>
3424
3425         CSS Typed OM should expose attributeStyleMap
3426         https://bugs.webkit.org/show_bug.cgi?id=192671
3427
3428         Reviewed by Ryosuke Niwa.
3429
3430         Exposes element.attributeStyleMap, adds a stub for the StylePropertyMap class, and updates the existing
3431         TypedOMCSSImageValue to not require a RenderObject so that it can still work inside attributeStyleMap.
3432
3433         Test: css-typedom/attributeStyleMap.html
3434
3435         * CMakeLists.txt:
3436         * DerivedSources.make:
3437         * Sources.txt:
3438         * WebCore.xcodeproj/project.pbxproj:
3439         * bindings/js/WebCoreBuiltinNames.h:
3440         * css/ElementCSSInlineStyle.idl:
3441         * css/typedom/StylePropertyMap.h: Copied from Source/WebCore/css/typedom/StylePropertyMapReadOnly.h.
3442         * css/typedom/StylePropertyMap.idl: Copied from Source/WebCore/css/typedom/StylePropertyMapReadOnly.idl.
3443         * css/typedom/StylePropertyMapReadOnly.cpp: Added.
3444         (WebCore::StylePropertyMapReadOnly::reifyValue):
3445         (WebCore::StylePropertyMapReadOnly::customPropertyValueOrDefault):
3446         * css/typedom/StylePropertyMapReadOnly.h:
3447         (WebCore::StylePropertyMapReadOnly::create): Deleted.
3448         (WebCore::StylePropertyMapReadOnly::get const): Deleted.
3449         (WebCore::StylePropertyMapReadOnly::StylePropertyMapReadOnly): Deleted.
3450         * css/typedom/StylePropertyMapReadOnly.idl:
3451         * css/typedom/TypedOMCSSImageValue.h:
3452         * dom/Element.cpp:
3453         (WebCore::Element::attributeStyleMap):
3454         (WebCore::Element::setAttributeStyleMap):
3455         * dom/Element.h:
3456         * dom/ElementRareData.cpp:
3457         * dom/ElementRareData.h:
3458         (WebCore::ElementRareData::attributeStyleMap):
3459         (WebCore::ElementRareData::setAttributeStyleMap):
3460         * dom/StyledElement.cpp:
3461         (WebCore::StyledElement::ensureAttributeStyleMap):
3462         * dom/StyledElement.h:
3463         * html/canvas/CanvasRenderingContext2DBase.cpp:
3464         (WebCore::size):
3465         (WebCore::CanvasRenderingContext2DBase::drawImage):
3466         * platform/graphics/CustomPaintImage.cpp:
3467         (WebCore::extractComputedProperty):
3468         (WebCore::CustomPaintImage::doCustomPaint):
3469
3470 2018-12-18  Wenson Hsieh  <wenson_hsieh@apple.com>
3471
3472         Calling setValue() while typing should invoke -textDidChangeInTextField in the injected bundle
3473         https://bugs.webkit.org/show_bug.cgi?id=192785
3474         <rdar://problem/45321184>
3475
3476         Reviewed by Tim Horton.
3477
3478         Makes a minor adjustment in `TextFieldInputType::setValue` to consider value changes as "user editing", if we're
3479         currently processing a keystroke from the user. This is useful for certain private clients, such as Safari, that
3480         need to know when the user is typing in a text form control, but the page is preventing default text insertion
3481         behavior and instead updating values programmatically.
3482
3483         Test: fast/forms/call-text-did-change-in-text-field-when-typing.html
3484
3485         * html/TextFieldInputType.cpp:
3486         (WebCore::TextFieldInputType::setValue):
3487
3488 2018-12-18  Zalan Bujtas  <zalan@apple.com>
3489
3490         [LFC][BFC][MarginCollapsing] Implement marginBeforeCollapsesWithParentMarginAfter
3491         https://bugs.webkit.org/show_bug.cgi?id=192801
3492
3493         Reviewed by Antti Koivisto.
3494
3495         * layout/blockformatting/BlockFormattingContext.h:
3496         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
3497         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
3498         * layout/blockformatting/BlockMarginCollapse.cpp:
3499         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithParentMarginAfter):
3500
3501 2018-12-18  Zalan Bujtas  <zalan@apple.com>
3502
3503         [LFC][BFC][MarginCollapsing] Implement marginAfterCollapsesWithSiblingMarginBeforeWithClearance
3504         https://bugs.webkit.org/show_bug.cgi?id=192799
3505
3506         Reviewed by Antti Koivisto.
3507
3508         * layout/blockformatting/BlockFormattingContext.h:
3509         * layout/blockformatting/BlockMarginCollapse.cpp:
3510         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance):
3511         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginAfter):
3512
3513 2018-12-18  Zalan Bujtas  <zalan@apple.com>
3514
3515         [LFC][BFC][MarginCollapsing] Implement marginAfterCollapsesWithParentMarginBefore
3516         https://bugs.webkit.org/show_bug.cgi?id=192798
3517
3518         Reviewed by Antti Koivisto.
3519
3520         * layout/blockformatting/BlockFormattingContext.h:
3521         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
3522         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
3523         * layout/blockformatting/BlockMarginCollapse.cpp:
3524         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginAfterFromLastChild):
3525         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginBefore):
3526         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginAfter):
3527         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfter):
3528
3529 2018-12-18  Zalan Bujtas  <zalan@apple.com>
3530
3531         [LFC][BFC][MarginCollapsing] Expand marginsCollapseThrough collapsing logic
3532         https://bugs.webkit.org/show_bug.cgi?id=192794
3533
3534         Reviewed by Antti Koivisto.
3535
3536         * layout/blockformatting/BlockFormattingContext.h:
3537         * layout/blockformatting/BlockMarginCollapse.cpp:
3538         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginsCollapseThrough):
3539         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBefore):
3540         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfter):
3541
3542 2018-12-18  Zalan Bujtas  <zalan@apple.com>
3543
3544         [LFC][BFC][MarginCollapsing] Expand marginAfterCollapsesWithNextSibling and marginBeforeCollapsesWithPreviousSibling collapsing logic
3545         https://bugs.webkit.org/show_bug.cgi?id=192791
3546
3547         Reviewed by Antti Koivisto.
3548
3549         * layout/blockformatting/BlockMarginCollapse.cpp:
3550         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithPreviousSibling):
3551         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithNextSibling):
3552
3553 2018-12-18  Zalan Bujtas  <zalan@apple.com>
3554
3555         [LFC][BFC][MarginCollapsing] Expand marginAfterCollapsesWithParentMarginAfter and marginBeforeCollapsesWithParentMarginBefore collapsing logic
3556         https://bugs.webkit.org/show_bug.cgi?id=192787
3557
3558         Reviewed by Antti Koivisto.
3559
3560         * layout/blockformatting/BlockFormattingContext.h:
3561         * layout/blockformatting/BlockMarginCollapse.cpp:
3562         (WebCore::Layout::hasClearance):
3563         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore):
3564         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance):
3565         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginBefore):
3566         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginAfter):
3567
3568 2018-12-17  Fujii Hironori  <Hironori.Fujii@sony.com>
3569
3570         [Win][Clang] Fix compilation warnings WebCore/platform/graphics directory
3571         https://bugs.webkit.org/show_bug.cgi?id=192752
3572
3573         Reviewed by Don Olmstead.
3574
3575         No new tests, no behavior changes.
3576
3577         * platform/graphics/win/DIBPixelData.cpp:
3578         Enclosed bitmapType and bitmapPixelsPerMeter with #ifndef NDEBUG.
3579         * platform/graphics/win/FontPlatformDataWin.cpp:
3580         (WebCore::FontPlatformData::openTypeTable const): Use ASSERT_UNUSED instead of ASSERT.
3581         * platform/graphics/win/GraphicsContextWin.cpp: Removed unused variable 'deg2rad'.
3582         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
3583         Removed unused soft links MFCreateSampleGrabberSinkActivate, MFCreateMemoryBuffer and MFCreateSample.
3584         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation):
3585         Reorder the initializer list.
3586         (WebCore::MediaPlayerPrivateMediaFoundation::seek): Use ASSERT_UNUSED instead of ASSERT.
3587         (WebCore::MediaPlayerPrivateMediaFoundation::setAllChannelVolumes): Ditto.
3588         (WebCore::MediaPlayerPrivateMediaFoundation::createSession): Ditto.
3589         (WebCore::MediaPlayerPrivateMediaFoundation::endSession): Ditto.
3590         (WebCore::MediaPlayerPrivateMediaFoundation::onCreatedMediaSource): Ditto.
3591         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::paintCurrentFrame): Added default case.
3592         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
3593         (WebCore::Font::platformBoundsForGlyph const): Use inner braces to initialize subobjects of MAT2.
3594         * platform/graphics/win/SimpleFontDataWin.cpp: Removed unused 'cSmallCapsFontSizeMultiplier'.
3595         (WebCore::Font::initGDIFont): Use inner braces to initialize subobjects of MAT2.
3596         (WebCore::Font::boundsForGDIGlyph const): Ditto.
3597         (WebCore::Font::widthForGDIGlyph const): Ditto.
3598         * platform/graphics/win/UniscribeController.cpp:
3599         (WebCore::UniscribeController::UniscribeController):
3600         Reorder the initializer list.
3601         (WebCore::UniscribeController::offsetForPosition): Use parentheses to combine && and ||.
3602         (WebCore::UniscribeController::shapeAndPlaceItem): Removed unused 'glyphCount'.
3603
3604 2018-12-17  Eric Carlson  <eric.carlson@apple.com>
3605
3606         [MediaStream] A stream's first video frame should be rendered
3607         https://bugs.webkit.org/show_bug.cgi?id=192629
3608         <rdar://problem/46664353>
3609
3610         Reviewed by Youenn Fablet.
3611
3612         Test: fast/mediastream/media-stream-renders-first-frame.html
3613
3614         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
3615         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
3616         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample):
3617         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
3618         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentDisplayMode const):
3619         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayMode):
3620         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play):
3621         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentReadyState):
3622         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::characteristicsChanged):
3623         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::checkSelectedVideoTrack):
3624         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext):
3625         * platform/mediastream/RealtimeMediaSource.cpp:
3626         (WebCore::RealtimeMediaSource::size const):
3627         * platform/mediastream/mac/AVVideoCaptureSource.mm:
3628         (WebCore::AVVideoCaptureSource::processNewFrame):
3629         * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
3630         (WebCore::RealtimeIncomingVideoSourceCocoa::processNewSample):
3631
3632 2018-12-17  Justin Michaud  <justin_michaud@apple.com>
3633
3634         Bindings generator should support Conditional= along with CachedAttribute
3635         https://bugs.webkit.org/show_bug.cgi?id=192721
3636
3637         Reviewed by Ryosuke Niwa.
3638
3639         Fix a bug where specifying both attributes causes compilation errors because the compile-time
3640         condition is not included in the derived code.
3641
3642         * bindings/scripts/CodeGeneratorJS.pm:
3643         (GenerateImplementation):
3644         * bindings/scripts/test/JS/JSTestObj.cpp:
3645         (WebCore::jsTestObjCachedAttribute3Getter):
3646         (WebCore::jsTestObjCachedAttribute3):
3647         (WebCore::JSTestObj::visitChildren):
3648         * bindings/scripts/test/JS/JSTestObj.h:
3649         * bindings/scripts/test/TestObj.idl:
3650
3651 2018-12-17  David Kilzer  <ddkilzer@apple.com>
3652
3653         clang-tidy: Fix unnecessary object copy in CPUMonitor::setCPULimit()
3654         <https://webkit.org/b/192707>
3655         <rdar://problem/46734926>
3656
3657         Reviewed by Daniel Bates.
3658
3659         * platform/CPUMonitor.cpp:
3660         (WebCore::CPUMonitor::setCPULimit):
3661         * platform/CPUMonitor.h:
3662         (WebCore::CPUMonitor::setCPULimit):
3663         - Change parameter to const reference to fix unnecessary copies.
3664
3665 2018-12-17  Ryosuke Niwa  <rniwa@webkit.org>
3666
3667         offsetLeft and offsetParent should adjust across shadow boundaries
3668         https://bugs.webkit.org/show_bug.cgi?id=157437
3669         <rdar://problem/26154021>
3670
3671         Reviewed by Simon Fraser.
3672
3673         Update the WebKit's treatment of shadow boundaries in offsetLeft, offsetTop, and offsetParent to match
3674         the latest discussion in CSS WG. See https://github.com/w3c/webcomponents/issues/497
3675         and https://github.com/w3c/webcomponents/issues/763
3676
3677         The latest consensus is to use the retargeting algorithm (https://dom.spec.whatwg.org/#retarget).
3678         In practice, this would mean that we need to keep walking up the offset parent ancestors until we find
3679         the one which is in the same tree as a shadow-inclusive ancestor of the context object.
3680
3681         For example, if a node (the context object of offsetTop, offsetLeft, offsetParent) was assigned to a slot
3682         inside a shadow tree and its offset parent was in the shadow tree, we need to walk up to its offset parent,
3683         then its offset parent, etc... until we find the offset parent in the same tree as the context object.
3684
3685         Note it's possible that the context object is inside a shadow tree which does not have its own offset parent.
3686         (e.g. all elements have position: static) For this reason, we need to consider not just offset parent in
3687         the same tree as the context object but as well as any offset parent which is in its ancestor trees.
3688
3689         Test: fast/shadow-dom/offsetParent-across-shadow-boundaries.html
3690
3691         * dom/Element.cpp:
3692         (WebCore::adjustOffsetForZoomAndSubpixelLayout): Extracted to share code between offsetLeft and offsetTop.
3693         (WebCore::collectAncestorTreeScopeAsHashSet): Added.
3694         (WebCore::Element::offsetLeftForBindings): Added. Sums up offsetLeft's until it finds the first offset parent
3695         which is a shadow-including ancestor (https://dom.spec.whatwg.org/#concept-shadow-including-ancestor).
3696         (WebCore::Element::offsetLeft): Now uses adjustOffsetForZoomAndSubpixelLayout.
3697         (WebCore::Element::offsetTopForBindings): Added. Like offsetLeftForBindings, this function sums up offsetTop's
3698         until it finds the first offset parent which is a shadow-including ancestor.
3699         (WebCore::Element::offsetTop): Now uses adjustOffsetForZoomAndSubpixelLayout.
3700         (WebCore::Element::offsetParentForBindings): Renamed from bindingsOffsetParent to be consistent with other
3701         functions meant to be used for bindings code.
3702         * dom/Element.h:
3703         * html/HTMLElement.idl:
3704
3705 2018-12-17  Simon Fraser  <simon.fraser@apple.com>
3706
3707         Don't use more expensive layer backing store formats when subpixel text antialiasing is not enabled
3708         https://bugs.webkit.org/show_bug.cgi?id=192780
3709         rdar://problem/43394387
3710
3711         Reviewed by Tim Horton.
3712         
3713         macOS Mojave disabled text subpixel antialiasing by default, so we no longer need to use the
3714         memory-hungry "linear glyph mask" CALayer backing store formats for non-opaque with text in them.
3715         
3716         Add FontCascade::isSubpixelAntialiasingAvailable() which reports whether subpixel antialiasing is available,
3717         and consult it when making decisions that affect layer backing store format.
3718
3719         Tested by new results for existing tests.
3720
3721         * platform/graphics/FontCascade.cpp:
3722         (WebCore::FontCascade::isSubpixelAntialiasingAvailable):
3723         * platform/graphics/FontCascade.h:
3724         * platform/graphics/cocoa/FontCascadeCocoa.mm:
3725         (WebCore::FontCascade::isSubpixelAntialiasingAvailable): CGFontRenderingGetFontSmoothingDisabled() isn't super cheap, so fetch
3726         it once.
3727         * rendering/RenderLayerBacking.cpp:
3728         (WebCore::RenderLayerBacking::updateAfterDescendants):
3729         * testing/Internals.cpp:
3730         (WebCore::Internals::setFontSmoothingEnabled): Remove a WebCore::
3731
3732 2018-12-17  Daniel Bates  <dabates@apple.com>
3733
3734         Make DocumentMarker::allMarkers() constexpr
3735         https://bugs.webkit.org/show_bug.cgi?id=192634
3736
3737         Reviewed by Simon Fraser.
3738
3739         The result of DocumentMarker::allMarkers() can be computed at compile time. We should annotate
3740         it constexpr to do just that.
3741
3742         * dom/DocumentMarker.h:
3743         (WebCore::DocumentMarker::allMarkers):
3744
3745 2018-12-17  Justin Fan  <justin_fan@apple.com>
3746
3747         [WebGPU] Implement WebGPUBindGroupLayoutDescriptor and its supporting dictionaries
3748         https://bugs.webkit.org/show_bug.cgi?id=192726
3749
3750         Reviewed by Myles C. Maxfield.
3751
3752         Test: webgpu/bind-group-layouts.html
3753         Implement the WebGPUBindGroupLayoutDescriptor struct and its sub-structs:
3754         * Modules/streams/WebGPUBindGroupLayoutDescriptor.h: Added.
3755         * Modules/streams/WebGPUBindGroupLayoutDescriptor.idl: Added.
3756         * Modules/webgpu/WebGPUBindGroupLayoutBinding.h: Added.
3757         * Modules/webgpu/WebGPUBindGroupLayoutBinding.idl: Added.
3758         * Modules/webgpu/WebGPUShaderStageBit.h: Added.
3759         * Modules/webgpu/WebGPUShaderStageBit.idl: Added.
3760         * platform/graphics/gpu/GPUBindGroupLayoutBinding.h: Added.
3761         * platform/graphics/gpu/GPUBindGroupLayoutDescriptor.h: Added.
3762
3763         Add the new symbols and files to the project:
3764         * CMakeLists.txt:
3765         * DerivedSources.make:
3766         * Sources.txt:
3767         * WebCore.xcodeproj/project.pbxproj:
3768         * bindings/js/WebCoreBuiltinNames.h:
3769
3770         Small FIXME update for later:
3771         * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
3772         (WebCore::GPURenderPassEncoder::setVertexBuffers):
3773
3774 2018-12-17  Zalan Bujtas  <zalan@apple.com>
3775
3776         Unreviewed build fix.
3777
3778         * page/ios/FrameIOS.mm:
3779         (WebCore::Frame::interpretationsForCurrentRoot const):
3780
3781 2018-12-17  Zalan Bujtas  <zalan@apple.com>
3782
3783         Reproducible ASSERTion failure when toggling layer borders with find-in-page up
3784         https://bugs.webkit.org/show_bug.cgi?id=192762
3785         <rdar://problem/46676873>
3786
3787         Reviewed by Simon Fraser.
3788
3789         DocumentMarkerController::markersFor() should take a reference instead of a Node*.
3790
3791         Test: editing/document-marker-null-check.html
3792
3793         * dom/DocumentMarkerController.cpp:
3794         (DocumentMarkerController::hasMarkers):
3795         * dom/DocumentMarkerController.h:
3796         * editing/AlternativeTextController.cpp:
3797         (WebCore::AlternativeTextController::respondToChangedSelection):
3798         * editing/Editor.cpp:
3799         (WebCore::Editor::selectionStartHasMarkerFor const):
3800         * rendering/InlineTextBox.cpp:
3801         (WebCore::InlineTextBox::collectMarkedTextsForDocumentMarkers const):
3802         * rendering/RenderReplaced.cpp:
3803         (WebCore::RenderReplaced::paint):
3804         * rendering/RenderText.cpp:
3805         (WebCore::RenderText::draggedContentRangesBetweenOffsets const):
3806         * rendering/SimpleLineLayout.cpp:
3807         (WebCore::SimpleLineLayout::canUseForWithReason):
3808         * testing/Internals.cpp:
3809         (WebCore::Internals::markerCountForNode):
3810
3811 2018-12-17  Commit Queue  <commit-queue@webkit.org>
3812
3813         Unreviewed, rolling out r239265 and r239274.
3814         https://bugs.webkit.org/show_bug.cgi?id=192765
3815
3816         unorm_normalize is deprecated, and broke an internal build
3817         (Requested by Truitt on #webkit).
3818
3819         Reverted changesets:
3820
3821         "[GTK][WPE] Need a function to convert internal URI to display
3822         ("pretty") URI"
3823         https://bugs.webkit.org/show_bug.cgi?id=174816
3824         https://trac.webkit.org/changeset/239265
3825
3826         "Fix the Apple Internal Mac build with a newer SDK"
3827         https://trac.webkit.org/changeset/239274
3828
3829 2018-12-17  Daniel Bates  <dabates@apple.com>
3830
3831         [iOS] Remove -[WebEvent initWithKeyEventType:...:characterSet:]
3832         https://bugs.webkit.org/show_bug.cgi?id=192633
3833
3834         Reviewed by Wenson Hsieh.
3835
3836         UIKit has long adopted the newer -[WebEvent initWithKeyEventType:] initializer that takes an
3837         input manager hint. We no longer need to keep the variant -[WebEvent initWithKeyEventType:...:characterSet:]
3838         for binary compatibility.
3839
3840         * platform/ios/WebEvent.h:
3841         * platform/ios/WebEvent.mm:
3842         (-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:withFlags:keyCode:isTabKey:characterSet:]): Deleted.
3843
3844 2018-12-17  Matt Lewis  <jlewis3@apple.com>
3845
3846         Unreviewed, rolling out r239254.
3847
3848         This broke the Windows 10 Debug build
3849
3850         Reverted changeset:
3851
3852         "Replace many uses of String::format with more type-safe
3853         alternatives"
3854         https://bugs.webkit.org/show_bug.cgi?id=192742
3855         https://trac.webkit.org/changeset/239254
3856
3857 2018-12-17  Antoine Quint  <graouts@apple.com>
3858
3859         [Web Animations] Remove the redundant m_scheduledMicrotask from WebAnimation
3860         https://bugs.webkit.org/show_bug.cgi?id=192758
3861
3862         Reviewed by Dean Jackson.
3863
3864         We tracked whether we had a pending microtask twice so we remove the m_scheduledMicrotask flag as m_finishNotificationStepsMicrotaskPending
3865         gives us enough information as it is. Additionally, we remove the scheduleMicrotaskIfNeeded() and performMicrotask() functions since there is
3866         less bookkeeping to perform.
3867
3868         No new test since there is no user-observable change.
3869
3870         * animation/WebAnimation.cpp:
3871         (WebCore::WebAnimation::updateFinishedState):
3872         (WebCore::WebAnimation::scheduleMicrotaskIfNeeded): Deleted.
3873         (WebCore::WebAnimation::performMicrotask): Deleted.
3874         * animation/WebAnimation.h:
3875
3876 2018-12-17  Antoine Quint  <graouts@apple.com>
3877
3878         [Web Animations] Ensure we don't update an animation's finished state twice when updating animations
3879         https://bugs.webkit.org/show_bug.cgi?id=192757
3880
3881         Reviewed by Dean Jackson.
3882
3883         When animations are udpated and DocumentTimeline::updateAnimationsAndSendEvents() is called, we used to update an animation's finished state
3884         twice since we'd do it once when calling tick() and once again when calling resolve() in the ensuing style invalidation. We now keep track of
3885         whether we've already updated an animation's finished state during animation update in the call to tick() and avoid updating in the immediate
3886         next call to resolve(), unless any of the timing properties have changed in the meantime.
3887
3888         No new test since there is no user-observable change.
3889
3890         * animation/WebAnimation.cpp:
3891         (WebCore::WebAnimation::timingDidChange):
3892         (WebCore::WebAnimation::tick):
3893         (WebCore::WebAnimation::resolve):
3894         * animation/WebAnimation.h:
3895
3896 2018-12-17  Simon Fraser  <simon.fraser@apple.com>
3897
3898         REGRESSION (r233268): Elements animated in from offscreen sometimes don't display
3899         https://bugs.webkit.org/show_bug.cgi?id=192725
3900         rdar://problem/46011418
3901
3902         Reviewed by Antoine Quint.
3903
3904         There were two problems with backing store attachment and animation.
3905         
3906         First, animations are an input into the "backing store attached" logic, so when they change
3907         we should set the CoverageRectChanged bit on GraphicsLayerCA.
3908         
3909         Secondly, when an ancestor has unknown animation extent, all its descendants need to
3910         get backing store, so we need to set childCommitState.ancestorWithTransformAnimationIntersectsCoverageRect when
3911         the current layer has no animation extent.
3912
3913         Tests: compositing/backing/animate-into-view-with-descendant.html
3914                compositing/backing/animate-into-view.html
3915
3916         * platform/graphics/ca/GraphicsLayerCA.cpp:
3917         (WebCore::GraphicsLayerCA::addAnimation):
3918         (WebCore::GraphicsLayerCA::removeAnimation):
3919         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
3920
3921 2018-12-17  Zalan Bujtas  <zalan@apple.com>
3922
3923         [LFC][BFC][MarginCollapsing] Unify margin collapse function naming
3924         https://bugs.webkit.org/show_bug.cgi?id=192747
3925
3926         Reviewed by Antti Koivisto.
3927
3928         Rename some margin collapse getters.
3929
3930         * layout/blockformatting/BlockFormattingContext.h:
3931         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
3932         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
3933         * layout/blockformatting/BlockMarginCollapse.cpp:
3934         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginBefore):
3935         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginAfter):
3936         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::nonCollapsedMarginBefore):
3937         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::nonCollapsedMarginAfter):
3938         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginBeforeFromFirstChild):
3939         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginAfterFromLastChild):
3940         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithParentMarginAfter):
3941         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore):
3942         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginAfter):
3943         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithPreviousSibling):
3944         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithNextSibling):
3945         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginsCollapseThrough):
3946         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBefore):
3947         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfter):
3948         (WebCore::Layout::isMarginBeforeCollapsedWithSibling): Deleted.
3949         (WebCore::Layout::isMarginAfterCollapsedWithSibling): Deleted.
3950         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::isMarginBeforeCollapsedWithParent): Deleted.
3951         (WebCore::Layout::isMarginAfterCollapsedThrough): Deleted.
3952         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::isMarginAfterCollapsedWithParent): Deleted.
3953         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::isMarginBeforeCollapsedWithParentMarginAfter): Deleted.
3954
3955 2018-12-17  David Kilzer  <ddkilzer@apple.com>
3956
3957         clang-tidy: loop variable is copied but only used as const reference in WebCore, WebKit, Tools
3958         <https://webkit.org/b/192751>
3959         <rdar://problem/46771623>
3960
3961         Reviewed by Daniel Bates.
3962
3963         Change loop variables to const references to avoid unnecessary
3964         copies.
3965
3966         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
3967         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
3968         * Modules/indexeddb/server/MemoryObjectStore.cpp:
3969         (WebCore::IDBServer::MemoryObjectStore::populateIndexWithExistingRecords):
3970         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3971         (WebCore::IDBServer::UniqueIDBDatabase::maybeNotifyConnectionsOfVersionChange):
3972         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
3973         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::objectStoreIdentifiers):
3974         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
3975         (WebCore::IDBDatabaseInfo::IDBDatabaseInfo):
3976         (WebCore::IDBDatabaseInfo::loggingString const):
3977         * Modules/mediasource/SourceBuffer.cpp:
3978         (WebCore::removeSamplesFromTrackBuffer):
3979         * accessibility/AccessibilityRenderObject.cpp:
3980         (WebCore::AccessibilityRenderObject::targetElementForActiveDescendant const):
3981         * accessibility/AccessibilityTableRow.cpp:
3982         (WebCore::AccessibilityTableRow::headerObject):
3983         * animation/KeyframeEffect.cpp: