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