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