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