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