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