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