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