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