Modernize SVGURIReference::targetElementFromIRIString
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2018-11-21  Ryosuke Niwa  <rniwa@webkit.org>
2
3         Modernize SVGURIReference::targetElementFromIRIString
4         https://bugs.webkit.org/show_bug.cgi?id=191898
5
6         Reviewed by Daniel Bates.
7
8         Made targetElementFromIRIString return an element and the fragment identifier,
9         and merged urlFromIRIStringWithFragmentIdentifier into it.
10
11         Also replaced the code computing the full URL using the base URL after removing
12         the fragment identifier and rejoining it later with a single call to completeURL.
13
14         No new tests since there should be no observable behavior change.
15
16         * accessibility/AccessibilitySVGElement.cpp:
17         (WebCore::AccessibilitySVGElement::targetForUseElement const):
18         * css/CSSCursorImageValue.cpp:
19         (WebCore::CSSCursorImageValue::updateCursorElement):
20         * rendering/svg/RenderSVGTextPath.cpp:
21         (WebCore::RenderSVGTextPath::layoutPath const):
22         * svg/SVGAltGlyphElement.cpp:
23         (WebCore::SVGAltGlyphElement::hasValidGlyphElements const):
24         * svg/SVGFEImageElement.cpp:
25         (WebCore::SVGFEImageElement::buildPendingResource):
26         * svg/SVGGlyphRefElement.cpp:
27         (WebCore::SVGGlyphRefElement::hasValidGlyphElement const):
28         * svg/SVGLinearGradientElement.cpp:
29         (WebCore::SVGLinearGradientElement::collectGradientAttributes):
30         * svg/SVGMPathElement.cpp:
31         (WebCore::SVGMPathElement::buildPendingResource):
32         (WebCore::SVGMPathElement::pathElement):
33         * svg/SVGRadialGradientElement.cpp:
34         (WebCore::SVGRadialGradientElement::collectGradientAttributes):
35         * svg/SVGTRefElement.cpp:
36         (WebCore::SVGTRefElement::detachTarget):
37         (WebCore::SVGTRefElement::buildPendingResource):
38         * svg/SVGTextPathElement.cpp:
39         (WebCore::SVGTextPathElement::buildPendingResource):
40         * svg/SVGURIReference.cpp:
41         (WebCore::SVGURIReference::targetElementFromIRIString):
42         (WebCore::urlFromIRIStringWithFragmentIdentifier): Deleted.
43         * svg/SVGURIReference.h:
44         * svg/SVGUseElement.cpp:
45         (WebCore::SVGUseElement::findTarget const):
46         * svg/animation/SVGSMILElement.cpp:
47         (WebCore::SVGSMILElement::buildPendingResource):
48         * svg/graphics/filters/SVGFEImage.cpp:
49         (WebCore::FEImage::referencedRenderer const):
50
51 2018-11-22  Dean Jackson  <dino@apple.com>
52
53         Implement WebGPUQueue and device.getQueue()
54         https://bugs.webkit.org/show_bug.cgi?id=191911
55         <rdar://problem/46214871>
56
57         Reviewed by Antoine Quint.
58
59         Implement WebGPUDevice::getQueue(), which creates a WebGPUQueue
60         instance if necessary. Also link WebGPUQueue to the existing
61         GPUQueue object, and expose the label IDL property.
62
63         This patch is based on some work from Justin Fan.
64
65         Test: webgpu/queue-creation.html
66
67         * DerivedSources.make:
68         * Sources.txt:
69         * WebCore.xcodeproj/project.pbxproj:
70             New files.
71
72         * Modules/webgpu/WebGPUCommandBuffer.h:
73         (WebCore::WebGPUCommandBuffer::commandBuffer const):
74             Expose a GPUCommandBuffer getter, used when submitting (even though
75             the actual GPU submission isn't implemented yet).
76
77         * Modules/webgpu/WebGPUDevice.cpp:
78         (WebCore::WebGPUDevice::getQueue):
79         * Modules/webgpu/WebGPUDevice.h:
80         * Modules/webgpu/WebGPUDevice.idl:
81             Implement getQueue().
82
83         * Modules/webgpu/WebGPUQueue.cpp:
84         (WebCore::WebGPUQueue::create):
85         (WebCore::WebGPUQueue::WebGPUQueue):
86         (WebCore::WebGPUQueue::submit):
87         * Modules/webgpu/WebGPUQueue.h:
88         (WebCore::WebGPUQueue::label const):
89         (WebCore::WebGPUQueue::setLabel):
90         * Modules/webgpu/WebGPUQueue.idl:
91             New class. Mostly sends stuff onto GPUQueue.
92
93         * bindings/js/WebCoreBuiltinNames.h:
94             Add WebGPUQueue.
95
96         * platform/graphics/gpu/GPUQueue.h:
97         * platform/graphics/gpu/cocoa/GPUQueueMetal.mm:
98         (WebCore::GPUQueue::create):
99         (WebCore::GPUQueue::submit):
100         (WebCore::GPUQueue::label const):
101         (WebCore::GPUQueue::setLabel const):
102             "label" getter/setter that uses
103             the underlying MTLCommandQueue label property, but prefixes
104             it with a WebKit identifier, so it can be correctly
105             identified in system crash logs as coming from WebGPU.
106
107 2018-11-22  Zalan Bujtas  <zalan@apple.com>
108
109         [LFC][IFC] Merge addNonBreakableStart/NonBreakableEnd calls.
110         https://bugs.webkit.org/show_bug.cgi?id=191903
111
112         Reviewed by Antti Koivisto.
113
114         * layout/inlineformatting/InlineFormattingContext.cpp:
115         (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
116
117 2018-11-22  Zalan Bujtas  <zalan@apple.com>
118
119         [LFC][IFC] Offset formatting context root runs with horizontal margins.
120         https://bugs.webkit.org/show_bug.cgi?id=191900
121
122         Reviewed by Antti Koivisto.
123
124         Inline runs generated by formatting roots (inline-block) need to be adjusted with the horizontal margins.
125         (The test case has padding and border as well, but they are _inside_ the formatting context.)
126
127         Test: fast/inline/inline-content-and-nested-formatting-root-with-margin-left-right.html
128
129         * layout/inlineformatting/InlineFormattingContext.cpp:
130         (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
131
132 2018-11-22  Simon Fraser  <simon.fraser@apple.com>
133
134         Extremely small monospace text size when SVG is included as an img
135         https://bugs.webkit.org/show_bug.cgi?id=191834
136
137         Reviewed by Myles C. Maxfield.
138
139         Give defaultFixedFontSize a reasonable default value in Settings, so that clients
140         who omit to set it (like SVGImages) don't get broken rendering.
141
142         Test: svg/text/monospace-text-size-in-img.html
143
144         * page/Settings.yaml:
145
146 2018-11-22  Javier Fernandez  <jfernandez@igalia.com>
147
148         Tables with vertical-lr writing-mode doesn't apply correctly vertical-align: baseline
149         https://bugs.webkit.org/show_bug.cgi?id=191881
150
151         Reviewed by Manuel Rego Casasnovas.
152
153         We should use the font's descent value when wriring-mode flips line flow (vertical-lr).
154
155         This change also fixes bug 170175, since Flexbox use the same code to determine the first
156         line baseline of a flex item.
157
158         Test: fast/writing-mode/vertical-align-table-baseline-latin.html
159
160         * rendering/RenderBlockFlow.cpp:
161         (WebCore::RenderBlockFlow::firstLineBaseline const):
162
163 2018-11-21  Ryosuke Niwa  <rniwa@webkit.org>
164
165         Phantom focus/blur events fire on clicking between text input fields when listening with addEventListener
166         https://bugs.webkit.org/show_bug.cgi?id=179990
167
168         Reviewed by Tim Horton.
169
170         The bug was caused by TemporarySelectionChange which is used by TextIndicator::createWithRange
171         to set and restore the selection putting the focus on the newly mouse-down'ed input element
172         and restoring the focus back to the input element which originally had the focus immediately.
173
174         Fixed the bug by avoiding to set the focus since only selection highlights need to be updated here.
175         Also made TemporarySelectionOption an enum class.
176
177         Unfortunately, no new tests since force click testing is broken :( See <rdar://problem/31301721>.
178
179         * editing/Editor.cpp:
180         (WebCore::TemporarySelectionChange::TemporarySelectionChange):
181         (WebCore::TemporarySelectionChange::~TemporarySelectionChange):
182         (WebCore::TemporarySelectionChange::setSelection): Extracted. Fixed the bug by adding
183         FrameSelection::DoNotSetFocus to the option when TemporarySelectionOption::DoNotSetFocus is set.
184         * editing/Editor.h:
185         * page/DragController.cpp:
186         (WebCore::DragController::performDragOperation):
187         * page/TextIndicator.cpp:
188         (WebCore::TextIndicator::createWithRange): Set TemporarySelectionOption::DoNotSetFocus.
189
190 2018-11-21  Wenson Hsieh  <wenson_hsieh@apple.com>
191
192         [Cocoa] [WebKit2] Add support for replacing find-in-page text matches
193         https://bugs.webkit.org/show_bug.cgi?id=191786
194         <rdar://problem/45813871>
195
196         Reviewed by Ryosuke Niwa.
197
198         Add support for replacing Find-in-Page matches. See below for details. Covered by new layout tests as well as a
199         new API test.
200
201         Tests: editing/find/find-and-replace-adjacent-words.html
202                editing/find/find-and-replace-at-editing-boundary.html
203                editing/find/find-and-replace-basic.html
204                editing/find/find-and-replace-in-subframes.html
205                editing/find/find-and-replace-no-matches.html
206                editing/find/find-and-replace-noneditable-matches.html
207                editing/find/find-and-replace-replacement-text-input-events.html
208
209         API test: WebKit.FindAndReplace
210
211         * page/Page.cpp:
212         (WebCore::replaceRanges):
213         (WebCore::Page::replaceRangesWithText):
214
215         Add a helper that, given a list of Ranges, replaces each range with the given text. To do this, we first map
216         each Range to editing offsets within the topmost editable root for each Range. This results in a map of editable
217         root to list of editing offsets we need to replace. To apply the replacements, for each editable root in the
218         map, we iterate over each replacement range (i.e. an offset and length), set the current selection to contain
219         that replacement range, and use `Editor::replaceSelectionWithText`. To prevent prior text replacements from
220         clobbering the offsets of latter text replacement ranges, we also iterate backwards through text replacement
221         ranges when performing each replacement.
222
223         Likewise, we also apply text replacement to each editing container in backwards order: for nodes in the same
224         frame, we compare their position in the document, and for nodes in different frames, we instead compare their
225         frames in frame tree traversal order.
226
227         We map Ranges to editing offsets and back when performing text replacement because each text replacement may
228         split or merge text nodes, which causes adjacent Ranges to shrink or extend while replacing text. In an earlier
229         attempt to implement this, I simply iterated over each Range to replace and carried out text replacement for
230         each Range. This led to incorrect behavior in some cases, such as replacing adjacent matches. Thus, by computing
231         the set of text replacement offsets prior to replacing any text, we're able to target the correct ranges for
232         replacement.
233
234         (WebCore::Page::replaceSelectionWithText):
235
236         Add a helper method on Page to replace the current selection with some text. This simply calls out to
237         `Editor::replaceSelectionWithText`.
238
239         * page/Page.h:
240
241 2018-11-21  Andy Estes  <aestes@apple.com>
242
243         [Cocoa] Create a soft-linking file for PassKit
244         https://bugs.webkit.org/show_bug.cgi?id=191875
245         <rdar://problem/46203215>
246
247         Reviewed by Myles Maxfield.
248
249         * Modules/applepay/cocoa/PaymentContactCocoa.mm: Removed SOFT_LINK macros and included PassKitSoftLink.h instead.
250         * Modules/applepay/cocoa/PaymentMerchantSessionCocoa.mm: Ditto.
251         * SourcesCocoa.txt: Removed @no-unify from PaymentMerchantSessionCocoa.mm.
252         * WebCore.xcodeproj/project.pbxproj: Removed PaymentMerchantSessionCocoa.mm from the WebCore target.
253         * rendering/RenderThemeCocoa.mm: Removed SOFT_LINK macros and included PassKitSoftLink.h instead.
254
255 2018-11-21  Zalan Bujtas  <zalan@apple.com>
256
257         [LFC] LayoutState should always be initialized with the initial containing block.
258         https://bugs.webkit.org/show_bug.cgi?id=191896
259
260         Reviewed by Antti Koivisto.
261
262         There should always be only one LayoutState per layout tree (it does not mean that layout always starts at the ICB).
263         The ICB is a special formatting context root because it does not have a parent formatting context. All the other formatting contexts
264         first need to be laid out (partially at least e.g margin) in their parent formatting context.
265         Having a non-null parent formatting context as root could lead to undefined behaviour.
266
267         * layout/LayoutFormattingState.cpp:
268         (WebCore::Layout::LayoutState::LayoutState):
269         (WebCore::Layout::LayoutState::initializeRoot): Deleted.
270         * layout/LayoutFormattingState.h:
271         * layout/Verification.cpp:
272         (WebCore::Layout::LayoutState::verifyAndOutputMismatchingLayoutTree const):
273         * page/FrameViewLayoutContext.cpp:
274         (WebCore::layoutUsingFormattingContext):
275
276 2018-11-21  Zalan Bujtas  <zalan@apple.com>
277
278         [LFC][IFC] Horizontal margins should be considered as non-breakable space
279         https://bugs.webkit.org/show_bug.cgi?id=191894
280
281         Reviewed by Antti Koivisto.
282
283         Like padding and border, horizontal margins also force run breaks and offset them.
284
285         Test: fast/inline/inline-content-with-margin-left-right.html
286
287         * layout/inlineformatting/InlineFormattingContext.cpp:
288         (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
289
290 2018-11-20  Ryosuke Niwa  <rniwa@webkit.org>
291
292         Mutation observers doesn't get notified of character data mutation made by the parser
293         https://bugs.webkit.org/show_bug.cgi?id=191874
294
295         Reviewed by Antti Koivisto.
296
297         Fixed the bug that CharacterData::parserAppendData was never notifying MutationObserver.
298
299         Test: fast/dom/MutationObserver/observe-parser-character-data-change.html
300
301         * dom/CharacterData.cpp:
302         (WebCore::CharacterData::parserAppendData):
303
304 2018-11-21  Claudio Saavedra  <csaavedra@igalia.com>
305
306         [SOUP] Follow-up robustness improvements to the certificate decoder
307         https://bugs.webkit.org/show_bug.cgi?id=191892
308
309         Reviewed by Michael Catanzaro.
310
311         If at any point the certificate fails to be constructed from
312         the DER data, bail out. Likewise, if the certificate returned
313         is NULL, return false from the decoder to notify the failure
314         to decode it.
315
316         * platform/network/soup/CertificateInfo.h:
317         (WTF::Persistence::certificateFromCertificatesDataList):
318         (WTF::Persistence::Coder<WebCore::CertificateInfo>::decode):
319
320 2018-11-21  Zalan Bujtas  <zalan@apple.com>
321
322         [LFC][IFC] Border should be considered as non-breakable space
323         https://bugs.webkit.org/show_bug.cgi?id=191891
324
325         Reviewed by Antti Koivisto.
326
327         Like padding, border also forces run breaks and offsets them.
328
329         Test: fast/inline/inline-content-with-border-left-right.html
330
331         * layout/inlineformatting/InlineFormattingContext.cpp:
332         (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
333
334 2018-11-21  Zalan Bujtas  <zalan@apple.com>
335
336         [LFC][IFC] Use contains and containsAll in InlineFormattingContext::splitInlineRunIfNeeded consistently
337         https://bugs.webkit.org/show_bug.cgi?id=191890
338
339         Rearrange the comment numbers to match the logic below.
340
341         Reviewed by Antti Koivisto.
342
343         * layout/inlineformatting/InlineFormattingContext.cpp:
344         (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
345
346 2018-11-20  Dean Jackson  <dino@apple.com>
347
348         Move WebGPU platform code to platform/graphics/gpu
349         https://bugs.webkit.org/show_bug.cgi?id=191867
350         <rdar://problem/46190993>
351
352         Reviewed by Antoine Quint.
353
354         The underlying implementation of WebGPU doesn't need to live in
355         Modules, since it technically could be used by other parts of the system. It
356         makes more sense for it to be in platform/graphics/gpu.
357
358         Move...
359         - Modules/webgpu/GPU* -> platform/graphics/gpu
360         - Modules/webgpu/cocoa -> platform/graphics/gpu/cocoa
361         - platform/graphics/gpu/GPULegacy* -> platform/graphics/gpu/legacy/
362         - platform/graphics/gpu/cocoa/GPULegacy* -> platform/graphics/gpu/legacy/cocoa
363
364         * Sources.txt:
365         * SourcesCocoa.txt:
366         * WebCore.xcodeproj/project.pbxproj:
367         * platform/graphics/gpu/GPUCommandBuffer.h: Renamed from Source/WebCore/Modules/webgpu/GPUCommandBuffer.h.
368         * platform/graphics/gpu/GPUDevice.cpp: Renamed from Source/WebCore/Modules/webgpu/GPUDevice.cpp.
369         (WebCore::GPUDevice::createShaderModule const):
370         (WebCore::GPUDevice::createRenderPipeline const):
371         (WebCore::GPUDevice::createCommandBuffer):
372         (WebCore::GPUDevice::getQueue):
373         * platform/graphics/gpu/GPUDevice.h: Renamed from Source/WebCore/Modules/webgpu/GPUDevice.h.
374         (WebCore::GPUDevice::platformDevice const):
375         * platform/graphics/gpu/GPUPipelineDescriptorBase.h: Renamed from Source/WebCore/Modules/webgpu/GPUPipelineDescriptorBase.h.
376         * platform/graphics/gpu/GPUPipelineStageDescriptor.h: Renamed from Source/WebCore/Modules/webgpu/GPUPipelineStageDescriptor.h.
377         * platform/graphics/gpu/GPUQueue.h: Renamed from Source/WebCore/Modules/webgpu/GPUQueue.h.
378         (WebCore::GPUQueue::platformQueue const):
379         * platform/graphics/gpu/GPURenderPipeline.h: Renamed from Source/WebCore/Modules/webgpu/GPURenderPipeline.h.
380         (WebCore::GPURenderPipeline::platformRenderPipeline const):
381         * platform/graphics/gpu/GPURenderPipelineDescriptor.h: Renamed from Source/WebCore/Modules/webgpu/GPURenderPipelineDescriptor.h.
382         * platform/graphics/gpu/GPUShaderModule.h: Renamed from Source/WebCore/Modules/webgpu/GPUShaderModule.h.
383         (WebCore::GPUShaderModule::platformShaderModule const):
384         * platform/graphics/gpu/GPUShaderModuleDescriptor.h: Renamed from Source/WebCore/Modules/webgpu/GPUShaderModuleDescriptor.h.
385         * platform/graphics/gpu/GPUSwapChain.h: Renamed from Source/WebCore/Modules/webgpu/GPUSwapChain.h.
386         (WebCore::GPUSwapChain::platformLayer const):
387         * platform/graphics/gpu/GPUTexture.h: Renamed from Source/WebCore/Modules/webgpu/GPUTexture.h.
388         * platform/graphics/gpu/GPUTextureFormatEnum.h: Renamed from Source/WebCore/Modules/webgpu/GPUTextureFormatEnum.h.
389         * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm: Renamed from Source/WebCore/Modules/webgpu/cocoa/GPUCommandBufferMetal.mm.
390         (WebCore::GPUCommandBuffer::create):
391         (WebCore::GPUCommandBuffer::GPUCommandBuffer):
392         * platform/graphics/gpu/cocoa/GPUDeviceMetal.mm: Renamed from Source/WebCore/Modules/webgpu/cocoa/GPUDeviceMetal.mm.
393         (WebCore::GPUDevice::create):
394         (WebCore::GPUDevice::GPUDevice):
395         * platform/graphics/gpu/cocoa/GPUQueueMetal.mm: Renamed from Source/WebCore/Modules/webgpu/cocoa/GPUQueueMetal.mm.
396         (WebCore::GPUQueue::create):
397         (WebCore::GPUQueue::GPUQueue):
398         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm: Renamed from Source/WebCore/Modules/webgpu/cocoa/GPURenderPipelineMetal.mm.
399         (WebCore::setFunctionsForPipelineDescriptor):
400         (WebCore::GPURenderPipeline::create):
401         (WebCore::GPURenderPipeline::GPURenderPipeline):
402         * platform/graphics/gpu/cocoa/GPUShaderModuleMetal.mm: Renamed from Source/WebCore/Modules/webgpu/cocoa/GPUShaderModuleMetal.mm.
403         (WebCore::GPUShaderModule::create):
404         (WebCore::GPUShaderModule::GPUShaderModule):
405         * platform/graphics/gpu/cocoa/GPUSwapChainMetal.mm: Renamed from Source/WebCore/Modules/webgpu/cocoa/GPUSwapChainMetal.mm.
406         (WebCore::GPUSwapChain::create):
407         (WebCore::GPUSwapChain::GPUSwapChain):
408         (WebCore::GPUSwapChain::setDevice):
409         (WebCore::platformTextureFormatForGPUTextureFormat):
410         (WebCore::GPUSwapChain::setFormat):
411         (WebCore::GPUSwapChain::reshape):
412         (WebCore::GPUSwapChain::getNextTexture):
413         (WebCore::GPUSwapChain::present):
414         * platform/graphics/gpu/cocoa/GPUTextureMetal.mm: Renamed from Source/WebCore/Modules/webgpu/cocoa/GPUTextureMetal.mm.
415         (WebCore::GPUTexture::create):
416         (WebCore::GPUTexture::GPUTexture):
417         (WebCore::GPUTexture::createDefaultTextureView):
418         * platform/graphics/gpu/legacy/GPULegacyBuffer.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyBuffer.cpp.
419         (WebCore::GPULegacyBuffer::~GPULegacyBuffer):
420         (WebCore::GPULegacyBuffer::length const):
421         * platform/graphics/gpu/legacy/GPULegacyBuffer.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyBuffer.h.
422         (WebCore::GPULegacyBuffer::contents const):
423         (WebCore::GPULegacyBuffer::metal const):
424         * platform/graphics/gpu/legacy/GPULegacyCommandBuffer.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyCommandBuffer.cpp.
425         (WebCore::GPULegacyCommandBuffer::~GPULegacyCommandBuffer):
426         * platform/graphics/gpu/legacy/GPULegacyCommandBuffer.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyCommandBuffer.h.
427         (WebCore::GPULegacyCommandBuffer::metal const):
428         * platform/graphics/gpu/legacy/GPULegacyCommandQueue.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyCommandQueue.cpp.
429         (WebCore::GPULegacyCommandQueue::~GPULegacyCommandQueue):
430         * platform/graphics/gpu/legacy/GPULegacyCommandQueue.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyCommandQueue.h.
431         (WebCore::GPULegacyCommandQueue::metal const):
432         * platform/graphics/gpu/legacy/GPULegacyComputeCommandEncoder.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyComputeCommandEncoder.cpp.
433         (WebCore::GPULegacyComputeCommandEncoder::~GPULegacyComputeCommandEncoder):
434         * platform/graphics/gpu/legacy/GPULegacyComputeCommandEncoder.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyComputeCommandEncoder.h.
435         * platform/graphics/gpu/legacy/GPULegacyComputePipelineState.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyComputePipelineState.cpp.
436         (WebCore::GPULegacyComputePipelineState::~GPULegacyComputePipelineState):
437         * platform/graphics/gpu/legacy/GPULegacyComputePipelineState.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyComputePipelineState.h.
438         (WebCore::GPULegacyComputePipelineState::metal const):
439         * platform/graphics/gpu/legacy/GPULegacyDepthStencilDescriptor.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyDepthStencilDescriptor.cpp.
440         (WebCore::GPULegacyDepthStencilDescriptor::~GPULegacyDepthStencilDescriptor):
441         * platform/graphics/gpu/legacy/GPULegacyDepthStencilDescriptor.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyDepthStencilDescriptor.h.
442         (WebCore::GPULegacyDepthStencilDescriptor::metal const):
443         * platform/graphics/gpu/legacy/GPULegacyDepthStencilState.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyDepthStencilState.cpp.
444         (WebCore::GPULegacyDepthStencilState::~GPULegacyDepthStencilState):
445         * platform/graphics/gpu/legacy/GPULegacyDepthStencilState.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyDepthStencilState.h.
446         (WebCore::GPULegacyDepthStencilState::metal const):
447         * platform/graphics/gpu/legacy/GPULegacyDevice.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyDevice.cpp.
448         (WebCore::GPULegacyDevice::~GPULegacyDevice):
449         * platform/graphics/gpu/legacy/GPULegacyDevice.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyDevice.h.
450         (WebCore::GPULegacyDevice::layer const):
451         (WebCore::GPULegacyDevice::metal const):
452         (WebCore::GPULegacyDevice::markLayerComposited const):
453         * platform/graphics/gpu/legacy/GPULegacyDrawable.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyDrawable.cpp.
454         (WebCore::GPULegacyDrawable::~GPULegacyDrawable):
455         * platform/graphics/gpu/legacy/GPULegacyDrawable.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyDrawable.h.
456         * platform/graphics/gpu/legacy/GPULegacyEnums.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyEnums.h.
457         * platform/graphics/gpu/legacy/GPULegacyFunction.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyFunction.cpp.
458         (WebCore::GPULegacyFunction::~GPULegacyFunction):
459         * platform/graphics/gpu/legacy/GPULegacyFunction.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyFunction.h.
460         (WebCore::GPULegacyFunction::metal const):
461         * platform/graphics/gpu/legacy/GPULegacyLibrary.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyLibrary.cpp.
462         (WebCore::GPULegacyLibrary::~GPULegacyLibrary):
463         * platform/graphics/gpu/legacy/GPULegacyLibrary.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyLibrary.h.
464         (WebCore::GPULegacyLibrary::metal const):
465         * platform/graphics/gpu/legacy/GPULegacyRenderCommandEncoder.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderCommandEncoder.cpp.
466         (WebCore::GPULegacyRenderCommandEncoder::~GPULegacyRenderCommandEncoder):
467         * platform/graphics/gpu/legacy/GPULegacyRenderCommandEncoder.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderCommandEncoder.h.
468         * platform/graphics/gpu/legacy/GPULegacyRenderPassAttachmentDescriptor.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPassAttachmentDescriptor.cpp.
469         (WebCore::GPULegacyRenderPassAttachmentDescriptor::~GPULegacyRenderPassAttachmentDescriptor):
470         * platform/graphics/gpu/legacy/GPULegacyRenderPassAttachmentDescriptor.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPassAttachmentDescriptor.h.
471         * platform/graphics/gpu/legacy/GPULegacyRenderPassColorAttachmentDescriptor.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPassColorAttachmentDescriptor.cpp.
472         (WebCore::GPULegacyRenderPassColorAttachmentDescriptor::~GPULegacyRenderPassColorAttachmentDescriptor):
473         * platform/graphics/gpu/legacy/GPULegacyRenderPassColorAttachmentDescriptor.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPassColorAttachmentDescriptor.h.
474         * platform/graphics/gpu/legacy/GPULegacyRenderPassDepthAttachmentDescriptor.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPassDepthAttachmentDescriptor.cpp.
475         (WebCore::GPULegacyRenderPassDepthAttachmentDescriptor::~GPULegacyRenderPassDepthAttachmentDescriptor):
476         * platform/graphics/gpu/legacy/GPULegacyRenderPassDepthAttachmentDescriptor.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPassDepthAttachmentDescriptor.h.
477         * platform/graphics/gpu/legacy/GPULegacyRenderPassDescriptor.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPassDescriptor.cpp.
478         (WebCore::GPULegacyRenderPassDescriptor::~GPULegacyRenderPassDescriptor):
479         * platform/graphics/gpu/legacy/GPULegacyRenderPassDescriptor.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPassDescriptor.h.
480         * platform/graphics/gpu/legacy/GPULegacyRenderPipelineColorAttachmentDescriptor.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPipelineColorAttachmentDescriptor.cpp.
481         (WebCore::GPULegacyRenderPipelineColorAttachmentDescriptor::~GPULegacyRenderPipelineColorAttachmentDescriptor):
482         * platform/graphics/gpu/legacy/GPULegacyRenderPipelineColorAttachmentDescriptor.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPipelineColorAttachmentDescriptor.h.
483         * platform/graphics/gpu/legacy/GPULegacyRenderPipelineDescriptor.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPipelineDescriptor.cpp.
484         (WebCore::GPULegacyRenderPipelineDescriptor::~GPULegacyRenderPipelineDescriptor):
485         * platform/graphics/gpu/legacy/GPULegacyRenderPipelineDescriptor.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPipelineDescriptor.h.
486         * platform/graphics/gpu/legacy/GPULegacyRenderPipelineState.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPipelineState.cpp.
487         (WebCore::GPULegacyRenderPipelineState::~GPULegacyRenderPipelineState):
488         * platform/graphics/gpu/legacy/GPULegacyRenderPipelineState.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPipelineState.h.
489         * platform/graphics/gpu/legacy/GPULegacySize.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacySize.h.
490         * platform/graphics/gpu/legacy/GPULegacyTexture.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyTexture.cpp.
491         (WebCore::GPULegacyTexture::~GPULegacyTexture):
492         * platform/graphics/gpu/legacy/GPULegacyTexture.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyTexture.h.
493         * platform/graphics/gpu/legacy/GPULegacyTextureDescriptor.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyTextureDescriptor.cpp.
494         (WebCore::GPULegacyTextureDescriptor::~GPULegacyTextureDescriptor):
495         * platform/graphics/gpu/legacy/GPULegacyTextureDescriptor.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyTextureDescriptor.h.
496         * platform/graphics/gpu/legacy/cocoa/GPULegacyBufferMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyBufferMetal.mm.
497         (WebCore::GPULegacyBuffer::GPULegacyBuffer):
498         * platform/graphics/gpu/legacy/cocoa/GPULegacyCommandBufferMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyCommandBufferMetal.mm.
499         (WebCore::GPULegacyCommandBuffer::GPULegacyCommandBuffer):
500         (WebCore::GPULegacyCommandBuffer::presentDrawable const):
501         (WebCore::GPULegacyCommandBuffer::commit const):
502         * platform/graphics/gpu/legacy/cocoa/GPULegacyCommandQueueMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyCommandQueueMetal.mm.
503         (WebCore::GPULegacyCommandQueue::GPULegacyCommandQueue):
504         (WebCore::GPULegacyCommandQueue::label const):
505         (WebCore::GPULegacyCommandQueue::setLabel const):
506         * platform/graphics/gpu/legacy/cocoa/GPULegacyComputeCommandEncoderMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyComputeCommandEncoderMetal.mm.
507         (WebCore::MTLSizeMake):
508         (WebCore::GPULegacyComputeCommandEncoder::GPULegacyComputeCommandEncoder):
509         (WebCore::GPULegacyComputeCommandEncoder::setComputePipelineState const):
510         (WebCore::GPULegacyComputeCommandEncoder::setBuffer const):
511         (WebCore::GPULegacyComputeCommandEncoder::dispatch const):
512         (WebCore::GPULegacyComputeCommandEncoder::endEncoding const):
513         * platform/graphics/gpu/legacy/cocoa/GPULegacyComputePipelineStateMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyComputePipelineStateMetal.mm.
514         (WebCore::GPULegacyComputePipelineState::GPULegacyComputePipelineState):
515         * platform/graphics/gpu/legacy/cocoa/GPULegacyDepthStencilDescriptorMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyDepthStencilDescriptorMetal.mm.
516         (WebCore::GPULegacyDepthStencilDescriptor::GPULegacyDepthStencilDescriptor):
517         (WebCore::GPULegacyDepthStencilDescriptor::depthWriteEnabled const):
518         (WebCore::GPULegacyDepthStencilDescriptor::setDepthWriteEnabled const):
519         (WebCore::GPULegacyDepthStencilDescriptor::depthCompareFunction const):
520         (WebCore::GPULegacyDepthStencilDescriptor::setDepthCompareFunction const):
521         * platform/graphics/gpu/legacy/cocoa/GPULegacyDepthStencilStateMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyDepthStencilStateMetal.mm.
522         (WebCore::GPULegacyDepthStencilState::GPULegacyDepthStencilState):
523         (WebCore::GPULegacyDepthStencilState::label const):
524         (WebCore::GPULegacyDepthStencilState::setLabel const):
525         * platform/graphics/gpu/legacy/cocoa/GPULegacyDeviceMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyDeviceMetal.mm.
526         (WebCore::GPULegacyDevice::GPULegacyDevice):
527         (WebCore::GPULegacyDevice::disconnect):
528         (WebCore::GPULegacyDevice::reshape const):
529         (WebCore::GPULegacyDevice::platformLayer const):
530         (WebCore::GPULegacyDevice::operator! const):
531         * platform/graphics/gpu/legacy/cocoa/GPULegacyDrawableMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyDrawableMetal.mm.
532         (WebCore::GPULegacyDrawable::GPULegacyDrawable):
533         (WebCore::GPULegacyDrawable::release):
534         (WebCore::GPULegacyDrawable::metal const):
535         (WebCore::GPULegacyDrawable::texture const):
536         * platform/graphics/gpu/legacy/cocoa/GPULegacyFunctionMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyFunctionMetal.mm.
537         (WebCore::GPULegacyFunction::GPULegacyFunction):
538         (WebCore::GPULegacyFunction::name const):
539         (WebCore::GPULegacyFunction::operator! const):
540         * platform/graphics/gpu/legacy/cocoa/GPULegacyLibraryMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyLibraryMetal.mm.
541         (WebCore::GPULegacyLibrary::GPULegacyLibrary):
542         (WebCore::GPULegacyLibrary::label const):
543         (WebCore::GPULegacyLibrary::setLabel const):
544         (WebCore::GPULegacyLibrary::functionNames const):
545         * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderCommandEncoderMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyRenderCommandEncoderMetal.mm.
546         (WebCore::GPULegacyRenderCommandEncoder::GPULegacyRenderCommandEncoder):
547         (WebCore::GPULegacyRenderCommandEncoder::setRenderPipelineState const):
548         (WebCore::GPULegacyRenderCommandEncoder::setDepthStencilState const):
549         (WebCore::GPULegacyRenderCommandEncoder::setVertexBuffer const):
550         (WebCore::GPULegacyRenderCommandEncoder::setFragmentBuffer const):
551         (WebCore::GPULegacyRenderCommandEncoder::drawPrimitives const):
552         (WebCore::GPULegacyRenderCommandEncoder::endEncoding const):
553         * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPassAttachmentDescriptorMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyRenderPassAttachmentDescriptorMetal.mm.
554         (WebCore::GPULegacyRenderPassAttachmentDescriptor::GPULegacyRenderPassAttachmentDescriptor):
555         (WebCore::GPULegacyRenderPassAttachmentDescriptor::loadAction const):
556         (WebCore::GPULegacyRenderPassAttachmentDescriptor::setLoadAction const):
557         (WebCore::GPULegacyRenderPassAttachmentDescriptor::storeAction const):
558         (WebCore::GPULegacyRenderPassAttachmentDescriptor::setStoreAction const):
559         (WebCore::GPULegacyRenderPassAttachmentDescriptor::setTexture const):
560         (WebCore::GPULegacyRenderPassAttachmentDescriptor::metal const):
561         * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPassColorAttachmentDescriptorMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyRenderPassColorAttachmentDescriptorMetal.mm.
562         (WebCore::GPULegacyRenderPassColorAttachmentDescriptor::GPULegacyRenderPassColorAttachmentDescriptor):
563         (WebCore::GPULegacyRenderPassColorAttachmentDescriptor::clearColor const):
564         (WebCore::GPULegacyRenderPassColorAttachmentDescriptor::setClearColor const):
565         (WebCore::GPULegacyRenderPassColorAttachmentDescriptor::metal const):
566         * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPassDepthAttachmentDescriptorMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyRenderPassDepthAttachmentDescriptorMetal.mm.
567         (WebCore::GPULegacyRenderPassDepthAttachmentDescriptor::GPULegacyRenderPassDepthAttachmentDescriptor):
568         (WebCore::GPULegacyRenderPassDepthAttachmentDescriptor::clearDepth const):
569         (WebCore::GPULegacyRenderPassDepthAttachmentDescriptor::setClearDepth const):
570         (WebCore::GPULegacyRenderPassDepthAttachmentDescriptor::metal const):
571         * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPassDescriptorMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyRenderPassDescriptorMetal.mm.
572         (WebCore::GPULegacyRenderPassDescriptor::GPULegacyRenderPassDescriptor):
573         (WebCore::GPULegacyRenderPassDescriptor::colorAttachments const):
574         (WebCore::GPULegacyRenderPassDescriptor::depthAttachment const):
575         (WebCore::GPULegacyRenderPassDescriptor::metal const):
576         * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPipelineColorAttachmentDescriptorMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyRenderPipelineColorAttachmentDescriptorMetal.mm.
577         (WebCore::GPULegacyRenderPipelineColorAttachmentDescriptor::GPULegacyRenderPipelineColorAttachmentDescriptor):
578         (WebCore::GPULegacyRenderPipelineColorAttachmentDescriptor::pixelFormat const):
579         (WebCore::GPULegacyRenderPipelineColorAttachmentDescriptor::setPixelFormat const):
580         (WebCore::GPULegacyRenderPipelineColorAttachmentDescriptor::metal const):
581         * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPipelineDescriptorMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyRenderPipelineDescriptorMetal.mm.
582         (WebCore::GPULegacyRenderPipelineDescriptor::GPULegacyRenderPipelineDescriptor):
583         (WebCore::GPULegacyRenderPipelineDescriptor::depthAttachmentPixelFormat const):
584         (WebCore::GPULegacyRenderPipelineDescriptor::setDepthAttachmentPixelFormat const):
585         (WebCore::GPULegacyRenderPipelineDescriptor::setVertexFunction const):
586         (WebCore::GPULegacyRenderPipelineDescriptor::setFragmentFunction const):
587         (WebCore::GPULegacyRenderPipelineDescriptor::colorAttachments const):
588         (WebCore::GPULegacyRenderPipelineDescriptor::reset const):
589         (WebCore::GPULegacyRenderPipelineDescriptor::metal const):
590         * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPipelineStateMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyRenderPipelineStateMetal.mm.
591         (WebCore::GPULegacyRenderPipelineState::GPULegacyRenderPipelineState):
592         (WebCore::GPULegacyRenderPipelineState::label const):
593         (WebCore::GPULegacyRenderPipelineState::setLabel const):
594         (WebCore::GPULegacyRenderPipelineState::metal const):
595         * platform/graphics/gpu/legacy/cocoa/GPULegacyTextureDescriptorMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyTextureDescriptorMetal.mm.
596         (WebCore::GPULegacyTextureDescriptor::GPULegacyTextureDescriptor):
597         (WebCore::GPULegacyTextureDescriptor::width const):
598         (WebCore::GPULegacyTextureDescriptor::setWidth const):
599         (WebCore::GPULegacyTextureDescriptor::height const):
600         (WebCore::GPULegacyTextureDescriptor::setHeight const):
601         (WebCore::GPULegacyTextureDescriptor::sampleCount const):
602         (WebCore::GPULegacyTextureDescriptor::setSampleCount const):
603         (WebCore::GPULegacyTextureDescriptor::textureType const):
604         (WebCore::GPULegacyTextureDescriptor::setTextureType const):
605         (WebCore::GPULegacyTextureDescriptor::storageMode const):
606         (WebCore::GPULegacyTextureDescriptor::setStorageMode const):
607         (WebCore::GPULegacyTextureDescriptor::usage const):
608         (WebCore::GPULegacyTextureDescriptor::setUsage const):
609         (WebCore::GPULegacyTextureDescriptor::metal const):
610         * platform/graphics/gpu/legacy/cocoa/GPULegacyTextureMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyTextureMetal.mm.
611         (WebCore::GPULegacyTexture::GPULegacyTexture):
612         (WebCore::GPULegacyTexture::width const):
613         (WebCore::GPULegacyTexture::height const):
614         (WebCore::GPULegacyTexture::metal const):
615
616 2018-11-21  Adrian Perez de Castro  <aperez@igalia.com>
617
618         [SOUP] Certificate decoder always returns GByteArray with zero size
619         https://bugs.webkit.org/show_bug.cgi?id=191888
620
621         Reviewed by Žan Doberšek.
622
623         No new tests needed.
624
625         * platform/network/soup/CertificateInfo.h:
626         (WTF::Persistence::Coder<GRefPtr<GByteArray>>::decode): Add missing
627         call to g_byte_array_set_size() to make sure byteArray->len has the
628         correct value.
629
630 2018-11-21  Zalan Butjas  <zalan@apple.com>
631
632         [LFC][IFC] Take nonBreakableStart/End into use.
633         https://bugs.webkit.org/show_bug.cgi?id=191873
634
635         Reviewed by Antti Koivisto.
636
637         Offset the final inline runs with the nonBreakableStart/End values.
638         (This patch also fixes relative positioned run verification.)
639
640         Test: fast/inline/inline-content-with-padding-left-right.html
641
642         * layout/Verification.cpp:
643         (WebCore::Layout::LayoutState::verifyAndOutputMismatchingLayoutTree const):
644         * layout/inlineformatting/InlineFormattingContext.cpp:
645         (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
646
647 2018-11-21  Carlos Garcia Campos  <cgarcia@igalia.com>
648
649         REGRESSION(r237845): [cairo] Hyperlink underscore layout issue
650         https://bugs.webkit.org/show_bug.cgi?id=191630
651
652         Reviewed by Michael Catanzaro.
653
654         Only flip Y in GlyphToPathTranslator for ports using CG.
655
656         * platform/graphics/FontCascade.cpp:
657         (WebCore::GlyphToPathTranslator::GlyphToPathTranslator):
658
659 2018-11-21  Alicia Boya García  <aboya@igalia.com>
660
661         [MSE][GStreamer] Refactor AppendPipeline deinitialization
662         https://bugs.webkit.org/show_bug.cgi?id=191759
663
664         Reviewed by Xabier Rodriguez-Calvar.
665
666         AppendPipeline currently has a method, clearPlayerPrivate(), that the
667         client code uses to deinitialize most of the AppendPipeline... just
668         before actually destructing it in the next line of code.
669
670         Since at that point there should not be alive RefPtr's pointing to the
671         AppendPipeline there is no need for this kind of pre-deinitialization
672         in this usage pattern. Instead, we can just rely on C++ destructors,
673         cleaning the code a bit and removing the potential for the question
674         "what if `clearPlayerPrivate() has been called before?`": it has not.
675
676         Assertions have been added to ensure that there is only one alive
677         RefPtr pointing to AppendPipeline, therefore guaranteeing its immediate
678         destruction.
679
680         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
681         (WebCore::AppendPipeline::~AppendPipeline):
682         (WebCore::AppendPipeline::deinitialize):
683         (WebCore::AppendPipeline::clearPlayerPrivate): Deleted.
684         * platform/graphics/gstreamer/mse/AppendPipeline.h:
685         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
686         (WebCore::MediaPlayerPrivateGStreamerMSE::~MediaPlayerPrivateGStreamerMSE):
687         * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
688         (WebCore::MediaSourceClientGStreamerMSE::removedFromMediaSource):
689
690 2018-11-20  Dean Jackson  <dino@apple.com>
691
692         Removing using namespace WebCore from WebLayer
693         https://bugs.webkit.org/show_bug.cgi?id=191870
694         <rdar://problem/46192206>
695
696         Rubber-stamped by Sam Weinig.
697
698         Remove "using namespace WebCore" from WebLayer.mm
699         because it will cause type clashes in unified source
700         builds.
701
702         * platform/graphics/mac/WebLayer.mm:
703         (-[WebLayer drawInContext:]):
704         (-[WebSimpleLayer setNeedsDisplay]):
705         (-[WebSimpleLayer setNeedsDisplayInRect:]):
706         (-[WebSimpleLayer display]):
707         (-[WebSimpleLayer drawInContext:]):
708
709 2018-11-20  Ryosuke Niwa  <rniwa@webkit.org>
710
711         Input element gains focus when a selectstart event listener on document prevents the default action
712         https://bugs.webkit.org/show_bug.cgi?id=191714
713         <rdar://problem/46174389>
714
715         Reviewed by Antti Koivisto.
716
717         The bug was caused by WebKit keep firing selectstart upon mousemove after the drag had already started
718         when preventDefault had been called in the previous firings of selectstart event. Because input element
719         has its own editable element and fires selectstart on the input element itself, which won't be prevented
720         by selectstart on docuemnt, this allowed the selection to be set inside the input element even though
721         the mouse cursor was simply passing over the input element after the drag had already started.
722
723         Fixed the bug by not firing selectstart if the default action had been prevented by the initial firing
724         of selectstart by setting m_mouseDownMayStartDrag to false. This also matches the behaviors of Chrome
725         and Firefox.
726
727         Test: fast/events/selectstart-prevent-default-should-not-focus-input.html
728
729         * page/EventHandler.cpp:
730         (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart):
731         (WebCore::EventHandler::updateSelectionForMouseDrag):
732
733 2018-11-20  Christopher Reid  <chris.reid@sony.com>
734
735         Remove the need for LocalizedStringsWPE.cpp
736         https://bugs.webkit.org/show_bug.cgi?id=191854
737
738         Reviewed by Michael Catanzaro.
739
740         No change in behavior.
741
742         Consolidate "Search the Web" as the default search context menu text on non-COCOA ports.
743
744         GTK, WPE, and non-CF WIN all had the same default localizedString function
745         of String::fromUTF8. Move that to LocalizedString.cpp as the default implementation
746         for all ports not using CF.
747
748         * en.lproj/Localizable.strings:
749         * platform/LocalizedStrings.cpp:
750         * platform/gtk/LocalizedStringsGtk.cpp:
751         * platform/win/LocalizedStringsWin.cpp:
752         * platform/wpe/LocalizedStringsWPE.cpp: Removed.
753
754 2018-11-20  Zan Dobersek  <zdobersek@igalia.com>
755
756         Segfaults on https://terminalizer.com/
757         https://bugs.webkit.org/show_bug.cgi?id=191805
758
759         Reviewed by Michael Catanzaro.
760
761         In HarfBuzzFace, the CacheEntry's HashMap object that caches Unicode
762         codepoints and their corresponding glyph indices should allow zero
763         values as valid keys since zero is a valid Unicode codepoint.
764
765         This change enables properly caching zero codepoints, avoiding
766         repetitive additions to the HashMap cache that end up in a crash.
767
768         * platform/graphics/harfbuzz/HarfBuzzFace.h: Move the elongated
769         GlyphCache type alias to the public section of HarfBuzzFace class
770         declaration, making it reusable in the helper HarfBuzzFontData struct.
771         * platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:
772
773 2018-11-20  Antti Koivisto  <antti@apple.com>
774
775         Update hover state in composed tree
776         https://bugs.webkit.org/show_bug.cgi?id=191860
777
778         Reviewed by Zalan Bujtas.
779
780         The code was already mostly switched over from render tree to composed tree.
781         This patch replaces the remaining common ancestor search code with a DOM based equivalent.
782
783         * dom/Document.cpp:
784         (WebCore::findNearestCommonComposedAncestor):
785         (WebCore::Document::updateHoverActiveState):
786         (WebCore::nearestCommonHoverAncestor): Deleted.
787         * rendering/RenderBlock.cpp:
788         (WebCore::RenderBlock::hoverAncestor const): Deleted.
789         * rendering/RenderBlock.h:
790         * rendering/RenderElement.cpp:
791         (WebCore::RenderElement::hoverAncestor const): Deleted.
792
793         No longer needed.
794
795         * rendering/RenderElement.h:
796
797 2018-11-20  Zalan Bujtas  <zalan@apple.com>
798
799         [LFC][IFC] Measure run with non-breakable start/end.
800         https://bugs.webkit.org/show_bug.cgi?id=191850
801
802         Reviewed by Antti Koivisto.
803
804         Line breaking needs to know the complete width of the run including padding etc.
805
806         * layout/Verification.cpp:
807         (WebCore::Layout::collectFlowBoxSubtree):
808         (WebCore::Layout::collectInlineBoxes):
809         (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
810         * layout/inlineformatting/InlineFormattingContext.cpp:
811         (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
812         * layout/inlineformatting/InlineFormattingContext.h:
813         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
814         (WebCore::Layout::InlineFormattingContext::Geometry::runWidth):
815         * layout/inlineformatting/InlineLineBreaker.cpp:
816         (WebCore::Layout::InlineLineBreaker::InlineLineBreaker):
817         (WebCore::Layout::InlineLineBreaker::runWidth const):
818         (WebCore::Layout::InlineLineBreaker::textWidth const):
819         * layout/inlineformatting/InlineLineBreaker.h:
820         * layout/inlineformatting/text/TextUtil.cpp:
821         (WebCore::Layout::TextUtil::hyphenPositionBefore):
822         (WebCore::Layout::TextUtil::width):
823         (WebCore::Layout::TextUtil::fixedPitchWidth):
824         (WebCore::Layout::TextUtil::TextUtil): Deleted.
825         (WebCore::Layout::TextUtil::width const): Deleted.
826         (WebCore::Layout::TextUtil::hyphenPositionBefore const): Deleted.
827         (WebCore::Layout::TextUtil::textWidth const): Deleted.
828         (WebCore::Layout::TextUtil::fixedPitchWidth const): Deleted.
829         * layout/inlineformatting/text/TextUtil.h:
830
831 2018-11-20  Zalan Bujtas  <zalan@apple.com>
832
833         [LFC][IFC] InlineFormattingContext::Line should hold the list of runs for the current line.
834         https://bugs.webkit.org/show_bug.cgi?id=191845
835
836         Reviewed by Antti Koivisto.
837
838         Collect the runs in InlineFormattingContext::Line and transfer them to InlineFormattingState during line closing.
839         (In the most common cases, this is only one extra vector::append() call.)
840
841         * layout/inlineformatting/InlineFormattingContext.cpp:
842         (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
843         (WebCore::Layout::InlineFormattingContext::createFinalRuns const):
844         (WebCore::Layout::InlineFormattingContext::postProcessInlineRuns const):
845         (WebCore::Layout::InlineFormattingContext::closeLine const):
846         (WebCore::Layout::InlineFormattingContext::appendContentToLine const):
847         (WebCore::Layout::InlineFormattingContext::layoutInlineContent const):
848         (WebCore::Layout::InlineFormattingContext::placeInFlowPositionedChildren const):
849         (WebCore::Layout::InlineFormattingContext::splitInlineRunsIfNeeded const): Deleted.
850         * layout/inlineformatting/InlineFormattingContext.h:
851         (WebCore::Layout::InlineFormattingContext::Line::hasContent const):
852         (WebCore::Layout::InlineFormattingContext::Line::runs):
853         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
854         (WebCore::Layout::InlineFormattingContext::Geometry::justifyRuns):
855         (WebCore::Layout::InlineFormattingContext::Geometry::computeExpansionOpportunities):
856         (WebCore::Layout::InlineFormattingContext::Geometry::alignRuns):
857         * layout/inlineformatting/Line.cpp:
858         (WebCore::Layout::InlineFormattingContext::Line::init):
859         (WebCore::Layout::InlineFormattingContext::Line::adjustLogicalLeft):
860         (WebCore::Layout::InlineFormattingContext::Line::contentLogicalRight const):
861         (WebCore::Layout::InlineFormattingContext::Line::appendContent):
862         (WebCore::Layout::InlineFormattingContext::Line::close):
863         (WebCore::Layout::InlineFormattingContext::Line::Line): Deleted.
864
865 2018-11-20  Zalan Butjas  <zalan@apple.com>
866
867         [LFC][IFC] Introduce InlineItem::nonBreakableStart/End
868         https://bugs.webkit.org/show_bug.cgi?id=191839
869
870         Reviewed by Antti Koivisto.
871
872         Non-breakable start/end marks margin/padding/border space (even when it does not directly come from the associated layout box)
873
874         <span style="padding: 5px"><span>nested content with padding parent</span</span>
875         <nested content with padding parent> <- inline run has 5px non-breakable start/end.
876
877         <span style="border: 5px solid green"><span style="padding-right: 10px; margin-right: 1px">1</span>2</span><span>    3</span>
878         <1> <- inline run has 5px non-breakable start and 11px non-breakable end.
879         <2> <- inline run has 0px non-breakable start and 5px non-breakable end.
880         <3> <- no non-breakable values.
881
882         This is what the runs look like (input to line breaking)
883         <     1           2     >
884         < > (whitespace)
885         <3>
886         The line breaking treats the paddding/border etc space as part of the run and as non-breaking opportunity.
887         With the given runs the first position where we can break the line is at the whitespace.
888
889         * layout/inlineformatting/InlineFormattingContext.cpp:
890         (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
891         * layout/inlineformatting/InlineItem.h:
892         (WebCore::Layout::InlineItem::nonBreakableStart const):
893         (WebCore::Layout::InlineItem::nonBreakableEnd const):
894         (WebCore::Layout::InlineItem::addNonBreakableStart):
895         (WebCore::Layout::InlineItem::addNonBreakableEnd):
896
897 2018-11-20  Zalan Bujtas  <zalan@apple.com>
898
899         [LFC][IFC] Move detaching rules from InlineFormattingState to InlineItem
900         https://bugs.webkit.org/show_bug.cgi?id=191838
901
902         Reviewed by Antti Koivisto.
903
904         This is in preparation for adding more context to InlineItem. In addition to
905         detaching rules it will also hold non-breakable start/end information.
906
907         * layout/inlineformatting/InlineFormattingContext.cpp:
908         (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
909         (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
910         * layout/inlineformatting/InlineFormattingState.cpp:
911         (WebCore::Layout::InlineFormattingState::addDetachingRule): Deleted.
912         (WebCore::Layout::InlineFormattingState::detachingRules const): Deleted.
913         * layout/inlineformatting/InlineFormattingState.h:
914         (WebCore::Layout::InlineFormattingState::setDetachingRules): Deleted.
915         * layout/inlineformatting/InlineItem.h:
916         (WebCore::Layout::InlineItem::addDetachingRule):
917         (WebCore::Layout::InlineItem::detachingRules const):
918
919 2018-11-20  Zalan Bujjtas  <zalan@apple.com>
920
921         [LFC][IFC] InlineRunProvider::append() should just take const InlineItem&.
922         https://bugs.webkit.org/show_bug.cgi?id=191837
923
924         Reviewed by Antti Koivisto.
925
926         This allows us to remove the InlineFormattingState dependency as well.
927
928         * layout/inlineformatting/InlineFormattingContext.cpp:
929         (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
930         (WebCore::Layout::InlineFormattingContext::instrinsicWidthConstraints const):
931         * layout/inlineformatting/InlineRunProvider.cpp:
932         (WebCore::Layout::InlineRunProvider::InlineRunProvider):
933         (WebCore::Layout::InlineRunProvider::append):
934         * layout/inlineformatting/InlineRunProvider.h:
935
936 2018-11-20  Thibault Saunier  <tsaunier@igalia.com>
937
938         [GStreamer] Enhance debugging by making sure to print the pipeline in MediaPlayerPrivateGStreamer
939         https://bugs.webkit.org/show_bug.cgi?id=191586
940
941         Reviewed by Xabier Rodriguez-Calvar.
942
943         This is minor changes that do not require tests.
944
945         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
946         (WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
947         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
948         (WebCore::MediaPlayerPrivateGStreamer::setPlaybinURL):
949         (WebCore::MediaPlayerPrivateGStreamer::loadFull):
950         (WebCore::MediaPlayerPrivateGStreamer::commitLoad):
951         (WebCore::MediaPlayerPrivateGStreamer::readyTimerFired):
952         (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
953         (WebCore::MediaPlayerPrivateGStreamer::prepareToPlay):
954         (WebCore::MediaPlayerPrivateGStreamer::play):
955         (WebCore::MediaPlayerPrivateGStreamer::pause):
956         (WebCore::MediaPlayerPrivateGStreamer::durationMediaTime const):
957         (WebCore::MediaPlayerPrivateGStreamer::seek):
958         (WebCore::MediaPlayerPrivateGStreamer::updatePlaybackRate):
959         (WebCore::MediaPlayerPrivateGStreamer::paused const):
960         (WebCore::MediaPlayerPrivateGStreamer::enableTrack):
961         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
962         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
963         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
964         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
965         (WebCore::MediaPlayerPrivateGStreamer::processBufferingStats):
966         (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
967         (WebCore::MediaPlayerPrivateGStreamer::maxMediaTimeSeekable const):
968         (WebCore::MediaPlayerPrivateGStreamer::totalBytes const):
969         (WebCore::MediaPlayerPrivateGStreamer::uriDecodeBinElementAddedCallback):
970         (WebCore::MediaPlayerPrivateGStreamer::downloadBufferFileCreatedCallback):
971         (WebCore::MediaPlayerPrivateGStreamer::sourceSetup):
972         (WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
973         (WebCore::MediaPlayerPrivateGStreamer::updateStates):
974         (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
975         (WebCore::MediaPlayerPrivateGStreamer::didEnd):
976         (WebCore::MediaPlayerPrivateGStreamer::setDownloadBuffering):
977         (WebCore::MediaPlayerPrivateGStreamer::setPreload):
978         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
979
980 2018-11-20  Manuel Rego Casasnovas  <rego@igalia.com>
981
982         [css-grid] Consider scrollbars in populateGridPositionsForDirection()
983         https://bugs.webkit.org/show_bug.cgi?id=191656
984
985         Reviewed by Javier Fernandez.
986
987         We never care about scrollbars in RenderGrid::populateGridPositionsForDirection(),
988         that's fine if the scrollbars are at the end (e.g. on the right in horizontal writing mode and LTR direction)
989         but it causes problems when they're at the beginning (e.g. on the left in horizontal writing mode and RTL direction).
990
991         The patch modifies the method so it takes into account scrollbar size
992         in order to compute the position of the columns/rows depending on the direction and the writing mode.
993
994         Tests: imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-001.html
995                imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-vertical-lr-001.html
996                imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-vertical-rl-001.html
997
998         * rendering/RenderGrid.cpp:
999         (WebCore::RenderGrid::populateGridPositionsForDirection):
1000
1001 2018-11-19  Ryosuke Niwa  <rniwa@webkit.org>
1002
1003         Click on node assigned to slot in button's shadow cause loss of button focus
1004         https://bugs.webkit.org/show_bug.cgi?id=191694
1005         <rdar://problem/46107920>
1006
1007         Reviewed by Wenson Hsieh.
1008
1009         Fixed the bug by traversing the parent in the composed tree when looking for an element to focus.
1010
1011         Test: fast/shadow-dom/focus-slot-parent.html
1012
1013         * page/EventHandler.cpp:
1014         (WebCore::EventHandler::dispatchMouseEvent): Fixed the bug. Also use RefPtr instead of a raw pointer.
1015
1016 2018-11-19  Fujii Hironori  <Hironori.Fujii@sony.com>
1017
1018         REGRESSION(r238350) [curl] CertificateInfo.h: error: template specialization requires 'template<>'
1019         https://bugs.webkit.org/show_bug.cgi?id=191849
1020
1021         Unreviewed build fix for clang-cl builds.
1022
1023         No new tests because there's no behaviour change.
1024
1025         * platform/network/curl/CertificateInfo.h:
1026         (WTF::Persistence::Coder<WebCore::CertificateInfo>::encode):
1027         (WTF::Persistence::Coder<WebCore::CertificateInfo>::decode):
1028
1029 2018-11-19  Basuke Suzuki  <basuke.suzuki@sony.com>
1030
1031         [Curl] Add API for CertificateInfo.
1032         https://bugs.webkit.org/show_bug.cgi?id=191647
1033
1034         Reviewed by Alex Christensen.
1035
1036         Minor changes for WebKit API.
1037
1038         Tests: TestWebKitAPI/Tests/WebKit/curl/Certificates.cpp
1039
1040         * platform/network/curl/CertificateInfo.h:
1041         * platform/network/curl/CertificateInfoCurl.cpp:
1042         (WebCore::CertificateInfo::CertificateInfo):
1043         (WebCore::CertificateInfo::makeCertificate):
1044         * platform/network/curl/CurlSSLVerifier.cpp:
1045         (WebCore::BIOHolder::asCertificate):
1046
1047 2018-11-19  Justin Fan  <justin_fan@apple.com>
1048
1049         [WebGPU] Begin implementing WebGPUTexture, WebGPUTextureView, and WebGPUTextureFormatEnum, and WebGPUSwapChain::configure upgrades
1050         https://bugs.webkit.org/show_bug.cgi?id=191794
1051
1052         Reviewed by Dean Jackson.
1053
1054         Test: webgpu/textures-textureviews.html
1055
1056         Implement basic functionality for getting the next WebGPUTexture and TextureView from the WebGPURenderingContext
1057         to use as a render destination for the next draw call. Also introduce WebGPUTextureFormatEnum and the ability to 
1058         configure the context with a chosen texture format. 
1059
1060         * CMakeLists.txt:
1061         * DerivedSources.make:
1062         * Modules/webgpu/GPUSwapChain.h: Texture/Pixel format can now be set.
1063         * Modules/webgpu/GPUTexture.h: Added. Interface to a MTLTexture.
1064         * Modules/webgpu/GPUTextureFormatEnum.h: Added.
1065         * Modules/webgpu/WebGPUDevice.cpp:
1066         (WebCore::WebGPUDevice::createRenderPipeline const): Removed now-unnecessary enum class cast.
1067         * Modules/webgpu/WebGPURenderPipelineDescriptor.h: Rather than duplicate GPURenderPipelineDescriptor::PrimitiveTopology, alias to it.
1068         * Modules/webgpu/WebGPUSwapChain.cpp:
1069         (WebCore::WebGPUSwapChain::configure): Can now specify a specific texture format for the underlying CAMetalLayer.
1070         (WebCore::WebGPUSwapChain::getNextTexture): Added. Request the next drawable texture.
1071         * Modules/webgpu/WebGPUSwapChain.h: Expose getNextTexture().
1072         * Modules/webgpu/WebGPUSwapChain.idl:
1073         * Modules/webgpu/WebGPUTexture.cpp: Added. 
1074         (WebCore::WebGPUTexture::create):
1075         (WebCore::WebGPUTexture::WebGPUTexture):
1076         (WebCore::WebGPUTexture::createDefaultTextureView):
1077         * Modules/webgpu/WebGPUTexture.h: Added.
1078         * Modules/webgpu/WebGPUTexture.idl: Added.
1079         * Modules/webgpu/WebGPUTextureFormatEnum.h: Added. Type alias for GPUTextureFormatEnum.
1080         * Modules/webgpu/WebGPUTextureFormatEnum.idl: Added. Used to represent any texture format used by WebGPU.
1081         * Modules/webgpu/WebGPUTextureView.cpp: Added.
1082         (WebCore::WebGPUTextureView::create):
1083         (WebCore::WebGPUTextureView::WebGPUTextureView):
1084         * Modules/webgpu/WebGPUTextureView.h: Added.
1085         * Modules/webgpu/WebGPUTextureView.idl: Added.
1086         * Modules/webgpu/cocoa/GPUSwapChainMetal.mm: 
1087         (WebCore::GPUSwapChain::create):
1088         (WebCore::GPUSwapChain::setFormat): Called by WebGPUSwapChain::configure().
1089         (WebCore::GPUSwapChain::getNextTexture):
1090         * Modules/webgpu/cocoa/GPUTextureFormatEnumMetal.mm: Added.
1091         (WebCore::convertAndValidate): Convert the WebGPUTextureFormatEnum to a MTLPixelFormat.
1092         * Modules/webgpu/cocoa/GPUTextureMetal.mm: Added.
1093         (WebCore::GPUTexture::create):
1094         (WebCore::GPUTexture::GPUTexture):
1095         (WebCore::GPUTexture::createDefaultTextureView): Uses the pixelFormat of the original texture.
1096         * Sources.txt:
1097         * SourcesCocoa.txt:
1098         * WebCore.xcodeproj/project.pbxproj:
1099         * bindings/js/WebCoreBuiltinNames.h:
1100
1101 2018-11-19  Joseph Pecoraro  <pecoraro@apple.com>
1102
1103         Web Inspector: "Reload Web Inspector" button no longer partially works
1104         https://bugs.webkit.org/show_bug.cgi?id=191773
1105         <rdar://problem/46139932>
1106
1107         Reviewed by Devin Rousso.
1108
1109         * inspector/InspectorFrontendClient.h:
1110         * inspector/InspectorFrontendHost.cpp:
1111         (WebCore::InspectorFrontendHost::reopen):
1112         * inspector/InspectorFrontendHost.h:
1113         * inspector/InspectorFrontendHost.idl:
1114         Provide a host call to reopen an inspector window to reload it.
1115
1116         * testing/Internals.cpp:
1117         Stub implementation, this is not used in tests.
1118
1119 2018-11-19  Rob Buis  <rbuis@igalia.com>
1120
1121         Setting document.title should have no effect for non SVG/HTML documents
1122         https://bugs.webkit.org/show_bug.cgi?id=191643
1123
1124         Reviewed by Chris Dumez.
1125
1126         Setting document.title should have no effect for non SVG/HTML documents,
1127         see https://html.spec.whatwg.org/multipage/dom.html#document.title.
1128
1129         Behavior matches Firefox and Chrome.
1130
1131         Test: imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.title-not-in-html-svg.html
1132
1133         * dom/Document.cpp:
1134         (WebCore::Document::setTitle):
1135
1136 2018-11-19  Wenson Hsieh  <wenson_hsieh@apple.com>
1137
1138         Dragging image with a border-image larger than the image element crashes
1139         https://bugs.webkit.org/show_bug.cgi?id=191817
1140         <rdar://problem/46159222>
1141
1142         Reviewed by Ryosuke Niwa.
1143
1144         When dragging an image element, if the image element has:
1145
1146         (1) box-sizing: border-box;
1147         (2) a border-image
1148         (3) a border-top-width that is at least as large as the height of the element and/or a border-left-width that is
1149             at least as large as the width of the element
1150
1151         ...then upon drag, we will fail to create a suitable drag image using the bounding box of the image element
1152         since the size is empty, thereby causing a crash. To fix this, we bail out of this bounding-rect-dependent
1153         codepath for generating a drag image in the case where the bounding rect is empty, and instead fall back to an
1154         icon representation for the drag image.
1155
1156         Test: fast/events/drag-image-with-border-image.html
1157
1158         * page/DragController.cpp:
1159         (WebCore::DragController::doImageDrag):
1160
1161 2018-11-18  Zan Dobersek  <zdobersek@igalia.com>
1162
1163         HarfBuzzFace::CacheEntry should use 32-bit values in its HashMap
1164         https://bugs.webkit.org/show_bug.cgi?id=191825
1165
1166         Reviewed by Michael Catanzaro.
1167
1168         The HashMap-based glyph cache contained in HarfBuzzFace::CacheEntry
1169         objects is used to map given Unicode codepoints to corresponding
1170         glyph indices (which occurs in the harfBuzzGetGlyph() function that's
1171         invoked by HarfBuzz).
1172
1173         The 16-bit unsigned integer as the map's value type is not enough here
1174         when the glyph index mapping is done through Freetype -- its API returns
1175         32-bit glyph indices, and Cairo assigns this value to the 64-bit
1176         unsigned index variable in the cairo_glyph_t struct. The value type is
1177         thus bumped to 32 bits to match the unsigned type size of the index's
1178         origin.
1179
1180         * platform/graphics/harfbuzz/HarfBuzzFace.h:
1181         * platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:
1182
1183 2018-11-17  Wenson Hsieh  <wenson_hsieh@apple.com>
1184
1185         [iOS] Remove all usages of UIItemProvider, UIItemProviderReading, and related classes
1186         https://bugs.webkit.org/show_bug.cgi?id=191819
1187
1188         Reviewed by Dan Bernstein.
1189
1190         Replace UIItemProvider (and related classes) with NSItemProvider.
1191
1192         * platform/ios/PlatformPasteboardIOS.mm:
1193         (WebCore::registerItemToPasteboard):
1194         * platform/ios/WebItemProviderPasteboard.h:
1195         * platform/ios/WebItemProviderPasteboard.mm:
1196         (-[WebItemProviderDataRegistrar registerItemProvider:]):
1197         (-[WebItemProviderWritableObjectRegistrar initWithObject:]):
1198         (-[WebItemProviderWritableObjectRegistrar representingObject]):
1199         (-[WebItemProviderWritableObjectRegistrar registerItemProvider:]):
1200         (-[WebItemProviderRegistrationInfoList addRepresentingObject:]):
1201         (-[WebItemProviderRegistrationInfoList itemProvider]):
1202         (-[WebItemProviderPasteboard pasteboardTypes]):
1203         (-[WebItemProviderPasteboard _preLoadedDataConformingToType:forItemProviderAtIndex:]):
1204         (-[WebItemProviderPasteboard dataForPasteboardType:inItemSet:]):
1205         (allLoadableClasses):
1206         (classForTypeIdentifier):
1207         (-[WebItemProviderPasteboard valuesForPasteboardType:inItemSet:]):
1208         (-[WebItemProviderPasteboard numberOfFiles]):
1209         (-[WebItemProviderPasteboard itemProviderAtIndex:]):
1210         (-[WebItemProviderPasteboard enumerateItemProvidersWithBlock:]):
1211         * platform/mac/DragDataMac.mm:
1212         (WebCore::DragData::containsURL const):
1213
1214 2018-11-17  Ross Kirsling  <ross.kirsling@sony.com>
1215
1216         Remove superfluous LayoutUnit initializations
1217         https://bugs.webkit.org/show_bug.cgi?id=191791
1218
1219         Reviewed by Simon Fraser.
1220
1221         First step toward making LayoutUnit constructors explicit:
1222         eliminate `= 0` when constructing LayoutUnit lvalues.
1223
1224         * editing/Editor.cpp:
1225         (WebCore::Editor::firstRectForRange const):
1226         * editing/FrameSelection.cpp:
1227         (WebCore::FrameSelection::modify):
1228         (WebCore::FrameSelection::lineDirectionPointForBlockDirectionNavigation):
1229         * html/shadow/SliderThumbElement.cpp:
1230         (WebCore::RenderSliderContainer::computeLogicalHeight const):
1231         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
1232         (WebCore::Layout::InlineFormattingContext::Geometry::justifyRuns):
1233         * page/FrameView.cpp:
1234         (WebCore::FrameView::forceLayoutForPagination):
1235         * page/SpatialNavigation.cpp:
1236         (WebCore::scrollInDirection):
1237         (WebCore::distanceDataForNode):
1238         * rendering/AutoTableLayout.cpp:
1239         (WebCore::AutoTableLayout::layout):
1240         * rendering/GridTrackSizingAlgorithm.cpp:
1241         (WebCore::marginIntrinsicLogicalWidthForChild):
1242         (WebCore::GridTrackSizingAlgorithm::gridAreaBreadthForChild const):
1243         * rendering/InlineFlowBox.cpp:
1244         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
1245         (WebCore::InlineFlowBox::paintFillLayer):
1246         (WebCore::InlineFlowBox::paintBoxDecorations):
1247         (WebCore::InlineFlowBox::paintMask):
1248         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment const):
1249         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment const):
1250         * rendering/RenderBlock.cpp:
1251         (WebCore::RenderBlock::marginIntrinsicLogicalWidthForChild const):
1252         (WebCore::RenderBlock::layoutPositionedObject):
1253         (WebCore::RenderBlock::selectionGapRectsForRepaint):
1254         (WebCore::RenderBlock::paintSelection):
1255         (WebCore::RenderBlock::textIndentOffset const):
1256         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths const):
1257         * rendering/RenderBlockFlow.cpp:
1258         (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
1259         (WebCore::RenderBlockFlow::layoutBlock):
1260         (WebCore::RenderBlockFlow::layoutBlockChildren):
1261         (WebCore::RenderBlockFlow::marginValuesForChild const):
1262         (WebCore::RenderBlockFlow::estimateLogicalTopPosition):
1263         (WebCore::RenderBlockFlow::applyBeforeBreak):
1264         (WebCore::RenderBlockFlow::applyAfterBreak):
1265         (WebCore::RenderBlockFlow::adjustBlockChildForPagination):
1266         (WebCore::RenderBlockFlow::clearFloats):
1267         (WebCore::RenderBlockFlow::lowestFloatLogicalBottom const):
1268         (WebCore::RenderBlockFlow::lowestInitialLetterLogicalBottom const):
1269         (WebCore::RenderBlockFlow::addOverhangingFloats):
1270         (WebCore::RenderBlockFlow::getClearDelta):
1271         (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):
1272         * rendering/RenderBlockLineLayout.cpp:
1273         (WebCore::setLogicalWidthForTextRun):
1274         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
1275         (WebCore::RenderBlockFlow::determineStartPosition):
1276         * rendering/RenderBox.cpp:
1277         (WebCore::RenderBox::fillAvailableMeasure const):
1278         (WebCore::RenderBox::computeIntrinsicLogicalWidthUsing const):
1279         (WebCore::RenderBox::computeLogicalWidthInFragmentUsing const):
1280         (WebCore::RenderBox::computePercentageLogicalHeight const):
1281         (WebCore::RenderBox::computeReplacedLogicalWidthUsing const):
1282         (WebCore::RenderBox::computePositionedLogicalWidthUsing const):
1283         (WebCore::RenderBox::computePositionedLogicalHeightUsing const):
1284         (WebCore::RenderBox::computePositionedLogicalWidthReplaced const):
1285         (WebCore::RenderBox::computePositionedLogicalHeightReplaced const):
1286         * rendering/RenderBoxModelObject.cpp:
1287         (WebCore::RenderBoxModelObject::computedCSSPadding const):
1288         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry const):
1289         * rendering/RenderDeprecatedFlexibleBox.cpp:
1290         (WebCore::marginWidthForChild):
1291         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
1292         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
1293         * rendering/RenderFileUploadControl.cpp:
1294         (WebCore::RenderFileUploadControl::paintObject):
1295         * rendering/RenderFragmentedFlow.cpp:
1296         (WebCore::RenderFragmentedFlow::validateFragments):
1297         (WebCore::RenderFragmentedFlow::adjustedPositionRelativeToOffsetParent const):
1298         (WebCore::RenderFragmentedFlow::updateFragmentsFragmentedFlowPortionRect):
1299         * rendering/RenderFrameSet.cpp:
1300         (WebCore::RenderFrameSet::paint):
1301         * rendering/RenderListItem.cpp:
1302         (WebCore::RenderListItem::positionListMarker):
1303         * rendering/RenderListMarker.cpp:
1304         (WebCore::RenderListMarker::computePreferredLogicalWidths):
1305         (WebCore::RenderListMarker::updateMargins):
1306         * rendering/RenderMultiColumnSet.cpp:
1307         (WebCore::RenderMultiColumnSet::initialBlockOffsetForPainting const):
1308         * rendering/RenderRubyRun.cpp:
1309         (WebCore::RenderRubyRun::layoutBlock):
1310         * rendering/RenderTable.cpp:
1311         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
1312         (WebCore::RenderTable::layout):
1313         (WebCore::RenderTable::offsetWidthForColumn const):
1314         (WebCore::RenderTable::offsetHeightForColumn const):
1315         (WebCore::RenderTable::outerBorderBefore const):
1316         (WebCore::RenderTable::outerBorderAfter const):
1317         (WebCore::RenderTable::outerBorderStart const):
1318         (WebCore::RenderTable::outerBorderEnd const):
1319         * rendering/RenderTableCell.cpp:
1320         (WebCore::RenderTableCell::logicalWidthFromColumns const):
1321         (WebCore::RenderTableCell::computeIntrinsicPadding):
1322         * rendering/RenderTableSection.cpp:
1323         (WebCore::RenderTableSection::calcRowLogicalHeight):
1324         (WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows):
1325         (WebCore::RenderTableSection::distributeExtraLogicalHeightToAutoRows):
1326         (WebCore::RenderTableSection::distributeRemainingExtraLogicalHeight):
1327         (WebCore::RenderTableSection::layoutRows):
1328         (WebCore::RenderTableSection::calcOuterBorderBefore const):
1329         (WebCore::RenderTableSection::calcOuterBorderAfter const):
1330         (WebCore::RenderTableSection::calcOuterBorderStart const):
1331         (WebCore::RenderTableSection::calcOuterBorderEnd const):
1332         * rendering/RootInlineBox.cpp:
1333         (WebCore::RootInlineBox::alignBoxesInBlockDirection):
1334         (WebCore::RootInlineBox::beforeAnnotationsAdjustment const):
1335         (WebCore::RootInlineBox::lineSnapAdjustment const):
1336         (WebCore::RootInlineBox::verticalPositionForBox):
1337         * rendering/line/BreakingContext.h:
1338         (WebCore::inlineLogicalWidth):
1339         * rendering/mathml/RenderMathMLBlock.cpp:
1340         (WebCore::RenderMathMLBlock::layoutItems):
1341         * rendering/mathml/RenderMathMLFraction.cpp:
1342         (WebCore::RenderMathMLFraction::layoutBlock):
1343         * rendering/mathml/RenderMathMLOperator.cpp:
1344         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
1345         * rendering/mathml/RenderMathMLRoot.cpp:
1346         (WebCore::RenderMathMLRoot::computePreferredLogicalWidths):
1347         (WebCore::RenderMathMLRoot::paint):
1348         * rendering/mathml/RenderMathMLRow.cpp:
1349         (WebCore::RenderMathMLRow::computePreferredLogicalWidths):
1350         * rendering/mathml/RenderMathMLScripts.cpp:
1351         (WebCore::RenderMathMLScripts::layoutBlock):
1352         * rendering/mathml/RenderMathMLUnderOver.cpp:
1353         (WebCore::RenderMathMLUnderOver::stretchHorizontalOperatorsAndLayoutChildren):
1354         (WebCore::RenderMathMLUnderOver::layoutBlock):
1355         * rendering/style/RenderStyle.cpp:
1356         (WebCore::RenderStyle::getShadowInsetExtent const):
1357         * rendering/svg/RenderSVGText.cpp:
1358         (WebCore::RenderSVGText::layout):
1359
1360 2018-11-17  Simon Fraser  <simon.fraser@apple.com>
1361
1362         Avoid triggering compositing updates when only the root layer is composited
1363         https://bugs.webkit.org/show_bug.cgi?id=191813
1364
1365         Reviewed by Zalan Bujtas.
1366
1367         If we know that the only composited layer is the root, we can avoid triggering deep
1368         compositing updates sometimes, for example when layout changes size or position,
1369         or when z-order lists change.
1370
1371         * rendering/RenderLayer.cpp:
1372         (WebCore::RenderLayer::addChild):
1373         (WebCore::RenderLayer::removeChild):
1374         (WebCore::RenderLayer::updateLayerPosition):
1375         (WebCore::RenderLayer::scrollTo):
1376         (WebCore::RenderLayer::updateCompositingLayersAfterScroll):
1377         (WebCore::outputPaintOrderTreeRecursive):
1378         * rendering/RenderLayerCompositor.cpp:
1379         (WebCore::RenderLayerCompositor::updateBackingAndHierarchy): Consult the layer.hasCompositingDescendant()
1380         flag to cut off descendants traversal when possible.
1381         (WebCore::RenderLayerCompositor::layerStyleChanged):
1382
1383 2018-11-17  Simon Fraser  <simon.fraser@apple.com>
1384
1385         Fix an error in 238354 - !=, not ==.
1386         
1387         Fixes test failures.
1388
1389         * rendering/RenderLayerCompositor.cpp:
1390         (WebCore::RenderLayerCompositor::layerBecameNonComposited):
1391
1392 2018-11-17  Simon Fraser  <simon.fraser@apple.com>
1393
1394         Clarify RenderLayerCompositor::hasAnyAdditionalCompositedLayers() and related code.
1395         https://bugs.webkit.org/show_bug.cgi?id=191810
1396
1397         Reviewed by Zalan Bujtas.
1398
1399         Rename m_compositedLayerCount to m_contentLayersCount and have it track layers other
1400         than the RenderView's layer.
1401
1402         hasAnyAdditionalCompositedLayers() is really about whether we can drop out of compositing
1403         because no content layer is composited, and overlays don't require compositing, so
1404         rename it.
1405
1406         * rendering/RenderLayerCompositor.cpp:
1407         (WebCore::RenderLayerCompositor::updateCompositingLayers):
1408         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1409         (WebCore::RenderLayerCompositor::needsCompositingForContentOrOverlays const):
1410         (WebCore::RenderLayerCompositor::layerBecameComposited):
1411         (WebCore::RenderLayerCompositor::layerBecameNonComposited):
1412         (WebCore::RenderLayerCompositor::layerTreeAsText):
1413         (WebCore::RenderLayerCompositor::hasAnyAdditionalCompositedLayers const): Deleted.
1414         * rendering/RenderLayerCompositor.h:
1415
1416 2018-11-17  Simon Fraser  <simon.fraser@apple.com>
1417
1418         Rename RenderLayerCompositor::inCompositingMode() to usesCompositing()
1419         https://bugs.webkit.org/show_bug.cgi?id=191808
1420
1421         Reviewed by Zalan Bujtas.
1422
1423         Other code uses "usesCompositing" so standardize on that (future changes will make
1424         "compositing mode" more ambiguous). Also remove a FrameView function that only
1425         had one caller.
1426
1427         * page/FrameView.cpp:
1428         (WebCore::FrameView::clearBackingStores):
1429         (WebCore::FrameView::handleDeferredScrollbarsUpdateAfterDirectionChange):
1430         (WebCore::FrameView::delegatesScrollingDidChange):
1431         (WebCore::FrameView::hasCompositedContent const): Deleted.
1432         * page/FrameView.h:
1433         * rendering/RenderLayer.cpp:
1434         (WebCore::RenderLayer::addChild):
1435         (WebCore::RenderLayer::removeChild):
1436         (WebCore::RenderLayer::rebuildZOrderLists):
1437         (WebCore::RenderLayer::updateLayerPosition):
1438         (WebCore::RenderLayer::scrollTo):
1439         (WebCore::RenderLayer::updateCompositingLayersAfterScroll):
1440         * rendering/RenderLayerCompositor.cpp:
1441         (WebCore::RenderLayerCompositor::updateCompositingPolicy):
1442         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1443         (WebCore::RenderLayerCompositor::layerStyleChanged):
1444         (WebCore::RenderLayerCompositor::updateBacking):
1445         (WebCore::RenderLayerCompositor::parentFrameContentLayers):
1446         (WebCore::RenderLayerCompositor::setIsInWindow):
1447         (WebCore::RenderLayerCompositor::needsToBeComposited const):
1448         (WebCore::RenderLayerCompositor::reasonsForCompositing const):
1449         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation const):
1450         (WebCore::RenderLayerCompositor::rootOrBodyStyleChanged):
1451         (WebCore::RenderLayerCompositor::rootBackgroundColorOrTransparencyChanged):
1452         * rendering/RenderLayerCompositor.h:
1453         * rendering/RenderView.cpp:
1454         (WebCore::RenderView::repaintViewAndCompositedLayers):
1455         (WebCore::RenderView::usesCompositing const):
1456
1457 2018-11-17  Devin Rousso  <drousso@apple.com>
1458
1459         Web Inspector: Network: add button to show system certificate dialog
1460         https://bugs.webkit.org/show_bug.cgi?id=191458
1461         <rdar://problem/45977019>
1462
1463         Reviewed by Joseph Pecoraro.
1464
1465         Test: http/tests/inspector/network/getSerializedCertificate.html
1466
1467         * inspector/agents/InspectorNetworkAgent.h:
1468         * inspector/agents/InspectorNetworkAgent.cpp:
1469         (WebCore::InspectorNetworkAgent::getSerializedCertificate): Added.
1470
1471         * inspector/InspectorFrontendHost.idl:
1472         * inspector/InspectorFrontendHost.h:
1473         * inspector/InspectorFrontendHost.cpp:
1474         (WebCore::InspectorFrontendHost::supportsShowCertificate): Added.
1475         (WebCore::InspectorFrontendHost::showCertificate): Added.
1476         * inspector/InspectorFrontendClient.h:
1477         (InspectorFrontendClient::showCertificate): Added.
1478         * testing/Internals.cpp:
1479         (InspectorStubFrontend::showCertificate): Added.
1480
1481         * platform/network/cf/CertificateInfo.h:
1482         (WTF::Persistence::encodeCFData): Added.
1483         (WTF::Persistence::decodeCFData): Added.
1484         (WTF::Persistence::encodeSecTrustRef): Added.
1485         (WTF::Persistence::decodeSecTrustRef): Added.
1486         (WTF::Persistence::encodeCertificateChain): Added.
1487         (WTF::Persistence::decodeCertificateChain): Added.
1488         (WTF::Persistence::Coder<WebCore::CertificateInfo>::encode): Added.
1489         (WTF::Persistence::Coder<WebCore::CertificateInfo>::decode): Added.
1490         * platform/network/cf/CertificateInfoCFNet.cpp:
1491         * platform/network/cocoa/CertificateInfoCocoa.mm:
1492
1493         * platform/network/curl/CertificateInfo.h:
1494         (WTF::Persistence::Coder<WebCore::CertificateInfo>::encode): Added.
1495         (WTF::Persistence::Coder<WebCore::CertificateInfo>::decode): Added.
1496
1497         * platform/network/soup/CertificateInfo.h:
1498         (WTF::Persistence::Coder<GRefPtr<GByteArray>>::encode): Added.
1499         (WTF::Persistence::Coder<GRefPtr<GByteArray>>::decode): Added.
1500         (WTF::Persistence::certificatesDataListFromCertificateInfo): Added.
1501         (WTF::Persistence::certificateFromCertificatesDataList): Added.
1502         (WTF::Persistence::Coder<WebCore::CertificateInfo>::encode): Added.
1503         (WTF::Persistence::Coder<WebCore::CertificateInfo>::decode): Added.
1504
1505 2018-11-17  Zalan Bujtas  <zalan@apple.com>
1506
1507         [LFC][IFC] InlineFormattingState::addDetachingRule should accumulate rules.
1508         https://bugs.webkit.org/show_bug.cgi?id=191801
1509
1510         Reviewed by Antti Koivisto.
1511
1512         before<span style="position: relative">positioned</span>after
1513         In the example above the <positioned> inline box has both the BreakAtStart and the BreakAtEnd rules.
1514         While walking through the inline tree, we add BreakAtStart first and when we figure it's the last child too,
1515         we add BreakAtEnd as well. BreakAtEnd should not clear the BreakAtStart rule.
1516
1517         Test: fast/inline/simple-inline-with-out-of-flow-descendant2.html
1518
1519         * layout/inlineformatting/InlineFormattingContext.cpp:
1520         (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
1521         * layout/inlineformatting/InlineFormattingState.cpp:
1522         (WebCore::Layout::InlineFormattingState::addDetachingRule):
1523         * layout/inlineformatting/InlineFormattingState.h:
1524         (WebCore::Layout::InlineFormattingState::addDetachingRule): Deleted.
1525
1526 2018-11-17  Jonathan Hammer  <jonathan@e3software.com>
1527
1528         Caret stops blinking after context menu shown
1529         https://bugs.webkit.org/show_bug.cgi?id=191715
1530
1531         Reviewed by Ryosuke Niwa.
1532
1533         Changed EventHandler::sendContextMenuEvent to un-suspend caret blinking so that
1534         the caret continues to blink even after the context menu is dismissed. The normal
1535         way of un-suspendeding caret blinking (in EventHandler::handleMouseReleaseEvent) does
1536         not apply in the case of context menus because handleMouseReleaseEvent is not
1537         called once the context menu is up.
1538
1539         Test: fast/events/contextmenu-dismiss-blink-caret.html
1540
1541         * page/EventHandler.cpp:
1542         (WebCore::EventHandler::sendContextMenuEvent):
1543         * testing/Internals.cpp:
1544         (WebCore::Internals::isCaretBlinkingSuspended):
1545         * testing/Internals.h:
1546         * testing/Internals.idl:
1547
1548 2018-11-16  Antoine Quint  <graouts@apple.com>
1549
1550         [Pointer Events] event.isPrimary doesn't always represent the oldest active touch
1551         https://bugs.webkit.org/show_bug.cgi?id=191752
1552         <rdar://problem/46129270>
1553
1554         Reviewed by Dean Jackson.
1555
1556         Provide isPrimary to the constructor so its value can be determined at the call site.
1557
1558         Test: pointerevents/ios/pointer-events-is-primary.html
1559
1560         * dom/PointerEvent.h:
1561         * dom/ios/PointerEventIOS.cpp:
1562         (WebCore::PointerEvent::create):
1563         (WebCore::PointerEvent::PointerEvent):
1564         (WebCore::m_isPrimary):
1565
1566 2018-11-16  Alex Christensen  <achristensen@webkit.org>
1567
1568         Tweak _showSafeBrowsingWarningWithTitle SPI
1569         https://bugs.webkit.org/show_bug.cgi?id=191799
1570
1571         Reviewed by Wenson Hsieh.
1572
1573         It turns out I needed to expose both sentinel values used in safe browsing for my application of this SPI in Mac Safari.
1574         Allowing the caller to make its own sentinel values is insufficient because the malware confirmation needs to be over the warning.
1575         The completion handler parameter should just be a bool indicating whether the user has chosen to continue after all warnings.
1576
1577         Covered by updated API tests.
1578
1579         * en.lproj/Localizable.strings:
1580         * platform/LocalizedStrings.cpp:
1581         (WebCore::formControlCancelButtonTitle):
1582         Make "Cancel"'s description a little more generic.
1583
1584 2018-11-16  Simon Fraser  <simon.fraser@apple.com>
1585
1586         Optimize composited iframe layer hookup
1587         https://bugs.webkit.org/show_bug.cgi?id=191778
1588
1589         Reviewed by Zalan Bujtas.
1590
1591         The change made in r238229 can be more targeted; we only need to hook up iframe content
1592         layers when the layer is already composited (otherwise the updateBacking() above would have triggered
1593         the work), and when it's a RenderWidget layer.
1594         
1595         Tested by existing tests.
1596
1597         * rendering/RenderLayer.cpp:
1598         (WebCore::outputPaintOrderTreeRecursive):
1599         * rendering/RenderLayerCompositor.cpp:
1600         (WebCore::RenderLayerCompositor::layerStyleChanged):
1601
1602 2018-11-16  Ross Kirsling  <ross.kirsling@sony.com>
1603
1604         Provide default implementation of Widget
1605         https://bugs.webkit.org/show_bug.cgi?id=191784
1606
1607         Reviewed by Michael Catanzaro.
1608
1609         * SourcesWPE.txt:
1610         * platform/Widget.cpp:
1611         (WebCore::Widget::Widget):
1612         (WebCore::Widget::frameRect const):
1613         (WebCore::Widget::~Widget):
1614         (WebCore::Widget::setFrameRect):
1615         (WebCore::Widget::paint):
1616         (WebCore::Widget::setFocus):
1617         (WebCore::Widget::setCursor):
1618         (WebCore::Widget::show):
1619         (WebCore::Widget::hide):
1620         (WebCore::Widget::setIsSelected):
1621         * platform/gtk/WidgetGtk.cpp:
1622         (WebCore::Widget::Widget): Deleted.
1623         (WebCore::Widget::frameRect const): Deleted.
1624         * platform/win/WidgetWin.cpp:
1625         (WebCore::Widget::Widget): Deleted.
1626         (WebCore::Widget::frameRect const): Deleted.
1627         * platform/wpe/WidgetWPE.cpp: Removed.
1628
1629 2018-11-16  Chris Dumez  <cdumez@apple.com>
1630
1631         [macOS] Label "prewarmed" WebContent processes in Activity Monitor
1632         https://bugs.webkit.org/show_bug.cgi?id=191765
1633         <rdar://problem/45953463>
1634
1635         Reviewed by Geoffrey Garen.
1636
1637         * en.lproj/Localizable.strings:
1638
1639 2018-11-16  Jeremy Jones  <jeremyj@apple.com>
1640
1641         Enable external playback for video in element fullscreen.
1642         https://bugs.webkit.org/show_bug.cgi?id=190359
1643         rdar://problem/42560085
1644
1645         Reviewed by Jer Noble.
1646
1647         No new tests because we don't have a good way to test external playback.
1648
1649         Any video that might be auto-pipped from element fullscreen should also enable external playback for video out.
1650         PiP and external playback are mutually exclusive. Instead of preventing PiP when external playback is active,
1651         allow PiP, but disable external playback while PiP is active.
1652
1653         * html/HTMLMediaElement.cpp:
1654         (WebCore::HTMLMediaElement::setVideoFullscreenStandby):
1655         * html/HTMLMediaElement.h:
1656         * platform/graphics/MediaPlayer.cpp:
1657         (WebCore::MediaPlayer::setVideoFullscreenStandby):
1658         (WebCore::MediaPlayer::videoFullscreenStandby const):
1659         * platform/graphics/MediaPlayer.h:
1660         (WebCore::MediaPlayerClient::mediaPlayerVideoFullscreenStandby const):
1661         * platform/graphics/MediaPlayerPrivate.h:
1662         (WebCore::MediaPlayerPrivateInterface::setVideoFullscreenStandby):
1663         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1664         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenStandby):
1665         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateDisableExternalPlayback):
1666
1667 2018-11-16  Jer Noble  <jer.noble@apple.com>
1668
1669         Regression(r233865): Causes synchronous IPC in the middle of layout
1670         https://bugs.webkit.org/show_bug.cgi?id=188307
1671         <rdar://problem/42807306>
1672
1673         Reviewed by Eric Carlson.
1674
1675         Revert the changes added in r233865. Rather than make a syncronous call to the UIProcess to
1676         query whether the view has been backgrounded while (e.g.) JS has been spinning, perform the
1677         steps of the requestFullscreen() method on the next run loop, allowing messages from the
1678         UIProcess about page visibilty to be delivered first.
1679
1680         * dom/Document.cpp:
1681         (WebCore::Document::requestFullScreenForElement):
1682         * html/HTMLMediaElement.cpp:
1683         (WebCore::HTMLMediaElement::enterFullscreen):
1684         * html/HTMLMediaElement.h:
1685         * page/ChromeClient.h:
1686
1687 2018-11-16  Ross Kirsling  <ross.kirsling@sony.com>
1688
1689         Provide default implementation of Cursor
1690         https://bugs.webkit.org/show_bug.cgi?id=191772
1691
1692         Reviewed by Michael Catanzaro.
1693
1694         * SourcesWPE.txt:
1695         * platform/Cursor.cpp:
1696         (WebCore::Cursor::ensurePlatformCursor const):
1697         * platform/wpe/CursorWPE.cpp: Removed.
1698
1699 2018-11-16  Don Olmstead  <don.olmstead@sony.com>
1700
1701         EditorWPE should be EditorLibWPE
1702         https://bugs.webkit.org/show_bug.cgi?id=191774
1703
1704         Reviewed by Michael Catanzaro.
1705
1706         The platform specific implementations of Editor are all around the
1707         platform's Pasteboard. Since the Pasteboard implementation is now based
1708         around USE(LIBWPE) EditorWPE should be renamed to EditorLibWPE.
1709
1710         * SourcesWPE.txt:
1711         * editing/libwpe/EditorLibWPE.cpp: Renamed from Source/WebCore/editing/wpe/EditorWPE.cpp.
1712
1713 2018-11-16  Jeremy Jones  <jeremyj@apple.com>
1714
1715         Include AirPlay destination name in AirPlay placard.
1716         https://bugs.webkit.org/show_bug.cgi?id=191574
1717         rdar://problem/45536144
1718
1719         Reviewed by Eric Carlson.
1720
1721         Updated existing tests.
1722
1723         Include the name of the AirPlay destination in the video element's AirPlay placard.
1724
1725         * Modules/modern-media-controls/controls/airplay-placard.js:
1726         (AirplayPlacard):
1727         * Modules/modern-media-controls/controls/placard.js:
1728         * Modules/modern-media-controls/media/placard-support.js:
1729         (PlacardSupport.prototype._updatePlacard):
1730         (PlacardSupport.prototype._updateAirPlayPlacard):
1731         (PlacardSupport):
1732         * en.lproj/modern-media-controls-localized-strings.js:
1733
1734 2018-11-16  Zalan Bujtas  <zalan@apple.com>
1735
1736         Add DidFirstMeaningfulPaint milestone.
1737         https://bugs.webkit.org/show_bug.cgi?id=191754
1738
1739         Reviewed by Simon Fraser.
1740
1741         This milestone fires sone after the paint triggered by the first visually non-empty layout.
1742
1743         * page/FrameView.cpp:
1744         (WebCore::FrameView::fireLayoutRelatedMilestonesIfNeeded):
1745         (WebCore::FrameView::firePaintRelatedMilestonesIfNeeded):
1746         * page/LayoutMilestone.h:
1747
1748 2018-11-16  Don Olmstead  <don.olmstead@sony.com>
1749
1750         Provide default implementations of Image and Icon
1751         https://bugs.webkit.org/show_bug.cgi?id=191764
1752
1753         Reviewed by Michael Catanzaro.
1754
1755         Makes IconWPE and ImageWPE implementations the default.
1756
1757         * Sources.txt:
1758         * SourcesWPE.txt:
1759         * platform/graphics/Icon.cpp: Renamed from Source/WebCore/platform/graphics/wpe/IconWPE.cpp.
1760         * platform/graphics/Image.cpp:
1761         (WebCore::BitmapImage::invalidatePlatformData): Placed here for consistency with implementing ports.
1762         (WebCore::Image::loadPlatformResource):
1763         * platform/graphics/wpe/ImageWPE.cpp: Removed.
1764
1765 2018-11-16  Brent Fulgham  <bfulgham@apple.com>
1766
1767         [Win] Reduce the use of WKSI library calls: CFNetwork
1768         https://bugs.webkit.org/show_bug.cgi?id=191718
1769         <rdar://problem/46108732>
1770
1771         Reviewed by Alex Christensen.
1772
1773         Remove custom WKSI CFNetwork calls, since the SPI is already documented in PAL. Just
1774         make the same calls on Windows, like we did for iOS and macOS back in 2017.
1775
1776         Stop including WebKitSystemInterface.h for files that used to rely on it
1777         for font-related features.
1778         
1779         Tested by existing Windows regression tests. There should be no change in behavior.
1780
1781         * platform/graphics/win/FontCacheWin.cpp:
1782         * platform/graphics/win/FontCustomPlatformData.cpp:
1783         * platform/graphics/win/FontPlatformDataCGWin.cpp:
1784         * platform/network/cf/CookieStorageCFNet.cpp:
1785         * platform/network/cf/CredentialStorageCFNet.cpp:
1786         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
1787         (WebCore::createPrivateStorageSession):
1788         (WebCore::NetworkStorageSession::switchToNewTestingSession):
1789         (WebCore::NetworkStorageSession::ensureSession):
1790         * platform/network/cf/ResourceError.h:
1791         * platform/network/cf/ResourceErrorCF.cpp:
1792         (WebCore::getSSLPeerCertificateData):
1793         (WebCore::setSSLPeerCertificateData):
1794         (WebCore::ResourceError::getSSLPeerCertificateDataBytePtr):
1795         (WebCore::ResourceError::platformLazyInit):
1796         (WebCore::ResourceError::cfError const):
1797         * platform/network/cf/ResourceHandleCFNet.cpp:
1798         (WebCore::setClientCertificateInSSLProperties):
1799         (WebCore::ResourceHandle::createCFURLConnection):
1800         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
1801         * platform/network/cf/ResourceRequestCFNet.cpp:
1802         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
1803
1804 2018-11-16  Timothy Hatcher  <timothy@apple.com>
1805
1806         Add html{color:text} to the simpleUserAgentStyleSheet on macOS.
1807         https://bugs.webkit.org/show_bug.cgi?id=191760
1808
1809         Reviewed by Antti Koivisto.
1810
1811         * css/CSSDefaultStyleSheets.cpp: Added html{color:text} to simpleUserAgentStyleSheet inside
1812         a PLATFORM(MAC) copy of the string.
1813
1814 2018-11-16  Jer Noble  <jer.noble@apple.com>
1815
1816         An early return from updateSchedulingInfo can leave some variables uninitialized.
1817         https://bugs.webkit.org/show_bug.cgi?id=191755
1818         <rdar://problem/39910089>
1819
1820         Reviewed by Brent Fulgham.
1821
1822         * Modules/webaudio/AudioBufferSourceNode.cpp:
1823         (WebCore::AudioBufferSourceNode::process):
1824         * Modules/webaudio/AudioScheduledSourceNode.cpp:
1825         (WebCore::AudioScheduledSourceNode::updateSchedulingInfo):
1826         * Modules/webaudio/OscillatorNode.cpp:
1827         (WebCore::OscillatorNode::process):
1828
1829 2018-11-16  Alicia Boya García  <aboya@igalia.com>
1830
1831         [MSE][GStreamer] Ignore caps notifications when tearing down the pipeline
1832         https://bugs.webkit.org/show_bug.cgi?id=191578
1833
1834         Reviewed by Xabier Rodriguez-Calvar.
1835
1836         Changing the demuxer to READY state (which is done only in the main
1837         thread) triggers the unlinking of its srcpads, which in turns emits a
1838         caps change notification in the previously linked element since they
1839         become unnegotiated again.
1840
1841         We are not interested in caps notifications in these cases, so let's
1842         just ignore caps notifications emitted from the main thread.
1843
1844         This fixes an assertion failure in the debug builds.
1845
1846         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
1847         (WebCore::AppendPipeline::AppendPipeline):
1848
1849 2018-11-16  Sihui Liu  <sihui_liu@apple.com>
1850
1851         Storing blobs in IDB on iOS: "Error preparing blob/file"
1852         https://bugs.webkit.org/show_bug.cgi?id=188438
1853         <rdar://problem/43097279>
1854
1855         Reviewed by Alex Christensen.
1856
1857         Grant sandbox extension of temp folder to network process, because we suggested network process had access to 
1858         the folder on iOS device but it didn't. 
1859
1860         This makes some existing tests about IDB blob pass on iOS device.
1861
1862         * Modules/indexeddb/server/IDBBackingStore.h:
1863         * Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
1864         (WebCore::IDBServer::SQLiteIDBTransaction::moveBlobFilesIfNecessary):
1865         (WebCore::IDBServer::SQLiteIDBTransaction::deleteBlobFilesIfNecessary):
1866         (WebCore::IDBServer::SQLiteIDBTransaction::abort):
1867         * Modules/indexeddb/shared/InProcessIDBServer.h:
1868
1869 2018-11-16  Don Olmstead  <don.olmstead@sony.com>
1870
1871         Add USE(LIBWPE) to WebCore
1872         https://bugs.webkit.org/show_bug.cgi?id=191401
1873
1874         Reviewed by Michael Catanzaro.
1875
1876         No new tests. No change in behavior.
1877
1878         Migrates all PLATFORM(WPE) code that calls into wpe_* APIs to
1879         USE(LIBWPE) instead.
1880
1881         Renames classes and files to use the suffix LibWPE.
1882
1883         * PlatformWPE.cmake:
1884         * SourcesWPE.txt:
1885         * platform/Pasteboard.h:
1886         * platform/PasteboardStrategy.h:
1887         * platform/PlatformKeyboardEvent.h:
1888         * platform/PlatformPasteboard.h:
1889         * platform/graphics/PlatformDisplay.cpp:
1890         (WebCore::PlatformDisplay::createPlatformDisplay):
1891         * platform/graphics/PlatformDisplay.h:
1892         * platform/graphics/egl/GLContextEGL.h:
1893         * platform/graphics/egl/GLContextEGLLibWPE.cpp: Renamed from Source/WebCore/platform/graphics/egl/GLContextEGLWPE.cpp.
1894         (WebCore::GLContextEGL::createWPEContext):
1895         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1896         (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
1897         * platform/graphics/libwpe/PlatformDisplayLibWPE.cpp: Renamed from Source/WebCore/platform/graphics/wpe/PlatformDisplayWPE.cpp.
1898         (WebCore::PlatformDisplayLibWPE::create):
1899         (WebCore::PlatformDisplayLibWPE::PlatformDisplayLibWPE):
1900         (WebCore::PlatformDisplayLibWPE::~PlatformDisplayLibWPE):
1901         (WebCore::PlatformDisplayLibWPE::initialize):
1902         * platform/graphics/libwpe/PlatformDisplayLibWPE.h: Renamed from Source/WebCore/platform/graphics/wpe/PlatformDisplayWPE.h.
1903         * platform/libwpe/PasteboardLibWPE.cpp: Renamed from Source/WebCore/platform/wpe/PasteboardWPE.cpp.
1904         * platform/libwpe/PlatformKeyboardEventLibWPE.cpp: Renamed from Source/WebCore/platform/wpe/PlatformKeyboardEventWPE.cpp.
1905         * platform/libwpe/PlatformPasteboardLibWPE.cpp: Renamed from Source/WebCore/platform/wpe/PlatformPasteboardWPE.cpp.
1906
1907 2018-11-16  Zalan Bujtas  <zalan@apple.com>
1908
1909         [iOS] 2 subsequent taps are required to trigger certain tasks on the desktop version of YouTube.com (hover vs click).
1910         https://bugs.webkit.org/show_bug.cgi?id=191712
1911         <rdar://problem/45612900>
1912
1913         Reviewed by Simon Fraser.
1914
1915         In handleSyntheticClick() we use WKContentObservation to figure out whether the tap should be treated as a hover or a click.
1916         In general, if the mouse-move event triggers a visible content change, we assume we hit a hover-like drop down menu (or something similar)
1917         and no need to dispatch a click event.
1918         The idea here is that if the new content (result of the mouse-move event) does not respond to mouse click, it is most likely
1919         only for tooltip-like reasons and it's ok to proceed with the click event.
1920
1921         Test: fast/events/touch/ios/click-instead-of-hover-simple.html
1922
1923         * rendering/updating/RenderTreeUpdater.cpp:
1924         (WebCore::CheckForVisibilityChange::~CheckForVisibilityChange):
1925
1926 2018-11-16  Zalan Bujtas  <zalan@apple.com>
1927
1928         [LFC][IFC] Add support for out-of-flow positioned boxes
1929         https://bugs.webkit.org/show_bug.cgi?id=191726
1930
1931         Reviewed by Antti Koivisto.
1932
1933         While laying out formatting context roots (inline-block, floats) in an inline formatting context, we need to make sure
1934         that their out-of-flow descendants get laid out as well.
1935
1936         Test: fast/inline/simple-inline-with-out-of-flow-descendant.html
1937
1938         * layout/inlineformatting/InlineFormattingContext.cpp:
1939         (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const):
1940         * layout/layouttree/LayoutTreeBuilder.cpp: This was returning the wrong context root when the container was also a context root.
1941         (WebCore::Layout::TreeBuilder::createSubTree):
1942
1943 2018-11-16  Thibault Saunier  <tsaunier@igalia.com>
1944
1945         [GStreamer][WebRTC] Add API to enable/disable device mocks
1946         https://bugs.webkit.org/show_bug.cgi?id=191699
1947
1948         This basically us to test MediaStream/WebRTC support without
1949         requiring cameras or microphones and is quite useful.
1950
1951         Also fix the GStreamerAudioMock by:
1952           - Stop setting `leaky-upstream` on the GStreamerCapturer queue,
1953             this was usefull when we were trying to bring the MediaStream
1954             sources inside the main pipeline, it is not the case anymore
1955             (and not doable with latest version of LibWebRTC).
1956           - Use a 'ticks' wave on the gstreamer audiotestsrc so the test
1957             stream is similar to what Apple port does.
1958
1959         Reviewed by Xabier Rodriguez-Calvar.
1960
1961         The mocks are already tested and the API is really simple.
1962
1963         * platform/mediastream/gstreamer/GStreamerAudioCapturer.cpp:
1964         (WebCore::GStreamerAudioCapturer::createSource):
1965         * platform/mediastream/gstreamer/GStreamerAudioCapturer.h:
1966         * platform/mediastream/gstreamer/GStreamerCapturer.cpp:
1967         (WebCore::GStreamerCapturer::addSink):
1968         * platform/mediastream/gstreamer/GStreamerCapturer.h:
1969
1970 2018-11-16  Thibault Saunier  <tsaunier@igalia.com>
1971
1972         [GStreamer][MediaStream] Handle track addition and removal
1973         https://bugs.webkit.org/show_bug.cgi?id=191599
1974
1975         Reviewed by Xabier Rodriguez-Calvar.
1976
1977         Test: fast/mediastream/MediaStream-video-element-remove-track.html
1978
1979         * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
1980         (WebCore::WebKitMediaStreamObserver::~WebKitMediaStreamObserver):
1981         (WebCore::WebKitMediaStreamObserver::WebKitMediaStreamObserver):
1982         (WebCore::webkitMediaStreamSrcFinalize):
1983         (WebCore::webkitMediaStreamSrcChangeState):
1984         (WebCore::webkit_media_stream_src_init):
1985         (WebCore::webkitMediaStreamSrcSetupSrc):
1986         (WebCore::webkitMediaStreamSrcAddTrack):
1987         (WebCore::webkitMediaStreamSrcRemoveTrackByType):
1988         (WebCore::webkitMediaStreamSrcSetStream):
1989
1990 2018-11-16  Zan Dobersek  <zdobersek@igalia.com>
1991
1992         ScalableImageDecoder: don't forcefully decode image data when querying frame completeness, duration
1993         https://bugs.webkit.org/show_bug.cgi?id=191354
1994
1995         Reviewed by Michael Catanzaro.
1996
1997         ScalableImageDecoder::frameIsCompleteAtIndex() should only check the
1998         index validity and, if the index is valid, check for completeness of the
1999         corresponding frame. ScalableImageDecoder::frameDurationAtIndex() should
2000         also only retrieve duration for already-complete frames.
2001
2002         Both methods avoid calling ScalableImageDecoder::frameBufferAtIndex()
2003         as that method goes on and decodes image data to determine specific
2004         information. The ImageSource class that's querying this information
2005         doesn't anticipate this, and doesn't handle the increased memory
2006         consumption of the decoded data, leaving MemoryCache in the blind about
2007         the image resource's actual amount of consumed memory. ImageSource can
2008         instead gracefully handle any incomplete frame by marking the decoding
2009         status for this frame as only partial.
2010
2011         * platform/image-decoders/ScalableImageDecoder.cpp:
2012         (WebCore::ScalableImageDecoder::frameIsCompleteAtIndex const):
2013         (WebCore::ScalableImageDecoder::frameHasAlphaAtIndex const):
2014         (WebCore::ScalableImageDecoder::frameDurationAtIndex const):
2015
2016 2018-11-16  Antoine Quint  <graouts@apple.com>
2017
2018         PointerEvents should not require touch event listeners to be registered
2019         https://bugs.webkit.org/show_bug.cgi?id=191333
2020         <rdar://problem/45857523>
2021
2022         Reviewed by Dean Jackson.
2023
2024         Tests: pointerevents/ios/pointer-events-dispatch-on-touch.html
2025                pointerevents/ios/pointer-events-prevent-default.html
2026
2027         * dom/EventNames.h:
2028         (WebCore::EventNames::isTouchEventType const):
2029         (WebCore::EventNames::touchAndPointerEventNames const):
2030         (WebCore::EventNames::touchEventNames const): Deleted.
2031         * dom/Node.cpp:
2032         (WebCore::Node::moveNodeToNewDocument):
2033
2034 2018-11-15  Zalan Bujtas  <zalan@apple.com>
2035
2036         [iOS] Do not get stuck in indeterminate content observation state.
2037         https://bugs.webkit.org/show_bug.cgi?id=191719
2038
2039         Reviewed by Simon Fraser.
2040
2041         Reset the _WKContentChange flag to WKContentNoChange when the last observing timer is removed and we are in
2042         the "can't decide yet if it's a hover or click" state.
2043         This bug prevents us from firing click event when JS installs and removes the same set of timer(s) during mouse-move dispatch.
2044
2045         Test: fast/events/touch/ios/stuck-with-hover-state.html
2046
2047         * platform/ios/wak/WKContentObservation.cpp:
2048         (WebThreadRemoveObservedContentModifier):
2049
2050 2018-11-15  Simon Fraser  <simon.fraser@apple.com>
2051
2052         REGRESSION (r238090) Composited iframes that resize from zero don't show
2053         https://bugs.webkit.org/show_bug.cgi?id=191733
2054         rdar://problem/46107764
2055
2056         Reviewed by Zalan Bujtas.
2057         
2058         A zero-sized iframe whose contents are composited should not trigger compositing in the
2059         parent document (see code in requiresCompositingForFrame()), but when the <iframe> element
2060         was resized without a style change (e.g. because it's width: 100%, height: 100% and the
2061         parent resizes), there was no code that triggered a compositing update.
2062
2063         Fix by having RenderLayer::updateLayerPosition() trigger an update when the size changes,
2064         for a RenderWidget whose contents are composited.
2065
2066         Test: compositing/iframes/resize-from-zero-size.html
2067
2068         * rendering/RenderLayer.cpp:
2069         (WebCore::RenderLayer::updateLayerPosition):
2070
2071 2018-11-15  Simon Fraser  <simon.fraser@apple.com>
2072
2073         Overlay with -webkit-overflow-scrolling:touch doesn't become scrollable after added text makes it taller
2074         https://bugs.webkit.org/show_bug.cgi?id=158342
2075         rdar://problem/26652811
2076
2077         Reviewed by Zalan Bujtas.
2078         
2079         Patch partly by Frédéric Wang.
2080
2081         This commit fixes an issue when resizing the content of a -webkit-overflow-scrolling: touch
2082         overflow node on iOS. Indeed, the RenderLayerBacking's scrolling layer may not be properly
2083         created and hence the UIProcess receives a null UIScrollView pointer. This triggers an
2084         assertion in debug mode and prevents the user from scrolling the overflow node in release
2085         mode. This was partially fixed by the refactoring of bug 90342 but this commit addresses
2086         the remaining issues by forcing a configuration update after layout in order to ensure that
2087         RenderLayerBacking's scrolling layer is available. For an overflow element that is not yet
2088         composited, trigger a post-layout update that is necessary to check if we need to make it
2089         composited when it gains scrollable overflow.
2090
2091         Tests: fast/scrolling/ios/change-scrollability-on-content-resize-nested.html
2092                fast/scrolling/ios/change-scrollability-on-content-resize.html
2093
2094         * rendering/RenderLayer.cpp:
2095         (WebCore::RenderLayer::updateScrollInfoAfterLayout): Force a configuration update so that
2096         RenderLayerCompositor::updateBackingAndHierarchy will later instantiate
2097         RenderLayerBacking::m_scrollingLayer.
2098
2099 2018-11-15  Fujii Hironori  <Hironori.Fujii@sony.com>
2100
2101         [curl] warning: delete called on non-final 'WebCore::CurlDownload' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
2102         https://bugs.webkit.org/show_bug.cgi?id=191582
2103
2104         Reviewed by Alex Christensen.
2105
2106         No new tests because there's no behaviour change.
2107
2108         * platform/network/curl/CurlDownload.h: Marked CurlDownload final.
2109
2110 2018-11-15  Truitt Savell  <tsavell@apple.com>
2111
2112         Unreviewed, rolling out r238244.
2113
2114         Caused High Sierra test runs to fail early with 50 crashes and
2115         casued 25 API failures.
2116
2117         Reverted changeset:
2118
2119         "[css-logical] Implement flow-relative margin, padding and
2120         border shorthands"
2121         https://bugs.webkit.org/show_bug.cgi?id=188697
2122         https://trac.webkit.org/changeset/238244
2123
2124 2018-11-15  Jer Noble  <jer.noble@apple.com>
2125
2126         AVKit will set videoGravity to a nil string when building against iosmac
2127         https://bugs.webkit.org/show_bug.cgi?id=191573
2128
2129         Reviewed by Dean Jackson.
2130
2131         Workaround AVKit behavior by treating nil videoGravity as the default,
2132         which is AVLayerVideoGravityResizeAspect.
2133
2134         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
2135         (-[WebAVPlayerLayer setVideoGravity:]):
2136
2137 2018-11-15  Brent Fulgham  <bfulgham@apple.com>
2138
2139         [Win] Reduce the use of WKSI library calls: Font Handling
2140         https://bugs.webkit.org/show_bug.cgi?id=191701
2141         <rdar://problem/46104809>
2142
2143         Reviewed by Myles C. Maxfield.
2144
2145         Move the old Windows font handling code out of WKSI to our regular
2146         repository. We now handle SPI differently, and don't need to keep
2147         these implementations in a separate library. This should also help
2148         avoid the somewhat frequent build failures caused when WKSI is not
2149         updated in sync with WebKit.
2150
2151         Tested by existing Windows test cases.
2152
2153         * platform/graphics/FontCascade.h:
2154         * platform/graphics/win/FontCGWin.cpp:
2155         (WebCore::FontCascade::drawGlyphs):
2156         (WebCore::FontCascade::setFontSmoothingLevel):
2157         (WebCore::setCGFontSmoothingStyle):
2158         (WebCore::FontCascade::setFontSmoothingStyle):
2159         (WebCore::FontCascade::setFontSmoothingContrast):
2160         (WebCore::clearTypeContrast):
2161         (WebCore::FontCascade::systemFontSmoothingChanged):
2162         (WebCore::FontCascade::setCGContextFontRenderingStyle):
2163         (WebCore::renderingStyleForFont):
2164         (WebCore::FontCascade::getGlyphAdvances):
2165         * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp:
2166         (WebCore::GlyphPage::fill):
2167         * platform/graphics/win/GraphicsContextCGWin.cpp:
2168         (WebCore::GraphicsContext::drawFocusRing):
2169         (WebCore::GraphicsContext::drawDotsForDocumentMarker):
2170         * platform/graphics/win/SimpleFontDataCGWin.cpp:
2171         (WebCore::Font::platformWidthForGlyph const):
2172         * rendering/RenderMediaControls.cpp:
2173         (WebCore::RenderMediaControls::adjustMediaSliderThumbSize):
2174
2175 2018-11-15  Jiewen Tan  <jiewen_tan@apple.com>
2176
2177         [WebAuthN] Use a real nonce for CTAPHID_INIT
2178         https://bugs.webkit.org/show_bug.cgi?id=191533
2179         <rdar://problem/46103502>
2180
2181         Reviewed by Brent Fulgham.
2182
2183         New tests are added into existing test files.
2184
2185         * Modules/webauthn/fido/FidoConstants.h:
2186
2187 2018-11-15  Justin Fan  <justin_fan@apple.com>
2188
2189         [WebGPU] WebGPUCommandBuffer prototype
2190         https://bugs.webkit.org/show_bug.cgi?id=191663
2191
2192         Reviewed by Dean Jackson.
2193
2194         Begin implementation of WebGPUCommandBuffers as well as GPUQueues (MTLCommandBuffer, MTLCommandQueue).
2195
2196         Test: webgpu/command-buffers.html
2197
2198         * CMakeLists.txt:
2199         * DerivedSources.make:
2200         * Modules/webgpu/GPUCommandBuffer.h: Added. Wrapper class around a MTLCommandBuffer.
2201         * Modules/webgpu/GPUDevice.cpp:
2202         (WebCore::GPUDevice::createCommandBuffer): Added.
2203         (WebCore::GPUDevice::getQueue): Returns RefPtr to the device's singleton queue.
2204         * Modules/webgpu/GPUDevice.h: Now manages the device's GPUQueue.
2205         (WebCore::GPUDevice::platformDevice const):
2206         * Modules/webgpu/GPUQueue.h: Added. Wrapper class around a MTLCommandQueue.
2207         (WebCore::GPUQueue::platformQueue const):
2208         * Modules/webgpu/GPURenderPipeline.h: Moved from Source/WebCore/Modules/webgpu/cocoa/GPURenderPipeline.h.
2209         (WebCore::GPURenderPipeline::platformRenderPipeline const):
2210         * Modules/webgpu/GPUShaderModule.h:
2211         (WebCore::GPUShaderModule::platformShaderModule const):
2212         * Modules/webgpu/GPUSwapChain.h: Moved from Source/WebCore/Modules/webgpu/cocoa/GPUSwapChain.h.
2213         (WebCore::GPUSwapChain::platformLayer const):
2214         * Modules/webgpu/WebGPUCommandBuffer.cpp: Added. Web interface for a GPU device's command buffer.
2215         (WebCore::WebGPUCommandBuffer::create):
2216         (WebCore::WebGPUCommandBuffer::WebGPUCommandBuffer):
2217         * Modules/webgpu/WebGPUCommandBuffer.h: Added.
2218         * Modules/webgpu/WebGPUCommandBuffer.idl: Added.
2219         * Modules/webgpu/WebGPUDevice.cpp:
2220         (WebCore::WebGPUDevice::createCommandBuffer const): Added.
2221         * Modules/webgpu/WebGPUDevice.h:
2222         * Modules/webgpu/WebGPUDevice.idl:
2223         * Modules/webgpu/cocoa/GPUCommandBufferMetal.mm: Added. MTLCommandBuffer impl for GPUCommandBuffer.
2224         (WebCore::GPUCommandBuffer::create): Create a MTLCommandBuffer from the MTLCommandQueue.
2225         (WebCore::GPUCommandBuffer::GPUCommandBuffer):
2226         * Modules/webgpu/cocoa/GPUDeviceMetal.mm:
2227         (WebCore::GPUDevice::GPUDevice):
2228         * Modules/webgpu/cocoa/GPUQueueMetal.mm: Added. MTLCommandQueue impl for GPUQueue.
2229         (WebCore::GPUQueue::create):
2230         (WebCore::GPUQueue::GPUQueue):
2231         * Modules/webgpu/cocoa/GPURenderPipelineMetal.mm:
2232         (WebCore::GPURenderPipeline::GPURenderPipeline):
2233         * Modules/webgpu/cocoa/GPUShaderModuleMetal.mm:
2234         (WebCore::GPUShaderModule::create):
2235         (WebCore::GPUShaderModule::GPUShaderModule):
2236         * Sources.txt:
2237         * SourcesCocoa.txt:
2238         * WebCore.xcodeproj/project.pbxproj:
2239         * bindings/js/WebCoreBuiltinNames.h:
2240
2241 2018-11-15  Oriol Brufau  <obrufau@igalia.com>
2242
2243         [css-logical] Implement flow-relative margin, padding and border shorthands
2244         https://bugs.webkit.org/show_bug.cgi?id=188697
2245
2246         Reviewed by Simon Fraser and Antti Koivisto.
2247
2248         Tests: imported/w3c/web-platform-tests/css/css-logical/logical-box-border-color.html
2249                imported/w3c/web-platform-tests/css/css-logical/logical-box-border-shorthands.html
2250                imported/w3c/web-platform-tests/css/css-logical/logical-box-border-style.html
2251                imported/w3c/web-platform-tests/css/css-logical/logical-box-border-width.html
2252                imported/w3c/web-platform-tests/css/css-logical/logical-box-margin.html
2253                imported/w3c/web-platform-tests/css/css-logical/logical-box-padding.html
2254                webexposed/css-properties-as-js-properties.html
2255                webexposed/css-properties-behind-flags.html
2256                webexposed/css-property-listing.html
2257
2258         * css/CSSComputedStyleDeclaration.cpp:
2259         (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
2260         Allow the new properties to serialize their computed value.
2261
2262         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesFor2SidesShorthand):
2263         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesFor4SidesShorthand):
2264         * css/CSSComputedStyleDeclaration.h:
2265         Rename getCSSPropertyValuesForSidesShorthand to getCSSPropertyValuesFor4SidesShorthand,
2266         and add analogous getCSSPropertyValuesFor2SidesShorthand for serializing 2-sided
2267         shorthands.
2268
2269         * css/CSSProperties.json:
2270         Add the new properties behind the CSSLogicalEnabled runtime flag.
2271
2272         * css/CSSStyleDeclaration.cpp:
2273         (WebCore::CSSStyleDeclaration::supportedPropertyNames const):
2274         Prevent CSS properties disabled behind a runtime flag from being exposed in
2275         style declarations.
2276
2277         * css/StyleProperties.cpp:
2278         (WebCore::StyleProperties::getPropertyValue const):
2279         Allow the new properties to serialize their specified value.
2280
2281         (WebCore::StyleProperties::get2Values const):
2282         Add get2Values, analogous to get4Values, for serializing 2-sided shorthands.
2283
2284         (WebCore::StyleProperties::borderPropertyValue const):
2285         Allow borderPropertyValue to serialize arbitrary multi-sided border shorthands
2286         corresponding to width, style and color.
2287
2288         (WebCore::MutableStyleProperties::setProperty):
2289         Prevent CSS properties disabled behind a runtime flag from being set a value.
2290
2291         (WebCore::StyleProperties::asText const):
2292         Allow the new properties to be serialized in cssText.
2293         Prevent CSS shorthands disabled behind a runtime flag from appearing in cssText,
2294         and serialize the longhands instead. Note that there could be another shorthand
2295         available which is enabled, but a proper solution would require bug 190496.
2296
2297         * css/StyleProperties.h:
2298         Update declarations of borderPropertyValue and get2Values.
2299
2300         * css/makeprop.pl:
2301         (addProperty):
2302         Add isEnabledCSSProperty function for checking that a CSS property is not
2303         disabled behind a runtime flag.
2304
2305         * css/parser/CSSPropertyParser.cpp:
2306         (WebCore::cssPropertyID):
2307         Prevent CSS properties disabled behind a runtime flag from being exposed in
2308         computed styles.
2309
2310         (WebCore::CSSPropertyParser::addProperty):
2311         Prevent CSS properties disabled behind a runtime flag from being set a value.
2312
2313         (WebCore::CSSPropertyParser::consumeBorder):
2314         Change consumeBorder to provide the caller with the parsed values instead of
2315         setting properties. Then the caller can decide to which properties the values
2316         should be set, and whether border-image should be reset or not.
2317
2318         (WebCore::CSSPropertyParser::consume2ValueShorthand):
2319         (WebCore::CSSPropertyParser::consume4ValueShorthand):
2320         Rename consume4Values to consume4ValueShorthand, and add analogous
2321         consume2ValueShorthand for parsing shorthands with two longhands.
2322
2323         (WebCore::CSSPropertyParser::parseShorthand):
2324         Allow the new properties to be parsed.
2325
2326         * css/parser/CSSPropertyParser.h:
2327         Update declarations of consumeBorder, consume2ValueShorthand and
2328         consume4ValueShorthand.
2329
2330         * inspector/agents/InspectorCSSAgent.cpp:
2331         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
2332         Prevent CSS properties disabled behind a runtime flag from being exposed in
2333         the CSS inspector tool.
2334
2335         * page/RuntimeEnabledFeatures.h:
2336         (WebCore::RuntimeEnabledFeatures::setCSSLogicalEnabled):
2337         (WebCore::RuntimeEnabledFeatures::cssLogicalEnabled const):
2338         Add the CSSLogicalEnabled runtime flag.
2339
2340 2018-11-15  Truitt Savell  <tsavell@apple.com>
2341
2342         Unreviewed, rolling out r238220.
2343
2344         Introduced failing tests to iOS and is slowing down EWS
2345
2346         Reverted changeset:
2347
2348         "[css-grid] Consider scrollbars in
2349         populateGridPositionsForDirection()"
2350         https://bugs.webkit.org/show_bug.cgi?id=191656
2351         https://trac.webkit.org/changeset/238220
2352
2353 2018-11-15  Jiewen Tan  <jiewen_tan@apple.com>
2354
2355         [WebAuthN] PublicKeyCredentialCreationOptions::AuthenticatorSelectionCriteria::AuthenticatorAttachment should be optional
2356         https://bugs.webkit.org/show_bug.cgi?id=191522
2357
2358         Reviewed by Brent Fulgham.
2359
2360         Accordign to the WebIDL, AuthenticatorSelectionCriteria::AuthenticatorAttachment should be optional.
2361         https://www.w3.org/TR/webauthn/#dictdef-authenticatorselectioncriteria
2362
2363         Covered by existing tests.
2364
2365         * Modules/webauthn/PublicKeyCredentialCreationOptions.h:
2366         (WebCore::PublicKeyCredentialCreationOptions::AuthenticatorSelectionCriteria::decode):
2367
2368 2018-11-15  Ross Kirsling  <ross.kirsling@sony.com>
2369
2370         DragImage should have a complete default implementation
2371         https://bugs.webkit.org/show_bug.cgi?id=191666
2372
2373         Reviewed by Dean Jackson.
2374
2375         Move WPE's stub implementation down into the base implementation file.
2376
2377         * SourcesWPE.txt:
2378         * platform/DragImage.cpp:
2379         (WebCore::dragImageSize):
2380         (WebCore::deleteDragImage):
2381         (WebCore::scaleDragImage):
2382         (WebCore::dissolveDragImageToFraction):
2383         (WebCore::createDragImageFromImage):
2384         (WebCore::createDragImageIconForCachedImageFilename):
2385         (WebCore::createDragImageForLink):
2386         * platform/wpe/DragImageWPE.cpp: Removed.
2387
2388 2018-11-15  Jiewen Tan  <jiewen_tan@apple.com>
2389
2390         [WebAuthN] UserHandle can be null
2391         https://bugs.webkit.org/show_bug.cgi?id=191521
2392
2393         Reviewed by Alex Christensen.
2394
2395         According to the newest spec as of 7 August, 2018: https://www.w3.org/TR/webauthn/#conforming-authenticators-u2f.
2396         UserHandle can now be null.
2397
2398         Covered by existing tests.
2399
2400         * Modules/webauthn/AuthenticatorAssertionResponse.h:
2401         (WebCore::AuthenticatorAssertionResponse::create):
2402         (WebCore::AuthenticatorAssertionResponse::userHandle const):
2403         (WebCore::AuthenticatorAssertionResponse::AuthenticatorAssertionResponse):
2404         * Modules/webauthn/AuthenticatorAssertionResponse.idl:
2405         * Modules/webauthn/PublicKeyCredential.cpp:
2406         (WebCore::PublicKeyCredential::tryCreate):
2407         * Modules/webauthn/PublicKeyCredentialData.h:
2408         (WebCore::PublicKeyCredentialData::encode const):
2409         (WebCore::PublicKeyCredentialData::decode):
2410         * Modules/webauthn/fido/DeviceResponseConverter.cpp:
2411         (fido::readCTAPGetAssertionResponse):
2412
2413 2018-11-15  Youenn Fablet  <youenn@apple.com>
2414
2415         Modernize RTCPeerConnection handling of pendingActivity
2416         https://bugs.webkit.org/show_bug.cgi?id=191661
2417
2418         Reviewed by Eric Carlson.
2419
2420         makePendingActivity is the modern way to handle set/unset of pending activity.
2421         No change of behavior.
2422
2423         * Modules/mediastream/RTCPeerConnection.cpp:
2424         (WebCore::RTCPeerConnection::create):
2425         (WebCore::RTCPeerConnection::doStop):
2426         * Modules/mediastream/RTCPeerConnection.h:
2427
2428 2018-11-15  Keith Rollin  <krollin@apple.com>
2429
2430         Delete old .xcfilelist files
2431         https://bugs.webkit.org/show_bug.cgi?id=191669
2432         <rdar://problem/46081994>
2433
2434         Reviewed by Chris Dumez.
2435
2436         .xcfilelist files were created and added to the Xcode project files in
2437         https://trac.webkit.org/changeset/238008/webkit. However, they caused
2438         build issues and they were removed from the Xcode projects in
2439         https://trac.webkit.org/changeset/238055/webkit. This check-in removes
2440         the files from the repository altogether. They'll ultimately be
2441         replaced with new files with names that indicate whether the
2442         associated files are inputs to the Run Script phase or are files
2443         created by the Run Script phase.
2444
2445         No new tests -- no changed functionality.
2446
2447         * DerivedSources.xcfilelist: Removed.
2448         * UnifiedSources.xcfilelist: Removed.
2449
2450 2018-11-15  Youenn Fablet  <youenn@apple.com>
2451
2452         Update RTCPeerConnection JS built-ins to be closer to specWe
2453         https://bugs.webkit.org/show_bug.cgi?id=191665
2454
2455         Reviewed by Eric Carlson.
2456
2457         Simplify JS built-ins since we no longer need to support callback versions of the API.
2458         Make sure to have the right number of parameters in the JS built-in functions.
2459         Make some simplification to the code.
2460         Covered by existing tests and rebased test.
2461
2462         * Modules/mediastream/RTCPeerConnection.js:
2463         (createOffer):
2464         (createAnswer):
2465         (setLocalDescription):
2466         (setRemoteDescription):
2467         (addIceCandidate):
2468         * Modules/mediastream/RTCPeerConnectionInternals.js:
2469         (enqueueOperation):
2470         (callbacksAndDictionaryOverload): Deleted.
2471
2472 2018-11-15  Simon Fraser  <simon.fraser@apple.com>
2473
2474         REGRESSION(r238090): Composited iframe contents disappear after switching tabs in Safari
2475         https://bugs.webkit.org/show_bug.cgi?id=191673
2476         rdar://problem/46083440
2477
2478         Reviewed by Antti Koivisto.
2479
2480         Switching tabs in Safari triggers the "setIsInWindow" code path, that detaches the layer
2481         tree for every Frame. They get re-attached on tab show, and for subframes this involves
2482         the triggering of a fake style recalc in the parent document via scheduleInvalidateStyleAndLayerComposition().
2483         
2484         The style diff that's sent to RenderLayerCompositor::layerStyleChanged() as a result of that
2485         fake style recalc is RecompositeLayer, but the code was failing to trigger the necessary
2486         layer configuration update that gets iframe layers parented.
2487         
2488         This stop-gap patch triggers layer config updates on every RecompositeLayer diff. A future
2489         patch will optimize this, and add a layout test.
2490
2491         * rendering/RenderLayerCompositor.cpp:
2492         (WebCore::RenderLayerCompositor::layerStyleChanged):
2493
2494 2018-11-15  Zalan Bujtas  <zalan@apple.com>
2495
2496         [LFC][IFC] Skip non-inflow boxes while splitting the inline runs.
2497         https://bugs.webkit.org/show_bug.cgi?id=191690
2498
2499         Reviewed by Antti Koivisto.
2500
2501         Skip all non-inflow boxes (floats, out-of-flow positioned elements). They don't participate in the inline run context.
2502
2503         * layout/Verification.cpp:
2504         (WebCore::Layout::LayoutState::verifyAndOutputMismatchingLayoutTree const):
2505         * layout/inlineformatting/InlineFormattingContext.cpp:
2506         (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
2507
2508 2018-11-15  Zalan Bujtas  <zalan@apple.com>
2509
2510         [LFC] FormattingContext base class should not declare computeStaticPosition.
2511         https://bugs.webkit.org/show_bug.cgi?id=191683
2512
2513         Reviewed by Antti Koivisto.
2514
2515         Apparently only BlockFormattingContext uses it.
2516
2517         * layout/FormattingContext.h:
2518         * layout/blockformatting/BlockFormattingContext.h:
2519         * layout/inlineformatting/InlineFormattingContext.cpp:
2520         (WebCore::Layout::InlineFormattingContext::computeStaticPosition const): Deleted.
2521         * layout/inlineformatting/InlineFormattingContext.h:
2522
2523 2018-11-14  Zalan Bujtas  <zalan@apple.com>
2524
2525         [LFC][IFC] Add support for in-flow positioned inline boxes.
2526         https://bugs.webkit.org/show_bug.cgi?id=191672
2527
2528         Reviewed by Antti Koivisto.
2529
2530         We might offset the in-flow positioned runs differently once runs are moved over to the display tree.
2531
2532         Test: fast/inline/simple-inline-inflow-positioned.html
2533
2534         * layout/Verification.cpp:
2535         (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
2536         * layout/inlineformatting/InlineFormattingContext.cpp:
2537         (WebCore::Layout::InlineFormattingContext::splitInlineRunsIfNeeded const):
2538         (WebCore::Layout::InlineFormattingContext::postProcessInlineRuns const):
2539         (WebCore::Layout::InlineFormattingContext::placeInFlowPositionedChildren const):
2540         (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
2541         * layout/inlineformatting/InlineFormattingContext.h:
2542         * layout/inlineformatting/InlineRun.h:
2543         (WebCore::Layout::InlineRun::moveVertically):
2544         * layout/layouttree/LayoutTreeBuilder.cpp:
2545         (WebCore::Layout::outputInlineRuns):
2546
2547 2018-11-15  Thibault Saunier  <tsaunier@igalia.com>
2548
2549         [GStreamer][WebRTC] Add support for sending silence or silencing an incoming track
2550         https://bugs.webkit.org/show_bug.cgi?id=191631
2551
2552         Reviewed by Xabier Rodriguez-Calvar.
2553
2554         This will be tested once webkit.org/b/186933 is implemented.
2555
2556         * platform/mediastream/gstreamer/RealtimeIncomingAudioSourceLibWebRTC.cpp:
2557         (WebCore::RealtimeIncomingAudioSourceLibWebRTC::OnData):
2558         * platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.cpp:
2559         (WebCore::RealtimeOutgoingAudioSourceLibWebRTC::pullAudioData):
2560
2561 2018-11-15  Antti Koivisto  <antti@apple.com>
2562
2563         REGRESSION(r238178): fast/forms/access-key-mutated.html and fast/forms/access-key-case-insensitive.html are timing out
2564         https://bugs.webkit.org/show_bug.cgi?id=191642
2565
2566         Reviewed by Zalan Bujtas.
2567
2568         Invalidate access key map even when thorttling style recalcs.
2569
2570         * dom/Document.cpp:
2571         (WebCore::Document::scheduleStyleRecalc):
2572
2573 2018-11-15  Antti Koivisto  <antti@apple.com>
2574
2575         Remove fonts from CSSFontFaceSet safely
2576         https://bugs.webkit.org/show_bug.cgi?id=191676
2577
2578         Reviewed by Zalan Bujtas.
2579
2580         Test: fast/text/font-face-set-remove-safely.html
2581
2582         * css/CSSFontFaceSet.cpp:
2583         (WebCore::CSSFontFaceSet::remove):
2584
2585 2018-11-15  Manuel Rego Casasnovas  <rego@igalia.com>
2586
2587         [css-grid] Consider scrollbars in populateGridPositionsForDirection()
2588         https://bugs.webkit.org/show_bug.cgi?id=191656
2589
2590         Reviewed by Javier Fernandez.
2591
2592         We never care about scrollbars in RenderGrid::populateGridPositionsForDirection(),
2593         that's fine if the scrollbars are at the end (e.g. on the right in horizontal writing mode and LTR direction)
2594         but it causes problems when they're at the beginning (e.g. on the left in horizontal writing mode and RTL direction).
2595
2596         The patch modifies the method so it takes into account scrollbar size
2597         in order to compute the position of the columns/rows depending on the direction and the writing mode.
2598
2599         Tests: imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-001.html
2600                imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-vertical-lr-001.html
2601                imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-vertical-rl-001.html
2602
2603         * rendering/RenderGrid.cpp:
2604         (WebCore::RenderGrid::populateGridPositionsForDirection):
2605
2606 2018-11-14  Keith Rollin  <krollin@apple.com>
2607
2608         Move scripts for Derived and Unified Sources to external files
2609         https://bugs.webkit.org/show_bug.cgi?id=191670
2610         <rdar://problem/46082278>
2611
2612         Reviewed by Keith Miller.
2613
2614         Move the scripts in the Generate Derived Sources and Generate Unified
2615         Sources Run Script phases from the Xcode projects to external shell
2616         script files. Then invoke those scripts from the Run Script phases.
2617         This refactoring is being performed to support later work that will
2618         invoke these scripts in other contexts.
2619
2620         The scripts were maintained as-is when making the move. I did a little
2621         reformatting and added 'set -e' to the top of each file, but that's
2622         it.
2623
2624         No new tests -- no changed functionality.
2625
2626         * Scripts/generate-derived-sources.sh: Added.
2627         * Scripts/generate-unified-sources.sh: Added.
2628         * WebCore.xcodeproj/project.pbxproj:
2629
2630 2018-11-14  Keith Rollin  <krollin@apple.com>
2631
2632         Fix #end vs. #endif typo.
2633         https://bugs.webkit.org/show_bug.cgi?id=191668
2634         <rdar://problem/46081704>
2635
2636         Reviewed by Alexey Proskuryakov.
2637
2638         Source/WebCore/SourcesCocoa.txt had a #end that should have been a
2639         #endif. Fix this, an add a check to generate-unified-source-bundles.rb
2640         to detect similar typos.
2641
2642         No new tests -- no changed functionality.
2643
2644         * SourcesCocoa.txt:
2645
2646 2018-11-14  Keith Rollin  <krollin@apple.com>
2647
2648         Remove VideoFullscreenLayerManager.mm from WebCore/SourcesCocoa.txt
2649         https://bugs.webkit.org/show_bug.cgi?id=191667
2650         <rdar://problem/46081286>
2651
2652         Reviewed by Eric Carlson.
2653
2654         VideoFullscreenLayerManager.mm no longer exists.
2655
2656         No new tests -- No changed functionality.
2657
2658         * SourcesCocoa.txt:
2659
2660 2018-11-14  Timothy Hatcher  <timothy@apple.com>
2661
2662         Enabled dark mode CSS support by default.
2663         https://bugs.webkit.org/show_bug.cgi?id=191609
2664         rdar://problem/46046861
2665
2666         Reviewed by Megan Gardner.
2667
2668         * page/RuntimeEnabledFeatures.h: Set m_isDarkModeCSSEnabled to true.
2669
2670 2018-11-14  Timothy Hatcher  <timothy@apple.com>
2671
2672         Default the view background color and text color to different values when in dark mode.
2673         https://bugs.webkit.org/show_bug.cgi?id=191607
2674         rdar://problem/46045854
2675
2676         Reviewed by Dean Jackson.
2677
2678         Test: css-dark-mode/default-colors.html
2679
2680         * css/html.css:
2681         (html): Set color: text on macOS.
2682         * dom/Document.cpp:
2683         (WebCore::Document::processSupportedColorSchemes): Call recalculateBaseBackgroundColor().
2684         * editing/EditingStyle.cpp:
2685         (WebCore::caretColorFromStyle): Added.
2686         (WebCore::EditingStyle::prepareToApplyAt): Use equalIgnoringSemanticColor. Check for
2687         caret-color directly since removeEquivalentProperties fails with semantic colors.
2688         (WebCore::extractPropertiesNotIn): Use equalIgnoringSemanticColor. Check for caret-color
2689         directly since removeEquivalentProperties fails with semantic colors.
2690         * page/Frame.cpp:
2691         (WebCore::Frame::createView): Drop backgroundColor.
2692         * page/Frame.h:
2693         * page/FrameView.cpp:
2694         (WebCore::FrameView::recalculateBaseBackgroundColor): Added.
2695         (WebCore::FrameView::updateBackgroundRecursively): Drop backgroundColor argument.
2696         Calculate the backgroundColor based on the transparent argument only.
2697         * page/FrameView.h:
2698         * platform/graphics/Color.h:
2699         (WebCore::equalIgnoringSemanticColor): Added for EditingStyle.
2700         * rendering/RenderBox.cpp:
2701         (WebCore::RenderBox::styleDidChange): Call recalculateBaseBackgroundColor().
2702         * rendering/RenderLayerBacking.cpp:
2703         (WebCore::RenderLayerBacking::shouldDumpPropertyForLayer const): Use isWhiteColor()
2704         since it ignores the semantic color flag.
2705         * testing/Internals.cpp:
2706         (WebCore::Internals::setViewIsTransparent): Drop backgroundColor.
2707         (WebCore::Internals::viewBaseBackgroundColor): Added.
2708         * testing/Internals.h:
2709         * testing/Internals.idl: Added viewBaseBackgroundColor.
2710
2711 2018-11-14  Justin Fan  <justin_fan@apple.com>
2712
2713         [WebGPU] Code quality concerns raised for 191291: [WebGPU] Experimental prototype for WebGPURenderPipeline and WebGPUSwapChain
2714         https://bugs.webkit.org/show_bug.cgi?id=191383
2715
2716         Reviewed by Dean Jackson.
2717
2718         Covered by existing WebGPU tests introduced in original patch.
2719
2720         * Modules/webgpu/GPUDevice.h:
2721         * Modules/webgpu/GPUPipelineStageDescriptor.h:
2722         * Modules/webgpu/GPURenderPipelineDescriptor.h: Now a base struct with a guaranteed vertex stage member.
2723         (): Refactored into enum class.
2724         (WebCore::GPURenderPipelineDescriptor::GPURenderPipelineDescriptor): Removed in favor of init-list construction.
2725         (WebCore::GPURenderPipelineDescriptor::primitiveTopology): Now a proper enum class member.
2726         * Modules/webgpu/GPUShaderModule.h:
2727         * Modules/webgpu/WebGPUDevice.cpp:
2728         (WebCore::WebGPUDevice::createRenderPipeline const):
2729         * Modules/webgpu/WebGPUShaderModule.h:
2730         (WebCore::WebGPUShaderModule::module const):
2731         * Modules/webgpu/WebGPUShaderStage.h: Replaced enum with constants to better reflect IDL.
2732         * Modules/webgpu/cocoa/GPURenderPipeline.h:
2733         * Modules/webgpu/cocoa/GPURenderPipelineMetal.mm:
2734         (WebCore::setFunctionsForPipelineDescriptor):
2735         (WebCore::GPURenderPipeline::create):
2736         * Modules/webgpu/cocoa/GPUSwapChain.h:
2737         * WebCore.xcodeproj/project.pbxproj: Removed GPUPipelineDescriptorBase.
2738
2739 2018-11-14  Joseph Pecoraro  <pecoraro@apple.com>
2740
2741         Web Inspector: Pass Inspector::FrontendChannel as a reference connect/disconnect methods
2742         https://bugs.webkit.org/show_bug.cgi?id=191612
2743
2744         Reviewed by Matt Baker.
2745
2746         * inspector/InspectorController.cpp:
2747         (WebCore::InspectorController::connectFrontend):
2748         (WebCore::InspectorController::disconnectFrontend):
2749         (WebCore::InspectorController::show):
2750         * inspector/InspectorController.h:
2751         * inspector/WorkerInspectorController.cpp:
2752         (WebCore::WorkerInspectorController::connectFrontend):
2753         (WebCore::WorkerInspectorController::disconnectFrontend):
2754         * page/PageDebuggable.cpp:
2755         (WebCore::PageDebuggable::connect):
2756         (WebCore::PageDebuggable::disconnect):
2757         * page/PageDebuggable.h:
2758         * testing/Internals.cpp:
2759         (WebCore::InspectorStubFrontend::InspectorStubFrontend):
2760         (WebCore::InspectorStubFrontend::closeWindow):
2761         * workers/service/context/ServiceWorkerDebuggable.cpp:
2762         (WebCore::ServiceWorkerDebuggable::connect):
2763         (WebCore::ServiceWorkerDebuggable::disconnect):
2764         * workers/service/context/ServiceWorkerDebuggable.h:
2765         * workers/service/context/ServiceWorkerInspectorProxy.cpp:
2766         (WebCore::ServiceWorkerInspectorProxy::connectToWorker):
2767         (WebCore::ServiceWorkerInspectorProxy::disconnectFromWorker):
2768         * workers/service/context/ServiceWorkerInspectorProxy.h:
2769
2770 2018-11-14  Timothy Hatcher  <timothy@apple.com>
2771
2772         Update prefers-color-scheme media query matching based on GitHub issue #3278.
2773         https://bugs.webkit.org/show_bug.cgi?id=191654
2774         rdar://problem/46074307
2775
2776         Reviewed by Simon Fraser.
2777
2778         Test: css-dark-mode/prefers-color-scheme.html
2779
2780         * css/MediaQueryEvaluator.cpp:
2781         (WebCore::prefersColorSchemeEvaluate): Return true when there is no value. Return false
2782         for `no-preference` since there is no macOS option for no user preference.
2783         * css/MediaQueryExpression.cpp:
2784         (WebCore::isFeatureValidWithoutValue): Added prefers-color-scheme.
2785
2786 2018-11-14  Devin Rousso  <drousso@apple.com>
2787
2788         Web Inspector: Canvas: send a call stack with each action instead of an array of call frames
2789         https://bugs.webkit.org/show_bug.cgi?id=191628
2790
2791         Reviewed by Dean Jackson.
2792
2793         Updated existing test: inspector/model/recording.html
2794
2795         * inspector/InspectorCanvas.h:
2796         * inspector/InspectorCanvas.cpp:
2797         (WebCore::InspectorCanvas::indexForData):
2798         (WebCore::InspectorCanvas::buildInitialState):
2799         (WebCore::InspectorCanvas::buildAction):
2800         Drive-by: prevent de-duplicated objects from being destroyed while recording.
2801
2802 2018-11-14  Stephan Szabo  <stephan.szabo@sony.com>
2803
2804         [Win] Compile Service Worker support
2805         https://bugs.webkit.org/show_bug.cgi?id=191409
2806
2807         Reviewed by Youenn Fablet.
2808
2809         Fix compilation errors when ENABLE(SERVICE_WORKER)
2810         on Windows with clang-cl. Clang on dllexport
2811         platforms does not support specifying the
2812         dllexport on both a class and members of the class
2813         and unistd.h isn't provided but also appeared to
2814         not be used.
2815
2816         No new tests, should be covered by existing tests.
2817
2818         * workers/service/ServiceWorkerProvider.h:
2819         * workers/service/context/SWContextManager.cpp:
2820
2821 2018-11-14  Joseph Pecoraro  <pecoraro@apple.com>
2822
2823         Web Inspector: Keep Web Inspector window alive across process swaps (PSON) (Remote Inspector)
2824         https://bugs.webkit.org/show_bug.cgi?id=191494
2825         <rdar://problem/45469854>
2826
2827         Reviewed by Devin Rousso.
2828
2829         * inspector/InspectorClient.h:
2830         (WebCore::InspectorClient::allowRemoteInspectionToPageDirectly const):
2831         Provide a hook so that a client may wish to allow direct remote inspection of the Page.
2832         This is used by WebKitLegacy only.
2833
2834         * page/Page.cpp:
2835         (Page::Page):
2836         Only enable the PageDebuggable if the client wishes remote inspection of the Page directly.
2837         This is used by WebKitLegacy only.
2838
2839         * inspector/InspectorController.cpp:
2840         (WebCore::InspectorController::connectFrontend):
2841         * inspector/InspectorController.h:
2842         * page/PageDebuggable.cpp:
2843         (WebCore::PageDebuggable::connect):
2844         (WebCore::PageDebuggable::disconnect):
2845         * page/PageDebuggable.h:
2846         When a frontend connects, always enable the developer extras for the Page.
2847         This is pretty much only for the remote path, which allows inspection if developer
2848         extras were not already enabled (iOS). This simplifies the logic, and toggling
2849         developer extras after it was already enabled is not really important.
2850
2851 2018-11-14  Per Arne Vollan  <pvollan@apple.com>
2852
2853         REGRESSION (WEBPROCESS_WINDOWSERVER_BLOCKING): requestAnimationFrame Stops Completing
2854         https://bugs.webkit.org/show_bug.cgi?id=190884
2855
2856         Reviewed by Dean Jackson.
2857
2858         Only notify display refresh monitors with matching display ID.
2859
2860         Test: fast/animation/request-animation-frame-in-two-pages.html
2861
2862         * platform/graphics/DisplayRefreshMonitorManager.cpp:
2863         (WebCore::DisplayRefreshMonitorManager::displayWasUpdated):
2864         * platform/graphics/DisplayRefreshMonitorManager.h:
2865
2866 2018-11-14  Youenn Fablet  <youenn@apple.com>
2867
2868         Convert libwebrtc error types to DOM exceptions
2869         https://bugs.webkit.org/show_bug.cgi?id=191590
2870
2871         Reviewed by Alex Christensen.
2872
2873         Make use of overloaded callback method that provides an error type.
2874         This type is then used to create a DOM exception with the correct type.
2875         Covered by existing tests.
2876
2877         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
2878         (WebCore::LibWebRTCMediaEndpoint::doSetRemoteDescription):
2879         (WebCore::LibWebRTCMediaEndpoint::createSessionDescriptionFailed):
2880         (WebCore::LibWebRTCMediaEndpoint::setLocalSessionDescriptionFailed):
2881         (WebCore::LibWebRTCMediaEndpoint::setRemoteSessionDescriptionFailed):
2882         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
2883         * Modules/mediastream/libwebrtc/LibWebRTCObservers.h:
2884         (WebCore::toExceptionCode):
2885
2886 2018-11-14  Youenn Fablet  <youenn@apple.com>
2887
2888         Allow to remove MediaStreamPrivate observers when iterating over observers
2889         https://bugs.webkit.org/show_bug.cgi?id=187256
2890
2891         Reviewed by Eric Carlson.
2892
2893         Migrate the observer list from a Vector to a HashSet.
2894         This is more robust to multiple observing and keeping of order of observers is not required.
2895         Copy the set of observers to a vector before iterating over it.
2896         This allows to remove an observer while iterating, which is now used in UserMediaRequest.
2897
2898         Covered by existing tests.
2899
2900         * Modules/mediastream/UserMediaRequest.cpp:
2901         (WebCore::UserMediaRequest::mediaStreamIsReady):
2902         * platform/mediastream/MediaStreamPrivate.cpp:
2903         (WebCore::MediaStreamPrivate::addObserver):
2904         (WebCore::MediaStreamPrivate::removeObserver):
2905         (WebCore::MediaStreamPrivate::forEachObserver const):
2906         (WebCore::MediaStreamPrivate::updateActiveState):
2907         (WebCore::MediaStreamPrivate::addTrack):
2908         (WebCore::MediaStreamPrivate::removeTrack):
2909         (WebCore::MediaStreamPrivate::characteristicsChanged):
2910         * platform/mediastream/MediaStreamPrivate.h:
2911
2912 2018-11-14  Youenn Fablet  <youenn@apple.com>
2913
2914         Calling removeTrack on different RTCPeerConnection should throw InvalidAccessError
2915         https://bugs.webkit.org/show_bug.cgi?id=191603
2916
2917         Reviewed by Chris Dumez.
2918
2919         Make sure to check that the sender peer connection backend is matching.
2920         Covered by rebased WPT test.
2921
2922         * Modules/mediastream/RTCPeerConnection.cpp:
2923         (WebCore::RTCPeerConnection::removeTrack):
2924         * Modules/mediastream/RTCRtpSender.cpp:
2925         (WebCore::RTCRtpSender::isCreatedBy const):
2926         * Modules/mediastream/RTCRtpSender.h:
2927
2928 2018-11-14  Fujii Hironori  <Hironori.Fujii@sony.com>
2929
2930         [curl] Unify CookieJarCurlDatabase and the abstract class CookieJarCurl
2931         https://bugs.webkit.org/show_bug.cgi?id=191620
2932
2933         Reviewed by Alex Christensen.
2934
2935         Remove a abstract class CookieJarCurl which is not needed anymore.
2936         And, rename CookieJarCurlDatabase to CookieJarCurl.
2937
2938         No new tests because there's no behaviour change in WebCore.
2939
2940         * platform/Curl.cmake: Replaced CookieJarCurlDatabase.cpp with CookieJarCurl.cpp.
2941         * platform/network/curl/CookieJarCurl.cpp: Renamed from Source/WebCore/platform/network/curl/CookieJarCurlDatabase.cpp.
2942         * platform/network/curl/CookieJarCurl.h: Merged CookieJarCurl.h and CookieJarCurlDatabase.h.
2943         * platform/network/curl/CookieJarCurlDatabase.h: Removed.
2944         * platform/network/curl/NetworkStorageSessionCurl.cpp:
2945         (WebCore::NetworkStorageSession::NetworkStorageSession): Replaced CookieJarCurlDatabase with CookieJarCurl.
2946
2947 2018-11-14  Christopher Reid  <chris.reid@sony.com>
2948
2949         [WPE] Remove glib usage in PlatformKeyboardEventWPE.cpp
2950         https://bugs.webkit.org/show_bug.cgi?id=191606
2951
2952         Reviewed by Michael Catanzaro.
2953
2954         No behavior change.
2955
2956         Use StringBuilder::append(UChar32) as a generic way to convert a uint32_t code point to WTFString.
2957
2958         * platform/wpe/PlatformKeyboardEventWPE.cpp:
2959         (WebCore::PlatformKeyboardEvent::keyValueForWPEKeyCode):
2960         (WebCore::PlatformKeyboardEvent::singleCharacterString):
2961
2962 2018-11-13  Zalan Bujtas  <zalan@apple.com>
2963
2964         [LFC][IFC] Construct dedicated runs when the inline element requires it (part 2)
2965         https://bugs.webkit.org/show_bug.cgi?id=191623
2966
2967         Reviewed by Antti Koivisto.
2968
2969         This patch expands the breaking behaviour to support separate start/end breaks.
2970
2971         <span>parent </span><span style="padding: 10px;">start<span> middle </span>end</span><span> parent</span>
2972
2973         input to line breaking -> <parent start middle end parent>
2974         output of line breaking (considering infinite constraint) -> <parent start middle end parent>
2975         due to padding, final runs -> <parent><start middle end><parent>
2976
2977         "parent" -> n/a
2978         "start" -> BreakAtStart
2979         " middle " -> n/a
2980         "end" -> BreakAtEnd
2981         "parent" -> n/a
2982
2983         Another example:
2984         <span>parent </span><span style="padding-right: 10px;">start<span> middle </span>end</span><span> parent</span>
2985
2986         line breaking -> <parent start middle end parent>
2987         due to padding-right, final runs -> <parent start middle end><parent>
2988
2989         "parent" -> n/a
2990         "start" -> n/a
2991         " middle " -> n/a
2992         "end" -> BreakAtEnd
2993         "parent" -> n/a
2994
2995         * layout/inlineformatting/InlineFormattingContext.cpp:
2996         (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
2997         (WebCore::Layout::InlineFormattingContext::collectInlineContent const): Move to a recursive algorithm (which is fine, inline contents don't tend to be too deep)
2998         (WebCore::Layout::InlineFormattingContext::contentRequiresSeparateRun const): Deleted.
2999         * layout/inlineformatting/InlineFormattingContext.h:
3000         * layout/inlineformatting/InlineFormattingState.cpp:
3001         (WebCore::Layout::InlineFormattingState::detachingRules const):
3002         * layout/inlineformatting/InlineFormattingState.h:
3003         (WebCore::Layout::InlineFormattingState::lastInlineItem const):
3004         (WebCore::Layout::InlineFormattingState::addDetachingRule):
3005
3006 2018-11-14  Youenn Fablet  <youenn@apple.com>
3007
3008         Add support for RTCRtpCodecParameters.sdpFmtpLine
3009         https://bugs.webkit.org/show_bug.cgi?id=191591
3010
3011         Reviewed by Eric Carlson.
3012
3013         Covered by rebased test.
3014
3015         * Modules/mediastream/RTCRtpCodecParameters.h:
3016         * Modules/mediastream/RTCRtpCodecParameters.idl:
3017         * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
3018         (WebCore::toRTCCodecParameters):
3019
3020 2018-11-14  Youenn Fablet  <youenn@apple.com>
3021
3022         Add support for transport and peerConnection stats
3023         https://bugs.webkit.org/show_bug.cgi?id=191592
3024
3025         Reviewed by Alex Christensen.
3026
3027         Covered by rebased tests.
3028
3029         * Modules/mediastream/RTCStatsReport.h:
3030         (WebCore::RTCStatsReport::TransportStats::TransportStats):
3031         (WebCore::RTCStatsReport::PeerConnectionStats::PeerConnectionStats):
3032         * Modules/mediastream/RTCStatsReport.idl:
3033         * Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:
3034         (WebCore::fillRTCTransportStats):
3035         (WebCore::fillRTCPeerConnectionStats):
3036         (WebCore::LibWebRTCStatsCollector::OnStatsDelivered):
3037
3038 2018-11-14  Ali Juma  <ajuma@chromium.org>
3039
3040         Transform of composited layer not updated when layer also needs repaint
3041         https://bugs.webkit.org/show_bug.cgi?id=191598
3042
3043         Reviewed by Simon Fraser.
3044
3045         Trigger a compositing geometry update whenever a RenderLayer's transform changes,
3046         even when other parts of its style have changed in a way that produces a
3047         StyleDifference greater than RecompositeLayer.
3048
3049         Test: compositing/geometry/transform-and-repaint-updates-geometry.html
3050
3051         * rendering/RenderLayerCompositor.cpp:
3052         (WebCore::RenderLayerCompositor::layerStyleChanged):
3053
3054 2018-11-13  Jiewen Tan  <jiewen_tan@apple.com>
3055
3056         [WebAuthN] Support CTAP HID authenticators on macOS
3057         https://bugs.webkit.org/show_bug.cgi?id=188623
3058         <rdar://problem/43353777>
3059
3060         Reviewed by Brent Fulgham and Chris Dumez.
3061
3062         This patch removes AuthenticatorCoordinatorClient::~AuthenticatorCoordinatorClient to ignore
3063         any incompleted CompletionHandlers as calling them in destructors could cause unexpected cyclic
3064         dependency. Also, it adds a hack to temporarily deal with nullable userhandle.
3065
3066         Tests: http/wpt/webauthn/ctap-hid-failure.https.html
3067                http/wpt/webauthn/ctap-hid-success.https.html
3068                http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https.html
3069                http/wpt/webauthn/public-key-credential-create-failure-hid.https.html
3070                http/wpt/webauthn/public-key-credential-create-success-hid.https.html
3071                http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https.html
3072                http/wpt/webauthn/public-key-credential-get-failure-hid.https.html
3073                http/wpt/webauthn/public-key-credential-get-success-hid.https.html
3074
3075         * Modules/webauthn/AuthenticatorCoordinatorClient.cpp:
3076         (WebCore::AuthenticatorCoordinatorClient::~AuthenticatorCoordinatorClient): Deleted.
3077         * Modules/webauthn/AuthenticatorCoordinatorClient.h:
3078         * Modules/webauthn/PublicKeyCredentialCreationOptions.h:
3079         * Modules/webauthn/fido/DeviceResponseConverter.cpp:
3080         (fido::readCTAPGetAssertionResponse):
3081         * Modules/webauthn/fido/FidoConstants.h:
3082
3083 2018-11-13  Ross Kirsling  <ross.kirsling@sony.com>
3084
3085         [WebRTC] Provide default implementation of LibWebRTCProvider
3086         https://bugs.webkit.org/show_bug.cgi?id=191611
3087
3088         Reviewed by Michael Catanzaro.
3089
3090         Refactor LibWebRTCProvider such that platform-specific implementations need not worry about specifying defaults.
3091
3092         * PlatformWin.cmake:
3093         * platform/GStreamer.cmake:
3094         * platform/SourcesGLib.txt:
3095         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
3096         * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
3097         * platform/mediastream/libwebrtc/LibWebRTCProviderGStreamer.cpp: Renamed from Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderGlib.cpp.
3098         * platform/mediastream/libwebrtc/LibWebRTCProviderGStreamer.h: Renamed from Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderGlib.h.
3099         * platform/mediastream/libwebrtc/LibWebRTCProviderWin.cpp: Removed.
3100
3101 2018-11-13  Timothy Hatcher  <timothy@apple.com>
3102
3103         Use a light scrollbar for transparent web views in dark mode.
3104         https://bugs.webkit.org/show_bug.cgi?id=191559
3105         rdar://problem/46000489
3106
3107         Reviewed by Dean Jackson.
3108
3109         Test: css-dark-mode/supported-color-schemes-scrollbar.html
3110
3111         * css/CSSProperties.json: Marked supported-color-schemes as a custom Value.
3112         * css/StyleBuilderCustom.h:
3113         (WebCore::StyleBuilderCustom::applyValueSupportedColorSchemes):
3114         * editing/cocoa/WebContentReaderCocoa.mm: Use FrameView's useDarkAppearance().
3115         (WebCore::createFragment):
3116         * inspector/InspectorOverlay.cpp:
3117         (WebCore::InspectorOverlay::paint): Use FrameView's useDarkAppearance().
3118         * page/FrameView.cpp:
3119         (WebCore::FrameView::recalculateScrollbarOverlayStyle): Use a light scrollbar for
3120         transparent web views in dark mode.
3121         (WebCore::FrameView::rendererForSupportedColorSchemes const): Added.
3122         Return the body for document element renderer.
3123         (WebCore::FrameView::useDarkAppearance const): Use rendererForSupportedColorSchemes.
3124         (WebCore::FrameView::styleColorOptions const): Added. Ditto.
3125         * page/FrameView.h:
3126         * rendering/style/RenderStyle.cpp:
3127         (WebCore::rareInheritedDataChangeRequiresRepaint): Drive-by fix. Added supportedColorSchemes.
3128         * rendering/style/RenderStyle.h:
3129         (WebCore::RenderStyle::setHasExplicitlySetSupportedColorSchemes): Added.
3130         (WebCore::RenderStyle::hasExplicitlySetSupportedColorSchemes const): Added.
3131         (WebCore::RenderStyle::NonInheritedFlags::operator== const): Added supportedColorSchemes.
3132         * svg/graphics/SVGImage.cpp:
3133         (WebCore::SVGImage::draw): Use FrameView's useDarkAppearance().
3134         * testing/Internals.cpp:
3135         (WebCore::Internals::setViewIsTransparent): Added.
3136         (WebCore::Internals::scrollbarOverlayStyle const): Added.
3137         * testing/Internals.h:
3138         * testing/Internals.idl: Added setViewIsTransparent and scrollbarOverlayStyle.
3139
3140 2018-11-13  Ross Kirsling  <ross.kirsling@sony.com>
3141
3142         [AppleWin] Unreviewed build fix after r238108.
3143
3144         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3145         (printLayer):
3146         (PlatformCALayerWin::embeddedViewID const):
3147         * platform/graphics/ca/win/PlatformCALayerWin.h:
3148
3149 2018-11-13  Youenn Fablet  <youenn@apple.com>
3150
3151         RTCPeerConnection.getTransceivers is not always exposing all transceivers
3152         https://bugs.webkit.org/show_bug.cgi?id=191589
3153
3154         Reviewed by Eric Carlson.
3155
3156         Implement the collect transceiver algorithm using libwebrtc backend.
3157         Call this algorithm everytime transceivers are retrieved from JS.
3158         For Plan B, make this a no-op as this is not supported.
3159         Introduce senders/receivers/transceivers getters where we just look at already created transceivers.
3160
3161         Covered by existing and rebased tests.
3162
3163         * Modules/mediastream/PeerConnectionBackend.h:
3164         (WebCore::PeerConnectionBackend::collectTransceivers):
3165         * Modules/mediastream/RTCPeerConnection.cpp:
3166         (WebCore::RTCPeerConnection::getSenders const):
3167         (WebCore::RTCPeerConnection::getReceivers const):
3168         (WebCore::RTCPeerConnection::getTransceivers const):
3169         * Modules/mediastream/RTCPeerConnection.h:
3170         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
3171         (WebCore::LibWebRTCMediaEndpoint::collectTransceivers):
3172         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
3173         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
3174         (WebCore::LibWebRTCPeerConnectionBackend::addTrack):
3175         (WebCore::LibWebRTCPeerConnectionBackend::existingTransceiver):
3176         (WebCore::LibWebRTCPeerConnectionBackend::collectTransceivers):
3177         (WebCore::LibWebRTCPeerConnectionBackend::applyRotationForOutgoingVideoSources):
3178         (WebCore::LibWebRTCPeerConnectionBackend::shouldOfferAllowToReceive const):
3179         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
3180
3181 2018-11-13  Wenson Hsieh  <wenson_hsieh@apple.com>
3182
3183         [iOS] Do not show selection UI for editable elements with opacity near zero
3184         https://bugs.webkit.org/show_bug.cgi?id=191442
3185         <rdar://problem/45958625>
3186
3187         Reviewed by Simon Fraser.
3188
3189         Tests: editing/selection/ios/do-not-zoom-to-focused-hidden-contenteditable.html
3190                editing/selection/ios/hide-selection-after-hiding-contenteditable.html
3191                editing/selection/ios/hide-selection-in-contenteditable-nested-transparency.html
3192                editing/selection/ios/hide-selection-in-hidden-contenteditable-frame.html
3193                editing/selection/ios/hide-selection-in-hidden-contenteditable.html
3194
3195         * rendering/RenderObject.cpp:
3196         (WebCore::RenderObject::isTransparentRespectingParentFrames const):
3197
3198         Add a helper function to determine whether a RenderObject is contained within a transparent layer, taking parent
3199         frames into account. A layer is considered transparent if its opacity is less than a small threshold (i.e. 0.01).
3200         Opacity on ancestor elements is applied multiplicatively.
3201
3202         * rendering/RenderObject.h:
3203
3204 2018-11-13  Eric Carlson  <eric.carlson@apple.com>
3205
3206         [MediaStream] Observer AVCaptureDevice "suspended" property
3207         https://bugs.webkit.org/show_bug.cgi?id=191587
3208         <rdar://problem/46030598>
3209
3210         Reviewed by Youenn Fablet.
3211
3212         No new tests, AVCapture can only be tested manually.
3213
3214         * platform/mediastream/mac/AVCaptureDeviceManager.h:
3215         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
3216         (WebCore::AVCaptureDeviceManager::captureDevicesInternal): Don't notify of devices "changes"
3217         the first time the device list is scanned.
3218         (WebCore::deviceIsAvailable): Don't check for "isInUseByAnotherApplication", it doesn't
3219         change device availability.
3220         (WebCore::AVCaptureDeviceManager::beginObservingDevices): New, observe "suspended" on all 
3221         devices and add them to the cached list.
3222         (WebCore::AVCaptureDeviceManager::stopObservingDevices): New, opposite of above.
3223         (WebCore::AVCaptureDeviceManager::refreshCaptureDevices): Watch for changes in the list of
3224         devices.
3225         (WebCore::AVCaptureDeviceManager::~AVCaptureDeviceManager): Stop observing all cached devices.
3226         (WebCore::AVCaptureDeviceManager::registerForDeviceNotifications):
3227         (-[WebCoreAVCaptureDeviceManagerObserver disconnect]):
3228         (-[WebCoreAVCaptureDeviceManagerObserver deviceConnectedDidChange:]):
3229         (-[WebCoreAVCaptureDeviceManagerObserver observeValueForKeyPath:ofObject:change:context:]):
3230         (WebCore::AVCaptureDeviceManager::refreshAVCaptureDevicesOfType): Deleted.
3231         (WebCore::AVCaptureDeviceManager::deviceConnected): Deleted.
3232         (WebCore::AVCaptureDeviceManager::deviceDisconnected): Deleted.
3233         (-[WebCoreAVCaptureDeviceManagerObserver deviceDisconnected:]): Deleted.
3234         (-[WebCoreAVCaptureDeviceManagerObserver deviceConnected:]): Deleted.
3235
3236         * platform/mediastream/mac/AVVideoCaptureSource.h:
3237         * platform/mediastream/mac/AVVideoCaptureSource.mm:
3238         (WebCore::AVVideoCaptureSource::~AVVideoCaptureSource): Stop observing "running" (not "rate")
3239         and "suspended".
3240         (WebCore::AVVideoCaptureSource::setupSession): Observe "running" (not "rate"), and "suspended".
3241         (WebCore::AVVideoCaptureSource::captureDeviceSuspendedDidChange):
3242         (-[WebCoreAVVideoCaptureSourceObserver observeValueForKeyPath:ofObject:change:context:]):
3243
3244 2018-11-13  Devin Rousso  <drousso@apple.com>
3245
3246         Web Inspector: REGRESSION(r238122): fetching the CertificateInfo triggers an ASSERT in workers
3247         https://bugs.webkit.org/show_bug.cgi?id=191597
3248
3249         Reviewed by Joseph Pecoraro.
3250
3251         When WebInspector is open, the `CertificateInfo` for every `ResourceResponse` is now fetched,
3252         meaning that we may try to fetch in situations previously unexpected.
3253
3254         * platform/network/cocoa/ResourceResponseCocoa.mm:
3255         (WebCore::ResourceResponse::platformCertificateInfo const):
3256
3257 2018-11-13  Timothy Hatcher  <timothy@apple.com>
3258
3259         Treat supported-color-schemes as the second highest priority property.
3260         https://bugs.webkit.org/show_bug.cgi?id=191556
3261         rdar://problem/46000076
3262
3263         Reviewed by Dean Jackson.
3264
3265         Test: css-dark-mode/supported-color-schemes-priority.html
3266
3267         * css/CSSProperties.json: Make supported-color-schemes high-priority and add a comment.
3268         * css/StyleResolver.cpp:
3269         (WebCore::StyleResolver::applyMatchedProperties): Manually handle supported-color-schemes
3270         after -webkit-ruby-position, before other properties, so it can affect resolved colors.
3271
3272 2018-11-13  Charlie Turner  <cturner@igalia.com>
3273
3274         [EME][GStreamer] Make CDMInstance's available in decryptors, and factor out some EME utility classes.
3275         https://bugs.webkit.org/show_bug.cgi?id=191316
3276
3277         Reviewed by Xabier Rodriguez-Calvar.
3278
3279         Another preparation in patch getting ready to move the decryption
3280         logic behind the CDMInstance and out of the GStreamer decryptors
3281         themselves. The first step taken here is to arrange for the
3282         instances to always be available in the decryptors when they need
3283         to decrypt content.
3284
3285         In doing so, there were a number of hairy bits of code that could
3286         use some abstraction, so the opportunity was taken to do that as
3287         well.
3288
3289         Covered by tests in media/encrypted-media and
3290         imported/w3c/web-platform-tests/encrypted-media.
3291
3292         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3293         (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Remove
3294         drm-key-needed since it was not being used anywhere.
3295         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3296         (WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage):
3297         Factor out the parsing of decryption system information from
3298         GStreamer, since it was not clear what that code was doing unless
3299         you squinted pretty hard. Also remove the duplicated
3300         initialization-data-encountered posting.
3301         (WebCore::MediaPlayerPrivateGStreamerBase::initializationDataEncountered):
3302         Refactored to make it a more general method and usable in more
3303         situations. It now has an optional to stop it from eliding init
3304         datas for a different key system. This is required the first time
3305         we post them, since if a CDM instance has already been set, and if
3306         the stream init datas are for different systems, we ended up never
3307         posting an encrypted event.
3308         (WebCore::MediaPlayerPrivateGStreamerBase::attemptToDecryptWithLocalInstance):
3309         Actually send a CDMInstance now when in regular playback mode.
3310         (WebCore::MediaPlayerPrivateGStreamerBase::dispatchDecryptionKey):
3311         Remove m_needToSendCredentials, it was not being used.
3312         (WebCore::MediaPlayerPrivateGStreamerBase::handleProtectionEvent):
3313         Refactored to use the new initializationDataEncountered.
3314         (WebCore::MediaPlayerPrivateGStreamerBase::reportWaitingForKey):
3315         Log the waiting state, since it was currently not clear what that
3316         logging message was even telling you!
3317         (WebCore::extractEventsAndSystemsFromMessage): Deleted.
3318         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
3319         * platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h:
3320         (WebCore::InitData::InitData): New class that encapsulates both
3321         single instantiation and streaming instantiation.
3322         (WebCore::InitData::append): Used for the streaming mode, when you
3323         are concatenating init datas together.
3324         (WebCore::InitData::payload const):
3325         (WebCore::InitData::systemId const):
3326         (WebCore::InitData::payloadContainerType const):
3327         (WebCore::InitData::isFromDifferentContainer):
3328         (WebCore::ProtectionSystemEvents::ProtectionSystemEvents):
3329         (WebCore::ProtectionSystemEvents::events const):
3330         (WebCore::ProtectionSystemEvents::availableSystems const):
3331         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
3332         (webkitMediaCommonEncryptionDecryptTransformInPlace): If you post
3333         waiting-for-key after requesting a CDM instance, it will flap back
3334         to not waiting for a key almost immediately, didn't make sense
3335         positing after requesting an instance. Also post key-received when
3336         we receive the key.
3337         (webkitMediaCommonEncryptionDecryptSinkEventHandler): It has now
3338         been arranged that a CDMInstance will always be present in an OOB
3339         message, so parse it out here.
3340         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
3341         (WebCore::MediaPlayerPrivateGStreamerMSE::attemptToDecryptWithInstance):
3342         As above, make sure when posting the OOB that a CDMInstance is present.
3343
3344 2018-11-13  Charlie Turner  <cturner@igalia.com>
3345
3346         Various compiler warnings/errors fixes.
3347         https://bugs.webkit.org/show_bug.cgi?id=191583
3348
3349         Reviewed by Frédéric Wang.
3350
3351         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
3352         (WebCore::IDBServer::MemoryIDBBackingStore::clearObjectStore):
3353         ASSERT is only compiled in DEBUG mode, so guarding with
3354         !LOG_DISABLED is wrong.
3355         * rendering/RenderLayerCompositor.cpp:
3356         (WebCore::RenderLayerCompositor::updateCompositingLayers):
3357         showPaintOrderTree is only compiled in ENABLE(TREE_DEBUGGING)
3358         mode, so guarding with !LOG_DISABLED was wrong.
3359         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3360         Ditto, this time with member .depth.
3361         (WebCore::RenderLayerCompositor::traverseUnchangedSubtree): Ditto.
3362         * rendering/svg/SVGRenderSupport.cpp:
3363         (WebCore::SVGRenderSupport::styleChanged): Add another unused
3364         parameter.
3365
3366 2018-11-12  Antoine Quint  <graouts@apple.com>
3367
3368         [Web Animations] Don't schedule animation frames or update style while an accelerated animation is running
3369         https://bugs.webkit.org/show_bug.cgi?id=191542
3370         <rdar://problem/45356027>
3371
3372         Reviewed by Simon Fraser.
3373
3374         Test: animations/no-style-recalc-during-accelerated-animation.html
3375
3376         In order to be more power-efficient, we stop scheduling calls to updateAnimationsAndSendEvents() when running only accelerated
3377         animations. To do that, we prevent scheduling further animation resolution if we're in the process of updating animations, and
3378         when we are done, call the new DocumentTimeline::scheduleNextTick() method that will check whether we have only accelerated
3379         animations running, and in that case check which of those animations needs an update the soonest and starts a timer scheduled
3380         for that time when we'll schedule animation resolution.
3381
3382         By default, animations compute the time until their natural completion but in the case of CSS Animations, we want to make sure
3383         we also update animations in-flight to dispatch "animationiteration" events.
3384
3385         * animation/AnimationEffect.h: Make the simpleIterationProgress() public so it can be called by WebAnimation::timeToNextTick().
3386         * animation/DocumentTimeline.cpp:
3387         (WebCore::DocumentTimeline::DocumentTimeline): Create the m_tickScheduleTimer and set it up to call scheduleAnimationResolutionIfNeeded().
3388         (WebCore::DocumentTimeline::suspendAnimations): If we don't already have a cached current time, cache the current time.
3389         (WebCore::DocumentTimeline::resumeAnimations): Reset the cached current time to ensure we'll get a fresh one when updating animations next.
3390         (WebCore::DocumentTimeline::liveCurrentTime const): Factor the code to compute the current time out of currentTime() so that we can
3391         cache the current time in suspendAnimations() without also automatically clearing the current time.
3392         (WebCore::DocumentTimeline::currentTime): Use liveCurrentTime() and cacheCurrentTime() since much of the code from this function has been
3393         factored out into those. Additionally, we were failing to clear the current time if called inside an animation frame, which we now do correctly
3394         by virtue of using cacheCurrentTime(). This fixes some flakiness.
3395         (WebCore::DocumentTimeline::cacheCurrentTime): Factor the code to cache the current time out of currentTime(). 
3396         (WebCore::DocumentTimeline::maybeClearCachedCurrentTime): No need to clear the current time if we get suspended.
3397         (WebCore::DocumentTimeline::scheduleAnimationResolutionIfNeeded): Prevent scheduling an animation update if we're in the middle of one already,
3398         scheduleNextTick() will be called after animations are updated to see if we should schedule an animation update instead.
3399         (WebCore::DocumentTimeline::unscheduleAnimationResolution): Cancel the m_tickScheduleTimer if we need to unschedule animation resolution.
3400         (WebCore::DocumentTimeline::animationResolutionTimerFired): Factor the call to applyPendingAcceleratedAnimations() out of updateAnimationsAndSendEvents()
3401         and call scheduleNextTick().
3402         (WebCore::DocumentTimeline::updateAnimationsAndSendEvents): Set the new m_isUpdatingAnimations member variable to true while this function is running.
3403         (WebCore::DocumentTimeline::scheduleNextTick): Schedule an animation update immediately if we have any relevant animation that is not accelerated.
3404         Otherwise, iterate through all animations to figure out the earliest moment at which we need to update animations.
3405         (WebCore::DocumentTimeline::updateListOfElementsWithRunningAcceleratedAnimationsForElement): Use the new WebAnimation::isRunningAccelerated() function.
3406         * animation/DocumentTimeline.h:
3407         * animation/WebAnimation.cpp:
3408         (WebCore::WebAnimation::isRunningAccelerated const): Since we end up checking if an animation is running with an accelerated effect, we introduce a new
3409         function to get that information directly through the WebAnimation object without bothering about its effect.
3410         (WebCore::WebAnimation::resolve): We should only call updateFinishedState() here since timingDidChange() would also notify the timeline about a potential
3411         change in relevance, which is not necessary and which would schedule an animation frame even for animations that are accelerated.
3412         (WebCore::WebAnimation::timeToNextTick const): Compute the time until our animation completion or, in the case of CSS animations, the next iteration.
3413         * animation/WebAnimation.h:
3414
3415 2018-11-13  Miguel Gomez  <magomez@igalia.com>
3416
3417         [GTK][WPE] Incorrect tile coverage when resizing a layer out of the visible area
3418         https://bugs.webkit.org/show_bug.cgi?id=191545
3419
3420         Reviewed by Žan Doberšek.
3421
3422         Keep track of layer size changes even if they happen when the layer is not in the visible
3423         area, so we can update edge tiles when the layer gets visible.
3424
3425         * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
3426         (WebCore::TiledBackingStore::createTiles):
3427         * platform/graphics/texmap/coordinated/TiledBackingStore.h:
3428
3429 2018-11-12  Rob Buis  <rbuis@igalia.com>
3430
3431         Content-Type parameter values should allow empty quoted strings
3432         https://bugs.webkit.org/show_bug.cgi?id=191388
3433
3434         Reviewed by Dean Jackson.
3435
3436         According to RFC 2045 and https://mimesniff.spec.whatwg.org/#parsing-a-mime-type empty
3437         quoted strings are acceptable for Content-Type parameter values. They
3438         are accepted by Firefox and Chrome implementations as well.
3439
3440         Test: web-platform-tests/xhr/overridemimetype-blob.html
3441
3442         * platform/network/ParsedContentType.cpp:
3443         (WebCore::parseToken):
3444         (WebCore::parseQuotedString):
3445         (WebCore::parseContentType):
3446         * platform/network/ParsedContentType.h:
3447
3448 2018-11-12  Christopher Reid  <chris.reid@sony.com>
3449
3450         [Curl] Reject entire cookie if the domain fails a tailmatch.
3451         https://bugs.webkit.org/show_bug.cgi?id=191406
3452
3453         Reviewed by Youenn Fablet.
3454
3455         Currently we don't put domain attribute of cookie when it fails a tailmatch. As Firefox
3456         and Chrome do, we are going to reject the entire cookie if the domain fails a tailmatch instead.
3457         Also cleanup Cookie database implementation to make them testable better.
3458
3459         Tests: TestWebKitAPI/Tests/WebCore/curl/Cookies.cpp
3460
3461         * platform/network/curl/CookieJarDB.cpp:
3462         (WebCore::CookieJarDB::canAcceptCookie): Added.
3463         (WebCore::CookieJarDB::setCookie):
3464         * platform/network/curl/CookieUtil.cpp:
3465         (WebCore::CookieUtil::parseCookieAttributes):
3466         (WebCore::CookieUtil::parseCookieHeader):
3467         * platform/network/curl/CookieUtil.h:
3468
3469 2018-11-12  Devin Rousso  <drousso@apple.com>
3470
3471         Web Inspector: Network: show secure certificate details per-request
3472         https://bugs.webkit.org/show_bug.cgi?id=191447
3473         <rdar://problem/30019476>
3474
3475         Reviewed by Joseph Pecoraro.
3476
3477         Test: http/tests/inspector/network/resource-response-security.html
3478
3479         * loader/ResourceLoader.h:
3480         (WebCore::ResourceLoader::shouldIncludeCertificateInfo const):
3481         * loader/ResourceLoader.cpp:
3482         (WebCore::ResourceLoader::shouldIncludeCertificateInfo const): Added.
3483         Always save certificate information when WebInspector is open.
3484
3485         * platform/network/CertificateInfoBase.h: Added.
3486         (WebCore::CertificateInfoBase::containsNonRootSHA1SignedCertificate const):
3487         (WebCore::CertificateInfoBase::summaryInfo const):
3488         (WebCore::CertificateInfoBase::isEmpty const):
3489         * platform/network/cf/CertificateInfo.h:
3490         (WebCore::CertificateInfo::summaryInfo const): Added.
3491         * platform/network/cf/CertificateInfoCFNet.cpp: Renamed from Source/WebCore/platform/network/mac/CertificateInfoMac.mm.
3492         (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate):
3493         (WebCore::CertificateInfo::summaryInfo const): Added.
3494         * platform/network/curl/CertificateInfo.h:
3495         (WebCore::CertificateInfo::summaryInfo const): Added.
3496         (WebCore::CertificateInfo::isEmpty const): Added.
3497         * platform/network/soup/CertificateInfo.h:
3498         (WebCore::CertificateInfo::summaryInfo const): Added.
3499         (WebCore::CertificateInfo::isEmpty const): Added.
3500         Create base class for `CertificateInfo` so that `InspectorNetworkAgent` doesn't need to have
3501         platform-specific code in its implementation.
3502
3503         * platform/network/cocoa/CertificateInfoCocoa.mm: Renamed from Source/WebCore/platform/network/mac/CertificateInfoMac.mm.
3504         * platform/network/curl/CertificateInfoCFNet.cpp: Renamed from Source/WebCore/platform/network/curl/CertificateInfo.cpp.
3505         * platform/network/soup/CertificateInfoSoup.cpp: Renamed from Source/WebCore/platform/network/soup/CertificateInfo.cpp.
3506
3507         * inspector/NetworkResourcesData.h:
3508         (WebCore::NetworkResourcesData::ResourceData::certificateInfo const): Added.
3509         (WebCore::NetworkResourcesData::ResourceData::setCertificateInfo): Added.
3510         * inspector/NetworkResourcesData.cpp:
3511         (WebCore::NetworkResourcesData::responseReceived):
3512
3513         * inspector/agents/InspectorNetworkAgent.cpp:
3514         (WebCore::InspectorNetworkAgent::buildObjectForResourceResponse):
3515
3516         * PlatformAppleWin.cmake:
3517         * PlatformMac.cmake:
3518         * SourcesCocoa.txt:
3519         * WebCore.xcodeproj/project.pbxproj:
3520         * platform/Curl.cmake:
3521         * platform/SourcesSoup.txt:
3522
3523 2018-11-12  Zalan Bujtas  <zalan@apple.com>
3524
3525         Do not collapse the soon-to-be-parent anon block when we shuffle around the marker item renderer.
3526         https://bugs.webkit.org/show_bug.cgi?id=191554
3527         <rdar://problem/45825265>
3528
3529         Reviewed by Antti Koivisto.
3530
3531         While moving the marker item renderer to its correct subtree, we accidentally remove the soon-to-be parent anonymous block.
3532         Moving a renderer is a 2 step process:
3533         1. Detach the renderer from its current parent
3534         2. Attach it to its new parent.
3535         During step #1, we check if there is a chance to collapse anonymous blocks. In this case the soon-to-be-parent is a sibling anonymous block which, after detaching the marker sibling
3536         is not needed anymore (except we use it as the new parent).
3537
3538         Test: fast/inline/marker-list-item-move-should-not-crash.html
3539
3540         * rendering/updating/RenderTreeBuilder.cpp:
3541         (WebCore::RenderTreeBuilder::detach):
3542         * rendering/updating/RenderTreeBuilder.h:
3543         * rendering/updating/RenderTreeBuilderBlock.cpp:
3544         (WebCore::RenderTreeBuilder::Block::detach):
3545         * rendering/updating/RenderTreeBuilderBlock.h:
3546         * rendering/updating/RenderTreeBuilderList.cpp:
3547         (WebCore::RenderTreeBuilder::List::updateItemMarker):
3548
3549 2018-11-12  Javier Fernandez  <jfernandez@igalia.com>
3550
3551         [css-grid] Refactoring to make more explicit the orthogonal items' pre-layout logic
3552         https://bugs.webkit.org/show_bug.cgi?id=191358
3553
3554         Reviewed by Manuel Rego Casasnovas.
3555
3556         These changes are just a refactoring to ease the integration of the new Baseline Alignment
3557         logic in a follow up patch.
3558
3559         We need to properly estimate the grid area size of orthogonal items so that we can perform
3560         an accurate pre-layout. This is important because orthogonal items will synthesize their baseline
3561         if they participate in any baseline alignment context.
3562
3563         No new tests, since no behavior change has been introduced in this patch.
3564
3565         * rendering/Grid.cpp:
3566         (WebCore::Grid::setNeedsItemsPlacement):
3567         * rendering/Grid.h:
3568         * rendering/GridTrackSizingAlgorithm.cpp:
3569         (WebCore::GridTrackSizingAlgorithm::estimatedGridAreaBreadthForChild const):
3570         (WebCore::GridTrackSizingAlgorithm::gridAreaBreadthForChild const):
3571         (WebCore::GridTrackSizingAlgorithm::isRelativeGridLengthAsAuto const):
3572         (WebCore::GridTrackSizingAlgorithm::isRelativeSizedTrackAsAuto const):
3573         (WebCore::GridTrackSizingAlgorithm::gridTrackSize const):
3574         (WebCore::IndefiniteSizeStrategy::findUsedFlexFraction const):
3575         (WebCore::GridTrackSizingAlgorithm::run):
3576         (WebCore::GridTrackSizingAlgorithm::reset):
3577         * rendering/GridTrackSizingAlgorithm.h:
3578         (WebCore::GridTrackSizingAlgorithmStrategy::gridTrackSize const):
3579         * rendering/RenderGrid.cpp:
3580         (WebCore::RenderGrid::repeatTracksSizingIfNeeded):
3581         (WebCore::RenderGrid::layoutBlock):
3582         (WebCore::RenderGrid::computeIntrinsicLogicalWidths const):
3583         (WebCore::RenderGrid::computeTrackSizesForIndefiniteSize const):
3584         (WebCore::RenderGrid::placeItemsOnGrid const):
3585         (WebCore::RenderGrid::performGridItemsPreLayout const):
3586         (WebCore::overrideSizeChanged):
3587         (WebCore::hasRelativeBlockAxisSize):
3588         (WebCore::RenderGrid::updateGridAreaLogicalSize const):
3589         (WebCore::RenderGrid::layoutGridItems):
3590         * rendering/RenderGrid.h:
3591
3592 2018-11-12  Sihui Liu  <sihui_liu@apple.com>
3593
3594         imported/w3c/web-platform-tests/IndexedDB/keygenerator-explicit.html crashing on iOS device
3595         https://bugs.webkit.org/show_bug.cgi?id=191500
3596
3597         Reviewed by Dean Jackson.
3598
3599         When double value is bigger than maximum unsigned int, converting double to unsigned int has
3600         different behaviors on macOS and iOS. On macOS, the result would be 0 while on iOS it would be
3601         maximum unsigned int.
3602
3603         Covered by existing test.
3604
3605         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
3606         (WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber):
3607         (WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber):
3608
3609 2018-11-12  Basuke Suzuki  <basuke.suzuki@sony.com>
3610
3611         [Curl] Add API Test for Curl cookie backend.
3612         https://bugs.webkit.org/show_bug.cgi?id=191493
3613
3614         Reviewed by Youenn Fablet.
3615
3616         Refactoring for cookie backend interface.
3617
3618         Tests: TestWebKitAPI/Tests/WebCore/curl/Cookies.cpp
3619
3620         * platform/FileSystem.h:
3621         * platform/network/curl/CookieJarCurlDatabase.cpp:
3622         (WebCore::cookiesForSession):
3623         (WebCore::CookieJarCurlDatabase::setCookiesFromDOM const):
3624         (WebCore::CookieJarCurlDatabase::setCookiesFromHTTPResponse const):
3625         (WebCore::CookieJarCurlDatabase::getRawCookies const):
3626         * platform/network/curl/CookieJarDB.cpp:
3627         (WebCore::CookieJarDB::openDatabase):
3628         (WebCore::CookieJarDB::checkSQLiteReturnCode):
3629         (WebCore::CookieJarDB::isEnabled const):
3630         (WebCore::CookieJarDB::searchCookies):
3631         (WebCore::CookieJarDB::setCookie):
3632         (WebCore::CookieJarDB::deleteCookie):
3633         (WebCore::CookieJarDB::deleteCookieInternal):
3634         (WebCore::CookieJarDB::deleteCookies):
3635         (WebCore::CookieJarDB::deleteAllCookies):
3636         (WebCore::CookieJarDB::executeSimpleSql):
3637         (WebCore::CookieJarDB::isEnabled): Deleted.
3638         * platform/network/curl/CookieJarDB.h:
3639         * platform/network/curl/CookieUtil.cpp:
3640         (WebCore::CookieUtil::parseCookieHeader):
3641         * platform/network/curl/CookieUtil.h:
3642         * platform/win/FileSystemWin.cpp:
3643         (WebCore::FileSystem::generateTemporaryPath):
3644         (WebCore::FileSystem::openTemporaryFile):
3645         (WebCore::FileSystem::createTemporaryDirectory):
3646         (WebCore::FileSystem::deleteNonEmptyDirectory):
3647
3648 2018-11-12  Tim Horton  <timothy_horton@apple.com>
3649
3650         Make it possible to edit images inline
3651         https://bugs.webkit.org/show_bug.cgi?id=191352
3652         <rdar://problem/30107985>
3653
3654         Reviewed by Dean Jackson.
3655
3656         Tests: editing/images/basic-editable-image.html
3657                editing/images/reparent-editable-image-maintains-strokes.html
3658
3659         Add the beginnings of a mechanism to replace images with a special attribute
3660         with a native drawing view in the UI process.
3661
3662         * page/Settings.yaml:
3663         Add a setting to control whether images become natively editable when they
3664         have the x-apple-editable-image attribute.
3665
3666         * html/HTMLImageElement.cpp:
3667         (WebCore::HTMLImageElement::editableImageViewID const):
3668         Lazily generate an EmbeddedViewID and persist it on the <img> element.
3669
3670         * html/HTMLImageElement.h:
3671         Rearrange the service controls methods to sit before the members.
3672         Add m_editableImageViewID and editableImageViewID().
3673
3674         * platform/graphics/GraphicsLayer.cpp:
3675         (WebCore::GraphicsLayer::nextEmbeddedViewID):
3676         * platform/graphics/GraphicsLayer.h:
3677         (WebCore::GraphicsLayer::setContentsToEmbeddedView):
3678         Add a new ContentsLayerPurpose, EmbeddedView, which is only supported
3679         on Cocoa platforms and when using RemoteLayerTree.
3680         Add ContentsLayerEmbeddedViewType, which currently only has the EditableImage type.
3681         Add setContentsToEmbeddedView, which takes a ContentsLayerEmbeddedViewType
3682         and an EmbeddedViewID to uniquely identify and communicate about the
3683         embedded view (which may move between layers, since it is tied to an element).
3684
3685         * platform/graphics/ca/GraphicsLayerCA.cpp:
3686         (WebCore::GraphicsLayerCA::createPlatformCALayerForEmbeddedView):
3687         (WebCore::GraphicsLayerCA::setContentsToEmbeddedView):
3688         When setting GraphicsLayer's contents to an embedded view, we use
3689         a special PlatformCALayer factory that takes the EmbeddedViewID and type.
3690         GraphicsLayerCARemote will override this and make a correctly-initialized
3691         PlatformCALayerRemote that keeps track of the EmbeddedViewID.
3692
3693         * platform/graphics/ca/GraphicsLayerCA.h:
3694         * platform/graphics/ca/PlatformCALayer.cpp:
3695         (WebCore::operator<<):
3696         * platform/graphics/ca/PlatformCALayer.h:
3697         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
3698         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
3699         (WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
3700         (WebCore::PlatformCALayerCocoa::embeddedViewID const):
3701         Add stubs and logging for EmbeddedViewID on PlatformCALayer.
3702         These will be overridden by PlatformCALayerRemote to do more interesting things.
3703
3704         * rendering/RenderImage.cpp:
3705         (WebCore::RenderImage::isEditableImage const):
3706         Add a getter that return true if the setting is enabled and
3707         x-apple-editable-image is empty or true.
3708
3709         (WebCore::RenderImage::requiresLayer const):
3710         RenderImage requires a layer either if RenderReplaced does, or we are an
3711         editable image.
3712
3713         * rendering/RenderImage.h:
3714         * rendering/RenderLayer.cpp:
3715         (WebCore::RenderLayer::shouldBeNormalFlowOnly const):
3716         (WebCore::RenderLayer::calculateClipRects const):
3717         * rendering/RenderLayerBacking.cpp:
3718         (WebCore::RenderLayerBacking::updateConfiguration):
3719         Push the EmbeddedViewID and type down to GraphicsLayer for editable images.
3720
3721         * rendering/RenderLayerCompositor.cpp:
3722         (WebCore::RenderLayerCompositor::requiresCompositingLayer const):
3723         (WebCore::RenderLayerCompositor::requiresOwnBackingStore const):
3724         (WebCore::RenderLayerCompositor::reasonsForCompositing const):
3725         (WebCore::RenderLayerCompositor::requiresCompositingForEditableImage const):
3726         * rendering/RenderLayerCompositor.h:
3727         Make editable images require compositing implicitly.
3728
3729 2018-11-12  Don Olmstead  <don.olmstead@sony.com>
3730
3731         Shipped PNGs include bad profiles: iCCP: known incorrect sRGB profile
3732         https://bugs.webkit.org/show_bug.cgi?id=189230
3733         <rdar://problem/44050379>
3734
3735         Reviewed by Joseph Pecoraro.
3736
3737         Runs all png images through zopflipng. This results in a smaller file
3738         size and takes care of this issue as a byproduct.
3739
3740         * Modules/modern-media-controls/images/iOS/airplay-placard@1x.png:
3741         * Modules/modern-media-controls/images/iOS/airplay-placard@2x.png:
3742         * Modules/modern-media-controls/images/iOS/airplay-placard@3x.png:
3743         * Modules/modern-media-controls/images/iOS/invalid-placard@1x.png:
3744         * Modules/modern-media-controls/images/iOS/invalid-placard@2x.png:
3745         * Modules/modern-media-controls/images/iOS/invalid-placard@3x.png:
3746         * Modules/modern-media-controls/images/iOS/pip-placard@1x.png:
3747         * Modules/modern-media-controls/images/iOS/pip-placard@2x.png:
3748         * Modules/modern-media-controls/images/iOS/pip-placard@3x.png:
3749         * Modules/modern-media-controls/images/macOS/airplay-placard@1x.png:
3750         * Modules/modern-media-controls/images/macOS/airplay-placard@2x.png:
3751         * Modules/modern-media-controls/images/macOS/invalid-placard@1x.png:
3752         * Modules/modern-media-controls/images/macOS/invalid-placard@2x.png:
3753         * Modules/modern-media-controls/images/macOS/pip-placard@1x.png:
3754         * Modules/modern-media-controls/images/macOS/pip-placard@2x.png:
3755         * Resources/AttachmentPlaceholder.png:
3756         * Resources/AttachmentPlaceholder@2x.png:
3757         * Resources/ListButtonArrow.png:
3758         * Resources/ListButtonArrow@2x.png:
3759         * Resources/missingImage.png:
3760         * Resources/missingImage@2x.png:
3761         * Resources/missingImage@3x.png:
3762         * Resources/moveCursor.png:
3763         * Resources/northEastSouthWestResizeCursor.png:
3764         * Resources/northSouthResizeCursor.png:
3765         * Resources/northWestSouthEastResizeCursor.png:
3766         * Resources/nullPlugin.png:
3767         * Resources/nullPlugin@2x.png:
3768         * Resources/panIcon.png:
3769         * Resources/textAreaResizeCorner.png:
3770         * Resources/textAreaResizeCorner@2x.png:
3771         * Resources/urlIcon.png:
3772
3773 2018-11-12  Youenn Fablet  <youenn@apple.com>
3774
3775         RealtimeOutgoing A/V sources should observe their sources only if having a sink
3776         https://bugs.webkit.org/show_bug.cgi?id=191490
3777
3778         Reviewed by Eric Carlson.
3779
3780         Observe the source that generates media based on the sinks:
3781         - Do not observe at creation time
3782         - For first sink, start observing
3783         - When no more sink, stop observing
3784         Apply this principle for both outgoing audio and video sources.
3785         Add locks for the sinks to ensure thread-safety.
3786         Make sinks HashSet which is more robust.
3787
3788         Do some refactoring to better isolate generic outgoing sources from Cocoa/GTK implementations.
3789
3790         Covered by existing tests and updated webrtc/remove-track.html.
3791
3792         * platform/mediastream/RealtimeOutgoingAudioSource.cpp:
3793         (WebCore::RealtimeOutgoingAudioSource::~RealtimeOutgoingAudioSource):
3794         (WebCore::RealtimeOutgoingAudioSource::stop):
3795         (WebCore::RealtimeOutgoingAudioSource::AddSink):
3796         (WebCore::RealtimeOutgoingAudioSource::RemoveSink):
3797         (WebCore::RealtimeOutgoingAudioSource::sendAudioFrames):
3798         * platform/mediastream/RealtimeOutgoingAudioSource.h:
3799         * platform/mediastream/RealtimeOutgoingVideoSource.cpp:
3800         (WebCore::RealtimeOutgoingVideoSource::RealtimeOutgoingVideoSource):
3801         (WebCore::RealtimeOutgoingVideoSource::~RealtimeOutgoingVideoSource):
3802         (WebCore::RealtimeOutgoingVideoSource::observeSource):
3803         (WebCore::RealtimeOutgoingVideoSource::setSource):
3804         (WebCore::RealtimeOutgoingVideoSource::stop):
3805         (WebCore::RealtimeOutgoingVideoSource::AddOrUpdateSink):
3806         (WebCore::RealtimeOutgoingVideoSource::RemoveSink):
3807         * platform/mediastream/RealtimeOutgoingVideoSource.h:
3808         (WebCore::RealtimeOutgoingVideoSource::isSilenced const):
3809         * platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.cpp:
3810         (WebCore::RealtimeOutgoingAudioSourceLibWebRTC::pullAudioData):
3811         * platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp:
3812         (WebCore::RealtimeOutgoingAudioSourceCocoa::RealtimeOutgoingAudioSourceCocoa):
3813         (WebCore::RealtimeOutgoingAudioSourceCocoa::audioSamplesAvailable):
3814         (WebCore::RealtimeOutgoingAudioSourceCocoa::pullAudioData):
3815         * platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.h:
3816         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
3817         (WebCore::RealtimeOutgoingVideoSourceCocoa::sampleBufferUpdated):
3818
3819 2018-11-12  Youenn Fablet  <youenn@apple.com>
3820
3821         Support setting stream ids when adding a transceiver
3822         https://bugs.webkit.org/show_bug.cgi?id=191307
3823
3824         Reviewed by Eric Carlson.
3825
3826         Add support for streams in RTCTransceiverInit.
3827         Add plumbing down to libwebrtc.
3828         Covered by rebased tests.
3829
3830         * Modules/mediastream/RTCPeerConnection.h:
3831         * Modules/mediastream/RTCPeerConnection.idl:
3832         * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
3833         (WebCore::fromRtpTransceiverInit):
3834
3835 2018-11-12  Antti Koivisto  <antti@apple.com>
3836
3837         Support dynamic pseudo-classes on elements with display: contents
3838         https://bugs.webkit.org/show_bug.cgi?id=181640
3839         <rdar://problem/36605415>
3840
3841         Reviewed by Dean Jackson.
3842
3843         The code for :hover and :active style invalidation assumes that only elements with renderer need invalidation.
3844
3845         This patch fixes '.display-content-element:hover span' case but not '.display-content-element:hover' case but
3846         includes tests for both. The latter is not super useful anyway (as it only affects rendering with inherited
3847         text properties).
3848
3849         Test: fast/css/display-contents-hover-active.html
3850
3851         * dom/Document.cpp:
3852         (WebCore::Document::updateHoverActiveState):
3853
3854             Traverse up in composed tree instead of render tree when invalidating. This has the same order as render tree
3855             but also includes display:content elements. This also allows removing the special display:none case.
3856
3857         * dom/Element.cpp:
3858         (WebCore::Element::setActive):
3859         (WebCore::Element::setHovered):
3860
3861             Also look into display:contents style for invalidation checks.
3862
3863         (WebCore::Element::renderOrDisplayContentsStyle const):
3864
3865             Make this helper an Element member.
3866
3867         * dom/Element.h:
3868         * dom/Node.cpp:
3869         (WebCore::Node::parentElementInComposedTree const):
3870
3871             Support starting from a PseudoElement. This is consistent with ComposedTreeAncestorIterator.
3872
3873         * rendering/updating/RenderTreePosition.cpp:
3874         (WebCore::RenderTreePosition::nextSiblingRenderer const):
3875         * style/StyleTreeResolver.cpp:
3876         (WebCore::Style::TreeResolver::resolveElement):
3877         (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
3878         (WebCore::Style::shouldResolveElement):
3879         (WebCore::Style::TreeResolver::resolveComposedTree):
3880         (WebCore::Style::renderOrDisplayContentsStyle): Deleted.
3881
3882             Use the Element::renderOrDisplayContentsStyle() instead.
3883
3884 2018-11-12  Antoine Quint  <graouts@apple.com>
3885
3886         [Web Animations] Turn Web Animations experimental
3887         https://bugs.webkit.org/show_bug.cgi?id=191543
3888
3889         Reviewed by Dean Jackson.
3890
3891         * page/RuntimeEnabledFeatures.h:
3892
3893 2018-11-12  Simon Fraser  <simon.fraser@apple.com>
3894
3895         feFlood with alpha color doesn't work correctly
3896         https://bugs.webkit.org/show_bug.cgi?id=163666
3897
3898         Reviewed by Zalan Bujtas.
3899         
3900         FEFlood::platformApplySoftware() erroneously used colorWithOverrideAlpha()
3901         rather than multiplying the flood color with the flood opacity as other browsers do.
3902
3903         Test: svg/filters/feFlood-with-alpha-color.html
3904
3905         * platform/graphics/Color.cpp:
3906         (WebCore::Color::colorWithAlpha const): I tried using colorWithAlphaMultipliedBy() elsewhere,
3907         and it triggered a behavior change, so add a comment.
3908         * platform/graphics/filters/FEFlood.cpp:
3909         (WebCore::FEFlood::platformApplySoftware):
3910         * svg/SVGStopElement.cpp:
3911         (WebCore::SVGStopElement::stopColorIncludingOpacity const):
3912
3913 2018-11-12  Eric Carlson  <eric.carlson@apple.com>
3914
3915         Require <iframe allow="display"> for an iframe to use getDisplayMedia
3916         https://bugs.webkit.org/show_bug.cgi?id=191505
3917         <rdar://problem/45968811>
3918
3919         Reviewed by Jer Noble.
3920
3921         Test: http/tests/media/media-stream/get-display-media-iframe-allow-attribute.html
3922
3923         * Modules/mediastream/MediaDevicesRequest.cpp:
3924         (WebCore::MediaDevicesRequest::start):
3925         * Modules/mediastream/UserMediaController.cpp:
3926         (WebCore::isAllowedToUse):
3927         (WebCore::UserMediaController::canCallGetUserMedia):
3928         (WebCore::UserMediaController::logGetUserMediaDenial):
3929         * Modules/mediastream/UserMediaController.h:
3930         * Modules/mediastream/UserMediaRequest.cpp:
3931         (WebCore::UserMediaRequest::start):
3932
3933 2018-11-12  Simon Fraser  <simon.fraser@apple.com>
3934
3935         Make compositing updates incremental