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