Web Inspector: Canvas: show WebGPU shader pipelines
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2019-09-19  Devin Rousso  <drousso@apple.com>
2
3         Web Inspector: Canvas: show WebGPU shader pipelines
4         https://bugs.webkit.org/show_bug.cgi?id=201675
5
6         Reviewed by Joseph Pecoraro.
7
8         Tests: inspector/canvas/requestShaderSource-webgpu.html
9                inspector/canvas/shaderProgram-add-remove-webgpu.html
10                inspector/canvas/updateShader-webgpu.html
11
12         Create common base classes for `WebGPUPipeline` and `GPUPipeline` so that Web Inspector can
13         instrument both render and compute shader pipelines.
14
15         Refactor `InspectorShaderProgram` to support both `WebGLProgram` and `WebGPUPipeline` so
16         that the same object can be used for all types of shader "program"s.
17
18         Keep a copy of each shader module's source, and allow the shader module to be updated.
19
20         * Modules/webgpu/WebGPUDevice.h:
21         * Modules/webgpu/WebGPUDevice.cpp:
22         (WebCore::WebGPUDevice::createShaderModule const):
23         (WebCore::WebGPUDevice::createRenderPipeline): Added.
24         (WebCore::WebGPUDevice::createComputePipeline): Added.
25         (WebCore::WebGPUDevice::createRenderPipeline const): Deleted.
26         (WebCore::WebGPUDevice::createComputePipeline const): Deleted.
27
28         * Modules/webgpu/WebGPUPipeline.h: Added.
29         (WebCore::WebGPUPipeline::isRenderPipeline const):
30         (WebCore::WebGPUPipeline::isComputePipeline const):
31         (WebCore::WebGPUPipeline::scriptExecutionContext const):
32         * Modules/webgpu/WebGPUPipeline.cpp: Added.
33         (WebCore::WebGPUPipeline::instancesMutex):
34         (WebCore::WebGPUPipeline::WebGPUPipeline):
35         (WebCore::WebGPUPipeline::~WebGPUPipeline):
36         * platform/graphics/gpu/GPUPipeline.cpp: Added.
37         * platform/graphics/gpu/GPUPipeline.h: Added.
38         (WebCore::GPUPipeline::isRenderPipeline const):
39         (WebCore::GPUPipeline::isComputePipeline const):
40
41         * Modules/webgpu/WebGPUComputePipeline.idl:
42         * Modules/webgpu/WebGPUComputePipeline.h:
43         (WebCore::WebGPUComputePipeline::computePipeline const): Deleted.
44         * Modules/webgpu/WebGPUComputePipeline.cpp:
45         (WebCore::WebGPUComputePipeline::create):
46         (WebCore::WebGPUComputePipeline::WebGPUComputePipeline):
47         (WebCore::WebGPUComputePipeline::recompile): Added.
48         * platform/graphics/gpu/GPUComputePipeline.h:
49         (WebCore::GPUComputePipeline::isComputePipeline): Added.
50         * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:
51         (WebCore::GPUComputePipeline::tryCreate):
52         (WebCore::GPUComputePipeline::GPUComputePipeline):
53         (WebCore::GPUComputePipeline::recompile): Added.
54
55         * Modules/webgpu/WebGPURenderPipeline.idl:
56         * Modules/webgpu/WebGPURenderPipeline.h:
57         (WebCore::WebGPURenderPipeline::renderPipeline const): Deleted.
58         * Modules/webgpu/WebGPURenderPipeline.cpp:
59         (WebCore::WebGPURenderPipeline::create):
60         (WebCore::WebGPURenderPipeline::WebGPURenderPipeline):
61         (WebCore::WebGPURenderPipeline::recompile): Added.
62         * platform/graphics/gpu/GPURenderPipeline.h:
63         (WebCore::GPURenderPipeline::isRenderPipeline): Added.
64         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
65         (WebCore::tryCreateMtlRenderPipelineState):
66         (WebCore::GPURenderPipeline::tryCreate):
67         (WebCore::GPURenderPipeline::GPURenderPipeline):
68         (WebCore::GPURenderPipeline::recompile): Added.
69
70         * Modules/webgpu/WebGPUShaderModule.h:
71         (WebCore::WebGPUShaderModule::source const): Added.
72         * Modules/webgpu/WebGPUShaderModule.cpp:
73         (WebCore::WebGPUShaderModule::update): Added.
74         * Modules/webgpu/WebGPUProgrammableStageDescriptor.h:
75         * platform/graphics/gpu/GPUProgrammableStageDescriptor.h:
76         (WebCore::GPUProgrammableStageDescriptor::GPUProgrammableStageDescriptor):
77
78         * inspector/InspectorShaderProgram.h:
79         * inspector/InspectorShaderProgram.cpp:
80         (WebCore::InspectorShaderProgram::create):
81         (WebCore::InspectorShaderProgram::InspectorShaderProgram):
82         (WebCore::InspectorShaderProgram::program const): Added.
83         (WebCore::InspectorShaderProgram::pipeline const): Added.
84         (WebCore::shaderForType): Added.
85         (WebCore::InspectorShaderProgram::requestShaderSource): Added.
86         (WebCore::InspectorShaderProgram::updateShader): Added.
87         (WebCore::InspectorShaderProgram::context const): Deleted.
88         (WebCore::InspectorShaderProgram::shaderForType): Deleted.
89
90         * inspector/agents/InspectorCanvasAgent.h:
91         * inspector/agents/InspectorCanvasAgent.cpp:
92         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
93         (WebCore::InspectorCanvasAgent::discardAgent):
94         (WebCore::InspectorCanvasAgent::enable):
95         (WebCore::InspectorCanvasAgent::disable):
96         (WebCore::InspectorCanvasAgent::requestShaderSource):
97         (WebCore::InspectorCanvasAgent::updateShader):
98         (WebCore::InspectorCanvasAgent::setShaderProgramDisabled):
99         (WebCore::InspectorCanvasAgent::setShaderProgramHighlighted):
100         (WebCore::InspectorCanvasAgent::frameNavigated):
101         (WebCore::InspectorCanvasAgent::didCreateWebGLProgram): Added.
102         (WebCore::InspectorCanvasAgent::willDestroyWebGLProgram): Added.
103         (WebCore::InspectorCanvasAgent::isWebGLProgramDisabled): Added.
104         (WebCore::InspectorCanvasAgent::isWebGLProgramHighlighted): Added.
105         (WebCore::InspectorCanvasAgent::didCreateWebGPUPipeline): Added.
106         (WebCore::InspectorCanvasAgent::willDestroyWebGPUPipeline): Added.
107         (WebCore::InspectorCanvasAgent::programDestroyedTimerFired): Added.
108         (WebCore::InspectorCanvasAgent::reset): Added.
109         (WebCore::InspectorCanvasAgent::unbindProgram):
110         (WebCore::InspectorCanvasAgent::findInspectorProgram):
111         (WebCore::InspectorCanvasAgent::didCreateProgram): Deleted.
112         (WebCore::InspectorCanvasAgent::willDeleteProgram): Deleted.
113         (WebCore::InspectorCanvasAgent::isShaderProgramDisabled): Deleted.
114         (WebCore::InspectorCanvasAgent::isShaderProgramHighlighted): Deleted.
115         (WebCore::InspectorCanvasAgent::clearCanvasData): Deleted.
116         * inspector/InspectorInstrumentation.h:
117         (WebCore::InspectorInstrumentation::didCreateWebGLProgram): Added.
118         (WebCore::InspectorInstrumentation::willDestroyWebGLProgram): Added.
119         (WebCore::InspectorInstrumentation::isWebGLProgramDisabled): Added.
120         (WebCore::InspectorInstrumentation::isWebGLProgramHighlighted): Added.
121         (WebCore::InspectorInstrumentation::didCreateWebGPUPipeline): Added.
122         (WebCore::InspectorInstrumentation::willDestroyWebGPUPipeline): Added.
123         (WebCore::InspectorInstrumentation::didCreateProgram): Deleted.
124         (WebCore::InspectorInstrumentation::willDeleteProgram): Deleted.
125         (WebCore::InspectorInstrumentation::isShaderProgramDisabled): Deleted.
126         (WebCore::InspectorInstrumentation::isShaderProgramHighlighted): Deleted.
127         * inspector/InspectorInstrumentation.cpp:
128         (WebCore::InspectorInstrumentation::didCreateWebGLProgramImpl): Added.
129         (WebCore::InspectorInstrumentation::willDestroyWebGLProgramImpl): Added.
130         (WebCore::InspectorInstrumentation::isWebGLProgramDisabledImpl): Added.
131         (WebCore::InspectorInstrumentation::isWebGLProgramHighlightedImpl): Added.
132         (WebCore::InspectorInstrumentation::didCreateWebGPUPipelineImpl): Added.
133         (WebCore::InspectorInstrumentation::willDestroyWebGPUPipelineImpl): Added.
134         (WebCore::InspectorInstrumentation::didCreateProgramImpl): Deleted.
135         (WebCore::InspectorInstrumentation::willDeleteProgramImpl): Deleted.
136         (WebCore::InspectorInstrumentation::isShaderProgramDisabledImpl): Deleted.
137         (WebCore::InspectorInstrumentation::isShaderProgramHighlightedImpl): Deleted.
138
139         * html/canvas/WebGLProgram.h:
140         * html/canvas/WebGLProgram.cpp:
141         (WebCore::WebGLProgram::WebGLProgram):
142         (WebCore::WebGLProgram::~WebGLProgram):
143         * html/canvas/WebGLRenderingContextBase.cpp:
144         (WebCore::InspectorScopedShaderProgramHighlight::showHightlight):
145         (WebCore::WebGLRenderingContextBase::createProgram):
146         (WebCore::WebGLRenderingContextBase::deleteProgram):
147         (WebCore::WebGLRenderingContextBase::drawArrays):
148         (WebCore::WebGLRenderingContextBase::drawElements):
149         Rename WebGL program instrumentation points to be less ambiguous.
150
151         * Sources.txt:
152         * WebCore.xcodeproj/project.pbxproj:
153
154 2019-09-19  Chris Dumez  <cdumez@apple.com>
155
156         WorkerGlobalScope does not need a SessionID
157         https://bugs.webkit.org/show_bug.cgi?id=201991
158
159         Reviewed by Alex Christensen.
160
161         WorkerGlobalScope does not need a SessionID, now that we have a single session
162         per WebProcess.
163
164         * dom/Document.cpp:
165         (WebCore::Document::resume):
166         (WebCore::Document::privateBrowsingStateDidChange):
167         * dom/Document.h:
168         * dom/ScriptExecutionContext.h:
169         * loader/DocumentLoader.cpp:
170         (WebCore::DocumentLoader::matchRegistration):
171         (WebCore::DocumentLoader::commitData):
172         (WebCore::DocumentLoader::registerTemporaryServiceWorkerClient):
173         (WebCore::DocumentLoader::unregisterTemporaryServiceWorkerClient):
174         * testing/Internals.cpp:
175         (WebCore::Internals::serviceWorkerClientIdentifier const):
176         (WebCore::Internals::storeRegistrationsOnDisk):
177         (WebCore::Internals::hasServiceWorkerRegistration):
178         (WebCore::Internals::terminateServiceWorker):
179         (WebCore::Internals::hasServiceWorkerConnection):
180         * workers/DedicatedWorkerGlobalScope.cpp:
181         (WebCore::DedicatedWorkerGlobalScope::create):
182         (WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
183         * workers/DedicatedWorkerGlobalScope.h:
184         * workers/DedicatedWorkerThread.cpp:
185         (WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
186         (WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
187         * workers/DedicatedWorkerThread.h:
188         * workers/Worker.cpp:
189         (WebCore::Worker::notifyFinished):
190         * workers/WorkerGlobalScope.cpp:
191         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
192         * workers/WorkerGlobalScope.h:
193         * workers/WorkerGlobalScopeProxy.h:
194         * workers/WorkerMessagingProxy.cpp:
195         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
196         * workers/WorkerMessagingProxy.h:
197         * workers/WorkerThread.cpp:
198         (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
199         (WebCore::WorkerThread::WorkerThread):
200         (WebCore::WorkerThread::workerThread):
201         * workers/WorkerThread.h:
202         * workers/service/ServiceWorker.cpp:
203         (WebCore::ServiceWorker::postMessage):
204         * workers/service/ServiceWorkerContainer.cpp:
205         (WebCore::mainThreadConnection):
206         (WebCore::ServiceWorkerContainer::addRegistration):
207         (WebCore::ServiceWorkerContainer::removeRegistration):
208         (WebCore::ServiceWorkerContainer::updateRegistration):
209         (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
210         (WebCore::ServiceWorkerContainer::notifyRegistrationIsSettled):
211         (WebCore::ServiceWorkerContainer::jobFinishedLoadingScript):
212         (WebCore::ServiceWorkerContainer::notifyFailedFetchingScript):
213         (WebCore::ServiceWorkerContainer::ensureSWClientConnection):
214         * workers/service/ServiceWorkerGlobalScope.cpp:
215         (WebCore::ServiceWorkerGlobalScope::create):
216         (WebCore::ServiceWorkerGlobalScope::ServiceWorkerGlobalScope):
217         * workers/service/ServiceWorkerGlobalScope.h:
218         * workers/service/ServiceWorkerProvider.cpp:
219         (WebCore::ServiceWorkerProvider::mayHaveServiceWorkerRegisteredForOrigin):
220         (WebCore::ServiceWorkerProvider::registerServiceWorkerClients):
221         * workers/service/ServiceWorkerProvider.h:
222         * workers/service/WorkerSWClientConnection.cpp:
223         (WebCore::WorkerSWClientConnection::WorkerSWClientConnection):
224         (WebCore::WorkerSWClientConnection::matchRegistration):
225         (WebCore::WorkerSWClientConnection::getRegistrations):
226         (WebCore::WorkerSWClientConnection::whenRegistrationReady):
227         (WebCore::WorkerSWClientConnection::addServiceWorkerRegistrationInServer):
228         (WebCore::WorkerSWClientConnection::removeServiceWorkerRegistrationInServer):
229         (WebCore::WorkerSWClientConnection::didResolveRegistrationPromise):
230         (WebCore::WorkerSWClientConnection::postMessageToServiceWorker):
231         (WebCore::WorkerSWClientConnection::serverConnectionIdentifier const):
232         (WebCore::WorkerSWClientConnection::syncTerminateWorker):
233         (WebCore::WorkerSWClientConnection::registerServiceWorkerClient):
234         (WebCore::WorkerSWClientConnection::finishFetchingScriptInServer):
235         (WebCore::WorkerSWClientConnection::scheduleJob):
236         * workers/service/WorkerSWClientConnection.h:
237         * workers/service/context/ServiceWorkerThread.cpp:
238         (WebCore::ServiceWorkerThread::ServiceWorkerThread):
239         (WebCore::ServiceWorkerThread::createWorkerGlobalScope):
240         * workers/service/context/ServiceWorkerThread.h:
241         * workers/service/context/ServiceWorkerThreadProxy.cpp:
242         (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):
243         * workers/service/context/ServiceWorkerThreadProxy.h:
244         * worklets/WorkletGlobalScope.h:
245         (WebCore::WorkletGlobalScope::sessionID const):
246         * xml/DOMParser.cpp:
247         (WebCore::DOMParser::parseFromString):
248         * xml/DOMParser.h:
249         * xml/DOMParser.idl:
250         * xml/XMLHttpRequest.cpp:
251
252 2019-09-19  Said Abou-Hallawa  <sabouhallawa@apple.com>
253
254         [SVG2]: Add auto behavior for rx and ry to the SVG <ellipse> and<rect> elements
255         https://bugs.webkit.org/show_bug.cgi?id=199843
256
257         Reviewed by Simon Fraser, Nikolas Zimmermann.
258
259         The specification is: https://www.w3.org/TR/SVG2/geometry.html#RxProperty.
260
261         Change the initial value of rx and ry to be "auto". Change the parser to
262         parse LengthOrAuto for these properties. Handle the case if one of them
263         is missing.
264
265         Tests: svg/custom/ellipse-radius-auto-dynamic.svg
266                svg/custom/ellipse-radius-auto-initial.svg
267                svg/custom/ellipse-radius-length-initial.svg
268                svg/custom/rect-radius-auto-dynamic.svg
269                svg/custom/rect-radius-auto-initial.svg
270                svg/custom/rect-radius-length-initial.svg
271
272         * css/CSSProperties.json:
273         * css/parser/CSSPropertyParser.cpp:
274         (WebCore::consumeRxOrRy):
275         * rendering/style/RenderStyle.h:
276         (WebCore::RenderStyle::initialRadius):
277         * rendering/style/SVGRenderStyleDefs.cpp:
278         (WebCore::StyleLayoutData::StyleLayoutData):
279         * rendering/svg/RenderSVGEllipse.cpp:
280         (WebCore::RenderSVGEllipse::calculateRadiiAndCenter):
281
282 2019-09-19  Peng Liu  <peng.liu6@apple.com>
283
284         HTMLVideoElement with a broken poster image will take square dimension
285         https://bugs.webkit.org/show_bug.cgi?id=174122
286         <rdar://problem/33121806>
287
288         Reviewed by Daniel Bates.
289
290         For a video element, if only the width attribute is given and the height attribute is missing,
291         an invalid poster image will make its aspect ratio to be 1, which is the historical WebKit behavior
292         if we're painting alt text and/or a broken image. This fix prevents that behavior to impact video elements.
293
294         We add a virtual function shouldDisplayBrokenImageIcon() to RenderImage and it will return true
295         only when the image source is given but cannot be downloaded. RenderMedia overrides this virtual function
296         and always return false because it never shows the broken image icon. RenderVideo inherits
297         that behavior from RenderMedia.
298
299         Then, in RenderImage::computeIntrinsicRatioInformation(), we only set the aspect ratio to 1
300         when we need to show the broken image icon. It is the historical WebKit behavior that we want to keep
301         for image element, but we also want to avoid its impact (this bug) on video elements.
302
303         We also replace the imageResource().errorOccurred() with shouldDisplayBrokenImageIcon() in
304         TreeBuilder::createLayoutBox() for the same reason.
305
306         The logic to display the broken image icon in RenderImage::renderReplaced() is also cleaned up.
307
308         Test: media/video-poster-not-found.html
309
310         * layout/layouttree/LayoutTreeBuilder.cpp:
311         (WebCore::Layout::TreeBuilder::createLayoutBox):
312         * rendering/RenderImage.cpp:
313         (WebCore::RenderImage::shouldDisplayBrokenImageIcon const):
314         (WebCore::RenderImage::paintReplaced):
315         (WebCore::RenderImage::computeIntrinsicRatioInformation const):
316         * rendering/RenderImage.h:
317         * rendering/RenderMedia.h:
318
319 2019-09-19  Antti Koivisto  <antti@apple.com>
320
321         Turn static DocumentRuleSets::s_isInvalidatingStyleWithRuleSets assertion bit into a member
322         https://bugs.webkit.org/show_bug.cgi?id=201985
323         <rdar://problem/54851871>
324
325         Reviewed by Zalan Bujtas.
326
327         This assert bit was catching cases that are not dangerous. Turn it into a member to narrow the scope.
328
329         * css/DocumentRuleSets.cpp:
330         (WebCore::DocumentRuleSets::~DocumentRuleSets):
331         (WebCore::DocumentRuleSets::collectFeatures const):
332         (): Deleted.
333         * css/DocumentRuleSets.h:
334         (WebCore::DocumentRuleSets::isInvalidatingStyleWithRuleSets):
335         * style/AttributeChangeInvalidation.cpp:
336         (WebCore::Style::AttributeChangeInvalidation::invalidateStyleWithRuleSets):
337         * style/ClassChangeInvalidation.cpp:
338         (WebCore::Style::ClassChangeInvalidation::invalidateStyleWithRuleSets):
339
340 2019-09-19  Zalan Bujtas  <zalan@apple.com>
341
342         [LFC] Remove redundant Layout::Box::ElementTypes
343         https://bugs.webkit.org/show_bug.cgi?id=201963
344
345         Reviewed by Antti Koivisto.
346
347         These types can be solved through RenderStyle.
348
349         * layout/layouttree/LayoutBox.cpp:
350         (WebCore::Layout::Box::isPaddingApplicable const):
351         * layout/layouttree/LayoutBox.h:
352         (WebCore::Layout::Box::isTableHeader const):
353         (WebCore::Layout::Box::isTableBody const):
354         (WebCore::Layout::Box::isTableFooter const):
355         (WebCore::Layout::Box::isTableRow const):
356         (WebCore::Layout::Box::isTableColumnGroup const):
357         (WebCore::Layout::Box::isTableColumn const):
358         (WebCore::Layout::Box::isTableCell const):
359         * layout/layouttree/LayoutTreeBuilder.cpp:
360         (WebCore::Layout::TreeBuilder::createLayoutBox):
361         * page/FrameViewLayoutContext.cpp:
362         (WebCore::layoutUsingFormattingContext):
363
364 2019-09-19  Zalan Bujtas  <zalan@apple.com>
365
366         [LFC][IFC] InlineFormattingContext::InlineLayout should not need to call LayoutState::establishedFormattingState
367         https://bugs.webkit.org/show_bug.cgi?id=201972
368         <rdar://problem/55505869>
369
370         Reviewed by Antti Koivisto.
371
372         InlineLayout has access to InlineFormattingContext, so it should just query it instead of calling LayoutState::establishedFormattingState.
373
374         * layout/inlineformatting/InlineFormattingContext.h:
375         (WebCore::Layout::InlineFormattingContext::InlineLayout::formattingContext const):
376         (WebCore::Layout::InlineFormattingContext::InlineLayout::formattingState):
377         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
378         (WebCore::Layout::InlineFormattingContext::InlineLayout::InlineLayout):
379         (WebCore::Layout::InlineFormattingContext::InlineLayout::layout):
380         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
381         (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const): Deleted.
382         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const): Deleted.
383
384 2019-09-19  Zalan Bujtas  <zalan@apple.com>
385
386         [LFC] FloatingContext should take the root container.
387         https://bugs.webkit.org/show_bug.cgi?id=201968
388         <rdar://problem/55505090>
389
390         Reviewed by Antti Koivisto.
391
392         Now FormattingContext::root() does not need to be public anymore.
393
394         * layout/FormattingContext.h:
395         (WebCore::Layout::FormattingContext::root const):
396         * layout/blockformatting/BlockFormattingContext.cpp:
397         (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
398         * layout/floats/FloatingContext.cpp:
399         (WebCore::Layout::FloatingContext::FloatingContext):
400         (WebCore::Layout::FloatingContext::mapPointFromFormattingContextRootToFloatingStateRoot const):
401         * layout/floats/FloatingContext.h:
402         (WebCore::Layout::FloatingContext::root const):
403         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
404         (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
405         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
406
407 2019-09-18  Brent Fulgham  <bfulgham@apple.com>
408
409         [FTW] Correct ImageBufferData and clear operations
410         https://bugs.webkit.org/show_bug.cgi?id=201862
411
412         Reviewed by Fujii Hironori.
413
414         This patch corrects several problems in the canvas implementation:
415         1. The implementation of ImageBufferDataDirect2D did not properly handle the case of a
416            'getData' request for less than the size of the full bitmap.
417         2. The implementation of 'Clear' was not correct when the size of the region to be
418            cleared is less than the size of the render target.
419         3. 'endDraw' fails if any clip regions are active at the end of the operation. The
420            stack needs to be unwound when endDraw is called.
421
422         This patch corrects all three problems.
423
424         Tested by canvas LayoutTests.
425
426         * platform/graphics/win/Direct2DOperations.cpp:
427         (WebCore::Direct2D::clearRect): Correct partial render target case.
428         * platform/graphics/win/ImageBufferDataDirect2D.cpp:
429         (WebCore::ImageBufferData::getData const): Correct partial buffer case.
430         (WebCore::ImageBufferData::putData): Ditto.
431         (WebCore::ImageBufferData::readDataFromBitmapIfNeeded): Added.
432         (WebCore::copyRectFromSourceToDest): Added.
433         (WebCore::ImageBufferData::copyRectFromSourceToData): Added.
434         * platform/graphics/win/PlatformContextDirect2D.cpp:
435         (WebCore::PlatformContextDirect2D::endDraw): Correct failures caused by
436         dangling clip regions when 'endDraw' is called.
437         (WebCore::PlatformContextDirect2D::flush): Don't call post-draw observer;
438         this is already handled in the draw operations, and endDraw.
439         (WebCore::PlatformContextDirect2D::restore): Recognize that the clip
440         and transparency stack might be empty when restore is called.
441
442 2019-09-18  Andy Estes  <aestes@apple.com>
443
444         Unreviewed, fixed a crash in ssl/applepay/ApplePayCancelEvent.https.html
445
446         After r250060 (which landed very shortly after the patch that introduced ApplePayCancelEvent),
447         all Events must be IsoHeap-ed. ApplePayCancelEvent was not IsoHeap-ed, and so this caused
448         assertion failures in ssl/applepay/ApplePayCancelEvent.https.html.
449         
450         Added the WTF_MAKE_ISO_ALLOCATED macros to ApplePayCancelEvent without a review to stop the
451         test from failing in EWS.
452
453         * Modules/applepay/ApplePayCancelEvent.cpp:
454         * Modules/applepay/ApplePayCancelEvent.h:
455
456 2019-09-18  Chris Dumez  <cdumez@apple.com>
457
458         WebSocketStream does not need a SessionID
459         https://bugs.webkit.org/show_bug.cgi?id=201960
460
461         Reviewed by Geoffrey Garen.
462
463         WebSocketStream does not need a SessionID, now that we have a single session per WebProcess.
464
465         * platform/network/cf/SocketStreamHandleImpl.h:
466         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
467         (WebCore::SocketStreamHandleImpl::SocketStreamHandleImpl):
468
469 2019-09-18  Chris Dumez  <cdumez@apple.com>
470
471         LibWebRTCProvider does not need sessionIDs anymore
472         https://bugs.webkit.org/show_bug.cgi?id=201959
473
474         Reviewed by Geoffrey Garen.
475
476         LibWebRTCProvider does not need sessionIDs anymore, now that we have a single session per WebProcess.
477
478         * Modules/mediastream/PeerConnectionBackend.cpp:
479         (WebCore::PeerConnectionBackend::registerMDNSName):
480         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
481         (WebCore::LibWebRTCMediaEndpoint::setConfiguration):
482         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
483
484 2019-09-18  Zalan Bujtas  <zalan@apple.com>
485
486         [LFC] FormattingContext::Geometry/MarginCollapse/Quirk classes should not need to access non-const Display::Box
487         https://bugs.webkit.org/show_bug.cgi?id=201944
488         <rdar://problem/55493279>
489
490         Reviewed by Antti Koivisto.
491
492         This patch improves const correctness so that the Geometry/MarginCollapse/Quirk objects could not access non-const Display::Boxes (to mutate the display tree).
493         (The MarginCollapse::Update* functions are about updating the margin values on previously processed boxes so strictly speaking they are not margin collapsing related, but they somewhat belong to the MarginCollapse class -since they deal with margins.)
494
495         * layout/FormattingContext.h:
496         (WebCore::Layout::FormattingContext::formattingState const):
497         (WebCore::Layout::FormattingContext::formattingState):
498         * layout/FormattingState.cpp:
499         (WebCore::Layout::FormattingState::displayBox):
500         (WebCore::Layout::FormattingState::displayBox const): Deleted.
501         * layout/FormattingState.h:
502         * layout/blockformatting/BlockFormattingContext.cpp:
503         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
504         * layout/blockformatting/BlockFormattingContext.h:
505         (WebCore::Layout::BlockFormattingContext::formattingState const):
506         (WebCore::Layout::BlockFormattingContext::formattingState):
507         * layout/blockformatting/BlockMarginCollapse.cpp:
508         (WebCore::Layout::BlockFormattingContext::MarginCollapse::updateMarginAfterForPreviousSibling):
509         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues const):
510         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginBefore const):
511         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginAfter const):
512         (WebCore::Layout::BlockFormattingContext::MarginCollapse::updatePositiveNegativeMarginValues):
513         (WebCore::Layout::BlockFormattingContext::MarginCollapse::updateMarginAfterForPreviousSibling const): Deleted.
514         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues): Deleted.
515         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginBefore): Deleted.
516         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginAfter): Deleted.
517         * layout/inlineformatting/InlineFormattingContext.cpp:
518         (WebCore::Layout::InlineFormattingContext::collectInlineContent):
519         (WebCore::Layout::InlineFormattingContext::collectInlineContent const): Deleted.
520         * layout/inlineformatting/InlineFormattingContext.h:
521         (WebCore::Layout::InlineFormattingContext::formattingState const):
522         (WebCore::Layout::InlineFormattingContext::formattingState):
523         * layout/tableformatting/TableFormattingContext.h:
524         (WebCore::Layout::TableFormattingContext::formattingState const):
525         (WebCore::Layout::TableFormattingContext::formattingState):
526
527 2019-09-18  Chris Dumez  <cdumez@apple.com>
528
529         BlobRegistry no longer needs SessionIDs
530         https://bugs.webkit.org/show_bug.cgi?id=201936
531
532         Reviewed by Geoffrey Garen.
533
534         BlobRegistry no longer needs SessionIDs, now that we have a single session per WebProcess.
535
536         * Modules/entriesapi/DOMFileSystem.cpp:
537         (WebCore::DOMFileSystem::getFile):
538         * Modules/entriesapi/DOMFileSystem.h:
539         * Modules/entriesapi/FileSystemFileEntry.cpp:
540         (WebCore::FileSystemFileEntry::file):
541         * Modules/entriesapi/FileSystemFileEntry.h:
542         * Modules/entriesapi/FileSystemFileEntry.idl:
543         * Modules/fetch/FetchBody.cpp:
544         (WebCore::FetchBody::fromFormData):
545         * Modules/fetch/FetchBody.h:
546         * Modules/fetch/FetchBodyConsumer.cpp:
547         (WebCore::blobFromData):
548         (WebCore::resolveWithTypeAndData):
549         (WebCore::FetchBodyConsumer::resolve):
550         (WebCore::FetchBodyConsumer::takeAsBlob):
551         * Modules/fetch/FetchBodyConsumer.h:
552         * Modules/fetch/FetchBodyOwner.cpp:
553         (WebCore::FetchBodyOwner::blob):
554         * Modules/fetch/FetchLoader.cpp:
555         (WebCore::FetchLoader::~FetchLoader):
556         (WebCore::FetchLoader::startLoadingBlobURL):
557         * Modules/fetch/FetchLoader.h:
558         * Modules/indexeddb/IDBTransaction.cpp:
559         (WebCore::IDBTransaction::putOrAddOnServer):
560         * Modules/mediarecorder/MediaRecorder.cpp:
561         (WebCore::MediaRecorder::createRecordingDataBlob):
562         * Modules/mediasource/MediaSourceRegistry.cpp:
563         (WebCore::MediaSourceRegistry::unregisterURL):
564         * Modules/mediasource/MediaSourceRegistry.h:
565         * Modules/mediastream/RTCDataChannel.cpp:
566         (WebCore::RTCDataChannel::didReceiveRawData):
567         * Modules/websockets/WebSocket.cpp:
568         (WebCore::WebSocket::didReceiveBinaryData):
569         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
570         (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
571         * bindings/js/SerializedScriptValue.cpp:
572         (WebCore::CloneDeserializer::readFile):
573         (WebCore::CloneDeserializer::readTerminal):
574         (WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDB):
575         (WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDBSynchronously):
576         * bindings/js/SerializedScriptValue.h:
577         * dom/DataTransfer.cpp:
578         (WebCore::DataTransfer::DataTransfer):
579         (WebCore::DataTransfer::createForCopyAndPaste):
580         (WebCore::DataTransfer::filesFromPasteboardAndItemList const):
581         (WebCore::DataTransfer::createForInputEvent):
582         (WebCore::DataTransfer::createForDrag):
583         (WebCore::DataTransfer::createForDragStartEvent):
584         (WebCore::DataTransfer::createForDrop):
585         (WebCore::DataTransfer::createForUpdatingDropTarget):
586         * dom/DataTransfer.h:
587         * editing/ReplaceRangeWithTextCommand.cpp:
588         (WebCore::ReplaceRangeWithTextCommand::inputEventDataTransfer const):
589         * editing/ReplaceSelectionCommand.cpp:
590         (WebCore::ReplaceSelectionCommand::inputEventDataTransfer const):
591         * editing/SpellingCorrectionCommand.cpp:
592         (WebCore::SpellingCorrectionCommand::inputEventDataTransfer const):
593         * editing/TypingCommand.cpp:
594         (WebCore::TypingCommand::inputEventDataTransfer const):
595         * editing/WebCorePasteboardFileReader.cpp:
596         (WebCore::WebCorePasteboardFileReader::readFilename):
597         (WebCore::WebCorePasteboardFileReader::readBuffer):
598         * editing/WebCorePasteboardFileReader.h:
599         * editing/cocoa/WebContentReaderCocoa.mm:
600         (WebCore::createFragmentForImageAttachment):
601         (WebCore::replaceRichContentWithAttachments):
602         (WebCore::createFragmentAndAddResources):
603         (WebCore::sanitizeMarkupWithArchive):
604         (WebCore::WebContentReader::readImage):
605         (WebCore::attachmentForFilePath):
606         (WebCore::attachmentForData):
607         * editing/markup.cpp:
608         (WebCore::restoreAttachmentElementsInFragment):
609         * fileapi/Blob.cpp:
610         (WebCore::BlobURLRegistry::registerURL):
611         (WebCore::BlobURLRegistry::unregisterURL):
612         (WebCore::Blob::Blob):
613         (WebCore::Blob::~Blob):
614         * fileapi/Blob.h:
615         (WebCore::Blob::create):
616         (WebCore::Blob::deserialize):
617         (WebCore::Blob::slice const):
618         * fileapi/Blob.idl:
619         * fileapi/File.cpp:
620         (WebCore::File::createWithRelativePath):
621         (WebCore::File::create):
622         (WebCore::File::File):
623         * fileapi/File.h:
624         * fileapi/File.idl:
625         * fileapi/FileReaderLoader.cpp:
626         (WebCore::FileReaderLoader::~FileReaderLoader):
627         (WebCore::FileReaderLoader::start):
628         * fileapi/FileReaderLoader.h:
629         * fileapi/ThreadableBlobRegistry.cpp:
630         (WebCore::ThreadableBlobRegistry::registerFileBlobURL):
631         (WebCore::ThreadableBlobRegistry::registerBlobURL):
632         (WebCore::ThreadableBlobRegistry::registerBlobURLOptionallyFileBacked):
633         (WebCore::ThreadableBlobRegistry::registerBlobURLForSlice):
634         (WebCore::ThreadableBlobRegistry::unregisterBlobURL):
635         * fileapi/ThreadableBlobRegistry.h:
636         * html/FileInputType.cpp:
637         (WebCore::FileInputType::appendFormData const):
638         (WebCore::FileInputType::filesChosen):
639         * html/FileListCreator.cpp:
640         (WebCore::appendDirectoryFiles):
641         (WebCore::FileListCreator::FileListCreator):
642         (WebCore::FileListCreator::createFileList):
643         * html/FileListCreator.h:
644         (WebCore::FileListCreator::create):
645         * html/HTMLAttachmentElement.cpp:
646         (WebCore::HTMLAttachmentElement::updateEnclosingImageWithData):
647         * html/HTMLCanvasElement.cpp:
648         (WebCore::HTMLCanvasElement::toBlob):
649         * html/PublicURLManager.cpp:
650         (WebCore::PublicURLManager::revoke):
651         (WebCore::PublicURLManager::stop):
652         * html/URLRegistry.h:
653         * loader/PolicyChecker.cpp:
654         (WebCore::PolicyChecker::extendBlobURLLifetimeIfNecessary const):
655         * page/EventHandler.cpp:
656         (WebCore::EventHandler::handleDrag):
657         * platform/network/BlobRegistry.h:
658         * testing/Internals.cpp:
659         (WebCore::Internals::createFile):
660         * testing/ServiceWorkerInternals.cpp:
661         (WebCore::ServiceWorkerInternals::createOpaqueWithBlobBodyResponse):
662         * workers/service/context/ServiceWorkerFetch.cpp:
663         (WebCore::ServiceWorkerFetch::dispatchFetchEvent):
664         * xml/XMLHttpRequest.cpp:
665         (WebCore::XMLHttpRequest::createResponseBlob):
666
667 2019-09-18  Yusuke Suzuki  <ysuzuki@apple.com>
668
669         Make all ScriptWrappable IsoHeap-ed
670         https://bugs.webkit.org/show_bug.cgi?id=201846
671         <rdar://problem/55407535>
672
673         Reviewed by Mark Lam.
674
675         This patch puts Event and derived classes under IsoHeap to make all ScriptWrappable classes IsoHeap-ed.
676
677         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp:
678         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
679         (WebCore::WebKitPlaybackTargetAvailabilityEvent::create): Deleted.
680         (WebCore::WebKitPlaybackTargetAvailabilityEvent::availability const): Deleted.
681         * Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp:
682         * Modules/applepay/ApplePayPaymentAuthorizedEvent.h:
683         * Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp:
684         * Modules/applepay/ApplePayPaymentMethodSelectedEvent.h:
685         (WebCore::ApplePayPaymentMethodSelectedEvent::create): Deleted.
686         (WebCore::ApplePayPaymentMethodSelectedEvent::paymentMethod): Deleted.
687         * Modules/applepay/ApplePayShippingContactSelectedEvent.cpp:
688         * Modules/applepay/ApplePayShippingContactSelectedEvent.h:
689         * Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp:
690         * Modules/applepay/ApplePayShippingMethodSelectedEvent.h:
691         * Modules/applepay/ApplePayValidateMerchantEvent.cpp:
692         * Modules/applepay/ApplePayValidateMerchantEvent.h:
693         (WebCore::ApplePayValidateMerchantEvent::create): Deleted.
694         (WebCore::ApplePayValidateMerchantEvent::validationURL const): Deleted.
695         * Modules/encryptedmedia/MediaKeyMessageEvent.cpp:
696         * Modules/encryptedmedia/MediaKeyMessageEvent.h:
697         * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp:
698         * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.h:
699         (WebCore::WebKitMediaKeyMessageEvent::create): Deleted.
700         (WebCore::WebKitMediaKeyMessageEvent::message const): Deleted.
701         (WebCore::WebKitMediaKeyMessageEvent::destinationURL const): Deleted.
702         * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp:
703         * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.h:
704         (WebCore::WebKitMediaKeyNeededEvent::create): Deleted.
705         (WebCore::WebKitMediaKeyNeededEvent::initData const): Deleted.
706         * Modules/gamepad/GamepadEvent.cpp:
707         * Modules/gamepad/GamepadEvent.h:
708         (WebCore::GamepadEvent::create): Deleted.
709         (WebCore::GamepadEvent::gamepad const): Deleted.
710         * Modules/indexeddb/IDBRequestCompletionEvent.cpp:
711         * Modules/indexeddb/IDBRequestCompletionEvent.h:
712         (WebCore::IDBRequestCompletionEvent::create): Deleted.
713         * Modules/indexeddb/IDBVersionChangeEvent.cpp:
714         * Modules/indexeddb/IDBVersionChangeEvent.h:
715         * Modules/mediarecorder/BlobEvent.cpp:
716         * Modules/mediarecorder/BlobEvent.h:
717         * Modules/mediarecorder/MediaRecorderErrorEvent.cpp:
718         * Modules/mediarecorder/MediaRecorderErrorEvent.h:
719         * Modules/mediastream/MediaStreamTrackEvent.cpp:
720         * Modules/mediastream/MediaStreamTrackEvent.h:
721         * Modules/mediastream/OverconstrainedErrorEvent.cpp: Copied from Source/WebCore/Modules/mediarecorder/BlobEvent.h.
722         * Modules/mediastream/OverconstrainedErrorEvent.h:
723         (WebCore::OverconstrainedErrorEvent::create): Deleted.
724         (WebCore::OverconstrainedErrorEvent::error const): Deleted.
725         (WebCore::OverconstrainedErrorEvent::OverconstrainedErrorEvent): Deleted.
726         * Modules/mediastream/RTCDTMFToneChangeEvent.cpp:
727         * Modules/mediastream/RTCDTMFToneChangeEvent.h:
728         * Modules/mediastream/RTCDataChannelEvent.cpp:
729         * Modules/mediastream/RTCDataChannelEvent.h:
730         * Modules/mediastream/RTCPeerConnectionIceEvent.cpp:
731         * Modules/mediastream/RTCPeerConnectionIceEvent.h:
732         (WebCore::RTCPeerConnectionIceEvent::url const): Deleted.
733         * Modules/mediastream/RTCTrackEvent.cpp:
734         * Modules/mediastream/RTCTrackEvent.h:
735         (WebCore::RTCTrackEvent::receiver const): Deleted.
736         (WebCore::RTCTrackEvent::track const): Deleted.
737         (WebCore::RTCTrackEvent::streams const): Deleted.
738         (WebCore::RTCTrackEvent::transceiver const): Deleted.
739         (WebCore::RTCTrackEvent::eventInterface const): Deleted.
740         * Modules/paymentrequest/MerchantValidationEvent.cpp:
741         * Modules/paymentrequest/MerchantValidationEvent.h:
742         * Modules/paymentrequest/PaymentMethodChangeEvent.cpp:
743         * Modules/paymentrequest/PaymentMethodChangeEvent.h:
744         * Modules/paymentrequest/PaymentRequestUpdateEvent.cpp:
745         * Modules/paymentrequest/PaymentRequestUpdateEvent.h:
746         * Modules/speech/SpeechSynthesisEvent.cpp:
747         * Modules/speech/SpeechSynthesisEvent.h:
748         (WebCore::SpeechSynthesisEvent::charIndex const): Deleted.
749         (WebCore::SpeechSynthesisEvent::elapsedTime const): Deleted.
750         (WebCore::SpeechSynthesisEvent::name const): Deleted.
751         (WebCore::SpeechSynthesisEvent::eventInterface const): Deleted.
752         * Modules/webaudio/AudioProcessingEvent.cpp:
753         * Modules/webaudio/AudioProcessingEvent.h:
754         * Modules/webaudio/OfflineAudioCompletionEvent.cpp:
755         * Modules/webaudio/OfflineAudioCompletionEvent.h:
756         * Modules/webgpu/GPUUncapturedErrorEvent.cpp:
757         * Modules/webgpu/GPUUncapturedErrorEvent.h:
758         * Modules/websockets/CloseEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
759         * Modules/websockets/CloseEvent.h:
760         (WebCore::CloseEvent::create): Deleted.
761         (WebCore::CloseEvent::wasClean const): Deleted.
762         (WebCore::CloseEvent::code const): Deleted.
763         (WebCore::CloseEvent::reason const): Deleted.
764         (WebCore::CloseEvent::CloseEvent): Deleted.
765         * Modules/webvr/VRDisplayEvent.cpp:
766         * Modules/webvr/VRDisplayEvent.h:
767         * Sources.txt:
768         * WebCore.xcodeproj/project.pbxproj:
769         * accessibility/AccessibleSetValueEvent.cpp:
770         * accessibility/AccessibleSetValueEvent.h:
771         (WebCore::AccessibleSetValueEvent::create): Deleted.
772         (WebCore::AccessibleSetValueEvent::value const): Deleted.
773         * animation/AnimationPlaybackEvent.cpp:
774         * animation/AnimationPlaybackEvent.h:
775         * bindings/js/ScriptWrappable.cpp: Copied from Source/WebCore/html/canvas/WebGLContextEvent.cpp.
776         * bindings/js/ScriptWrappable.h:
777         * dom/AnimationEvent.cpp:
778         * dom/AnimationEvent.h:
779         * dom/BeforeLoadEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
780         * dom/BeforeLoadEvent.h:
781         * dom/BeforeTextInsertedEvent.cpp:
782         * dom/BeforeTextInsertedEvent.h:
783         * dom/BeforeUnloadEvent.cpp:
784         * dom/BeforeUnloadEvent.h:
785         * dom/ClipboardEvent.cpp:
786         * dom/ClipboardEvent.h:
787         * dom/CompositionEvent.cpp:
788         * dom/CompositionEvent.h:
789         * dom/CustomEvent.cpp:
790         * dom/CustomEvent.h:
791         * dom/DeviceMotionEvent.cpp:
792         * dom/DeviceMotionEvent.h:
793         * dom/DeviceOrientationEvent.cpp:
794         * dom/DeviceOrientationEvent.h:
795         * dom/ErrorEvent.cpp:
796         * dom/ErrorEvent.h:
797         * dom/Event.cpp:
798         * dom/Event.h:
799         * dom/FocusEvent.cpp:
800         * dom/FocusEvent.h:
801         * dom/HashChangeEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
802         * dom/HashChangeEvent.h:
803         * dom/InputEvent.cpp:
804         * dom/InputEvent.h:
805         * dom/KeyboardEvent.cpp:
806         * dom/KeyboardEvent.h:
807         * dom/MessageEvent.cpp:
808         * dom/MessageEvent.h:
809         * dom/MouseEvent.cpp:
810         * dom/MouseEvent.h:
811         * dom/MouseRelatedEvent.cpp:
812         * dom/MouseRelatedEvent.h:
813         * dom/MutationEvent.cpp:
814         * dom/MutationEvent.h:
815         * dom/OverflowEvent.cpp:
816         * dom/OverflowEvent.h:
817         * dom/PageTransitionEvent.cpp:
818         * dom/PageTransitionEvent.h:
819         * dom/PointerEvent.cpp:
820         * dom/PointerEvent.h:
821         * dom/PopStateEvent.cpp:
822         * dom/PopStateEvent.h:
823         * dom/ProgressEvent.cpp:
824         * dom/ProgressEvent.h:
825         * dom/PromiseRejectionEvent.cpp:
826         * dom/PromiseRejectionEvent.h:
827         * dom/SecurityPolicyViolationEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
828         * dom/SecurityPolicyViolationEvent.h:
829         * dom/TextEvent.cpp:
830         * dom/TextEvent.h:
831         * dom/TouchEvent.cpp:
832         * dom/TouchEvent.h:
833         * dom/TransitionEvent.cpp:
834         * dom/TransitionEvent.h:
835         * dom/UIEvent.cpp:
836         * dom/UIEvent.h:
837         * dom/UIEventWithKeyState.cpp:
838         * dom/UIEventWithKeyState.h:
839         * dom/WebKitAnimationEvent.cpp:
840         * dom/WebKitAnimationEvent.h:
841         * dom/WebKitTransitionEvent.cpp:
842         * dom/WebKitTransitionEvent.h:
843         * dom/WheelEvent.cpp:
844         * dom/WheelEvent.h:
845         * html/MediaEncryptedEvent.cpp:
846         * html/MediaEncryptedEvent.h:
847         * html/canvas/WebGLContextEvent.cpp:
848         * html/canvas/WebGLContextEvent.h:
849         * html/shadow/ProgressShadowElement.h:
850         * html/track/TrackEvent.cpp:
851         * html/track/TrackEvent.h:
852         * storage/StorageEvent.cpp:
853         * storage/StorageEvent.h:
854         (WebCore::StorageEvent::key const): Deleted.
855         (WebCore::StorageEvent::oldValue const): Deleted.
856         (WebCore::StorageEvent::newValue const): Deleted.
857         (WebCore::StorageEvent::url const): Deleted.
858         (WebCore::StorageEvent::storageArea const): Deleted.
859         * svg/SVGFEDistantLightElement.h:
860         * svg/SVGFEFuncAElement.h:
861         * svg/SVGFEFuncBElement.h:
862         * svg/SVGFEFuncGElement.h:
863         * svg/SVGFEFuncRElement.h:
864         * svg/SVGFEPointLightElement.h:
865         * svg/SVGFESpotLightElement.h:
866         * svg/SVGZoomEvent.cpp:
867         * svg/SVGZoomEvent.h:
868         * workers/service/ExtendableEvent.cpp:
869         * workers/service/ExtendableEvent.h:
870         * workers/service/ExtendableMessageEvent.cpp:
871         * workers/service/ExtendableMessageEvent.h:
872         * workers/service/FetchEvent.cpp:
873         * workers/service/FetchEvent.h:
874         * xml/XMLHttpRequestProgressEvent.cpp: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.cpp.
875         * xml/XMLHttpRequestProgressEvent.h:
876         (WebCore::XMLHttpRequestProgressEvent::create): Deleted.
877         (WebCore::XMLHttpRequestProgressEvent::position const): Deleted.
878         (WebCore::XMLHttpRequestProgressEvent::totalSize const): Deleted.
879         (WebCore::XMLHttpRequestProgressEvent::XMLHttpRequestProgressEvent): Deleted.
880
881 2019-09-18  Zalan Bujtas  <zalan@apple.com>
882
883         [LFC] Introduce UsedVerticalValues::Constraints
884         https://bugs.webkit.org/show_bug.cgi?id=201933
885         <rdar://problem/55487485>
886
887         Reviewed by Antti Koivisto.
888
889         UsedVerticalValues::Constraints holds the constraint values ((optional)containing block height and contentbox top) for a particular box geometry computation. 
890         This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
891         See webkit.org/b/201795
892
893         * layout/FormattingContext.cpp:
894         (WebCore::Layout::outOfFlowHorizontalConstraints):
895         (WebCore::Layout::outOfFlowVerticalConstraints):
896         (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
897         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
898         (WebCore::Layout::outOfFlowConstraints): Deleted.
899         * layout/FormattingContext.h:
900         * layout/FormattingContextGeometry.cpp:
901         (WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
902         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
903         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
904         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
905         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
906         * layout/LayoutUnits.cpp:
907         (WebCore::Layout::UsedVerticalValues::Constraints::Constraints):
908         * layout/LayoutUnits.h:
909         (WebCore::Layout::UsedVerticalValues::Constraints::Constraints):
910         (WebCore::Layout::UsedVerticalValues::UsedVerticalValues):
911         * layout/blockformatting/BlockFormattingContext.cpp:
912         (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
913         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
914         * layout/blockformatting/BlockFormattingContext.h:
915         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
916         (WebCore::Layout::BlockFormattingContext::Geometry::staticVerticalPosition const):
917         (WebCore::Layout::BlockFormattingContext::Geometry::staticPosition const):
918         * layout/inlineformatting/InlineFormattingContext.cpp:
919         (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
920         * layout/inlineformatting/InlineFormattingContext.h:
921         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
922         (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin const):
923
924 2019-09-18  Chris Dumez  <cdumez@apple.com>
925
926         Unreviewed, WinCairo build fix after r250045.
927
928         * platform/network/curl/CurlFormDataStream.cpp:
929         (WebCore::CurlFormDataStream::computeContentLength):
930
931 2019-09-18  Zalan Bujtas  <zalan@apple.com>
932
933         [LFC] Add contentbox left constraint to UsedHorizontalValues::Constraints
934         https://bugs.webkit.org/show_bug.cgi?id=201923
935         <rdar://problem/55485796>
936
937         Reviewed by Antti Koivisto.
938
939         Pass in the contentbox left constraint value to the FormattingContext::compute*() functions so that they don't need to read the containg block's geometry.
940         This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
941         See webkit.org/b/201795
942
943         * layout/FormattingContext.cpp:
944         (WebCore::Layout::outOfFlowConstraints):
945         (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
946         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
947         * layout/FormattingContext.h:
948         * layout/FormattingContextGeometry.cpp:
949         (WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):
950         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
951         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
952         * layout/LayoutUnits.cpp:
953         (WebCore::Layout::UsedHorizontalValues::Constraints::Constraints):
954         * layout/LayoutUnits.h:
955         (WebCore::Layout::UsedHorizontalValues::Constraints::Constraints):
956         * layout/blockformatting/BlockFormattingContext.cpp:
957         (WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition):
958         (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
959         * layout/blockformatting/BlockFormattingContext.h:
960         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
961         (WebCore::Layout::BlockFormattingContext::Geometry::staticHorizontalPosition const):
962         (WebCore::Layout::BlockFormattingContext::Geometry::staticPosition const):
963         * layout/inlineformatting/InlineFormattingContext.cpp:
964         (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
965         (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
966         * layout/tableformatting/TableFormattingContext.cpp:
967         (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):
968
969 2019-09-18  Zalan Bujtas  <zalan@apple.com>
970
971         [LFC] Introduce UsedHorizontalValues::Constraints
972         https://bugs.webkit.org/show_bug.cgi?id=201919
973         <rdar://problem/55481927>
974
975         Reviewed by Antti Koivisto.
976
977         UsedHorizontalValues::Constraints holds the constraint values for a particular box geometry computation (currently it only has the horizontal width constraint) 
978
979         * Sources.txt:
980         * WebCore.xcodeproj/project.pbxproj:
981         * layout/FormattingContext.cpp:
982         (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
983         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
984         (WebCore::Layout::FormattingContext::computeBorderAndPadding):
985         * layout/FormattingContextGeometry.cpp:
986         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
987         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
988         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
989         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
990         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
991         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin const):
992         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
993         (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):
994         (WebCore::Layout::FormattingContext::Geometry::computedPadding const):
995         (WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin const):
996         (WebCore::Layout::FormattingContext::Geometry::computedVerticalMargin const):
997         * layout/FormattingContextQuirks.cpp:
998         (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
999         * layout/LayoutUnits.h:
1000         (WebCore::Layout::UsedHorizontalValues::Constraints::Constraints):
1001         (WebCore::Layout::UsedHorizontalValues::UsedHorizontalValues):
1002         * layout/blockformatting/BlockFormattingContext.cpp:
1003         (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
1004         (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
1005         (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
1006         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
1007         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
1008         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
1009         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
1010         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
1011         (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
1012         * layout/blockformatting/BlockMarginCollapse.cpp:
1013         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues):
1014         * layout/floats/FloatingContext.h:
1015         * layout/inlineformatting/InlineFormattingContext.cpp:
1016         (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
1017         (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
1018         (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
1019         (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
1020         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
1021         (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
1022         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
1023         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
1024         * layout/tableformatting/TableFormattingContext.cpp:
1025         (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):
1026
1027 2019-09-18  Andy Estes  <aestes@apple.com>
1028
1029         [Apple Pay] Tell websites why a session was cancelled
1030         https://bugs.webkit.org/show_bug.cgi?id=201912
1031
1032         Reviewed by Brady Eidson.
1033
1034         Added ApplePayCancelEvent as the interface for ApplePaySession's cancel event. This event
1035         object includes a `sessionError` attribute that exposes a Web-safe version of the PassKit
1036         domain error we received from PKPaymentAuthorization(View)Controller. Currently, we report
1037         all errors with code "unknown", but more codes will be added in future patches.
1038
1039         Test: http/tests/ssl/applepay/ApplePayCancelEvent.https.html
1040
1041         * DerivedSources-input.xcfilelist:
1042         * DerivedSources-output.xcfilelist:
1043         * DerivedSources.make:
1044         * Modules/applepay/ApplePayCancelEvent.cpp: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
1045         (WebCore::ApplePayCancelEvent::ApplePayCancelEvent):
1046         (WebCore::ApplePayCancelEvent::sessionError const):
1047         (WebCore::ApplePayCancelEvent::eventInterface const):
1048         * Modules/applepay/ApplePayCancelEvent.h: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
1049         (WebCore::ApplePayCancelEvent::create):
1050         * Modules/applepay/ApplePayCancelEvent.idl: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
1051         * Modules/applepay/ApplePaySession.cpp:
1052         (WebCore::ApplePaySession::didCancelPaymentSession):
1053         * Modules/applepay/ApplePaySession.h:
1054         * Modules/applepay/ApplePaySessionError.h: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
1055         * Modules/applepay/ApplePaySessionError.idl: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
1056         * Modules/applepay/PaymentCoordinator.cpp:
1057         (WebCore::PaymentCoordinator::didCancelPaymentSession):
1058         * Modules/applepay/PaymentCoordinator.h:
1059         * Modules/applepay/PaymentHeaders.h:
1060         * Modules/applepay/PaymentSession.cpp:
1061         * Modules/applepay/PaymentSession.h:
1062         * Modules/applepay/PaymentSessionError.h: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
1063         * Modules/applepay/cocoa/PaymentSessionErrorCocoa.mm: Copied from Source/WebCore/Modules/applepay/PaymentSession.h.
1064         (WebCore::additionalError):
1065         (WebCore::PaymentSessionError::PaymentSessionError):
1066         (WebCore::PaymentSessionError::sessionError const):
1067         (WebCore::PaymentSessionError::platformError const):
1068         (WebCore::PaymentSessionError::unknownError const):
1069         * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
1070         (WebCore::ApplePayPaymentHandler::didCancelPaymentSession):
1071         * Modules/applepay/paymentrequest/ApplePayPaymentHandler.h:
1072         * Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.cpp:
1073         * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
1074         * SourcesCocoa.txt:
1075         * WebCore.xcodeproj/project.pbxproj:
1076         * dom/EventNames.in:
1077         * testing/MockPaymentCoordinator.cpp:
1078         (WebCore::MockPaymentCoordinator::cancelPayment):
1079
1080 2019-09-18  Chris Dumez  <cdumez@apple.com>
1081
1082         WebSWContextManagerConnection::installServiceWorker IPC no longer need a sessionID
1083         https://bugs.webkit.org/show_bug.cgi?id=201882
1084
1085         Reviewed by Geoffrey Garen.
1086
1087         WebSWContextManagerConnection::installServiceWorker IPC no longer need a sessionID now that we have a single
1088         sessionID per WebProcess.
1089
1090         * workers/service/server/SWServer.cpp:
1091         (WebCore::SWServer::installContextData):
1092         (WebCore::SWServer::runServiceWorker):
1093         * workers/service/server/SWServerToContextConnection.h:
1094
1095 2019-09-18  Chris Dumez  <cdumez@apple.com>
1096
1097         CacheStorageProvider::createCacheStorageConnection() does not need to take in a SessionID
1098         https://bugs.webkit.org/show_bug.cgi?id=201920
1099
1100         Reviewed by Geoffrey Garen.
1101
1102         CacheStorageProvider::createCacheStorageConnection() does not need to take in a SessionID.
1103         This sessionID is no longer used now that we have a session per WebProcess.
1104
1105         * Modules/cache/CacheStorageConnection.cpp:
1106         (WebCore::formDataSize):
1107         (WebCore::CacheStorageConnection::computeRealBodySize):
1108         * Modules/cache/CacheStorageConnection.h:
1109         * Modules/cache/DOMWindowCaches.cpp:
1110         (WebCore::DOMWindowCaches::caches const):
1111         * Modules/cache/WorkerCacheStorageConnection.cpp:
1112         (WebCore::WorkerCacheStorageConnection::sessionID const): Deleted.
1113         * Modules/cache/WorkerCacheStorageConnection.h:
1114         * fileapi/Blob.cpp:
1115         (WebCore::Blob::size const):
1116         * fileapi/ThreadableBlobRegistry.cpp:
1117         (WebCore::ThreadableBlobRegistry::blobSize):
1118         * fileapi/ThreadableBlobRegistry.h:
1119         * loader/cache/KeepaliveRequestTracker.cpp:
1120         (WebCore::KeepaliveRequestTracker::tryRegisterRequest):
1121         (WebCore::KeepaliveRequestTracker::registerRequest):
1122         (WebCore::KeepaliveRequestTracker::unregisterRequest):
1123         * page/CacheStorageProvider.h:
1124         (WebCore::CacheStorageProvider::createCacheStorageConnection):
1125         * platform/network/BlobRegistry.h:
1126         * platform/network/FormData.cpp:
1127         (WebCore::FormDataElement::lengthInBytes const):
1128         (WebCore::FormData::lengthInBytes const):
1129         * platform/network/FormData.h:
1130         * testing/Internals.cpp:
1131         (WebCore::Internals::clearCacheStorageMemoryRepresentation):
1132         (WebCore::Internals::cacheStorageEngineRepresentation):
1133         (WebCore::Internals::updateQuotaBasedOnSpaceUsage):
1134         * workers/WorkerMessagingProxy.cpp:
1135         (WebCore::WorkerMessagingProxy::createCacheStorageConnection):
1136         * workers/service/context/ServiceWorkerThreadProxy.cpp:
1137         (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):
1138         (WebCore::ServiceWorkerThreadProxy::createCacheStorageConnection):
1139         * workers/service/context/ServiceWorkerThreadProxy.h:
1140         * xml/XMLHttpRequest.cpp:
1141         (WebCore::XMLHttpRequest::createRequest):
1142
1143 2019-09-18  Chris Dumez  <cdumez@apple.com>
1144
1145         Drop FrameLoaderClient::sessionID()
1146         https://bugs.webkit.org/show_bug.cgi?id=201916
1147
1148         Reviewed by Geoffrey Garen.
1149
1150         Drop FrameLoaderClient::sessionID(). The Frame can get the sessionID from its page (Which is
1151         what the FrameLoaderClient::sessionID() ended up doing) and other call sites at WebKit2 layer
1152         can get the sessionID from the WebProcess singleton.
1153
1154         * loader/EmptyClients.cpp:
1155         * loader/EmptyFrameLoaderClient.h:
1156         * loader/FrameLoaderClient.h:
1157         * page/Frame.cpp:
1158         (WebCore::Frame::sessionID const):
1159
1160 2019-09-18  Chris Dumez  <cdumez@apple.com>
1161
1162         WebSWServerToContextConnection::PostMessageToServiceWorkerClient IPC no longer needs to take a sessionID
1163         https://bugs.webkit.org/show_bug.cgi?id=201883
1164
1165         Reviewed by Geoffrey Garen.
1166
1167         WebSWServerToContextConnection::PostMessageToServiceWorkerClient IPC no longer needs to take a sessionID,
1168         now that we have a single session per WebProcess.
1169
1170         * workers/service/ServiceWorkerClient.cpp:
1171         (WebCore::ServiceWorkerClient::postMessage):
1172         * workers/service/context/SWContextManager.h:
1173
1174 2019-09-18  Russell Epstein  <repstein@apple.com>
1175
1176         Unreviewed, rolling out r250030.
1177
1178         Cause of Recent Build Failures.
1179
1180         Reverted changeset:
1181
1182         "Make all ScriptWrappable IsoHeap-ed"
1183         https://bugs.webkit.org/show_bug.cgi?id=201846
1184         https://trac.webkit.org/changeset/250030
1185
1186 2019-09-18  Zalan Bujtas  <zalan@apple.com>
1187
1188         [LFC] FormattingContext::Geometry::computedHeight* functions need containingBlockHeight only.
1189         https://bugs.webkit.org/show_bug.cgi?id=201880
1190         <rdar://problem/55449623>
1191
1192         Reviewed by Antti Koivisto.
1193
1194         Let's tighten the incoming vertical parameter.
1195
1196         * layout/FormattingContext.cpp:
1197         (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
1198         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
1199         * layout/FormattingContext.h:
1200         * layout/FormattingContextGeometry.cpp:
1201         (WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
1202         (WebCore::Layout::FormattingContext::Geometry::computedMaxHeight const):
1203         (WebCore::Layout::FormattingContext::Geometry::computedMinHeight const):
1204         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
1205         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
1206         (WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
1207         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
1208         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
1209
1210 2019-09-18  Antti Koivisto  <antti@apple.com>
1211
1212         DocumentMarkerController should not invoke ensureLineBoxes during TextIterator traversal
1213         https://bugs.webkit.org/show_bug.cgi?id=201911
1214         <rdar://problem/55455458>
1215
1216         Reviewed by Zalan Bujtas.
1217
1218         DocumentMarkerController::addMarker may call ensureLineBoxes but TextIterator doesn't expect mutations during traversal.
1219         Fix by doing range collection as a separate step.
1220
1221         * dom/DocumentMarkerController.cpp:
1222         (WebCore::DocumentMarkerController::collectTextRanges):
1223         (WebCore::DocumentMarkerController::addMarker):
1224         (WebCore::DocumentMarkerController::addTextMatchMarker):
1225         (WebCore::DocumentMarkerController::addDictationPhraseWithAlternativesMarker):
1226         (WebCore::DocumentMarkerController::addDictationResultMarker):
1227         (WebCore::DocumentMarkerController::addDraggedContentMarker):
1228         (WebCore::DocumentMarkerController::addPlatformTextCheckingMarker):
1229         (WebCore::DocumentMarkerController::removeMarkers):
1230         (WebCore::DocumentMarkerController::filterMarkers):
1231         * dom/DocumentMarkerController.h:
1232
1233 2019-09-18  Zalan Bujtas  <zalan@apple.com>
1234
1235         [LFC] Shrink-to-fit-width needs the available width constraint value only
1236         https://bugs.webkit.org/show_bug.cgi?id=201896
1237         <rdar://problem/55465382>
1238
1239         Reviewed by Antti Koivisto.
1240
1241         * layout/FormattingContext.h:
1242         * layout/FormattingContextGeometry.cpp:
1243         (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
1244         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
1245         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
1246         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
1247         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
1248         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
1249         (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
1250
1251 2019-09-18  David Kilzer  <ddkilzer@apple.com>
1252
1253         REGRESSION (r247566): Leak of UICTFontDescriptor in WebCore::FontDatabase::InstalledFont::InstalledFont()
1254         <https://webkit.org/b/201893>
1255         <rdar://problem/55464115>
1256
1257         Reviewed by Brent Fulgham.
1258
1259         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1260         (WebCore::FontDatabase::InstalledFont::InstalledFont): Use
1261         adoptCF() to fix the leak.
1262
1263 2019-09-18  Yusuke Suzuki  <ysuzuki@apple.com>
1264
1265         Make all ScriptWrappable IsoHeap-ed
1266         https://bugs.webkit.org/show_bug.cgi?id=201846
1267         <rdar://problem/55407535>
1268
1269         Reviewed by Mark Lam.
1270
1271         This patch puts Event and derived classes under IsoHeap to make all ScriptWrappable classes IsoHeap-ed.
1272
1273         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp:
1274         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
1275         (WebCore::WebKitPlaybackTargetAvailabilityEvent::create): Deleted.
1276         (WebCore::WebKitPlaybackTargetAvailabilityEvent::availability const): Deleted.
1277         * Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp:
1278         * Modules/applepay/ApplePayPaymentAuthorizedEvent.h:
1279         * Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp:
1280         * Modules/applepay/ApplePayPaymentMethodSelectedEvent.h:
1281         (WebCore::ApplePayPaymentMethodSelectedEvent::create): Deleted.
1282         (WebCore::ApplePayPaymentMethodSelectedEvent::paymentMethod): Deleted.
1283         * Modules/applepay/ApplePayShippingContactSelectedEvent.cpp:
1284         * Modules/applepay/ApplePayShippingContactSelectedEvent.h:
1285         * Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp:
1286         * Modules/applepay/ApplePayShippingMethodSelectedEvent.h:
1287         * Modules/applepay/ApplePayValidateMerchantEvent.cpp:
1288         * Modules/applepay/ApplePayValidateMerchantEvent.h:
1289         (WebCore::ApplePayValidateMerchantEvent::create): Deleted.
1290         (WebCore::ApplePayValidateMerchantEvent::validationURL const): Deleted.
1291         * Modules/encryptedmedia/MediaKeyMessageEvent.cpp:
1292         * Modules/encryptedmedia/MediaKeyMessageEvent.h:
1293         * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp:
1294         * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.h:
1295         (WebCore::WebKitMediaKeyMessageEvent::create): Deleted.
1296         (WebCore::WebKitMediaKeyMessageEvent::message const): Deleted.
1297         (WebCore::WebKitMediaKeyMessageEvent::destinationURL const): Deleted.
1298         * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp:
1299         * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.h:
1300         (WebCore::WebKitMediaKeyNeededEvent::create): Deleted.
1301         (WebCore::WebKitMediaKeyNeededEvent::initData const): Deleted.
1302         * Modules/gamepad/GamepadEvent.cpp:
1303         * Modules/gamepad/GamepadEvent.h:
1304         (WebCore::GamepadEvent::create): Deleted.
1305         (WebCore::GamepadEvent::gamepad const): Deleted.
1306         * Modules/indexeddb/IDBRequestCompletionEvent.cpp:
1307         * Modules/indexeddb/IDBRequestCompletionEvent.h:
1308         (WebCore::IDBRequestCompletionEvent::create): Deleted.
1309         * Modules/indexeddb/IDBVersionChangeEvent.cpp:
1310         * Modules/indexeddb/IDBVersionChangeEvent.h:
1311         * Modules/mediarecorder/BlobEvent.cpp:
1312         * Modules/mediarecorder/BlobEvent.h:
1313         * Modules/mediarecorder/MediaRecorderErrorEvent.cpp:
1314         * Modules/mediarecorder/MediaRecorderErrorEvent.h:
1315         * Modules/mediastream/MediaStreamTrackEvent.cpp:
1316         * Modules/mediastream/MediaStreamTrackEvent.h:
1317         * Modules/mediastream/OverconstrainedErrorEvent.cpp: Copied from Source/WebCore/Modules/mediastream/RTCDataChannelEvent.h.
1318         * Modules/mediastream/OverconstrainedErrorEvent.h:
1319         (WebCore::OverconstrainedErrorEvent::create): Deleted.
1320         (WebCore::OverconstrainedErrorEvent::error const): Deleted.
1321         (WebCore::OverconstrainedErrorEvent::OverconstrainedErrorEvent): Deleted.
1322         * Modules/mediastream/RTCDTMFToneChangeEvent.cpp:
1323         * Modules/mediastream/RTCDTMFToneChangeEvent.h:
1324         * Modules/mediastream/RTCDataChannelEvent.cpp:
1325         * Modules/mediastream/RTCDataChannelEvent.h:
1326         * Modules/mediastream/RTCPeerConnectionIceEvent.cpp:
1327         * Modules/mediastream/RTCPeerConnectionIceEvent.h:
1328         (WebCore::RTCPeerConnectionIceEvent::url const): Deleted.
1329         * Modules/mediastream/RTCTrackEvent.cpp:
1330         * Modules/mediastream/RTCTrackEvent.h:
1331         (WebCore::RTCTrackEvent::receiver const): Deleted.
1332         (WebCore::RTCTrackEvent::track const): Deleted.
1333         (WebCore::RTCTrackEvent::streams const): Deleted.
1334         (WebCore::RTCTrackEvent::transceiver const): Deleted.
1335         (WebCore::RTCTrackEvent::eventInterface const): Deleted.
1336         * Modules/paymentrequest/MerchantValidationEvent.cpp:
1337         * Modules/paymentrequest/MerchantValidationEvent.h:
1338         * Modules/paymentrequest/PaymentMethodChangeEvent.cpp:
1339         * Modules/paymentrequest/PaymentMethodChangeEvent.h:
1340         * Modules/paymentrequest/PaymentRequestUpdateEvent.cpp:
1341         * Modules/paymentrequest/PaymentRequestUpdateEvent.h:
1342         * Modules/speech/SpeechSynthesisEvent.cpp:
1343         * Modules/speech/SpeechSynthesisEvent.h:
1344         (WebCore::SpeechSynthesisEvent::charIndex const): Deleted.
1345         (WebCore::SpeechSynthesisEvent::elapsedTime const): Deleted.
1346         (WebCore::SpeechSynthesisEvent::name const): Deleted.
1347         (WebCore::SpeechSynthesisEvent::eventInterface const): Deleted.
1348         * Modules/webaudio/AudioProcessingEvent.cpp:
1349         * Modules/webaudio/AudioProcessingEvent.h:
1350         * Modules/webaudio/OfflineAudioCompletionEvent.cpp:
1351         * Modules/webaudio/OfflineAudioCompletionEvent.h:
1352         * Modules/webgpu/GPUUncapturedErrorEvent.cpp:
1353         * Modules/webgpu/GPUUncapturedErrorEvent.h:
1354         * Modules/websockets/CloseEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
1355         * Modules/websockets/CloseEvent.h:
1356         (WebCore::CloseEvent::create): Deleted.
1357         (WebCore::CloseEvent::wasClean const): Deleted.
1358         (WebCore::CloseEvent::code const): Deleted.
1359         (WebCore::CloseEvent::reason const): Deleted.
1360         (WebCore::CloseEvent::CloseEvent): Deleted.
1361         * Modules/webvr/VRDisplayEvent.cpp:
1362         * Modules/webvr/VRDisplayEvent.h:
1363         * Sources.txt:
1364         * WebCore.xcodeproj/project.pbxproj:
1365         * accessibility/AccessibleSetValueEvent.cpp:
1366         * accessibility/AccessibleSetValueEvent.h:
1367         (WebCore::AccessibleSetValueEvent::create): Deleted.
1368         (WebCore::AccessibleSetValueEvent::value const): Deleted.
1369         * animation/AnimationPlaybackEvent.cpp:
1370         * animation/AnimationPlaybackEvent.h:
1371         * bindings/js/ScriptWrappable.cpp: Copied from Source/WebCore/html/canvas/WebGLContextEvent.cpp.
1372         * bindings/js/ScriptWrappable.h:
1373         * dom/AnimationEvent.cpp:
1374         * dom/AnimationEvent.h:
1375         * dom/BeforeLoadEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
1376         * dom/BeforeLoadEvent.h:
1377         * dom/BeforeTextInsertedEvent.cpp:
1378         * dom/BeforeTextInsertedEvent.h:
1379         * dom/BeforeUnloadEvent.cpp:
1380         * dom/BeforeUnloadEvent.h:
1381         * dom/ClipboardEvent.cpp:
1382         * dom/ClipboardEvent.h:
1383         * dom/CompositionEvent.cpp:
1384         * dom/CompositionEvent.h:
1385         * dom/CustomEvent.cpp:
1386         * dom/CustomEvent.h:
1387         * dom/DeviceMotionEvent.cpp:
1388         * dom/DeviceMotionEvent.h:
1389         * dom/DeviceOrientationEvent.cpp:
1390         * dom/DeviceOrientationEvent.h:
1391         * dom/ErrorEvent.cpp:
1392         * dom/ErrorEvent.h:
1393         * dom/Event.cpp:
1394         * dom/Event.h:
1395         * dom/FocusEvent.cpp:
1396         * dom/FocusEvent.h:
1397         * dom/HashChangeEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
1398         * dom/HashChangeEvent.h:
1399         * dom/InputEvent.cpp:
1400         * dom/InputEvent.h:
1401         * dom/KeyboardEvent.cpp:
1402         * dom/KeyboardEvent.h:
1403         * dom/MessageEvent.cpp:
1404         * dom/MessageEvent.h:
1405         * dom/MouseEvent.cpp:
1406         * dom/MouseEvent.h:
1407         * dom/MouseRelatedEvent.cpp:
1408         * dom/MouseRelatedEvent.h:
1409         * dom/MutationEvent.cpp:
1410         * dom/MutationEvent.h:
1411         * dom/OverflowEvent.cpp:
1412         * dom/OverflowEvent.h:
1413         * dom/PageTransitionEvent.cpp:
1414         * dom/PageTransitionEvent.h:
1415         * dom/PointerEvent.cpp:
1416         * dom/PointerEvent.h:
1417         * dom/PopStateEvent.cpp:
1418         * dom/PopStateEvent.h:
1419         * dom/ProgressEvent.cpp:
1420         * dom/ProgressEvent.h:
1421         * dom/PromiseRejectionEvent.cpp:
1422         * dom/PromiseRejectionEvent.h:
1423         * dom/SecurityPolicyViolationEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
1424         * dom/SecurityPolicyViolationEvent.h:
1425         * dom/TextEvent.cpp:
1426         * dom/TextEvent.h:
1427         * dom/TouchEvent.cpp:
1428         * dom/TouchEvent.h:
1429         * dom/TransitionEvent.cpp:
1430         * dom/TransitionEvent.h:
1431         * dom/UIEvent.cpp:
1432         * dom/UIEvent.h:
1433         * dom/UIEventWithKeyState.cpp:
1434         * dom/UIEventWithKeyState.h:
1435         * dom/WebKitAnimationEvent.cpp:
1436         * dom/WebKitAnimationEvent.h:
1437         * dom/WebKitTransitionEvent.cpp:
1438         * dom/WebKitTransitionEvent.h:
1439         * dom/WheelEvent.cpp:
1440         * dom/WheelEvent.h:
1441         * html/MediaEncryptedEvent.cpp:
1442         * html/MediaEncryptedEvent.h:
1443         * html/canvas/WebGLContextEvent.cpp:
1444         * html/canvas/WebGLContextEvent.h:
1445         * html/shadow/ProgressShadowElement.h:
1446         * html/track/TrackEvent.cpp:
1447         * html/track/TrackEvent.h:
1448         * storage/StorageEvent.cpp:
1449         * storage/StorageEvent.h:
1450         (WebCore::StorageEvent::key const): Deleted.
1451         (WebCore::StorageEvent::oldValue const): Deleted.
1452         (WebCore::StorageEvent::newValue const): Deleted.
1453         (WebCore::StorageEvent::url const): Deleted.
1454         (WebCore::StorageEvent::storageArea const): Deleted.
1455         * svg/SVGFEDistantLightElement.h:
1456         * svg/SVGFEFuncAElement.h:
1457         * svg/SVGFEFuncBElement.h:
1458         * svg/SVGFEFuncGElement.h:
1459         * svg/SVGFEFuncRElement.h:
1460         * svg/SVGFEPointLightElement.h:
1461         * svg/SVGFESpotLightElement.h:
1462         * svg/SVGZoomEvent.cpp:
1463         * svg/SVGZoomEvent.h:
1464         * workers/service/ExtendableEvent.cpp:
1465         * workers/service/ExtendableEvent.h:
1466         * workers/service/ExtendableMessageEvent.cpp:
1467         * workers/service/ExtendableMessageEvent.h:
1468         * workers/service/FetchEvent.cpp:
1469         * workers/service/FetchEvent.h:
1470         * xml/XMLHttpRequestProgressEvent.cpp: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.cpp.
1471         * xml/XMLHttpRequestProgressEvent.h:
1472         (WebCore::XMLHttpRequestProgressEvent::create): Deleted.
1473         (WebCore::XMLHttpRequestProgressEvent::position const): Deleted.
1474         (WebCore::XMLHttpRequestProgressEvent::totalSize const): Deleted.
1475         (WebCore::XMLHttpRequestProgressEvent::XMLHttpRequestProgressEvent): Deleted.
1476
1477 2019-09-18  Loïc Yhuel  <loic.yhuel@softathome.com>  and  Fujii Hironori  <Hironori.Fujii@sony.com>
1478
1479         JPEGImageDecoder: use libjpeg-turbo RGBA output path even for Adobe transform=0 JPEGs
1480         https://bugs.webkit.org/show_bug.cgi?id=200163
1481
1482         Reviewed by Carlos Garcia Campos.
1483
1484         Remove the workaround for old libjpeg-turbo which doesn't support
1485         BGRA output for Adobe transform=0 images. The bug was fixed in
1486         libjpeg-turbo 1.2.1.
1487
1488         No new tests, no behavior change.
1489
1490         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
1491         (WebCore::JPEGImageReader::decode): Removed code in #if defined(TURBO_JPEG_RGB_SWIZZLE).
1492         (colorSpaceHasAlpha): Removed an unused inline function.
1493
1494 2019-09-18  Joonghun Park  <jh718.park@samsung.com>
1495
1496         Unreviewed. Remove build warning since r248998.
1497
1498         This patch removes build warning below.
1499         warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
1500
1501         No new tests, no behavioral change.
1502
1503         * platform/image-decoders/png/PNGImageDecoder.cpp:
1504         (WebCore::PNGImageDecoder::rowAvailable):
1505
1506 2019-09-18  Fujii Hironori  <Hironori.Fujii@sony.com>
1507
1508         [cairo] Incorrect targetRect in BackingStoreBackendCairoImpl::scroll
1509         https://bugs.webkit.org/show_bug.cgi?id=201895
1510
1511         Reviewed by Carlos Garcia Campos.
1512
1513         In BackingStoreBackendCairoImpl::scroll, targetRect is calculated
1514         wrongly by shifting maxX and maxY. Bug 59655 fixed the issue by
1515         removing the shifting, but only for BackingStoreBackendCairoX11::scroll.
1516
1517         No new tests, no behavior change.
1518
1519         * platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp:
1520         (WebCore::BackingStoreBackendCairoImpl::scroll): Take intersection of targetRect and scrollRect.
1521
1522 2019-09-18  Andy Estes  <aestes@apple.com>
1523
1524         [Cocoa] Add a WKA extension point
1525         https://bugs.webkit.org/show_bug.cgi?id=201801
1526         <rdar://problem/55372507>
1527
1528         Reviewed by Alexey Proskuryakov.
1529
1530         * Modules/applepay/ApplePayRequestBase.cpp:
1531         (WebCore::requiresSupportedNetworks):
1532         (WebCore::convertAndValidate):
1533
1534 2019-09-17  Chris Dumez  <cdumez@apple.com>
1535
1536         Unreviewed, revert change that Alex mistakenly committed at the same time as r250006 and broke the build.
1537
1538         * page/PerformanceObserver.idl:
1539
1540 2019-09-17  Chris Dumez  <cdumez@apple.com>
1541
1542         Stop calling Page::setSessionID() from WebKit2
1543         https://bugs.webkit.org/show_bug.cgi?id=201888
1544
1545         Reviewed by Alex Christensen.
1546
1547         Stop calling Page::setSessionID() from WebKit2 since Page's sessionID can never change when
1548         using WebKit2 (We process-swap and create a new Page in a new process when changing data
1549         store). Instead, we now pass the sessionID ID when constructing the Page, as part of the
1550         PageConfiguration structure.
1551
1552         * editing/markup.cpp:
1553         (WebCore::createPageForSanitizingWebContent):
1554         * loader/EmptyClients.cpp:
1555         (WebCore::pageConfigurationWithEmptyClients):
1556         * loader/EmptyClients.h:
1557         * page/Page.cpp:
1558         (WebCore::Page::Page):
1559         (WebCore::Page::setSessionID):
1560         * page/PageConfiguration.cpp:
1561         (WebCore::PageConfiguration::PageConfiguration):
1562         * page/PageConfiguration.h:
1563         * svg/graphics/SVGImage.cpp:
1564         (WebCore::SVGImage::dataChanged):
1565         * workers/service/context/ServiceWorkerThreadProxy.cpp:
1566         (WebCore::createPageForServiceWorker):
1567         (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):
1568
1569 2019-09-17  Mark Lam  <mark.lam@apple.com>
1570
1571         Use constexpr instead of const in symbol definitions that are obviously constexpr.
1572         https://bugs.webkit.org/show_bug.cgi?id=201879
1573
1574         Rubber-stamped by Joseph Pecoraro.
1575
1576         No new tests.  Covered by existing tests.
1577
1578         * bindings/js/JSDOMConstructorBase.h:
1579         * bindings/js/JSDOMWindowProperties.h:
1580         * bindings/scripts/CodeGeneratorJS.pm:
1581         (GenerateHeader):
1582         (GeneratePrototypeDeclaration):
1583         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
1584         * bindings/scripts/test/JS/JSTestEnabledBySetting.h:
1585         * bindings/scripts/test/JS/JSTestEnabledForContext.h:
1586         * bindings/scripts/test/JS/JSTestEventTarget.h:
1587         * bindings/scripts/test/JS/JSTestGlobalObject.h:
1588         * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h:
1589         * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h:
1590         * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h:
1591         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h:
1592         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h:
1593         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h:
1594         * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h:
1595         * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h:
1596         * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h:
1597         * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h:
1598         * bindings/scripts/test/JS/JSTestNamedGetterCallWith.h:
1599         * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h:
1600         * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h:
1601         * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h:
1602         * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h:
1603         * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h:
1604         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h:
1605         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h:
1606         * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.h:
1607         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.h:
1608         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.h:
1609         * bindings/scripts/test/JS/JSTestObj.h:
1610         * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
1611         * bindings/scripts/test/JS/JSTestPluginInterface.h:
1612         * bindings/scripts/test/JS/JSTestTypedefs.h:
1613         * bridge/objc/objc_runtime.h:
1614         * bridge/runtime_array.h:
1615         * bridge/runtime_method.h:
1616         * bridge/runtime_object.h:
1617
1618 2019-09-17  Ross Kirsling  <ross.kirsling@sony.com>
1619
1620         Unreviewed restabilization of non-unified build.
1621
1622         * inspector/InspectorCanvas.cpp:
1623         (WebCore::InspectorCanvas::resolveContext const):
1624         * platform/win/BString.h:
1625         * svg/PatternAttributes.h:
1626         * svg/SVGLengthValue.cpp:
1627         * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:
1628         * workers/service/ServiceWorkerJob.cpp:
1629         * workers/service/WorkerSWClientConnection.cpp:
1630         * workers/service/server/SWServerRegistration.cpp:
1631
1632 2019-09-17  Keith Rollin  <krollin@apple.com>
1633
1634         Remove some support for < iOS 12
1635         https://bugs.webkit.org/show_bug.cgi?id=201851
1636         <rdar://problem/55422044>
1637
1638         Reviewed by Jiewen Tan and Alexey Proskuryakov.
1639
1640         Remove some support for iOS versions less than 12.0.
1641
1642         Update conditionals that reference __IPHONE_OS_VERSION_MIN_REQUIRED
1643         and __IPHONE_OS_VERSION_MAX_ALLOWED, assuming that they both have
1644         values >= 120000. This means that expressions like
1645         "__IPHONE_OS_VERSION_MIN_REQUIRED < 101200" are always False and
1646         "__IPHONE_OS_VERSION_MIN_REQUIRED >= 101200" are always True.
1647
1648         This removal is part of a series of patches effecting such removal.
1649
1650         No new tests -- no new or changed functionality.
1651
1652         * crypto/mac/CryptoKeyRSAMac.cpp:
1653         (WebCore::CryptoKeyRSA::create):
1654         (WebCore::castDataArgumentToCCRSACryptorCreateFromDataIfNeeded): Deleted.
1655
1656 2019-09-17  Nikolas Zimmermann  <zimmermann@kde.org>
1657
1658         SVG <animateMotion> does not reset the element to its first animation frame if its fill is "remove"
1659         https://bugs.webkit.org/show_bug.cgi?id=201565
1660
1661         Reviewed by Said Abou-Hallawa.
1662
1663         Fix fill="remove" support for <animateMotion>: properly trigger visual updates.
1664         Motion animations are implemented by provding an additional transformation on
1665         SVGGraphicsElements: the supplementalTransform().
1666
1667         When an <animateMotion> element specifies fill="remove" the supplemental transform is
1668         correctly reset, when the animation is finished. However, nobody is notified about the
1669         change of transformation matrix. Fix by marking the target elements renderer as
1670         setNeedsTransformUpdate() and call markForLayoutAndParentResourceInvalidation().
1671
1672         <animate> elements are not affected by the bug:
1673         SVGAnimateElementBase::clearAnimatedType()
1674          -> invokes SVGAttributeAnimator::stop()
1675             -> invokes applyAnimatedPropertyChange() [via SVGAnimatedPropertyAnimator]
1676             -> invokes SVGXXXElement::svgAttributeChanged().
1677
1678         When animating e.g. the 'transform' attribute SVGGraphicsElement::svgAttributeChanged()
1679         will use exactly the same mechanism to trigger visul updates: first call
1680         setNeedsTransformUpdate() on the associated renderer, followd by a call to
1681         markForLayoutAndParentResourceInvalidation().
1682
1683         --> Both code paths are now consistent.
1684         Also fixes http://web-platform-tests.live/svg/animations/animateMotion-fill-remove.html.
1685
1686         Tests: svg/animations/fill-remove-support.html
1687                svg/animations/animateMotion-remove-freeze-use.svg
1688
1689         * svg/SVGAnimateMotionElement.cpp:
1690         (WebCore::SVGAnimateMotionElement::clearAnimatedType): Call applyResultsToTarget().
1691         (WebCore::SVGAnimateMotionElement::calculateAnimatedValue): Stop calling
1692         setNeedsTransformUpdate() on the target elements renderer, since applyResultsToTarget()
1693         is responsible for modifications of the renderer state.
1694         (WebCore::SVGAnimateMotionElement::applyResultsToTarget): Always mark the renderer
1695         as setNeedsTransformUpdate() when applying the results, before the call to
1696         RenderSVGResource::markForLayoutAndParentResourceInvalidation(). This is more consistent
1697         with respect to the code path that updates the SVGElements instances (<use> support).
1698
1699 2019-09-17  Andy Estes  <aestes@apple.com>
1700
1701         [Cocoa] Add a WKA extension point
1702         https://bugs.webkit.org/show_bug.cgi?id=201801
1703         <rdar://problem/55372507>
1704
1705         Reviewed by Alexey Proskuryakov.
1706
1707         * Modules/applepay/ApplePayRequestBase.cpp:
1708         (WebCore::requiresSupportedNetworks):
1709         (WebCore::convertAndValidate):
1710
1711 2019-09-17  Antti Koivisto  <antti@apple.com>
1712
1713         TextIterator should convert tabs to spaces
1714         https://bugs.webkit.org/show_bug.cgi?id=201863
1715
1716         Reviewed by Zalan Bujtas.
1717
1718         As seen in tests
1719
1720         imported/w3c/web-platform-tests/innerText/getter.html
1721         imported/w3c/web-platform-tests/html/dom/elements/the-innertext-idl-attribute/getter.html
1722
1723         The old simple line layout path in TextIterator used to do this.
1724
1725         * editing/TextIterator.cpp:
1726         (WebCore::TextIterator::handleTextBox):
1727
1728 2019-09-17  Zalan Bujtas  <zalan@apple.com>
1729
1730         [LFC[MarginCollapsing] MarginCollapse::estimatedMarginBefore should take pre-computed non-collapsed margin values.
1731         https://bugs.webkit.org/show_bug.cgi?id=201848
1732         <rdar://problem/55419419>
1733
1734         Reviewed by Antti Koivisto.
1735
1736         This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
1737         See webkit.org/b/201795
1738
1739         * layout/blockformatting/BlockFormattingContext.cpp:
1740         (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
1741         * layout/blockformatting/BlockFormattingContext.h:
1742         * layout/blockformatting/BlockMarginCollapse.cpp:
1743         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginBefore):
1744         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginAfter):
1745         (WebCore::Layout::BlockFormattingContext::MarginCollapse::estimatedMarginBefore):
1746         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeIgnoringCollapsingThrough):
1747         (WebCore::Layout::BlockFormattingContext::MarginCollapse::collapsedVerticalValues):
1748
1749 2019-09-17  Zalan Bujtas  <zalan@apple.com>
1750
1751         [First-letter] Use WeakPtr for the first-letter insertion point.
1752         https://bugs.webkit.org/show_bug.cgi?id=201842
1753         <rdar://problem/51373788>
1754
1755         Reviewed by Antti Koivisto.
1756
1757         The about-to-be-removed first letter renderer's sibling could potentially be destroyed too as the result of the anonymous subtree collapsing logic (when the next sibling is a generated anonymous block and it is not needed anymore.)
1758
1759         Test: fast/text/first-letter-with-columns-crash.html
1760
1761         * rendering/updating/RenderTreeBuilderFirstLetter.cpp:
1762         (WebCore::RenderTreeBuilder::FirstLetter::updateStyle):
1763
1764 2019-09-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1765
1766         [GTK] Cannot create EGL window surface: EGL_BAD_ALLOC
1767         https://bugs.webkit.org/show_bug.cgi?id=201505
1768
1769         Reviewed by Žan Doberšek.
1770
1771         This happens because eglCreateWindowSurface() is called twice for the same window when not using the WPE
1772         renderer. New versions of Mesa fail the second time with a EGL_BAD_ALLOC.
1773
1774         * platform/graphics/egl/GLContextEGL.cpp:
1775         (WebCore::GLContextEGL::createWindowContext): Check surface is nullptr before falling back to use
1776         eglCreateWindowSurface().
1777
1778 2019-09-17  Jiewen Tan  <jiewen_tan@apple.com>
1779
1780         [WebAuthn] Use WebPreferences instead of RuntimeEnabledFeatures in UIProcess
1781         https://bugs.webkit.org/show_bug.cgi?id=198176
1782         <rdar://problem/55285709>
1783
1784         Reviewed by Youenn Fablet.
1785
1786         No changes of behavior.
1787
1788         * Modules/webauthn/PublicKeyCredential.cpp:
1789         (WebCore::PublicKeyCredential::isUserVerifyingPlatformAuthenticatorAvailable):
1790         Resolves the promise with false immediately when the feature flag is false.
1791
1792 2019-09-17  Rob Buis  <rbuis@igalia.com>
1793
1794         Access-Control-Expose-Headers parsed incorrectly
1795         https://bugs.webkit.org/show_bug.cgi?id=172357
1796
1797         Reviewed by Youenn Fablet.
1798
1799         When parsing the list, strip HTTP spaces and verify
1800         that the list items are valid HTTP tokens.
1801
1802         Behavior matches Firefox and Chrome.
1803
1804         Test: imported/w3c/web-platform-tests/cors/access-control-expose-headers-parsing.window.html
1805
1806         * platform/network/HTTPParsers.h:
1807         (WebCore::addToAccessControlAllowList):
1808         (WebCore::parseAccessControlAllowList):
1809
1810 2019-09-17  Youenn Fablet  <youenn@apple.com>
1811
1812         Content-Type should be preserved on responses created from DOMCache
1813         https://bugs.webkit.org/show_bug.cgi?id=201815
1814
1815         Reviewed by Alex Christensen.
1816
1817        Covered by updated test expectations
1818
1819         * Modules/fetch/FetchResponse.cpp:
1820         (WebCore::FetchResponse::create):
1821         Update content type when creating the response from DOMCache.
1822
1823 2019-09-16  Antti Koivisto  <antti@apple.com>
1824
1825         Move code for traversing reversed text boxes from TextIterator to TextBoxIterator
1826         https://bugs.webkit.org/show_bug.cgi?id=201819
1827
1828         Reviewed by Zalan Bujtas.
1829
1830         Handle traversal order in TextBoxIterator.
1831
1832         * editing/TextIterator.cpp:
1833         (WebCore::TextIterator::handleTextNode):
1834         (WebCore::TextIterator::handleTextBox):
1835         (WebCore::TextIterator::handleTextNodeFirstLetter):
1836         * editing/TextIterator.h:
1837         * rendering/line/LineLayoutInterfaceTextBoxes.cpp:
1838         (WebCore::LineLayoutInterface::TextBox::rect const):
1839         (WebCore::LineLayoutInterface::TextBox::logicalRect const):
1840         (WebCore::LineLayoutInterface::TextBox::hasHyphen const):
1841         (WebCore::LineLayoutInterface::TextBox::isLeftToRightDirection const):
1842         (WebCore::LineLayoutInterface::TextBox::dirOverride const):
1843         (WebCore::LineLayoutInterface::TextBox::text const):
1844         (WebCore::LineLayoutInterface::TextBox::localStartOffset const):
1845         (WebCore::LineLayoutInterface::TextBox::localEndOffset const):
1846         (WebCore::LineLayoutInterface::TextBox::length const):
1847         (WebCore::LineLayoutInterface::TextBoxIterator::TextBoxIterator):
1848         (WebCore::LineLayoutInterface::TextBoxIterator::traverseNextInVisualOrder):
1849         (WebCore::LineLayoutInterface::TextBoxIterator::traverseNextInTextOrder):
1850         (WebCore::LineLayoutInterface::TextBoxIterator::operator== const):
1851         (WebCore::LineLayoutInterface::TextBoxIterator::atEnd const):
1852         (WebCore::LineLayoutInterface::Provider::firstTextBoxInVisualOrderFor):
1853         (WebCore::LineLayoutInterface::Provider::firstTextBoxInTextOrderFor):
1854         (WebCore::LineLayoutInterface::Provider::textBoxRangeFor):
1855         * rendering/line/LineLayoutInterfaceTextBoxes.h:
1856         (WebCore::LineLayoutInterface::TextBoxIterator::TextBoxIterator):
1857         (WebCore::LineLayoutInterface::TextBoxIterator::operator++):
1858         (WebCore::LineLayoutInterface::Provider::firstTextBoxFor):
1859
1860 2019-09-16  Fujii Hironori  <Hironori.Fujii@sony.com>
1861
1862         [WinCairo][curl] Don't compile unused CertificateCFWin.cpp
1863         https://bugs.webkit.org/show_bug.cgi?id=201860
1864
1865         Reviewed by Alex Christensen.
1866
1867         Curl port is using ResourceHandle::setClientCertificateInfo
1868         instead of ResourceHandle::setClientCertificate.
1869
1870         * PlatformWin.cmake: Added CertificateCFWin.cpp to WebCore_SOURCES only if USE_CFURLCONNECTION.
1871         * platform/network/ResourceHandle.h: Removed an unused method setClientCertificate.
1872         * platform/network/curl/ResourceHandleCurl.cpp:
1873         (WebCore::ResourceHandle::setClientCertificate): Deleted.
1874
1875 2019-09-16  Fujii Hironori  <Hironori.Fujii@sony.com>
1876
1877         [AppleWin] Assertion failure in defaultSupportedImageTypes in UTIRegistry.cpp
1878         https://bugs.webkit.org/show_bug.cgi?id=198286
1879
1880         Reviewed by Brent Fulgham.
1881
1882         Some image types aren't supported by CG for Windows.
1883
1884         No new tests, covered by existing tests.
1885
1886         * platform/graphics/cg/ImageSourceCGWin.cpp:
1887         (WebCore::MIMETypeForImageType): Return the correct MIME types for
1888         com.microsoft.cur and com.microsoft.ico.
1889         * platform/graphics/cg/UTIRegistry.cpp:
1890         (WebCore::defaultSupportedImageTypes): Excluded public.jpeg-2000 and public.mpo-image if PLATFORM(WIN).
1891
1892 2019-09-16  Fujii Hironori  <Hironori.Fujii@sony.com>
1893
1894         [Cairo] Image::drawTiled → Cairo::drawSurface → cairo_paint_with_alpha → segfault happens in pixman
1895         https://bugs.webkit.org/show_bug.cgi?id=201755
1896
1897         Reviewed by Don Olmstead.
1898
1899         Segmentation faults happened in pixman while painting a image. In
1900         Cairo::drawSurface, originalSrcRect can be slightly larger than
1901         the surface size because of floating number calculations.
1902         Cairo::drawSurface created a subsurface which is running over the
1903         parent surface boundaries.
1904
1905         * platform/graphics/cairo/CairoOperations.cpp:
1906         (WebCore::Cairo::drawSurface): Calculated a intersection with
1907         expandedSrcRect and the parent surface size for subsurface size.
1908
1909 2019-09-16  Eric Liang  <ericliang@apple.com>
1910
1911         AX: USER: VO: Messages > Message > Shift-VO-M doesn't reveal correct actions
1912         https://bugs.webkit.org/show_bug.cgi?id=201840
1913
1914         Reviewed by Chris Fleizach.
1915
1916         menuForEvent: expects event-position in window's space, but we pass the position in Core's space. In this case, we need to convert core's space to window's space.
1917         Tested that existing tests passed with WK1 and WK2
1918
1919         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1920         (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
1921
1922 2019-09-16  Jiewen Tan  <jiewen_tan@apple.com>
1923
1924         [WebAuthn] Support more than two FIDO protocol versions
1925         https://bugs.webkit.org/show_bug.cgi?id=198408
1926         <rdar://problem/51292176>
1927
1928         Reviewed by Chris Dumez.
1929
1930         Covered by new API tests.
1931
1932         * Modules/webauthn/fido/DeviceResponseConverter.cpp:
1933         (fido::readCTAPGetInfoResponse):
1934         Remove the check for the array size.
1935
1936 2019-09-16  Brent Fulgham  <bfulgham@apple.com>
1937
1938         [FTW] Correct lifespan of other SharedBitmaps
1939         https://bugs.webkit.org/show_bug.cgi?id=201800
1940
1941         Reviewed by Dean Jackson.
1942
1943         The pop-up menu code creates its own SharedBitmap in the WebContent process,
1944         which needs to release its handle before destruction, otherwise the UIProcess
1945         will be unable to access the GPU texture (since it will have been cleaned up).
1946
1947         This patch also audits other uses of SharedBitmap to make sure a similar
1948         problem doesn't exist elsewhere.
1949
1950         * platform/graphics/win/Direct2DUtilities.cpp:
1951         (WebCore::Direct2D::toDXGIDevice): Switch to IDXGIDevice1 (since that is our
1952         minimum target DX).
1953         (WebCore::Direct2D::factoryForDXGIDevice): Ditto.
1954         (WebCore::Direct2D::swapChainOfSizeForWindowAndDevice): Added.
1955         * platform/graphics/win/Direct2DUtilities.h:
1956         * platform/graphics/win/GraphicsContextDirect2D.cpp:
1957         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): Correct
1958         a very silly use-after-move in the implementation.
1959         * platform/graphics/win/PlatformContextDirect2D.h:
1960         (WebCore::PlatformContextDirect2D::d3dDevice const): Added.
1961         (WebCore::PlatformContextDirect2D::setD3DDevice):
1962
1963 2019-09-16  Chris Dumez  <cdumez@apple.com>
1964
1965         Simplify WebResourceLoadObserver now that we have one WebProcess per session
1966         https://bugs.webkit.org/show_bug.cgi?id=201821
1967
1968         Reviewed by Brent Fulgham.
1969
1970         * Modules/websockets/WebSocket.cpp:
1971         (WebCore::WebSocket::connect):
1972         * loader/ResourceLoadObserver.h:
1973         (WebCore::ResourceLoadObserver::logWebSocketLoading):
1974         (WebCore::ResourceLoadObserver::statisticsForURL):
1975         * testing/Internals.cpp:
1976         (WebCore::Internals::resourceLoadStatisticsForURL):
1977
1978 2019-09-16  ChangSeok Oh  <changseok@webkit.org>
1979
1980         [GTK] Remove GraphicsContext3D dependency from the outside of WebGL
1981         https://bugs.webkit.org/show_bug.cgi?id=201748
1982
1983         Reviewed by Alex Christensen.
1984
1985         This is a preliminary change to bring ANGLE support for WebGL to GTK port.
1986         GraphicsContext3DANGLE has its own egl context but we want to make ANGLE egl context
1987         for WebGL and other GL contexts (i.e., glx, gles/egl) for TextureMapper live together.
1988         Mixed uses of GraphicsContext3D outside of WebGL code could cause unintended behaviors.
1989         We want to make sure that only WebGL code uses it.
1990
1991         No new tests since no functionality changed.
1992
1993         * platform/graphics/GLContext.cpp:
1994         * platform/graphics/GLContext.h:
1995         * platform/graphics/glx/GLContextGLX.cpp:
1996         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1997         (WebCore::GstVideoFrameHolder::platformLayerBuffer):
1998         (WebCore::MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime):
1999         * platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:
2000
2001 2019-09-16  Zalan Bujtas  <zalan@apple.com>
2002
2003         [LFC] Make the nested Geometry/MarginCollapse/Quirks c'tors private.
2004         https://bugs.webkit.org/show_bug.cgi?id=201825
2005         <rdar://problem/55403474>
2006
2007         Reviewed by Antti Koivisto.
2008
2009         The Geometry/MarginCollapse/Quirks objects should be constructed through the corresponding accessor functions.
2010         This is also a preparation for being able to pass the layout box in to these stack objects and call geometry(layoutBox)->outOfFlowVerticalGeometry() vs. geometry()->outOfFlowVerticalGeometry(layoutBox). 
2011
2012         * layout/FormattingContext.h:
2013         * layout/blockformatting/BlockFormattingContext.h:
2014         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2015         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
2016         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
2017         (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
2018         * layout/inlineformatting/InlineFormattingContext.h:
2019         * layout/tableformatting/TableFormattingContext.h:
2020
2021 2019-09-16  Jon Davis  <jond@apple.com>
2022
2023         Update feature status for Battery Status API, WebGL 2, and Dialog Element
2024         https://bugs.webkit.org/show_bug.cgi?id=201469
2025
2026         Reviewed by Joseph Pecoraro.
2027
2028         * features.json:
2029
2030 2019-09-16  Andres Gonzalez  <andresg_22@apple.com>
2031
2032         Rename [WebAccessibilityObjectWrapper _accessibilityInsertText] to accessibilityInsertText to match accessibility client.
2033         https://bugs.webkit.org/show_bug.cgi?id=201820
2034
2035         Reviewed by Chris Fleizach.
2036
2037         No new tests necessary since this is a method rename.
2038
2039         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2040         (-[WebAccessibilityObjectWrapper accessibilityInsertText:]):
2041         (-[WebAccessibilityObjectWrapper _accessibilityInsertText:]): Deleted.
2042         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2043         (-[WebAccessibilityObjectWrapper accessibilityInsertText:]):
2044         (-[WebAccessibilityObjectWrapper _accessibilityInsertText:]): Deleted.
2045
2046 2019-09-16  Zalan Bujtas  <zalan@apple.com>
2047
2048         [LFC] Always provide a containing block width value to compute* functions.
2049         https://bugs.webkit.org/show_bug.cgi?id=201809
2050         <rdar://problem/55383153>
2051
2052         Reviewed by Antti Koivisto.
2053
2054         The caller can always make a more informative decision about the default value when the containing block width is not available.
2055         (Currently the only case is when computing the preferred width.)
2056
2057         * layout/FormattingContext.cpp:
2058         (WebCore::Layout::FormattingContext::computeBorderAndPadding):
2059         * layout/FormattingContextGeometry.cpp:
2060         (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
2061         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
2062         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
2063         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
2064         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
2065         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
2066         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin const):
2067         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
2068         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
2069         (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):
2070         (WebCore::Layout::FormattingContext::Geometry::computedPadding const):
2071         (WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin const):
2072         (WebCore::Layout::FormattingContext::Geometry::computedVerticalMargin const):
2073         * layout/LayoutUnits.h:
2074         (WebCore::Layout::UsedHorizontalValues::UsedHorizontalValues):
2075         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2076         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
2077         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
2078         * layout/inlineformatting/InlineFormattingContext.cpp:
2079         (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
2080         (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
2081         (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
2082         (WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForReplacedInlineBox):
2083         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
2084         (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
2085
2086 2019-09-16  Zalan Bujtas  <zalan@apple.com>
2087
2088         [LFC][BFC] BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin should not read containing block's width
2089         https://bugs.webkit.org/show_bug.cgi?id=201807
2090         <rdar://problem/55381342>
2091
2092         Reviewed by Antti Koivisto.
2093
2094         This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
2095         See webkit.org/b/201795
2096
2097         * layout/blockformatting/BlockFormattingContext.h:
2098         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2099         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
2100         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
2101         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
2102
2103 2019-09-16  Antti Koivisto  <antti@apple.com>
2104
2105         Eliminate separate simple line layout path from TextIterator
2106         https://bugs.webkit.org/show_bug.cgi?id=201760
2107
2108         Reviewed by Zalan Bujtas.
2109
2110         Use the new line layout iterator to implement linebox traversal in TextIterator.
2111
2112         * WebCore.xcodeproj/project.pbxproj:
2113         * editing/TextIterator.cpp:
2114         (WebCore::TextIterator::advance):
2115         (WebCore::TextIterator::handleTextNode):
2116         (WebCore::TextIterator::handleTextBox):
2117
2118         InlineTextBox* -> LineLayoutInterface::TextBoxIterator
2119         Delete the seperate simple line layout path.
2120
2121         (WebCore::TextIterator::handleTextNodeFirstLetter):
2122         (WebCore::TextIterator::emitCharacter):
2123         (WebCore::TextIterator::emitText):
2124         * editing/TextIterator.h:
2125         * rendering/RenderTreeAsText.cpp:
2126         (WebCore::RenderTreeAsText::writeRenderObject):
2127         (WebCore::write):
2128         * rendering/SimpleLineLayoutResolver.cpp:
2129         (WebCore::SimpleLineLayout::RunResolver::Iterator::Iterator):
2130         (WebCore::SimpleLineLayout::RunResolver::Iterator::advanceLines):
2131         * rendering/SimpleLineLayoutResolver.h:
2132         (WebCore::SimpleLineLayout::RunResolver::Iterator::resolver const):
2133         (WebCore::SimpleLineLayout::RunResolver::Iterator::inQuirksMode const):
2134         (WebCore::SimpleLineLayout::RunResolver::Iterator::operator== const):
2135         (WebCore::SimpleLineLayout::RunResolver::Iterator::simpleRun const):
2136
2137         Make RunResolver::Iterator copyable (so TextBoxIterator becomes copyable too).
2138
2139         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
2140         (WebCore::SimpleLineLayout::TextFragmentIterator::findNextTextFragment):
2141         * rendering/line/LineLayoutInterfaceTextBoxes.cpp:
2142         (WebCore::LineLayoutInterface::TextBox::rect const):
2143         (WebCore::LineLayoutInterface::TextBox::logicalRect const):
2144         (WebCore::LineLayoutInterface::TextBox::hasHyphen const):
2145         (WebCore::LineLayoutInterface::TextBox::isLeftToRightDirection const):
2146         (WebCore::LineLayoutInterface::TextBox::dirOverride const):
2147         (WebCore::LineLayoutInterface::TextBox::text const):
2148         (WebCore::LineLayoutInterface::TextBox::localStartOffset const):
2149         (WebCore::LineLayoutInterface::TextBox::localEndOffset const):
2150         (WebCore::LineLayoutInterface::TextBox::length const):
2151
2152         Add offset and length functions.
2153
2154         (WebCore::LineLayoutInterface::TextBox::iterator const):
2155         (WebCore::LineLayoutInterface::TextBoxIterator::TextBoxIterator):
2156         (WebCore::LineLayoutInterface::TextBoxIterator::traverseNext):
2157         (WebCore::LineLayoutInterface::TextBoxIterator::operator== const):
2158         (WebCore::LineLayoutInterface::TextBoxIterator::atEnd const):
2159         (WebCore::LineLayoutInterface::Provider::firstTextBoxFor):
2160         (WebCore::LineLayoutInterface::Provider::textBoxRangeFor):
2161         (WebCore::LineLayoutInterface::Provider::iteratorForInlineTextBox):
2162
2163         Add Provider class for making iterators. It constructs and keeps SimpleLineLayout::Resolvers alive during traversal as needed.
2164
2165         * rendering/line/LineLayoutInterfaceTextBoxes.h:
2166         (WebCore::LineLayoutInterface::TextBoxIterator::TextBoxIterator):
2167         (WebCore::LineLayoutInterface::TextBoxIterator::operator bool const):
2168         (WebCore::LineLayoutInterface::TextBoxIterator::operator== const):
2169         (WebCore::LineLayoutInterface::TextBoxIterator::operator!= const):
2170         (WebCore::LineLayoutInterface::TextBoxIterator::operator* const):
2171         (WebCore::LineLayoutInterface::TextBoxIterator::operator-> const):
2172
2173         Make TextBoxIterator privately inherit TextBox. This way we don't need to construct temporaries and can easily implement operator->.
2174
2175         (WebCore::LineLayoutInterface::TextBoxRange::TextBoxRange):
2176         (WebCore::LineLayoutInterface::TextBoxRange::begin const):
2177         (WebCore::LineLayoutInterface::TextBoxRange::end const):
2178
2179         Use separate end() type of C++17 ranges.
2180
2181 2019-09-16  Andres Gonzalez  <andresg_22@apple.com>
2182
2183         Expose misspelling ranges for editable content to accessibility clients.
2184         https://bugs.webkit.org/show_bug.cgi?id=201752
2185         <rdar://problem/49556828>
2186
2187         Reviewed by Chris Fleizach.
2188
2189         Test: accessibility/misspelling-range.html
2190
2191         Added [WebAccessibilityObjectWrapper misspellingTextMarkerRange] and
2192         underlying AccessibilityObject implementation to expose misspellings to
2193         accessibility clients that provide an alternative user interface to
2194         spell checking.
2195         * accessibility/AccessibilityObject.cpp:
2196         (WebCore::AccessibilityObject::getMisspellingRange const):
2197         * accessibility/AccessibilityObject.h:
2198         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2199         (-[WebAccessibilityObjectWrapper misspellingTextMarkerRange:direction:]):
2200         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2201         (accessibilityMisspellingSearchCriteriaForParameterizedAttribute):
2202         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2203
2204 2019-09-15  Andy Estes  <aestes@apple.com>
2205
2206         [WebIDL] Derived dictionaries should inherit their inherited dictionaries' partials
2207         https://bugs.webkit.org/show_bug.cgi?id=201802
2208
2209         Reviewed by Sam Weinig.
2210
2211         Prior to this change, a dictionary D that inherits from dictionary B would not inherit B's
2212         partial dictionaries. Fixed this by moving supplemental dependencies processing from
2213         generate-bindings.pl to CodeGenerator.pm and reusing it in GetDictionaryByType.
2214
2215         Added new bindings tests.
2216
2217         * bindings/scripts/CodeGenerator.pm:
2218         (new):
2219         (ProcessDocument):
2220         (ProcessSupplementalDependencies):
2221         (shouldPropertyBeExposed):
2222         (GetDictionaryByType):
2223         * bindings/scripts/generate-bindings.pl:
2224         (generateBindings):
2225         (shouldPropertyBeExposed): Deleted.
2226         * bindings/scripts/test/JS/JSTestDerivedDictionary.cpp: Added.
2227         (WebCore::convertDictionary<TestDerivedDictionary>):
2228         (WebCore::convertDictionaryToJS):
2229         * bindings/scripts/test/JS/JSTestDerivedDictionary.h: Added.
2230         * bindings/scripts/test/JS/JSTestInheritedDictionary.cpp: Added.
2231         (WebCore::convertDictionary<TestInheritedDictionary>):
2232         (WebCore::convertDictionaryToJS):
2233         * bindings/scripts/test/JS/JSTestInheritedDictionary.h: Added.
2234         * bindings/scripts/test/TestDerivedDictionary.idl: Added.
2235         * bindings/scripts/test/TestInheritedDictionary.idl: Added.
2236         * bindings/scripts/test/TestSupplemental.idl:
2237
2238 2019-09-15  David Kilzer  <ddkilzer@apple.com>
2239
2240         Missing call to [self init] in -[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:]
2241         <https://webkit.org/b/201806>
2242
2243         Reviewed by Simon Fraser.
2244
2245         * platform/mac/ScrollAnimatorMac.mm:
2246         (-[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:]):
2247         Call [self init] and return early if the result is nil.
2248
2249 2019-09-14  Justin Fan  <justin_fan@apple.com>
2250
2251         [WebGPU] Make WebGPURenderPipeline and WebGPUComputePipeline inherit from GPUObjectBase
2252         https://bugs.webkit.org/show_bug.cgi?id=201207
2253
2254         Reviewed by Dean Jackson.
2255
2256         Make remaining WebGPU "client" classes manage their error scopes, instead of the internal classes.
2257         Matches Web/GPUBuffer, and allows "invalid" WebGPU objects to create errors.
2258
2259         Covered by existing tests.
2260
2261         * Modules/webgpu/WebGPUComputePipeline.cpp:
2262         (WebCore::WebGPUComputePipeline::create):
2263         (WebCore::WebGPUComputePipeline::WebGPUComputePipeline):
2264         * Modules/webgpu/WebGPUComputePipeline.h:
2265         * Modules/webgpu/WebGPUDevice.cpp:
2266         (WebCore::WebGPUDevice::createRenderPipeline const):
2267         (WebCore::WebGPUDevice::createComputePipeline const):
2268         * Modules/webgpu/WebGPURenderPipeline.cpp:
2269         (WebCore::WebGPURenderPipeline::create):
2270         (WebCore::WebGPURenderPipeline::WebGPURenderPipeline):
2271         * Modules/webgpu/WebGPURenderPipeline.h:
2272         * WebCore.xcodeproj/project.pbxproj:
2273         * platform/graphics/gpu/GPUComputePipeline.h:
2274         * platform/graphics/gpu/GPURenderPipeline.h:
2275         * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:
2276         (WebCore::GPUComputePipeline::tryCreate):
2277         (WebCore::GPUComputePipeline::GPUComputePipeline):
2278         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
2279         (WebCore::GPURenderPipeline::tryCreate):
2280         (WebCore::GPURenderPipeline::GPURenderPipeline):
2281
2282 2019-09-14  Yusuke Suzuki  <ysuzuki@apple.com>
2283
2284         Retire x86 32bit JIT support
2285         https://bugs.webkit.org/show_bug.cgi?id=201790
2286
2287         Reviewed by Mark Lam.
2288
2289         * cssjit/FunctionCall.h:
2290         (WebCore::FunctionCall::callAndBranchOnBooleanReturnValue):
2291         (WebCore::FunctionCall::swapArguments):
2292
2293 2019-09-14  Zalan Bujtas  <zalan@apple.com>
2294
2295         [LFC] FormattingContext::Geometry::inFlowPositionedPositionOffset should not read containing block's width
2296         https://bugs.webkit.org/show_bug.cgi?id=201797
2297         <rdar://problem/55366244>
2298
2299         Reviewed by Antti Koivisto.
2300
2301         This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
2302         See webkit.org/b/201795
2303
2304         * layout/FormattingContext.h:
2305         * layout/FormattingContextGeometry.cpp:
2306         (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):
2307         * layout/blockformatting/BlockFormattingContext.cpp:
2308         (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
2309         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
2310         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
2311
2312 2019-09-14  Zalan Bujtas  <zalan@apple.com>
2313
2314         [LFC] FormattingContext::Geometry::inlineReplacedHeightAndMargin should not read containing block's width
2315         https://bugs.webkit.org/show_bug.cgi?id=201796
2316         <rdar://problem/55366109>
2317
2318         Reviewed by Antti Koivisto.
2319
2320         This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
2321         See webkit.org/b/201795
2322
2323         * layout/FormattingContext.h:
2324         * layout/FormattingContextGeometry.cpp:
2325         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
2326         (WebCore::Layout::FormattingContext::Geometry::complicatedCases const):
2327         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin const):
2328         (WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin const):
2329         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
2330         * layout/blockformatting/BlockFormattingContext.cpp:
2331         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
2332         * layout/blockformatting/BlockFormattingContext.h:
2333         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2334         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
2335         * layout/inlineformatting/InlineFormattingContext.cpp:
2336         (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
2337         * layout/inlineformatting/InlineFormattingContext.h:
2338         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
2339         (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin const):
2340
2341 2019-09-14  Zalan Bujtas  <zalan@apple.com>
2342
2343         [LFC] FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry should not read containing block's width.
2344         https://bugs.webkit.org/show_bug.cgi?id=201794
2345         <rdar://problem/55365669>
2346
2347         Reviewed by Antti Koivisto.
2348
2349         This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
2350         See webkit.org/b/201795
2351
2352         * layout/FormattingContext.cpp:
2353         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
2354         * layout/FormattingContext.h:
2355         * layout/FormattingContextGeometry.cpp:
2356         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
2357         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
2358         (WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry const):
2359
2360 2019-09-14  Chris Dumez  <cdumez@apple.com>
2361
2362         newController may be moved several times under SWClientConnection::notifyClientsOfControllerChange()
2363         https://bugs.webkit.org/show_bug.cgi?id=201792
2364         <rdar://problem/55351284>
2365
2366         Reviewed by Youenn Fablet.
2367
2368         Stop WTFMove()'ing inside the for loop.
2369
2370         * workers/service/SWClientConnection.cpp:
2371         (WebCore::SWClientConnection::notifyClientsOfControllerChange):
2372
2373 2019-09-14  Zalan Bujtas  <zalan@apple.com>
2374
2375         [LFC] FormattingContext::Geometry::computedHeightValue should not read containing block's height.
2376         https://bugs.webkit.org/show_bug.cgi?id=201791
2377         <rdar://problem/55361695>
2378
2379         Reviewed by Antti Koivisto.
2380
2381         While sizing/positioning a particular box, we oftentimes need some containing block geometry information.
2382         The idea here is that instead of calling formattingContext().geometry(containingBlock), these constraint values
2383         would be pushed in to those compute* functions. It helps controlling the access to the display box tree and
2384         prevents formatting context escaping.
2385
2386         * layout/FormattingContext.cpp:
2387         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
2388         * layout/FormattingContext.h:
2389         * layout/FormattingContextGeometry.cpp:
2390         (WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
2391         (WebCore::Layout::FormattingContext::Geometry::computedMaxHeight const):
2392         (WebCore::Layout::FormattingContext::Geometry::computedMinHeight const):
2393         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
2394         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
2395         (WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry const):
2396         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
2397         * layout/LayoutUnits.h:
2398         * layout/blockformatting/BlockFormattingContext.cpp:
2399         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
2400
2401 2019-09-11  Dean Jackson  <dino@apple.com>
2402
2403         Provide a prototype for AR QuickLook to trigger processing in the originating page
2404         https://bugs.webkit.org/show_bug.cgi?id=201371
2405         <rdar://54904781>
2406
2407         Reviewed by Simon Fraser.
2408
2409         * dom/Document.cpp:
2410         (WebCore::Document::dispatchSystemPreviewActionEvent): Create and dispatch a MessageEvent.
2411         * dom/Document.h:
2412
2413         * html/HTMLAnchorElement.cpp: Send along the page and frame identifiers for this
2414         object to ensure that any reply goes to the correct place.
2415         (WebCore::HTMLAnchorElement::handleClick):
2416
2417         * loader/FrameLoadRequest.h: Use the new SystemPreviewInfo type.
2418         (WebCore::FrameLoadRequest::isSystemPreview const):
2419         (WebCore::FrameLoadRequest::systemPreviewInfo const):
2420         (WebCore::FrameLoadRequest::systemPreviewRect const): Deleted.
2421         * loader/FrameLoader.cpp:
2422         (WebCore::FrameLoader::loadURL):
2423
2424         * loader/FrameLoaderTypes.h: Provide encoders for the type.
2425         (WebCore::SystemPreviewInfo::encode const):
2426         (WebCore::SystemPreviewInfo::decode):
2427
2428         * platform/network/ResourceRequestBase.cpp: Use the new type.
2429         (WebCore::ResourceRequestBase::isSystemPreview const):
2430         (WebCore::ResourceRequestBase::systemPreviewInfo const):
2431         (WebCore::ResourceRequestBase::setSystemPreviewInfo):
2432         (WebCore::ResourceRequestBase::setSystemPreview): Deleted.
2433         (WebCore::ResourceRequestBase::systemPreviewRect const): Deleted.
2434         (WebCore::ResourceRequestBase::setSystemPreviewRect): Deleted.
2435         * platform/network/ResourceRequestBase.h:
2436
2437         * testing/Internals.cpp: Expose the frame and page identifiers to testing.
2438         (WebCore::Internals::frameIdentifier const):
2439         (WebCore::Internals::pageIdentifier const):
2440         * testing/Internals.h:
2441         * testing/Internals.idl:
2442
2443 2019-09-13  Chris Dumez  <cdumez@apple.com>
2444
2445         Crash under WebCore::firstPositionInNode()
2446         https://bugs.webkit.org/show_bug.cgi?id=201764
2447         <rdar://problem/54823754>
2448
2449         Reviewed by Wenson Hsieh and Geoff Garen.
2450
2451         Make sure to keep a Ref<> to the textNode when we call insertNodeAtTabSpanPosition()
2452         or insertNodeAt().
2453
2454         Test: editing/firstPositionInNode-crash.html
2455
2456         * editing/InsertTextCommand.cpp:
2457         (WebCore::InsertTextCommand::positionInsideTextNode):
2458
2459 2019-09-13  Youenn Fablet  <youenn@apple.com>
2460
2461         Partition processes running service workers by session ID
2462         https://bugs.webkit.org/show_bug.cgi?id=201643
2463
2464         Reviewed by Chris Dumez.
2465
2466         Move the creation of service worker context connection management to SWServer.
2467         This allows to partition service worker context connections by registrable domain and sessionID.
2468         WebKit2 is still responsible to create the IPC creation through a Function given to SWServer at construction
2469         time.
2470         SWServer now keeps a map of registrable domain -> context connection to use for running workers.
2471         It also keeps a map of being-created connections.
2472         In case a context connection is removed from the SWServer, the SWServer will notify all related worker instances
2473         that they are not running. The SWServer will also recreate a context connection if needed.
2474
2475         This allows removing the global server context connection map.
2476         Make SWServerToContextConnection no longer refcounted to simplify the lifetime management.
2477
2478         Covered by API test.
2479
2480         * workers/service/server/SWServer.cpp:
2481         (WebCore::SWServer::SWServer):
2482         (WebCore::SWServer::tryInstallContextData):
2483         (WebCore::SWServer::contextConnectionCreated):
2484         (WebCore::SWServer::unregisterServiceWorkerClient):
2485         (WebCore::SWServer::needsContextConnectionForRegistrableDomain const):
2486         (WebCore::SWServer::addContextConnection):
2487         (WebCore::SWServer::removeContextConnection):
2488         (WebCore::SWServer::createContextConnection):
2489         * workers/service/server/SWServer.h:
2490         (WebCore::SWServer::contextConnectionForRegistrableDomain):
2491         * workers/service/server/SWServerToContextConnection.cpp:
2492         (WebCore::SWServerToContextConnection::SWServerToContextConnection):
2493         (WebCore::SWServerToContextConnection::~SWServerToContextConnection):
2494         * workers/service/server/SWServerToContextConnection.h:
2495         * workers/service/server/SWServerWorker.cpp:
2496         (WebCore::SWServerWorker::contextConnection):
2497
2498 2019-09-13  Zalan Bujtas  <zalan@apple.com>
2499
2500         [LFC] Do not create FormattingContext unless the root has child boxes.
2501         https://bugs.webkit.org/show_bug.cgi?id=201766
2502         <rdar://problem/55344449>
2503
2504         Reviewed by Antti Koivisto.
2505
2506         Just because a box establishes a formatting context, it does not necessarily mean we need to create a formatting context object for it.
2507         The established formatting context is responsible for laying out the descendant content. The formatting context root itself is
2508         laid out in the formatting context it lives in. So if there's no descendent content, we don't need to construct the context objects.
2509
2510         <body><div style="float: left;"></div></body> <- this div establishes a block formatting context (float) but it does not have any content so laying
2511         it out simply means sizing and positioning it in the initial block formatting context.
2512
2513         * layout/FormattingContext.cpp:
2514         (WebCore::Layout::FormattingContext::FormattingContext):
2515         (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
2516         (WebCore::Layout::FormattingContext::mapTopToFormattingContextRoot const):
2517         (WebCore::Layout::FormattingContext::mapLeftToFormattingContextRoot const):
2518         (WebCore::Layout::FormattingContext::mapRightToFormattingContextRoot const):
2519         (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
2520         * layout/FormattingContext.h:
2521         (WebCore::Layout::FormattingContext::root const):
2522         * layout/FormattingContextGeometry.cpp:
2523         (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
2524         (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
2525         * layout/LayoutState.cpp:
2526         (WebCore::Layout::LayoutState::layoutFormattingContextSubtree):
2527         (WebCore::Layout::LayoutState::establishedFormattingState const):
2528         (WebCore::Layout::LayoutState::createFormattingStateForFormattingRootIfNeeded):
2529         (WebCore::Layout::LayoutState::createFormattingContext):
2530         * layout/LayoutState.h:
2531         (WebCore::Layout::LayoutState::hasFormattingState const):
2532         * layout/blockformatting/BlockFormattingContext.cpp:
2533         (WebCore::Layout::BlockFormattingContext::BlockFormattingContext):
2534         (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
2535         (WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider const):
2536         (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
2537         (WebCore::Layout::BlockFormattingContext::computedIntrinsicWidthConstraints):
2538         * layout/blockformatting/BlockFormattingContext.h:
2539         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2540         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
2541         (WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraints):
2542         * layout/blockformatting/BlockMarginCollapse.cpp:
2543         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough const):
2544         * layout/floats/FloatingContext.h:
2545         (WebCore::Layout::FloatingContext::root const):
2546         * layout/floats/FloatingState.cpp:
2547         (WebCore::Layout::FloatingState::FloatingState):
2548         (WebCore::Layout::FloatingState::bottom const):
2549         (WebCore::Layout::FloatingState::top const):
2550         * layout/floats/FloatingState.h:
2551         (WebCore::Layout::FloatingState::create):
2552         (WebCore::Layout::FloatingState::root const):
2553         (WebCore::Layout::FloatingState::leftBottom const):
2554         (WebCore::Layout::FloatingState::rightBottom const):
2555         (WebCore::Layout::FloatingState::bottom const):
2556         (WebCore::Layout::FloatingState::FloatItem::isDescendantOfFormattingRoot const):
2557         * layout/inlineformatting/InlineFormattingContext.cpp:
2558         (WebCore::Layout::InlineFormattingContext::InlineFormattingContext):
2559         (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
2560         (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
2561         (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
2562         (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
2563         (WebCore::Layout::InlineFormattingContext::collectInlineContent const):
2564         * layout/inlineformatting/InlineFormattingContext.h:
2565         (WebCore::Layout::InlineFormattingContext::InlineLayout::formattingRoot const):
2566         * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
2567         (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
2568         * layout/inlineformatting/InlineLine.cpp:
2569         (WebCore::Layout::Line::close):
2570         (WebCore::Layout::Line::adjustBaselineAndLineHeight):
2571         * layout/tableformatting/TableFormattingContext.cpp:
2572         (WebCore::Layout::TableFormattingContext::TableFormattingContext):
2573         (WebCore::Layout::TableFormattingContext::layoutTableCellBox):
2574         (WebCore::Layout::TableFormattingContext::setComputedGeometryForSections):
2575         (WebCore::Layout::TableFormattingContext::ensureTableGrid):
2576         (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):
2577         * layout/tableformatting/TableFormattingContext.h:
2578
2579 2019-09-13  Ali Juma  <ajuma@chromium.org>
2580
2581         IntersectionObserverEntry#intersectionRatio can be larger than 1
2582         https://bugs.webkit.org/show_bug.cgi?id=200776
2583
2584         Reviewed by Simon Fraser.
2585
2586         When computing the intersection between a target and an intersection observer's 
2587         root, RenderBox::computeVisibleRectInContainer is used to map the target rect
2588         up the containing block chain, clipping along the way. When a RenderBox has
2589         a transform, this method expands the given rect to the enclosing rect in device
2590         pixels. This is fine for the use case of computing an invalidation rect, but for
2591         the intersection observer use case it means that it is possible for the computed
2592         intersection rect to be slightly larger than the original target rect, resulting
2593         in an intersection ratio greater than 1.
2594
2595         Fix this by performing a final intersection between the intersection rect as
2596         computed above and the target rect.
2597
2598         Test: intersection-observer/intersection-clipped-to-target.html
2599
2600         * dom/Document.cpp:
2601         (WebCore::computeIntersectionState):
2602
2603 2019-09-13  Nikolas Zimmermann  <zimmermann@kde.org>
2604
2605         SMIL animations of SVG <view> element have no effect
2606         https://bugs.webkit.org/show_bug.cgi?id=94469
2607
2608         Reviewed by Said Abou-Hallawa.
2609
2610         SMIL animations of the attributes associated with SVGViewElement work fine, but without any
2611         visual effect. When loading an SVG document with a given fragment identifier
2612         (e.g. test.svg#customView) where 'customView' references to an embedded SVGViewElement, the
2613         viewBox/preserveAspectRatio settings should be taken from the SVGViewElement. Currently
2614         there is no link between the SVGViewElement and the SVGSVGElement. The settings from the
2615         SVGViewElement are only pasrsed onco in SVGSVGElement::scrollToFragment(). Dynamic updates
2616         of the 'viewBox' and 'preserveAspectRatio' attributes of the SVGViewElement thus have no
2617         visual effect, since the SVGSVGElement does not re-evaluates its viewBox.
2618
2619         Store a RefPtr to the currently used SVGViewElement in SVGSVGElement, and a WeakPtr back
2620         to the SVGSVGElement that currently references the SVGViewElement. This allows us to
2621         propagate SVGViewElement attribute changes to SVGSVGElement and re-evaluate the viewBox
2622         stored in SVGSVGElement and trigger visual updates.
2623
2624         Tests: svg/custom/animation-on-view-element.html
2625                svg/custom/multiple-view-elements.html
2626
2627         * svg/SVGSVGElement.cpp:
2628         (WebCore::SVGSVGElement::scrollToFragment):
2629         * svg/SVGSVGElement.h:
2630         * svg/SVGViewElement.cpp:
2631         (WebCore::SVGViewElement::svgAttributeChanged): Add missing implementation, tracked by
2632         webkit.org/b/196554. Correctly handle SVGFitToViewBox property changes. Update the viewBox
2633         stored in the SVGSVGElement, that references the SVGViewElement. Afterwards invalidate the
2634         renderer associated with the SVGSVGElement, which properly triggers visual updates.
2635         * svg/SVGViewElement.h:
2636
2637 2019-09-13  Brent Fulgham  <bfulgham@apple.com>
2638
2639         [FTW] ImageBuffer/ImageBufferData is highly inefficient
2640         https://bugs.webkit.org/show_bug.cgi?id=201594
2641
2642         Reviewed by Said Abou-Hallawa.
2643
2644         My initial implementation of ImageBuffer and ImageBufferData for Direct2D involves too
2645         much moving of data from GPU to CPU and back. We only need to make a renderable version
2646         of the ImageBuffer when ImageBuffer::sinkIntoNativeImage or ImageBuffer::copyNativeImage
2647         are called.
2648
2649         Currently, each ImageBuffer putData operation uploads the data to the GPU, and each
2650         ImageBuffer getData pulls the data from the GPU.
2651
2652         This patch does the following:
2653
2654         1. It makes the assumption that the ID2D1Bitmap it holds is under its control (i.e.,
2655            external draw operations do not manipulate the bitmap without marking it dirty).
2656         2. It holds a CPU copy of the data from the ID2D1Bitmap originally used to create it.
2657            It uses this data for all manipulations, and uploads to the bitmap only when
2658            an ID2D1Bitmap is requested for drawing, and before a drawing operation is performed
2659            on the associated ImageBuffer context.
2660         3. It does not read back from the ID2D1Bitmap unless it is told that it is dirty.
2661         4. It does not call 'ID2D1RenderTarget::SetTags' if ASSERTS are disabled because
2662            they are costly, and don't help in release builds.
2663  
2664         * platform/graphics/win/Direct2DOperations.cpp:
2665         (WebCore::Direct2D::fillRect): Use new 'setTags' method.
2666         (WebCore::Direct2D::fillRoundedRect): Ditto.
2667         (WebCore::Direct2D::fillRectWithRoundedHole): Ditto.
2668         (WebCore::Direct2D::fillRectWithGradient): Ditto.
2669         (WebCore::Direct2D::fillPath): Ditto.
2670         (WebCore::Direct2D::strokeRect): Ditto.
2671         (WebCore::Direct2D::strokePath): Ditto.
2672         (WebCore::Direct2D::drawPath): Ditto.
2673         (WebCore::Direct2D::drawWithShadow): Notify observers before and after we drew.
2674         (WebCore::Direct2D::drawWithoutShadow): Ditto.
2675         (WebCore::Direct2D::clearRect): Use new 'setTags' method.
2676         (WebCore::Direct2D::drawGlyphs): Ditto.
2677         (WebCore::Direct2D::drawNativeImage): Ditto.
2678         (WebCore::Direct2D::drawRect): Ditto.
2679         (WebCore::Direct2D::drawLine): Ditto.
2680         (WebCore::Direct2D::fillEllipse): Ditto.
2681         (WebCore::Direct2D::drawEllipse): Ditto.
2682         (WebCore::Direct2D::flush): Notify observer after we drew.
2683         * platform/graphics/win/GradientDirect2D.cpp:
2684         (WebCore::Gradient::fill): Don't call SetTags in non-ASSERT builds.
2685         * platform/graphics/win/ImageBufferDataDirect2D.cpp:
2686         (WebCore::ImageBufferData::ensureBackingStore const): Added.
2687         (WebCore::ImageBufferData::getData const): Only read from the GPU if the in-memory
2688         store is empty or out-of-sync.
2689         (WebCore::ImageBufferData::putData): Mark the bitmap as out-of-sync, but don't
2690         upload the data yet.
2691         (WebCore::ImageBufferData::loadDataToBitmapIfNeeded): Helper function to upload data to the GPU.
2692         (WebCore::ImageBufferData::compatibleBitmap): Only upload data if the relevant
2693         bitmap is out of date.
2694         * platform/graphics/win/ImageBufferDataDirect2D.h:
2695         * platform/graphics/win/ImageBufferDirect2D.cpp:
2696         (WebCore::ImageBuffer::ImageBuffer): Update constructor to register the ImageBufferData
2697         lambdas as observer for draw operations.
2698         * platform/graphics/win/PlatformContextDirect2D.cpp:
2699         (WebCore::PlatformContextDirect2D::PlatformContextDirect2D): Update constructor to accept
2700         lambdas to run before and after draw operations.
2701         (WebCore::PlatformContextDirect2D::setTags): Added.
2702         (WebCore::PlatformContextDirect2D::notifyPreDrawObserver): Added.
2703         (WebCore::PlatformContextDirect2D::notifyPostDrawObserver): Added.
2704         * platform/graphics/win/PlatformContextDirect2D.h:
2705         (WebCore::PlatformContextDirect2D::PlatformContextDirect2D):
2706
2707 2019-09-13  Russell Epstein  <repstein@apple.com>
2708
2709         Unreviewed, rolling out r249709.
2710
2711         Layout test added in this patch has been consistently failing
2712         since it landed.
2713
2714         Reverted changeset:
2715
2716         "Option + arrow moves caret past whitespace on iOS"
2717         https://bugs.webkit.org/show_bug.cgi?id=201575
2718         https://trac.webkit.org/changeset/249709
2719
2720 2019-09-13  Zalan Bujtas  <zalan@apple.com>
2721
2722         [LFC] Rename FormattingContext::layout to layoutInFlowContent()
2723         https://bugs.webkit.org/show_bug.cgi?id=201763
2724         <rdar://problem/55340435>
2725
2726         Reviewed by Antti Koivisto.
2727
2728         FormattingContext::layout() only takes care of the inflow content. Out-out-flow boxes are laid out through FormattingContext::layoutOutOfFlowContent.
2729
2730         * layout/FormattingContext.cpp:
2731         (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
2732         * layout/FormattingContext.h:
2733         * layout/LayoutState.cpp:
2734         (WebCore::Layout::LayoutState::layoutFormattingContextSubtree):
2735         * layout/blockformatting/BlockFormattingContext.cpp:
2736         (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
2737         (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
2738         (WebCore::Layout::BlockFormattingContext::layout): Deleted.
2739         * layout/blockformatting/BlockFormattingContext.h:
2740         * layout/inlineformatting/InlineFormattingContext.cpp:
2741         (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
2742         (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
2743         (WebCore::Layout::InlineFormattingContext::layout): Deleted.
2744         * layout/inlineformatting/InlineFormattingContext.h:
2745         * layout/tableformatting/TableFormattingContext.cpp:
2746         (WebCore::Layout::TableFormattingContext::layoutInFlowContent):
2747         (WebCore::Layout::TableFormattingContext::layoutTableCellBox):
2748         (WebCore::Layout::TableFormattingContext::layout): Deleted.
2749         * layout/tableformatting/TableFormattingContext.h:
2750
2751 2019-09-13  Zalan Bujtas  <zalan@apple.com>
2752
2753         [LFC] FormattingContext::displayBoxForLayoutBox should be split into 2 functions
2754         https://bugs.webkit.org/show_bug.cgi?id=201754
2755         <rdar://problem/55328753>
2756
2757         Reviewed by Antti Koivisto.
2758
2759         1. FormattingContext::geometryForBox() returns a const Display::Box. Use this function to access
2760         already computed geometry such as the containing block's content box width.
2761         This function can escape the current formatting context in certain cases and read geometry from parent/ancestor formatting contexts. 
2762         2. FormattingState::displayBox() returns a non-const version of the Display::Box. Use this function to
2763         create/get the display box of a particular layout box to set computed values. This call should never escape the
2764         current formatting context (as no one should mutate ancestor boxes).
2765         
2766         Normally while laying out a particular box, we need to collect some geometry information from other boxes in the tree like previous sibling, containing block.
2767         <div style="width: 100px"><div></div></div> <- the inner div's used width is based on the outer div's width. 
2768         However we should never mutate the geometry information on those other boxes (outer div). This patch helps avoiding accidental mutation on ancestors by
2769         returning a const version of the Display::Box.  
2770
2771         * layout/FormattingContext.cpp:
2772         (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
2773         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
2774         (WebCore::Layout::FormattingContext::computeBorderAndPadding):
2775         (WebCore::Layout::mapHorizontalPositionToAncestor):
2776         (WebCore::Layout::FormattingContext::mapTopToFormattingContextRoot const):
2777         (WebCore::Layout::FormattingContext::mapLeftToFormattingContextRoot const):
2778         (WebCore::Layout::FormattingContext::mapRightToFormattingContextRoot const):
2779         (WebCore::Layout::FormattingContext::geometryForBox const):
2780         (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
2781         (WebCore::Layout::FormattingContext::displayBoxForLayoutBox const): Deleted.
2782         * layout/FormattingContext.h:
2783         (WebCore::Layout::FormattingContext::hasDisplayBox const): Deleted.
2784         * layout/FormattingContextGeometry.cpp:
2785         (WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
2786         (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
2787         (WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
2788         (WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):
2789         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
2790         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
2791         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
2792         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
2793         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
2794         (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):
2795         * layout/FormattingContextQuirks.cpp:
2796         (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
2797         * layout/FormattingState.cpp:
2798         (WebCore::Layout::FormattingState::displayBox const):
2799         * layout/FormattingState.h:
2800         * layout/blockformatting/BlockFormattingContext.cpp:
2801         (WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider const):
2802         (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
2803         (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
2804         (WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition):
2805         (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
2806         (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFloatClear):
2807         (WebCore::Layout::BlockFormattingContext::computeFloatingPosition):
2808         (WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats):
2809         (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
2810         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
2811         (WebCore::Layout::BlockFormattingContext::verticalPositionWithMargin const):
2812         * layout/blockformatting/BlockFormattingContext.h:
2813         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2814         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
2815         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
2816         (WebCore::Layout::BlockFormattingContext::Geometry::staticVerticalPosition const):
2817         (WebCore::Layout::BlockFormattingContext::Geometry::staticHorizontalPosition const):
2818         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
2819         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
2820         (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
2821         * layout/blockformatting/BlockMarginCollapse.cpp:
2822         (WebCore::Layout::BlockFormattingContext::MarginCollapse::hasClearance const):
2823         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore const):
2824         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithPreviousSiblingMarginAfter const):
2825         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithFirstInFlowChildMarginBefore const):
2826         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance const):
2827         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithLastInFlowChildMarginAfter const):
2828         (WebCore::Layout::BlockFormattingContext::MarginCollapse::updateMarginAfterForPreviousSibling const):
2829         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues):
2830         (WebCore::Layout::BlockFormattingContext::MarginCollapse::estimatedMarginBefore):
2831         (WebCore::Layout::BlockFormattingContext::MarginCollapse::updatePositiveNegativeMarginValues):
2832         (WebCore::Layout::hasClearance): Deleted.
2833         * layout/floats/FloatingContext.cpp:
2834         (WebCore::Layout::FloatingContext::positionForFloat const):
2835         (WebCore::Layout::FloatingContext::verticalPositionWithClearance const):
2836         (WebCore::Layout::FloatingContext::absoluteDisplayBoxCoordinates const):
2837         (WebCore::Layout::FloatingContext::mapToFloatingStateRoot const):
2838         (WebCore::Layout::FloatingContext::mapTopToFloatingStateRoot const):
2839         (WebCore::Layout::FloatingContext::mapPointFromFormattingContextRootToFloatingStateRoot const):
2840         * layout/inlineformatting/InlineFormattingContext.cpp:
2841         (WebCore::Layout::InlineFormattingContext::layout):
2842         (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
2843         (WebCore::Layout::InlineFormattingContext::initializeMarginBorderAndPaddingForGenericInlineBox):
2844         (WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPaddingForInlineContainer):
2845         (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
2846         (WebCore::Layout::InlineFormattingContext::computeHorizontalMargin):
2847         (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin):
2848         (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
2849         (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
2850         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
2851         (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin const):
2852         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
2853         (WebCore::Layout::inlineItemWidth):
2854         (WebCore::Layout::LineLayout::placeInlineItem):
2855         (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
2856         (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
2857         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
2858         * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
2859         (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
2860         * layout/inlineformatting/InlineLine.cpp:
2861         (WebCore::Layout::isInlineContainerConsideredEmpty):
2862         (WebCore::Layout::Line::isVisuallyEmpty const):
2863         (WebCore::Layout::Line::close):
2864         (WebCore::Layout::Line::appendNonReplacedInlineBox):
2865         (WebCore::Layout::Line::inlineItemContentHeight const):
2866         * layout/tableformatting/TableFormattingContext.cpp:
2867         (WebCore::Layout::TableFormattingContext::layout):
2868         (WebCore::Layout::TableFormattingContext::layoutTableCellBox):
2869         (WebCore::Layout::TableFormattingContext::positionTableCells):
2870         (WebCore::Layout::TableFormattingContext::setComputedGeometryForRows):
2871         (WebCore::Layout::TableFormattingContext::setComputedGeometryForSections):
2872         (WebCore::Layout::TableFormattingContext::computedTableWidth):
2873
2874 2019-09-13  Youenn Fablet  <youenn@apple.com>
2875
2876         Use WebProcess processIdentifier to identify Service Worker connections
2877         https://bugs.webkit.org/show_bug.cgi?id=201459
2878
2879         Reviewed by Chris Dumez.
2880
2881         No observable change of behavior.
2882
2883         * workers/service/ServiceWorkerClient.cpp:
2884         (WebCore::ServiceWorkerClient::postMessage):
2885         Pass sessionID to ease NetworkProcess selection of the client process connection.
2886         * workers/service/ServiceWorkerTypes.h:
2887         Mark server connection identifier be process identifier based.
2888         * workers/service/context/SWContextManager.h:
2889         * workers/service/server/SWServer.cpp:
2890         (WebCore::SWServer::Connection::Connection):
2891         * workers/service/server/SWServer.h:
2892         Let connection identifier be set in constructor instead of generated.
2893
2894 2019-09-13  Adrian Perez de Castro  <aperez@igalia.com>
2895
2896         Factor out duplicated functions from HTTPParsers.cpp and HTTPHeaderField.cpp
2897         https://bugs.webkit.org/show_bug.cgi?id=201721
2898
2899         Reviewed by Don Olmstead.
2900
2901         No new tests needed.
2902
2903         * loader/HTTPHeaderField.cpp: Remove "static" from prototypes of functions needed in HTTPParsers.cpp.
2904         (WebCore::RFC7230::isDelimiter):
2905         (WebCore::RFC7230::isQuotedPairSecondOctet):
2906         (WebCore::RFC7230::isCommentText):
2907         * loader/HTTPHeaderField.h: Add prototypes of functions needed in HTTPParsers.cpp.
2908         * platform/network/HTTPParsers.cpp: Use functionality from WebCore::RFC7230 where possible.
2909         (WebCore::skipWhile): Moved to allow implementing skipWhiteSpace() in terms of skipWhile().
2910         (WebCore::skipWhiteSpace): Implement using skipWhile() and the RFC7230::isWhitespace() predicate.
2911         (WebCore::isValidAcceptHeaderValue): Replace usage of isDelimiterCharacter() with RFC7230::isDelimiter().
2912         (WebCore::isValidHTTPToken): Replace usage of isHTTPTokenCharacter() with RFC7230::isTokenCharacter().
2913         (WebCore::skipQuotedPair): Partially reimplement in terms of RFC7230::isQuotedPairSecondOctet().
2914         (WebCore::skipComment): Replace usage of isCommentTextCharacter() with RFC7230::isCommentText().
2915         (WebCore::skipHTTPToken): Replace usage of isHTTPTokenCharacter() with RFC7230::isTokenCharacter().
2916
2917 2019-09-12  Zan Dobersek  <zdobersek@igalia.com>
2918
2919         Unreviewed debug build fix for GLib-based ports.
2920
2921         * platform/glib/UserAgentGLib.cpp: Add the HTTPParsers.h header
2922         inclusion to bring in the isValidUserAgentHeaderValue() declaration as
2923         required for an assertion check.
2924
2925 2019-09-12  Said Abou-Hallawa  <sabouhallawa@apple.com>
2926
2927         SVGLengthValue should use two enums for 'type' and 'mode' instead of one unsigned for 'units'
2928         https://bugs.webkit.org/show_bug.cgi?id=201663
2929
2930         Reviewed by Simon Fraser, Nikolas Zimmermann.
2931
2932         SVGLengthValue had one unsigned to store SVGLengthMode and SVGLengthType.
2933         It used to allocate the least significant 4 bits of this unsigned to the
2934         SVGLengthMode while it leaves the rest for SVGLengthType.
2935
2936         This will not be needed if SVGLengthMode and SVGLengthType are made of
2937         size uint_8.
2938
2939         Also in this patch:
2940
2941         -- SVGLengthNegativeValuesMode is made enum class.
2942
2943         -- SVGLengthValue::blend() is moved to SVGLengthValue.cpp so we do not
2944            need to include SVGLengthContext.h in SVGLengthValue.h.
2945
2946         -- SVGLengthType and SVGLengthMode are moved to SVGLengthValue.h. Instead
2947            of having SVGLengthValue.h includes SVGLengthConttext.h, the opposite
2948            will happen.
2949
2950         -- SVGAnimatedPropertyDescription.h is deleted. It should have been deleted
2951            with the SVG tear off objects removal.
2952
2953         -- SVGPropertyTraits<SVGAngleValue> and SVGPropertyTraits<SVGLengthValue>
2954            are deleted. They should have been deleted with SVGAnimatedType removal.
2955
2956         -- SVGLengthValue::lengthModeForAnimatedLengthAttribute() is deleted. It
2957            was only called from SVGPropertyTraits<SVGLengthValue>.
2958
2959         * WebCore.xcodeproj/project.pbxproj:
2960         * css/StyleResolver.h:
2961         * page/animation/CSSPropertyAnimation.cpp:
2962         (WebCore::blendFunc):
2963         * rendering/style/SVGRenderStyle.h:
2964         (WebCore::SVGRenderStyle::initialBaselineShiftValue):
2965         (WebCore::SVGRenderStyle::initialKerning):
2966         * rendering/svg/RenderSVGEllipse.cpp:
2967         (WebCore::RenderSVGEllipse::calculateRadiiAndCenter):
2968         * rendering/svg/RenderSVGRect.cpp:
2969         (WebCore::RenderSVGRect::updateShapeFromElement):
2970         * rendering/svg/SVGPathData.cpp:
2971         (WebCore::pathFromCircleElement):
2972         (WebCore::pathFromEllipseElement):
2973         (WebCore::pathFromRectElement):
2974         * rendering/svg/SVGTextLayoutEngineBaseline.cpp:
2975         (WebCore::SVGTextLayoutEngineBaseline::calculateBaselineShift const):
2976         * rendering/svg/SVGTextLayoutEngineSpacing.cpp:
2977         (WebCore::SVGTextLayoutEngineSpacing::calculateCSSKerningAndSpacing):
2978         * svg/LinearGradientAttributes.h:
2979         (WebCore::LinearGradientAttributes::LinearGradientAttributes):
2980         * svg/RadialGradientAttributes.h:
2981         (WebCore::RadialGradientAttributes::RadialGradientAttributes):
2982         * svg/SVGAngleValue.h:
2983         (WebCore::SVGPropertyTraits<SVGAngleValue>::initialValue): Deleted.
2984         (WebCore::SVGPropertyTraits<SVGAngleValue>::toString): Deleted.
2985         * svg/SVGCircleElement.cpp:
2986         (WebCore::SVGCircleElement::parseAttribute):
2987         * svg/SVGCircleElement.h:
2988         * svg/SVGCursorElement.cpp:
2989         (WebCore::SVGCursorElement::parseAttribute):
2990         * svg/SVGCursorElement.h:
2991         * svg/SVGEllipseElement.cpp:
2992         (WebCore::SVGEllipseElement::parseAttribute):
2993         * svg/SVGEllipseElement.h:
2994         * svg/SVGFilterElement.cpp:
2995         (WebCore::SVGFilterElement::parseAttribute):
2996         * svg/SVGFilterElement.h:
2997         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2998         (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute):
2999         * svg/SVGFilterPrimitiveStandardAttributes.h:
3000         * svg/SVGForeignObjectElement.cpp:
3001         (WebCore::SVGForeignObjectElement::parseAttribute):
3002         * svg/SVGForeignObjectElement.h:
3003         * svg/SVGImageElement.cpp:
3004         (WebCore::SVGImageElement::parseAttribute):
3005         * svg/SVGImageElement.h:
3006         * svg/SVGLength.h:
3007         (WebCore::SVGLength::unitType const):
3008         (WebCore::SVGLength::setValueForBindings):
3009         (WebCore::SVGLength::newValueSpecifiedUnits):
3010         (WebCore::SVGLength::convertToSpecifiedUnits):
3011         (WebCore::SVGLength::unitType): Deleted.
3012         * svg/SVGLengthContext.cpp:
3013         (WebCore::SVGLengthContext::valueForLength):
3014         (WebCore::SVGLengthContext::convertValueToUserUnits const):
3015         (WebCore::SVGLengthContext::convertValueFromUserUnits const):
3016         (WebCore::SVGLengthContext::convertValueFromUserUnitsToPercentage const):
3017         (WebCore::SVGLengthContext::convertValueFromPercentageToUserUnits const):
3018         * svg/SVGLengthContext.h:
3019         (): Deleted.
3020         * svg/SVGLengthList.h:
3021         (WebCore::SVGLengthList::create):
3022         * svg/SVGLengthValue.cpp:
3023         (WebCore::lengthTypeToString):
3024         (WebCore::parseLengthType):
3025         (WebCore::primitiveTypeToLengthType):
3026         (WebCore::lengthTypeToPrimitiveType):
3027         (WebCore::SVGLengthValue::SVGLengthValue):
3028         (WebCore::SVGLengthValue::construct):
3029         (WebCore::SVGLengthValue::blend):
3030         (WebCore::SVGLengthValue::fromCSSPrimitiveValue):
3031         (WebCore::SVGLengthValue::toCSSPrimitiveValue):
3032         (WebCore::SVGLengthValue::setValueAsString):
3033         (WebCore::SVGLengthValue::valueAsString const):
3034         (WebCore::SVGLengthValue::valueForBindings const):
3035         (WebCore::SVGLengthValue::setValue):
3036         (WebCore::SVGLengthValue::convertToSpecifiedUnits):
3037         (WebCore::storeUnit): Deleted.
3038         (WebCore::extractMode): Deleted.
3039         (WebCore::extractType): Deleted.
3040         (WebCore::SVGLengthValue::operator== const): Deleted.
3041         (WebCore::SVGLengthValue::operator!= const): Deleted.
3042         (WebCore::SVGLengthValue::unitType const): Deleted.
3043         (WebCore::SVGLengthValue::unitMode const): Deleted.
3044         (WebCore::SVGLengthValue::valueAsPercentage const): Deleted.
3045         (WebCore::SVGLengthValue::newValueSpecifiedUnits): Deleted.
3046         (WebCore::SVGLengthValue::lengthModeForAnimatedLengthAttribute): Deleted.
3047         * svg/SVGLengthValue.h:
3048         (WebCore::SVGLengthValue::lengthType const):
3049         (WebCore::SVGLengthValue::lengthMode const):
3050         (WebCore::SVGLengthValue::isZero const):
3051         (WebCore::SVGLengthValue::isRelative const):
3052         (WebCore::SVGLengthValue::valueAsPercentage const):
3053         (WebCore::SVGLengthValue::valueInSpecifiedUnits const):
3054         (WebCore::operator==):
3055         (WebCore::operator!=):
3056         (WebCore::SVGLengthValue::blend const): Deleted.
3057         (WebCore::SVGPropertyTraits<SVGLengthValue>::initialValue): Deleted.
3058         (WebCore::SVGPropertyTraits<SVGLengthValue>::parse): Deleted.
3059         (WebCore::SVGPropertyTraits<SVGLengthValue>::toString): Deleted.
3060         * svg/SVGLineElement.cpp:
3061         (WebCore::SVGLineElement::parseAttribute):
3062         * svg/SVGLineElement.h:
3063         * svg/SVGLinearGradientElement.cpp:
3064         (WebCore::SVGLinearGradientElement::parseAttribute):
3065         * svg/SVGLinearGradientElement.h:
3066         * svg/SVGMarkerElement.cpp:
3067         (WebCore::SVGMarkerElement::parseAttribute):
3068         * svg/SVGMarkerElement.h:
3069         * svg/SVGMaskElement.cpp:
3070         (WebCore::SVGMaskElement::parseAttribute):
3071         * svg/SVGMaskElement.h:
3072         * svg/SVGPatternElement.cpp:
3073         (WebCore::SVGPatternElement::parseAttribute):
3074         * svg/SVGPatternElement.h:
3075         * svg/SVGRadialGradientElement.cpp:
3076         (WebCore::SVGRadialGradientElement::parseAttribute):
3077         * svg/SVGRadialGradientElement.h:
3078         * svg/SVGRectElement.cpp:
3079         (WebCore::SVGRectElement::parseAttribute):
3080         * svg/SVGRectElement.h:
3081         * svg/SVGSVGElement.cpp:
3082         (WebCore::SVGSVGElement::parseAttribute):
3083         (WebCore::SVGSVGElement::hasIntrinsicWidth const):
3084         (WebCore::SVGSVGElement::hasIntrinsicHeight const):
3085         (WebCore::SVGSVGElement::intrinsicWidth const):
3086         (WebCore::SVGSVGElement::intrinsicHeight const):
3087         * svg/SVGSVGElement.h:
3088         * svg/SVGTextContentElement.cpp:
3089         (WebCore::SVGTextContentElement::parseAttribute):
3090         (WebCore::SVGTextContentElement::textLengthAnimated):
3091         * svg/SVGTextContentElement.h:
3092         * svg/SVGTextPathElement.cpp:
3093         (WebCore::SVGTextPathElement::parseAttribute):
3094         * svg/SVGTextPathElement.h:
3095         * svg/SVGTextPositioningElement.h:
3096         * svg/SVGUseElement.cpp:
3097         (WebCore::SVGUseElement::parseAttribute):
3098         * svg/SVGUseElement.h:
3099         * svg/properties/SVGAnimatedPropertyAccessorImpl.h:
3100         * svg/properties/SVGAnimatedPropertyDescription.h: Removed.
3101         * svg/properties/SVGAnimationAdditiveListFunctionImpl.h:
3102         (WebCore::SVGAnimationLengthListFunction::animate):
3103         * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:
3104         (WebCore::SVGAnimationLengthFunction::animate):
3105         * svg/properties/SVGValuePropertyAnimatorImpl.h:
3106         * svg/properties/SVGValuePropertyListAnimatorImpl.h:
3107
3108 2019-09-12  Chris Dumez  <cdumez@apple.com>
3109
3110         Node.replaceChild()'s pre-replacement validations are not done in the right order
3111         https://bugs.webkit.org/show_bug.cgi?id=201741
3112
3113         Reviewed by Geoffrey Garen.
3114
3115         Node.replaceChild()'s pre-replacement validations are not done in the right order (spec order):
3116         - https://dom.spec.whatwg.org/#concept-node-replace
3117
3118         In particular, we do not do check 3 (If child’s parent is not parent, then throw a
3119         "NotFoundError" DOMException.) at the right time, because we were making this check
3120         *after* checkPreReplacementValidity(), instead of *during*.
3121
3122         No new tests, rebaselined existing test.
3123
3124         * dom/ContainerNode.cpp:
3125         (WebCore::checkAcceptChild):
3126         (WebCore::ContainerNode::ensurePreInsertionValidity):
3127         (WebCore::checkPreReplacementValidity):
3128         (WebCore::ContainerNode::replaceChild):
3129
3130 2019-09-12  Ryan Haddad  <ryanhaddad@apple.com>
3131
3132         Unreviewed, rolling out r249801.
3133
3134         Caused two servier worker layout tests to become flaky.
3135
3136         Reverted changeset:
3137
3138         "Use WebProcess processIdentifier to identify Service Worker
3139         connections"
3140         https://bugs.webkit.org/show_bug.cgi?id=201459
3141         https://trac.webkit.org/changeset/249801
3142
3143 2019-09-12  Chris Dumez  <cdumez@apple.com>
3144
3145         [WKTR] Drop TestRunner.setPrivateBrowsingEnabled_DEPRECATED()
3146         https://bugs.webkit.org/show_bug.cgi?id=201546
3147
3148         Reviewed by Alex Christensen.
3149
3150         Drop TestRunner.setPrivateBrowsingEnabled_DEPRECATED() from WebKitTestRunner as it does not do
3151         the right thing for WebKit2 and tests have been rewritten to not use it.
3152
3153         * page/PageGroup.cpp:
3154         (WebCore::PageGroup::addPage):
3155         (WebCore::PageGroup::setSessionIDForTesting): Deleted.
3156         * page/PageGroup.h:
3157         (): Deleted.
3158
3159 2019-09-12  Saam Barati  <sbarati@apple.com>
3160
3161         [WHLSL] Slim down WSLMatrix and inline constructors in native code
3162         https://bugs.webkit.org/show_bug.cgi?id=201568
3163
3164         Reviewed by Robin Morisset.
3165
3166         Before, our WSL Matrix in MSL had templates to figure out how we're 
3167         constructing it. For example, with a list of elements, or a list of
3168         columns. However, we can remove this template code since when we're
3169         emitting Metal code, we know exactly how we're constructing the WSL
3170         matrix. So the NativeFunctionWriter now inlines the proper stores
3171         into the WSLMatrix elements.
3172         
3173         This patch speeds up Metal compile times in boids by ~4ms (16%) with
3174         a p-value of 0.0001.
3175
3176         Covered by existing tests.
3177
3178         * Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.cpp:
3179         (WebCore::WHLSL::Metal::metalCodePrologue):
3180         * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
3181         (WebCore::WHLSL::Metal::inlineNativeFunction):
3182
3183 2019-09-12  Wenson Hsieh  <wenson_hsieh@apple.com>
3184
3185         [Cocoa] Text indicator for an image link on the front page of apple.com looks wrong
3186         https://bugs.webkit.org/show_bug.cgi?id=201724
3187         <rdar://problem/54622894>
3188
3189         Reviewed by Tim Horton.
3190
3191         When computing the bounds of the range (<a>, 0) to (<a>, 1) for a text indicator snapshot where <a> is a link
3192         with a single non-breaking whitespace character, we currently use the text rect of the single space. This leads
3193         to a confusing text indicator, as the resulting snapshot is a tiny blank square in the top left corner of the
3194         link. This problem manifests when starting a drag or showing the system context menu on iOS, or force clicking
3195         or three-finger tapping to show a preview on macOS.
3196
3197         To address this scenario, tweak the heuristic in the case where the text indicator option
3198         TextIndicatorOptionUseBoundingRectAndPaintAllContentForComplexRanges is specified, such that we consider a range
3199         containing only text with whitespaces to be "complex"; additionally, instead of falling back to the range's
3200         bounding rect (which in this case is still tiny), fall back to the common ancestor container's bounding rect,
3201         which encompasses not only the text inside the range but also the element containing the range (in this case,
3202         the anchor element).
3203
3204         Test: fast/text-indicator/text-indicator-empty-link.html
3205
3206         * page/TextIndicator.cpp:
3207         (WebCore::containsOnlyWhiteSpaceText):
3208
3209         Add a helper to determine whether a Range is comprised only of rendered text that only contains whitespace
3210         characters.
3211
3212         (WebCore::initializeIndicator):
3213
3214         See ChangeLog entry above for more detail.
3215
3216 2019-09-12  Brady Eidson  <beidson@apple.com>
3217
3218         PDF exporting on iOS should include URL rects.
3219         <rdar://problem/54900133> and https://bugs.webkit.org/show_bug.cgi?id=201693
3220
3221         Reviewed by Tim Horton.
3222
3223         Turns out that PDF exporting on iOS works fine.
3224
3225         Tracking back through history it was disabled at least pre-2014.
3226
3227         It was almost certainly disabled because it didn't work way back then,
3228         but it works great now.
3229
3230         * platform/graphics/cg/GraphicsContextCG.cpp:
3231         (WebCore::GraphicsContext::setURLForRect): Remove the iOS platform exclusion.
3232
3233 2019-09-12  Adrian Perez de Castro  <aperez@igalia.com>
3234
3235         [GTK][WPE] webkit_settings_set_user_agent() allows content forbidden in HTTP headers
3236         https://bugs.webkit.org/show_bug.cgi?id=201077
3237
3238         Reviewed by Carlos Garcia Campos.
3239
3240         Add a function to validate whether a string contains a valid value
3241         which can be used in a HTTP User-Agent header.
3242
3243         Covered by new WebCore API test HTTPParsers.ValidateUserAgentValues.
3244
3245         * platform/glib/UserAgentGLib.cpp:
3246         (WebCore::standardUserAgent): Assert that the returned string is a valid User-Agent.
3247         (WebCore::standardUserAgentForURL): Ditto.
3248         * platform/network/HTTPParsers.cpp: Added a series of helper functions which skip over
3249         characters of a string, which can be used to scan over the different elements of an
3250         User-Agent value; all of them receive the position from the input string where to start
3251         scanning, updating it to the position right after the scanned item (this follow the
3252         convention already in use by other functions in the source file). Each of them has
3253         been annotated with the RFC number and section which contains the definition of the
3254         scanned item, and the corresponding BNF rules to make the code easier to follow.
3255         (WebCore::skipWhile): Added.
3256         (WebCore::isVisibleCharacter): Added.
3257         (WebCore::isOctectInFieldContentCharacter): Added.
3258         (WebCore::isCommentTextCharacter): Added.
3259         (WebCore::isHTTPTokenCharacter): Added.
3260         (WebCore::isValidHTTPToken): Refactored to use the new isHTTPTokenCharacter()
3261         helper function instead of having the test inside the loop.
3262         (WebCore::skipCharacter): Added.
3263         (WebCore::skipQuotedPair): Added.
3264         (WebCore::skipComment): Added.
3265         (WebCore::skipHTTPToken): Added.
3266         (WebCore::skipUserAgentProduct): Added.
3267         (WebCore::isValidUserAgentHeaderValue): Added.
3268         * platform/network/HTTPParsers.h: Add prototype for isValidUserAgentHeaderValue().
3269
3270 2019-09-12  Mark Lam  <mark.lam@apple.com>
3271
3272         Harden JSC against the abuse of runtime options.
3273         https://bugs.webkit.org/show_bug.cgi?id=201597
3274         <rdar://problem/55167068>
3275
3276         Reviewed by Filip Pizlo.
3277
3278         No new tests.  Covered by existing tests.
3279
3280         Enable Options::useDollarVM before we tell the JSGlobalObject to exposeDollarVM().
3281         The $vm utility is now hardened to require that Options::useDollarVM be
3282         enabled in order for it to be used.
3283
3284         * testing/js/WebCoreTestSupport.cpp:
3285         (WebCoreTestSupport::injectInternalsObject):
3286
3287 2019-09-12  Youenn Fablet  <youenn@apple.com>
3288
3289         Use typed identifiers for IDB connection identifiers
3290         https://bugs.webkit.org/show_bug.cgi?id=201682
3291
3292         Reviewed by Chris Dumez.
3293
3294         Migrate from uint64_t to a typed identifier for IDB connection identifiers.
3295         The identifier is reusing the process identifier type.
3296         No change of behavior.
3297
3298         * Modules/indexeddb/client/IDBConnectionProxy.h:
3299         (WebCore::IDBClient::IDBConnectionProxy::serverConnectionIdentifier const):
3300         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
3301         (WebCore::IDBClient::IDBConnectionToServer::identifier const):
3302         * Modules/indexeddb/client/IDBConnectionToServer.h:
3303         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
3304         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
3305         (WebCore::IDBServer::IDBConnectionToClient::identifier const):
3306         * Modules/indexeddb/server/IDBConnectionToClient.h:
3307         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
3308         * Modules/indexeddb/server/IDBServer.cpp:
3309         (WebCore::IDBServer::IDBServer::getAllDatabaseNames):
3310         (WebCore::IDBServer::IDBServer::performGetAllDatabaseNames):
3311         (WebCore::IDBServer::IDBServer::didGetAllDatabaseNames):
3312         * Modules/indexeddb/server/IDBServer.h:
3313         * Modules/indexeddb/shared/IDBRequestData.cpp:
3314         (WebCore::IDBRequestData::serverConnectionIdentifier const):
3315         * Modules/indexeddb/shared/IDBRequestData.h:
3316         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
3317         (WebCore::IDBResourceIdentifier::IDBResourceIdentifier):
3318         (WebCore::IDBResourceIdentifier::emptyValue):
3319         (WebCore::IDBResourceIdentifier::deletedValue):
3320         (WebCore::IDBResourceIdentifier::isHashTableDeletedValue const):
3321         (WebCore::IDBResourceIdentifier::loggingString const):
3322         * Modules/indexeddb/shared/IDBResourceIdentifier.h:
3323         (WebCore::IDBResourceIdentifier::hash const):
3324         (WebCore::IDBResourceIdentifier::connectionIdentifier const):
3325         (WTF::crossThreadCopy):
3326         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
3327         (WebCore::InProcessIDBServer::identifier const):
3328         * Modules/indexeddb/shared/InProcessIDBServer.h:
3329
3330 2019-09-12  Youenn Fablet  <youenn@apple.com>
3331
3332         Use WebProcess processIdentifier to identify Service Worker connections
3333         https://bugs.webkit.org/show_bug.cgi?id=201459
3334
3335         Reviewed by Chris Dumez.
3336
3337         No observable change of behavior.
3338
3339         * workers/service/ServiceWorkerClient.cpp:
3340         (WebCore::ServiceWorkerClient::postMessage):
3341         Pass sessionID to ease NetworkProcess selection of the client process connection.
3342         * workers/service/ServiceWorkerTypes.h:
3343         Mark server connection identifier be process identifier based.
3344         * workers/service/context/SWContextManager.h:
3345         * workers/service/server/SWServer.cpp:
3346         (WebCore::SWServer::Connection::Connection):
3347         * workers/service/server/SWServer.h:
3348         Let connection identifier be set in constructor instead of generated.
3349
3350 2019-09-11  Youenn Fablet  <youenn@apple.com>
3351
3352         Disable DTLS1.0
3353         https://bugs.webkit.org/show_bug.cgi?id=201679
3354
3355         Reviewed by Alex Christensen.
3356
3357         Add an option to force to use DTLS1.0 and nothing else.
3358         Add internals API to enter in that mode to verify that normal configurations cannot communicate with DTLS1.0.
3359
3360         Test: webrtc/datachannel/dtls10.html
3361
3362         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
3363         (WebCore::LibWebRTCProvider::setEnableWebRTCEncryption):
3364         (WebCore::LibWebRTCProvider::setUseDTLS10):
3365         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
3366         * testing/Internals.cpp:
3367         (WebCore::Internals::setUseDTLS10):
3368         * testing/Internals.h:
3369         * testing/Internals.idl:
3370
3371 2019-09-11  Keith Rollin  <krollin@apple.com>
3372
3373         Log timeoutValue passed on to CFNetwork
3374         https://bugs.webkit.org/show_bug.cgi?id=201701
3375         <rdar://problem/55279683>
3376
3377         Reviewed by Chris Dumez.
3378