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