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