79dcdc2f790a57cb7cafe57ed0755b6e7b5096c1
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2018-11-15  Justin Fan  <justin_fan@apple.com>
2
3         [WebGPU] WebGPUCommandBuffer prototype
4         https://bugs.webkit.org/show_bug.cgi?id=191663
5
6         Reviewed by Dean Jackson.
7
8         Begin implementation of WebGPUCommandBuffers as well as GPUQueues (MTLCommandBuffer, MTLCommandQueue).
9
10         Test: webgpu/command-buffers.html
11
12         * CMakeLists.txt:
13         * DerivedSources.make:
14         * Modules/webgpu/GPUCommandBuffer.h: Added. Wrapper class around a MTLCommandBuffer.
15         * Modules/webgpu/GPUDevice.cpp:
16         (WebCore::GPUDevice::createCommandBuffer): Added.
17         (WebCore::GPUDevice::getQueue): Returns RefPtr to the device's singleton queue.
18         * Modules/webgpu/GPUDevice.h: Now manages the device's GPUQueue.
19         (WebCore::GPUDevice::platformDevice const):
20         * Modules/webgpu/GPUQueue.h: Added. Wrapper class around a MTLCommandQueue.
21         (WebCore::GPUQueue::platformQueue const):
22         * Modules/webgpu/GPURenderPipeline.h: Moved from Source/WebCore/Modules/webgpu/cocoa/GPURenderPipeline.h.
23         (WebCore::GPURenderPipeline::platformRenderPipeline const):
24         * Modules/webgpu/GPUShaderModule.h:
25         (WebCore::GPUShaderModule::platformShaderModule const):
26         * Modules/webgpu/GPUSwapChain.h: Moved from Source/WebCore/Modules/webgpu/cocoa/GPUSwapChain.h.
27         (WebCore::GPUSwapChain::platformLayer const):
28         * Modules/webgpu/WebGPUCommandBuffer.cpp: Added. Web interface for a GPU device's command buffer.
29         (WebCore::WebGPUCommandBuffer::create):
30         (WebCore::WebGPUCommandBuffer::WebGPUCommandBuffer):
31         * Modules/webgpu/WebGPUCommandBuffer.h: Added.
32         * Modules/webgpu/WebGPUCommandBuffer.idl: Added.
33         * Modules/webgpu/WebGPUDevice.cpp:
34         (WebCore::WebGPUDevice::createCommandBuffer const): Added.
35         * Modules/webgpu/WebGPUDevice.h:
36         * Modules/webgpu/WebGPUDevice.idl:
37         * Modules/webgpu/cocoa/GPUCommandBufferMetal.mm: Added. MTLCommandBuffer impl for GPUCommandBuffer.
38         (WebCore::GPUCommandBuffer::create): Create a MTLCommandBuffer from the MTLCommandQueue.
39         (WebCore::GPUCommandBuffer::GPUCommandBuffer):
40         * Modules/webgpu/cocoa/GPUDeviceMetal.mm:
41         (WebCore::GPUDevice::GPUDevice):
42         * Modules/webgpu/cocoa/GPUQueueMetal.mm: Added. MTLCommandQueue impl for GPUQueue.
43         (WebCore::GPUQueue::create):
44         (WebCore::GPUQueue::GPUQueue):
45         * Modules/webgpu/cocoa/GPURenderPipelineMetal.mm:
46         (WebCore::GPURenderPipeline::GPURenderPipeline):
47         * Modules/webgpu/cocoa/GPUShaderModuleMetal.mm:
48         (WebCore::GPUShaderModule::create):
49         (WebCore::GPUShaderModule::GPUShaderModule):
50         * Sources.txt:
51         * SourcesCocoa.txt:
52         * WebCore.xcodeproj/project.pbxproj:
53         * bindings/js/WebCoreBuiltinNames.h:
54
55 2018-11-15  Oriol Brufau  <obrufau@igalia.com>
56
57         [css-logical] Implement flow-relative margin, padding and border shorthands
58         https://bugs.webkit.org/show_bug.cgi?id=188697
59
60         Reviewed by Simon Fraser and Antti Koivisto.
61
62         Tests: imported/w3c/web-platform-tests/css/css-logical/logical-box-border-color.html
63                imported/w3c/web-platform-tests/css/css-logical/logical-box-border-shorthands.html
64                imported/w3c/web-platform-tests/css/css-logical/logical-box-border-style.html
65                imported/w3c/web-platform-tests/css/css-logical/logical-box-border-width.html
66                imported/w3c/web-platform-tests/css/css-logical/logical-box-margin.html
67                imported/w3c/web-platform-tests/css/css-logical/logical-box-padding.html
68                webexposed/css-properties-as-js-properties.html
69                webexposed/css-properties-behind-flags.html
70                webexposed/css-property-listing.html
71
72         * css/CSSComputedStyleDeclaration.cpp:
73         (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
74         Allow the new properties to serialize their computed value.
75
76         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesFor2SidesShorthand):
77         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesFor4SidesShorthand):
78         * css/CSSComputedStyleDeclaration.h:
79         Rename getCSSPropertyValuesForSidesShorthand to getCSSPropertyValuesFor4SidesShorthand,
80         and add analogous getCSSPropertyValuesFor2SidesShorthand for serializing 2-sided
81         shorthands.
82
83         * css/CSSProperties.json:
84         Add the new properties behind the CSSLogicalEnabled runtime flag.
85
86         * css/CSSStyleDeclaration.cpp:
87         (WebCore::CSSStyleDeclaration::supportedPropertyNames const):
88         Prevent CSS properties disabled behind a runtime flag from being exposed in
89         style declarations.
90
91         * css/StyleProperties.cpp:
92         (WebCore::StyleProperties::getPropertyValue const):
93         Allow the new properties to serialize their specified value.
94
95         (WebCore::StyleProperties::get2Values const):
96         Add get2Values, analogous to get4Values, for serializing 2-sided shorthands.
97
98         (WebCore::StyleProperties::borderPropertyValue const):
99         Allow borderPropertyValue to serialize arbitrary multi-sided border shorthands
100         corresponding to width, style and color.
101
102         (WebCore::MutableStyleProperties::setProperty):
103         Prevent CSS properties disabled behind a runtime flag from being set a value.
104
105         (WebCore::StyleProperties::asText const):
106         Allow the new properties to be serialized in cssText.
107         Prevent CSS shorthands disabled behind a runtime flag from appearing in cssText,
108         and serialize the longhands instead. Note that there could be another shorthand
109         available which is enabled, but a proper solution would require bug 190496.
110
111         * css/StyleProperties.h:
112         Update declarations of borderPropertyValue and get2Values.
113
114         * css/makeprop.pl:
115         (addProperty):
116         Add isEnabledCSSProperty function for checking that a CSS property is not
117         disabled behind a runtime flag.
118
119         * css/parser/CSSPropertyParser.cpp:
120         (WebCore::cssPropertyID):
121         Prevent CSS properties disabled behind a runtime flag from being exposed in
122         computed styles.
123
124         (WebCore::CSSPropertyParser::addProperty):
125         Prevent CSS properties disabled behind a runtime flag from being set a value.
126
127         (WebCore::CSSPropertyParser::consumeBorder):
128         Change consumeBorder to provide the caller with the parsed values instead of
129         setting properties. Then the caller can decide to which properties the values
130         should be set, and whether border-image should be reset or not.
131
132         (WebCore::CSSPropertyParser::consume2ValueShorthand):
133         (WebCore::CSSPropertyParser::consume4ValueShorthand):
134         Rename consume4Values to consume4ValueShorthand, and add analogous
135         consume2ValueShorthand for parsing shorthands with two longhands.
136
137         (WebCore::CSSPropertyParser::parseShorthand):
138         Allow the new properties to be parsed.
139
140         * css/parser/CSSPropertyParser.h:
141         Update declarations of consumeBorder, consume2ValueShorthand and
142         consume4ValueShorthand.
143
144         * inspector/agents/InspectorCSSAgent.cpp:
145         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
146         Prevent CSS properties disabled behind a runtime flag from being exposed in
147         the CSS inspector tool.
148
149         * page/RuntimeEnabledFeatures.h:
150         (WebCore::RuntimeEnabledFeatures::setCSSLogicalEnabled):
151         (WebCore::RuntimeEnabledFeatures::cssLogicalEnabled const):
152         Add the CSSLogicalEnabled runtime flag.
153
154 2018-11-15  Truitt Savell  <tsavell@apple.com>
155
156         Unreviewed, rolling out r238220.
157
158         Introduced failing tests to iOS and is slowing down EWS
159
160         Reverted changeset:
161
162         "[css-grid] Consider scrollbars in
163         populateGridPositionsForDirection()"
164         https://bugs.webkit.org/show_bug.cgi?id=191656
165         https://trac.webkit.org/changeset/238220
166
167 2018-11-15  Jiewen Tan  <jiewen_tan@apple.com>
168
169         [WebAuthN] PublicKeyCredentialCreationOptions::AuthenticatorSelectionCriteria::AuthenticatorAttachment should be optional
170         https://bugs.webkit.org/show_bug.cgi?id=191522
171
172         Reviewed by Brent Fulgham.
173
174         Accordign to the WebIDL, AuthenticatorSelectionCriteria::AuthenticatorAttachment should be optional.
175         https://www.w3.org/TR/webauthn/#dictdef-authenticatorselectioncriteria
176
177         Covered by existing tests.
178
179         * Modules/webauthn/PublicKeyCredentialCreationOptions.h:
180         (WebCore::PublicKeyCredentialCreationOptions::AuthenticatorSelectionCriteria::decode):
181
182 2018-11-15  Ross Kirsling  <ross.kirsling@sony.com>
183
184         DragImage should have a complete default implementation
185         https://bugs.webkit.org/show_bug.cgi?id=191666
186
187         Reviewed by Dean Jackson.
188
189         Move WPE's stub implementation down into the base implementation file.
190
191         * SourcesWPE.txt:
192         * platform/DragImage.cpp:
193         (WebCore::dragImageSize):
194         (WebCore::deleteDragImage):
195         (WebCore::scaleDragImage):
196         (WebCore::dissolveDragImageToFraction):
197         (WebCore::createDragImageFromImage):
198         (WebCore::createDragImageIconForCachedImageFilename):
199         (WebCore::createDragImageForLink):
200         * platform/wpe/DragImageWPE.cpp: Removed.
201
202 2018-11-15  Jiewen Tan  <jiewen_tan@apple.com>
203
204         [WebAuthN] UserHandle can be null
205         https://bugs.webkit.org/show_bug.cgi?id=191521
206
207         Reviewed by Alex Christensen.
208
209         According to the newest spec as of 7 August, 2018: https://www.w3.org/TR/webauthn/#conforming-authenticators-u2f.
210         UserHandle can now be null.
211
212         Covered by existing tests.
213
214         * Modules/webauthn/AuthenticatorAssertionResponse.h:
215         (WebCore::AuthenticatorAssertionResponse::create):
216         (WebCore::AuthenticatorAssertionResponse::userHandle const):
217         (WebCore::AuthenticatorAssertionResponse::AuthenticatorAssertionResponse):
218         * Modules/webauthn/AuthenticatorAssertionResponse.idl:
219         * Modules/webauthn/PublicKeyCredential.cpp:
220         (WebCore::PublicKeyCredential::tryCreate):
221         * Modules/webauthn/PublicKeyCredentialData.h:
222         (WebCore::PublicKeyCredentialData::encode const):
223         (WebCore::PublicKeyCredentialData::decode):
224         * Modules/webauthn/fido/DeviceResponseConverter.cpp:
225         (fido::readCTAPGetAssertionResponse):
226
227 2018-11-15  Youenn Fablet  <youenn@apple.com>
228
229         Modernize RTCPeerConnection handling of pendingActivity
230         https://bugs.webkit.org/show_bug.cgi?id=191661
231
232         Reviewed by Eric Carlson.
233
234         makePendingActivity is the modern way to handle set/unset of pending activity.
235         No change of behavior.
236
237         * Modules/mediastream/RTCPeerConnection.cpp:
238         (WebCore::RTCPeerConnection::create):
239         (WebCore::RTCPeerConnection::doStop):
240         * Modules/mediastream/RTCPeerConnection.h:
241
242 2018-11-15  Keith Rollin  <krollin@apple.com>
243
244         Delete old .xcfilelist files
245         https://bugs.webkit.org/show_bug.cgi?id=191669
246         <rdar://problem/46081994>
247
248         Reviewed by Chris Dumez.
249
250         .xcfilelist files were created and added to the Xcode project files in
251         https://trac.webkit.org/changeset/238008/webkit. However, they caused
252         build issues and they were removed from the Xcode projects in
253         https://trac.webkit.org/changeset/238055/webkit. This check-in removes
254         the files from the repository altogether. They'll ultimately be
255         replaced with new files with names that indicate whether the
256         associated files are inputs to the Run Script phase or are files
257         created by the Run Script phase.
258
259         No new tests -- no changed functionality.
260
261         * DerivedSources.xcfilelist: Removed.
262         * UnifiedSources.xcfilelist: Removed.
263
264 2018-11-15  Youenn Fablet  <youenn@apple.com>
265
266         Update RTCPeerConnection JS built-ins to be closer to specWe
267         https://bugs.webkit.org/show_bug.cgi?id=191665
268
269         Reviewed by Eric Carlson.
270
271         Simplify JS built-ins since we no longer need to support callback versions of the API.
272         Make sure to have the right number of parameters in the JS built-in functions.
273         Make some simplification to the code.
274         Covered by existing tests and rebased test.
275
276         * Modules/mediastream/RTCPeerConnection.js:
277         (createOffer):
278         (createAnswer):
279         (setLocalDescription):
280         (setRemoteDescription):
281         (addIceCandidate):
282         * Modules/mediastream/RTCPeerConnectionInternals.js:
283         (enqueueOperation):
284         (callbacksAndDictionaryOverload): Deleted.
285
286 2018-11-15  Simon Fraser  <simon.fraser@apple.com>
287
288         REGRESSION(r238090): Composited iframe contents disappear after switching tabs in Safari
289         https://bugs.webkit.org/show_bug.cgi?id=191673
290         rdar://problem/46083440
291
292         Reviewed by Antti Koivisto.
293
294         Switching tabs in Safari triggers the "setIsInWindow" code path, that detaches the layer
295         tree for every Frame. They get re-attached on tab show, and for subframes this involves
296         the triggering of a fake style recalc in the parent document via scheduleInvalidateStyleAndLayerComposition().
297         
298         The style diff that's sent to RenderLayerCompositor::layerStyleChanged() as a result of that
299         fake style recalc is RecompositeLayer, but the code was failing to trigger the necessary
300         layer configuration update that gets iframe layers parented.
301         
302         This stop-gap patch triggers layer config updates on every RecompositeLayer diff. A future
303         patch will optimize this, and add a layout test.
304
305         * rendering/RenderLayerCompositor.cpp:
306         (WebCore::RenderLayerCompositor::layerStyleChanged):
307
308 2018-11-15  Zalan Bujtas  <zalan@apple.com>
309
310         [LFC][IFC] Skip non-inflow boxes while splitting the inline runs.
311         https://bugs.webkit.org/show_bug.cgi?id=191690
312
313         Reviewed by Antti Koivisto.
314
315         Skip all non-inflow boxes (floats, out-of-flow positioned elements). They don't participate in the inline run context.
316
317         * layout/Verification.cpp:
318         (WebCore::Layout::LayoutState::verifyAndOutputMismatchingLayoutTree const):
319         * layout/inlineformatting/InlineFormattingContext.cpp:
320         (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
321
322 2018-11-15  Zalan Bujtas  <zalan@apple.com>
323
324         [LFC] FormattingContext base class should not declare computeStaticPosition.
325         https://bugs.webkit.org/show_bug.cgi?id=191683
326
327         Reviewed by Antti Koivisto.
328
329         Apparently only BlockFormattingContext uses it.
330
331         * layout/FormattingContext.h:
332         * layout/blockformatting/BlockFormattingContext.h:
333         * layout/inlineformatting/InlineFormattingContext.cpp:
334         (WebCore::Layout::InlineFormattingContext::computeStaticPosition const): Deleted.
335         * layout/inlineformatting/InlineFormattingContext.h:
336
337 2018-11-14  Zalan Bujtas  <zalan@apple.com>
338
339         [LFC][IFC] Add support for in-flow positioned inline boxes.
340         https://bugs.webkit.org/show_bug.cgi?id=191672
341
342         Reviewed by Antti Koivisto.
343
344         We might offset the in-flow positioned runs differently once runs are moved over to the display tree.
345
346         Test: fast/inline/simple-inline-inflow-positioned.html
347
348         * layout/Verification.cpp:
349         (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
350         * layout/inlineformatting/InlineFormattingContext.cpp:
351         (WebCore::Layout::InlineFormattingContext::splitInlineRunsIfNeeded const):
352         (WebCore::Layout::InlineFormattingContext::postProcessInlineRuns const):
353         (WebCore::Layout::InlineFormattingContext::placeInFlowPositionedChildren const):
354         (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
355         * layout/inlineformatting/InlineFormattingContext.h:
356         * layout/inlineformatting/InlineRun.h:
357         (WebCore::Layout::InlineRun::moveVertically):
358         * layout/layouttree/LayoutTreeBuilder.cpp:
359         (WebCore::Layout::outputInlineRuns):
360
361 2018-11-15  Thibault Saunier  <tsaunier@igalia.com>
362
363         [GStreamer][WebRTC] Add support for sending silence or silencing an incoming track
364         https://bugs.webkit.org/show_bug.cgi?id=191631
365
366         Reviewed by Xabier Rodriguez-Calvar.
367
368         This will be tested once webkit.org/b/186933 is implemented.
369
370         * platform/mediastream/gstreamer/RealtimeIncomingAudioSourceLibWebRTC.cpp:
371         (WebCore::RealtimeIncomingAudioSourceLibWebRTC::OnData):
372         * platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.cpp:
373         (WebCore::RealtimeOutgoingAudioSourceLibWebRTC::pullAudioData):
374
375 2018-11-15  Antti Koivisto  <antti@apple.com>
376
377         REGRESSION(r238178): fast/forms/access-key-mutated.html and fast/forms/access-key-case-insensitive.html are timing out
378         https://bugs.webkit.org/show_bug.cgi?id=191642
379
380         Reviewed by Zalan Bujtas.
381
382         Invalidate access key map even when thorttling style recalcs.
383
384         * dom/Document.cpp:
385         (WebCore::Document::scheduleStyleRecalc):
386
387 2018-11-15  Antti Koivisto  <antti@apple.com>
388
389         Remove fonts from CSSFontFaceSet safely
390         https://bugs.webkit.org/show_bug.cgi?id=191676
391
392         Reviewed by Zalan Bujtas.
393
394         Test: fast/text/font-face-set-remove-safely.html
395
396         * css/CSSFontFaceSet.cpp:
397         (WebCore::CSSFontFaceSet::remove):
398
399 2018-11-15  Manuel Rego Casasnovas  <rego@igalia.com>
400
401         [css-grid] Consider scrollbars in populateGridPositionsForDirection()
402         https://bugs.webkit.org/show_bug.cgi?id=191656
403
404         Reviewed by Javier Fernandez.
405
406         We never care about scrollbars in RenderGrid::populateGridPositionsForDirection(),
407         that's fine if the scrollbars are at the end (e.g. on the right in horizontal writing mode and LTR direction)
408         but it causes problems when they're at the beginning (e.g. on the left in horizontal writing mode and RTL direction).
409
410         The patch modifies the method so it takes into account scrollbar size
411         in order to compute the position of the columns/rows depending on the direction and the writing mode.
412
413         Tests: imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-001.html
414                imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-vertical-lr-001.html
415                imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-vertical-rl-001.html
416
417         * rendering/RenderGrid.cpp:
418         (WebCore::RenderGrid::populateGridPositionsForDirection):
419
420 2018-11-14  Keith Rollin  <krollin@apple.com>
421
422         Move scripts for Derived and Unified Sources to external files
423         https://bugs.webkit.org/show_bug.cgi?id=191670
424         <rdar://problem/46082278>
425
426         Reviewed by Keith Miller.
427
428         Move the scripts in the Generate Derived Sources and Generate Unified
429         Sources Run Script phases from the Xcode projects to external shell
430         script files. Then invoke those scripts from the Run Script phases.
431         This refactoring is being performed to support later work that will
432         invoke these scripts in other contexts.
433
434         The scripts were maintained as-is when making the move. I did a little
435         reformatting and added 'set -e' to the top of each file, but that's
436         it.
437
438         No new tests -- no changed functionality.
439
440         * Scripts/generate-derived-sources.sh: Added.
441         * Scripts/generate-unified-sources.sh: Added.
442         * WebCore.xcodeproj/project.pbxproj:
443
444 2018-11-14  Keith Rollin  <krollin@apple.com>
445
446         Fix #end vs. #endif typo.
447         https://bugs.webkit.org/show_bug.cgi?id=191668
448         <rdar://problem/46081704>
449
450         Reviewed by Alexey Proskuryakov.
451
452         Source/WebCore/SourcesCocoa.txt had a #end that should have been a
453         #endif. Fix this, an add a check to generate-unified-source-bundles.rb
454         to detect similar typos.
455
456         No new tests -- no changed functionality.
457
458         * SourcesCocoa.txt:
459
460 2018-11-14  Keith Rollin  <krollin@apple.com>
461
462         Remove VideoFullscreenLayerManager.mm from WebCore/SourcesCocoa.txt
463         https://bugs.webkit.org/show_bug.cgi?id=191667
464         <rdar://problem/46081286>
465
466         Reviewed by Eric Carlson.
467
468         VideoFullscreenLayerManager.mm no longer exists.
469
470         No new tests -- No changed functionality.
471
472         * SourcesCocoa.txt:
473
474 2018-11-14  Timothy Hatcher  <timothy@apple.com>
475
476         Enabled dark mode CSS support by default.
477         https://bugs.webkit.org/show_bug.cgi?id=191609
478         rdar://problem/46046861
479
480         Reviewed by Megan Gardner.
481
482         * page/RuntimeEnabledFeatures.h: Set m_isDarkModeCSSEnabled to true.
483
484 2018-11-14  Timothy Hatcher  <timothy@apple.com>
485
486         Default the view background color and text color to different values when in dark mode.
487         https://bugs.webkit.org/show_bug.cgi?id=191607
488         rdar://problem/46045854
489
490         Reviewed by Dean Jackson.
491
492         Test: css-dark-mode/default-colors.html
493
494         * css/html.css:
495         (html): Set color: text on macOS.
496         * dom/Document.cpp:
497         (WebCore::Document::processSupportedColorSchemes): Call recalculateBaseBackgroundColor().
498         * editing/EditingStyle.cpp:
499         (WebCore::caretColorFromStyle): Added.
500         (WebCore::EditingStyle::prepareToApplyAt): Use equalIgnoringSemanticColor. Check for
501         caret-color directly since removeEquivalentProperties fails with semantic colors.
502         (WebCore::extractPropertiesNotIn): Use equalIgnoringSemanticColor. Check for caret-color
503         directly since removeEquivalentProperties fails with semantic colors.
504         * page/Frame.cpp:
505         (WebCore::Frame::createView): Drop backgroundColor.
506         * page/Frame.h:
507         * page/FrameView.cpp:
508         (WebCore::FrameView::recalculateBaseBackgroundColor): Added.
509         (WebCore::FrameView::updateBackgroundRecursively): Drop backgroundColor argument.
510         Calculate the backgroundColor based on the transparent argument only.
511         * page/FrameView.h:
512         * platform/graphics/Color.h:
513         (WebCore::equalIgnoringSemanticColor): Added for EditingStyle.
514         * rendering/RenderBox.cpp:
515         (WebCore::RenderBox::styleDidChange): Call recalculateBaseBackgroundColor().
516         * rendering/RenderLayerBacking.cpp:
517         (WebCore::RenderLayerBacking::shouldDumpPropertyForLayer const): Use isWhiteColor()
518         since it ignores the semantic color flag.
519         * testing/Internals.cpp:
520         (WebCore::Internals::setViewIsTransparent): Drop backgroundColor.
521         (WebCore::Internals::viewBaseBackgroundColor): Added.
522         * testing/Internals.h:
523         * testing/Internals.idl: Added viewBaseBackgroundColor.
524
525 2018-11-14  Justin Fan  <justin_fan@apple.com>
526
527         [WebGPU] Code quality concerns raised for 191291: [WebGPU] Experimental prototype for WebGPURenderPipeline and WebGPUSwapChain
528         https://bugs.webkit.org/show_bug.cgi?id=191383
529
530         Reviewed by Dean Jackson.
531
532         Covered by existing WebGPU tests introduced in original patch.
533
534         * Modules/webgpu/GPUDevice.h:
535         * Modules/webgpu/GPUPipelineStageDescriptor.h:
536         * Modules/webgpu/GPURenderPipelineDescriptor.h: Now a base struct with a guaranteed vertex stage member.
537         (): Refactored into enum class.
538         (WebCore::GPURenderPipelineDescriptor::GPURenderPipelineDescriptor): Removed in favor of init-list construction.
539         (WebCore::GPURenderPipelineDescriptor::primitiveTopology): Now a proper enum class member.
540         * Modules/webgpu/GPUShaderModule.h:
541         * Modules/webgpu/WebGPUDevice.cpp:
542         (WebCore::WebGPUDevice::createRenderPipeline const):
543         * Modules/webgpu/WebGPUShaderModule.h:
544         (WebCore::WebGPUShaderModule::module const):
545         * Modules/webgpu/WebGPUShaderStage.h: Replaced enum with constants to better reflect IDL.
546         * Modules/webgpu/cocoa/GPURenderPipeline.h:
547         * Modules/webgpu/cocoa/GPURenderPipelineMetal.mm:
548         (WebCore::setFunctionsForPipelineDescriptor):
549         (WebCore::GPURenderPipeline::create):
550         * Modules/webgpu/cocoa/GPUSwapChain.h:
551         * WebCore.xcodeproj/project.pbxproj: Removed GPUPipelineDescriptorBase.
552
553 2018-11-14  Joseph Pecoraro  <pecoraro@apple.com>
554
555         Web Inspector: Pass Inspector::FrontendChannel as a reference connect/disconnect methods
556         https://bugs.webkit.org/show_bug.cgi?id=191612
557
558         Reviewed by Matt Baker.
559
560         * inspector/InspectorController.cpp:
561         (WebCore::InspectorController::connectFrontend):
562         (WebCore::InspectorController::disconnectFrontend):
563         (WebCore::InspectorController::show):
564         * inspector/InspectorController.h:
565         * inspector/WorkerInspectorController.cpp:
566         (WebCore::WorkerInspectorController::connectFrontend):
567         (WebCore::WorkerInspectorController::disconnectFrontend):
568         * page/PageDebuggable.cpp:
569         (WebCore::PageDebuggable::connect):
570         (WebCore::PageDebuggable::disconnect):
571         * page/PageDebuggable.h:
572         * testing/Internals.cpp:
573         (WebCore::InspectorStubFrontend::InspectorStubFrontend):
574         (WebCore::InspectorStubFrontend::closeWindow):
575         * workers/service/context/ServiceWorkerDebuggable.cpp:
576         (WebCore::ServiceWorkerDebuggable::connect):
577         (WebCore::ServiceWorkerDebuggable::disconnect):
578         * workers/service/context/ServiceWorkerDebuggable.h:
579         * workers/service/context/ServiceWorkerInspectorProxy.cpp:
580         (WebCore::ServiceWorkerInspectorProxy::connectToWorker):
581         (WebCore::ServiceWorkerInspectorProxy::disconnectFromWorker):
582         * workers/service/context/ServiceWorkerInspectorProxy.h:
583
584 2018-11-14  Timothy Hatcher  <timothy@apple.com>
585
586         Update prefers-color-scheme media query matching based on GitHub issue #3278.
587         https://bugs.webkit.org/show_bug.cgi?id=191654
588         rdar://problem/46074307
589
590         Reviewed by Simon Fraser.
591
592         Test: css-dark-mode/prefers-color-scheme.html
593
594         * css/MediaQueryEvaluator.cpp:
595         (WebCore::prefersColorSchemeEvaluate): Return true when there is no value. Return false
596         for `no-preference` since there is no macOS option for no user preference.
597         * css/MediaQueryExpression.cpp:
598         (WebCore::isFeatureValidWithoutValue): Added prefers-color-scheme.
599
600 2018-11-14  Devin Rousso  <drousso@apple.com>
601
602         Web Inspector: Canvas: send a call stack with each action instead of an array of call frames
603         https://bugs.webkit.org/show_bug.cgi?id=191628
604
605         Reviewed by Dean Jackson.
606
607         Updated existing test: inspector/model/recording.html
608
609         * inspector/InspectorCanvas.h:
610         * inspector/InspectorCanvas.cpp:
611         (WebCore::InspectorCanvas::indexForData):
612         (WebCore::InspectorCanvas::buildInitialState):
613         (WebCore::InspectorCanvas::buildAction):
614         Drive-by: prevent de-duplicated objects from being destroyed while recording.
615
616 2018-11-14  Stephan Szabo  <stephan.szabo@sony.com>
617
618         [Win] Compile Service Worker support
619         https://bugs.webkit.org/show_bug.cgi?id=191409
620
621         Reviewed by Youenn Fablet.
622
623         Fix compilation errors when ENABLE(SERVICE_WORKER)
624         on Windows with clang-cl. Clang on dllexport
625         platforms does not support specifying the
626         dllexport on both a class and members of the class
627         and unistd.h isn't provided but also appeared to
628         not be used.
629
630         No new tests, should be covered by existing tests.
631
632         * workers/service/ServiceWorkerProvider.h:
633         * workers/service/context/SWContextManager.cpp:
634
635 2018-11-14  Joseph Pecoraro  <pecoraro@apple.com>
636
637         Web Inspector: Keep Web Inspector window alive across process swaps (PSON) (Remote Inspector)
638         https://bugs.webkit.org/show_bug.cgi?id=191494
639         <rdar://problem/45469854>
640
641         Reviewed by Devin Rousso.
642
643         * inspector/InspectorClient.h:
644         (WebCore::InspectorClient::allowRemoteInspectionToPageDirectly const):
645         Provide a hook so that a client may wish to allow direct remote inspection of the Page.
646         This is used by WebKitLegacy only.
647
648         * page/Page.cpp:
649         (Page::Page):
650         Only enable the PageDebuggable if the client wishes remote inspection of the Page directly.
651         This is used by WebKitLegacy only.
652
653         * inspector/InspectorController.cpp:
654         (WebCore::InspectorController::connectFrontend):
655         * inspector/InspectorController.h:
656         * page/PageDebuggable.cpp:
657         (WebCore::PageDebuggable::connect):
658         (WebCore::PageDebuggable::disconnect):
659         * page/PageDebuggable.h:
660         When a frontend connects, always enable the developer extras for the Page.
661         This is pretty much only for the remote path, which allows inspection if developer
662         extras were not already enabled (iOS). This simplifies the logic, and toggling
663         developer extras after it was already enabled is not really important.
664
665 2018-11-14  Per Arne Vollan  <pvollan@apple.com>
666
667         REGRESSION (WEBPROCESS_WINDOWSERVER_BLOCKING): requestAnimationFrame Stops Completing
668         https://bugs.webkit.org/show_bug.cgi?id=190884
669
670         Reviewed by Dean Jackson.
671
672         Only notify display refresh monitors with matching display ID.
673
674         Test: fast/animation/request-animation-frame-in-two-pages.html
675
676         * platform/graphics/DisplayRefreshMonitorManager.cpp:
677         (WebCore::DisplayRefreshMonitorManager::displayWasUpdated):
678         * platform/graphics/DisplayRefreshMonitorManager.h:
679
680 2018-11-14  Youenn Fablet  <youenn@apple.com>
681
682         Convert libwebrtc error types to DOM exceptions
683         https://bugs.webkit.org/show_bug.cgi?id=191590
684
685         Reviewed by Alex Christensen.
686
687         Make use of overloaded callback method that provides an error type.
688         This type is then used to create a DOM exception with the correct type.
689         Covered by existing tests.
690
691         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
692         (WebCore::LibWebRTCMediaEndpoint::doSetRemoteDescription):
693         (WebCore::LibWebRTCMediaEndpoint::createSessionDescriptionFailed):
694         (WebCore::LibWebRTCMediaEndpoint::setLocalSessionDescriptionFailed):
695         (WebCore::LibWebRTCMediaEndpoint::setRemoteSessionDescriptionFailed):
696         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
697         * Modules/mediastream/libwebrtc/LibWebRTCObservers.h:
698         (WebCore::toExceptionCode):
699
700 2018-11-14  Youenn Fablet  <youenn@apple.com>
701
702         Allow to remove MediaStreamPrivate observers when iterating over observers
703         https://bugs.webkit.org/show_bug.cgi?id=187256
704
705         Reviewed by Eric Carlson.
706
707         Migrate the observer list from a Vector to a HashSet.
708         This is more robust to multiple observing and keeping of order of observers is not required.
709         Copy the set of observers to a vector before iterating over it.
710         This allows to remove an observer while iterating, which is now used in UserMediaRequest.
711
712         Covered by existing tests.
713
714         * Modules/mediastream/UserMediaRequest.cpp:
715         (WebCore::UserMediaRequest::mediaStreamIsReady):
716         * platform/mediastream/MediaStreamPrivate.cpp:
717         (WebCore::MediaStreamPrivate::addObserver):
718         (WebCore::MediaStreamPrivate::removeObserver):
719         (WebCore::MediaStreamPrivate::forEachObserver const):
720         (WebCore::MediaStreamPrivate::updateActiveState):
721         (WebCore::MediaStreamPrivate::addTrack):
722         (WebCore::MediaStreamPrivate::removeTrack):
723         (WebCore::MediaStreamPrivate::characteristicsChanged):
724         * platform/mediastream/MediaStreamPrivate.h:
725
726 2018-11-14  Youenn Fablet  <youenn@apple.com>
727
728         Calling removeTrack on different RTCPeerConnection should throw InvalidAccessError
729         https://bugs.webkit.org/show_bug.cgi?id=191603
730
731         Reviewed by Chris Dumez.
732
733         Make sure to check that the sender peer connection backend is matching.
734         Covered by rebased WPT test.
735
736         * Modules/mediastream/RTCPeerConnection.cpp:
737         (WebCore::RTCPeerConnection::removeTrack):
738         * Modules/mediastream/RTCRtpSender.cpp:
739         (WebCore::RTCRtpSender::isCreatedBy const):
740         * Modules/mediastream/RTCRtpSender.h:
741
742 2018-11-14  Fujii Hironori  <Hironori.Fujii@sony.com>
743
744         [curl] Unify CookieJarCurlDatabase and the abstract class CookieJarCurl
745         https://bugs.webkit.org/show_bug.cgi?id=191620
746
747         Reviewed by Alex Christensen.
748
749         Remove a abstract class CookieJarCurl which is not needed anymore.
750         And, rename CookieJarCurlDatabase to CookieJarCurl.
751
752         No new tests because there's no behaviour change in WebCore.
753
754         * platform/Curl.cmake: Replaced CookieJarCurlDatabase.cpp with CookieJarCurl.cpp.
755         * platform/network/curl/CookieJarCurl.cpp: Renamed from Source/WebCore/platform/network/curl/CookieJarCurlDatabase.cpp.
756         * platform/network/curl/CookieJarCurl.h: Merged CookieJarCurl.h and CookieJarCurlDatabase.h.
757         * platform/network/curl/CookieJarCurlDatabase.h: Removed.
758         * platform/network/curl/NetworkStorageSessionCurl.cpp:
759         (WebCore::NetworkStorageSession::NetworkStorageSession): Replaced CookieJarCurlDatabase with CookieJarCurl.
760
761 2018-11-14  Christopher Reid  <chris.reid@sony.com>
762
763         [WPE] Remove glib usage in PlatformKeyboardEventWPE.cpp
764         https://bugs.webkit.org/show_bug.cgi?id=191606
765
766         Reviewed by Michael Catanzaro.
767
768         No behavior change.
769
770         Use StringBuilder::append(UChar32) as a generic way to convert a uint32_t code point to WTFString.
771
772         * platform/wpe/PlatformKeyboardEventWPE.cpp:
773         (WebCore::PlatformKeyboardEvent::keyValueForWPEKeyCode):
774         (WebCore::PlatformKeyboardEvent::singleCharacterString):
775
776 2018-11-13  Zalan Bujtas  <zalan@apple.com>
777
778         [LFC][IFC] Construct dedicated runs when the inline element requires it (part 2)
779         https://bugs.webkit.org/show_bug.cgi?id=191623
780
781         Reviewed by Antti Koivisto.
782
783         This patch expands the breaking behaviour to support separate start/end breaks.
784
785         <span>parent </span><span style="padding: 10px;">start<span> middle </span>end</span><span> parent</span>
786
787         input to line breaking -> <parent start middle end parent>
788         output of line breaking (considering infinite constraint) -> <parent start middle end parent>
789         due to padding, final runs -> <parent><start middle end><parent>
790
791         "parent" -> n/a
792         "start" -> BreakAtStart
793         " middle " -> n/a
794         "end" -> BreakAtEnd
795         "parent" -> n/a
796
797         Another example:
798         <span>parent </span><span style="padding-right: 10px;">start<span> middle </span>end</span><span> parent</span>
799
800         line breaking -> <parent start middle end parent>
801         due to padding-right, final runs -> <parent start middle end><parent>
802
803         "parent" -> n/a
804         "start" -> n/a
805         " middle " -> n/a
806         "end" -> BreakAtEnd
807         "parent" -> n/a
808
809         * layout/inlineformatting/InlineFormattingContext.cpp:
810         (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
811         (WebCore::Layout::InlineFormattingContext::collectInlineContent const): Move to a recursive algorithm (which is fine, inline contents don't tend to be too deep)
812         (WebCore::Layout::InlineFormattingContext::contentRequiresSeparateRun const): Deleted.
813         * layout/inlineformatting/InlineFormattingContext.h:
814         * layout/inlineformatting/InlineFormattingState.cpp:
815         (WebCore::Layout::InlineFormattingState::detachingRules const):
816         * layout/inlineformatting/InlineFormattingState.h:
817         (WebCore::Layout::InlineFormattingState::lastInlineItem const):
818         (WebCore::Layout::InlineFormattingState::addDetachingRule):
819
820 2018-11-14  Youenn Fablet  <youenn@apple.com>
821
822         Add support for RTCRtpCodecParameters.sdpFmtpLine
823         https://bugs.webkit.org/show_bug.cgi?id=191591
824
825         Reviewed by Eric Carlson.
826
827         Covered by rebased test.
828
829         * Modules/mediastream/RTCRtpCodecParameters.h:
830         * Modules/mediastream/RTCRtpCodecParameters.idl:
831         * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
832         (WebCore::toRTCCodecParameters):
833
834 2018-11-14  Youenn Fablet  <youenn@apple.com>
835
836         Add support for transport and peerConnection stats
837         https://bugs.webkit.org/show_bug.cgi?id=191592
838
839         Reviewed by Alex Christensen.
840
841         Covered by rebased tests.
842
843         * Modules/mediastream/RTCStatsReport.h:
844         (WebCore::RTCStatsReport::TransportStats::TransportStats):
845         (WebCore::RTCStatsReport::PeerConnectionStats::PeerConnectionStats):
846         * Modules/mediastream/RTCStatsReport.idl:
847         * Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:
848         (WebCore::fillRTCTransportStats):
849         (WebCore::fillRTCPeerConnectionStats):
850         (WebCore::LibWebRTCStatsCollector::OnStatsDelivered):
851
852 2018-11-14  Ali Juma  <ajuma@chromium.org>
853
854         Transform of composited layer not updated when layer also needs repaint
855         https://bugs.webkit.org/show_bug.cgi?id=191598
856
857         Reviewed by Simon Fraser.
858
859         Trigger a compositing geometry update whenever a RenderLayer's transform changes,
860         even when other parts of its style have changed in a way that produces a
861         StyleDifference greater than RecompositeLayer.
862
863         Test: compositing/geometry/transform-and-repaint-updates-geometry.html
864
865         * rendering/RenderLayerCompositor.cpp:
866         (WebCore::RenderLayerCompositor::layerStyleChanged):
867
868 2018-11-13  Jiewen Tan  <jiewen_tan@apple.com>
869
870         [WebAuthN] Support CTAP HID authenticators on macOS
871         https://bugs.webkit.org/show_bug.cgi?id=188623
872         <rdar://problem/43353777>
873
874         Reviewed by Brent Fulgham and Chris Dumez.
875
876         This patch removes AuthenticatorCoordinatorClient::~AuthenticatorCoordinatorClient to ignore
877         any incompleted CompletionHandlers as calling them in destructors could cause unexpected cyclic
878         dependency. Also, it adds a hack to temporarily deal with nullable userhandle.
879
880         Tests: http/wpt/webauthn/ctap-hid-failure.https.html
881                http/wpt/webauthn/ctap-hid-success.https.html
882                http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https.html
883                http/wpt/webauthn/public-key-credential-create-failure-hid.https.html
884                http/wpt/webauthn/public-key-credential-create-success-hid.https.html
885                http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https.html
886                http/wpt/webauthn/public-key-credential-get-failure-hid.https.html
887                http/wpt/webauthn/public-key-credential-get-success-hid.https.html
888
889         * Modules/webauthn/AuthenticatorCoordinatorClient.cpp:
890         (WebCore::AuthenticatorCoordinatorClient::~AuthenticatorCoordinatorClient): Deleted.
891         * Modules/webauthn/AuthenticatorCoordinatorClient.h:
892         * Modules/webauthn/PublicKeyCredentialCreationOptions.h:
893         * Modules/webauthn/fido/DeviceResponseConverter.cpp:
894         (fido::readCTAPGetAssertionResponse):
895         * Modules/webauthn/fido/FidoConstants.h:
896
897 2018-11-13  Ross Kirsling  <ross.kirsling@sony.com>
898
899         [WebRTC] Provide default implementation of LibWebRTCProvider
900         https://bugs.webkit.org/show_bug.cgi?id=191611
901
902         Reviewed by Michael Catanzaro.
903
904         Refactor LibWebRTCProvider such that platform-specific implementations need not worry about specifying defaults.
905
906         * PlatformWin.cmake:
907         * platform/GStreamer.cmake:
908         * platform/SourcesGLib.txt:
909         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
910         * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
911         * platform/mediastream/libwebrtc/LibWebRTCProviderGStreamer.cpp: Renamed from Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderGlib.cpp.
912         * platform/mediastream/libwebrtc/LibWebRTCProviderGStreamer.h: Renamed from Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderGlib.h.
913         * platform/mediastream/libwebrtc/LibWebRTCProviderWin.cpp: Removed.
914
915 2018-11-13  Timothy Hatcher  <timothy@apple.com>
916
917         Use a light scrollbar for transparent web views in dark mode.
918         https://bugs.webkit.org/show_bug.cgi?id=191559
919         rdar://problem/46000489
920
921         Reviewed by Dean Jackson.
922
923         Test: css-dark-mode/supported-color-schemes-scrollbar.html
924
925         * css/CSSProperties.json: Marked supported-color-schemes as a custom Value.
926         * css/StyleBuilderCustom.h:
927         (WebCore::StyleBuilderCustom::applyValueSupportedColorSchemes):
928         * editing/cocoa/WebContentReaderCocoa.mm: Use FrameView's useDarkAppearance().
929         (WebCore::createFragment):
930         * inspector/InspectorOverlay.cpp:
931         (WebCore::InspectorOverlay::paint): Use FrameView's useDarkAppearance().
932         * page/FrameView.cpp:
933         (WebCore::FrameView::recalculateScrollbarOverlayStyle): Use a light scrollbar for
934         transparent web views in dark mode.
935         (WebCore::FrameView::rendererForSupportedColorSchemes const): Added.
936         Return the body for document element renderer.
937         (WebCore::FrameView::useDarkAppearance const): Use rendererForSupportedColorSchemes.
938         (WebCore::FrameView::styleColorOptions const): Added. Ditto.
939         * page/FrameView.h:
940         * rendering/style/RenderStyle.cpp:
941         (WebCore::rareInheritedDataChangeRequiresRepaint): Drive-by fix. Added supportedColorSchemes.
942         * rendering/style/RenderStyle.h:
943         (WebCore::RenderStyle::setHasExplicitlySetSupportedColorSchemes): Added.
944         (WebCore::RenderStyle::hasExplicitlySetSupportedColorSchemes const): Added.
945         (WebCore::RenderStyle::NonInheritedFlags::operator== const): Added supportedColorSchemes.
946         * svg/graphics/SVGImage.cpp:
947         (WebCore::SVGImage::draw): Use FrameView's useDarkAppearance().
948         * testing/Internals.cpp:
949         (WebCore::Internals::setViewIsTransparent): Added.
950         (WebCore::Internals::scrollbarOverlayStyle const): Added.
951         * testing/Internals.h:
952         * testing/Internals.idl: Added setViewIsTransparent and scrollbarOverlayStyle.
953
954 2018-11-13  Ross Kirsling  <ross.kirsling@sony.com>
955
956         [AppleWin] Unreviewed build fix after r238108.
957
958         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
959         (printLayer):
960         (PlatformCALayerWin::embeddedViewID const):
961         * platform/graphics/ca/win/PlatformCALayerWin.h:
962
963 2018-11-13  Youenn Fablet  <youenn@apple.com>
964
965         RTCPeerConnection.getTransceivers is not always exposing all transceivers
966         https://bugs.webkit.org/show_bug.cgi?id=191589
967
968         Reviewed by Eric Carlson.
969
970         Implement the collect transceiver algorithm using libwebrtc backend.
971         Call this algorithm everytime transceivers are retrieved from JS.
972         For Plan B, make this a no-op as this is not supported.
973         Introduce senders/receivers/transceivers getters where we just look at already created transceivers.
974
975         Covered by existing and rebased tests.
976
977         * Modules/mediastream/PeerConnectionBackend.h:
978         (WebCore::PeerConnectionBackend::collectTransceivers):
979         * Modules/mediastream/RTCPeerConnection.cpp:
980         (WebCore::RTCPeerConnection::getSenders const):
981         (WebCore::RTCPeerConnection::getReceivers const):
982         (WebCore::RTCPeerConnection::getTransceivers const):
983         * Modules/mediastream/RTCPeerConnection.h:
984         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
985         (WebCore::LibWebRTCMediaEndpoint::collectTransceivers):
986         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
987         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
988         (WebCore::LibWebRTCPeerConnectionBackend::addTrack):
989         (WebCore::LibWebRTCPeerConnectionBackend::existingTransceiver):
990         (WebCore::LibWebRTCPeerConnectionBackend::collectTransceivers):
991         (WebCore::LibWebRTCPeerConnectionBackend::applyRotationForOutgoingVideoSources):
992         (WebCore::LibWebRTCPeerConnectionBackend::shouldOfferAllowToReceive const):
993         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
994
995 2018-11-13  Wenson Hsieh  <wenson_hsieh@apple.com>
996
997         [iOS] Do not show selection UI for editable elements with opacity near zero
998         https://bugs.webkit.org/show_bug.cgi?id=191442
999         <rdar://problem/45958625>
1000
1001         Reviewed by Simon Fraser.
1002
1003         Tests: editing/selection/ios/do-not-zoom-to-focused-hidden-contenteditable.html
1004                editing/selection/ios/hide-selection-after-hiding-contenteditable.html
1005                editing/selection/ios/hide-selection-in-contenteditable-nested-transparency.html
1006                editing/selection/ios/hide-selection-in-hidden-contenteditable-frame.html
1007                editing/selection/ios/hide-selection-in-hidden-contenteditable.html
1008
1009         * rendering/RenderObject.cpp:
1010         (WebCore::RenderObject::isTransparentRespectingParentFrames const):
1011
1012         Add a helper function to determine whether a RenderObject is contained within a transparent layer, taking parent
1013         frames into account. A layer is considered transparent if its opacity is less than a small threshold (i.e. 0.01).
1014         Opacity on ancestor elements is applied multiplicatively.
1015
1016         * rendering/RenderObject.h:
1017
1018 2018-11-13  Eric Carlson  <eric.carlson@apple.com>
1019
1020         [MediaStream] Observer AVCaptureDevice "suspended" property
1021         https://bugs.webkit.org/show_bug.cgi?id=191587
1022         <rdar://problem/46030598>
1023
1024         Reviewed by Youenn Fablet.
1025
1026         No new tests, AVCapture can only be tested manually.
1027
1028         * platform/mediastream/mac/AVCaptureDeviceManager.h:
1029         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
1030         (WebCore::AVCaptureDeviceManager::captureDevicesInternal): Don't notify of devices "changes"
1031         the first time the device list is scanned.
1032         (WebCore::deviceIsAvailable): Don't check for "isInUseByAnotherApplication", it doesn't
1033         change device availability.
1034         (WebCore::AVCaptureDeviceManager::beginObservingDevices): New, observe "suspended" on all 
1035         devices and add them to the cached list.
1036         (WebCore::AVCaptureDeviceManager::stopObservingDevices): New, opposite of above.
1037         (WebCore::AVCaptureDeviceManager::refreshCaptureDevices): Watch for changes in the list of
1038         devices.
1039         (WebCore::AVCaptureDeviceManager::~AVCaptureDeviceManager): Stop observing all cached devices.
1040         (WebCore::AVCaptureDeviceManager::registerForDeviceNotifications):
1041         (-[WebCoreAVCaptureDeviceManagerObserver disconnect]):
1042         (-[WebCoreAVCaptureDeviceManagerObserver deviceConnectedDidChange:]):
1043         (-[WebCoreAVCaptureDeviceManagerObserver observeValueForKeyPath:ofObject:change:context:]):
1044         (WebCore::AVCaptureDeviceManager::refreshAVCaptureDevicesOfType): Deleted.
1045         (WebCore::AVCaptureDeviceManager::deviceConnected): Deleted.
1046         (WebCore::AVCaptureDeviceManager::deviceDisconnected): Deleted.
1047         (-[WebCoreAVCaptureDeviceManagerObserver deviceDisconnected:]): Deleted.
1048         (-[WebCoreAVCaptureDeviceManagerObserver deviceConnected:]): Deleted.
1049
1050         * platform/mediastream/mac/AVVideoCaptureSource.h:
1051         * platform/mediastream/mac/AVVideoCaptureSource.mm:
1052         (WebCore::AVVideoCaptureSource::~AVVideoCaptureSource): Stop observing "running" (not "rate")
1053         and "suspended".
1054         (WebCore::AVVideoCaptureSource::setupSession): Observe "running" (not "rate"), and "suspended".
1055         (WebCore::AVVideoCaptureSource::captureDeviceSuspendedDidChange):
1056         (-[WebCoreAVVideoCaptureSourceObserver observeValueForKeyPath:ofObject:change:context:]):
1057
1058 2018-11-13  Devin Rousso  <drousso@apple.com>
1059
1060         Web Inspector: REGRESSION(r238122): fetching the CertificateInfo triggers an ASSERT in workers
1061         https://bugs.webkit.org/show_bug.cgi?id=191597
1062
1063         Reviewed by Joseph Pecoraro.
1064
1065         When WebInspector is open, the `CertificateInfo` for every `ResourceResponse` is now fetched,
1066         meaning that we may try to fetch in situations previously unexpected.
1067
1068         * platform/network/cocoa/ResourceResponseCocoa.mm:
1069         (WebCore::ResourceResponse::platformCertificateInfo const):
1070
1071 2018-11-13  Timothy Hatcher  <timothy@apple.com>
1072
1073         Treat supported-color-schemes as the second highest priority property.
1074         https://bugs.webkit.org/show_bug.cgi?id=191556
1075         rdar://problem/46000076
1076
1077         Reviewed by Dean Jackson.
1078
1079         Test: css-dark-mode/supported-color-schemes-priority.html
1080
1081         * css/CSSProperties.json: Make supported-color-schemes high-priority and add a comment.
1082         * css/StyleResolver.cpp:
1083         (WebCore::StyleResolver::applyMatchedProperties): Manually handle supported-color-schemes
1084         after -webkit-ruby-position, before other properties, so it can affect resolved colors.
1085
1086 2018-11-13  Charlie Turner  <cturner@igalia.com>
1087
1088         [EME][GStreamer] Make CDMInstance's available in decryptors, and factor out some EME utility classes.
1089         https://bugs.webkit.org/show_bug.cgi?id=191316
1090
1091         Reviewed by Xabier Rodriguez-Calvar.
1092
1093         Another preparation in patch getting ready to move the decryption
1094         logic behind the CDMInstance and out of the GStreamer decryptors
1095         themselves. The first step taken here is to arrange for the
1096         instances to always be available in the decryptors when they need
1097         to decrypt content.
1098
1099         In doing so, there were a number of hairy bits of code that could
1100         use some abstraction, so the opportunity was taken to do that as
1101         well.
1102
1103         Covered by tests in media/encrypted-media and
1104         imported/w3c/web-platform-tests/encrypted-media.
1105
1106         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1107         (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Remove
1108         drm-key-needed since it was not being used anywhere.
1109         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1110         (WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage):
1111         Factor out the parsing of decryption system information from
1112         GStreamer, since it was not clear what that code was doing unless
1113         you squinted pretty hard. Also remove the duplicated
1114         initialization-data-encountered posting.
1115         (WebCore::MediaPlayerPrivateGStreamerBase::initializationDataEncountered):
1116         Refactored to make it a more general method and usable in more
1117         situations. It now has an optional to stop it from eliding init
1118         datas for a different key system. This is required the first time
1119         we post them, since if a CDM instance has already been set, and if
1120         the stream init datas are for different systems, we ended up never
1121         posting an encrypted event.
1122         (WebCore::MediaPlayerPrivateGStreamerBase::attemptToDecryptWithLocalInstance):
1123         Actually send a CDMInstance now when in regular playback mode.
1124         (WebCore::MediaPlayerPrivateGStreamerBase::dispatchDecryptionKey):
1125         Remove m_needToSendCredentials, it was not being used.
1126         (WebCore::MediaPlayerPrivateGStreamerBase::handleProtectionEvent):
1127         Refactored to use the new initializationDataEncountered.
1128         (WebCore::MediaPlayerPrivateGStreamerBase::reportWaitingForKey):
1129         Log the waiting state, since it was currently not clear what that
1130         logging message was even telling you!
1131         (WebCore::extractEventsAndSystemsFromMessage): Deleted.
1132         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1133         * platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h:
1134         (WebCore::InitData::InitData): New class that encapsulates both
1135         single instantiation and streaming instantiation.
1136         (WebCore::InitData::append): Used for the streaming mode, when you
1137         are concatenating init datas together.
1138         (WebCore::InitData::payload const):
1139         (WebCore::InitData::systemId const):
1140         (WebCore::InitData::payloadContainerType const):
1141         (WebCore::InitData::isFromDifferentContainer):
1142         (WebCore::ProtectionSystemEvents::ProtectionSystemEvents):
1143         (WebCore::ProtectionSystemEvents::events const):
1144         (WebCore::ProtectionSystemEvents::availableSystems const):
1145         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
1146         (webkitMediaCommonEncryptionDecryptTransformInPlace): If you post
1147         waiting-for-key after requesting a CDM instance, it will flap back
1148         to not waiting for a key almost immediately, didn't make sense
1149         positing after requesting an instance. Also post key-received when
1150         we receive the key.
1151         (webkitMediaCommonEncryptionDecryptSinkEventHandler): It has now
1152         been arranged that a CDMInstance will always be present in an OOB
1153         message, so parse it out here.
1154         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
1155         (WebCore::MediaPlayerPrivateGStreamerMSE::attemptToDecryptWithInstance):
1156         As above, make sure when posting the OOB that a CDMInstance is present.
1157
1158 2018-11-13  Charlie Turner  <cturner@igalia.com>
1159
1160         Various compiler warnings/errors fixes.
1161         https://bugs.webkit.org/show_bug.cgi?id=191583
1162
1163         Reviewed by Frédéric Wang.
1164
1165         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
1166         (WebCore::IDBServer::MemoryIDBBackingStore::clearObjectStore):
1167         ASSERT is only compiled in DEBUG mode, so guarding with
1168         !LOG_DISABLED is wrong.
1169         * rendering/RenderLayerCompositor.cpp:
1170         (WebCore::RenderLayerCompositor::updateCompositingLayers):
1171         showPaintOrderTree is only compiled in ENABLE(TREE_DEBUGGING)
1172         mode, so guarding with !LOG_DISABLED was wrong.
1173         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1174         Ditto, this time with member .depth.
1175         (WebCore::RenderLayerCompositor::traverseUnchangedSubtree): Ditto.
1176         * rendering/svg/SVGRenderSupport.cpp:
1177         (WebCore::SVGRenderSupport::styleChanged): Add another unused
1178         parameter.
1179
1180 2018-11-12  Antoine Quint  <graouts@apple.com>
1181
1182         [Web Animations] Don't schedule animation frames or update style while an accelerated animation is running
1183         https://bugs.webkit.org/show_bug.cgi?id=191542
1184         <rdar://problem/45356027>
1185
1186         Reviewed by Simon Fraser.
1187
1188         Test: animations/no-style-recalc-during-accelerated-animation.html
1189
1190         In order to be more power-efficient, we stop scheduling calls to updateAnimationsAndSendEvents() when running only accelerated
1191         animations. To do that, we prevent scheduling further animation resolution if we're in the process of updating animations, and
1192         when we are done, call the new DocumentTimeline::scheduleNextTick() method that will check whether we have only accelerated
1193         animations running, and in that case check which of those animations needs an update the soonest and starts a timer scheduled
1194         for that time when we'll schedule animation resolution.
1195
1196         By default, animations compute the time until their natural completion but in the case of CSS Animations, we want to make sure
1197         we also update animations in-flight to dispatch "animationiteration" events.
1198
1199         * animation/AnimationEffect.h: Make the simpleIterationProgress() public so it can be called by WebAnimation::timeToNextTick().
1200         * animation/DocumentTimeline.cpp:
1201         (WebCore::DocumentTimeline::DocumentTimeline): Create the m_tickScheduleTimer and set it up to call scheduleAnimationResolutionIfNeeded().
1202         (WebCore::DocumentTimeline::suspendAnimations): If we don't already have a cached current time, cache the current time.
1203         (WebCore::DocumentTimeline::resumeAnimations): Reset the cached current time to ensure we'll get a fresh one when updating animations next.
1204         (WebCore::DocumentTimeline::liveCurrentTime const): Factor the code to compute the current time out of currentTime() so that we can
1205         cache the current time in suspendAnimations() without also automatically clearing the current time.
1206         (WebCore::DocumentTimeline::currentTime): Use liveCurrentTime() and cacheCurrentTime() since much of the code from this function has been
1207         factored out into those. Additionally, we were failing to clear the current time if called inside an animation frame, which we now do correctly
1208         by virtue of using cacheCurrentTime(). This fixes some flakiness.
1209         (WebCore::DocumentTimeline::cacheCurrentTime): Factor the code to cache the current time out of currentTime(). 
1210         (WebCore::DocumentTimeline::maybeClearCachedCurrentTime): No need to clear the current time if we get suspended.
1211         (WebCore::DocumentTimeline::scheduleAnimationResolutionIfNeeded): Prevent scheduling an animation update if we're in the middle of one already,
1212         scheduleNextTick() will be called after animations are updated to see if we should schedule an animation update instead.
1213         (WebCore::DocumentTimeline::unscheduleAnimationResolution): Cancel the m_tickScheduleTimer if we need to unschedule animation resolution.
1214         (WebCore::DocumentTimeline::animationResolutionTimerFired): Factor the call to applyPendingAcceleratedAnimations() out of updateAnimationsAndSendEvents()
1215         and call scheduleNextTick().
1216         (WebCore::DocumentTimeline::updateAnimationsAndSendEvents): Set the new m_isUpdatingAnimations member variable to true while this function is running.
1217         (WebCore::DocumentTimeline::scheduleNextTick): Schedule an animation update immediately if we have any relevant animation that is not accelerated.
1218         Otherwise, iterate through all animations to figure out the earliest moment at which we need to update animations.
1219         (WebCore::DocumentTimeline::updateListOfElementsWithRunningAcceleratedAnimationsForElement): Use the new WebAnimation::isRunningAccelerated() function.
1220         * animation/DocumentTimeline.h:
1221         * animation/WebAnimation.cpp:
1222         (WebCore::WebAnimation::isRunningAccelerated const): Since we end up checking if an animation is running with an accelerated effect, we introduce a new
1223         function to get that information directly through the WebAnimation object without bothering about its effect.
1224         (WebCore::WebAnimation::resolve): We should only call updateFinishedState() here since timingDidChange() would also notify the timeline about a potential
1225         change in relevance, which is not necessary and which would schedule an animation frame even for animations that are accelerated.
1226         (WebCore::WebAnimation::timeToNextTick const): Compute the time until our animation completion or, in the case of CSS animations, the next iteration.
1227         * animation/WebAnimation.h:
1228
1229 2018-11-13  Miguel Gomez  <magomez@igalia.com>
1230
1231         [GTK][WPE] Incorrect tile coverage when resizing a layer out of the visible area
1232         https://bugs.webkit.org/show_bug.cgi?id=191545
1233
1234         Reviewed by Žan Doberšek.
1235
1236         Keep track of layer size changes even if they happen when the layer is not in the visible
1237         area, so we can update edge tiles when the layer gets visible.
1238
1239         * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
1240         (WebCore::TiledBackingStore::createTiles):
1241         * platform/graphics/texmap/coordinated/TiledBackingStore.h:
1242
1243 2018-11-12  Rob Buis  <rbuis@igalia.com>
1244
1245         Content-Type parameter values should allow empty quoted strings
1246         https://bugs.webkit.org/show_bug.cgi?id=191388
1247
1248         Reviewed by Dean Jackson.
1249
1250         According to RFC 2045 and https://mimesniff.spec.whatwg.org/#parsing-a-mime-type empty
1251         quoted strings are acceptable for Content-Type parameter values. They
1252         are accepted by Firefox and Chrome implementations as well.
1253
1254         Test: web-platform-tests/xhr/overridemimetype-blob.html
1255
1256         * platform/network/ParsedContentType.cpp:
1257         (WebCore::parseToken):
1258         (WebCore::parseQuotedString):
1259         (WebCore::parseContentType):
1260         * platform/network/ParsedContentType.h:
1261
1262 2018-11-12  Christopher Reid  <chris.reid@sony.com>
1263
1264         [Curl] Reject entire cookie if the domain fails a tailmatch.
1265         https://bugs.webkit.org/show_bug.cgi?id=191406
1266
1267         Reviewed by Youenn Fablet.
1268
1269         Currently we don't put domain attribute of cookie when it fails a tailmatch. As Firefox
1270         and Chrome do, we are going to reject the entire cookie if the domain fails a tailmatch instead.
1271         Also cleanup Cookie database implementation to make them testable better.
1272
1273         Tests: TestWebKitAPI/Tests/WebCore/curl/Cookies.cpp
1274
1275         * platform/network/curl/CookieJarDB.cpp:
1276         (WebCore::CookieJarDB::canAcceptCookie): Added.
1277         (WebCore::CookieJarDB::setCookie):
1278         * platform/network/curl/CookieUtil.cpp:
1279         (WebCore::CookieUtil::parseCookieAttributes):
1280         (WebCore::CookieUtil::parseCookieHeader):
1281         * platform/network/curl/CookieUtil.h:
1282
1283 2018-11-12  Devin Rousso  <drousso@apple.com>
1284
1285         Web Inspector: Network: show secure certificate details per-request
1286         https://bugs.webkit.org/show_bug.cgi?id=191447
1287         <rdar://problem/30019476>
1288
1289         Reviewed by Joseph Pecoraro.
1290
1291         Test: http/tests/inspector/network/resource-response-security.html
1292
1293         * loader/ResourceLoader.h:
1294         (WebCore::ResourceLoader::shouldIncludeCertificateInfo const):
1295         * loader/ResourceLoader.cpp:
1296         (WebCore::ResourceLoader::shouldIncludeCertificateInfo const): Added.
1297         Always save certificate information when WebInspector is open.
1298
1299         * platform/network/CertificateInfoBase.h: Added.
1300         (WebCore::CertificateInfoBase::containsNonRootSHA1SignedCertificate const):
1301         (WebCore::CertificateInfoBase::summaryInfo const):
1302         (WebCore::CertificateInfoBase::isEmpty const):
1303         * platform/network/cf/CertificateInfo.h:
1304         (WebCore::CertificateInfo::summaryInfo const): Added.
1305         * platform/network/cf/CertificateInfoCFNet.cpp: Renamed from Source/WebCore/platform/network/mac/CertificateInfoMac.mm.
1306         (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate):
1307         (WebCore::CertificateInfo::summaryInfo const): Added.
1308         * platform/network/curl/CertificateInfo.h:
1309         (WebCore::CertificateInfo::summaryInfo const): Added.
1310         (WebCore::CertificateInfo::isEmpty const): Added.
1311         * platform/network/soup/CertificateInfo.h:
1312         (WebCore::CertificateInfo::summaryInfo const): Added.
1313         (WebCore::CertificateInfo::isEmpty const): Added.
1314         Create base class for `CertificateInfo` so that `InspectorNetworkAgent` doesn't need to have
1315         platform-specific code in its implementation.
1316
1317         * platform/network/cocoa/CertificateInfoCocoa.mm: Renamed from Source/WebCore/platform/network/mac/CertificateInfoMac.mm.
1318         * platform/network/curl/CertificateInfoCFNet.cpp: Renamed from Source/WebCore/platform/network/curl/CertificateInfo.cpp.
1319         * platform/network/soup/CertificateInfoSoup.cpp: Renamed from Source/WebCore/platform/network/soup/CertificateInfo.cpp.
1320
1321         * inspector/NetworkResourcesData.h:
1322         (WebCore::NetworkResourcesData::ResourceData::certificateInfo const): Added.
1323         (WebCore::NetworkResourcesData::ResourceData::setCertificateInfo): Added.
1324         * inspector/NetworkResourcesData.cpp:
1325         (WebCore::NetworkResourcesData::responseReceived):
1326
1327         * inspector/agents/InspectorNetworkAgent.cpp:
1328         (WebCore::InspectorNetworkAgent::buildObjectForResourceResponse):
1329
1330         * PlatformAppleWin.cmake:
1331         * PlatformMac.cmake:
1332         * SourcesCocoa.txt:
1333         * WebCore.xcodeproj/project.pbxproj:
1334         * platform/Curl.cmake:
1335         * platform/SourcesSoup.txt:
1336
1337 2018-11-12  Zalan Bujtas  <zalan@apple.com>
1338
1339         Do not collapse the soon-to-be-parent anon block when we shuffle around the marker item renderer.
1340         https://bugs.webkit.org/show_bug.cgi?id=191554
1341         <rdar://problem/45825265>
1342
1343         Reviewed by Antti Koivisto.
1344
1345         While moving the marker item renderer to its correct subtree, we accidentally remove the soon-to-be parent anonymous block.
1346         Moving a renderer is a 2 step process:
1347         1. Detach the renderer from its current parent
1348         2. Attach it to its new parent.
1349         During step #1, we check if there is a chance to collapse anonymous blocks. In this case the soon-to-be-parent is a sibling anonymous block which, after detaching the marker sibling
1350         is not needed anymore (except we use it as the new parent).
1351
1352         Test: fast/inline/marker-list-item-move-should-not-crash.html
1353
1354         * rendering/updating/RenderTreeBuilder.cpp:
1355         (WebCore::RenderTreeBuilder::detach):
1356         * rendering/updating/RenderTreeBuilder.h:
1357         * rendering/updating/RenderTreeBuilderBlock.cpp:
1358         (WebCore::RenderTreeBuilder::Block::detach):
1359         * rendering/updating/RenderTreeBuilderBlock.h:
1360         * rendering/updating/RenderTreeBuilderList.cpp:
1361         (WebCore::RenderTreeBuilder::List::updateItemMarker):
1362
1363 2018-11-12  Javier Fernandez  <jfernandez@igalia.com>
1364
1365         [css-grid] Refactoring to make more explicit the orthogonal items' pre-layout logic
1366         https://bugs.webkit.org/show_bug.cgi?id=191358
1367
1368         Reviewed by Manuel Rego Casasnovas.
1369
1370         These changes are just a refactoring to ease the integration of the new Baseline Alignment
1371         logic in a follow up patch.
1372
1373         We need to properly estimate the grid area size of orthogonal items so that we can perform
1374         an accurate pre-layout. This is important because orthogonal items will synthesize their baseline
1375         if they participate in any baseline alignment context.
1376
1377         No new tests, since no behavior change has been introduced in this patch.
1378
1379         * rendering/Grid.cpp:
1380         (WebCore::Grid::setNeedsItemsPlacement):
1381         * rendering/Grid.h:
1382         * rendering/GridTrackSizingAlgorithm.cpp:
1383         (WebCore::GridTrackSizingAlgorithm::estimatedGridAreaBreadthForChild const):
1384         (WebCore::GridTrackSizingAlgorithm::gridAreaBreadthForChild const):
1385         (WebCore::GridTrackSizingAlgorithm::isRelativeGridLengthAsAuto const):
1386         (WebCore::GridTrackSizingAlgorithm::isRelativeSizedTrackAsAuto const):
1387         (WebCore::GridTrackSizingAlgorithm::gridTrackSize const):
1388         (WebCore::IndefiniteSizeStrategy::findUsedFlexFraction const):
1389         (WebCore::GridTrackSizingAlgorithm::run):
1390         (WebCore::GridTrackSizingAlgorithm::reset):
1391         * rendering/GridTrackSizingAlgorithm.h:
1392         (WebCore::GridTrackSizingAlgorithmStrategy::gridTrackSize const):
1393         * rendering/RenderGrid.cpp:
1394         (WebCore::RenderGrid::repeatTracksSizingIfNeeded):
1395         (WebCore::RenderGrid::layoutBlock):
1396         (WebCore::RenderGrid::computeIntrinsicLogicalWidths const):
1397         (WebCore::RenderGrid::computeTrackSizesForIndefiniteSize const):
1398         (WebCore::RenderGrid::placeItemsOnGrid const):
1399         (WebCore::RenderGrid::performGridItemsPreLayout const):
1400         (WebCore::overrideSizeChanged):
1401         (WebCore::hasRelativeBlockAxisSize):
1402         (WebCore::RenderGrid::updateGridAreaLogicalSize const):
1403         (WebCore::RenderGrid::layoutGridItems):
1404         * rendering/RenderGrid.h:
1405
1406 2018-11-12  Sihui Liu  <sihui_liu@apple.com>
1407
1408         imported/w3c/web-platform-tests/IndexedDB/keygenerator-explicit.html crashing on iOS device
1409         https://bugs.webkit.org/show_bug.cgi?id=191500
1410
1411         Reviewed by Dean Jackson.
1412
1413         When double value is bigger than maximum unsigned int, converting double to unsigned int has
1414         different behaviors on macOS and iOS. On macOS, the result would be 0 while on iOS it would be
1415         maximum unsigned int.
1416
1417         Covered by existing test.
1418
1419         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1420         (WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber):
1421         (WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber):
1422
1423 2018-11-12  Basuke Suzuki  <basuke.suzuki@sony.com>
1424
1425         [Curl] Add API Test for Curl cookie backend.
1426         https://bugs.webkit.org/show_bug.cgi?id=191493
1427
1428         Reviewed by Youenn Fablet.
1429
1430         Refactoring for cookie backend interface.
1431
1432         Tests: TestWebKitAPI/Tests/WebCore/curl/Cookies.cpp
1433
1434         * platform/FileSystem.h:
1435         * platform/network/curl/CookieJarCurlDatabase.cpp:
1436         (WebCore::cookiesForSession):
1437         (WebCore::CookieJarCurlDatabase::setCookiesFromDOM const):
1438         (WebCore::CookieJarCurlDatabase::setCookiesFromHTTPResponse const):
1439         (WebCore::CookieJarCurlDatabase::getRawCookies const):
1440         * platform/network/curl/CookieJarDB.cpp:
1441         (WebCore::CookieJarDB::openDatabase):
1442         (WebCore::CookieJarDB::checkSQLiteReturnCode):
1443         (WebCore::CookieJarDB::isEnabled const):
1444         (WebCore::CookieJarDB::searchCookies):
1445         (WebCore::CookieJarDB::setCookie):
1446         (WebCore::CookieJarDB::deleteCookie):
1447         (WebCore::CookieJarDB::deleteCookieInternal):
1448         (WebCore::CookieJarDB::deleteCookies):
1449         (WebCore::CookieJarDB::deleteAllCookies):
1450         (WebCore::CookieJarDB::executeSimpleSql):
1451         (WebCore::CookieJarDB::isEnabled): Deleted.
1452         * platform/network/curl/CookieJarDB.h:
1453         * platform/network/curl/CookieUtil.cpp:
1454         (WebCore::CookieUtil::parseCookieHeader):
1455         * platform/network/curl/CookieUtil.h:
1456         * platform/win/FileSystemWin.cpp:
1457         (WebCore::FileSystem::generateTemporaryPath):
1458         (WebCore::FileSystem::openTemporaryFile):
1459         (WebCore::FileSystem::createTemporaryDirectory):
1460         (WebCore::FileSystem::deleteNonEmptyDirectory):
1461
1462 2018-11-12  Tim Horton  <timothy_horton@apple.com>
1463
1464         Make it possible to edit images inline
1465         https://bugs.webkit.org/show_bug.cgi?id=191352
1466         <rdar://problem/30107985>
1467
1468         Reviewed by Dean Jackson.
1469
1470         Tests: editing/images/basic-editable-image.html
1471                editing/images/reparent-editable-image-maintains-strokes.html
1472
1473         Add the beginnings of a mechanism to replace images with a special attribute
1474         with a native drawing view in the UI process.
1475
1476         * page/Settings.yaml:
1477         Add a setting to control whether images become natively editable when they
1478         have the x-apple-editable-image attribute.
1479
1480         * html/HTMLImageElement.cpp:
1481         (WebCore::HTMLImageElement::editableImageViewID const):
1482         Lazily generate an EmbeddedViewID and persist it on the <img> element.
1483
1484         * html/HTMLImageElement.h:
1485         Rearrange the service controls methods to sit before the members.
1486         Add m_editableImageViewID and editableImageViewID().
1487
1488         * platform/graphics/GraphicsLayer.cpp:
1489         (WebCore::GraphicsLayer::nextEmbeddedViewID):
1490         * platform/graphics/GraphicsLayer.h:
1491         (WebCore::GraphicsLayer::setContentsToEmbeddedView):
1492         Add a new ContentsLayerPurpose, EmbeddedView, which is only supported
1493         on Cocoa platforms and when using RemoteLayerTree.
1494         Add ContentsLayerEmbeddedViewType, which currently only has the EditableImage type.
1495         Add setContentsToEmbeddedView, which takes a ContentsLayerEmbeddedViewType
1496         and an EmbeddedViewID to uniquely identify and communicate about the
1497         embedded view (which may move between layers, since it is tied to an element).
1498
1499         * platform/graphics/ca/GraphicsLayerCA.cpp:
1500         (WebCore::GraphicsLayerCA::createPlatformCALayerForEmbeddedView):
1501         (WebCore::GraphicsLayerCA::setContentsToEmbeddedView):
1502         When setting GraphicsLayer's contents to an embedded view, we use
1503         a special PlatformCALayer factory that takes the EmbeddedViewID and type.
1504         GraphicsLayerCARemote will override this and make a correctly-initialized
1505         PlatformCALayerRemote that keeps track of the EmbeddedViewID.
1506
1507         * platform/graphics/ca/GraphicsLayerCA.h:
1508         * platform/graphics/ca/PlatformCALayer.cpp:
1509         (WebCore::operator<<):
1510         * platform/graphics/ca/PlatformCALayer.h:
1511         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
1512         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
1513         (WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
1514         (WebCore::PlatformCALayerCocoa::embeddedViewID const):
1515         Add stubs and logging for EmbeddedViewID on PlatformCALayer.
1516         These will be overridden by PlatformCALayerRemote to do more interesting things.
1517
1518         * rendering/RenderImage.cpp:
1519         (WebCore::RenderImage::isEditableImage const):
1520         Add a getter that return true if the setting is enabled and
1521         x-apple-editable-image is empty or true.
1522
1523         (WebCore::RenderImage::requiresLayer const):
1524         RenderImage requires a layer either if RenderReplaced does, or we are an
1525         editable image.
1526
1527         * rendering/RenderImage.h:
1528         * rendering/RenderLayer.cpp:
1529         (WebCore::RenderLayer::shouldBeNormalFlowOnly const):
1530         (WebCore::RenderLayer::calculateClipRects const):
1531         * rendering/RenderLayerBacking.cpp:
1532         (WebCore::RenderLayerBacking::updateConfiguration):
1533         Push the EmbeddedViewID and type down to GraphicsLayer for editable images.
1534
1535         * rendering/RenderLayerCompositor.cpp:
1536         (WebCore::RenderLayerCompositor::requiresCompositingLayer const):
1537         (WebCore::RenderLayerCompositor::requiresOwnBackingStore const):
1538         (WebCore::RenderLayerCompositor::reasonsForCompositing const):
1539         (WebCore::RenderLayerCompositor::requiresCompositingForEditableImage const):
1540         * rendering/RenderLayerCompositor.h:
1541         Make editable images require compositing implicitly.
1542
1543 2018-11-12  Don Olmstead  <don.olmstead@sony.com>
1544
1545         Shipped PNGs include bad profiles: iCCP: known incorrect sRGB profile
1546         https://bugs.webkit.org/show_bug.cgi?id=189230
1547         <rdar://problem/44050379>
1548
1549         Reviewed by Joseph Pecoraro.
1550
1551         Runs all png images through zopflipng. This results in a smaller file
1552         size and takes care of this issue as a byproduct.
1553
1554         * Modules/modern-media-controls/images/iOS/airplay-placard@1x.png:
1555         * Modules/modern-media-controls/images/iOS/airplay-placard@2x.png:
1556         * Modules/modern-media-controls/images/iOS/airplay-placard@3x.png:
1557         * Modules/modern-media-controls/images/iOS/invalid-placard@1x.png:
1558         * Modules/modern-media-controls/images/iOS/invalid-placard@2x.png:
1559         * Modules/modern-media-controls/images/iOS/invalid-placard@3x.png:
1560         * Modules/modern-media-controls/images/iOS/pip-placard@1x.png:
1561         * Modules/modern-media-controls/images/iOS/pip-placard@2x.png:
1562         * Modules/modern-media-controls/images/iOS/pip-placard@3x.png:
1563         * Modules/modern-media-controls/images/macOS/airplay-placard@1x.png:
1564         * Modules/modern-media-controls/images/macOS/airplay-placard@2x.png:
1565         * Modules/modern-media-controls/images/macOS/invalid-placard@1x.png:
1566         * Modules/modern-media-controls/images/macOS/invalid-placard@2x.png:
1567         * Modules/modern-media-controls/images/macOS/pip-placard@1x.png:
1568         * Modules/modern-media-controls/images/macOS/pip-placard@2x.png:
1569         * Resources/AttachmentPlaceholder.png:
1570         * Resources/AttachmentPlaceholder@2x.png:
1571         * Resources/ListButtonArrow.png:
1572         * Resources/ListButtonArrow@2x.png:
1573         * Resources/missingImage.png:
1574         * Resources/missingImage@2x.png:
1575         * Resources/missingImage@3x.png:
1576         * Resources/moveCursor.png:
1577         * Resources/northEastSouthWestResizeCursor.png:
1578         * Resources/northSouthResizeCursor.png:
1579         * Resources/northWestSouthEastResizeCursor.png:
1580         * Resources/nullPlugin.png:
1581         * Resources/nullPlugin@2x.png:
1582         * Resources/panIcon.png:
1583         * Resources/textAreaResizeCorner.png:
1584         * Resources/textAreaResizeCorner@2x.png:
1585         * Resources/urlIcon.png:
1586
1587 2018-11-12  Youenn Fablet  <youenn@apple.com>
1588
1589         RealtimeOutgoing A/V sources should observe their sources only if having a sink
1590         https://bugs.webkit.org/show_bug.cgi?id=191490
1591
1592         Reviewed by Eric Carlson.
1593
1594         Observe the source that generates media based on the sinks:
1595         - Do not observe at creation time
1596         - For first sink, start observing
1597         - When no more sink, stop observing
1598         Apply this principle for both outgoing audio and video sources.
1599         Add locks for the sinks to ensure thread-safety.
1600         Make sinks HashSet which is more robust.
1601
1602         Do some refactoring to better isolate generic outgoing sources from Cocoa/GTK implementations.
1603
1604         Covered by existing tests and updated webrtc/remove-track.html.
1605
1606         * platform/mediastream/RealtimeOutgoingAudioSource.cpp:
1607         (WebCore::RealtimeOutgoingAudioSource::~RealtimeOutgoingAudioSource):
1608         (WebCore::RealtimeOutgoingAudioSource::stop):
1609         (WebCore::RealtimeOutgoingAudioSource::AddSink):
1610         (WebCore::RealtimeOutgoingAudioSource::RemoveSink):
1611         (WebCore::RealtimeOutgoingAudioSource::sendAudioFrames):
1612         * platform/mediastream/RealtimeOutgoingAudioSource.h:
1613         * platform/mediastream/RealtimeOutgoingVideoSource.cpp:
1614         (WebCore::RealtimeOutgoingVideoSource::RealtimeOutgoingVideoSource):
1615         (WebCore::RealtimeOutgoingVideoSource::~RealtimeOutgoingVideoSource):
1616         (WebCore::RealtimeOutgoingVideoSource::observeSource):
1617         (WebCore::RealtimeOutgoingVideoSource::setSource):
1618         (WebCore::RealtimeOutgoingVideoSource::stop):
1619         (WebCore::RealtimeOutgoingVideoSource::AddOrUpdateSink):
1620         (WebCore::RealtimeOutgoingVideoSource::RemoveSink):
1621         * platform/mediastream/RealtimeOutgoingVideoSource.h:
1622         (WebCore::RealtimeOutgoingVideoSource::isSilenced const):
1623         * platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.cpp:
1624         (WebCore::RealtimeOutgoingAudioSourceLibWebRTC::pullAudioData):
1625         * platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp:
1626         (WebCore::RealtimeOutgoingAudioSourceCocoa::RealtimeOutgoingAudioSourceCocoa):
1627         (WebCore::RealtimeOutgoingAudioSourceCocoa::audioSamplesAvailable):
1628         (WebCore::RealtimeOutgoingAudioSourceCocoa::pullAudioData):
1629         * platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.h:
1630         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
1631         (WebCore::RealtimeOutgoingVideoSourceCocoa::sampleBufferUpdated):
1632
1633 2018-11-12  Youenn Fablet  <youenn@apple.com>
1634
1635         Support setting stream ids when adding a transceiver
1636         https://bugs.webkit.org/show_bug.cgi?id=191307
1637
1638         Reviewed by Eric Carlson.
1639
1640         Add support for streams in RTCTransceiverInit.
1641         Add plumbing down to libwebrtc.
1642         Covered by rebased tests.
1643
1644         * Modules/mediastream/RTCPeerConnection.h:
1645         * Modules/mediastream/RTCPeerConnection.idl:
1646         * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
1647         (WebCore::fromRtpTransceiverInit):
1648
1649 2018-11-12  Antti Koivisto  <antti@apple.com>
1650
1651         Support dynamic pseudo-classes on elements with display: contents
1652         https://bugs.webkit.org/show_bug.cgi?id=181640
1653         <rdar://problem/36605415>
1654
1655         Reviewed by Dean Jackson.
1656
1657         The code for :hover and :active style invalidation assumes that only elements with renderer need invalidation.
1658
1659         This patch fixes '.display-content-element:hover span' case but not '.display-content-element:hover' case but
1660         includes tests for both. The latter is not super useful anyway (as it only affects rendering with inherited
1661         text properties).
1662
1663         Test: fast/css/display-contents-hover-active.html
1664
1665         * dom/Document.cpp:
1666         (WebCore::Document::updateHoverActiveState):
1667
1668             Traverse up in composed tree instead of render tree when invalidating. This has the same order as render tree
1669             but also includes display:content elements. This also allows removing the special display:none case.
1670
1671         * dom/Element.cpp:
1672         (WebCore::Element::setActive):
1673         (WebCore::Element::setHovered):
1674
1675             Also look into display:contents style for invalidation checks.
1676
1677         (WebCore::Element::renderOrDisplayContentsStyle const):
1678
1679             Make this helper an Element member.
1680
1681         * dom/Element.h:
1682         * dom/Node.cpp:
1683         (WebCore::Node::parentElementInComposedTree const):
1684
1685             Support starting from a PseudoElement. This is consistent with ComposedTreeAncestorIterator.
1686
1687         * rendering/updating/RenderTreePosition.cpp:
1688         (WebCore::RenderTreePosition::nextSiblingRenderer const):
1689         * style/StyleTreeResolver.cpp:
1690         (WebCore::Style::TreeResolver::resolveElement):
1691         (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
1692         (WebCore::Style::shouldResolveElement):
1693         (WebCore::Style::TreeResolver::resolveComposedTree):
1694         (WebCore::Style::renderOrDisplayContentsStyle): Deleted.
1695
1696             Use the Element::renderOrDisplayContentsStyle() instead.
1697
1698 2018-11-12  Antoine Quint  <graouts@apple.com>
1699
1700         [Web Animations] Turn Web Animations experimental
1701         https://bugs.webkit.org/show_bug.cgi?id=191543
1702
1703         Reviewed by Dean Jackson.
1704
1705         * page/RuntimeEnabledFeatures.h:
1706
1707 2018-11-12  Simon Fraser  <simon.fraser@apple.com>
1708
1709         feFlood with alpha color doesn't work correctly
1710         https://bugs.webkit.org/show_bug.cgi?id=163666
1711
1712         Reviewed by Zalan Bujtas.
1713         
1714         FEFlood::platformApplySoftware() erroneously used colorWithOverrideAlpha()
1715         rather than multiplying the flood color with the flood opacity as other browsers do.
1716
1717         Test: svg/filters/feFlood-with-alpha-color.html
1718
1719         * platform/graphics/Color.cpp:
1720         (WebCore::Color::colorWithAlpha const): I tried using colorWithAlphaMultipliedBy() elsewhere,
1721         and it triggered a behavior change, so add a comment.
1722         * platform/graphics/filters/FEFlood.cpp:
1723         (WebCore::FEFlood::platformApplySoftware):
1724         * svg/SVGStopElement.cpp:
1725         (WebCore::SVGStopElement::stopColorIncludingOpacity const):
1726
1727 2018-11-12  Eric Carlson  <eric.carlson@apple.com>
1728
1729         Require <iframe allow="display"> for an iframe to use getDisplayMedia
1730         https://bugs.webkit.org/show_bug.cgi?id=191505
1731         <rdar://problem/45968811>
1732
1733         Reviewed by Jer Noble.
1734
1735         Test: http/tests/media/media-stream/get-display-media-iframe-allow-attribute.html
1736
1737         * Modules/mediastream/MediaDevicesRequest.cpp:
1738         (WebCore::MediaDevicesRequest::start):
1739         * Modules/mediastream/UserMediaController.cpp:
1740         (WebCore::isAllowedToUse):
1741         (WebCore::UserMediaController::canCallGetUserMedia):
1742         (WebCore::UserMediaController::logGetUserMediaDenial):
1743         * Modules/mediastream/UserMediaController.h:
1744         * Modules/mediastream/UserMediaRequest.cpp:
1745         (WebCore::UserMediaRequest::start):
1746
1747 2018-11-12  Simon Fraser  <simon.fraser@apple.com>
1748
1749         Make compositing updates incremental
1750         https://bugs.webkit.org/show_bug.cgi?id=90342
1751
1752         Reviewed by Antti Koivisto.
1753
1754         Previously, updating compositing layers required two full RenderLayer tree traversals,
1755         and all the work was done for every RenderLayer on each composting update. This could be expensive
1756         on pages with lots of RenderLayers.
1757
1758         These changes make compositing updates more incremental. Compositing updates still require
1759         two tree traversals. The first determines which RenderLayers need to be composited (of those which
1760         weren't already made composited at style-change time), because of reasons that can only be determined
1761         post-layout, and indirect reasons including overlap. The second traversal updates the configuration, geometry
1762         and GraphicsLayer tree for the composited layers. Dependencies on both descendant and ancestor state make
1763         it hard to fold these two traversals together.
1764
1765         In order to minimize the work done during these traversals, dirty bits are stored on RenderLayers,
1766         and propagated to ancestor layers in paint order. There are two sets of bits: those related to the first
1767         "compositing requirements" traversal, and those related to the second "update backing and hierarchy" traversal.
1768         When a RenderLayer gets a dirty bit set, bits are propagated to ancestors to indicate that children need
1769         to be visited.
1770
1771         Sadly entire subtrees can't be skipped during the "compositing requirements" traversal because we still have
1772         to accumulate overlap rects, but RenderLayerCompositor::traverseUnchangedSubtree() is used to minimize
1773         work in that case. Subtrees can be skipped in the "update backing and hierarchy" traversal. Entire traversals can
1774         be skipped if no change has triggered the need for that traversal.
1775         
1776         These changes fix a correctness issue where transform changes now trigger overlap re-evaluation, which causes
1777         more layer geometry updates than before. This regressed the MotionMark "Focus" test, when geometry updates
1778         triggered layer resizes as the filter blur radius changed, which then triggered repaints. This is fixed by
1779         excluding composited filters from the composited bounds (but still taking them into account for overlap).
1780
1781         Care is taken to avoid triggering traversals in non-composited documents (tested by no-updates-in-non-composited-iframe.html).
1782
1783         Code to set the dirty bits is added in various places that change properties that compositing depends on.
1784         
1785         These changes also subsume the patch in 176196; we now never consult properties that rely on layout from the
1786         style change code path, and the only call stack for geometry updates is from the "update backing and hierarchy"
1787         traversal, which is always a pre-order traversal.
1788
1789         Tests: compositing/geometry/stacking-context-change-layer-reparent.html
1790                compositing/layer-creation/change-to-overlap.html
1791                compositing/updates/no-updates-in-non-composited-iframe.html
1792
1793         * html/canvas/WebGLRenderingContextBase.cpp:
1794         (WebCore::WebGLRenderingContextBase::markContextChanged): Need to differentiate between a canvas becoming composited
1795         for the first time, and its pixels changing with a new 'CanvasPixelsChanged' value.
1796         * page/FrameView.cpp:
1797         (WebCore::FrameView::setViewportConstrainedObjectsNeedLayout):
1798         * page/Page.cpp:
1799         (WebCore::Page::setPageScaleFactor):
1800         * platform/graphics/ca/GraphicsLayerCA.cpp:
1801         (WebCore::GraphicsLayerCA::updateBackdropFilters): If we just made a layer for backdrops, we need to update sublayers.
1802         * rendering/RenderBox.cpp:
1803         (WebCore::RenderBox::styleWillChange):
1804         * rendering/RenderLayer.cpp:
1805         (WebCore::RenderLayer::RenderLayer):
1806         (WebCore::RenderLayer::~RenderLayer):
1807         (WebCore::RenderLayer::addChild):
1808         (WebCore::RenderLayer::removeChild):
1809         (WebCore::RenderLayer::shouldBeStackingContext const):
1810         (WebCore::RenderLayer::stackingContext const):
1811         (WebCore::RenderLayer::dirtyZOrderLists):
1812         (WebCore::RenderLayer::dirtyNormalFlowList):
1813         (WebCore::RenderLayer::updateNormalFlowList):
1814         (WebCore::RenderLayer::rebuildZOrderLists):
1815         (WebCore::RenderLayer::setAncestorsHaveCompositingDirtyFlag):
1816         (WebCore::RenderLayer::contentChanged):
1817         (WebCore::RenderLayer::updateLayerPositions):
1818         (WebCore::RenderLayer::updateTransform):
1819         (WebCore::RenderLayer::updateLayerPosition):
1820         (WebCore::RenderLayer::enclosingCompositingLayer const):
1821         (WebCore::RenderLayer::enclosingCompositingLayerForRepaint const):
1822         (WebCore::RenderLayer::clippingRootForPainting const):
1823         (WebCore::RenderLayer::scrollTo):
1824         (WebCore::RenderLayer::updateCompositingLayersAfterScroll):
1825         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
1826         (WebCore::RenderLayer::paintLayerContents):
1827         (WebCore::RenderLayer::hitTest):
1828         (WebCore::RenderLayer::hitTestLayer):
1829         (WebCore::RenderLayer::calculateClipRects const):
1830         (WebCore::outputPaintOrderTreeLegend):
1831         (WebCore::outputPaintOrderTreeRecursive):
1832         (WebCore::compositingContainer): Deleted.
1833         * rendering/RenderLayer.h:
1834         (WebCore::RenderLayer::clearZOrderLists):
1835         (WebCore::RenderLayer::paintOrderParent const):
1836         * rendering/RenderLayerBacking.cpp:
1837         (WebCore::RenderLayerBacking::updateCompositedBounds):
1838         (WebCore::RenderLayerBacking::updateAfterWidgetResize):
1839         (WebCore::RenderLayerBacking::updateAfterLayout):
1840         (WebCore::RenderLayerBacking::updateConfigurationAfterStyleChange):
1841         (WebCore::RenderLayerBacking::updateConfiguration):
1842         (WebCore::RenderLayerBacking::updateGeometry):
1843         (WebCore::RenderLayerBacking::setRequiresBackgroundLayer):
1844         (WebCore::RenderLayerBacking::updateMaskingLayer):
1845         (WebCore::RenderLayerBacking::paintsContent const):
1846         (WebCore::RenderLayerBacking::contentChanged):
1847         (WebCore::RenderLayerBacking::setContentsNeedDisplay):
1848         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
1849         (WebCore::RenderLayerBacking::startAnimation):
1850         (WebCore::RenderLayerBacking::animationFinished):
1851         (WebCore::RenderLayerBacking::startTransition):
1852         (WebCore::RenderLayerBacking::transitionFinished):
1853         (WebCore::RenderLayerBacking::setCompositedBounds):
1854         * rendering/RenderLayerBacking.h:
1855         * rendering/RenderLayerCompositor.cpp:
1856         (WebCore::RenderLayerCompositor::CompositingState::CompositingState):
1857         (WebCore::RenderLayerCompositor::enableCompositingMode):
1858         (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
1859         (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlagsAfterLayout):
1860         (WebCore::RenderLayerCompositor::willRecalcStyle):
1861         (WebCore::RenderLayerCompositor::didRecalcStyleWithNoPendingLayout):
1862         (WebCore::RenderLayerCompositor::updateCompositingLayers):
1863         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1864         (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
1865         (WebCore::RenderLayerCompositor::updateBackingAndHierarchy):
1866         (WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
1867         (WebCore::RenderLayerCompositor::layerBecameNonComposited):
1868         (WebCore::RenderLayerCompositor::logLayerInfo):
1869         (WebCore::clippingChanged):
1870         (WebCore::styleAffectsLayerGeometry):
1871         (WebCore::RenderLayerCompositor::layerStyleChanged):
1872         (WebCore::RenderLayerCompositor::needsCompositingUpdateForStyleChangeOnNonCompositedLayer const):
1873         (WebCore::RenderLayerCompositor::updateBacking):
1874         (WebCore::RenderLayerCompositor::updateLayerCompositingState):
1875         (WebCore::RenderLayerCompositor::layerWasAdded):
1876         (WebCore::RenderLayerCompositor::layerWillBeRemoved):
1877         (WebCore::RenderLayerCompositor::enclosingNonStackingClippingLayer const):
1878         (WebCore::RenderLayerCompositor::computeExtent const):
1879         (WebCore::RenderLayerCompositor::addToOverlapMap):
1880         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
1881         (WebCore::RenderLayerCompositor::rootLayerConfigurationChanged):
1882         (WebCore::RenderLayerCompositor::parentFrameContentLayers):
1883         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
1884         (WebCore::RenderLayerCompositor::needsToBeComposited const):
1885         (WebCore::RenderLayerCompositor::requiresCompositingLayer const):
1886         (WebCore::RenderLayerCompositor::requiresOwnBackingStore const):
1887         (WebCore::RenderLayerCompositor::reasonsForCompositing const):
1888         (WebCore::RenderLayerCompositor::clippedByAncestor const):
1889         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation const):
1890         (WebCore::RenderLayerCompositor::requiresCompositingForTransform const):
1891         (WebCore::RenderLayerCompositor::requiresCompositingForVideo const):
1892         (WebCore::RenderLayerCompositor::requiresCompositingForFilters const):
1893         (WebCore::RenderLayerCompositor::requiresCompositingForWillChange const):
1894         (WebCore::RenderLayerCompositor::requiresCompositingForPlugin const):
1895         (WebCore::RenderLayerCompositor::requiresCompositingForFrame const):
1896         (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame const):
1897         (WebCore::RenderLayerCompositor::requiresCompositingForPosition const):
1898         (WebCore::RenderLayerCompositor::requiresCompositingForOverflowScrolling const):
1899         (WebCore::RenderLayerCompositor::styleChangeMayAffectIndirectCompositingReasons):
1900         (WebCore::RenderLayerCompositor::fixedLayerIntersectsViewport const):
1901         (WebCore::RenderLayerCompositor::useCoordinatedScrollingForLayer const):
1902         (WebCore::RenderLayerCompositor::rootOrBodyStyleChanged):
1903         (WebCore::RenderLayerCompositor::rootBackgroundColorOrTransparencyChanged):
1904         (WebCore::operator<<):
1905         (WebCore::RenderLayerCompositor::setCompositingLayersNeedRebuild): Deleted.
1906         (WebCore::checkIfDescendantClippingContextNeedsUpdate): Deleted.
1907         (WebCore::isScrollableOverflow): Deleted.
1908         (WebCore::styleHasTouchScrolling): Deleted.
1909         (WebCore::styleChangeRequiresLayerRebuild): Deleted.
1910         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Deleted.
1911         (WebCore::RenderLayerCompositor::rootFixedBackgroundsChanged): Deleted.
1912         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry): Deleted.
1913         (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry): Deleted.
1914         * rendering/RenderLayerCompositor.h:
1915         * rendering/RenderTreeAsText.cpp:
1916         (WebCore::writeLayers):
1917
1918 2018-11-12  Rob Buis  <rbuis@igalia.com>
1919
1920         CSSCalcOperation constructor wastes 6KB of Vector capacity on cnn.com
1921         https://bugs.webkit.org/show_bug.cgi?id=190839
1922
1923         Reviewed by Frédéric Wang.
1924
1925         The CSSCalcOperation ctor that takes a leftSide and rightSide parameter
1926         wastes memory since it will always have size 2 but claims the
1927         default Vector size. So make sure to reserve an initial capacity of 2.
1928
1929         * css/CSSCalculationValue.cpp:
1930
1931 2018-11-12  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
1932
1933         WTFMove(xxx) is used in arguments while other arguments touch xxx
1934         https://bugs.webkit.org/show_bug.cgi?id=191544
1935
1936         Reviewed by Alex Christensen.
1937
1938         The order of the evaluation of C++ arguments is undefined. If we use WTFMove(xxx),
1939         xxx should not be touched in the other arguments. This patch fixes such uses in
1940         IDB code.
1941
1942         * Modules/indexeddb/IDBObjectStore.cpp:
1943         (WebCore::IDBObjectStore::deleteIndex):
1944         * Modules/indexeddb/IDBTransaction.cpp:
1945         (WebCore::IDBTransaction::scheduleOperation):
1946         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
1947         (WebCore::IDBServer::MemoryIDBBackingStore::registerObjectStore):
1948         * Modules/indexeddb/server/MemoryObjectStore.cpp:
1949         (WebCore::IDBServer::MemoryObjectStore::registerIndex):
1950
1951 2018-11-12  Zalan Bujtas  <zalan@apple.com>
1952
1953         [LFC][IFC] Construct dedicated runs when the inline element requires it.
1954         https://bugs.webkit.org/show_bug.cgi?id=191509
1955
1956         Reviewed by Antti Koivisto.
1957
1958         In certain cases, a run can overlap multiple inline elements like this:
1959
1960         <span>normal text content</span><span style="position: relative; left: 10px;">but this one needs a dedicated run</span><span>end of text</span>
1961
1962         The content above generates one long run <normal text contentbut this one needs dedicated runend of text> <- input to line breaking.
1963         However, since the middle run is positioned, it needs to be moved independently from the rest of the content, hence it needs a dedicated inline run.
1964
1965         * layout/inlineformatting/InlineFormattingContext.cpp:
1966         (WebCore::Layout::InlineFormattingContext::layout const):
1967         (WebCore::Layout::contentRequiresSeparateRun):
1968         (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
1969         (WebCore::Layout::InlineFormattingContext::postProcessInlineRuns const):
1970         (WebCore::Layout::InlineFormattingContext::closeLine const):
1971         (WebCore::Layout::InlineFormattingContext::appendContentToLine const):
1972         (WebCore::Layout::InlineFormattingContext::layoutInlineContent const):
1973         (WebCore::Layout::InlineFormattingContext::instrinsicWidthConstraints const):
1974         * layout/inlineformatting/InlineFormattingContext.h:
1975         (WebCore::Layout::InlineFormattingContext::inlineFormattingState const):
1976         * layout/inlineformatting/InlineLineBreaker.cpp:
1977         (WebCore::Layout::InlineLineBreaker::nextRun): mid-word breaking is not implemented yet.
1978         * layout/inlineformatting/InlineRun.h:
1979         (WebCore::Layout::InlineRun::overlapsMultipleInlineItems const):
1980         * layout/inlineformatting/InlineRunProvider.cpp:
1981         (WebCore::Layout::InlineRunProvider::processInlineTextItem):
1982         * layout/inlineformatting/InlineRunProvider.h:
1983         (WebCore::Layout::InlineRunProvider::Run::TextContext::expand):
1984         (WebCore::Layout::InlineRunProvider::Run::textContext):
1985         (WebCore::Layout::InlineRunProvider::Run::TextContext::setStart): Deleted.
1986         (WebCore::Layout::InlineRunProvider::Run::TextContext::setLength): Deleted.
1987
1988 2018-11-12  Jer Noble  <jer.noble@apple.com>
1989
1990         [MSE] Frame re-ordering can cause iframes to never be enqueued
1991         https://bugs.webkit.org/show_bug.cgi?id=191485
1992
1993         Reviewed by Eric Carlson.
1994
1995         Test: media/media-source/media-source-dropped-iframe.html
1996
1997         Some frame re-ordering techniques result in files where the first frame has a
1998         decode timestamp < 0, but a presentation timestamp >= 0. When appending these
1999         samples to existing content, we can fail to enqueue the first frame because its
2000         DTS overlaps an existing sample, but the presentation timestamp does not.
2001         Rather than try to only enqueue samples whose decode timestamps are > than the
2002         greatest decode end timestamp (minus some fudge factor), allow all frames to be
2003         added to the decode queue if they are strictly ordered greater than the last
2004         enqueued frame.
2005
2006         * Modules/mediasource/SourceBuffer.cpp:
2007         (WebCore::SourceBuffer::TrackBuffer::TrackBuffer):
2008         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
2009         (WebCore::SourceBuffer::provideMediaData):
2010         (WebCore::SourceBuffer::reenqueueMediaForTime):
2011
2012 2018-11-12  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
2013
2014         IDBTransaction does not use "RefPtr<IDBTransaction> self"
2015         https://bugs.webkit.org/show_bug.cgi?id=190436
2016
2017         Reviewed by Alex Christensen.
2018
2019         It seems that `RefPtr<IDBTransaction> self;` is not effective since it does not capture anything.
2020         Use `protectedThis = makeRef(*this)` instead.
2021
2022         No behavior change.
2023
2024         * Modules/indexeddb/IDBTransaction.cpp:
2025         (WebCore::IDBTransaction::IDBTransaction):
2026
2027 2018-11-12  Alicia Boya García  <aboya@igalia.com>
2028
2029         [MSE][GStreamer] Introduce AbortableTaskQueue
2030         https://bugs.webkit.org/show_bug.cgi?id=190902
2031
2032         Reviewed by Xabier Rodriguez-Calvar.
2033
2034         A new synchronization primitive is introduced: AbortableTaskQueue,
2035         which allows to send work to the main thread from a background thread
2036         with the option to perform two-phase cancellation (startAborting() and
2037         finishAborting()).
2038
2039         This new primitive has been used to overhaul GstBus messaging in
2040         AppendPipeline. A lot of code made redundant has been deleted in the
2041         process and lots of internal functions were now able to be made
2042         private. As part of the refactor all glib signals in AppendPipeline
2043         now use lambdas. All usages of WTF::isMainThread() in AppendPipeline
2044         have been replaced by isMainThread() for consistency with the rest of
2045         WebKit.
2046
2047         Two-phase cancellation is still not used in AppendPipeline as of this
2048         patch, but it will be used in a future patch that makes use of
2049         GStreamer flushes to implement correct MSE abort semantics. There are
2050         unit tests to ensure it works correctly, even if it's still not used.
2051
2052         * WebCore.xcodeproj/project.pbxproj:
2053         * platform/AbortableTaskQueue.h: Added.
2054         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
2055         (WebCore::AppendPipeline::dumpAppendState):
2056         (WebCore::AppendPipeline::AppendPipeline):
2057         (WebCore::AppendPipeline::~AppendPipeline):
2058         (WebCore::AppendPipeline::appsrcEndOfAppendCheckerProbe):
2059         (WebCore::AppendPipeline::handleAppsinkNewSampleFromAnyThread):
2060         (WebCore::AppendPipeline::connectDemuxerSrcPadToAppsinkFromAnyThread):
2061         * platform/graphics/gstreamer/mse/AppendPipeline.h:
2062         (WebCore::AppendPipeline::sourceBufferPrivate):
2063         (WebCore::AppendPipeline::appsinkCaps):
2064         (WebCore::AppendPipeline::track):
2065         (WebCore::AppendPipeline::demuxerSrcPadCaps):
2066         (WebCore::AppendPipeline::playerPrivate):
2067
2068 2018-11-12  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2069
2070         [GStreamer][EME] waitingforkey event should consider decryptors' waiting status
2071         https://bugs.webkit.org/show_bug.cgi?id=191459
2072
2073         Reviewed by Carlos Garcia Campos.
2074
2075         The new cross platform architecture to report waitingforkey and
2076         recover from it requires a more accurate knowledge of what is
2077         going on with the decryptors because events are reported only once
2078         (per key exchange run) and crossplatform only continues if we are
2079         actually ready to continue, meaning that no decryptors are
2080         waiting.
2081
2082         * platform/graphics/gstreamer/GUniquePtrGStreamer.h: Added
2083         GstIterator deleter.
2084         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2085         (WebCore::MediaPlayerPrivateGStreamerBase::setWaitingForKey): Bail
2086         out if we are requested to not wait anymore but there are still
2087         waiting decryptors.
2088         (WebCore::MediaPlayerPrivateGStreamerBase::waitingForKey const):
2089         Query the pipeline, just a query after pipeline is built and
2090         manual inspection during build. The query is optimal but sometimes
2091         we can get this request when the pipeline is under construction so
2092         queries do not arrive at the decryptors and we have to deliver it
2093         by ourselves.
2094         (WebCore::MediaPlayerPrivateGStreamerBase::reportWaitingForKey:
2095         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2096         (WebCore::MediaPlayerPrivateGStreamerBase::reportWaitingForKey:
2097         Deleted because it is now inlined.
2098         * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
2099         (webKitMediaClearKeyDecryptorDecrypt): Fixed small compiler warning.
2100         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
2101         (webkit_media_common_encryption_decrypt_class_init): Override
2102         query method.
2103         (webkitMediaCommonEncryptionDecryptTransformInPlace): When the
2104         decryptor is going to block to wait, report before. When the
2105         decryptor receives the key, report it got it.
2106         (webkitMediaCommonEncryptionDecryptSinkEventHandler): Do not
2107         handle waitingforkey here.
2108         (webkitMediaCommonEncryptionDecryptorQueryHandler): Report if the
2109         decryptor is waiting.
2110
2111 2018-11-12  Michael Catanzaro  <mcatanzaro@igalia.com>
2112
2113         [GTK] Silence ATK_XY_PARENT warnings
2114         https://bugs.webkit.org/show_bug.cgi?id=191504
2115
2116         Reviewed by Carlos Garcia Campos.
2117
2118         * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
2119         (atkToContents):
2120         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2121         (textExtents):
2122         * accessibility/atk/WebKitAccessibleUtil.cpp:
2123         (contentsRelativeToAtkCoordinateType):
2124
2125 2018-11-11  Wenson Hsieh  <wenson_hsieh@apple.com>
2126
2127         Implement a new edit command to change the enclosing list type
2128         https://bugs.webkit.org/show_bug.cgi?id=191487
2129         <rdar://problem/45955922>
2130
2131         Reviewed by Ryosuke Niwa.
2132
2133         Add support for a new edit command that changes the type of the enclosing list element around the selection from
2134         unordered to ordered list and vice versa. This new edit command is exposed only to internal WebKit2 clients, via
2135         SPI on WKWebView (`-_changeListType:`).
2136
2137         This is currently intended for use in Mail compose, but may also be adopted by legacy Notes in the future. As
2138         such, the behavior of this editing command mostly matches shipping behavior in Mail compose (which is currently
2139         implemented entirely by Mail). See below for more details.
2140
2141         Test:   editing/execCommand/change-list-type.html
2142                 WKWebViewEditActions.ChangeListType
2143
2144         * Sources.txt:
2145         * WebCore.xcodeproj/project.pbxproj:
2146         * editing/ChangeListTypeCommand.cpp: Added.
2147         (WebCore::listConversionTypeForSelection):
2148         (WebCore::ChangeListTypeCommand::listConversionType):
2149
2150         Helper that returns a potential list conversion command that may be executed at the given document's selection,
2151         if any exists. We also use existing logic from Mail here to determine which list to change, by walking up the
2152         DOM from the lowest common ancestor container of the current selection until we hit the first list element.
2153
2154         (WebCore::ChangeListTypeCommand::createNewList):
2155
2156         Helper method to create a new list element to replace the given list, and then clone element data from the given
2157         list to the new list. This addresses an existing bug in Mail, wherein changing list type for an enclosing list
2158         which contains inline style properties drops the inline styles, because existing logic in Mail that implements
2159         this editing command only copies the `class` attribute of the old list to the new list.
2160
2161         (WebCore::ChangeListTypeCommand::doApply):
2162
2163         Apply the edit command by running the following steps:
2164         -   Find the enclosing list element, if any (see above).
2165         -   Create a new list element of the opposite type as the enclosing list, and clone over element data from the
2166             list element being replaced.
2167         -   Insert the new list next to the original list.
2168         -   Move all children of the original list to the new list.
2169         -   Remove the original list.
2170         -   Set the selection to the end of the new list.
2171
2172         * editing/ChangeListTypeCommand.h: Added.
2173         * editing/EditAction.h:
2174
2175         Add a pair of new edit actions for conversion from unordered list to ordered list and vice versa.
2176
2177         * editing/Editor.cpp:
2178         (WebCore::Editor::changeSelectionListType):
2179
2180         Implement this by creating and applying a new ChangeListTypeCommand.
2181
2182         (WebCore::Editor::canChangeSelectionListType): Deleted.
2183
2184         Remove this for now, since there's no need for it until full support for edit command validation is implemented.
2185
2186         * editing/Editor.h:
2187         * testing/Internals.cpp:
2188         (WebCore::Internals::changeSelectionListType):
2189         * testing/Internals.h:
2190         * testing/Internals.idl:
2191
2192         Add internal hooks to change list type from layout tests.
2193
2194 2018-11-11  Daniel Bates  <dabates@apple.com>
2195
2196         [iOS] Draw caps lock indicator in password fields
2197         https://bugs.webkit.org/show_bug.cgi?id=190565
2198         <rdar://problem/45262343>
2199
2200         Reviewed by Dean Jackson.
2201
2202         Draw the caps lock indicator in a focused password field on iOS. This makes the behavior of password
2203         fields on iOS more closely match the behavior of password fields on Mac.
2204
2205         The majority of this patch is implementing PlatformKeyboardEvent::currentCapsLockState() for iOS.
2206         In Legacy WebKit, the implementation boils down to calling call -[::WebEvent modifierFlags]. In
2207         Modern WebKit the UIProcess is responsible for -[::WebEvent modifierFlags] and passing it the
2208         WebProcess to store such that invocations of PlatformKeyboardEvent::currentCapsLockState() consult
2209         the store in the WebProcess. A smaller part of this patch is having both the legacy and modern
2210         web views listen for keyboard availability changes so as to update the the caps lock state when
2211         a hardware keyboard is detached or attached.
2212
2213         * WebCore.xcodeproj/project.pbxproj:
2214         * page/EventHandler.cpp:
2215         (WebCore::EventHandler::capsLockStateMayHaveChanged const): Extracted from EventHandler::internalKeyEvent()
2216         so that it can shared between WebCore, Modern WebKit, and Legacy WebKit code.
2217         (WebCore::EventHandler::internalKeyEvent): Modified to call capsLockStateMayHaveChanged().
2218         * page/EventHandler.h:
2219         * platform/cocoa/KeyEventCocoa.mm:
2220         (WebCore::PlatformKeyboardEvent::currentCapsLockState): Moved from KeyEventMac.mm.
2221         (WebCore::PlatformKeyboardEvent::getCurrentModifierState): Moved from KeyEventMac.mm.
2222         * platform/ios/KeyEventIOS.mm:
2223         (WebCore::PlatformKeyboardEvent::currentStateOfModifierKeys): Fetch the current modifier state.
2224         (WebCore::PlatformKeyboardEvent::currentCapsLockState): Deleted; we now use the Cocoa implementation.
2225         (WebCore::PlatformKeyboardEvent::getCurrentModifierState): Deleted; we now use the Cocoa implementation.
2226         * platform/ios/WebEvent.h:
2227         * platform/ios/WebEvent.mm:
2228         (+[WebEvent modifierFlags]): Added.
2229         * platform/mac/KeyEventMac.mm:
2230         (WebCore::PlatformKeyboardEvent::currentCapsLockState): Deleted; moved to KeyEventCocoa.mm to be shared
2231         by both Mac and iOS.
2232         (WebCore::PlatformKeyboardEvent::getCurrentModifierState): Deleted; moved to KeyEventCocoa.mm to be shared
2233         by both Mac and iOS.
2234         * rendering/RenderThemeCocoa.h:
2235         * rendering/RenderThemeCocoa.mm:
2236         (WebCore::RenderThemeCocoa::shouldHaveCapsLockIndicator const): Moved from RenderThemeMac.mm.
2237         * rendering/RenderThemeIOS.h:
2238         * rendering/RenderThemeIOS.mm:
2239         (WebCore::RenderThemeIOS::shouldHaveCapsLockIndicator const): Deleted.
2240         * rendering/RenderThemeMac.h:
2241         * rendering/RenderThemeMac.mm:
2242         (WebCore::RenderThemeMac::shouldHaveCapsLockIndicator const): Deleted; moved to RenderThemeCocoa.mm to be
2243         shared by both Mac and iOS.
2244
2245 2018-11-11  Zalan Bujtas  <zalan@apple.com>
2246
2247         [LFC][BFC] In-flow positioned logic is really formatting context dependent.
2248         https://bugs.webkit.org/show_bug.cgi?id=191512
2249
2250         Reviewed by Simon Fraser.
2251
2252         Move block formatting context specific code from FormattingContext to BlockFormattingContext.
2253
2254         * layout/FormattingContext.cpp:
2255         (WebCore::Layout::FormattingContext::placeInFlowPositionedChildren const): Deleted.
2256         * layout/FormattingContext.h:
2257         * layout/FormattingContextGeometry.cpp:
2258         (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset):
2259         * layout/blockformatting/BlockFormattingContext.cpp:
2260         (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren const):
2261         (WebCore::Layout::BlockFormattingContext::computeInFlowPositionedPosition const): Deleted.
2262         * layout/blockformatting/BlockFormattingContext.h:
2263         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2264         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowPositionedPosition): Deleted.
2265         * layout/inlineformatting/InlineFormattingContext.cpp:
2266         (WebCore::Layout::InlineFormattingContext::computeInFlowPositionedPosition const): Deleted.
2267         * layout/inlineformatting/InlineFormattingContext.h:
2268
2269 2018-11-11  Myles C. Maxfield  <mmaxfield@apple.com>
2270
2271         Address post-review comments after r237955
2272         https://bugs.webkit.org/show_bug.cgi?id=191496
2273
2274         Reviewed by Darin Adler.
2275
2276         * rendering/TextDecorationPainter.cpp:
2277         (WebCore::TextDecorationPainter::paintTextDecoration):
2278         * style/InlineTextBoxStyle.cpp:
2279         (WebCore::computeUnderlineOffset):
2280         * style/InlineTextBoxStyle.h:
2281
2282 2018-11-11  Benjamin Poulain  <benjamin@webkit.org>
2283
2284         Fix a fixme: rename wtfObjcMsgSend to wtfObjCMsgSend
2285         https://bugs.webkit.org/show_bug.cgi?id=191492
2286
2287         Reviewed by Alex Christensen.
2288
2289         Rename file.
2290
2291         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2292         * page/mac/EventHandlerMac.mm:
2293         * platform/mac/URLMac.mm:
2294         * platform/mac/WebCoreNSURLExtras.mm:
2295         * platform/mac/WebCoreObjCExtras.mm:
2296         * rendering/RenderThemeMac.mm:
2297
2298 2018-11-10  Benjamin Poulain  <benjamin@webkit.org>
2299
2300         Fix a fixme: rename wtfObjcMsgSend to wtfObjCMsgSend
2301         https://bugs.webkit.org/show_bug.cgi?id=191492
2302
2303         Reviewed by Alex Christensen.
2304
2305         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2306         * page/mac/EventHandlerMac.mm:
2307         * platform/mac/URLMac.mm:
2308         * platform/mac/WebCoreNSURLExtras.mm:
2309         * platform/mac/WebCoreObjCExtras.mm:
2310         * rendering/RenderThemeMac.mm:
2311         (WebCore::RenderThemeMac::systemColor const):
2312
2313 2018-11-10  Megan Gardner  <megan_gardner@apple.com>
2314
2315         Fix build for 32bit Mac
2316         https://bugs.webkit.org/show_bug.cgi?id=191511
2317
2318         Unreviewed Build Fix.
2319
2320         Build fix, not tests needed.
2321
2322         Make the apporiate delecrations for 32-bit mac support.
2323
2324         * editing/mac/DictionaryLookup.mm:
2325
2326 2018-11-10  Simon Fraser  <simon.fraser@apple.com>
2327
2328         Remove support for -webkit-svg-shadow
2329         https://bugs.webkit.org/show_bug.cgi?id=187429
2330         <rdar://problem/41920735>
2331
2332         Reviewed by Dean Jackson.
2333         
2334         -webkit-svg-shadow was a non-standard hack for online iWork, and they no longer use it,
2335         so remove it. No other browser supports it, and chromestatus say it's used on less than
2336         0.000001% of pages.
2337
2338         * css/CSSComputedStyleDeclaration.cpp:
2339         (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
2340         * css/CSSProperties.json:
2341         * css/SVGCSSComputedStyleDeclaration.cpp:
2342         (WebCore::ComputedStyleExtractor::svgPropertyValue):
2343         * css/StyleBuilderCustom.h:
2344         (WebCore::StyleBuilderCustom::applyInitialWebkitSvgShadow): Deleted.
2345         (WebCore::StyleBuilderCustom::applyInheritWebkitSvgShadow): Deleted.
2346         (WebCore::StyleBuilderCustom::applyValueWebkitSvgShadow): Deleted.
2347         * css/parser/CSSPropertyParser.cpp:
2348         (WebCore::CSSPropertyParser::parseSingleValue):
2349         * rendering/RenderElement.cpp:
2350         (WebCore::RenderElement::didAttachChild):
2351         * rendering/svg/RenderSVGImage.cpp:
2352         (WebCore::RenderSVGImage::layout):
2353         * rendering/svg/RenderSVGImage.h:
2354         * rendering/svg/RenderSVGModelObject.cpp:
2355         (WebCore::RenderSVGModelObject::RenderSVGModelObject):
2356         * rendering/svg/RenderSVGModelObject.h:
2357         (WebCore::RenderSVGModelObject::repaintRectInLocalCoordinatesExcludingSVGShadow const): Deleted.
2358         (WebCore::RenderSVGModelObject::hasSVGShadow const): Deleted.
2359         (WebCore::RenderSVGModelObject::setHasSVGShadow): Deleted.
2360         * rendering/svg/RenderSVGRoot.cpp:
2361         (WebCore::RenderSVGRoot::RenderSVGRoot):
2362         (WebCore::RenderSVGRoot::updateCachedBoundaries):
2363         * rendering/svg/RenderSVGRoot.h:
2364         * rendering/svg/RenderSVGShape.cpp:
2365         (WebCore::RenderSVGShape::updateRepaintBoundingBox):
2366         * rendering/svg/RenderSVGShape.h:
2367         * rendering/svg/SVGRenderSupport.cpp:
2368         (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
2369         (WebCore::SVGRenderSupport::layoutChildren):
2370         (WebCore::SVGRenderSupport::styleChanged):
2371         (WebCore::SVGRenderSupport::repaintRectForRendererInLocalCoordinatesExcludingSVGShadow): Deleted.
2372         (WebCore::SVGRenderSupport::rendererHasSVGShadow): Deleted.
2373         (WebCore::SVGRenderSupport::setRendererHasSVGShadow): Deleted.
2374         (WebCore::SVGRenderSupport::intersectRepaintRectWithShadows): Deleted.
2375         (WebCore::SVGRenderSupport::childAdded): Deleted.
2376         * rendering/svg/SVGRenderSupport.h:
2377
2378 2018-11-10  Ryan Haddad  <ryanhaddad@apple.com>
2379
2380         Unreviewed, rolling out r238065.
2381
2382         Breaks internal builds.
2383
2384         Reverted changeset:
2385
2386         "Make it possible to edit images inline"
2387         https://bugs.webkit.org/show_bug.cgi?id=191352
2388         https://trac.webkit.org/changeset/238065
2389
2390 2018-11-10  Tim Horton  <timothy_horton@apple.com>
2391
2392         Make it possible to edit images inline
2393         https://bugs.webkit.org/show_bug.cgi?id=191352
2394         <rdar://problem/30107985>
2395
2396         Reviewed by Dean Jackson.
2397
2398         Tests: editing/images/basic-editable-image.html
2399                editing/images/reparent-editable-image-maintains-strokes.html
2400
2401         Add the beginnings of a mechanism to replace images with a special attribute
2402         with a native drawing view in the UI process.
2403
2404         * page/Settings.yaml:
2405         Add a setting to control whether images become natively editable when they
2406         have the x-apple-editable-image attribute.
2407
2408         * html/HTMLImageElement.cpp:
2409         (WebCore::HTMLImageElement::editableImageViewID const):
2410         Lazily generate an EmbeddedViewID and persist it on the <img> element.
2411
2412         * html/HTMLImageElement.h:
2413         Rearrange the service controls methods to sit before the members.
2414         Add m_editableImageViewID and editableImageViewID().
2415
2416         * platform/graphics/GraphicsLayer.cpp:
2417         (WebCore::GraphicsLayer::nextEmbeddedViewID):
2418         * platform/graphics/GraphicsLayer.h:
2419         (WebCore::GraphicsLayer::setContentsToEmbeddedView):
2420         Add a new ContentsLayerPurpose, EmbeddedView, which is only supported
2421         on Cocoa platforms and when using RemoteLayerTree.
2422         Add ContentsLayerEmbeddedViewType, which currently only has the EditableImage type.
2423         Add setContentsToEmbeddedView, which takes a ContentsLayerEmbeddedViewType
2424         and an EmbeddedViewID to uniquely identify and communicate about the
2425         embedded view (which may move between layers, since it is tied to an element).
2426
2427         * platform/graphics/ca/GraphicsLayerCA.cpp:
2428         (WebCore::GraphicsLayerCA::createPlatformCALayerForEmbeddedView):
2429         (WebCore::GraphicsLayerCA::setContentsToEmbeddedView):
2430         When setting GraphicsLayer's contents to an embedded view, we use
2431         a special PlatformCALayer factory that takes the EmbeddedViewID and type.
2432         GraphicsLayerCARemote will override this and make a correctly-initialized
2433         PlatformCALayerRemote that keeps track of the EmbeddedViewID.
2434
2435         * platform/graphics/ca/GraphicsLayerCA.h:
2436         * platform/graphics/ca/PlatformCALayer.cpp:
2437         (WebCore::operator<<):
2438         * platform/graphics/ca/PlatformCALayer.h:
2439         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
2440         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2441         (WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
2442         (WebCore::PlatformCALayerCocoa::embeddedViewID const):
2443         Add stubs and logging for EmbeddedViewID on PlatformCALayer.
2444         These will be overridden by PlatformCALayerRemote to do more interesting things.
2445
2446         * rendering/RenderImage.cpp:
2447         (WebCore::RenderImage::isEditableImage const):
2448         Add a getter that return true if the setting is enabled and
2449         x-apple-editable-image is empty or true.
2450
2451         (WebCore::RenderImage::requiresLayer const):
2452         RenderImage requires a layer either if RenderReplaced does, or we are an
2453         editable image.
2454
2455         * rendering/RenderImage.h:
2456         * rendering/RenderLayer.cpp:
2457         (WebCore::RenderLayer::shouldBeNormalFlowOnly const):
2458         (WebCore::RenderLayer::calculateClipRects const):
2459         * rendering/RenderLayerBacking.cpp:
2460         (WebCore::RenderLayerBacking::updateConfiguration):
2461         Push the EmbeddedViewID and type down to GraphicsLayer for editable images.
2462
2463         * rendering/RenderLayerCompositor.cpp:
2464         (WebCore::RenderLayerCompositor::requiresCompositingLayer const):
2465         (WebCore::RenderLayerCompositor::requiresOwnBackingStore const):
2466         (WebCore::RenderLayerCompositor::reasonsForCompositing const):
2467         (WebCore::RenderLayerCompositor::requiresCompositingForEditableImage const):
2468         * rendering/RenderLayerCompositor.h:
2469         Make editable images require compositing implicitly.
2470
2471 2018-11-09  Zalan Bujtas  <zalan@apple.com>
2472
2473         [iOS] Issue initial paint soon after the visuallyNonEmpty milestone is fired.
2474         https://bugs.webkit.org/show_bug.cgi?id=191078
2475         <rdar://problem/45736178>
2476
2477         Reviewed by Antti Koivisto.
2478
2479         1. Improve visuallyNonEmpty milestone confidence level.
2480             Ignore whitespace and non visible text content.
2481             Parsing the main document should not necessarily fire the milestone. Check if there's any pending scripts/css/font loading.
2482             Check if the html/body is actually visible.
2483
2484         2. Issue initial paint soon after the milestone fires.
2485             Use a 0ms timer to flush the initial paint.
2486             Throttle additional flushes for 500ms and 1.5s (original behaviour).
2487
2488         3. Suspend optional style recalcs and layouts while painting is being throttled.
2489            When parsing yields we initiate a 0ms style recalc/layout timer.
2490            These optional layouts produce content that we have no intention to paint. 
2491
2492         * dom/Document.cpp:
2493         (WebCore::Document::scheduleStyleRecalc):
2494         (WebCore::Document::shouldScheduleLayout):
2495         * page/ChromeClient.h:
2496         * page/FrameView.cpp:
2497         (WebCore::FrameView::resetLayoutMilestones):
2498         (WebCore::FrameView::qualifiesAsVisuallyNonEmpty const):
2499         (WebCore::FrameView::updateSignificantRenderedTextMilestoneIfNeeded):
2500         (WebCore::FrameView::updateIsVisuallyNonEmpty):
2501         * page/FrameView.h:
2502         (WebCore::FrameView::incrementVisuallyNonEmptyCharacterCount): Ignore whitespace characters. Some pages start with plenty of whitespace only content.
2503         * platform/graphics/FontCascade.h:
2504         * rendering/RenderText.cpp: Check whether the text is actually visible at this point.
2505         (WebCore::RenderText::RenderText):
2506
2507 2018-11-09  John Wilander  <wilander@apple.com>
2508
2509         Add ability to configure document.cookie lifetime cap through user defaults
2510         https://bugs.webkit.org/show_bug.cgi?id=191480
2511         <rdar://problem/45240871>
2512
2513         Reviewed by Chris Dumez.
2514
2515         No new tests. Existing test makes sure we don't regress.
2516
2517         This change makes the capped lifetime in seconds configurable through
2518         user defaults.
2519
2520         * platform/network/NetworkStorageSession.h:
2521         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
2522         (WebCore::NetworkStorageSession::setAgeCapForClientSideCookies):
2523         (WebCore::NetworkStorageSession::setShouldCapLifetimeForClientSideCookies): Deleted.
2524             Renamed setAgeCapForClientSideCookies().
2525         * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
2526         (WebCore::filterCookies):
2527         (WebCore::NetworkStorageSession::setCookiesFromDOM const):
2528
2529 2018-11-09  Ryan Haddad  <ryanhaddad@apple.com>
2530
2531         Unreviewed, rolling out r238047.
2532
2533         Introduced layout test failures on iOS simulator.
2534
2535         Reverted changeset:
2536
2537         "[iOS] Draw caps lock indicator in password fields"
2538         https://bugs.webkit.org/show_bug.cgi?id=190565
2539         https://trac.webkit.org/changeset/238047
2540
2541 2018-11-09  Tim Horton  <timothy_horton@apple.com>
2542
2543         Normal-flow-only flex items don't correctly respect z-index
2544         https://bugs.webkit.org/show_bug.cgi?id=191486
2545
2546         Reviewed by Simon Fraser.
2547
2548         Test: css3/flexbox/z-index-with-normal-flow-only.html
2549
2550         * rendering/RenderLayer.cpp:
2551         (WebCore::canCreateStackingContext):
2552         r125693 did not ensure that flex items which would otherwise be
2553         normal-flow-only would be put into the z-order tree when necessary.
2554         Fix by respecting the same trigger we use to make layers for flex items;
2555         namely, not having auto z-index.
2556
2557 2018-11-09  Wenson Hsieh  <wenson_hsieh@apple.com>
2558
2559         [Cocoa] Implement SPI on WKWebView to increase and decrease list levels
2560         https://bugs.webkit.org/show_bug.cgi?id=191471
2561         <rdar://problem/45952472>
2562
2563         Reviewed by Tim Horton.
2564
2565         Add new method stubs for changing the list type for the current selection (to be implemented in a future patch).
2566
2567         * editing/Editor.cpp:
2568         (WebCore::Editor::canChangeSelectionListType):
2569         (WebCore::Editor::changeSelectionListType):
2570         * editing/Editor.h:
2571
2572 2018-11-09  Keith Rollin  <krollin@apple.com>
2573
2574         Unreviewed build fix after https://bugs.webkit.org/show_bug.cgi?id=191324
2575
2576         Remove the use of .xcfilelists until their side-effects are better
2577         understood.
2578
2579         * WebCore.xcodeproj/project.pbxproj:
2580
2581 2018-11-09  Jer Noble  <jer.noble@apple.com>
2582
2583         SourceBuffer throws an error when appending a second init segment after changeType().
2584         https://bugs.webkit.org/show_bug.cgi?id=191474
2585
2586         Reviewed by Eric Carlson.
2587
2588         Test: media/media-source/media-source-changetype-second-init.html
2589
2590         When encountering an initialization segment after changeType(), add the parsed codec types
2591         to the list of allowed codecs.
2592
2593         * Modules/mediasource/SourceBuffer.cpp:
2594         (WebCore::SourceBuffer::validateInitializationSegment):
2595         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
2596         (WebCore::MockMediaPlayerMediaSource::supportsType):
2597         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
2598         (WebCore::MockSourceBufferPrivate::canSwitchToType):
2599         * platform/mock/mediasource/MockSourceBufferPrivate.h:
2600
2601 2018-11-09  Eric Carlson  <eric.carlson@apple.com>
2602
2603         [MediaStream] AVVideoCaptureSource reports incorrect size when frames are scaled
2604         https://bugs.webkit.org/show_bug.cgi?id=191479
2605         <rdar://problem/45952201>
2606
2607         Reviewed by Jer Noble.
2608
2609         No new tests, tested manually.
2610
2611         * platform/mediastream/RealtimeVideoSource.cpp:
2612         (WebCore::RealtimeVideoSource::standardVideoSizes): Drive-by fix: add a few more standard
2613         video frame sizes, correct a typo.
2614         (WebCore::RealtimeVideoSource::bestSupportedSizeAndFrameRate): Drive-by fix: don't consider
2615         rescaled sized when we already have an exact or aspect ratio match because it won't be used.
2616
2617         * platform/mediastream/mac/AVVideoCaptureSource.h:
2618         (WebCore::AVVideoCaptureSource::width const): Deleted.
2619         (WebCore::AVVideoCaptureSource::height const): Deleted.
2620         * platform/mediastream/mac/AVVideoCaptureSource.mm:
2621         (WebCore::AVVideoCaptureSource::setSizeAndFrameRateWithPreset): Delete m_requestedSize.
2622         (WebCore::AVVideoCaptureSource::shutdownCaptureSession): Delete m_width and m_height.
2623         (WebCore::AVVideoCaptureSource::processNewFrame): Don't call setSize with captured size,
2624         the frame may be resized before deliver.
2625
2626 2018-11-09  Ross Kirsling  <ross.kirsling@sony.com>
2627
2628         Unreviewed MSVC build fix after r238039 (and r238046).
2629
2630         * bindings/js/JSWorkerGlobalScopeBase.cpp:
2631         * bindings/js/JSWorkerGlobalScopeBase.h:
2632
2633 2018-11-09  Basuke Suzuki  <basuke.suzuki@sony.com>
2634
2635         [Curl][WebKit] Implement Proxy configuration API.
2636         https://bugs.webkit.org/show_bug.cgi?id=189053
2637
2638         Reviewed by Youenn Fablet.
2639
2640         Added API to set proxy from the app.
2641
2642         No new tests because there's no behaviour change in WebCore.
2643
2644         * platform/network/NetworkStorageSession.h:
2645         * platform/network/curl/CurlContext.h:
2646         (WebCore::CurlContext::setProxySettings):
2647         * platform/network/curl/CurlProxySettings.h:
2648         * platform/network/curl/NetworkStorageSessionCurl.cpp:
2649         (WebCore::NetworkStorageSession::setProxySettings const):
2650
2651 2018-11-09  Antti Koivisto  <antti@apple.com>
2652
2653         Use OptionSet for layout milestones
2654         https://bugs.webkit.org/show_bug.cgi?id=191470
2655
2656         Reviewed by Dean Jackson.
2657
2658         * WebCore.xcodeproj/project.pbxproj:
2659         * loader/EmptyFrameLoaderClient.h:
2660         * loader/FrameLoader.cpp:
2661         (WebCore::FrameLoader::didReachLayoutMilestone):
2662         * loader/FrameLoader.h:
2663         * loader/FrameLoaderClient.h:
2664         * page/FrameView.cpp:
2665         (WebCore::FrameView::FrameView):
2666         (WebCore::FrameView::addPaintPendingMilestones):
2667         (WebCore::FrameView::fireLayoutRelatedMilestonesIfNeeded):
2668         (WebCore::FrameView::firePaintRelatedMilestonesIfNeeded):
2669         * page/FrameView.h:
2670         * page/LayoutMilestone.h: Copied from Source/WebCore/page/LayoutMilestones.h.
2671
2672         Renamed to appease WK2 IPC code generation.
2673
2674         * page/LayoutMilestones.h: Removed.
2675         * page/Page.cpp:
2676         (WebCore::Page::addLayoutMilestones):
2677         (WebCore::Page::removeLayoutMilestones):
2678         (WebCore::Page::isCountingRelevantRepaintedObjects const):
2679         * page/Page.h:
2680         (WebCore::Page::requestedLayoutMilestones const):
2681
2682 2018-11-09  Daniel Bates  <dabates@apple.com>
2683
2684         [iOS] Draw caps lock indicator in password fields
2685         https://bugs.webkit.org/show_bug.cgi?id=190565
2686         <rdar://problem/45262343>
2687
2688         Reviewed by Dean Jackson.
2689
2690         Draw the caps lock indicator in a focused password field on iOS. This makes the behavior of password
2691         fields on iOS more closely match the behavior of password fields on Mac. For now, we only draw the
2692         indicator when caps locks is enabled via the hardware keyboard. We will look to support the software
2693         keyboard in a subsequent commit (see <https://bugs.webkit.org/show_bug.cgi?id=191475>).
2694
2695         The majority of this patch is implementing PlatformKeyboardEvent::currentCapsLockState() for iOS.
2696         In Legacy WebKit, the implementation boils down to calling call -[::WebEvent modifierFlags]. In
2697         Modern WebKit the UIProcess is responsible for -[::WebEvent modifierFlags] and passing it the
2698         WebProcess to store such that invocations of PlatformKeyboardEvent::currentCapsLockState() consult
2699         the store in the WebProcess. A smaller part of this patch is having both the legacy and modern
2700         web views listen for keyboard availability changes so as to update the the caps lock state when
2701         a hardware keyboard is detached or attached.
2702
2703         * WebCore.xcodeproj/project.pbxproj:
2704         * page/EventHandler.cpp:
2705         (WebCore::EventHandler::capsLockStateMayHaveChanged const): Extracted from EventHandler::internalKeyEvent()
2706         so that it can shared between WebCore, Modern WebKit, and Legacy WebKit code.
2707         (WebCore::EventHandler::internalKeyEvent): Modified to call capsLockStateMayHaveChanged().
2708         * page/EventHandler.h:
2709         * platform/cocoa/KeyEventCocoa.mm:
2710         (WebCore::PlatformKeyboardEvent::currentCapsLockState): Moved from KeyEventMac.mm.
2711         (WebCore::PlatformKeyboardEvent::getCurrentModifierState): Moved from KeyEventMac.mm.
2712         * platform/ios/KeyEventIOS.mm:
2713         (WebCore::PlatformKeyboardEvent::currentStateOfModifierKeys): Fetch the current modifier state.
2714         (WebCore::PlatformKeyboardEvent::currentCapsLockState): Deleted; we now use the Cocoa implementation.
2715         (WebCore::PlatformKeyboardEvent::getCurrentModifierState): Deleted; we now use the Cocoa implementation.
2716         * platform/ios/WebEvent.h:
2717         * platform/ios/WebEvent.mm:
2718         (+[WebEvent modifierFlags]): Added.
2719         * platform/mac/KeyEventMac.mm:
2720         (WebCore::PlatformKeyboardEvent::currentCapsLockState): Deleted; moved to KeyEventCocoa.mm to be shared
2721         by both Mac and iOS.
2722         (WebCore::PlatformKeyboardEvent::getCurrentModifierState): Deleted; moved to KeyEventCocoa.mm to be shared
2723         by both Mac and iOS.
2724         * rendering/RenderThemeCocoa.h:
2725         * rendering/RenderThemeCocoa.mm:
2726         (WebCore::RenderThemeCocoa::shouldHaveCapsLockIndicator const): Moved from RenderThemeMac.mm.
2727         * rendering/RenderThemeIOS.h:
2728         * rendering/RenderThemeIOS.mm:
2729         (WebCore::RenderThemeIOS::shouldHaveCapsLockIndicator const): Deleted.
2730         * rendering/RenderThemeMac.h:
2731         * rendering/RenderThemeMac.mm:
2732         (WebCore::RenderThemeMac::shouldHaveCapsLockIndicator const): Deleted; moved to RenderThemeCocoa.mm to be
2733         shared by both Mac and iOS.
2734
2735 2018-11-09  Chris Dumez  <cdumez@apple.com>
2736
2737         Unreviewed attempt to fix WinCairo build after r238039.
2738
2739         * bindings/js/JSWorkerGlobalScopeBase.h:
2740
2741 2018-11-09  Fujii Hironori  <Hironori.Fujii@sony.com>
2742
2743         Extensions3DOpenGLES.h:  warning: 'blitFramebuffer' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
2744         https://bugs.webkit.org/show_bug.cgi?id=191451
2745
2746         Reviewed by Dean Jackson.
2747
2748         No new tests because there is no behavior change.
2749
2750         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
2751         (WebCore::Extensions3DOpenGLES::setEXTContextLostCallback): Deleted unused method.
2752         * platform/graphics/opengl/Extensions3DOpenGLES.h: Marked 'override'.
2753
2754 2018-11-09  Andy Estes  <aestes@apple.com>
2755
2756         [Payment Request] canMakePayment() should not consider serialized payment method data
2757         https://bugs.webkit.org/show_bug.cgi?id=191432
2758
2759         Reviewed by Dean Jackson.
2760
2761         In https://github.com/w3c/payment-request/pull/806, we're changing the specification of
2762         canMakePayment() to not consider serialized payment method data when deciding if a payment
2763         method is supported. For Apple Pay, this means we resolve to true for
2764         "https://apple.com/apple-pay", even if an ApplePayRequest is omitted or is missing required
2765         fields.
2766
2767         Added test cases to
2768         http/tests/paymentrequest/payment-request-canmakepayment-method.https.html and
2769         http/tests/paymentrequest/payment-request-show-method.https.html.
2770
2771         * Modules/paymentrequest/PaymentRequest.cpp:
2772         (WebCore::PaymentRequest::canMakePayment):
2773
2774 2018-11-09  Andy Estes  <aestes@apple.com>
2775
2776         [Payment Request] PaymentResponse.details should be updated when the user accepts a retried payment
2777         https://bugs.webkit.org/show_bug.cgi?id=191440
2778
2779         Reviewed by Dean Jackson.
2780
2781         PaymentResponse.details was being initialized in the PaymentResponse constructor and never
2782         updated when the user accepts a retried payment. We need to update it.
2783
2784         Added a test case to http/tests/paymentrequest/payment-response-retry-method.https.html.
2785
2786         * Modules/paymentrequest/PaymentRequest.cpp:
2787         (WebCore::PaymentRequest::accept):
2788         * Modules/paymentrequest/PaymentResponse.cpp:
2789         (WebCore::PaymentResponse::PaymentResponse):
2790         (WebCore::PaymentResponse::setDetailsFunction):
2791         * Modules/paymentrequest/PaymentResponse.h:
2792
2793 2018-11-09  Fujii Hironori  <Hironori.Fujii@sony.com>
2794
2795         MediaPlayerPrivateMediaFoundation.h: warning: 'GetService' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
2796         https://bugs.webkit.org/show_bug.cgi?id=191453
2797
2798         Reviewed by Per Arne Vollan.
2799
2800         No new tests because there is no behavior change.
2801
2802         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h: Marked with 'override' and removed 'virtual'.
2803
2804 2018-11-09  Chris Dumez  <cdumez@apple.com>
2805
2806         Unreviewed attempt to fix internal build on macOS.
2807
2808         'Export' is defined in several headers.
2809
2810         * bindings/js/JSDOMGlobalObject.cpp:
2811         * bindings/js/JSDOMGlobalObject.h:
2812         * bridge/jsc/BridgeJSC.cpp:
2813         * bridge/jsc/BridgeJSC.h:
2814
2815 2018-11-09  Chris Dumez  <cdumez@apple.com>
2816
2817         HTML form validation bubble disappears
2818         https://bugs.webkit.org/show_bug.cgi?id=191418
2819
2820         Reviewed by Simon Fraser.
2821
2822         If we validate a form and find an invalid form control, we'll scroll it into view and show
2823         the validation bubble. However, scrolling the element into view may be an asynchronous
2824         operation, in which case it would discard the validation bubble prematurely because scrolling
2825         hides the validation bubble. To address the issue, we now show the validation message
2826         asynchronously after focusing the element (and potentially scrolling it into view).
2827
2828         Test: fast/forms/scroll-into-view-and-show-validation-message.html
2829
2830         * html/HTMLFormControlElement.cpp:
2831         (WebCore::HTMLFormControlElement::focusAndShowValidationMessage):
2832
2833 2018-11-09  Brent Fulgham  <bfulgham@apple.com>
2834
2835         [Windows][DirectX] Be more rigors about BeginFigure/EndFigure and Close operations. 
2836         https://bugs.webkit.org/show_bug.cgi?id=191452
2837         <rdar://problem/45933964>
2838
2839         Reviewed by Zalan Bujtas.
2840
2841         Do a better job of balancing the BeginFigure/EndFigure calls in
2842         the PathDirect2D implementation. Failure to do so puts the Geometry sink
2843         into an error state that prevents it from producing drawing output.
2844       
2845
2846         * platform/graphics/Path.h:
2847         * platform/graphics/win/GraphicsContextDirect2D.cpp:
2848         (WebCore::GraphicsContext::drawPath): Flush is needed here.
2849         (WebCore::GraphicsContext::fillPath): Ditto.
2850         (WebCore::GraphicsContext::strokePath): Ditto.
2851         * platform/graphics/win/PathDirect2D.cpp:
2852         (WebCore::Path::drawDidComplete):
2853         (WebCore::Path::closeAnyOpenGeometries):
2854         (WebCore::Path::transform):
2855         (WebCore::Path::openFigureAtCurrentPointIfNecessary):
2856         (WebCore::Path::moveTo):
2857         (WebCore::Path::closeSubpath):
2858
2859 2018-11-09  Jer Noble  <jer.noble@apple.com>
2860
2861         [Cocoa] Fix failing imported/w3c/web-platform-tests/media-source/mediasource-changetype-play.html test
2862         https://bugs.webkit.org/show_bug.cgi?id=191396
2863
2864         Reviewed by Eric Carlson.
2865
2866         When changeType() is called, exempt video and text tracks (in addition to just audio tracks)
2867         from "same codec" requirements.
2868
2869         * Modules/mediasource/SourceBuffer.cpp:
2870         (WebCore::SourceBuffer::validateInitializationSegment):
2871
2872 2018-11-09  Carlos Garcia Campos  <cgarcia@igalia.com>
2873
2874         REGRESSION(r236365): [GTK] Many form-related tests are failing
2875         https://bugs.webkit.org/show_bug.cgi?id=189993
2876
2877         Reviewed by Michael Catanzaro.
2878
2879         Only the first form data element is added to the message body due to a return added by mistake in r236365.
2880
2881         * platform/network/soup/ResourceRequestSoup.cpp:
2882         (WebCore::ResourceRequest::updateSoupMessageBody const): Remove return.
2883
2884 2018-11-09  Zalan Bujtas  <zalan@apple.com>
2885
2886         [LFC][IFC] Move some code from InlineFormattingContext::Line to InlineFormattingContext/Geometry
2887         https://bugs.webkit.org/show_bug.cgi?id=191445
2888
2889         Reviewed by Antti Koivisto.
2890
2891         The idea here is that Line should not have to deal with all the post processig tasks like the runs final aligments.
2892         (The line class would eventually turn into a collection of random things).
2893
2894         * layout/inlineformatting/InlineFormattingContext.cpp:
2895         (WebCore::Layout::InlineFormattingContext::closeLine const):
2896         (WebCore::Layout::InlineFormattingContext::appendContentToLine const):
2897         (WebCore::Layout::InlineFormattingContext::layoutInlineContent const):
2898         * layout/inlineformatting/InlineFormattingContext.h:
2899         (WebCore::Layout::InlineFormattingContext::Line::contentLogicalLeft const):
2900         (WebCore::Layout::InlineFormattingContext::Line::lastRunType const):
2901         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
2902         (WebCore::Layout::InlineFormattingContext::Geometry::adjustedLineLogicalLeft):
2903         (WebCore::Layout::InlineFormattingContext::Geometry::justifyRuns):
2904         (WebCore::Layout::InlineFormattingContext::Geometry::computeExpansionOpportunities):
2905         * layout/inlineformatting/Line.cpp:
2906         (WebCore::Layout::InlineFormattingContext::Line::Line):
2907         (WebCore::Layout::InlineFormattingContext::Line::init):
2908         (WebCore::Layout::InlineFormattingContext::Line::contentLogicalRight const):
2909         (WebCore::Layout::InlineFormattingContext::Line::appendContent):
2910         (WebCore::Layout::InlineFormattingContext::Line::close):
2911         (WebCore::Layout::adjustedLineLogicalLeft): Deleted.
2912         (WebCore::Layout::InlineFormattingContext::Line::contentLogicalRight): Deleted.
2913         (WebCore::Layout::InlineFormattingContext::Line::computeExpansionOpportunities): Deleted.
2914         (WebCore::Layout::InlineFormattingContext::Line::justifyRuns): Deleted.
2915
2916 2018-11-09  Philippe Normand  <pnormand@igalia.com>
2917
2918         Unreviewed, GStreamer build warning fix
2919
2920         * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
2921         (WebCore::GStreamerVideoEncoder::newSampleCallback): Timesamp()
2922         returns a uint32_t, fix format string accordingly.
2923
2924 2018-11-08  Said Abou-Hallawa  <sabouhallawa@apple.com>
2925
2926         Add an SPI to allow WebView clients to add additional supported image formats
2927         https://bugs.webkit.org/show_bug.cgi?id=190454
2928
2929         Reviewed by Simon Fraser.
2930
2931         Add an SPI to allow additional supported image formats in WebView. These
2932         additional formats can be set in the WKWebViewConfiguration as an NSArray
2933         of NStrings. Each string represents an image source type aka UTI.
2934
2935         The ImageSourceType in the functions' names will be replaced by ImageType.
2936         ImageType in this context is the image UTI (Uniform Type Identifier).
2937
2938         * platform/MIMETypeRegistry.cpp:
2939         (WebCore::MIMETypeRegistry::supportedImageMIMETypes):
2940         (WebCore::MIMETypeRegistry::additionalSupportedImageMIMETypes):
2941         (WebCore::supportedImageMIMETypesForEncoding):
2942         (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
2943         * platform/MIMETypeRegistry.h:
2944         * platform/graphics/cg/ImageDecoderCG.cpp:
2945         (WebCore::ImageDecoderCG::filenameExtension const):
2946         (WebCore::ImageDecoderCG::encodedDataStatus const):
2947         * platform/graphics/cg/ImageSourceCG.h:
2948         * platform/graphics/cg/ImageSourceCGMac.mm:
2949         (WebCore::MIMETypeForImageType):
2950         (WebCore::preferredExtensionForImageType):
2951         (WebCore::MIMETypeForImageSourceType): Deleted.
2952         (WebCore::preferredExtensionForImageSourceType): Deleted.
2953         * platform/graphics/cg/ImageSourceCGWin.cpp:
2954         (WebCore::MIMETypeForImageType):
2955         (WebCore::preferredExtensionForImageType):
2956         (WebCore::MIMETypeForImageSourceType): Deleted.
2957         (WebCore::preferredExtensionForImageSourceType): Deleted.
2958         * platform/graphics/cg/UTIRegistry.cpp:
2959         (WebCore::defaultSupportedImageTypes):
2960         (WebCore::additionalSupportedImageTypes):
2961         (WebCore::setAdditionalSupportedImageTypes):
2962         (WebCore::isSupportedImageType):
2963         (WebCore::supportedDefaultImageSourceTypes): Deleted.
2964         (WebCore::isSupportImageSourceType): Deleted.
2965         * platform/graphics/cg/UTIRegistry.h:
2966
2967 2018-11-08  Megan Gardner  <megan_gardner@apple.com>
2968
2969         Adopt Reveal Framework to replace Lookup
2970         https://bugs.webkit.org/show_bug.cgi?id=191097
2971
2972         Reviewed by Tim Horton.
2973
2974         Reveal is not currently testable.
2975
2976         The Reveal framework does the same job as Lookup and DataDectors.
2977         In this patch we switch from using Lookup to determine what text
2978         to select and define to using Reveal and RVItems. Since this
2979         code needs to work on older systems, and Reveal is newer, we also need
2980         to keep around the old code for old systems so that they can also
2981         continue to work. Eventually we will remove this code and also likly switch
2982         to passing RVItems across from the web process rather than making them
2983         on each side.
2984
2985         * SourcesCocoa.txt:
2986         * WebCore.xcodeproj/project.pbxproj:
2987         * editing/mac/DictionaryLookup.h:
2988         * editing/mac/DictionaryLookup.mm:
2989
2990         Create a delegate to respond to Reveal and help draw the string or highlight.
2991
2992         (-[WebRevealHighlight initWithHighlightRect:useDefaultHighlight:attributedString:]):
2993         (-[WebRevealHighlight setClearTextIndicator:]):
2994         (-[WebRevealHighlight revealContext:rectsForItem:]):
2995         (-[WebRevealHighlight revealContext:drawRectsForItem:]):
2996         (-[WebRevealHighlight revealContext:shouldUseDefaultHighlightForItem:]):
2997         (-[WebRevealHighlight revealContext:stopHighlightingItem:]):
2998         (WebCore::showPopupOrCreateAnimationController):
2999
3000         Unify the code paths and utalize the Reveal framework to create and/or display the popovers.
3001
3002         (WebCore::DictionaryLookup::showPopup):
3003         (WebCore::DictionaryLookup::animationControllerForPopup):
3004
3005         Pipe the new callback through.
3006
3007         (WebCore::tokenRange): Deleted.
3008
3009         Only used with Lookup
3010
3011         (WebCore::selectionContainsPosition): Deleted.
3012
3013         Only used with Lookup.
3014
3015         * editing/mac/DictionaryLookupLegacy.mm: Copied from Source/WebCore/editing/mac/DictionaryLookup.mm.
3016
3017         Keep a copy of the previous implementation of DictionaryLookup, because Reveal not available on older
3018         system.
3019
3020         (WebCore::tokenRange):
3021         (WebCore::selectionContainsPosition):
3022         (WebCore::expandSelectionByCharacters):
3023         (WebCore::showPopupOrCreateAnimationController):
3024         (WebCore::DictionaryLookup::showPopup):
3025         (WebCore::DictionaryLookup::hidePopup):
3026         (WebCore::DictionaryLookup::animationControllerForPopup):
3027
3028 2018-11-08  Keith Rollin  <krollin@apple.com>
3029
3030         Create .xcfilelist files
3031         https://bugs.webkit.org/show_bug.cgi?id=191324
3032         <rdar://problem/45852819>
3033
3034         Reviewed by Alex Christensen.
3035
3036         As part of preparing for enabling XCBuild, create and use .xcfilelist
3037         files. These files are using during Run Script build phases in an
3038         Xcode project. If a Run Script build phase produces new files that are
3039         used later as inputs to subsequent build phases, XCBuild needs to know
3040         about these files. These files can be either specified in an "output
3041         files" section of the Run Script phase editor, or in .xcfilelist files
3042         that are associated with the Run Script build phase.
3043
3044         This patch takes the second approach. It consists of three sets of changes:
3045
3046         - Modify the DerivedSources.make files to have a
3047           'print_all_generated_files" target that produces a list of the files
3048           they create.
3049
3050         - Create a shell script that produces .xcfilelist files from the
3051           output of the previous step, as well as for the files created in the
3052           Generate Unified Sources build steps.
3053
3054         - Add the new .xcfilelist files to the associated projects.
3055
3056         Note that, with these changes, the Xcode workspace and projects can no
3057         longer be fully loaded into Xcode 9. Xcode will attempt to load the
3058         projects that have .xcfilelist files associated with them, but will
3059         fail and display a placeholder for those projects instead. It's
3060         expected that all developers are using Xcode 10 by now and that not
3061         being able to load into Xcode 9 is not a practical issue. Keep in mind
3062         that this is strictly an IDE issue, and that the projects can still be
3063         built with `xcodebuild`.
3064
3065         Also note that the shell script that creates the .xcfilelist files can
3066         also be used to verify that the set of files that's currently checked
3067         in is up-to-date. This checking can be used as part of a check-in hook
3068         or part of check-webkit-style to sooner catch cases where the
3069         .xcfilelist files need to be regenerated.
3070
3071         No new tests -- no changed functionality.
3072
3073         * DerivedSources.make:
3074         * DerivedSources.xcfilelist: Added.
3075         * UnifiedSources.xcfilelist: Added.
3076         * WebCore.xcodeproj/project.pbxproj:
3077
3078 2018-11-08  Don Olmstead  <don.olmstead@sony.com>
3079
3080         Provide generic implementation of SSLKeyGenerator functions
3081         https://bugs.webkit.org/show_bug.cgi?id=191428
3082
3083         Reviewed by Michael Catanzaro.
3084
3085         No new tests. No change in behavior.
3086
3087         Both SSLKeyGeneratorGLib and SSLKeyGeneratorIOS were stub
3088         implementations. Since <keygen> is deprecated it looks unlikely that
3089         an implementation is actually needed, however an implementation is
3090         needed until support is reomved.
3091
3092         * Sources.txt:
3093         * SourcesCocoa.txt:
3094         * WebCore.xcodeproj/project.pbxproj:
3095         * platform/SSLKeyGenerator.cpp: Added.
3096         (WebCore::getSupportedKeySizes):
3097         (WebCore::signedPublicKeyAndChallengeString):
3098         * platform/SourcesGLib.txt:
3099         * platform/glib/SSLKeyGeneratorGLib.cpp: Removed.
3100         * platform/ios/SSLKeyGeneratorIOS.cpp: Removed.
3101
3102 2018-11-07  Myles C. Maxfield  <mmaxfield@apple.com>
3103
3104         Unprefix text-decoration CSS3 properties
3105         https://bugs.webkit.org/show_bug.cgi?id=127193
3106
3107         Reviewed by Dean Jackson.
3108
3109         The properties are stable, and there is interop.
3110
3111         Test: fast/css3-text/css3-text-decoration/unprefix.html
3112
3113         * css/CSSComputedStyleDeclaration.cpp:
3114         (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
3115         * css/CSSProperties.json:
3116         * css/StyleResolver.cpp:
3117         (WebCore::shouldApplyPropertyInParseOrder):
3118         (WebCore::isValidVisitedLinkProperty):
3119         * css/parser/CSSParserFastPaths.cpp:
3120         (WebCore::isColorPropertyID):
3121         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
3122         (WebCore::CSSParserFastPaths::isKeywordPropertyID):
3123         * css/parser/CSSPropertyParser.cpp:
3124         (WebCore::CSSPropertyParser::parseSingleValue):
3125         * editing/cocoa/DataDetection.mm:
3126         (WebCore::DataDetection::detectContentInRange):
3127         * rendering/TextDecorationPainter.cpp:
3128         (WebCore::decorationColor):
3129         * rendering/style/RenderStyle.cpp:
3130         (WebCore::RenderStyle::colorIncludingFallback const):
3131         (WebCore::RenderStyle::visitedDependentColor const):
3132
3133 2018-11-08  Timothy Hatcher  <timothy@apple.com>
3134
3135         Add experimental support for a `supported-color-schemes` CSS property.
3136         https://bugs.webkit.org/show_bug.cgi?id=191319
3137         rdar://problem/45852261
3138
3139         Reviewed by Dean Jackson.
3140
3141         Tests: css-dark-mode/parse-supported-color-schemes.html
3142                css-dark-mode/supported-color-schemes-css.html
3143
3144         * WebCore.xcodeproj/project.pbxproj:
3145         * css/CSSComputedStyleDeclaration.cpp:
3146         (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
3147         * css/CSSProperties.json:
3148         * css/CSSValueKeywords.in:
3149         * css/StyleBuilderConverter.h:
3150         (WebCore::StyleBuilderConverter::updateSupportedColorSchemes):
3151         (WebCore::StyleBuilderConverter::convertSupportedColorSchemes):
3152         * css/StyleResolver.cpp:
3153         (WebCore::StyleResolver::colorFromPrimitiveValue const):
3154         * css/parser/CSSPropertyParser.cpp:
3155         (WebCore::consumeSupportedColorSchemes):
3156         (WebCore::CSSPropertyParser::parseSingleValue):
3157         * dom/Document.cpp:
3158         (WebCore::Document::resetLinkColor):
3159         (WebCore::Document::resetVisitedLinkColor):
3160         (WebCore::Document::resetActiveLinkColor):
3161         (WebCore::Document::processSupportedColorSchemes):
3162         (WebCore::Document::useDarkAppearance const):
3163         (WebCore::Document::styleColorOptions const):
3164         * dom/Document.h:
3165         * editing/cocoa/WebContentReaderCocoa.mm:
3166         (WebCore::createFragment):
3167         * html/canvas/CanvasRenderingContext2D.cpp:
3168         (WebCore::CanvasRenderingContext2D::drawFocusIfNeededInternal):
3169         * inspector/InspectorOverlay.cpp:
3170         (WebCore::InspectorOverlay::paint):
3171         * page/FrameView.cpp:
3172         (WebCore::FrameView::useDarkAppearance const):
3173         (WebCore::FrameView::paintScrollCorner):
3174         * platform/mac/DragImageMac.mm:
3175         (WebCore::createDragImageForLink):
3176         * rendering/InlineFlowBox.cpp:
3177         (WebCore::InlineFlowBox::paintBoxDecorations):
3178         * rendering/InlineTextBox.cpp:
3179         (WebCore::InlineTextBox::paintPlatformDocumentMarker):
3180         * rendering/RenderBox.cpp:
3181         (WebCore::RenderBox::paintRootBoxFillLayers):
3182         (WebCore::RenderBox::paintBackground):
3183         * rendering/RenderElement.cpp:
3184         (WebCore::RenderElement::selectionColor const):
3185         (WebCore::RenderElement::selectionBackgroundColor const):
3186         (WebCore::RenderElement::paintFocusRing):
3187         * rendering/RenderImage.cpp:
3188         (WebCore::RenderImage::paintAreaElementFocusRing):
3189         * rendering/RenderLayerBacking.cpp:
3190         (WebCore::RenderLayerBacking::paintContents):
3191         * rendering/RenderLayerCompositor.cpp:
3192         (WebCore::RenderLayerCompositor::paintContents):
3193         * rendering/RenderListBox.cpp:
3194         (WebCore::RenderListBox::paintItemForeground):
3195         (WebCore::RenderListBox::paintItemBackground):
3196         * rendering/RenderObject.cpp:
3197         (WebCore::RenderObject::useDarkAppearance const):
3198         (WebCore::RenderObject::styleColorOptions const):
3199         * rendering/RenderObject.h:
3200         * rendering/RenderTableCell.cpp:
3201         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
3202         * rendering/RenderTheme.cpp:
3203         (WebCore::RenderTheme::paint):
3204         * rendering/RenderTheme.h:
3205         (WebCore::RenderTheme::usingDarkAppearance const): Deleted.
3206         * rendering/RenderThemeMac.h:
3207         * rendering/RenderThemeMac.mm:
3208         (WebCore::RenderThemeMac::documentViewFor const):
3209         (WebCore::RenderThemeMac::adjustMenuListStyle const):
3210         (WebCore::RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary):
3211         (WebCore::RenderThemeMac::paintSliderThumb):
3212         (WebCore::RenderThemeMac::usingDarkAppearance const): Deleted.
3213         * rendering/style/RenderStyle.h:
3214         (WebCore::RenderStyle::supportedColorSchemes const):
3215         (WebCore::RenderStyle::setSupportedColorSchemes):
3216         (WebCore::RenderStyle::initialSupportedColorSchemes):
3217         * rendering/style/RenderStyleConstants.h:
3218         * rendering/style/StyleRareInheritedData.cpp:
3219         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
3220         (WebCore::StyleRareInheritedData::operator== const):
3221         * rendering/style/StyleRareInheritedData.h:
3222         * rendering/style/StyleSupportedColorSchemes.h: Added.
3223         (WebCore::StyleSupportedColorSchemes::StyleSupportedColorSchemes):
3224         (WebCore::StyleSupportedColorSchemes::operator== const):
3225         (WebCore::StyleSupportedColorSchemes::operator!= const):
3226         (WebCore::StyleSupportedColorSchemes::isAuto const):
3227         (WebCore::StyleSupportedColorSchemes::isOnly const):
3228         (WebCore::StyleSupportedColorSchemes::colorSchemes const):
3229         (WebCore::StyleSupportedColorSchemes::add):
3230         (WebCore::StyleSupportedColorSchemes::contains const):
3231         (WebCore::StyleSupportedColorSchemes::setAllowsTransformations):
3232         (WebCore::StyleSupportedColorSchemes::allowsTransformations const):
3233         * svg/graphics/SVGImage.cpp:
3234         (WebCore::SVGImage::draw):
3235
3236 2018-11-08  Joseph Pecoraro  <pecoraro@apple.com>
3237
3238         Web Inspector: Restrict domains at the target level instead of only at the window level
3239         https://bugs.webkit.org/show_bug.cgi?id=191344
3240
3241         Reviewed by Devin Rousso.
3242
3243         * inspector/WorkerInspectorController.cpp:
3244         (WebCore::WorkerInspectorController::WorkerInspectorController):
3245         Remove Inspector domain from workers. It was unused anyways.
3246
3247 2018-11-08  Dean Jackson  <dino@apple.com>
3248
3249         Add a String literal that returns a String
3250         https://bugs.webkit.org/show_bug.cgi?id=191425
3251         <rdar://problem/45914556>
3252
3253         Reviewed by Sam Weinig.
3254
3255         Use _str where possible.
3256
3257         API Test in WPT.
3258
3259         * Modules/fetch/FetchRequest.cpp:
3260         (WebCore::computeReferrer):
3261         * Modules/indexeddb/IDBKeyPath.cpp:
3262         (WebCore::loggingString):
3263         * Modules/webdatabase/OriginLock.cpp:
3264         (WebCore::OriginLock::lockFileNameForPath):
3265         * css/CSSBasicShapes.cpp:
3266         (WebCore::updateCornerRadiusWidthAndHeight):
3267         * html/canvas/WebGL2RenderingContext.cpp:
3268         (WebCore::WebGL2RenderingContext::getParameter):
3269         * html/canvas/WebGLRenderingContext.cpp:
3270         (WebCore::WebGLRenderingContext::getParameter):
3271         * loader/LinkHeader.cpp:
3272         (WebCore::parseParameterValue):
3273         * loader/LinkLoader.cpp:
3274         (WebCore::LinkLoader::preloadIfNeeded):
3275         * page/NavigatorBase.cpp:
3276         (WebCore::NavigatorBase::platform):
3277         * platform/DateComponents.cpp:
3278         (WebCore::DateComponents::toString const):
3279         * platform/mac/PlatformEventFactoryMac.mm:
3280         (WebCore::keyIdentifierForKeyEvent):
3281         * rendering/RenderListMarker.cpp:
3282         (WebCore::RenderListMarker::suffix const):
3283         * rendering/RenderMenuList.cpp:
3284         (RenderMenuList::setText):
3285         * testing/InternalSettings.cpp:
3286         (WebCore::InternalSettings::userInterfaceDirectionPolicy):
3287         (WebCore::InternalSettings::systemLayoutDirection):
3288         * testing/Internals.cpp:
3289         (WebCore::Internals::shadowRootType const):
3290         (WebCore::Internals::getCurrentCursorInfo):
3291
3292 2018-11-08  Jonathan Hammer  <jonathan@e3software.com>
3293
3294         Plain text drag in contenteditable is always DragOperationCopy, never DragOperationMove
3295         https://bugs.webkit.org/show_bug.cgi?id=191228
3296         <rdar://problem/45786830>
3297
3298         Reviewed by Wenson Hsieh.
3299
3300         DragController::beginDrag should not call cleanupAfterSystemDrag because
3301         the drag is still in progress even after the call to m_client.beginDrag()
3302         returns. This is in contrast to DragController::doSystemDrag, where the
3303         call to cleanupAfterSystemDrag is appropriate because the drag has
3304         concluded by the time m_client.startDrag() returns.
3305
3306         Test: fast/events/drag-and-drop-move-not-copy.html
3307
3308         * page/DragController.cpp:
3309         (WebCore::DragController::beginDrag):
3310
3311 2018-11-08  Zalan Bujtas  <zalan@apple.com>
3312
3313         [BFC][IFC] InlineFormattingContext::Line::alignRuns() should take care of all the alignments.
3314         https://bugs.webkit.org/show_bug.cgi?id=191414
3315
3316         Reviewed by Antti Koivisto.
3317
3318         * layout/inlineformatting/Line.cpp:
3319         (WebCore::Layout::InlineFormattingContext::Line::close):
3320
3321 2018-11-08  Jiewen Tan  <jiewen_tan@apple.com>
3322
3323         [WebAuthN] Import CTAP device request/response converters from Chromium
3324         https://bugs.webkit.org/show_bug.cgi?id=190784
3325         <rdar://problem/45460333>
3326
3327         Reviewed by Brent Fulgham.
3328
3329         This patch imports Chromium's CTAP device request/response converters:
3330         https://fidoalliance.org/specs/fido-v2.0-ps-20170927/fido-client-to-authenticator-protocol-v2.0-ps-20170927.html#message-encoding
3331         1. It directly imports the following files and suit them to WebKit's coding style:
3332         https://cs.chromium.org/chromium/src/device/fido/device_response_converter.cc?l=20&rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
3333         https://cs.chromium.org/chromium/src/device/fido/device_response_converter.h?rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
3334         https://cs.chromium.org/chromium/src/device/fido/authenticator_get_info_response.cc?rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
3335         https://cs.chromium.org/chromium/src/device/fido/authenticator_get_info_response.h?rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
3336         https://cs.chromium.org/chromium/src/device/fido/authenticator_supported_options.cc?rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
3337         https://cs.chromium.org/chromium/src/device/fido/authenticator_supported_options.h?rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
3338         https://cs.chromium.org/chromium/src/device/fido/ctap_request_unittest.cc?rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
3339         https://cs.chromium.org/chromium/src/device/fido/ctap_response_unittest.cc?rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
3340         https://cs.chromium.org/chromium/src/device/fido/fido_test_data.h?l=1&rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
3341         2. It gathers the following methods into DeviceRequestConverter:
3342         CtapGetAssertionRequest::EncodeAsCBOR()
3343         CtapMakeCredentialRequest::EncodeAsCBOR()
3344         PublicKeyCredentialDescriptor::ConvertToCBOR()
3345         PublicKeyCredentialParams::ConvertToCBOR()
3346         PublicKeyCredentialRpEntity::ConvertToCBOR()
3347         PublicKeyCredentialUserEntity::ConvertToCBOR()
3348         3. It also apply a patch from Chromium to CBORValue:
3349         https://chromium.googlesource.com/chromium/src/+/7b6fbff35cd8e4d508f08e1cd93b4aa0a0dc402c%5E%21/
3350
3351         Besides importing things from Chromium, it also implements UserVerificationRequirement for both
3352         PublicKeyCredentialCreationOptions and PublicKeyCredentialRequestOptions such that both options
3353         can specify more dimensions of a desired authenticator.
3354
3355         Covered by API tests.
3356
3357         * CMakeLists.txt:
3358         * DerivedSources.make:
3359         * Modules/webauthn/PublicKeyCredentialCreationOptions.h:
3360         (WebCore::PublicKeyCredentialCreationOptions::AuthenticatorSelectionCriteria::encode const):
3361         (WebCore::PublicKeyCredentialCreationOptions::AuthenticatorSelectionCriteria::decode):
3362         * Modules/webauthn/PublicKeyCredentialCreationOptions.idl:
3363         * Modules/webauthn/PublicKeyCredentialRequestOptions.h:
3364         (WebCore::PublicKeyCredentialRequestOptions::encode const):
3365         (WebCore::PublicKeyCredentialRequestOptions::decode):
3366         * Modules/webauthn/PublicKeyCredentialRequestOptions.idl:
3367         * Modules/webauthn/UserVerificationRequirement.h: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredentialRequestOptions.idl.
3368         * Modules/webauthn/UserVerificationRequirement.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredentialRequestOptions.idl.
3369         * Modules/webauthn/cbor/CBORValue.cpp:
3370         (cbor::CBORValue::CBORValue):
3371         (cbor::CBORValue::getBool const):
3372         * Modules/webauthn/cbor/CBORValue.h:
3373         * Modules/webauthn/fido/AuthenticatorGetInfoResponse.cpp: Added.
3374         (fido::toArrayValue):
3375         (fido::AuthenticatorGetInfoResponse::AuthenticatorGetInfoResponse):
3376         (fido::AuthenticatorGetInfoResponse::setMaxMsgSize):
3377         (fido::AuthenticatorGetInfoResponse::setPinProtocols):
3378         (fido::AuthenticatorGetInfoResponse::setExtensions):
3379         (fido::AuthenticatorGetInfoResponse::setOptions):
3380         (fido::encodeAsCBOR):
3381         * Modules/webauthn/fido/AuthenticatorGetInfoResponse.h: Added.
3382         * Modules/webauthn/fido/AuthenticatorSupportedOptions.cpp: Added.
3383         (fido::AuthenticatorSupportedOptions::setSupportsResidentKey):
3384         (fido::AuthenticatorSupportedOptions::setUserVerificationAvailability):
3385         (fido::AuthenticatorSupportedOptions::setUserPresenceRequired):
3386         (fido::AuthenticatorSupportedOptions::setClientPinAvailability):
3387         (fido::AuthenticatorSupportedOptions::setIsPlatformDevice):
3388         (fido::convertToCBOR):
3389         * Modules/webauthn/fido/AuthenticatorSupportedOptions.h: Added.
3390         * Modules/webauthn/fido/DeviceRequestConverter.cpp: Added.
3391         (fido::convertRpEntityToCBOR):
3392         (fido::convertUserEntityToCBOR):
3393         (fido::convertParametersToCBOR):
3394         (fido::convertDescriptorToCBOR):
3395         (fido::encodeMakeCredenitalRequestAsCBOR):
3396         (fido::encodeGetAssertionRequestAsCBOR):