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