Complete fix for enabling modern EME by default
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2018-05-21  Jer Noble  <jer.noble@apple.com>
2
3         Complete fix for enabling modern EME by default
4         https://bugs.webkit.org/show_bug.cgi?id=185770
5         <rdar://problem/40368220>
6
7         Reviewed by Eric Carlson.
8
9         * Configurations/FeatureDefines.xcconfig:
10
11 2018-05-21  Olivier Blin  <olivier.blin@softathome.com>
12
13         [CMake][WebCore] fix sqlite include dir variable
14         https://bugs.webkit.org/show_bug.cgi?id=185825
15
16         Reviewed by Konstantin Tokarev.
17
18         WebCore's CMakeLists.txt used SQLITE_INCLUDE_DIRS, but only SQLITE_INCLUDE_DIR is defined.
19
20         No new tests, build fix only.
21
22         * CMakeLists.txt: Use SQLITE_INCLUDE_DIR instead of SQLITE_INCLUDE_DIRS.
23
24 2018-05-21  Olivier Blin  <olivier.blin@softathome.com>
25
26         Propagate WebCore system include dirs in WebCoreHeaderInterface
27         https://bugs.webkit.org/show_bug.cgi?id=185822
28
29         Reviewed by Michael Catanzaro.
30
31         System include directories from WebCore are not propagated anymore to its users.
32         For example gcrypt, sqlite and ICU system headers defined in PAL are not properly passed to WebKit build.
33
34         This may have been caused partly by the fix in r230385:
35         [CMake] WebKit should link to WebCore as a PRIVATE library if WebCore is a static library
36         https://bugs.webkit.org/show_bug.cgi?id=184127
37
38         No new tests, build fix.
39
40         * CMakeLists.txt:
41
42 2018-05-21  Olivier Blin  <olivier.blin@softathome.com>
43
44         Fix FrameLoader build without video
45         https://bugs.webkit.org/show_bug.cgi?id=185821
46
47         Reviewed by Michael Catanzaro.
48
49         Regression(r231392): Release assert in ScriptController::canExecuteScripts via HTMLMediaElement::~HTMLMediaElement()
50         https://bugs.webkit.org/show_bug.cgi?id=185288
51
52         No new tests, build fix only.
53
54         * loader/FrameLoader.cpp:
55         (WebCore::FrameLoader::checkCompleted): Flag HTMLMediaElement::isRunningDestructor() usage.
56
57 2018-05-21  Sam Weinig  <sam@webkit.org>
58
59         Modernize RenderStyleConstants.h - Part 1
60         https://bugs.webkit.org/show_bug.cgi?id=185809
61
62         Reviewed by Yusuke Suzuki.
63             
64         Modernized the first set of enums in RenderStyleConstants.h by:
65             - Converting them to enum classes
66             - Renaming them to remove unnecessary prefix 'E's
67             - Renaming values to take advantage of enum class scoping (e.g. StyleDifferenceEqual -> StyleDifference::Equal)
68             - Renaming to match modern conventions (e.g BNONE -> None)
69             - Reformatting them so that each value is on its own line.
70
71         Modernizes the following enums:
72             PrintColorAdjust
73             StyleDifference
74             StyleDifferenceContextSensitiveProperty
75             ColumnFill
76             ColumnSpan
77             BorderCollapse (renamed from EBorderCollapse)
78             BorderStyle (renamed from EBorderStyle)
79             BorderPrecedence (renamed from EBorderPrecedence)
80             OutlineIsAuto
81             PositionType (renamed from EPosition)
82             Float (renamed from EFloat)
83             MarginCollapse (renamed from EMarginCollapse)
84             BoxDecorationBreak (renamed from EBoxDecorationBreak)
85             BoxSizing (renamed from EBoxSizing)
86             Overflow (renamed from EOverflow)
87             VerticalAlign (renamed from EVerticalAlign)
88             Clear (renamed from EClear)
89             TableLayoutType (renamed from ETableLayout)
90             TextCombine
91             FillAttachment (renamed from EFillAttachment)
92             FillBox (renamed from EFillBox)
93             FillRepeat (renamed from EFillRepeat)
94             FillLayerType (renamed from EFillLayerType)
95             FillSizeType (renamed from EFillSizeType)
96             MaskSourceType (renamed from EMaskSourceType)
97             BoxPack (renamed from EBoxPack)
98             BoxAlignment (renamed from EBoxAlignment)
99             BoxOrient (renamed from EBoxOrient)
100             BoxLines (renamed from EBoxLines)
101             BoxDirection (renamed from EBoxDirection)
102             AlignContent (renamed from EAlignContent)
103             FlexDirection (renamed from EFlexDirection)
104             FlexWrap (renamed from EFlexWrap)
105             ItemPosition
106             OverflowAlignment
107             ItemPositionType
108             ContentPosition
109             ContentDistribution (renamed from ContentDistributionType)
110             TextSecurity (renamed from ETextSecurity)
111             UserModify (renamed from EUserModify)
112             UserDrag (renamed from EUserDrag)
113             UserSelect (renamed from EUserSelect)
114             ObjectFit
115             AspectRatioType
116             WordBreak (renamed from EWordBreak)
117             OverflowWrap (renamed from EOverflowWrap)
118             NBSPMode (renamed from ENBSPMode)
119             LineBreak
120             Resize (renamed from EResize)
121             QuoteType
122             TransformStyle3D (renamed from ETransformStyle3D)
123             BackfaceVisibility (renamed from EBackfaceVisibility)
124             LineClamp (renamed from ELineClamp)
125             TextOverflow
126             ImageRendering (renamed from EImageRendering)
127             TextIndentLine
128             TextIndentType
129             Isolation
130
131         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
132         (AXAttributeStringSetStyle):
133         * css/BasicShapeFunctions.cpp:
134         (WebCore::valueForCenterCoordinate):
135         (WebCore::valueForBasicShape):
136         * css/CSSComputedStyleDeclaration.cpp:
137         (WebCore::sizingBox):
138         (WebCore::fillRepeatToCSSValue):
139         (WebCore::fillSourceTypeToCSSValue):
140         (WebCore::fillSizeToCSSValue):
141         (WebCore::valueForItemPositionWithOverflowAlignment):
142         (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
143         (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
144         * css/CSSPrimitiveValueMappings.h:
145         (WebCore::CSSPrimitiveValue::operator LineClampValue const):
146         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
147         (WebCore::CSSPrimitiveValue::operator ColumnFill const):
148         (WebCore::CSSPrimitiveValue::operator ColumnSpan const):
149         (WebCore::CSSPrimitiveValue::operator PrintColorAdjust const):
150         (WebCore::CSSPrimitiveValue::operator BorderStyle const):
151         (WebCore::CSSPrimitiveValue::operator OutlineIsAuto const):
152         (WebCore::CSSPrimitiveValue::operator BackfaceVisibility const):
153         (WebCore::CSSPrimitiveValue::operator FillAttachment const):
154         (WebCore::CSSPrimitiveValue::operator FillBox const):
155         (WebCore::CSSPrimitiveValue::operator FillRepeat const):
156         (WebCore::CSSPrimitiveValue::operator BoxPack const):
157         (WebCore::CSSPrimitiveValue::operator BoxAlignment const):
158         (WebCore::CSSPrimitiveValue::operator BoxDecorationBreak const):
159         (WebCore::CSSPrimitiveValue::operator BoxSizing const):
160         (WebCore::CSSPrimitiveValue::operator BoxDirection const):
161         (WebCore::CSSPrimitiveValue::operator BoxLines const):
162         (WebCore::CSSPrimitiveValue::operator BoxOrient const):
163         (WebCore::CSSPrimitiveValue::operator Clear const):
164         (WebCore::CSSPrimitiveValue::operator FlexDirection const):
165         (WebCore::CSSPrimitiveValue::operator AlignContent const):
166         (WebCore::CSSPrimitiveValue::operator FlexWrap const):
167         (WebCore::CSSPrimitiveValue::operator Float const):
168         (WebCore::CSSPrimitiveValue::operator LineBreak const):
169         (WebCore::CSSPrimitiveValue::operator MarginCollapse const):
170         (WebCore::CSSPrimitiveValue::operator NBSPMode const):
171         (WebCore::CSSPrimitiveValue::operator Overflow const):
172         (WebCore::CSSPrimitiveValue::operator PositionType const):
173         (WebCore::CSSPrimitiveValue::operator Resize const):
174         (WebCore::CSSPrimitiveValue::operator TableLayoutType const):
175         (WebCore::CSSPrimitiveValue::operator TextSecurity const):
176         (WebCore::CSSPrimitiveValue::operator UserDrag const):
177         (WebCore::CSSPrimitiveValue::operator UserModify const):
178         (WebCore::CSSPrimitiveValue::operator UserSelect const):
179         (WebCore::CSSPrimitiveValue::operator VerticalAlign const):
180         (WebCore::CSSPrimitiveValue::operator WordBreak const):
181         (WebCore::CSSPrimitiveValue::operator OverflowWrap const):
182         (WebCore::CSSPrimitiveValue::operator TextCombine const):
183         (WebCore::CSSPrimitiveValue::operator TextOverflow const):
184         (WebCore::CSSPrimitiveValue::operator ObjectFit const):
185         (WebCore::CSSPrimitiveValue::operator Isolation const):
186         (WebCore::CSSPrimitiveValue::operator BorderCollapse const):
187         (WebCore::CSSPrimitiveValue::operator ImageRendering const):
188         (WebCore::CSSPrimitiveValue::operator TransformStyle3D const):
189         (WebCore::CSSPrimitiveValue::operator ItemPosition const):
190         (WebCore::CSSPrimitiveValue::operator OverflowAlignment const):
191         (WebCore::CSSPrimitiveValue::operator ContentPosition const):
192         (WebCore::CSSPrimitiveValue::operator ContentDistribution const):
193         (WebCore::CSSPrimitiveValue::operator EBorderStyle const): Deleted.
194         (WebCore::CSSPrimitiveValue::operator EBackfaceVisibility const): Deleted.
195         (WebCore::CSSPrimitiveValue::operator EFillAttachment const): Deleted.
196         (WebCore::CSSPrimitiveValue::operator EFillBox const): Deleted.
197         (WebCore::CSSPrimitiveValue::operator EFillRepeat const): Deleted.
198         (WebCore::CSSPrimitiveValue::operator EBoxPack const): Deleted.
199         (WebCore::CSSPrimitiveValue::operator EBoxAlignment const): Deleted.
200         (WebCore::CSSPrimitiveValue::operator EBoxDecorationBreak const): Deleted.
201         (WebCore::CSSPrimitiveValue::operator EBoxSizing const): Deleted.
202         (WebCore::CSSPrimitiveValue::operator EBoxDirection const): Deleted.
203         (WebCore::CSSPrimitiveValue::operator EBoxLines const): Deleted.
204         (WebCore::CSSPrimitiveValue::operator EBoxOrient const): Deleted.
205         (WebCore::CSSPrimitiveValue::operator EClear const): Deleted.
206         (WebCore::CSSPrimitiveValue::operator EFlexDirection const): Deleted.
207         (WebCore::CSSPrimitiveValue::operator EAlignContent const): Deleted.
208         (WebCore::CSSPrimitiveValue::operator EFlexWrap const): Deleted.
209         (WebCore::CSSPrimitiveValue::operator EFloat const): Deleted.
210         (WebCore::CSSPrimitiveValue::operator EMarginCollapse const): Deleted.
211         (WebCore::CSSPrimitiveValue::operator ENBSPMode const): Deleted.
212         (WebCore::CSSPrimitiveValue::operator EOverflow const): Deleted.
213         (WebCore::CSSPrimitiveValue::operator EPosition const): Deleted.
214         (WebCore::CSSPrimitiveValue::operator EResize const): Deleted.
215         (WebCore::CSSPrimitiveValue::operator ETableLayout const): Deleted.
216         (WebCore::CSSPrimitiveValue::operator ETextSecurity const): Deleted.
217         (WebCore::CSSPrimitiveValue::operator EUserDrag const): Deleted.
218         (WebCore::CSSPrimitiveValue::operator EUserModify const): Deleted.
219         (WebCore::CSSPrimitiveValue::operator EUserSelect const): Deleted.
220         (WebCore::CSSPrimitiveValue::operator EVerticalAlign const): Deleted.
221         (WebCore::CSSPrimitiveValue::operator EWordBreak const): Deleted.
222         (WebCore::CSSPrimitiveValue::operator EOverflowWrap const): Deleted.
223         (WebCore::CSSPrimitiveValue::operator EBorderCollapse const): Deleted.
224         (WebCore::CSSPrimitiveValue::operator EImageRendering const): Deleted.
225         (WebCore::CSSPrimitiveValue::operator ETransformStyle3D const): Deleted.
226         (WebCore::CSSPrimitiveValue::operator ContentDistributionType const): Deleted.
227         * css/CSSProperties.json:
228         * css/CSSToStyleMap.cpp:
229         (WebCore::CSSToStyleMap::mapFillAttachment):
230         (WebCore::CSSToStyleMap::mapFillSize):
231         (WebCore::CSSToStyleMap::mapFillMaskSourceType):
232         * css/CSSValueKeywords.in:
233         * css/StyleBuilderConverter.h:
234         (WebCore::StyleBuilderConverter::convertResize):
235         (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData):
236         * css/StyleBuilderCustom.h:
237         (WebCore::StyleBuilderCustom::applyValueTextIndent):
238         (WebCore::StyleBuilderCustom::applyInheritWebkitAspectRatio):
239         (WebCore::StyleBuilderCustom::applyValueWebkitAspectRatio):
240         (WebCore::StyleBuilderCustom::applyValueContent):
241         * css/StyleResolver.cpp:
242         (WebCore::isScrollableOverflow):
243         (WebCore::StyleResolver::adjustRenderStyle):
244         * css/StyleResolver.h:
245         * css/makeprop.pl:
246         (getFillLayerType):
247         * dom/Element.h:
248         * dom/Node.cpp:
249         (WebCore::computeEditabilityFromComputedStyle):
250         (WebCore::Node::canStartSelection const):
251         * dom/Position.cpp:
252         (WebCore::Position::nodeIsUserSelectNone):
253         (WebCore::Position::nodeIsUserSelectAll):
254         * dom/Range.cpp:
255         (WebCore::Range::collectSelectionRectsWithoutUnionInteriorLines const):
256         * editing/ApplyBlockElementCommand.cpp:
257         (WebCore::ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded):
258         * editing/DeleteSelectionCommand.cpp:
259         (WebCore::DeleteSelectionCommand::doApply):
260         * editing/Editing.cpp:
261         (WebCore::isSpecialHTMLElement):
262         * editing/EditorCommand.cpp:
263         (WebCore::verticalScrollDistance):
264         * editing/ReplaceSelectionCommand.cpp:
265         (WebCore::ReplaceSelectionCommand::doApply):
266         * editing/SimplifyMarkupCommand.cpp:
267         (WebCore::SimplifyMarkupCommand::doApply):
268         * editing/VisibleUnits.cpp:
269         (WebCore::backwardSearchForBoundaryWithTextIterator):
270         (WebCore::forwardSearchForBoundaryWithTextIterator):
271         * editing/cocoa/EditorCocoa.mm:
272         (WebCore::Editor::fontAttributesForSelectionStart const):
273         * editing/cocoa/HTMLConverter.mm:
274         (WebCore::editingAttributedStringFromRange):
275         * html/HTMLInputElement.cpp:
276         (WebCore::HTMLInputElement::shouldTruncateText const):
277         (WebCore::HTMLInputElement::createInnerTextStyle):
278         * html/HTMLTextFormControlElement.cpp:
279         (WebCore::HTMLTextFormControlElement::adjustInnerTextStyle const):
280         * html/shadow/SliderThumbElement.cpp:
281         (WebCore::RenderSliderContainer::layout):
282         * html/shadow/TextControlInnerElements.cpp:
283         (WebCore::TextControlInnerContainer::resolveCustomStyle):
284         (WebCore::TextControlInnerElement::resolveCustomStyle):
285         (WebCore::TextControlPlaceholderElement::resolveCustomStyle):
286         * layout/displaytree/DisplayBox.cpp:
287         (WebCore::Display::Box::borderBox const):
288         (WebCore::Display::Box::contentBox const):
289         * layout/displaytree/DisplayBox.h:
290         * layout/layouttree/LayoutBox.cpp:
291         (WebCore::Layout::Box::isRelativelyPositioned const):
292         (WebCore::Layout::Box::isStickyPositioned const):
293         (WebCore::Layout::Box::isAbsolutelyPositioned const):
294         (WebCore::Layout::Box::isFixedPositioned const):
295         (WebCore::Layout::Box::isFloatingPositioned const):
296         (WebCore::Layout::Box::isOverflowVisible const):
297         * page/DragController.cpp:
298         (WebCore::DragController::draggableElement const):
299         * page/Frame.cpp:
300         (WebCore::Frame::rangeForPoint):
301         * page/FrameView.cpp:
302         (WebCore::paginationModeForRenderStyle):
303         (WebCore::FrameView::applyOverflowToViewport):
304         (WebCore::FrameView::applyPaginationToViewport):
305         (WebCore::FrameView::calculateScrollbarModesForLayout):
306         (WebCore::FrameView::calculateExtendedBackgroundMode const):
307         (WebCore::FrameView::adjustScrollStepForFixedContent):
308         * page/SpatialNavigation.cpp:
309         (WebCore::canScrollInDirection):
310         (WebCore::canBeScrolledIntoView):
311         * page/ios/FrameIOS.mm:
312         (WebCore::Frame::nodeRespondingToScrollWheelEvents):
313         * page/mac/EventHandlerMac.mm:
314         (WebCore::scrolledToEdgeInDominantDirection):
315         * rendering/BorderEdge.cpp:
316         (WebCore::BorderEdge::BorderEdge):
317         (WebCore::BorderEdge::obscuresBackgroundEdge const):
318         (WebCore::BorderEdge::obscuresBackground const):
319         * rendering/BorderEdge.h:
320         (WebCore::BorderEdge::style const):
321         (WebCore::BorderEdge::hasVisibleColorAndStyle const):
322         * rendering/FlexibleBoxAlgorithm.h:
323         (WebCore::FlexLayoutAlgorithm::isMultiline const):
324         * rendering/FloatingObjects.cpp:
325         (WebCore::FloatingObject::FloatingObject):
326         * rendering/GridTrackSizingAlgorithm.cpp:
327         (WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const):
328         (WebCore::GridTrackSizingAlgorithm::stretchAutoTracks):
329         * rendering/HitTestResult.cpp:
330         (WebCore::HitTestResult::innerTextIfTruncated const):
331         * rendering/ImageQualityController.cpp:
332         (WebCore::ImageQualityController::interpolationQualityFromStyle):
333         * rendering/InlineBox.h:
334         (WebCore::InlineBox::verticalAlign const):
335         * rendering/InlineFlowBox.cpp:
336         (WebCore::InlineFlowBox::addToLine):
337         (WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
338         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
339         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
340         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
341         (WebCore::InlineFlowBox::paintFillLayer):
342         * rendering/LogicalSelectionOffsetCaches.h:
343         (WebCore::LogicalSelectionOffsetCaches::containingBlockInfo const):
344         * rendering/RenderBlock.cpp:
345         (WebCore::RenderBlock::removePositionedObjectsIfNeeded):
346         (WebCore::RenderBlock::styleDidChange):
347         (WebCore::RenderBlock::isSelfCollapsingBlock const):
348         (WebCore::RenderBlock::addOverflowFromPositionedObjects):
349         (WebCore::RenderBlock::markFixedPositionObjectForLayoutIfNeeded):
350         (WebCore::RenderBlock::isSelectionRoot const):
351         (WebCore::RenderBlock::selectionGaps):
352         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths const):
353         (WebCore::RenderBlock::adjustBorderBoxLogicalHeightForBoxSizing const):
354         (WebCore::RenderBlock::adjustContentBoxLogicalHeightForBoxSizing const):
355         * rendering/RenderBlockFlow.cpp:
356         (WebCore::RenderBlockFlow::MarginInfo::MarginInfo):
357         (WebCore::RenderBlockFlow::willCreateColumns const):
358         (WebCore::RenderBlockFlow::marginOffsetForSelfCollapsingBlock):
359         (WebCore::RenderBlockFlow::clearFloatsIfNeeded):
360         (WebCore::RenderBlockFlow::marginBeforeEstimateForChild const):
361         (WebCore::RenderBlockFlow::setMustDiscardMarginBefore):
362         (WebCore::RenderBlockFlow::setMustDiscardMarginAfter):
363         (WebCore::RenderBlockFlow::mustDiscardMarginBefore const):
364         (WebCore::RenderBlockFlow::mustDiscardMarginAfter const):
365         (WebCore::RenderBlockFlow::mustDiscardMarginBeforeForChild const):
366         (WebCore::RenderBlockFlow::mustDiscardMarginAfterForChild const):
367         (WebCore::RenderBlockFlow::mustSeparateMarginBeforeForChild const):
368         (WebCore::RenderBlockFlow::mustSeparateMarginAfterForChild const):
369         (WebCore::RenderBlockFlow::styleDidChange):
370         (WebCore::RenderBlockFlow::styleWillChange):
371         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
372         (WebCore::RenderBlockFlow::positionNewFloats):
373         (WebCore::RenderBlockFlow::clearFloats):
374         (WebCore::RenderBlockFlow::getClearDelta):
375         (WebCore::RenderBlockFlow::inlineBlockBaseline const):
376         (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):
377         * rendering/RenderBlockFlow.h:
378         * rendering/RenderBlockLineLayout.cpp:
379         (WebCore::expansionBehaviorForInlineTextBox):
380         (WebCore::isCollapsibleSpace):
381         (WebCore::RenderBlockFlow::layoutRunsAndFloats):
382         (WebCore::RenderBlockFlow::layoutLineBoxes):
383         * rendering/RenderBox.cpp:
384         (WebCore::RenderBox::styleWillChange):
385         (WebCore::RenderBox::styleDidChange):
386         (WebCore::RenderBox::updateFromStyle):
387         (WebCore::RenderBox::includeVerticalScrollbarSize const):
388         (WebCore::RenderBox::includeHorizontalScrollbarSize const):
389         (WebCore::RenderBox::intrinsicScrollbarLogicalWidth const):
390         (WebCore::RenderBox::hasVerticalScrollbarWithAutoBehavior const):
391         (WebCore::RenderBox::hasHorizontalScrollbarWithAutoBehavior const):
392         (WebCore::RenderBox::adjustBorderBoxLogicalWidthForBoxSizing const):
393         (WebCore::RenderBox::adjustBorderBoxLogicalHeightForBoxSizing const):
394         (WebCore::RenderBox::adjustContentBoxLogicalWidthForBoxSizing const):
395         (WebCore::RenderBox::adjustContentBoxLogicalHeightForBoxSizing const):
396         (WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect const):
397         (WebCore::isCandidateForOpaquenessTest):
398         (WebCore::RenderBox::foregroundIsKnownToBeOpaqueInRect const):
399         (WebCore::RenderBox::backgroundHasOpaqueTopLayer const):
400         (WebCore::RenderBox::computeRectForRepaint const):
401         (WebCore::RenderBox::computeLogicalWidthInFragment const):
402         (WebCore::RenderBox::columnFlexItemHasStretchAlignment const):
403         (WebCore::RenderBox::isStretchingColumnFlexItem const):
404         (WebCore::RenderBox::hasStretchedLogicalWidth const):
405         (WebCore::RenderBox::sizesLogicalWidthToFitContent const):
406         (WebCore::RenderBox::computeLogicalHeight const):
407         (WebCore::RenderBox::computeIntrinsicLogicalContentHeightUsing const):
408         (WebCore::RenderBox::createsNewFormattingContext const):
409         * rendering/RenderBox.h:
410         (WebCore::RenderBox::scrollsOverflowX const):
411         (WebCore::RenderBox::scrollsOverflowY const):
412         (WebCore::RenderBox::selfAlignmentNormalBehavior const):
413         * rendering/RenderBoxModelObject.cpp:
414         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
415         (WebCore::RenderBoxModelObject::calculateFillTileSize const):
416         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry const):
417         (WebCore::styleRequiresClipPolygon):
418         (WebCore::borderStyleFillsBorderArea):
419         (WebCore::borderStyleHasInnerDetail):
420         (WebCore::borderStyleIsDottedOrDashed):
421         (WebCore::borderStyleHasUnmatchedColorsAtCorner):
422         (WebCore::borderStylesRequireMitre):
423         (WebCore::RenderBoxModelObject::paintBorder):
424         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
425         (WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground const):
426         * rendering/RenderBoxModelObject.h:
427         * rendering/RenderDeprecatedFlexibleBox.cpp:
428         (WebCore::FlexBoxIterator::FlexBoxIterator):
429         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
430         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
431         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
432         * rendering/RenderDeprecatedFlexibleBox.h:
433         * rendering/RenderElement.cpp:
434         (WebCore::RenderElement::adjustStyleDifference const):
435         (WebCore::RenderElement::shouldRepaintForStyleDifference const):
436         (WebCore::RenderElement::initializeStyle):
437         (WebCore::RenderElement::setStyle):
438         (WebCore::RenderElement::didAttachChild):
439         (WebCore::RenderElement::propagateStyleToAnonymousChildren):
440         (WebCore::RenderElement::styleWillChange):
441         (WebCore::RenderElement::styleDidChange):
442         (WebCore::mustRepaintFillLayers):
443         (WebCore::RenderElement::selectionColor const):
444         (WebCore::RenderElement::selectionBackgroundColor const):
445         (WebCore::RenderElement::drawLineForBoxSide const):
446         (WebCore::RenderElement::paintFocusRing):
447         (WebCore::RenderElement::paintOutline):
448         (WebCore::RenderElement::updateOutlineAutoAncestor):
449         (WebCore::includeNonFixedHeight):
450         * rendering/RenderElement.h:
451         (WebCore::RenderElement::hasHiddenBackface const):
452         (WebCore::RenderElement::canContainAbsolutelyPositionedObjects const):
453         * rendering/RenderFlexibleBox.cpp:
454         (WebCore::RenderFlexibleBox::firstLineBaseline const):
455         (WebCore::contentAlignmentNormalBehavior):
456         (WebCore::RenderFlexibleBox::styleDidChange):
457         (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems):
458         (WebCore::RenderFlexibleBox::isLeftToRightFlow const):
459         (WebCore::RenderFlexibleBox::isMultiline const):
460         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
461         (WebCore::RenderFlexibleBox::crossSizeForPercentageResolution):
462         (WebCore::initialJustifyContentOffset):
463         (WebCore::justifyContentSpaceBetweenChildren):
464         (WebCore::alignmentOffset):
465         (WebCore::RenderFlexibleBox::staticMainAxisPositionForPositionedChild):
466         (WebCore::RenderFlexibleBox::staticCrossAxisPositionForPositionedChild):
467         (WebCore::RenderFlexibleBox::alignmentForChild const):
468         (WebCore::RenderFlexibleBox::needToStretchChildLogicalHeight const):
469         (WebCore::RenderFlexibleBox::mainAxisOverflowForChild const):
470         (WebCore::RenderFlexibleBox::crossAxisOverflowForChild const):
471         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
472         (WebCore::RenderFlexibleBox::layoutColumnReverse):
473         (WebCore::initialAlignContentOffset):
474         (WebCore::alignContentSpaceBetweenChildren):
475         (WebCore::RenderFlexibleBox::alignFlexLines):
476         (WebCore::RenderFlexibleBox::alignChildren):
477         * rendering/RenderFlexibleBox.h:
478         * rendering/RenderFragmentContainer.cpp:
479         (WebCore::RenderFragmentContainer::overflowRectForFragmentedFlowPortion):
480         * rendering/RenderFullScreen.cpp:
481         (WebCore::createFullScreenStyle):
482         * rendering/RenderFullScreen.h:
483         * rendering/RenderGrid.cpp:
484         (WebCore::RenderGrid::selfAlignmentChangedToStretch const):
485         (WebCore::RenderGrid::selfAlignmentChangedFromStretch const):
486         (WebCore::RenderGrid::styleDidChange):
487         (WebCore::contentAlignmentNormalBehaviorGrid):
488         (WebCore::computeOverflowAlignmentOffset):
489         (WebCore::RenderGrid::isInlineBaselineAlignedChild const):
490         (WebCore::RenderGrid::columnAxisPositionForChild const):
491         (WebCore::RenderGrid::rowAxisPositionForChild const):
492         (WebCore::RenderGrid::resolveAutoStartGridPosition const):
493         (WebCore::RenderGrid::resolveAutoEndGridPosition const):
494         (WebCore::resolveContentDistributionFallback):
495         (WebCore::contentDistributionOffset):
496         (WebCore::RenderGrid::computeContentPositionAndDistributionOffset const):
497         * rendering/RenderGrid.h:
498         * rendering/RenderIFrame.cpp:
499         (WebCore::RenderIFrame::requiresLayer const):
500         * rendering/RenderImage.cpp:
501         (WebCore::RenderImage::styleDidChange):
502         (WebCore::RenderImage::foregroundIsKnownToBeOpaqueInRect const):
503         * rendering/RenderInline.cpp:
504         (WebCore::RenderInline::styleWillChange):
505         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
506         (WebCore::RenderInline::paintOutline):
507         (WebCore::RenderInline::paintOutlineForLine):
508         * rendering/RenderLayer.cpp:
509         (WebCore::isContainerForPositioned):
510         (WebCore::RenderLayer::enclosingAncestorForPosition const):
511         (WebCore::accumulateOffsetTowardsAncestor):
512         (WebCore::RenderLayer::canResize const):
513         (WebCore::RenderLayer::resize):
514         (WebCore::RenderLayer::scrollCornerRect const):
515         (WebCore::resizerCornerRect):
516         (WebCore::RenderLayer::hasOverflowControls const):
517         (WebCore::styleRequiresScrollbar):
518         (WebCore::styleDefinesAutomaticScrollbar):
519         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
520         (WebCore::RenderLayer::paintResizer):
521         (WebCore::RenderLayer::hitTestOverflowControls):
522         (WebCore::RenderLayer::hitTestLayer):
523         (WebCore::RenderLayer::calculateClipRects const):
524         * rendering/RenderLayer.h:
525         * rendering/RenderLayerBacking.cpp:
526         (WebCore::RenderLayerBacking::updateGeometry):
527         (WebCore::canDirectlyCompositeBackgroundBackgroundImage):
528         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer const):
529         (WebCore::backgroundRectForBox):
530         * rendering/RenderLayerCompositor.cpp:
531         (WebCore::isScrollableOverflow):
532         (WebCore::styleChangeRequiresLayerRebuild):
533         (WebCore::RenderLayerCompositor::layerStyleChanged):
534         (WebCore::RenderLayerCompositor::reasonsForCompositing const):
535         (WebCore::RenderLayerCompositor::requiresCompositingForBackfaceVisibility const):
536         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const):
537         (WebCore::RenderLayerCompositor::isViewportConstrainedFixedOrStickyLayer const):
538         (WebCore::RenderLayerCompositor::requiresCompositingForPosition const):
539         (WebCore::RenderLayerCompositor::layerHas3DContent const):
540         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
541         * rendering/RenderLayerModelObject.cpp:
542         (WebCore::RenderLayerModelObject::styleWillChange):
543         * rendering/RenderMenuList.cpp:
544         (WebCore::RenderMenuList::adjustInnerStyle):
545         * rendering/RenderMultiColumnFlow.cpp:
546         (WebCore::RenderMultiColumnFlow::isColumnSpanningDescendant const):
547         * rendering/RenderMultiColumnSet.cpp:
548         (WebCore::RenderMultiColumnSet::requiresBalancing const):
549         (WebCore::RenderMultiColumnSet::paintColumnRules):
550         * rendering/RenderMultiColumnSpannerPlaceholder.cpp:
551         (WebCore::RenderMultiColumnSpannerPlaceholder::createAnonymous):
552         * rendering/RenderObject.cpp:
553         (WebCore::RenderObject::propagateRepaintToParentWithOutlineAutoIfNeeded const):
554         (WebCore::containerForElement):
555         (WebCore::RenderObject::calculateBorderStyleColor):
556         * rendering/RenderObject.h:
557         (WebCore::RenderObject::isFixedPositioned const):
558         (WebCore::RenderObject::isAbsolutelyPositioned const):
559         (WebCore::RenderObject::setPositionState):
560         (WebCore::RenderObject::RenderObjectBitfields::setPositionedState):
561         (WebCore::RenderObject::RenderObjectBitfields::clearPositionedState):
562         * rendering/RenderQuote.cpp:
563         (WebCore::RenderQuote::styleDidChange):
564         (WebCore::RenderQuote::computeText const):
565         (WebCore::RenderQuote::isOpen const):
566         * rendering/RenderReplaced.cpp:
567         (WebCore::RenderReplaced::layout):
568         (WebCore::RenderReplaced::setNeedsLayoutIfNeededAfterIntrinsicSizeChange):
569         (WebCore::RenderReplaced::replacedContentRect const):
570         * rendering/RenderScrollbarPart.cpp:
571         (WebCore::RenderScrollbarPart::styleDidChange):
572         * rendering/RenderTable.cpp:
573         (WebCore::RenderTable::styleDidChange):
574         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
575         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
576         (WebCore::RenderTable::calcBorderStart const):
577         (WebCore::RenderTable::calcBorderEnd const):
578         (WebCore::RenderTable::outerBorderBefore const):
579         (WebCore::RenderTable::outerBorderAfter const):
580         (WebCore::RenderTable::outerBorderStart const):
581         (WebCore::RenderTable::outerBorderEnd const):
582         * rendering/RenderTable.h:
583         (WebCore::RenderTable::collapseBorders const):
584         * rendering/RenderTableCell.cpp:
585         (WebCore::RenderTableCell::computeIntrinsicPadding):
586         (WebCore::RenderTableCell::styleDidChange):
587         (WebCore::compareBorders):
588         (WebCore::chooseBorder):
589         (WebCore::emptyBorder):
590         (WebCore::RenderTableCell::computeCollapsedStartBorder const):
591         (WebCore::RenderTableCell::computeCollapsedEndBorder const):
592         (WebCore::RenderTableCell::computeCollapsedBeforeBorder const):
593         (WebCore::RenderTableCell::computeCollapsedAfterBorder const):
594         (WebCore::CollapsedBorders::addBorder):
595         (WebCore::RenderTableCell::paintCollapsedBorders):
596         (WebCore::RenderTableCell::scrollbarsChanged):
597         * rendering/RenderTableCell.h:
598         (WebCore::RenderTableCell::logicalHeightForRowSizing const):
599         (WebCore::RenderTableCell::isBaselineAligned const):
600         * rendering/RenderTableRow.cpp:
601         (WebCore::RenderTableRow::styleDidChange):
602         * rendering/RenderTableSection.cpp:
603         (WebCore::RenderTableSection::calcOuterBorderBefore const):
604         (WebCore::RenderTableSection::calcOuterBorderAfter const):
605         (WebCore::RenderTableSection::calcOuterBorderStart const):
606         (WebCore::RenderTableSection::calcOuterBorderEnd const):
607         (WebCore::RenderTableSection::paintRowGroupBorder):
608         (WebCore::RenderTableSection::paintRowGroupBorderIfRequired):
609         (WebCore::RenderTableSection::cachedCollapsedBorder):
610         * rendering/RenderTableSection.h:
611         * rendering/RenderText.cpp:
612         (WebCore::RenderText::styleDidChange):
613         (WebCore::RenderText::absoluteQuadsClippedToEllipsis const):
614         (WebCore::isSpaceAccordingToStyle):
615         (WebCore::mapLineBreakToIteratorMode):
616         (WebCore::RenderText::computePreferredLogicalWidths):
617         (WebCore::RenderText::setRenderedText):
618         (WebCore::RenderText::textWithoutConvertingBackslashToYenSymbol const):
619         (WebCore::RenderText::momentarilyRevealLastTypedCharacter):
620         * rendering/RenderTextControl.cpp:
621         (WebCore::RenderTextControl::computeLogicalHeight const):
622         * rendering/RenderTextControlSingleLine.cpp:
623         (WebCore::RenderTextControlSingleLine::styleDidChange):
624         * rendering/RenderTheme.cpp:
625         (WebCore::RenderTheme::extractControlStatesForRenderer const):
626         * rendering/RenderThemeIOS.mm:
627         (WebCore::adjustInputElementButtonStyle):
628         * rendering/RenderThemeMac.mm:
629         (WebCore::RenderThemeMac::updateFocusedState):
630         (WebCore::RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary):
631         (WebCore::RenderThemeMac::adjustSearchFieldStyle const):
632         * rendering/RenderTreeAsText.cpp:
633         (WebCore::printBorderStyle):
634         * rendering/RenderVideo.cpp:
635         (WebCore::RenderVideo::updatePlayer):
636         * rendering/RenderView.cpp:
637         (WebCore::RenderView::RenderView):
638         (WebCore::rendererObscuresBackground):
639         * rendering/RootInlineBox.cpp:
640         (WebCore::RootInlineBox::verticalPositionForBox):
641         * rendering/SimpleLineLayout.cpp:
642         (WebCore::SimpleLineLayout::canUseForStyle):
643         (WebCore::SimpleLineLayout::canUseForWithReason):
644         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
645         (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
646         * rendering/TextPaintStyle.cpp:
647         (WebCore::computeTextPaintStyle):
648         * rendering/line/BreakingContext.h:
649         (WebCore::BreakingContext::handleBR):
650         (WebCore::shouldAddBorderPaddingMargin):
651         (WebCore::BreakingContext::handleText):
652         (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord):
653         * rendering/line/LineBreaker.cpp:
654         (WebCore::LineBreaker::reset):
655         * rendering/line/LineBreaker.h:
656         (WebCore::LineBreaker::clear):
657         * rendering/line/LineInlineHeaders.h:
658         (WebCore::skipNonBreakingSpace):
659         * rendering/line/LineWidth.cpp:
660         (WebCore::requiresIndent):
661         * rendering/style/BorderData.h:
662         (WebCore::BorderData::borderLeftWidth const):
663         (WebCore::BorderData::borderRightWidth const):
664         (WebCore::BorderData::borderTopWidth const):
665         (WebCore::BorderData::borderBottomWidth const):
666         * rendering/style/BorderValue.h:
667         (WebCore::BorderValue::BorderValue):
668         (WebCore::BorderValue::nonZero const):
669         (WebCore::BorderValue::isVisible const):
670         (WebCore::BorderValue::style const):
671         * rendering/style/CollapsedBorderValue.h:
672         (WebCore::CollapsedBorderValue::CollapsedBorderValue):
673         (WebCore::CollapsedBorderValue::width const):
674         (WebCore::CollapsedBorderValue::style const):
675         (WebCore::CollapsedBorderValue::exists const):
676         (WebCore::CollapsedBorderValue::precedence const):
677         * rendering/style/FillLayer.cpp:
678         (WebCore::FillLayer::FillLayer):
679         (WebCore::clipMax):
680         (WebCore::FillLayer::computeClipMax const):
681         (WebCore::FillLayer::hasRepeatXY const):
682         (WebCore::FillLayer::hasFixedImage const):
683         * rendering/style/FillLayer.h:
684         (WebCore::FillSize::FillSize):
685         (WebCore::FillLayer::attachment const):
686         (WebCore::FillLayer::clip const):
687         (WebCore::FillLayer::origin const):
688         (WebCore::FillLayer::repeatX const):
689         (WebCore::FillLayer::repeatY const):
690         (WebCore::FillLayer::sizeType const):
691         (WebCore::FillLayer::size const):
692         (WebCore::FillLayer::maskSourceType const):
693         (WebCore::FillLayer::isSizeSet const):
694         (WebCore::FillLayer::setAttachment):
695         (WebCore::FillLayer::setClip):
696         (WebCore::FillLayer::setOrigin):
697         (WebCore::FillLayer::setRepeatX):
698         (WebCore::FillLayer::setRepeatY):
699         (WebCore::FillLayer::setComposite):
700         (WebCore::FillLayer::setBlendMode):
701         (WebCore::FillLayer::setSizeType):
702         (WebCore::FillLayer::setSize):
703         (WebCore::FillLayer::setMaskSourceType):
704         (WebCore::FillLayer::clearSize):
705         (WebCore::FillLayer::type const):
706         (WebCore::FillLayer::initialFillAttachment):
707         (WebCore::FillLayer::initialFillClip):
708         (WebCore::FillLayer::initialFillOrigin):
709         (WebCore::FillLayer::initialFillRepeatX):
710         (WebCore::FillLayer::initialFillRepeatY):
711         (WebCore::FillLayer::initialFillComposite):
712         (WebCore::FillLayer::initialFillBlendMode):
713         (WebCore::FillLayer::initialFillSize):
714         (WebCore::FillLayer::initialFillXPosition):
715         (WebCore::FillLayer::initialFillYPosition):
716         (WebCore::FillLayer::initialFillImage):
717         (WebCore::FillLayer::initialFillMaskSourceType):
718         * rendering/style/LineClampValue.h:
719         (WebCore::LineClampValue::LineClampValue):
720         (WebCore::LineClampValue::isPercentage const):
721         * rendering/style/RenderStyle.cpp:
722         (WebCore::RenderStyle::RenderStyle):
723         (WebCore::resolvedSelfAlignment):
724         (WebCore::RenderStyle::resolvedAlignSelf const):
725         (WebCore::RenderStyle::resolvedJustifySelf const):
726         (WebCore::resolvedContentAlignment):
727         (WebCore::resolvedContentAlignmentPosition):
728         (WebCore::resolvedContentAlignmentDistribution):
729         (WebCore::RenderStyle::resolvedJustifyContentDistribution const):
730         (WebCore::RenderStyle::resolvedAlignContentDistribution const):
731         (WebCore::RenderStyle::changeRequiresLayout const):
732         (WebCore::RenderStyle::changeRequiresPositionedLayoutOnly const):
733         (WebCore::RenderStyle::changeRequiresLayerRepaint const):
734         (WebCore::RenderStyle::changeRequiresRepaint const):
735         (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline const):
736         (WebCore::RenderStyle::changeRequiresRecompositeLayer const):
737         (WebCore::RenderStyle::diff const):
738         (WebCore::RenderStyle::diffRequiresLayerRepaint const):
739         (WebCore::allLayersAreFixed):
740         (WebCore::RenderStyle::colorIncludingFallback const):
741         (WebCore::RenderStyle::setColumnStylesFromPaginationMode):
742         (WebCore::RenderStyle::outlineWidth const):
743         (WebCore::RenderStyle::outlineOffset const):
744         * rendering/style/RenderStyle.h:
745         (WebCore::RenderStyle::isFloating const):
746         (WebCore::RenderStyle::position const):
747         (WebCore::RenderStyle::hasOutOfFlowPosition const):
748         (WebCore::RenderStyle::hasInFlowPosition const):
749         (WebCore::RenderStyle::hasViewportConstrainedPosition const):
750         (WebCore::RenderStyle::floating const):
751         (WebCore::RenderStyle::borderLeftStyle const):
752         (WebCore::RenderStyle::borderRightStyle const):
753         (WebCore::RenderStyle::borderTopStyle const):
754         (WebCore::RenderStyle::borderBottomStyle const):
755         (WebCore::RenderStyle::hasOutline const):
756         (WebCore::RenderStyle::outlineStyle const):
757         (WebCore::RenderStyle::overflowX const):
758         (WebCore::RenderStyle::overflowY const):
759         (WebCore::RenderStyle::overflowInlineDirection const):
760         (WebCore::RenderStyle::overflowBlockDirection const):
761         (WebCore::RenderStyle::verticalAlign const):
762         (WebCore::RenderStyle::clear const):
763         (WebCore::RenderStyle::tableLayout const):
764         (WebCore::RenderStyle::backgroundRepeatX const):
765         (WebCore::RenderStyle::backgroundRepeatY const):
766         (WebCore::RenderStyle::backgroundAttachment const):
767         (WebCore::RenderStyle::backgroundClip const):
768         (WebCore::RenderStyle::backgroundOrigin const):
769         (WebCore::RenderStyle::backgroundSizeType const):
770         (WebCore::RenderStyle::maskRepeatX const):
771         (WebCore::RenderStyle::maskRepeatY const):
772         (WebCore::RenderStyle::maskClip const):
773         (WebCore::RenderStyle::maskOrigin const):
774         (WebCore::RenderStyle::maskSizeType const):
775         (WebCore::RenderStyle::borderCollapse const):
776         (WebCore::RenderStyle::boxAlign const):
777         (WebCore::RenderStyle::boxDirection const):
778         (WebCore::RenderStyle::boxLines const):
779         (WebCore::RenderStyle::boxOrient const):
780         (WebCore::RenderStyle::boxPack const):
781         (WebCore::RenderStyle::flexDirection const):
782         (WebCore::RenderStyle::isColumnFlexDirection const):
783         (WebCore::RenderStyle::isReverseFlexDirection const):
784         (WebCore::RenderStyle::flexWrap const):
785         (WebCore::RenderStyle::boxDecorationBreak const):
786         (WebCore::RenderStyle::boxSizing const):
787         (WebCore::RenderStyle::userModify const):
788         (WebCore::RenderStyle::userDrag const):
789         (WebCore::RenderStyle::userSelect const):
790         (WebCore::RenderStyle::marginBeforeCollapse const):
791         (WebCore::RenderStyle::marginAfterCollapse const):
792         (WebCore::RenderStyle::wordBreak const):
793         (WebCore::RenderStyle::overflowWrap const):
794         (WebCore::RenderStyle::nbspMode const):
795         (WebCore::RenderStyle::resize const):
796         (WebCore::RenderStyle::columnRuleStyle const):
797         (WebCore::RenderStyle::hasTextCombine const):
798         (WebCore::RenderStyle::transformStyle3D const):
799         (WebCore::RenderStyle::preserves3D const):
800         (WebCore::RenderStyle::backfaceVisibility const):
801         (WebCore::RenderStyle::textSecurity const):
802         (WebCore::RenderStyle::imageRendering const):
803         (WebCore::RenderStyle::setIsolation):
804         (WebCore::RenderStyle::hasIsolation const):
805         (WebCore::RenderStyle::isolation const):
806         (WebCore::RenderStyle::setPosition):
807         (WebCore::RenderStyle::setFloating):
808         (WebCore::RenderStyle::setBackgroundSize):
809         (WebCore::RenderStyle::setBorderLeftStyle):
810         (WebCore::RenderStyle::setBorderRightStyle):
811         (WebCore::RenderStyle::setBorderTopStyle):
812         (WebCore::RenderStyle::setBorderBottomStyle):
813         (WebCore::RenderStyle::setOutlineStyleIsAuto):
814         (WebCore::RenderStyle::setOutlineStyle):
815         (WebCore::RenderStyle::setOverflowX):
816         (WebCore::RenderStyle::setOverflowY):
817         (WebCore::RenderStyle::setVerticalAlign):
818         (WebCore::RenderStyle::setVerticalAlignLength):
819         (WebCore::RenderStyle::setClear):
820         (WebCore::RenderStyle::setTableLayout):
821         (WebCore::RenderStyle::setImageRendering):
822         (WebCore::RenderStyle::clearBackgroundLayers):
823         (WebCore::RenderStyle::clearMaskLayers):
824         (WebCore::RenderStyle::setBorderCollapse):
825         (WebCore::RenderStyle::setAspectRatioType):
826         (WebCore::RenderStyle::setPrintColorAdjust):
827         (WebCore::RenderStyle::setBoxAlign):
828         (WebCore::RenderStyle::setBoxDirection):
829         (WebCore::RenderStyle::setBoxLines):
830         (WebCore::RenderStyle::setBoxOrient):
831         (WebCore::RenderStyle::setBoxPack):
832         (WebCore::RenderStyle::setBoxSizing):
833         (WebCore::RenderStyle::setFlexDirection):
834         (WebCore::RenderStyle::setFlexWrap):
835         (WebCore::RenderStyle::setBoxDecorationBreak):
836         (WebCore::RenderStyle::setUserModify):
837         (WebCore::RenderStyle::setUserDrag):
838         (WebCore::RenderStyle::setUserSelect):
839         (WebCore::RenderStyle::setTextOverflow):
840         (WebCore::RenderStyle::setMarginBeforeCollapse):
841         (WebCore::RenderStyle::setMarginAfterCollapse):
842         (WebCore::RenderStyle::setWordBreak):
843         (WebCore::RenderStyle::setOverflowWrap):
844         (WebCore::RenderStyle::setNBSPMode):
845         (WebCore::RenderStyle::setLineBreak):
846         (WebCore::RenderStyle::setResize):
847         (WebCore::RenderStyle::setColumnFill):
848         (WebCore::RenderStyle::setColumnRuleStyle):
849         (WebCore::RenderStyle::setColumnSpan):
850         (WebCore::RenderStyle::setTextCombine):
851         (WebCore::RenderStyle::setObjectFit):
852         (WebCore::RenderStyle::setTransformStyle3D):
853         (WebCore::RenderStyle::setBackfaceVisibility):
854         (WebCore::RenderStyle::setTextSecurity):
855         (WebCore::RenderStyle::initialOverflowX):
856         (WebCore::RenderStyle::initialOverflowY):
857         (WebCore::RenderStyle::initialClear):
858         (WebCore::RenderStyle::initialPosition):
859         (WebCore::RenderStyle::initialVerticalAlign):
860         (WebCore::RenderStyle::initialFloating):
861         (WebCore::RenderStyle::initialTableLayout):
862         (WebCore::RenderStyle::initialBorderCollapse):
863         (WebCore::RenderStyle::initialBorderStyle):
864         (WebCore::RenderStyle::initialOutlineStyleIsAuto):
865         (WebCore::RenderStyle::initialTextCombine):
866         (WebCore::RenderStyle::initialObjectFit):
867         (WebCore::RenderStyle::initialBoxAlign):
868         (WebCore::RenderStyle::initialBoxDecorationBreak):
869         (WebCore::RenderStyle::initialBoxDirection):
870         (WebCore::RenderStyle::initialBoxLines):
871         (WebCore::RenderStyle::initialBoxOrient):
872         (WebCore::RenderStyle::initialBoxPack):
873         (WebCore::RenderStyle::initialBoxSizing):
874         (WebCore::RenderStyle::initialJustifyItems):
875         (WebCore::RenderStyle::initialSelfAlignment):
876         (WebCore::RenderStyle::initialDefaultAlignment):
877         (WebCore::RenderStyle::initialContentAlignment):
878         (WebCore::RenderStyle::initialFlexDirection):
879         (WebCore::RenderStyle::initialFlexWrap):
880         (WebCore::RenderStyle::initialUserModify):
881         (WebCore::RenderStyle::initialUserDrag):
882         (WebCore::RenderStyle::initialUserSelect):
883         (WebCore::RenderStyle::initialTextOverflow):
884         (WebCore::RenderStyle::initialMarginBeforeCollapse):
885         (WebCore::RenderStyle::initialMarginAfterCollapse):
886         (WebCore::RenderStyle::initialWordBreak):
887         (WebCore::RenderStyle::initialOverflowWrap):
888         (WebCore::RenderStyle::initialNBSPMode):
889         (WebCore::RenderStyle::initialLineBreak):
890         (WebCore::RenderStyle::initialResize):
891         (WebCore::RenderStyle::initialAspectRatioType):
892         (WebCore::RenderStyle::initialColumnFill):
893         (WebCore::RenderStyle::initialColumnSpan):
894         (WebCore::RenderStyle::initialTransformStyle3D):
895         (WebCore::RenderStyle::initialBackfaceVisibility):
896         (WebCore::RenderStyle::initialImageRendering):
897         (WebCore::RenderStyle::initialPrintColorAdjust):
898         (WebCore::RenderStyle::initialTextIndentLine):
899         (WebCore::RenderStyle::initialTextIndentType):
900         (WebCore::RenderStyle::initialTextSecurity):
901         (WebCore::RenderStyle::initialIsolation):
902         (WebCore::collapsedBorderStyle):
903         (WebCore::RenderStyle::breakOnlyAfterWhiteSpace const):
904         (WebCore::RenderStyle::breakWords const):
905         (WebCore::RenderStyle::setTextOrientation):
906         * rendering/style/RenderStyleConstants.cpp:
907         (WebCore::operator<<):
908         * rendering/style/RenderStyleConstants.h:
909         (WebCore::operator|):
910         (WebCore::operator|=):
911         (WebCore::operator| ): Deleted.
912         (WebCore::operator|= ): Deleted.
913         * rendering/style/SVGRenderStyle.cpp:
914         (WebCore::SVGRenderStyle::diff const):
915         * rendering/style/StyleBackgroundData.cpp:
916         (WebCore::StyleBackgroundData::StyleBackgroundData):
917         * rendering/style/StyleBoxData.cpp:
918         (WebCore::StyleBoxData::StyleBoxData):
919         * rendering/style/StyleBoxData.h:
920         (WebCore::StyleBoxData::boxSizing const):
921         (WebCore::StyleBoxData::boxDecorationBreak const):
922         * rendering/style/StyleContentAlignmentData.h:
923         (WebCore::StyleContentAlignmentData::StyleContentAlignmentData):
924         (WebCore::StyleContentAlignmentData::setPosition):
925         (WebCore::StyleContentAlignmentData::setDistribution):
926         (WebCore::StyleContentAlignmentData::setOverflow):
927         (WebCore::StyleContentAlignmentData::distribution const):
928         * rendering/style/StyleDeprecatedFlexibleBoxData.cpp:
929         (WebCore::StyleDeprecatedFlexibleBoxData::StyleDeprecatedFlexibleBoxData):
930         * rendering/style/StyleDeprecatedFlexibleBoxData.h:
931         * rendering/style/StyleFlexibleBoxData.cpp:
932         (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
933         * rendering/style/StyleFlexibleBoxData.h:
934         * rendering/style/StyleMultiColData.cpp:
935         (WebCore::StyleMultiColData::StyleMultiColData):
936         * rendering/style/StyleMultiColData.h:
937         (WebCore::StyleMultiColData::ruleWidth const):
938         * rendering/style/StyleRareInheritedData.cpp:
939         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
940         * rendering/style/StyleRareInheritedData.h:
941         * rendering/style/StyleRareNonInheritedData.cpp:
942         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
943         * rendering/style/StyleRareNonInheritedData.h:
944         * rendering/style/StyleSelfAlignmentData.h:
945         (WebCore::StyleSelfAlignmentData::StyleSelfAlignmentData):
946         (WebCore::StyleSelfAlignmentData::setPosition):
947         (WebCore::StyleSelfAlignmentData::setPositionType):
948         (WebCore::StyleSelfAlignmentData::setOverflow):
949         * rendering/svg/RenderSVGBlock.cpp:
950         (WebCore::RenderSVGBlock::styleDidChange):
951         * rendering/svg/RenderSVGGradientStop.cpp:
952         (WebCore::RenderSVGGradientStop::styleDidChange):
953         * rendering/svg/RenderSVGInline.cpp:
954         (WebCore::RenderSVGInline::styleDidChange):
955         * rendering/svg/RenderSVGInlineText.cpp:
956         (WebCore::RenderSVGInlineText::styleDidChange):
957         * rendering/svg/RenderSVGModelObject.cpp:
958         (WebCore::RenderSVGModelObject::styleDidChange):
959         * rendering/svg/RenderSVGResourceContainer.cpp:
960         (WebCore::RenderSVGResourceContainer::registerResource):
961         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
962         (WebCore::RenderSVGResourceFilterPrimitive::styleDidChange):
963         * rendering/svg/RenderSVGRoot.cpp:
964         (WebCore::RenderSVGRoot::layout):
965         (WebCore::RenderSVGRoot::shouldApplyViewportClip const):
966         (WebCore::RenderSVGRoot::styleDidChange):
967         * rendering/svg/SVGInlineTextBox.cpp:
968         (WebCore::SVGInlineTextBox::paintText):
969         * rendering/svg/SVGRenderSupport.cpp:
970         (WebCore::SVGRenderSupport::isOverflowHidden):
971         * rendering/svg/SVGResourcesCache.cpp:
972         (WebCore::SVGResourcesCache::clientStyleChanged):
973         * rendering/updating/RenderTreeBuilder.cpp:
974         (WebCore::RenderTreeBuilder::attachToRenderElementInternal):
975         * rendering/updating/RenderTreeBuilderBlock.cpp:
976         (WebCore::RenderTreeBuilder::Block::insertChildToContinuation):
977         * rendering/updating/RenderTreeBuilderFirstLetter.cpp:
978         (WebCore::styleForFirstLetter):
979         * rendering/updating/RenderTreeBuilderMultiColumn.cpp:
980         (WebCore::isValidColumnSpanner):
981         (WebCore::RenderTreeBuilder::MultiColumn::resolveMovedChild):
982         (WebCore::RenderTreeBuilder::MultiColumn::multiColumnRelativeWillBeRemoved):
983         * rendering/updating/RenderTreeUpdater.cpp:
984         (WebCore::RenderTreeUpdater::updateElementRenderer):
985         * style/StyleResolveForDocument.cpp:
986         (WebCore::Style::resolveForDocument):
987
988 2018-05-21  Alicia Boya García  <aboya@igalia.com>
989
990         [MSE][GStreamer] Stream::decodebinSinkPad is read but never assigned
991         https://bugs.webkit.org/show_bug.cgi?id=185724
992
993         Reviewed by Xabier Rodriguez-Calvar.
994
995         This is a dead code removal patch; except when a Stream instance
996         happens to be instantiated in such a place that the non-initialized
997         decodeSinkPad is != 0, then it is a crash bug fix.
998
999         * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
1000         (webKitMediaSrcLinkStreamToSrcPad):
1001         * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamerPrivate.h:
1002
1003 2018-05-21  Alicia Boya García  <aboya@igalia.com>
1004
1005         [MSE][GStreamer] Force segment.start = 0 after matroskademux
1006         https://bugs.webkit.org/show_bug.cgi?id=185740
1007
1008         Reviewed by Xabier Rodriguez-Calvar.
1009
1010         This patch ensures that when WebM MSE media segments are appended in
1011         an out of order fashion their frames are not discarded by opusparse or
1012         any other potential elements downstream in the AppendPipeline that
1013         perform segment clipping.
1014
1015         This patch fixes the following YTTV 2018 tests:
1016
1017         38. OpusAudioWithOverlap
1018         39. OpusAudioWithSmallGap
1019         40. OpusAudioWithLargeGap
1020         70. VP9VideoWithOverlap
1021         71. VP9VideoWithSmallGap
1022
1023         This patch is necessary, but not sufficient for fixing the following
1024         YTTV 2018 tests:
1025
1026         36. AppendOpusAudioOutOfOrder
1027         67. AppendVP9VideoOutOfOrder
1028
1029         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
1030         (WebCore::AppendPipeline::connectDemuxerSrcPadToAppsink):
1031         (WebCore::matroskademuxForceSegmentStartToEqualZero):
1032
1033 2018-05-19  Eric Carlson  <eric.carlson@apple.com>
1034
1035         Improve NowPlaying "title"
1036         https://bugs.webkit.org/show_bug.cgi?id=185680
1037         <rdar://problem/40296700>
1038
1039         Reviewed by Dean Jackson.
1040
1041         * html/HTMLMediaElement.cpp:
1042         (WebCore::HTMLMediaElement::mediaSessionTitle const): Use decodeHostName and 
1043         topPrivatelyControlledDomain when possible to make the host name more readable.
1044
1045         * platform/PublicSuffix.h:
1046         * platform/mac/PublicSuffixMac.mm:
1047         (WebCore::decodeHostName): Expose topPrivatelyControlledDomain method to .cpp functions.
1048
1049 2018-05-19  Commit Queue  <commit-queue@webkit.org>
1050
1051         Unreviewed, rolling out r231996.
1052         https://bugs.webkit.org/show_bug.cgi?id=185799
1053
1054          Broke the GTK build (Requested by eric_carlson on #webkit).
1055
1056         Reverted changeset:
1057
1058         "Improve NowPlaying "title""
1059         https://bugs.webkit.org/show_bug.cgi?id=185680
1060         https://trac.webkit.org/changeset/231996
1061
1062 2018-05-18  Eric Carlson  <eric.carlson@apple.com>
1063
1064         Improve NowPlaying "title"
1065         https://bugs.webkit.org/show_bug.cgi?id=185680
1066         <rdar://problem/40296700>
1067
1068         Reviewed by Dean Jackson.
1069
1070         * html/HTMLMediaElement.cpp:
1071         (WebCore::HTMLMediaElement::mediaSessionTitle const): Use decodeHostName and 
1072         topPrivatelyControlledDomain when possible to make the host name more readable.
1073
1074         * platform/PublicSuffix.h:
1075         * platform/mac/PublicSuffixMac.mm:
1076         (WebCore::decodeHostName): Expose topPrivatelyControlledDomain method to .cpp functions.
1077
1078 2018-05-18  Rob Buis  <rbuis@igalia.com>
1079
1080         Cannot unset transition with important
1081         https://bugs.webkit.org/show_bug.cgi?id=177684
1082
1083         Reviewed by Chris Dumez.
1084
1085         Make removeProperty remove the property regardless
1086         if it was set using !important [1].
1087
1088         The new behavior is consistent with Firefox, Chrome and Edge.
1089
1090         [1] https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-removeproperty
1091
1092         Test: web-platform-tests/cssom/cssom-setProperty-shorthand.html
1093
1094         * css/StyleProperties.cpp:
1095         (WebCore::MutableStyleProperties::removePropertiesInSet):
1096
1097 2018-05-18  Commit Queue  <commit-queue@webkit.org>
1098
1099         Unreviewed, rolling out r231982.
1100         https://bugs.webkit.org/show_bug.cgi?id=185793
1101
1102         Caused layout test failures (Requested by realdawei on
1103         #webkit).
1104
1105         Reverted changeset:
1106
1107         "Complete fix for enabling modern EME by default"
1108         https://bugs.webkit.org/show_bug.cgi?id=185770
1109         https://trac.webkit.org/changeset/231982
1110
1111 2018-05-18  Jer Noble  <jer.noble@apple.com>
1112
1113         Complete fix for enabling modern EME by default
1114         https://bugs.webkit.org/show_bug.cgi?id=185770
1115         <rdar://problem/40368220>
1116
1117         Reviewed by Eric Carlson.
1118
1119         * Configurations/FeatureDefines.xcconfig:
1120
1121 2018-05-18  Brent Fulgham  <bfulgham@apple.com>
1122
1123         Convert ProcessPrivilege assertions to regular debug-only assertions
1124         https://bugs.webkit.org/show_bug.cgi?id=185775
1125         <rdar://problem/40372286>
1126
1127         Reviewed by Geoffrey Garen.
1128
1129         In Bug 184322 I added a number of RELEASE_ASSERT checks that certain
1130         UI-only calls were not being made in the WebContent process.
1131
1132         Measurements have shown that these RELEASE_ASSERTs have regressed performance
1133         by around 1% on some benchmarks, so we should convert them to normal asserts.
1134
1135         This patch changes the RELEASE_ASSERTs into ASSERTs.
1136
1137         * platform/mac/PasteboardMac.mm:
1138         (WebCore::Pasteboard::setDragImage):
1139         * platform/mac/PlatformScreenMac.mm:
1140         (WebCore::displayID):
1141         (WebCore::firstScreen):
1142         (WebCore::window):
1143         (WebCore::screen):
1144         (WebCore::getScreenProperties):
1145         (WebCore::screenIsMonochrome):
1146
1147 2018-05-18  Eric Carlson  <eric.carlson@apple.com>
1148
1149         Handle failure to extend sandbox gracefully
1150         https://bugs.webkit.org/show_bug.cgi?id=185779
1151         <rdar://problem/40316349>
1152
1153         Reviewed by Brent Fulgham.
1154
1155         Test: TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm
1156
1157         * Modules/mediastream/UserMediaRequest.cpp:
1158         (WebCore::UserMediaRequest::deny): Include the error string in the promise rejection.
1159         * Modules/mediastream/UserMediaRequest.h:
1160
1161 2018-05-18  Antoine Quint  <graouts@apple.com>
1162
1163         [Web Animations] Turn Web Animations with CSS integration on for test runners
1164         https://bugs.webkit.org/show_bug.cgi?id=184819
1165         <rdar://problem/39597337>
1166
1167         Unreviewed. Rolling out the patch for this bug, it caused some flaky timeouts for animation suspension tests.
1168
1169         Tests: animations/animation-internals-api-multiple-keyframes.html
1170                animations/animation-internals-api.html
1171                transitions/transition-drt-api-delay.html
1172                transitions/transition-drt-api.html
1173
1174         * dom/Element.cpp:
1175         (WebCore::Element::removedFromAncestor):
1176         * dom/PseudoElement.cpp:
1177         (WebCore::PseudoElement::clearHostElement):
1178         * page/FrameView.cpp:
1179         (WebCore::FrameView::didDestroyRenderTree):
1180         * page/RuntimeEnabledFeatures.h:
1181         * rendering/updating/RenderTreeUpdater.cpp:
1182         (WebCore::RenderTreeUpdater::tearDownRenderers):
1183
1184 2018-05-18  Basuke Suzuki  <Basuke.Suzuki@sony.com>
1185
1186         [Curl] Bug fix on suspend/resume behavior.
1187         https://bugs.webkit.org/show_bug.cgi?id=183089
1188
1189         The flag was not set correctly. Also wrong method was called.
1190
1191         Reviewed by Youenn Fablet.
1192
1193         Enable loader tests to cover this case.
1194
1195         * platform/network/curl/CurlRequest.cpp:
1196         (WebCore::CurlRequest::cancel): Remove unnecessary cleanup. Use runXXX method.
1197         (WebCore::CurlRequest::suspend): Added cancel check.
1198         (WebCore::CurlRequest::resume): Ditto.
1199         (WebCore::CurlRequest::callClient): Use runXXX method. Change to move semantics.
1200         (WebCore::runOnMainThread): Added.
1201         (WebCore::CurlRequest::runOnWorkerThreadIfRequired): Added.
1202         (WebCore::CurlRequest::setupTransfer): Bug fix. Call setRequestPaused directly.
1203         (WebCore::CurlRequest::didReceiveData): Add state flag update.
1204         (WebCore::CurlRequest::invokeDidReceiveResponseForFile): Use runXXX to simplify.
1205         (WebCore::CurlRequest::completeDidReceiveResponse): Ditto.
1206         (WebCore::CurlRequest::setRequestPaused): Protect state change by mutex.
1207         (WebCore::CurlRequest::setCallbackPaused): Ditto.
1208         (WebCore::CurlRequest::invokeCancel): Added.
1209         (WebCore::CurlRequest::pausedStatusChanged): Use runXXX to simplify.
1210         (WebCore::CurlRequest::updateHandlePauseState): Accessor for m_isHandlePaused.
1211         (WebCore::CurlRequest::isHandlePaused const): Ditto.
1212         * platform/network/curl/CurlRequest.h: Add mutex and paused state.
1213         (WebCore::CurlRequest::shouldBePaused const): Rename from isPaused.
1214         (WebCore::CurlRequest::isPaused const): Deleted.
1215
1216 2018-05-18  Chris Dumez  <cdumez@apple.com>
1217
1218         Avoid keeping the frame alive when ref'ing a WindowProxy
1219         https://bugs.webkit.org/show_bug.cgi?id=185737
1220         <rdar://problem/40004666>
1221
1222         Reviewed by Sam Weinig.
1223
1224         Avoid keeping the frame alive when ref'ing a WindowProxy by making WindowProxy
1225         manage its own refcount (instead of proxying refcounting to the Frame). As a
1226         result, a WindowProxy can now be detached from its Frame. When detached, it
1227         return null when asked for a JSWindowProxy.
1228
1229         It is important to not extend the lifetime of the Frame because we want script
1230         to stop running when the Page gets destroyed.
1231
1232         * bindings/js/JSWindowProxy.cpp:
1233         (WebCore::toJS):
1234         (WebCore::toJSWindowProxy):
1235         * bindings/js/JSWindowProxy.h:
1236         (WebCore::toJSWindowProxy):
1237         * bindings/js/ScriptController.cpp:
1238         (WebCore::ScriptController::evaluateInWorld):
1239         (WebCore::ScriptController::loadModuleScriptInWorld):
1240         (WebCore::ScriptController::linkAndEvaluateModuleScriptInWorld):
1241         (WebCore::ScriptController::evaluateModule):
1242         (WebCore::ScriptController::setupModuleScriptHandlers):
1243         (WebCore::ScriptController::jsWindowProxy):
1244         (WebCore::ScriptController::windowScriptNPObject):
1245         (WebCore::ScriptController::executeIfJavaScriptURL):
1246         * bindings/js/ScriptController.h:
1247         (WebCore::ScriptController::globalObject):
1248         * bindings/js/ScriptControllerMac.mm:
1249         (WebCore::ScriptController::windowScriptObject):
1250         * bindings/js/ScriptState.cpp:
1251         (WebCore::mainWorldExecState):
1252         * bindings/js/WindowProxy.cpp:
1253         (WebCore::WindowProxy::WindowProxy):
1254         (WebCore::WindowProxy::~WindowProxy):
1255         (WebCore::WindowProxy::detachFromFrame):
1256         (WebCore::WindowProxy::createJSWindowProxy):
1257         (WebCore::WindowProxy::globalObject):
1258         (WebCore::WindowProxy::createJSWindowProxyWithInitializedScript):
1259         (WebCore::WindowProxy::setDOMWindow):
1260         (WebCore::WindowProxy::window const):
1261         (WebCore::WindowProxy::ref): Deleted.
1262         (WebCore::WindowProxy::deref): Deleted.
1263         * bindings/js/WindowProxy.h:
1264         (WebCore::WindowProxy::create):
1265         (WebCore::WindowProxy::frame const):
1266         (WebCore::WindowProxy::jsWindowProxy):
1267         * dom/DocumentTouch.cpp:
1268         (WebCore::DocumentTouch::createTouch):
1269         * page/AbstractFrame.cpp:
1270         (WebCore::AbstractFrame::AbstractFrame):
1271         (WebCore::AbstractFrame::~AbstractFrame):
1272         * page/AbstractFrame.h:
1273
1274 2018-05-18  Myles C. Maxfield  <mmaxfield@apple.com>
1275
1276         [iOS] Password fields obscure the text with rectangles instead of circles
1277         https://bugs.webkit.org/show_bug.cgi?id=185760
1278         <rdar://problem/38644697>
1279
1280         Reviewed by Zalan Bujtas.
1281
1282         Password fields are obscured by drawing U+25CF BLACK CIRCLE. On iOS, we have custom handling
1283         for this character. However, this custom handling is unnecessary and isn't present on macOS.
1284         Instead, we should simply unify the password obscuring codepath between iOS and macOS.
1285
1286         Test: fast/text/black-circle.html
1287
1288         * platform/graphics/ios/FontCacheIOS.mm:
1289         (WebCore::requiresCustomFallbackFont):
1290         (WebCore::FontCache::getCustomFallbackFont):
1291
1292 2018-05-18  Chris Dumez  <cdumez@apple.com>
1293
1294         Unreviewed, rolling out r231935.
1295
1296         Caused an accessibility test to fail
1297
1298         Reverted changeset:
1299
1300         "RenderLayer::scrollRectToVisible() should not propagate a
1301         subframe's scroll to its cross-origin parent"
1302         https://bugs.webkit.org/show_bug.cgi?id=185664
1303         https://trac.webkit.org/changeset/231935
1304
1305 2018-05-18  Zalan Bujtas  <zalan@apple.com>
1306
1307         [LFC] Implement height computation for non-replaced floating elements.
1308         https://bugs.webkit.org/show_bug.cgi?id=185767
1309
1310         Reviewed by Antti Koivisto.
1311
1312         * layout/FormattingContext.cpp:
1313         (WebCore::Layout::FormattingContext::computeFloatingHeight const):
1314         (WebCore::Layout::FormattingContext::computeFloatingNonReplacedHeight const):
1315         (WebCore::Layout::FormattingContext::contentHeightForFormattingContextRoot const):
1316         * layout/FormattingContext.h:
1317
1318 2018-05-18  Dirk Schulze  <krit@webkit.org>
1319
1320         Make all SVG shape interfaces inherit from SVGGeometryElement
1321         https://bugs.webkit.org/show_bug.cgi?id=185600
1322
1323         Reviewed by Antti Koivisto.
1324
1325         Make all SVG shape interfaces inherit from SVGGeometryElement
1326         as defined by SVG2:
1327
1328         https://svgwg.org/svg2-draft/shapes.html#DOMInterfaces
1329
1330         Tests: svg/dom/SVGGeometry-circle.xhtml
1331                svg/dom/SVGGeometry-ellipse.xhtml
1332                svg/dom/SVGGeometry-line.xhtml
1333                svg/dom/SVGGeometry-polygon.xhtml
1334                svg/dom/SVGGeometry-polyline.xhtml
1335                svg/dom/SVGGeometry-rect.xhtml
1336
1337         * rendering/svg/RenderSVGShape.cpp:
1338         (WebCore::RenderSVGShape::getTotalLength const): Added shape
1339                 independent implementation for all methods defined
1340                 by SVGGeometryElement interface. Calculations are
1341                 based on the Path object created and referenced by
1342                 RenderSVGShape.
1343         (WebCore::RenderSVGShape::getPointAtLength const):
1344         * rendering/svg/RenderSVGShape.h:
1345         * svg/SVGCircleElement.cpp:
1346                 Repeating pattern: Change inheritance from
1347                 SVGGraphicsElement to SVGGeometryElement.
1348         (WebCore::SVGCircleElement::SVGCircleElement):
1349         * svg/SVGCircleElement.h:
1350         * svg/SVGCircleElement.idl:
1351         * svg/SVGEllipseElement.cpp:
1352         (WebCore::SVGEllipseElement::SVGEllipseElement):
1353         * svg/SVGEllipseElement.h:
1354         * svg/SVGEllipseElement.idl:
1355         * svg/SVGGeometryElement.cpp:
1356         (WebCore::SVGGeometryElement::getTotalLength const):
1357         (WebCore::SVGGeometryElement::getPointAtLength const):
1358         * svg/SVGGeometryElement.h:
1359         * svg/SVGLineElement.cpp:
1360         (WebCore::SVGLineElement::SVGLineElement):
1361         * svg/SVGLineElement.h:
1362         * svg/SVGLineElement.idl:
1363         * svg/SVGPolyElement.cpp:
1364         (WebCore::SVGPolyElement::SVGPolyElement):
1365         * svg/SVGPolyElement.h:
1366         * svg/SVGPolygonElement.idl:
1367         * svg/SVGPolylineElement.idl:
1368         * svg/SVGRectElement.cpp:
1369         (WebCore::SVGRectElement::SVGRectElement):
1370         * svg/SVGRectElement.h:
1371         * svg/SVGRectElement.idl:
1372
1373 2018-05-18  Zalan Bujtas  <zalan@apple.com>
1374
1375         [LFC] Implement height computation for replaced elements.
1376         https://bugs.webkit.org/show_bug.cgi?id=185756
1377
1378         Reviewed by Antti Koivisto.
1379
1380         * layout/FormattingContext.cpp:
1381         (WebCore::Layout::FormattingContext::computeHeight const):
1382         (WebCore::Layout::FormattingContext::computeOutOfFlowWidth const):
1383         (WebCore::Layout::FormattingContext::computeOutOfFlowHeight const):
1384         (WebCore::Layout::FormattingContext::computeFloatingHeight const):
1385         (WebCore::Layout::FormattingContext::computeReplacedHeight const):
1386         (WebCore::Layout::FormattingContext::computeReplacedWidth const):
1387         (WebCore::Layout::FormattingContext::computeOutOfFlowReplacedHeight const):
1388         * layout/FormattingContext.h:
1389
1390 2018-05-18  Zalan Bujtas  <zalan@apple.com>
1391
1392         [LFC] Implement width computation for non-replaced floating elements.
1393         https://bugs.webkit.org/show_bug.cgi?id=185759
1394
1395         Reviewed by Antti Koivisto.
1396
1397         * layout/FormattingContext.cpp:
1398         (WebCore::Layout::FormattingContext::computeFloatingWidth const):
1399         (WebCore::Layout::FormattingContext::computeFloatingNonReplacedWidth const):
1400         * layout/FormattingContext.h:
1401
1402 2018-05-18  Antoine Quint  <graouts@apple.com>
1403
1404         [modern-media-controls] AirPlaySupport should be disabled by default
1405         https://bugs.webkit.org/show_bug.cgi?id=185658
1406         <rdar://problem/40272213>
1407
1408         Reviewed by Simon Fraser.
1409
1410         We now only enable AirplaySupport if the controls are visible to the user _and_ media has played.
1411
1412         Test: media/modern-media-controls/airplay-support/airplay-support-disable-event-listeners-until-play.html
1413
1414         * Modules/modern-media-controls/media/airplay-support.js:
1415         (AirplaySupport.prototype.enable):
1416         (AirplaySupport.prototype.controlsUserVisibilityDidChange):
1417         (AirplaySupport.prototype._shouldBeEnabled):
1418         (AirplaySupport):
1419
1420 2018-05-18  Tim Horton  <timothy_horton@apple.com>
1421
1422         Stop softlinking QuickLook when loading from client-registered schemes
1423         https://bugs.webkit.org/show_bug.cgi?id=185716
1424         <rdar://problem/40303227>
1425
1426         Reviewed by Dan Bernstein.
1427
1428         No new tests, just a performance improvement.
1429
1430         * dom/Document.cpp:
1431         * platform/SchemeRegistry.cpp:
1432         * platform/ios/QuickLook.h:
1433         * platform/ios/QuickLook.mm:
1434         (WebCore::isQuickLookPreviewURL):
1435         (WebCore::QLPreviewProtocol): Deleted.
1436         Hard-code the QuickLook preview URL scheme, instead of loading the QuickLook
1437         framework to retrieve it. It will never change, and just in case it does,
1438         add an ASSERT (which does load QuickLook) so that we'll find out.
1439
1440 2018-05-18  Antoine Quint  <graouts@apple.com>
1441
1442         [Web Animations] Turn Web Animations with CSS integration on for test runners
1443         https://bugs.webkit.org/show_bug.cgi?id=184819
1444         <rdar://problem/39597337>
1445
1446         Reviewed by Jon Lee.
1447
1448         We ensure we always call into both CSSAnimationController::cancelAnimations() and
1449         AnimationTimeline::cancelDeclarativeAnimationsForElement() since we want teardown of animations
1450         to be performed no matter which animation code path is used. What that in mind, we don't
1451         conditionalize the CSSAnimationController-related ASSERT() in FrameView::didDestroyRenderTree().
1452
1453         * dom/Element.cpp:
1454         (WebCore::Element::removedFromAncestor):
1455         * dom/PseudoElement.cpp:
1456         (WebCore::PseudoElement::clearHostElement):
1457         * page/FrameView.cpp:
1458         (WebCore::FrameView::didDestroyRenderTree):
1459         * page/RuntimeEnabledFeatures.h:
1460         * rendering/updating/RenderTreeUpdater.cpp:
1461         (WebCore::RenderTreeUpdater::tearDownRenderers):
1462
1463 2018-05-17  David Kilzer  <ddkilzer@apple.com>
1464
1465         Lazily create WebCore::Timer for WebCore::Image
1466         <https://webkit.org/b/185752>
1467
1468         Reviewed by Simon Fraser.
1469
1470         Not every image is an animated image, so lazily creating
1471         m_animationStartTimer saves 64 bytes per instance of
1472         WebCore::Image.
1473
1474         * platform/graphics/Image.cpp:
1475         (WebCore::Image::Image): Remove default initializer for
1476         m_animationStartTimer.
1477         (WebCore::Image::startAnimationAsynchronously): Initialize
1478         m_animationStartTimer if it's not already created.
1479         * platform/graphics/Image.h:
1480         (WebCore::Image::animationPending const): Update to check if
1481         m_animationStartTimer has been set before dereferencing it.
1482         (WebCore::Image::m_animationStartTimer): Change type to
1483         std::unique_ptr<Timer>.
1484
1485 2018-05-17  Nan Wang  <n_wang@apple.com>
1486
1487         AX: [macOS] Expose the primary screen height through AX API
1488         https://bugs.webkit.org/show_bug.cgi?id=185742
1489
1490         Reviewed by Chris Fleizach.
1491
1492         Added a new attribute to expose the primary screen size on both
1493         WebAccessibilityObjectWrapper and WKAccessibilityWebPageObject.
1494
1495         Test: accessibility/mac/primary-screen-height.html
1496
1497         * WebCore.xcodeproj/project.pbxproj:
1498         * accessibility/mac/WebAccessibilityObjectWrapperMac.h:
1499         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1500         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
1501         (-[WebAccessibilityObjectWrapper primaryScreenHeight]):
1502         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1503         * platform/PlatformScreen.h:
1504         * platform/mac/PlatformScreenMac.mm:
1505         (WebCore::screenRectForPrimaryScreen):
1506
1507 2018-05-17  Chris Dumez  <cdumez@apple.com>
1508
1509         RenderLayer::scrollRectToVisible() should not propagate a subframe's scroll to its cross-origin parent
1510         https://bugs.webkit.org/show_bug.cgi?id=185664
1511         <rdar://problem/36185260>
1512
1513         Reviewed by Simon Fraser.
1514
1515         RenderLayer::scrollRectToVisible() should not propagate a subframe's scroll to its
1516         cross-origin parent. There was logic in FrameLoader::scrollToFragmentWithParentBoundary()
1517         to temporarily set the 'safeToPropagateScrollToParent' flag to false on the cross-origin
1518         ancestor frame during the call to FrameView::scrollToFragment(). This would correctly
1519         prevent RenderLayer::scrollRectToVisible() to propagate the scroll to the cross-origin
1520         ancestor frame when scrollRectToVisible() is called synchronously. However,
1521         scrollRectToVisible() can get called asynchronously in case of a dirty layout, as part
1522         of the post layout tasks.
1523
1524         To address the issue, we get rid of the safeToPropagateScrollToParent flag on FrameView
1525         and instead update FrameView::safeToPropagateScrollToParent() to do the cross-origin
1526         check. FrameView::safeToPropagateScrollToParent() is called by RenderLayer::scrollRectToVisible()
1527         and this is a lot more robust than relying on a flag which gets temporarily set.
1528
1529         Test: http/tests/navigation/fragment-navigation-cross-origin-subframe-no-scrolling-parent.html
1530
1531         * dom/Document.cpp:
1532         * dom/Document.h:
1533         * loader/FrameLoader.cpp:
1534         (WebCore::FrameLoader::scrollToFragmentWithParentBoundary):
1535         * page/FrameView.cpp:
1536         (WebCore::FrameView::FrameView):
1537         (WebCore::FrameView::reset):
1538         (WebCore::FrameView::safeToPropagateScrollToParent const):
1539         * page/FrameView.h:
1540
1541 2018-05-17  Don Olmstead  <don.olmstead@sony.com>
1542
1543         [Curl] Enable HTTP/2 Multiplexing
1544         https://bugs.webkit.org/show_bug.cgi?id=185746
1545
1546         Reviewed by Youenn Fablet.
1547
1548         Covered by existing tests.
1549
1550         * platform/network/curl/CurlContext.cpp:
1551         (WebCore::CurlMultiHandle::CurlMultiHandle):
1552
1553 2018-05-17  Jeremy Jones  <jeremyj@apple.com>
1554
1555         Remove unnecessary exit fullscreen call on application resume
1556         https://bugs.webkit.org/show_bug.cgi?id=185747
1557         rdar://problem/40345725
1558
1559         Reviewed by Jer Noble.
1560
1561         No new tests because no behavior change.
1562
1563         Auto-PiP doesn't automatically return to fullscreen on app resume,
1564         so we don't need to keep this vestigial code for handling a corner case of that feature.
1565         Also, this can cause an unnecessary exit fullscreen that could cause debug asserts.
1566
1567         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
1568         (VideoFullscreenInterfaceAVKit::applicationDidBecomeActive):
1569
1570 2018-05-17  Jeremy Jones  <jeremyj@apple.com>
1571
1572         Fullscreen to PiP results in exit fullscreen call failure
1573         https://bugs.webkit.org/show_bug.cgi?id=185699
1574         rdar://problem/40310291
1575
1576         Reviewed by Eric Carlson.
1577
1578         No new tests because no behavior change.
1579
1580         Prevent multiple exit fullscreen calls when transitioning from fullscreen to picture-in-picture.
1581
1582         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
1583         (-[WebAVPlayerViewControllerDelegate playerViewControllerShouldAutomaticallyDismissAtPictureInPictureStart:]):
1584         Implement this to prevent AVKit from automatically initiating exit fullscreen on pip.
1585         
1586         (VideoFullscreenInterfaceAVKit::didStartPictureInPicture):
1587         Set the return to fullscreen flag here, since this is where exit fullscreen happens.
1588
1589         (VideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason):
1590         Don't exit fullscreen here since it is already initiated in didStartPictureInPicture.
1591
1592 2018-05-17  Ryan Haddad  <ryanhaddad@apple.com>
1593
1594         Unreviewed, rolling out r231899.
1595
1596         Caused flakiness in two existing modern-media-controls tests.
1597
1598         Reverted changeset:
1599
1600         "[modern-media-controls] AirPlaySupport should be disabled by
1601         default"
1602         https://bugs.webkit.org/show_bug.cgi?id=185658
1603         https://trac.webkit.org/changeset/231899
1604
1605 2018-05-17  Eric Carlson  <eric.carlson@apple.com>
1606
1607         [iOS] Update AirPlay route monitoring
1608         https://bugs.webkit.org/show_bug.cgi?id=185706
1609         <rdar://problem/40230677>
1610
1611         Unreviewed, fix extra zoom mode build after r231913.
1612
1613         * platform/audio/ios/MediaSessionManagerIOS.mm:
1614         (-[WebMediaSessionHelper dealloc]):
1615         (-[WebMediaSessionHelper hasWirelessTargetsAvailable]):
1616
1617 2018-05-17  Jer Noble  <jer.noble@apple.com>
1618
1619         CRASH in ImageDecoderAVFObjC::sampleAtIndex()
1620         https://bugs.webkit.org/show_bug.cgi?id=185734
1621         <rdar://problem/40295094>
1622
1623         Reviewed by Eric Carlson.
1624
1625         Test: fast/images/animated-image-mp4-crash.html
1626
1627         Test the correct size value before iterating over the SampleMap in presentationOrder()
1628
1629         * Modules/mediasource/SampleMap.h:
1630         (WebCore::PresentationOrderSampleMap::size const):
1631         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
1632         (WebCore::ImageDecoderAVFObjC::sampleAtIndex const):
1633
1634 2018-05-17  Wenson Hsieh  <wenson_hsieh@apple.com>
1635
1636         [Extra zoom mode] Disabled adaptations are not reset upon mainframe navigation
1637         https://bugs.webkit.org/show_bug.cgi?id=185735
1638         <rdar://problem/40335311>
1639
1640         Reviewed by Tim Horton.
1641
1642         When performing mainframe navigation, we currently don't update the Page's ViewportConfiguration's disabled
1643         adaptations. This causes disabled adaptations from the previous main document to persist. To fix this, propagate
1644         the new document's disabled adaptations to the client when it becomes the main document in the page.
1645
1646         Test: fast/viewport/extrazoom/viewport-adaptations-after-navigation.html
1647
1648         * dom/Document.cpp:
1649         (WebCore::Document::didBecomeCurrentDocumentInFrame):
1650         (WebCore::Document::processDisabledAdaptations):
1651         (WebCore::Document::dispatchDisabledAdaptationsDidChangeForMainFrame):
1652         * dom/Document.h:
1653
1654 2018-05-17  Eric Carlson  <eric.carlson@apple.com>
1655
1656         [iOS] Update AirPlay route monitoring
1657         https://bugs.webkit.org/show_bug.cgi?id=185706
1658         <rdar://problem/40230677>
1659
1660         Reviewed by Jer Noble.
1661
1662         Use an AVRouteDetector instead of an MPVolumeView and an MPAVRoutingController for AirPlay
1663         route detection and availability monitoring.
1664
1665         No new tests, tested manually.
1666
1667         * html/MediaElementSession.cpp:
1668         (WebCore::MediaElementSession::hasWirelessPlaybackTargets): No need to update m_hasPlaybackTargets
1669         manually, it is always updated by the session manager when route availability changes.
1670
1671         * platform/audio/ios/MediaSessionManagerIOS.mm:
1672         (-[WebMediaSessionHelper dealloc]): Pull the logic from safelyTearDown inline.
1673         (-[WebMediaSessionHelper hasWirelessTargetsAvailable]): Use the AVRouteDetector.
1674         (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]): Ditto.  Simplify logic, there is no
1675         need to dispatch twice.
1676         (-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]): Don't release the route detector
1677         completely, just disable route detection, because AVRouteDetector is a lightweight object so
1678         it is not worth the overhead of dealloc/realloc to disable/enable route detection.
1679         (-[WebMediaSessionHelper interruption:]): Use callOnWebThreadOrDispatchAsyncOnMainThread
1680         instead of WebThreadRun so it works correctly in WK2 as well as in WK1.
1681         (-[WebMediaSessionHelper applicationWillEnterForeground:]): Ditto.
1682         (-[WebMediaSessionHelper applicationDidBecomeActive:]): Ditto.
1683         (-[WebMediaSessionHelper applicationWillResignActive:]): Ditto.
1684         (-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]): Ditto.
1685         (-[WebMediaSessionHelper applicationDidEnterBackground:]): Ditto.
1686         (safelyTearDown): Deleted.
1687
1688 2018-05-17  Chris Dumez  <cdumez@apple.com>
1689
1690         Cross-Origin-Options: deny/allow-postmessage should prevent getting navigated by cross-origin scripts
1691         https://bugs.webkit.org/show_bug.cgi?id=185681
1692         <rdar://problem/40296313>
1693
1694         Reviewed by Geoffrey Garen.
1695
1696         Update our canNavigate() implementation [1] to take into account the Cross-Origin-Options header.
1697         If the window being navigated or the window trigerring the navigation have a Cross-Origin-Options
1698         header value different than 'allow', then the attempt to navigate will be blocked.
1699
1700         Note that it was already not possible to navigate via setting window.location since trying to set
1701         it would throw a SecurityError with 'Cross-Origin-Options: deny/allow-postmessage'. However, it was
1702         possible to trigger a "targeted" navigation via <a target="foo"> or open(url, "foo").
1703
1704         [1] https://html.spec.whatwg.org/#allowed-to-navigate
1705
1706         Tests: http/wpt/cross-origin-options/navigation-from-opener-via-open-target.html
1707                http/wpt/cross-origin-options/navigation-from-subframe-via-anchor-target.html
1708
1709         * dom/Document.cpp:
1710         (WebCore::Document::canNavigate):
1711
1712 2018-05-17  Brent Fulgham  <bfulgham@apple.com>
1713
1714         Storage Access API: Allow documents that have been granted storage access to also do a popup
1715         https://bugs.webkit.org/show_bug.cgi?id=185615
1716         <rdar://problem/39105791>
1717
1718         Reviewed by Chris Dumez.
1719
1720         * dom/Document.cpp:
1721         (WebCore::Document::consumeTemporaryUserGesture): Added. Clear the document's active one-time user
1722         activity (for window opening) state.
1723         (WebCore::Document::enableTemporaryUserGesture): Added. Establish a new active one-time user
1724         activity (for window opening) state.
1725         (WebCore::Document::requestStorageAccess): If the user approves Storage Access, establish a new
1726         UserInteraction scope, then resolve the promise. Also post a task to clear the one-time user
1727         gesture state.
1728
1729 2018-05-17  Zalan Bujtas  <zalan@apple.com>
1730
1731         [LFC] Introduce DisplayBox::Style
1732         https://bugs.webkit.org/show_bug.cgi?id=185733
1733
1734         Reviewed by Antti Koivisto.
1735
1736         This is the collection of computed style data needed to paint/hittest the display boxtree.
1737
1738         * layout/LayoutContext.cpp:
1739         (WebCore::Layout::LayoutContext::createDisplayBox):
1740         * layout/displaytree/DisplayBox.cpp:
1741         (WebCore::Display::Box::Box):
1742         (WebCore::Display::Box::Style::Style):
1743         (WebCore::Display::Box::borderBox const):
1744         (WebCore::Display::Box::contentBox const):
1745         * layout/displaytree/DisplayBox.h:
1746
1747 2018-05-17  Antoine Quint  <graouts@apple.com>
1748
1749         [modern-media-controls] AirPlaySupport should be disabled by default
1750         https://bugs.webkit.org/show_bug.cgi?id=185658
1751         <rdar://problem/40272213>
1752
1753         Reviewed by Simon Fraser.
1754
1755         We now only enable AirplaySupport if the controls are visible to the user _and_ media has played.
1756
1757         Test: media/modern-media-controls/airplay-support/airplay-support-disable-event-listeners-until-play.html
1758
1759         * Modules/modern-media-controls/media/airplay-support.js:
1760         (AirplaySupport.prototype.enable):
1761         (AirplaySupport.prototype.controlsUserVisibilityDidChange):
1762         (AirplaySupport.prototype._shouldBeEnabled):
1763         (AirplaySupport):
1764
1765 2018-05-17  Zalan Bujtas  <zalan@apple.com>
1766
1767         [LFC] Replace ASSERT_NOT_REACHED with ASSERT_NOT_IMPLEMENTED_YET where applicable.
1768         https://bugs.webkit.org/show_bug.cgi?id=185728
1769
1770         Reviewed by Antti Koivisto.
1771
1772         * layout/FormattingContext.cpp:
1773         (WebCore::Layout::FormattingContext::computeOutOfFlowWidth const): leftover from previous patch.
1774         (WebCore::Layout::FormattingContext::computeFloatingWidth const):
1775         (WebCore::Layout::FormattingContext::computeOutOfFlowHeight const):
1776         (WebCore::Layout::FormattingContext::computeOutOfFlowNonReplacedHeight const):
1777         (WebCore::Layout::FormattingContext::computeReplacedWidth const):
1778         (WebCore::Layout::FormattingContext::computeOutOfFlowNonReplacedWidth const):
1779         (WebCore::Layout::FormattingContext::computeOutOfFlowReplacedWidth const):
1780         * layout/LayoutContext.cpp:
1781         (WebCore::Layout::LayoutContext::styleChanged):
1782         (WebCore::Layout::LayoutContext::formattingContext):
1783         * layout/blockformatting/BlockFormattingContext.cpp:
1784         (WebCore::Layout::BlockFormattingContext::computeInFlowNonReplacedWidth const):
1785         (WebCore::Layout::BlockFormattingContext::computeInFlowHeight const):
1786         (WebCore::Layout::BlockFormattingContext::computeInFlowNonReplacedHeight const):
1787         * layout/layouttree/LayoutTreeBuilder.cpp:
1788         (WebCore::Layout::TreeBuilder::createSubTree):
1789
1790 2018-05-17  Zalan Bujtas  <zalan@apple.com>
1791
1792         [LFC] Move replaced logic from Layout::Box to Layout::Replaced class
1793         https://bugs.webkit.org/show_bug.cgi?id=185711
1794
1795         Reviewed by Antti Koivisto.
1796
1797         * Sources.txt:
1798         * WebCore.xcodeproj/project.pbxproj:
1799         * layout/FormattingContext.cpp:
1800         (WebCore::Layout::FormattingContext::computeOutOfFlowWidth const):
1801         (WebCore::Layout::FormattingContext::computeFloatingWidth const):
1802         (WebCore::Layout::FormattingContext::computeOutOfFlowHeight const):
1803         (WebCore::Layout::FormattingContext::computeInFlowReplacedWidth const):
1804         * layout/blockformatting/BlockFormattingContext.cpp:
1805         (WebCore::Layout::BlockFormattingContext::computeInFlowWidth const):
1806         (WebCore::Layout::BlockFormattingContext::computeInFlowHeight const):
1807         * layout/layouttree/LayoutBox.cpp:
1808         (WebCore::Layout::Box::isReplaced const): Deleted.
1809         (WebCore::Layout::Box::hasIntrinsicWidth const): Deleted.
1810         (WebCore::Layout::Box::hasIntrinsicHeight const): Deleted.
1811         (WebCore::Layout::Box::hasIntrinsicRatio const): Deleted.
1812         (WebCore::Layout::Box::intrinsicWidth const): Deleted.
1813         (WebCore::Layout::Box::intrinsicHeight const): Deleted.
1814         (WebCore::Layout::Box::intrinsicRatio const): Deleted.
1815         * layout/layouttree/LayoutBox.h:
1816         (WebCore::Layout::Box::replaced const):
1817
1818 2018-05-17  Zalan Bujtas  <zalan@apple.com>
1819
1820         [LFC] Implement width computation for replaced out if flow elements.
1821         https://bugs.webkit.org/show_bug.cgi?id=185701
1822
1823         Reviewed by Antti Koivisto.
1824         
1825         The used value of 'width' is determined as for inline replaced elements.
1826
1827         * layout/FormattingContext.cpp:
1828         (WebCore::Layout::FormattingContext::computeOutOfFlowNonReplacedHeight const):
1829         (WebCore::Layout::FormattingContext::computeOutOfFlowNonReplacedWidth const):
1830         (WebCore::Layout::FormattingContext::computeOutOfFlowReplacedWidth const):
1831         * layout/FormattingContext.h:
1832
1833 2018-05-17  Thibault Saunier  <tsaunier@igalia.com>
1834
1835         [GStreamer]: Consider GstStream(Collection) as if if was not a GInitiallyUnowned
1836         https://bugs.webkit.org/show_bug.cgi?id=185657
1837
1838         Reviewed by Philippe Normand.
1839
1840         Starting with GStreamer 1.14[1] the reference is sunk at object creation time, making it a normal
1841         GObject in practice, in our GRefPtr template implementation we should just consider GstStream
1842         as if it was a normal GObject and not care about its floating reference state as
1843         the ref is never sunk by anyone before 1.14 though that floating ref is considered
1844         as a hard reference by the GstStreamCollection (leading to assertions/)
1845
1846         The exact same issue happens with GstStreamCollection, so fix it at the same time.
1847
1848         Also do not adoptRef() on the result of gst_stream_collection_get_stream() as this function
1849         is transfer-none.
1850
1851         [1] commit f119e93b47efb06ffc68c01d3e094d5346c30041 `gst: Clear floating flag in constructor of all GstObject subclasses that are not owned by any parent`
1852
1853         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
1854         (WTF::adoptGRef):
1855         (WTF::refGPtr<GstStream>):
1856         (WTF::refGPtr<GstStreamCollection>):
1857         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1858         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
1859
1860 2018-05-16  Devin Rousso  <webkit@devinrousso.com>
1861
1862         Web Inspector: create a navigation item for toggling the overlay rulers/guides
1863         https://bugs.webkit.org/show_bug.cgi?id=185644
1864
1865         Reviewed by Matt Baker.
1866
1867         This patch is purely a visual change for WebInspector, and doesn't affect anything else.
1868
1869         * inspector/agents/InspectorPageAgent.h:
1870         * inspector/agents/InspectorPageAgent.cpp:
1871         (WebCore::InspectorPageAgent::setShowRulers): Added.
1872
1873         * inspector/InspectorOverlay.h:
1874         * inspector/InspectorOverlay.cpp:
1875         (WebCore::InspectorOverlay::shouldShowOverlay):
1876         (WebCore::InspectorOverlay::update):
1877         (WebCore::InspectorOverlay::setShowRulers): Added.
1878         (WebCore::InspectorOverlay::drawRulers): Added.
1879         (WebCore::InspectorOverlay::reset):
1880
1881         * inspector/InspectorOverlayPage.js:
1882         (drawNodeHighlight):
1883         (drawQuadHighlight):
1884         (drawRulers): Added.
1885         (_drawBounds): Added.
1886         (reset):
1887         (_drawRulers): Deleted.
1888
1889 2018-05-16  Michael Catanzaro  <mcatanzaro@igalia.com>
1890
1891         [GTK] SoupNetworkSession.h:68:62: error: unknown type name 'URL'
1892         https://bugs.webkit.org/show_bug.cgi?id=185378
1893
1894         Unreviewed, just replace unneeded #include with a forward declaration
1895
1896         * platform/network/soup/SoupNetworkSession.h:
1897
1898 2018-05-16  Jer Noble  <jer.noble@apple.com>
1899
1900         CRASH: Exception thrown from -[AVContentKeySession processContentKeyRequestWithIdentifier:initializationData:options:] after -expire called
1901         https://bugs.webkit.org/show_bug.cgi?id=185690
1902         <rdar://problem/38297768>
1903
1904         Reviewed by Eric Carlson.
1905
1906         Reject all calls to update() after close() has been called on the session.
1907
1908         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
1909         (WebCore::CDMSessionAVContentKeySession::update):
1910
1911 2018-05-16  Andy VanWagoner  <andy@vanwagoner.family>
1912
1913         Add support for Intl NumberFormat formatToParts
1914         https://bugs.webkit.org/show_bug.cgi?id=185375
1915
1916         Reviewed by Yusuke Suzuki.
1917
1918         Test: js/intl-numberformat-format-to-parts.html
1919
1920         Add flag & tests for NumberFormat formatToParts.
1921
1922         * Configurations/FeatureDefines.xcconfig:
1923
1924 2018-05-16  Eric Carlson  <eric.carlson@apple.com>
1925
1926         Improve NowPlaying "title"
1927         https://bugs.webkit.org/show_bug.cgi?id=185680
1928         <rdar://problem/40296700>
1929
1930         Reviewed by Jer Noble.
1931         
1932         We send NowPlaying the element's title attribute if not empty, else the element's current url.
1933         Title should be preferred because it is the most specific, but we should use the document
1934         title if non-empty next, and if falling back to the element's url use just the domain instead
1935         of the full url because it isn't likely to be useful to the user given the small amount of
1936         space control center uses to display the title. Further, don't use any title at all when
1937         in private browsing mode.
1938
1939         Tests: http/tests/media/now-playing-info-private-browsing.html
1940                http/tests/media/now-playing-info.html
1941
1942         * html/HTMLMediaElement.cpp:
1943         (WebCore::HTMLMediaElement::parseAttribute): Update NowPlaying when the title attribute changes.
1944         (WebCore::HTMLMediaElement::finishSeek): Update NowPlaying when a seek completes.
1945         (WebCore::HTMLMediaElement::mediaSessionTitle const): Update logic.
1946         (WebCore::HTMLMediaElement::mediaSessionUniqueIdentifier const): Use the hash of the current 
1947         url as the unique identifier.
1948         * html/HTMLMediaElement.h:
1949
1950         * platform/audio/PlatformMediaSession.cpp:
1951         (WebCore::PlatformMediaSession::uniqueIdentifier const): New.
1952         (WebCore::PlatformMediaSessionClient::mediaSessionUniqueIdentifier const): Ditto.
1953         * platform/audio/PlatformMediaSession.h:
1954
1955         * platform/audio/ios/MediaSessionManagerIOS.mm:
1956         (WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Update m_lastUpdatedNowPlayingInfoUniqueIdentifier.
1957
1958         * platform/audio/mac/MediaSessionManagerMac.mm:
1959         (WebCore::MediaSessionManagerMac::updateNowPlayingInfo): Update.
1960
1961         * testing/Internals.cpp:
1962         (WebCore::Internals::nowPlayingState const): Expose NowPlaying state.
1963         * testing/Internals.h:
1964         * testing/Internals.idl:
1965
1966 2018-05-16  Daniel Bates  <dabates@apple.com>
1967
1968         Attempt to fix the WinCairo build following r231859
1969         (https://bugs.webkit.org/show_bug.cgi?id=185654)
1970
1971         Instantiate Cookie as a struct and set applicable fields.
1972
1973         * platform/network/curl/CookieJarDB.cpp:
1974         (WebCore::CookieJarDB::searchCookies):
1975
1976 2018-05-16  Daniel Bates  <dabates@apple.com>
1977
1978         Cleanup platform Cookie
1979         https://bugs.webkit.org/show_bug.cgi?id=185654
1980
1981         Reviewed by Per Arne Vollan.
1982
1983         Remove unnecessary constructor and use =default for default constructor.
1984         Simplify Cookie::decode() by having it decode directly into a stack-allocated
1985         cookie. Remove some unnecessary local variables. Fix style nits.
1986
1987         * platform/Cookie.h:
1988         (WebCore::Cookie::Cookie):
1989         (WebCore::Cookie::isNull const):
1990         (WebCore::Cookie::encode const):
1991         (WebCore::Cookie::decode):
1992         * platform/network/cf/CookieJarCFNet.cpp:
1993         (WebCore::getRawCookies):
1994         * platform/network/cocoa/CookieCocoa.mm:
1995         (WebCore::cookieCreated):
1996         (WebCore::Cookie::Cookie):
1997         (WebCore::Cookie::operator== const):
1998         (WebCore::Cookie::hash const):
1999         * platform/network/soup/CookieJarSoup.cpp:
2000         (WebCore::getRawCookies):
2001
2002 2018-05-14  Yusuke Suzuki  <utatane.tea@gmail.com>
2003
2004         [Win] Use C++17 in MSVC
2005         https://bugs.webkit.org/show_bug.cgi?id=185232
2006
2007         Reviewed by Alex Christensen.
2008
2009         Workaround for MSVC + /std:c++17.
2010
2011         * Modules/geolocation/Coordinates.h:
2012         (WebCore::Coordinates::isolatedCopy const):
2013
2014 2018-05-16  Chris Nardi  <cnardi@chromium.org>
2015
2016         Remove Document#selectedStylesheetSet/preferredStylesheetSet
2017         https://bugs.webkit.org/show_bug.cgi?id=185381
2018
2019         Reviewed by Darin Adler.
2020
2021         Document#selectedStylesheetSet/preferredStylesheetSet are non-standard methods that
2022         are only implemented WebKit. Blink removed these methods in https://crbug.com/690609.
2023         The standard versions of these methods are are no longer in the spec. Remove them
2024         entirely from our implementation.
2025
2026         Updated existing tests and imported/w3c/web-platform-tests/cssom/historical.html.
2027
2028         * dom/Document.cpp:
2029         (WebCore::Document::processHttpEquiv):
2030         * dom/Document.h:
2031         * dom/Document.idl:
2032         * style/StyleScope.cpp:
2033         (WebCore::Style::Scope::collectActiveStyleSheets):
2034         * style/StyleScope.h:
2035         (WebCore::Style::Scope::preferredStylesheetSetName const):
2036
2037 2018-05-16  Zalan Bujtas  <zalan@apple.com>
2038
2039         [LFC] Implement width computation for replaced inflow elements.
2040         https://bugs.webkit.org/show_bug.cgi?id=185672
2041
2042         Reviewed by Antti Koivisto.
2043
2044         Replaced width for block, inline and float elements compute the same way. 
2045
2046         * layout/FormattingContext.cpp:
2047         (WebCore::Layout::FormattingContext::computeWidth const):
2048         (WebCore::Layout::FormattingContext::computeFloatingWidth const):
2049         (WebCore::Layout::FormattingContext::computeInFlowReplacedWidth const):
2050         * layout/FormattingContext.h:
2051         * layout/blockformatting/BlockFormattingContext.cpp:
2052         (WebCore::Layout::BlockFormattingContext::computeInFlowWidth const):
2053         * layout/layouttree/LayoutBox.cpp:
2054         (WebCore::Layout::Box::hasIntrinsicWidth const):
2055         (WebCore::Layout::Box::hasIntrinsicHeight const):
2056         (WebCore::Layout::Box::hasIntrinsicRatio const):
2057         (WebCore::Layout::Box::intrinsicWidth const):
2058         (WebCore::Layout::Box::intrinsicHeight const):
2059         (WebCore::Layout::Box::intrinsicRatio const):
2060         * layout/layouttree/LayoutBox.h:
2061
2062 2018-05-16  Zalan Bujtas  <zalan@apple.com>
2063
2064         [LFC] Make Display::Box box sizing aware
2065         https://bugs.webkit.org/show_bug.cgi?id=185649
2066
2067         Reviewed by Antti Koivisto.
2068
2069         Display::Box::width() == Display::Box::contentBox().width() <= box-sizing: content-box; (initial and default value)
2070         Display::Box::width() == Display::Box::borderBox().width() <= box-sizing: border-box;
2071
2072         * layout/LayoutContext.cpp:
2073         (WebCore::Layout::LayoutContext::createDisplayBox):
2074         * layout/displaytree/DisplayBox.cpp:
2075         (WebCore::Display::Box::Box):
2076         (WebCore::Display::Box::marginBox const):
2077         (WebCore::Display::Box::borderBox const):
2078         (WebCore::Display::Box::paddingBox const):
2079         (WebCore::Display::Box::contentBox const):
2080         * layout/displaytree/DisplayBox.h:
2081
2082 2018-05-16  Antoine Quint  <graouts@apple.com>
2083
2084         REGRESSION (r230574): Interrupted hardware transitions don't behave correctly
2085         https://bugs.webkit.org/show_bug.cgi?id=185299
2086         <rdar://problem/39630230>
2087
2088         Reviewed by Simon Fraser.
2089
2090         In r230574, the fix for webkit.org/b/184518, we changed the processing order in GraphicsLayerCA::updateAnimations() to first
2091         process m_uncomittedAnimations and then m_animationsToProcess, so we are guaranteed animations exist before we attempt to pause
2092         or seek them. This broke interrupting and resuming hardware animations (such as an interrupted CSS Transition or an animation
2093         running in a non-visible tab) since a pause operation recorded _before_ an animation was added would be paused anyway since
2094         the animation was now first added, and then paused. The fix is simply to clear any pending AnimationProcessingAction for a
2095         newly-uncommitted animation.
2096
2097         Test: transitions/interrupted-transition-hardware.html
2098
2099         * platform/graphics/ca/GraphicsLayerCA.cpp:
2100         (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
2101         (WebCore::GraphicsLayerCA::appendToUncommittedAnimations):
2102         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
2103         * platform/graphics/ca/GraphicsLayerCA.h:
2104         (WebCore::GraphicsLayerCA::LayerPropertyAnimation::LayerPropertyAnimation):
2105
2106 2018-05-15  Yusuke Suzuki  <utatane.tea@gmail.com>
2107
2108         [JSC] Check TypeInfo first before calling getCallData when we would like to check whether given object is a function
2109         https://bugs.webkit.org/show_bug.cgi?id=185601
2110
2111         Reviewed by Saam Barati.
2112
2113         No behavior change.
2114
2115         * Modules/plugins/QuickTimePluginReplacement.mm:
2116         (WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected):
2117         * bindings/js/JSCustomElementRegistryCustom.cpp:
2118         (WebCore::getCustomElementCallback):
2119         * bindings/js/JSDOMConstructorBase.h:
2120         * bindings/js/JSDOMConvertCallbacks.h:
2121         (WebCore::Converter<IDLCallbackFunction<T>>::convert):
2122         * bindings/js/JSDOMPromise.cpp:
2123         (WebCore::DOMPromise::whenSettled):
2124         * bindings/js/ReadableStream.cpp:
2125         (WebCore::ReadableStream::pipeTo):
2126         (WebCore::ReadableStream::tee):
2127         * bindings/js/ReadableStreamDefaultController.cpp:
2128         (WebCore::ReadableStreamDefaultController::invoke):
2129         * bindings/scripts/CodeGeneratorJS.pm:
2130         (GenerateHeader):
2131         (GenerateOverloadDispatcher):
2132         * bindings/scripts/test/JS/JSTestObj.h:
2133         * bindings/scripts/test/JS/JSTestPluginInterface.h:
2134         * bridge/objc/objc_runtime.h:
2135         * bridge/runtime_method.h:
2136         * bridge/runtime_object.h:
2137         * html/HTMLMediaElement.cpp:
2138         (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
2139         * testing/Internals.cpp:
2140         (WebCore::Internals::parserMetaData):
2141         (WebCore::Internals::cloneArrayBuffer):
2142
2143 2018-05-15  Matt Baker  <mattbaker@apple.com>
2144
2145         Web Inspector: element details hanger in inspector overlay should have better placement logic
2146         https://bugs.webkit.org/show_bug.cgi?id=128482
2147         <rdar://problem/16020709>
2148
2149         Reviewed by Timothy Hatcher.
2150
2151         When determining the best position for the hovered element details "tooltip",
2152         perform placement tests in view space, not canvas space, and account for the
2153         top content inset.
2154
2155         * inspector/InspectorOverlayPage.js:
2156         (reset): Drive by fix: added missing `.height`.
2157         (_drawElementTitle):
2158
2159 2018-05-15  Commit Queue  <commit-queue@webkit.org>
2160
2161         Unreviewed, rolling out r231765.
2162         https://bugs.webkit.org/show_bug.cgi?id=185668
2163
2164         the layout test added with this change is very flaky
2165         (Requested by realdawei on #webkit).
2166
2167         Reverted changeset:
2168
2169         "REGRESSION (r230574): Interrupted hardware transitions don't
2170         behave correctly"
2171         https://bugs.webkit.org/show_bug.cgi?id=185299
2172         https://trac.webkit.org/changeset/231765
2173
2174 2018-05-15  Devin Rousso  <webkit@devinrousso.com>
2175
2176         Web Inspector: Add rulers and guides
2177         https://bugs.webkit.org/show_bug.cgi?id=32263
2178         <rdar://problem/19281564>
2179
2180         Reviewed by Matt Baker.
2181
2182         This patch is purely a visual change for WebInspector, and doesn't affect anything else.
2183
2184         * inspector/InspectorOverlay.h:
2185         * inspector/InspectorOverlay.cpp:
2186         (WebCore::InspectorOverlay::update):
2187         (WebCore::InspectorOverlay::reset):
2188         (WebCore::InspectorOverlay::drawGutter): Deleted.
2189
2190         * inspector/InspectorOverlayPage.html:
2191         * inspector/InspectorOverlayPage.js:
2192         (Bounds): Added.
2193         (Bounds.prototype.get minX): Added.
2194         (Bounds.prototype.get minY): Added.
2195         (Bounds.prototype.get maxX): Added.
2196         (Bounds.prototype.get maxY): Added.
2197         (Bounds.prototype.update): Added.
2198         (drawNodeHighlight):
2199         (drawQuadHighlight):
2200         (reset):
2201         (_isolateActions): Added.
2202         (_quadToPath): Added.
2203         (_quadToPath.parseQuadPoint): Added.
2204         (_drawOutlinedQuad): Added.
2205         (_drawPath): Added.
2206         (_drawPath.parsePoints): Added.
2207         (_drawOutlinedQuadWithClip): Added.
2208         (_drawElementTitle):
2209         (_drawShapeHighlight):
2210         (_drawFragmentHighlight):
2211         (_drawRulers): Added.
2212         (quadToPath): Deleted.
2213         (drawOutlinedQuad): Deleted.
2214         (pathCommand): Deleted.
2215         (drawPath): Deleted.
2216         (drawOutlinedQuadWithClip): Deleted.
2217         (drawGutter): Deleted.
2218         * inspector/InspectorOverlayPage.css:
2219         (#log): Added.
2220         (#right-gutter): Deleted.
2221         (#bottom-gutter): Deleted.
2222
2223 2018-05-15  Jer Noble  <jer.noble@apple.com>
2224
2225         Media continues loading after rendered invisible (removed from DOM; scrolled off screen)
2226         https://bugs.webkit.org/show_bug.cgi?id=185487
2227
2228         Reviewed by Eric Carlson.
2229
2230         Test: media/video-buffering-allowed.html
2231
2232         When a media element is removed from the dom (e.g. through innerHTML=""), it doesn't
2233         necessarily stop loading media data; it will continue to do so until its destructor is
2234         called through garbage collection. Similarly, when a media element is rendered not-visible
2235         by being scrolled off-screen or being made display:none, media loading continues. There
2236         are legitimate use cases for out-of-DOM media loading, so only temporarily block loading
2237         when the element transitions out of the document. Similarly, only block loading for non-visible
2238         media elements when returning from the "page is hidden" state, and only until the media
2239         element is asked to play or is otherwise made visible.
2240
2241         Note: this refactors a lot of code out of PlatformMediaSession and into MediaElementSession,
2242         since this code is specific to "media elements".
2243
2244         * html/HTMLMediaElement.cpp:
2245         (WebCore::HTMLMediaElement::HTMLMediaElement):
2246         (WebCore::HTMLMediaElement::insertedIntoAncestor):
2247         (WebCore::HTMLMediaElement::removedFromAncestor):
2248         (WebCore::HTMLMediaElement::playInternal):
2249         (WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer):
2250         (WebCore::HTMLMediaElement::resume):
2251         (WebCore::HTMLMediaElement::visibilityStateChanged):
2252         (WebCore::HTMLMediaElement::createMediaPlayer):
2253         (WebCore::HTMLMediaElement::setShouldBufferData):
2254         (WebCore::HTMLMediaElement::purgeBufferedDataIfPossible):
2255         (WebCore::HTMLMediaElement::isVisibleInViewportChanged):
2256         (WebCore::HTMLMediaElement::fullscreenModeChanged):
2257         (WebCore::HTMLMediaElement::setInActiveDocument):
2258         * html/HTMLMediaElement.h:
2259         (WebCore::HTMLMediaElement::shouldBufferData const):
2260         (WebCore::HTMLMediaElement::elementIsHidden const):
2261         * html/MediaElementSession.cpp:
2262         (WebCore::MediaElementSession::MediaElementSession):
2263         (WebCore::MediaElementSession::clientWillBeginAutoplaying):
2264         (WebCore::MediaElementSession::clientWillBeginPlayback):
2265         (WebCore::MediaElementSession::clientWillPausePlayback):
2266         (WebCore::MediaElementSession::visibilityChanged):
2267         (WebCore::MediaElementSession::isVisibleInViewportChanged):
2268         (WebCore::MediaElementSession::inActiveDocumentChanged):
2269         (WebCore::MediaElementSession::scheduleClientDataBufferingCheck):
2270         (WebCore::MediaElementSession::clientDataBufferingTimerFired):
2271         (WebCore::MediaElementSession::updateClientDataBuffering):
2272         (WebCore::MediaElementSession::dataBufferingPermitted const):
2273         (WebCore::MediaElementSession::wantsToObserveViewportVisibilityForAutoplay const):
2274         * html/MediaElementSession.h:
2275         * platform/audio/PlatformMediaSession.cpp:
2276         (WebCore::PlatformMediaSession::PlatformMediaSession):
2277         (WebCore::PlatformMediaSession::clientWillBeginAutoplaying):
2278         (WebCore::PlatformMediaSession::clientWillBeginPlayback):
2279         (WebCore::PlatformMediaSession::clientWillPausePlayback):
2280         (): Deleted.
2281         (WebCore::PlatformMediaSession::visibilityChanged): Deleted.
2282         (WebCore::PlatformMediaSession::scheduleClientDataBufferingCheck): Deleted.
2283         (WebCore::PlatformMediaSession::clientDataBufferingTimerFired): Deleted.
2284         (WebCore::PlatformMediaSession::updateClientDataBuffering): Deleted.
2285         (WebCore::PlatformMediaSession::isHidden const): Deleted.
2286         * platform/audio/PlatformMediaSession.h:
2287         (WebCore::PlatformMediaSessionClient::setShouldBufferData): Deleted.
2288         (WebCore::PlatformMediaSessionClient::elementIsHidden const): Deleted.
2289         * platform/audio/PlatformMediaSessionManager.cpp:
2290         (WebCore::PlatformMediaSessionManager::sessionCanLoadMedia const): Deleted.
2291         * platform/audio/PlatformMediaSessionManager.h:
2292         * platform/audio/ios/MediaSessionManagerIOS.h:
2293         * platform/audio/ios/MediaSessionManagerIOS.mm:
2294         (WebCore::MediaSessionManageriOS::sessionCanLoadMedia const): Deleted.
2295         * rendering/RenderVideo.cpp:
2296         (WebCore::RenderVideo::willBeDestroyed):
2297         * testing/Internals.cpp:
2298         (WebCore::Internals::elementShouldBufferData):
2299         * testing/Internals.h:
2300         * testing/Internals.idl:
2301
2302 2018-05-15  Charles Vazac  <cvazac@gmail.com>
2303
2304         Add the PerformanceServerTiming Interface which makes Server-Timing header timing values available to JavaScript running in the browser.
2305         https://bugs.webkit.org/show_bug.cgi?id=175569
2306
2307         Reviewed by Youenn Fablet.
2308
2309         Tests were imported from web-platform-tests: WebKit/LayoutTests/imported/w3c/web-platform-tests/server-timing/*
2310
2311         * Sources.txt: Added references to HeaderFieldTokenizer.cpp, ServerTiming.cpp, and ServerTimingParser.cpp.
2312         * WebCore.xcodeproj/project.pbxproj: Added various files.
2313         * loader/HeaderFieldTokenizer.cpp: Added.
2314         (WebCore::HeaderFieldTokenizer::HeaderFieldTokenizer): Added class for tokenizing header values.
2315         (WebCore::HeaderFieldTokenizer::consume): Added method to consume a specified character.
2316         (WebCore::HeaderFieldTokenizer::consumeQuotedString): Added method to consume a quote-string.
2317         (WebCore::HeaderFieldTokenizer::consumeToken): Added a method to consume a token.
2318         (WebCore::HeaderFieldTokenizer::consumeTokenOrQuotedString): Added method to consume a quote-string or quote-string, depending on net character.
2319         (WebCore::HeaderFieldTokenizer::skipSpaces): Added method to skip whitespace.
2320         (WebCore::HeaderFieldTokenizer::consumeBeforeAnyCharMatch): Added method to advance the cursor up until any of a list of characters.
2321         * loader/HeaderFieldTokenizer.h: Added.
2322         * loader/HTTPHeaderField.cpp: Expose isTokenCharacter and isWhitespace.
2323         * loader/HTTPHeaderField.h: Expose isTokenCharacter and isWhitespace.
2324         * loader/PolicyChecker.cpp: Added #include so source compiled on my machine.
2325         * loader/ResourceTiming.cpp:
2326         (WebCore::ResourceTiming::ResourceTiming): Added call to initServerTiming to parse the header.
2327         (WebCore::ResourceTiming::initServerTiming): Added method to parse the header.
2328         (WebCore::ResourceTiming::populateServerTiming): Added method to populate the server timing entries on a PerformanceResourceTiming object.
2329         (WebCore::ResourceTiming::isolatedCopy const): Added code to copy over the server timing entries.
2330         * loader/ResourceTiming.h:
2331         (WebCore::ResourceTiming::ResourceTiming): Accept collection of server timing entries in c'tor.
2332         * loader/ServerTiming.cpp: Added.
2333         (WebCore::ServerTiming::setParameter): Set named parameters, ignoring unrecognized or duplicates.
2334         (WebCore::ServerTiming::isolatedCopy const): Return a new pointer to the object.
2335         * loader/ServerTiming.h: Added.
2336         (WebCore::ServerTiming::ServerTiming): Added struct for the data needed by a server timing entry.
2337         (WebCore::ServerTiming::name const): Added name field of a server timing entry.
2338         (WebCore::ServerTiming::duration const): Added duration field of a server timing entry.
2339         (WebCore::ServerTiming::description const): Added description field of a server timing entry.
2340         * loader/ServerTimingParser.cpp: Added.
2341         (WebCore::ServerTimingParser::parseServerTiming): Parses the header generating a collection of server timing structs.
2342         * loader/ServerTimingParser.h: Added.
2343         * loader/WorkerThreadableLoader.h: Fix build.
2344         * page/Performance.cpp:
2345         (WebCore::Performance::addResourceTiming): Fixed a typo.
2346         * page/PerformanceResourceTiming.cpp:
2347         (WebCore::PerformanceResourceTiming::PerformanceResourceTiming): Given a ResourceTiming object, populate our collection of PerformanceServerTiming objects.
2348         * page/PerformanceResourceTiming.h: Added serverTiming member and getter.
2349         * page/PerformanceResourceTiming.idl: Added serverTiming member to interface.
2350         * platform/network/HTTPHeaderNames.in: Added "Server-Timing" to the header enum.
2351         * platform/network/ResourceResponseBase.cpp: Added "Server-Timing" to isSafeCrossOriginResponseHeader whitelist.
2352
2353 2018-05-15  Brady Eidson  <beidson@apple.com>
2354
2355         Fix crash after a Worker terminates but there are still IDB transactions the server is trying to open for it.
2356         <rdar://problem/33744241> and https://bugs.webkit.org/show_bug.cgi?id=185653
2357
2358         Reviewed by Andy Estes.
2359
2360         Test: storage/indexeddb/modern/worker-transaction-open-after-worker-stop.html
2361
2362         * Modules/indexeddb/client/IDBConnectionProxy.cpp:
2363         (WebCore::IDBClient::IDBConnectionProxy::didStartTransaction): It's okay to not be able to find a pending TX
2364           that the server has started. e.g. When it was a WebWorker that asked for the TX but it has since terminated.
2365
2366 2018-05-15  Thomas Klausner  <tk@giga.or.at>
2367
2368         Add missing header to fix build.
2369         https://bugs.webkit.org/show_bug.cgi?id=185378
2370
2371         Reviewed by Michael Catanzaro.
2372
2373         * platform/network/soup/SoupNetworkSession.h:
2374
2375 2018-05-15  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2376
2377         [WPE] Build failure with RPi userland drivers and gstreamer-gl
2378         https://bugs.webkit.org/show_bug.cgi?id=185639
2379
2380         Reviewed by Philippe Normand.
2381
2382         When building for the RPi with userland drivers (dispmanx) override the
2383         value of GST_GL_HAVE_GLSYNC to 1 to avoid that the gstreamer-gl headers
2384         try to redefine the GLsync type that is already defined in libepoxy.
2385
2386         Defining __gl2_h_ is also needed to avoid other conflicting type
2387         definitions that happen between libepoxy and RPi GLES2 userland
2388         headers when the gstreamer-gl headers are included.
2389
2390         The issue doesn't happen with 1.14.0, so a check for that is added
2391         as well.
2392
2393         No new tests, no behavior change. It is a build fix.
2394
2395         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2396
2397 2018-05-15  Michael Catanzaro  <mcatanzaro@igalia.com>
2398
2399         Unreviewed, rolling out r230749
2400
2401         This did not work as desired.
2402
2403         * platform/UserAgentQuirks.cpp:
2404         (WebCore::urlRequiresMacintoshPlatform):
2405
2406 2018-05-15  Dirk Schulze  <krit@webkit.org>
2407
2408         Add new SVGDOM SVGFEBLEND constants
2409         https://bugs.webkit.org/show_bug.cgi?id=185581
2410
2411         Reviewed by Simon Fraser.
2412
2413         Provide new SVG DOM constants for the new blend modes added to feBlend.
2414
2415         https://drafts.fxtf.org/filter-effects-1/#InterfaceSVGFEBlendElement
2416
2417         * platform/graphics/GraphicsTypes.cpp:
2418         (WebCore::blendModeName):
2419         * platform/graphics/GraphicsTypes.h:
2420         * svg/SVGFEBlendElement.h:
2421         (WebCore::SVGPropertyTraits<BlendMode>::highestEnumValue):
2422         (WebCore::SVGPropertyTraits<BlendMode>::toString):
2423         * svg/SVGFEBlendElement.idl:
2424
2425 2018-05-15  Antoine Quint  <graouts@apple.com>
2426
2427         [Web Animations] Expose Web Animations CSS integration as an experimental feature
2428         https://bugs.webkit.org/show_bug.cgi?id=185647
2429
2430         Reviewed by Dean Jackson.
2431
2432         Make the Web Animations CSS integration flag an experimental feature, and only indicate that it is on if the Web Animations
2433         experimental feature is also enabled.
2434
2435         * dom/Document.cpp:
2436         (WebCore::Document::didBecomeCurrentDocumentInFrame):
2437         (WebCore::Document::resume):
2438         * dom/Element.cpp:
2439         (WebCore::Element::removedFromAncestor):
2440         * dom/PseudoElement.cpp:
2441         (WebCore::PseudoElement::clearHostElement):
2442         * history/CachedFrame.cpp:
2443         (WebCore::CachedFrameBase::restore):
2444         * page/Frame.cpp:
2445         (WebCore::Frame::clearTimers):
2446         * page/FrameView.cpp:
2447         (WebCore::FrameView::didDestroyRenderTree):
2448         * page/Page.cpp:
2449         (WebCore::Page::handleLowModePowerChange):
2450         (WebCore::Page::setIsVisibleInternal):
2451         (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged):
2452         * page/RuntimeEnabledFeatures.h:
2453         (WebCore::RuntimeEnabledFeatures::setWebAnimationsCSSIntegrationEnabled):
2454         (WebCore::RuntimeEnabledFeatures::webAnimationsCSSIntegrationEnabled const):
2455         (WebCore::RuntimeEnabledFeatures::setCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled): Deleted.
2456         (WebCore::RuntimeEnabledFeatures::cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled const): Deleted.
2457         * rendering/RenderLayer.cpp:
2458         (WebCore::RenderLayer::currentTransform const):
2459         (WebCore::RenderLayer::calculateClipRects const):
2460         * rendering/RenderLayerBacking.cpp:
2461         (WebCore::RenderLayerBacking::updateGeometry):
2462         * rendering/RenderLayerCompositor.cpp:
2463         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation const):
2464         (WebCore::RenderLayerCompositor::isRunningTransformAnimation const):
2465         * rendering/updating/RenderTreeUpdater.cpp:
2466         (WebCore::RenderTreeUpdater::tearDownRenderers):
2467         * style/StyleTreeResolver.cpp:
2468         (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
2469         * testing/InternalSettings.cpp:
2470         (WebCore::InternalSettings::webAnimationsCSSIntegrationEnabled):
2471         (WebCore::InternalSettings::cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled): Deleted.
2472         * testing/InternalSettings.h:
2473         * testing/InternalSettings.idl:
2474         * testing/Internals.cpp:
2475         (WebCore::Internals::numberOfActiveAnimations const):
2476         (WebCore::Internals::animationsAreSuspended const):
2477         (WebCore::Internals::animationsInterval const):
2478         (WebCore::Internals::suspendAnimations const):
2479         (WebCore::Internals::resumeAnimations const):
2480
2481 2018-05-15  David Kilzer  <ddkilzer@apple.com>
2482
2483         Fix -Wreturn-std-move warnings in WebKit found by new clang compiler
2484         <https://webkit.org/b/185621>
2485
2486         Reviewed by Youenn Fablet.
2487
2488         Fix warnings like the following:
2489
2490             In file included from DerivedSources/WebCore/unified-sources/UnifiedSource139.cpp:5:
2491             ./Modules/mediastream/PeerConnectionBackend.cpp:412:16: error: local variable 'sdp' will be copied despite being returned by name [-Werror,-Wreturn-std-move]
2492                     return sdp;
2493                            ^~~
2494             ./Modules/mediastream/PeerConnectionBackend.cpp:412:16: note: call 'std::move' explicitly to avoid copying
2495                     return sdp;
2496                            ^~~
2497                            std::move(sdp)
2498             1 error generated.
2499
2500         * Modules/mediastream/PeerConnectionBackend.cpp:
2501         (WebCore::PeerConnectionBackend::filterSDP const):
2502         * accessibility/AccessibilityObject.cpp:
2503         (WebCore::rangeClosestToRange):
2504         * bindings/js/JSDOMConvertSequences.h:
2505         (WebCore::Detail::GenericSequenceConverter::convert):
2506         (WebCore::Detail::NumericSequenceConverter::convertArray):
2507         * bindings/js/JSDOMConvertStrings.cpp:
2508         (WebCore::stringToByteString):
2509         (WebCore::stringToUSVString):
2510         - Use WTFMove() in return statements to fix the warnings.
2511
2512 2018-05-14  Dean Jackson  <dino@apple.com>
2513
2514         Download and present System Preview
2515         https://bugs.webkit.org/show_bug.cgi?id=185459
2516         <rdar://problem/40079228>
2517
2518         Reviewed by Tim Horton.
2519
2520         If an <a> is a system preview, tell the resource request about it.
2521
2522         * html/HTMLAnchorElement.cpp:
2523         (WebCore::HTMLAnchorElement::handleClick):
2524
2525 2018-05-15  Antti Koivisto  <antti@apple.com>
2526
2527         animation-play-state: paused causes very high cpu load because of style invalidation loop
2528         https://bugs.webkit.org/show_bug.cgi?id=182436
2529         <rdar://problem/37182562>
2530
2531         Reviewed by Dean Jackson.
2532
2533         Test: animations/animation-playstate-paused-style-resolution.html
2534
2535         If the style of an element with 'animation-play-state: paused' is recomputed so it stays
2536         paused we would enter zero-duration animation timer loop.
2537
2538         * page/animation/AnimationBase.cpp:
2539         (WebCore::AnimationBase::updateStateMachine):
2540
2541         Don't move to AnimationState::PausedWaitResponse unless we get AnimationStateInput::StyleAvailable
2542         (matching the comments). Otherwise just stay in the existing paused state.
2543
2544         Remove AnimationStateInput::StartAnimation from assertion as the case can't happen.
2545
2546 2018-05-14  Youenn Fablet  <youenn@apple.com>
2547
2548         readableStreamDefaultControllerError should return early if stream is not readable
2549         https://bugs.webkit.org/show_bug.cgi?id=185602
2550
2551         Reviewed by Chris Dumez.
2552
2553         Return early if stream is not readable in @readableStreamDefaultControllerError.
2554         Update call sites to no longer check for ReadableStream state.
2555         Covered by unflaked and rebased tests.
2556
2557         * Modules/streams/ReadableStreamDefaultController.js:
2558         (error):
2559         * Modules/streams/ReadableStreamInternals.js:
2560         (readableStreamDefaultControllerError):
2561         (readableStreamDefaultControllerCallPullIfNeeded):
2562
2563 2018-05-14  Zalan Bujtas  <zalan@apple.com>
2564
2565         [LFC] Implement width computation for non-replaced block level inflow elements.
2566         https://bugs.webkit.org/show_bug.cgi?id=185641
2567
2568         Reviewed by Sam Weinig.
2569
2570         Block level inflow elements participate in block formatting context.
2571
2572         * layout/FormattingContext.cpp:
2573         (WebCore::Layout::FormattingContext::computeWidth const):
2574         * layout/FormattingContext.h:
2575         * layout/blockformatting/BlockFormattingContext.cpp:
2576         (WebCore::Layout::BlockFormattingContext::computeInFlowWidth const):
2577         * layout/blockformatting/BlockFormattingContext.h:
2578         * layout/inlineformatting/InlineFormattingContext.cpp:
2579         (WebCore::Layout::InlineFormattingContext::computeInFlowWidth const):
2580         * layout/inlineformatting/InlineFormattingContext.h:
2581
2582 2018-05-14  Wenson Hsieh  <wenson_hsieh@apple.com>
2583
2584         Unreviewed, fix the iOS build after r231779
2585
2586         Also address a minor in-person review comment by returning "extrazoom" instead of the empty string.
2587
2588         * page/DisabledAdaptations.cpp:
2589         (WebCore::extraZoomModeAdaptationName):
2590
2591 2018-05-14  Zalan Bujtas  <zalan@apple.com>
2592
2593         [LFC] FormattingContext:computeOutOfFlowNonReplacedHeight/Width should use the computed margins/paddings/borders
2594         https://bugs.webkit.org/show_bug.cgi?id=185633
2595
2596         Reviewed by Sam Weinig.
2597
2598         By the time we start computing height and width, DisplayBox should already have the computed values for margin/padding/border.
2599
2600         * layout/FormattingContext.cpp:
2601         (WebCore::Layout::FormattingContext::computeOutOfFlowNonReplacedHeight const):
2602         (WebCore::Layout::FormattingContext::computeOutOfFlowNonReplacedWidth const):
2603         * layout/displaytree/DisplayBox.h:
2604         (WebCore::Display::Box::paddingTop const):
2605         (WebCore::Display::Box::paddingLeft const):
2606         (WebCore::Display::Box::paddingBottom const):
2607         (WebCore::Display::Box::paddingRight const):
2608         (WebCore::Display::Box::borderTop const):
2609         (WebCore::Display::Box::borderLeft const):
2610         (WebCore::Display::Box::borderBottom const):
2611         (WebCore::Display::Box::borderRight const):
2612
2613 2018-05-14  Wenson Hsieh  <wenson_hsieh@apple.com>
2614
2615         [Extra zoom mode] Google search results are excessively zoomed in
2616         https://bugs.webkit.org/show_bug.cgi?id=185347
2617         <rdar://problem/39999778>
2618
2619         Reviewed by Tim Horton.
2620
2621         It turns out that basing minimum layout size and shrink-to-fit behaviors off of the `shrink-to-fit` viewport
2622         argument poses compatibility risks with web pages that already specify `shrink-to-fit` to opt out of default
2623         viewport shrinking behaviors in 1/3 multitasking mode on iPad.
2624
2625         One way to resolve this is to introduce a new viewport meta content attribute to disable viewport heuristics in
2626         extra zoom mode. However, combined shrink-to-fit and minimum device width behaviors are difficult to describe
2627         using a single backwards-compatible viewport meta content attribute, and the need to suppress the default
2628         behavior of `shrink-to-fit=no` if such an attribute is not disabled further muddles our viewport story.
2629
2630         After some internal deliberation, we’ve decided to experiment with a new meta tag named "disabled-adaptations".
2631         The content of this meta tag is a comma-separated list of adaptation names; if an adaptation name matches a
2632         known adaptation type (for instance, extra zoom mode), we disable the class of behaviors used to adapt web
2633         content. The first and only known adaptation type is extra zoom mode, which affects `shrink-to-fit` and layout
2634         size adjustments.
2635
2636         See per-method changes below for more details.
2637
2638         Test: fast/viewport/extrazoom/viewport-disable-extra-zoom-adaptations.html
2639
2640         * Sources.txt:
2641         * WebCore.xcodeproj/project.pbxproj:
2642         * dom/Document.cpp:
2643         (WebCore::Document::processDisabledAdaptations):
2644         * dom/Document.h:
2645         (WebCore::Document::disabledAdaptations const):
2646
2647         Add disabled adaptations to Document. Changes to disabled adaptations are not propagated if the parsed disabled
2648         adaptation types don't change; upon changing adaptation types, notify the client to adjust for the new disabled
2649         adaptations (currently, this only affects the viewport configuration).
2650
2651         * dom/ViewportArguments.h:
2652         * html/HTMLMetaElement.cpp:
2653         (WebCore::HTMLMetaElement::process):
2654         * html/parser/HTMLPreloadScanner.cpp:
2655         (WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner):
2656         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
2657         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
2658         * loader/FrameLoader.cpp:
2659         (WebCore::FrameLoader::commitProvisionalLoad):
2660
2661         Restore the set of disabled adaptations when restoring a page from the cache.
2662
2663         * page/Chrome.cpp:
2664         (WebCore::Chrome::dispatchDisabledAdaptationsDidChange const):
2665         * page/Chrome.h:
2666         * page/ChromeClient.h:
2667
2668         Add plumbing for changes to the set of disabled adaptations.
2669
2670         * page/DisabledAdaptations.cpp: Added.
2671         (WebCore::extraZoomModeAdaptationName):
2672         * page/DisabledAdaptations.h: Added.
2673
2674         Introduce a header containing a new enum for the extra zoom mode adaptation, as well as a helper function to
2675         return the extra zoom mode adaptation name.
2676
2677         * page/Page.cpp:
2678         (WebCore::Page::disabledAdaptations const):
2679
2680         Returns the mainframe's set of adaptations to disable.
2681
2682         * page/Page.h:
2683         * page/RemoteFrame.h:
2684         * page/RuntimeEnabledFeatures.h:
2685         (WebCore::RuntimeEnabledFeatures::setDisabledAdaptationsMetaTagEnabled):
2686         (WebCore::RuntimeEnabledFeatures::disabledAdaptationsMetaTagEnabled const):
2687
2688         Add a new runtime feature to gate handling the "disabled-adaptations" meta tag.
2689
2690         * page/ViewportConfiguration.cpp:
2691         (WebCore::shouldOverrideShrinkToFitArgument):
2692         (WebCore::needsUpdateAfterChangingDisabledAdaptations):
2693         (WebCore::ViewportConfiguration::setDisabledAdaptations):
2694         (WebCore::ViewportConfiguration::shouldOverrideDeviceWidthAndShrinkToFit const):
2695
2696         Consult whether or not extra zoom mode adaptations are disabled, instead of the shrink-to-fit attribute value.
2697
2698         (WebCore::ViewportConfiguration::updateConfiguration):
2699         * page/ViewportConfiguration.h:
2700
2701         Add an OptionSet of disabled adaptation types to ViewportConfiguration. Updates to the adaptation type are
2702         propagated to the ViewportConfiguration from Document, through the ChromeClient and the client layer (refer to
2703         changes in WebKit). Once the OptionSet is changed, we recompute the viewport configuration only if needed by the
2704         platform.
2705
2706         (WebCore::ViewportConfiguration::viewLayoutSize const):
2707         (WebCore::ViewportConfiguration::disabledAdaptations const):
2708         * page/WindowFeatures.cpp:
2709         (WebCore::parseDisabledAdaptations):
2710         * page/WindowFeatures.h:
2711
2712         Add a new helper to parse the meta content of a "disabled-adaptations" tag as an OptionSet of disabled
2713         adaptation types. The string is parsed by first splitting on the comma character, and then iterating over lower
2714         case, whitespace-stripped tokens to look for known adaptation names. So far, only extra zoom mode is supported.
2715
2716         * testing/Internals.cpp:
2717         (WebCore::Internals::extraZoomModeAdaptationName const):
2718         * testing/Internals.h:
2719         * testing/Internals.idl:
2720
2721         Expose the extra zoom mode adaptation name to the DOM, only when running layout tests.
2722
2723 2018-05-14  Joanmarie Diggs  <jdiggs@igalia.com>
2724
2725         AX: Listbox and Combobox roles embedded in labels should participate in name calculation
2726         https://bugs.webkit.org/show_bug.cgi?id=185521
2727
2728         Reviewed by Chris Fleizach.
2729
2730         Take selected children into account when computing the name in accessibleNameForNode.
2731         Add ListBox to the roles for which accessibleNameDerivesFromContent returns false so
2732         that native select elements with size > 1 are treated the same way as ARIA listbox.
2733         Also add ListBox to the roles which are treated as controls when used in ARIA. Finally,
2734         prevent labels which contain unrelated controls from being used as an AXTitleUIElement.
2735         This causes us to build a string from the label and its descendants, ensuring the latter
2736         participate in the name calculation.
2737
2738         Test: accessibility/text-alternative-calculation-from-listbox.html
2739
2740         * accessibility/AccessibilityLabel.cpp:
2741         (WebCore::childrenContainUnrelatedControls):
2742         (WebCore::AccessibilityLabel::containsUnrelatedControls const):
2743         * accessibility/AccessibilityLabel.h:
2744         * accessibility/AccessibilityNodeObject.cpp:
2745         (WebCore::accessibleNameForNode):
2746         * accessibility/AccessibilityObject.cpp:
2747         (WebCore::AccessibilityObject::accessibleNameDerivesFromContent const):
2748         (WebCore::AccessibilityObject::isARIAControl):
2749         * accessibility/AccessibilityRenderObject.cpp:
2750         (WebCore::AccessibilityRenderObject::exposesTitleUIElement const):
2751         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored const):
2752
2753 2018-05-14  Antoine Quint  <graouts@apple.com>
2754
2755         [Web Animations] Tests using the new animation engine may crash under WebCore::FrameView::didDestroyRenderTree when using internals methods
2756         https://bugs.webkit.org/show_bug.cgi?id=185612
2757         <rdar://problem/39579344>
2758
2759         Reviewed by Dean Jackson.
2760
2761         Add a new internals.pseudoElement() method to obtain a pseudo element matching a given pseudo-id. This is necessary to be able to move off
2762         internals.pauseTransitionAtTimeOnPseudoElement() and internals.pauseAnimationAtTimeOnPseudoElement() for Web Animations testing.
2763
2764         * testing/Internals.cpp:
2765         (WebCore::Internals::pseudoElement):
2766         * testing/Internals.h:
2767         * testing/Internals.idl:
2768
2769 2018-05-14  Antoine Quint  <graouts@apple.com>
2770
2771         REGRESSION (r230574): Interrupted hardware transitions don't behave correctly
2772         https://bugs.webkit.org/show_bug.cgi?id=185299
2773         <rdar://problem/39630230>
2774
2775         Reviewed by Simon Fraser.
2776
2777         In r230574, the fix for webkit.org/b/184518, we changed the processing order in GraphicsLayerCA::updateAnimations() to first
2778         process m_uncomittedAnimations and then m_animationsToProcess, so we are guaranteed animations exist before we attempt to pause
2779         or seek them. This broke interrupting and resuming hardware animations (such as an interrupted CSS Transition or an animation
2780         running in a non-visible tab) since a pause operation recorded _before_ an animation was added would be paused anyway since
2781         the animation was now first added, and then paused. The fix is simply to clear any pending AnimationProcessingAction for a
2782         newly-uncommitted animation.
2783
2784         Test: transitions/interrupted-transition-hardware.html
2785
2786         * platform/graphics/ca/GraphicsLayerCA.cpp:
2787         (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
2788         (WebCore::GraphicsLayerCA::appendToUncommittedAnimations):
2789         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
2790         * platform/graphics/ca/GraphicsLayerCA.h:
2791         (WebCore::GraphicsLayerCA::LayerPropertyAnimation::LayerPropertyAnimation):
2792
2793 2018-05-14  Thibault Saunier  <tsaunier@igalia.com>
2794
2795         [GStreamer] Fix style issue in MediaPlayerPrivateGStreamerBase
2796         https://bugs.webkit.org/show_bug.cgi?id=185510
2797
2798         Reviewed by Philippe Normand.
2799
2800         ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:629:  More than one command on the same line  [whitespace/newline] [4]
2801         ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:684:  More than one command on the same line  [whitespace/newline] [4]
2802         ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:807:  More than one command on the same line  [whitespace/newline] [4]
2803
2804         Indentation and style issue fixed only.
2805
2806         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2807         (WebCore::MediaPlayerPrivateGStreamerBase::volumeChangedCallback):
2808         (WebCore::MediaPlayerPrivateGStreamerBase::muteChangedCallback):
2809         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
2810
2811 2018-05-14  Zalan Bujtas  <zalan@apple.com>
2812
2813         [LFC] Implement height computation for non-replaced out of flow elements.
2814         https://bugs.webkit.org/show_bug.cgi?id=185585
2815
2816         Reviewed by Antti Koivisto.
2817
2818         * layout/FormattingContext.cpp:
2819         (WebCore::Layout::FormattingContext::computeHeight const):
2820         (WebCore::Layout::FormattingContext::computeOutOfFlowHeight const):
2821         (WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
2822         (WebCore::Layout::FormattingContext::computeOutOfFlowNonReplacedHeight const):
2823         (WebCore::Layout::FormattingContext::computeHeightForBlockFormattingContextRootWithAutoHeight const):
2824         * layout/FormattingContext.h:
2825         * layout/blockformatting/BlockFormattingContext.h:
2826         * layout/displaytree/DisplayBox.h:
2827
2828 2018-05-14  Manuel Rego Casasnovas  <rego@igalia.com>
2829
2830         Renaming of overrides in LayoutBox
2831         https://bugs.webkit.org/show_bug.cgi?id=185609
2832
2833         Reviewed by Javier Fernandez.
2834
2835         The names of the methods for the overrides were not consistent,
2836         this patch fixes it by using the same structure in all the cases.
2837
2838         No new tests, no change of behavior.
2839
2840         * rendering/GridLayoutFunctions.cpp:
2841         (WebCore::GridLayoutFunctions::hasOverrideContainingBlockContentSizeForChild):
2842         * rendering/GridTrackSizingAlgorithm.cpp:
2843         (WebCore::GridTrackSizingAlgorithmStrategy::logicalHeightForChild const):
2844         * rendering/RenderBlock.cpp:
2845         (WebCore::RenderBlock::computeChildPreferredLogicalWidths const):
2846         (WebCore::RenderBlock::availableLogicalHeightForPercentageComputation const):
2847         * rendering/RenderBlockFlow.cpp:
2848         (WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded):
2849         * rendering/RenderBlockLineLayout.cpp:
2850         (WebCore::RenderBlockFlow::updateRubyForJustifiedText):
2851         * rendering/RenderBox.cpp:
2852         (WebCore::RenderBox::willBeDestroyed):
2853         (WebCore::RenderBox::hasOverrideContentLogicalHeight const):
2854         (WebCore::RenderBox::hasOverrideContentLogicalWidth const):
2855         (WebCore::RenderBox::setOverrideContentLogicalHeight):
2856         (WebCore::RenderBox::setOverrideContentLogicalWidth):
2857         (WebCore::RenderBox::clearOverrideContentLogicalHeight):
2858         (WebCore::RenderBox::clearOverrideContentLogicalWidth):
2859         (WebCore::RenderBox::clearOverrideContentSize):
2860         (WebCore::RenderBox::overrideContentLogicalWidth const):
2861         (WebCore::RenderBox::overrideContentLogicalHeight const):
2862         (WebCore::RenderBox::overrideContainingBlockContentLogicalWidth const):
2863         (WebCore::RenderBox::overrideContainingBlockContentLogicalHeight const):
2864         (WebCore::RenderBox::hasOverrideContainingBlockContentLogicalWidth const):
2865         (WebCore::RenderBox::hasOverrideContainingBlockContentLogicalHeight const):
2866         (WebCore::RenderBox::setOverrideContainingBlockContentLogicalWidth):
2867         (WebCore::RenderBox::setOverrideContainingBlockContentLogicalHeight):
2868         (WebCore::RenderBox::clearOverrideContainingBlockContentSize):
2869         (WebCore::RenderBox::clearOverrideContainingBlockContentLogicalHeight):
2870         (WebCore::RenderBox::containingBlockLogicalWidthForContent const):
2871         (WebCore::RenderBox::containingBlockLogicalHeightForContent const):
2872         (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight const):
2873         (WebCore::RenderBox::computeLogicalWidthInFragment const):
2874         (WebCore::RenderBox::computeLogicalHeight const):
2875         (WebCore::RenderBox::computePercentageLogicalHeight const):
2876         (WebCore::RenderBox::computeReplacedLogicalHeightUsing const):
2877         (WebCore::RenderBox::availableLogicalHeightUsing const):
2878         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned const):
2879         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned const):
2880         * rendering/RenderBox.h:
2881         * rendering/RenderBoxModelObject.cpp:
2882         (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight const):
2883         * rendering/RenderDeprecatedFlexibleBox.cpp:
2884         (WebCore::contentWidthForChild):
2885         (WebCore::contentHeightForChild):
2886         (WebCore::gatherFlexChildrenInfo):
2887         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
2888         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
2889         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
2890         (WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
2891         * rendering/RenderFlexibleBox.cpp:
2892         (WebCore::RenderFlexibleBox::computeInnerFlexBaseSizeForChild):
2893         (WebCore::RenderFlexibleBox::crossSizeForPercentageResolution):
2894         (WebCore::RenderFlexibleBox::mainSizeForPercentageResolution):
2895         (WebCore::RenderFlexibleBox::constructFlexItem):
2896         (WebCore::RenderFlexibleBox::setOverrideMainAxisContentSizeForChild):
2897         (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
2898         * rendering/RenderFullScreen.cpp:
2899         (WebCore::RenderFullScreen::unwrapRenderer):
2900         * rendering/RenderGrid.cpp:
2901         (WebCore::RenderGrid::layoutBlock):
2902         (WebCore::RenderGrid::layoutGridItems):
2903         (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
2904         * rendering/RenderRubyBase.cpp:
2905         (WebCore::RenderRubyBase::adjustInlineDirectionLineBounds const):
2906         * rendering/RenderTableCell.cpp:
2907         (WebCore::RenderTableCell::setOverrideContentLogicalHeightFromRowHeight):
2908         * rendering/RenderTableCell.h:
2909         * rendering/RenderTableSection.cpp:
2910         (WebCore::RenderTableSection::calcRowLogicalHeight):
2911         (WebCore::RenderTableSection::relayoutCellIfFlexed):
2912
2913 2018-05-14  Zalan Bujtas  <zalan@apple.com>
2914
2915         [LFC] Implement width computation for non-replaced out of flow elements.
2916         https://bugs.webkit.org/show_bug.cgi?id=185598
2917
2918         Reviewed by Antti Koivisto.
2919
2920         * layout/FormattingContext.cpp:
2921         (WebCore::Layout::FormattingContext::computeWidth const):
2922         (WebCore::Layout::FormattingContext::computeOutOfFlowWidth const):
2923         (WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
2924         (WebCore::Layout::FormattingContext::computeOutOfFlowNonReplacedWidth const):
2925         (WebCore::Layout::FormattingContext::shrinkToFitWidth const):
2926         * layout/FormattingContext.h:
2927         * layout/blockformatting/BlockFormattingContext.cpp:
2928         (WebCore::Layout::BlockFormattingContext::layout const):
2929         * layout/displaytree/DisplayBox.h:
2930
2931 2018-05-14  Zan Dobersek  <zdobersek@igalia.com>
2932
2933         Drop the m_compositorTexture member variable in TextureMapperGC3DPlatformLayer.
2934         It's not used at all inside the class or outside it.
2935
2936         Rubber-stamped by Michael Catanzaro.
2937
2938         * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h:
2939
2940 2018-05-14  Zan Dobersek  <zdobersek@igalia.com>
2941
2942         [GTK] REGRESSION(r231170) Build broken with Clang 5.0
2943         https://bugs.webkit.org/show_bug.cgi?id=185198
2944
2945         Reviewed by Michael Catanzaro.
2946
2947         Avoid gperf files using the register keyword which has been made
2948         reserved and as such unusable in C++17.
2949
2950         * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
2951         * css/makeSelectorPseudoElementsMap.py:
2952         * css/makeprop.pl:
2953         * css/makevalues.pl:
2954         * platform/ColorData.gperf:
2955         * platform/ReferrerPolicy.h: With std::optional forward declaration
2956         gone, explicitly include the WTF Optional.h header.
2957         * platform/Theme.h: Ditto.
2958         * platform/network/create-http-header-name-table:
2959
2960 2018-05-14  Commit Queue  <commit-queue@webkit.org>
2961
2962         Unreviewed, rolling out r219515.
2963         https://bugs.webkit.org/show_bug.cgi?id=185603
2964
2965         It sometimes makes AudioUnitInitialize call to fail in
2966         CoreAudioCaptureSource (Requested by youenn on #webkit).
2967
2968         Reverted changeset:
2969
2970         "Remove CoreAudioCaptureSource speaker configuration"
2971         https://bugs.webkit.org/show_bug.cgi?id=174512
2972         https://trac.webkit.org/changeset/219515
2973
2974 2018-05-13  Dirk Schulze  <krit@webkit.org>
2975
2976         Implement SVGGeometryElement's isPointInFill and isPointInStroke
2977         https://bugs.webkit.org/show_bug.cgi?id=185580
2978
2979         Reviewed by Antti Koivisto.
2980
2981         Implement isPointInFill and isPointInStroke methods for
2982         SVGGeometryElement interface from SVG2.
2983
2984         https://svgwg.org/svg2-draft/types.html#InterfaceSVGGeometryElement
2985
2986         Tests: svg/dom/SVGGeometry-isPointInFill.xhtml
2987                svg/dom/SVGGeometry-isPointInStroke.xhtml
2988
2989         * rendering/svg/RenderSVGEllipse.cpp:
2990         (WebCore::RenderSVGEllipse::shapeDependentStrokeContains): Flag
2991                 to switch between local and "global" coordinate space for hit testing.
2992         * rendering/svg/RenderSVGEllipse.h:
2993         * rendering/svg/RenderSVGPath.cpp:
2994         (WebCore::RenderSVGPath::shapeDependentStrokeContains): Flag
2995                 to switch between local and "global" coordinate space for hit testing.
2996         * rendering/svg/RenderSVGPath.h:
2997         * rendering/svg/RenderSVGRect.cpp:
2998         (WebCore::RenderSVGRect::shapeDependentStrokeContains): Flag
2999                 to switch between local and "global" coordinate space for hit testing.
3000         * rendering/svg/RenderSVGRect.h:
3001         * rendering/svg/RenderSVGShape.cpp:
3002         (WebCore::RenderSVGShape::shapeDependentStrokeContains): Flag
3003                 to switch between local and "global" coordinate space for hit testing.
3004         (WebCore::RenderSVGShape::isPointInFill): Take the winding rule given by
3005                 `fill-rule` to test if a given point is in the fill area of a path.
3006         (WebCore::RenderSVGShape::isPointInStroke): Take stroke properties into
3007                 account to check if a point is on top of the stroke area.
3008         * rendering/svg/RenderSVGShape.h:
3009         * svg/SVGGeometryElement.cpp:
3010         (WebCore::SVGGeometryElement::isPointInFill):
3011         (WebCore::SVGGeometryElement::isPointInStroke):
3012         (WebCore::SVGGeometryElement::createElementRenderer): Deleted. This is getting implemented
3013                 by inheriting classes. No need to create RenderSVGPath here.
3014         * svg/SVGGeometryElement.h:
3015         * svg/SVGGeometryElement.idl:
3016
3017 2018-05-12  Zalan Bujtas  <zalan@apple.com>
3018
3019         Use WeakPtr for m_enclosingPaginationLayer in RenderLayer
3020         https://bugs.webkit.org/show_bug.cgi?id=185566
3021         <rdar://problem/36486052>
3022
3023         Reviewed by Simon Fraser.
3024
3025         Since RenderLayer does not own the enclosing pagination layout, it should
3026         construct a weak pointer instead of holding on to a raw pointer.
3027
3028         Unable to create a reliably reproducible test case.
3029
3030         * page/mac/EventHandlerMac.mm:
3031         (WebCore::scrollableAreaForEventTarget):
3032         (WebCore::scrollableAreaForContainerNode):
3033         (WebCore::EventHandler::platformPrepareForWheelEvents):
3034         * platform/ScrollableArea.h:
3035         (WebCore::ScrollableArea::weakPtrFactory const):
3036         (WebCore::ScrollableArea::createWeakPtr): Deleted.
3037         * rendering/RenderLayer.cpp:
3038         (WebCore::RenderLayer::RenderLayer):
3039         (WebCore::RenderLayer::updatePagination):
3040         * rendering/RenderLayer.h:
3041
3042 2018-05-11  Daniel Bates  <dabates@apple.com>
3043
3044         X-Frame-Options: SAMEORIGIN needs to check all ancestor frames
3045         https://bugs.webkit.org/show_bug.cgi?id=185567
3046         <rdar://problem/40175008>
3047
3048         Reviewed by Brent Fulgham.
3049
3050         Change the behavior of "X-Frame-Options: SAMEORIGIN" to ensure that all ancestors frames
3051         are same-origin with the document that delivered this header. This prevents an intermediary
3052         malicious frame from clickjacking a child frame whose document is same-origin with the top-
3053         level frame. It also makes the behavior of X-Frame-Options in WebKit more closely match
3054         the behavior of X-Frame-Options in other browsers, including Chrome and Firefox.
3055         
3056         Currently a document delivered with "X-Frame-Options: SAMEORIGIN" must only be same-origin
3057         with the top-level frame's document in order to be displayed. This prevents clickjacking by
3058         a malicious page that embeds a page delivered with "X-Frame-Options: SAMEORIGIN". However,
3059         it does not protect against clickjacking of the "X-Frame-Options: SAMEORIGIN" page (victim)
3060         if embedded by an intermediate malicious iframe, say a "rogue ad", that was embedded in a
3061         document same origin with the victim page. We should protect against such attacks. 
3062
3063         Tests: http/tests/security/XFrameOptions/x-frame-options-ancestors-same-origin-allow.html
3064                http/tests/security/XFrameOptions/x-frame-options-ancestors-same-origin-deny.html
3065
3066         * loader/FrameLoader.cpp:
3067         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
3068
3069 2018-05-11  Daniel Bates  <dabates@apple.com>
3070
3071         [iOS] Text decoration of dragged content does not paint with opacity
3072         https://bugs.webkit.org/show_bug.cgi?id=185551
3073         <rdar://problem/40166867>
3074
3075         Reviewed by Wenson Hsieh.
3076
3077         Respect alpha when painting the text decoration for dragged content.
3078
3079         * rendering/InlineTextBox.cpp:
3080         (WebCore::InlineTextBox::MarkedTextStyle::areDecorationMarkedTextStylesEqual): Consider alpha when
3081         comparing decoration styles for equality so that we do not coalesce styles with differing alpha.
3082         (WebCore::InlineTextBox::paintMarkedTextDecoration): Respect alpha when painting dragged content.
3083
3084 2018-05-11  Nan Wang  <n_wang@apple.com>
3085
3086         AX: In role=dialog elements with aria-modal=true VoiceOver iOS/macOS can't manually focus or read dialog paragraph description text inside the modal.
3087         https://bugs.webkit.org/show_bug.cgi?id=185219
3088         <rdar://problem/39920009>
3089
3090         Reviewed by Chris Fleizach.
3091
3092         The text node descendants of a modal dialog are ignored. Fixed it by using AccessibilityObject's 
3093         node() to determine if it's the descendant of the modal dialog node.
3094
3095         Test: accessibility/aria-modal-text-descendants.html
3096
3097         * accessibility/AccessibilityObject.cpp:
3098         (WebCore::AccessibilityObject::isModalDescendant const):
3099
3100 2018-05-11  Ryosuke Niwa  <rniwa@webkit.org>
3101
3102         Tapping after CSS-based table casues an infinite loop in wordRangeFromPosition
3103         https://bugs.webkit.org/show_bug.cgi?id=185465
3104         <rdar://problem/35263057>
3105
3106         Reviewed by Antti Koivisto.
3107
3108         The bug was caused by TextIterator not emitting a line break when exiting a CSS-based table when an element
3109         with `display: table-row` has an invisible text node. Specifically, TextIterator::exitNode is never called on
3110         an element with `table-cell: row` when m_node is a text node with whitespaces which appears after an element
3111         with `display: table-cell`.
3112
3113         For example, for a tree structure like:
3114         table-row (R)
3115           table-cell (C)
3116             "text" (1)
3117           " " (2)
3118         Getting out of (C) would result in moving onto (2) without generating a line break for (R).
3119
3120         When this happens in nextBoundary as it tries to find the end of the last word in the table cell, we end up
3121         finding the end of the document as the end of the word. As a result, nextWordBoundaryInDirection, the caller
3122         of nextBoundary, ends up infinite looping between the positon at the end of the document and the position
3123         immediately before the last word in the last table cell when it traverses words backwards.
3124
3125         This patch fixes the hang by addressing this root cause in TextIterator. Namely, TextIterator now generates
3126         a line break when exiting a block while walking up ancestors in TextIterator::advance().
3127
3128         Tests: editing/selection/tapping-in-table-at-end-of-document.html
3129                editing/text-iterator/table-at-end-of-document.html
3130
3131         * editing/TextIterator.cpp:
3132         (WebCore::TextIterator::advance): Fixed the bug.
3133         (WebCore::shouldEmitNewlineAfterNode): Do generate a new line at the end of a document when we're trying to
3134         generate every visible poitions even there are no renderers beyond this point. e.g. a position inside the
3135         last cell of a table at the end of a document hits this condition.
3136         (WebCore::shouldEmitExtraNewlineForNode): Don't emit a line break when the render box's height is 0px
3137         to avoid generating many empty lines for empty paragraph and header elements (this function is used to generate
3138         a blank line between p's and h1/h2/...'s).
3139         (WebCore::TextIterator::exitNode):
3140
3141 2018-05-11  Dean Jackson  <dino@apple.com>
3142
3143         System preview badge doesn't show on <picture> elements
3144         https://bugs.webkit.org/show_bug.cgi?id=185559
3145         <rdar://problem/40150066>
3146
3147         Reviewed by Tim Horton.
3148
3149         We should also identify <img>s that are the child of a <picture>
3150         contained inside the appropriate <a> element.
3151
3152         Tested internally, since the badge is platform specific.
3153
3154         * html/HTMLImageElement.cpp:
3155         (WebCore::HTMLImageElement::isSystemPreviewImage const): Add logic
3156         to look for <picture> parents.
3157
3158 2018-05-11  Chris Dumez  <cdumez@apple.com>
3159
3160         REGRESSION (async policy delegate): Revoking an object URL immediately after triggering download breaks file download
3161         https://bugs.webkit.org/show_bug.cgi?id=185531
3162         <rdar://problem/39909589>
3163
3164         Reviewed by Geoffrey Garen.
3165
3166         Whenever we start an asynchronous navigation policy decision for a blob URL, create a temporary
3167         blob URL pointing to the same data, and update the request's URL. This way, if the page's JS revokes
3168         the URL during the policy decision, the load will still succeed.
3169
3170         Test: fast/dom/HTMLAnchorElement/anchor-file-blob-download-then-revoke.html
3171
3172         * loader/DocumentLoader.cpp:
3173         (WebCore::DocumentLoader::willSendRequest):
3174         * loader/FrameLoader.cpp:
3175         (WebCore::FrameLoader::loadURL):
3176         (WebCore::FrameLoader::load):
3177         (WebCore::FrameLoader::loadPostRequest):
3178         * loader/PolicyChecker.cpp:
3179         (WebCore::PolicyChecker::extendBlobURLLifetimeIfNecessary const):
3180         (WebCore::PolicyChecker::checkNavigationPolicy):
3181         (WebCore::PolicyChecker::checkNewWindowPolicy):
3182         * loader/PolicyChecker.h:
3183
3184 2018-05-11  Antti Koivisto  <antti@apple.com>
3185
3186         LinkLoader fails to remove CachedResourceClient in some cases
3187         https://bugs.webkit.org/show_bug.cgi?id=185553
3188         <rdar://problem/36879656>
3189
3190         Reviewed by Geoffrey Garen.
3191
3192         Test: http/tests/preload/link-preload-client-remove.html
3193
3194         * loader/LinkLoader.cpp:
3195         (WebCore::LinkLoader::loadLink):
3196
3197         If there is a link preload already in progress, we fail to clear the client for the ongoing load.
3198         This may leave the CachedResource client map in a bad state.
3199
3200 2018-05-11  Charles Vazac  <cvazac@gmail.com>
3201
3202         Runtime feature flag for Server-Timing
3203         https://bugs.webkit.org/show_bug.cgi?id=184758
3204
3205         Reviewed by Youenn Fablet.
3206
3207         * Source/WebCore/CMakeLists.txt: Added reference to PerformanceServerTiming.idl.
3208         * Source/WebCore/DerivedSources.make: Added reference to PerformanceServerTiming.idl.
3209         * Source/WebCore/Sources.txt: Added reference to PerformanceServerTiming.cpp and JSPerformanceServerTiming.cpp.
3210         * Source/WebCore/WebCore.xcodeproj/project.pbxproj: Added references to PerformanceServerTiming.cpp, PerformanceServerTiming.h, and PerformanceServerTiming.idl.
3211         * Source/WebCore/bindings/js/WebCoreBuiltinNames.h: Added PerformanceServerTiming.
3212         * Source/WebCore/page/PerformanceResourceTiming.h: Added serverTiming member.
3213         * Source/WebCore/page/PerformanceResourceTiming.idl: Added serverTiming attribute.
3214         * Source/WebCore/page/PerformanceServerTiming.cpp: Added.
3215         * Source/WebCore/page/PerformanceServerTiming.h: Added.
3216         * Source/WebCore/page/PerformanceServerTiming.idl: Added.
3217
3218 2018-05-11  Brady Eidson  <beidson@apple.com>
3219
3220         Make sure history navigations reuse the existing process when necessary.
3221         <rdar://problem/39746516> and https://bugs.webkit.org/show_bug.cgi?id=185532
3222
3223         Reviewed by Ryosuke Niwa.
3224
3225         Covered by new API tests.
3226
3227         In WebCore-land, make sure *all* NavigationActions to a back/forward item are tagged with
3228         the item identifier.
3229
3230         * history/HistoryItem.cpp:
3231         (WebCore::HistoryItem::HistoryItem):
3232         (WebCore::HistoryItem::logString const):
3233         * history/HistoryItem.h:
3234
3235         * loader/FrameLoader.cpp:
3236         (WebCore::FrameLoader::loadDifferentDocumentItem):
3237
3238         * loader/NavigationAction.cpp:
3239         (WebCore::NavigationAction::setTargetBackForwardItem):
3240
3241         * loader/NavigationAction.h:
3242         (WebCore::NavigationAction::targetBackForwardItemIdentifier const):
3243
3244 2018-05-11  Yacine Bandou  <yacine.bandou_ext@softathome.com>
3245
3246         [EME][GStreamer] Handle the protection event in MediaPlayerPrivate
3247         https://bugs.webkit.org/show_bug.cgi?id=185535
3248
3249         Reviewed by Xabier Rodriguez-Calvar.
3250
3251         This patch is based on this calvaris's commit
3252         https://github.com/WebPlatformForEmbedded/WPEWebKit/commit/d966168b0d2b65f9ca9415426e26d3752c78b03e
3253
3254         It adds a handler for the protection event in MediaPalyerPrivateGStreamerBase, it extracts the InitData from the event
3255         and sends the encrypted event to JS via HTMLMediaElement.
3256         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3257         (WebCore::MediaPlayerPrivateGStreamerBase::initializationDataEncountered):
3258         (WebCore::MediaPlayerPrivateGStreamerBase::handleProtectionEvent):
3259         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
3260         * platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h: Add a new type InitData.
3261
3262 2018-05-11  Basuke Suzuki  <Basuke.Suzuki@sony.com>
3263
3264         [Curl] Make the cipher suites, the signing algorithms and the curve lists configurable.
3265         https://bugs.webkit.org/show_bug.cgi?id=185139
3266
3267         Add interface to configure the cipher suites, the signing algorithms and the curve lists 
3268         used by OpenSSL and libcurl to exchange, to sign or to verify keys.
3269
3270         Reviewed by Youenn Fablet.
3271
3272         No new tests in public. Have tested internally.
3273
3274         * platform/network/curl/CurlContext.cpp:
3275         (WebCore::CurlHandle::setSslCipherList):
3276         * platform/network/curl/CurlContext.h:
3277         * platform/network/curl/CurlRequest.cpp:
3278         (WebCore::CurlRequest::setupTransfer):
3279         (WebCore::CurlRequest::willSetupSslCtx):
3280         * platform/network/curl/CurlSSLHandle.cpp:
3281         (WebCore::CurlSSLHandle::getCACertPathEnv):
3282         * platform/network/curl/CurlSSLHandle.h:
3283         (WebCore::CurlSSLHandle::getCipherList const):
3284         (WebCore::CurlSSLHandle::getSignatureAlgorithmsList const):
3285         (WebCore::CurlSSLHandle::getCurvesList const):
3286         (WebCore::CurlSSLHandle::setCipherList):
3287         (WebCore::CurlSSLHandle::setSignatureAlgorithmsList):
3288         (WebCore::CurlSSLHandle::setCurvesList):
3289         (WebCore::CurlSSLHandle::getCACertPath const):
3290         (WebCore::CurlSSLHandle::setCACertPath):
3291         * platform/network/curl/CurlSSLVerifier.cpp:
3292         (WebCore::CurlSSLVerifier::CurlSSLVerifier):
3293
3294 2018-05-10  Daniel Bates  <dabates@apple.com>
3295
3296         Use PlatformStrategies to switch between WebKit and WebKitLegacy checking of CSP frame-ancestors and X-Frame-Options
3297         https://bugs.webkit.org/show_bug.cgi?id=185412
3298
3299         Reviewed by Ryosuke Niwa.
3300
3301         Consolidate the knowledge on how to determine whether security checks were performed on a ResourceResponse
3302         into LoaderStrategy::havePerformedSecurityChecks() (default implementation returns false) and query it
3303         to determine whether CSP frame-ancestors and X-Frame-Options need to be checked for a ResourceResponse.
3304
3305         Additionally, rename LoaderStrategy::isDoingLoadingSecurityChecks() to shouldPerformSecurityChecks()
3306         for consistency with havePerformedSecurityChecks(). Querying shouldPerformSecurityChecks() answers the
3307         question of whether the loader strategy is responsible for performing security checks when building up
3308         a ResourceRequest to have the loader strategy load. And LoaderStrategy::havePerformedSecurityChecks()
3309         is used to determine whether the loader strategy performed these security checks for a given ResourceResponse.
3310
3311         * inspector/agents/InspectorNetworkAgent.cpp:
3312         (WebCore::InspectorNetworkAgent::didReceiveResponse):
3313         (WebCore::InspectorNetworkAgent::didFinishLoading):
3314         (WebCore::isResponseProbablyComingFromNetworkProcess): Deleted.
3315         * loader/DocumentLoader.cpp:
3316         (WebCore::DocumentLoader::responseReceived):
3317         * loader/DocumentThreadableLoader.cpp:
3318         (WebCore::shouldPerformSecurityChecks):
3319         (WebCore::DocumentThreadableLoader::shouldSetHTTPHeadersToKeep const):
3320         (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
3321         (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
3322         (WebCore::DocumentThreadableLoader::redirectReceived):
3323         (WebCore::DocumentThreadableLoader::didFail):
3324         (WebCore::DocumentThreadableLoader::loadRequest):
3325         (WebCore::isDoingSecurityChecksInNetworkProcess): Deleted.
3326         (WebCore::isResponseComingFromNetworkProcess): Deleted.
3327         * loader/LoaderStrategy.cpp:
3328         * loader/LoaderStrategy.h:
3329         * page/Settings.yaml: Remove setting networkProcessCSPFrameAncestorsCheckingEnabled as we now make
3330         use of the loader strategy to determine whether to perform CSP frame-ancestors and X-Frame-Options
3331         checking in DocumentLoader.
3332         * platform/network/ResourceResponseBase.h:
3333         (WebCore::ResourceResponseBase::setSource): Added an ASSERT to catch the programming error of setting
3334         source to ResourceResponse::Source::Unknown. This source type represents an uninitialized ResourceResponse.
3335
3336 2018-05-10  Tim Horton  <timothy_horton@apple.com>
3337
3338         Lookup sometimes shows a second yellow highlight on top of WebKit's TextIndicator
3339         https://bugs.webkit.org/show_bug.cgi?id=185538
3340         <rdar://problem/38817825>
3341
3342         Reviewed by Sam Weinig.
3343
3344         * editing/mac/DictionaryLookup.mm:
3345         (WebCore::showPopupOrCreateAnimationController):
3346         Options can be nil, in which case we can't mutableCopy it and add
3347         LUTermOptionDisableSearchTermIndicator. Instead, create a new dictionary,
3348         and add the items from options, if it's not nil.
3349
3350 2018-05-10  Matt Baker  <mattbaker@apple.com>
3351
3352         Web Inspector: ASSERT_NOT_REACHED in PageDebuggerAgent::didAddEventListener when page adds attribute event listener
3353         https://bugs.webkit.org/show_bug.cgi?id=181580
3354         <rdar://problem/36461309>
3355
3356         Reviewed by Brian Burg.
3357
3358         EventTarget should pass newly added EventListeners to InspectorInstrumentation,
3359         instead of PageDebuggerAgent assuming the last item in the EventListenerVector
3360         is the most recently added listener. This assumption does not hold when
3361         the new listener replaces an existing listener.
3362
3363         * dom/EventTarget.cpp:
3364         (WebCore::EventTarget::addEventListener):
3365         (WebCore::EventTarget::setAttributeEventListener):
3366
3367         * inspector/InspectorInstrumentation.cpp:
3368         (WebCore::InspectorInstrumentation::didAddEventListenerImpl):
3369
3370         * inspector/InspectorInstrumentation.h:
3371         (WebCore::InspectorInstrumentation::didAddEventListener):
3372
3373         * inspector/agents/page/PageDebuggerAgent.cpp:
3374         (WebCore::PageDebuggerAgent::didAddEventListener):
3375         * inspector/agents/page/PageDebuggerAgent.h:
3376
3377 2018-05-10  Chris Dumez  <cdumez@apple.com>
3378
3379         'Cross-Origin-Options header implementation follow-up
3380         https://bugs.webkit.org/show_bug.cgi?id=185520
3381
3382         Reviewed by Ryosuke Niwa.
3383
3384         * dom/Document.cpp:
3385         * dom/Document.h:
3386         * loader/FrameLoader.cpp:
3387         (WebCore::FrameLoader::didBeginDocument):
3388         Using isNull() check is sufficient here as the header parsing
3389         function will do the right thing when passed the empty string.
3390         Also set the options directly on the window instead of the
3391         document. The window is guaranteed to have been constructed
3392         by then because didBeginDocument() is called DocumentWriter::begin()
3393         which calls Document::createDOMWindow() or Document::takeDOMWindowFrom().
3394
3395         * page/AbstractDOMWindow.cpp:
3396         (WebCore::AbstractDOMWindow::AbstractDOMWindow):
3397         * page/AbstractDOMWindow.h:
3398         * page/DOMWindow.cpp:
3399         (WebCore::DOMWindow::DOMWindow):
3400         (WebCore::DOMWindow::didSecureTransitionTo):
3401         * page/RemoteDOMWindow.cpp:
3402         (WebCore::RemoteDOMWindow::RemoteDOMWindow):
3403         * page/RemoteDOMWindow.h:
3404         CrossOriginOptions are now stored only on the Window, not the Document.
3405
3406         * platform/network/HTTPParsers.cpp:
3407         (WebCore::parseCrossOriginOptionsHeader):
3408         Drop strippedHeader local variable as it is not strictly needed.
3409
3410 2018-05-10  Tim Horton  <timothy_horton@apple.com>
3411
3412         Fix the build after r231393
3413         https://bugs.webkit.org/show_bug.cgi?id=185519
3414         <rdar://problem/40131741>
3415
3416         Reviewed by Simon Fraser.
3417
3418         * Configurations/WebCore.xcconfig:
3419
3420 2018-05-10  Eric Carlson  <eric.carlson@apple.com>
3421
3422         Log missing cues correctly
3423         https://bugs.webkit.org/show_bug.cgi?id=185499
3424         <rdar://problem/40113821>
3425
3426         Reviewed by Daniel Bates.
3427
3428         No new tests, tested manually.
3429
3430         * html/track/InbandGenericTextTrack.cpp:
3431         (WebCore::InbandGenericTextTrack::removeGenericCue): Log the cue we searched for, not
3432         the NULL cue.
3433
3434 2018-05-10  Zalan Bujtas  <zalan@apple.com>
3435
3436         [LFC] Implement height computation for non-replaced inflow elements.
3437         https://bugs.webkit.org/show_bug.cgi?id=185474
3438
3439         Reviewed by Antti Koivisto.
3440
3441         Initial implementation. Does not cover all the cases.
3442
3443         * layout/FormattingContext.cpp:
3444         (WebCore::Layout::FormattingContext::computeHeight const):
3445         * layout/FormattingContext.h:
3446         * layout/blockformatting/BlockFormattingContext.cpp:
3447         (WebCore::Layout::BlockFormattingContext::layout const):
3448         (WebCore::Layout::BlockFormattingContext::computeInFlowHeight const):
3449         (WebCore::Layout::BlockFormattingContext::computeInFlowNonReplacedHeight const):
3450         * layout/blockformatting/BlockFormattingContext.h:
3451         * layout/blockformatting/BlockMarginCollapse.cpp:
3452         (WebCore::Layout::collapsedMarginBottomFromLastChild):
3453         (WebCore::Layout::BlockMarginCollapse::isMarginBottomCollapsedWithParent):
3454         (WebCore::Layout::BlockMarginCollapse::isMarginTopCollapsedWithParentMarginBottom):
3455         (WebCore::Layout::isMarginBottomCollapsedWithParent): Deleted.
3456         * layout/blockformatting/BlockMarginCollapse.h:
3457         * layout/inlineformatting/InlineFormattingContext.cpp:
3458         (WebCore::Layout::InlineFormattingContext::computeInFlowHeight const):
3459         * layout/inlineformatting/InlineFormattingContext.h:
3460         * layout/layouttree/LayoutBox.cpp:
3461         (WebCore::Layout::Box::isReplaced const):
3462         * layout/layouttree/LayoutBox.h:
3463
3464 2018-05-10  Thibault Saunier  <tsaunier@igalia.com>
3465
3466         [GTK] Implement ImageBuffer::toBGRAData
3467         https://bugs.webkit.org/show_bug.cgi?id=185511
3468
3469         Reviewed by Michael Catanzaro.
3470
3471         This was never implemented but will be required for the MediaStream API
3472         tests.
3473
3474         * platform/graphics/ImageBuffer.cpp:
3475         (WebCore::ImageBuffer::toBGRAData const):
3476         * platform/graphics/cg/ImageBufferCG.cpp:
3477         (WebCore::ImageBuffer::toBGRAData const):
3478         * platform/graphics/gtk/ImageBufferGtk.cpp:
3479         (WebCore::ImageBuffer::toBGRAData const):
3480
3481 2018-05-10  Yacine Bandou  <yacine.bandou_ext@softathome.com>
3482
3483         [EME][GStreamer] Add a handler for GStreamer protection event
3484         https://bugs.webkit.org/show_bug.cgi?id=185245
3485
3486         Reviewed by Xabier Rodriguez-Calvar.
3487
3488         Qtdemux sends the protection event when encountered a new PSSH box (encrypted content).
3489
3490         The Decryptor is moved from AppendPipeline to PlaybackPipeline (see https://bugs.webkit.org/show_bug.cgi?id=181855),
3491         thus the protection event is no longer handled because the Decryptor is not in the same pipeline as qtdemux.
3492
3493         AppendPipeline: httpsrc-->qtdemux-->appsink
3494         PlaybackPipeline: appsrc-->parser--> decryptor-->decoder-->sink
3495
3496         This patch attaches a probe to the sink pad of the appsink in the appendPipeline in order to
3497         catch and manage the protection event.
3498
3499         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
3500         (WebCore::AppendPipeline::AppendPipeline):
3501         (WebCore::AppendPipeline::~AppendPipeline):
3502         (WebCore::appendPipelineAppsinkPadEventProbe):
3503         * platform/graphics/gstreamer/mse/AppendPipeline.h:
3504         (WebCore::AppendPipeline::playerPrivate):
3505
3506 2018-05-10  Yacine Bandou  <yacine.bandou_ext@softathome.com>
3507
3508         [EME][GStreamer] Move the decryptor from AppendPipeline to PlaybackPipeline.
3509         https://bugs.webkit.org/show_bug.cgi?id=181855
3510
3511         Reviewed by Xabier Rodriguez-Calvar.
3512
3513         The goal of this move is to handle the limitation of SVP (Secure Video Path) memory size.
3514
3515         When the decryptor is in the AppendPipeline and we use SVP, we buffer in MediaSource queue
3516         the decrypted GstBuffers that are in SVP memory.
3517         This behavior cause an out-of-memory error, because we are limited in SVP memory size.
3518
3519         By moving the decryptor in PlaybackPipeline, we avoid to buffer the decrypted GstBuffers
3520         which use the SVP memory and we buffer the encrypted GstBuffers that are in system memory.
3521
3522         This new architecture also allows to start the buffering before obtaining the DRM license
3523         and it makes easier to manage dynamic change of the license or Key.
3524
3525         The decryptor is auto plugged by GStreamer playbin in PlaybackPipeline.
3526
3527         SVP: Secure Video Path also named trusted or protected video path, it is a memory which is
3528         protected by a hardware access control engine, it is not accessible to other unauthorised
3529         software or hardware components.
3530
3531         Tests:
3532             media/encrypted-media/clearKey/clearKey-cenc-audio-playback-mse.html
3533             media/encrypted-media/clearKey/clearKey-cenc-video-playback-mse.html
3534
3535         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
3536         (webkitMediaCommonEncryptionDecryptSinkEventHandler):
3537         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
3538         (WebCore::dumpAppendState):
3539         (WebCore::AppendPipeline::AppendPipeline):
3540         (WebCore::AppendPipeline::handleNeedContextSyncMessage):
3541         (WebCore::AppendPipeline::handleAppsrcNeedDataReceived):
3542         (WebCore::AppendPipeline::setAppendState):
3543         (WebCore::AppendPipeline::parseDemuxerSrcPadCaps):
3544         (WebCore::AppendPipeline::appsinkNewSample):
3545         (WebCore::AppendPipeline::connectDemuxerSrcPadToAppsinkFromAnyThread):
3546         (WebCore::AppendPipeline::disconnectDemuxerSrcPadFromAppsinkFromAnyThread):
3547         (WebCore::appendPipelineElementMessageCallback): Deleted.
3548         (WebCore::AppendPipeline::handleElementMessage): Deleted.
3549         (WebCore::AppendPipeline::dispatchPendingDecryptionStructure): Deleted.
3550         (WebCore::AppendPipeline::dispatchDecryptionStructure): Deleted.
3551         * platform/graphics/gstreamer/mse/AppendPipeline.h:
3552         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
3553         (WebCore::MediaPlayerPrivateGStreamerMSE::attemptToDecryptWithInstance):
3554         * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:
3555
3556 2018-05-09  Nan Wang  <n_wang@apple.com>
3557
3558         AX: VoiceOver iframe scrolling focus jumping bug
3559         https://bugs.webkit.org/show_bug.cgi?id=176615
3560         <rdar://problem/34333067>
3561
3562         Reviewed by Chris Fleizach.
3563
3564         Scrolling to make elements visible is not working correctly for elements inside an
3565         offscreen iframe. Fixed it by using RenderLayer::scrollRectToVisible() to handle
3566         scrolling more properly.
3567
3568         Test: accessibility/scroll-to-make-visible-iframe-offscreen.html
3569
3570         * accessibility/AccessibilityObject.cpp:
3571         (WebCore::AccessibilityObject::scrollToMakeVisible const):
3572
3573 2018-05-09  Joanmarie Diggs  <jdiggs@igalia.com>
3574
3575         AX: accessibleNameForNode should simplify whitespace when using innerText
3576         https://bugs.webkit.org/show_bug.cgi?id=185498
3577
3578         Reviewed by Chris Fleizach.
3579
3580         Test: accessibility/text-alternative-calculation-from-unrendered-table.html
3581
3582         Call simplifyWhiteSpace() before returning the innerText value.
3583
3584         * accessibility/AccessibilityNodeObject.cpp:
3585         (WebCore::accessibleNameForNode):
3586
3587 2018-05-09  Chris Dumez  <cdumez@apple.com>
3588
3589         Add initial support for 'Cross-Origin-Options' HTTP response header
3590         https://bugs.webkit.org/show_bug.cgi?id=184996
3591         <rdar://problem/39664620>
3592
3593         Reviewed by Geoff Garen.
3594
3595         Add initial support for 'Cross-Origin-Options' HTTP response header behind an experimental
3596         feature flag, on by default. When the HTTP server services this HTTP response header for a
3597         main resource, we'll set these options on the corresponding Document. This will impact the
3598         behavior of the Document's associated Window API when cross-origin.
3599
3600         The HTTP header has 3 possible values:
3601         - allow: This is the default. Regular cross-origin Window API is available.
3602         - allow-postmessage: Only postMessage() is available on a cross-origin window, trying to
3603           access anything else will throw a SecurityError.
3604         - deny: Trying to do anything with a cross-origin window will throw a SecurityError.
3605
3606         The header has no effect when accessing same origin windows.
3607
3608         Note that on cross-origin access from Window A to Window B, we check the cross-origin
3609         options for both Window A and Window B and use the lowest common denominator as effective
3610         cross-origin options for the access. So if Window A has 'Cross-Origin-Options: deny' and
3611         tries to call postMessage() on Window B which has 'Cross-Origin-Options: allow-postmessage',
3612         we will throw a SecurityError. This is because Window A's more restrictive options (deny)
3613         apply.
3614
3615         Tests: http/wpt/cross-origin-options/allow-postmessage-from-deny.html
3616                http/wpt/cross-origin-options/allow-postmessage.html
3617                http/wpt/cross-origin-options/cross-origin-options-header.html
3618
3619         * bindings/js/JSDOMBindingSecurity.cpp:
3620         (WebCore::BindingSecurity::shouldAllowAccessToDOMWindowGivenMinimumCrossOriginOptions):
3621         * bindings/js/JSDOMBindingSecurity.h:
3622         * bindings/js/JSDOMWindowCustom.cpp:
3623         (WebCore::effectiveCrossOriginOptionsForAccess):
3624         (WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):
3625         (WebCore::JSDOMWindow::getOwnPropertySlot):
3626         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
3627         (WebCore::addCrossOriginWindowPropertyNames):
3628         (WebCore::addScopedChildrenIndexes):
3629         (WebCore::addCrossOriginWindowOwnPropertyNames):
3630         (WebCore::JSDOMWindow::getOwnPropertyNames):
3631         * bindings/js/JSDOMWindowCustom.h:
3632         * bindings/js/JSRemoteDOMWindowCustom.cpp:
3633         (WebCore::JSRemoteDOMWindow::getOwnPropertySlot):
3634         (WebCore::JSRemoteDOMWindow::getOwnPropertySlotByIndex):
3635         (WebCore::JSRemoteDOMWindow::getOwnPropertyNames):
3636         * bindings/scripts/CodeGeneratorJS.pm:
3637         (GenerateAttributeGetterBodyDefinition):
3638         (GetCrossOriginsOptionsFromExtendedAttributeValue):
3639         (GenerateAttributeSetterBodyDefinition):
3640         (GenerateOperationBodyDefinition):
3641         * bindings/scripts/IDLAttributes.json:
3642         * dom/Document.cpp:
3643         (WebCore::Document::setCrossOriginOptions):
3644         * dom/Document.h:
3645         (WebCore::Document::crossOriginOptions const):
3646         * loader/FrameLoader.cpp:
3647         (WebCore::FrameLoader::didBeginDocument):
3648         * page/AbstractDOMWindow.cpp:
3649         (WebCore::AbstractDOMWindow::AbstractDOMWindow):
3650         * page/AbstractDOMWindow.h:
3651         (WebCore::AbstractDOMWindow::crossOriginOptions):
3652         (WebCore::AbstractDOMWindow::setCrossOriginOptions):
3653         * page/DOMWindow.cpp:
3654         (WebCore::DOMWindow::DOMWindow):
3655         (WebCore::DOMWindow::didSecureTransitionTo):
3656         * page/DOMWindow.idl:
3657         * page/Frame.h:
3658         * page/RemoteDOMWindow.cpp:
3659         (WebCore::RemoteDOMWindow::RemoteDOMWindow):
3660         * page/RemoteDOMWindow.h:
3661         * page/Settings.yaml:
3662         * platform/network/HTTPHeaderNames.in:
3663         * platform/network/HTTPParsers.cpp:
3664         (WebCore::parseCrossOriginOptionsHeader):
3665         * platform/network/HTTPParsers.h:
3666
3667 2018-05-09  Ryosuke Niwa  <rniwa@webkit.org>
3668
3669         Release assert in TreeScopeOrderedMap::remove via HTMLImageElement::removedFromAncestor
3670         https://bugs.webkit.org/show_bug.cgi?id=185493
3671
3672         Reviewed by Brent Fulgham.
3673
3674         Fixed the bug that HTMLImageElement::removedFromAncestor and HTMLMapElement::removedFromAncestor
3675         were calling removeImageElementByUsemap on the document instead of the shadow tree from which it was removed.
3676
3677         Test: fast/images/imagemap-in-shadow-tree-removed.html
3678
3679         * html/HTMLImageElement.cpp:
3680         (WebCore::HTMLImageElement::removedFromAncestor):
3681         * html/HTMLMapElement.cpp:
3682         (WebCore::HTMLMapElement::removedFromAncestor):
3683
3684 2018-05-09  Joanmarie Diggs  <jdiggs@igalia.com>
3685
3686         AX: Hidden nodes which are not directly referenced should not participate name/description from content
3687         https://bugs.webkit.org/show_bug.cgi?id=185478
3688
3689         Reviewed by Chris Fleizach.
3690
3691         Add a check to AccessibilityNodeObject::textUnderElement() and return early
3692         if the node is hidden, not referenced by aria-labelledby or aria-describedby,
3693         not an HTMLLabelElement, and not fallback content for an HTMLCanvasElement.
3694
3695         Test: accessibility/text-alternative-calculation-hidden-nodes.html
3696
3697         * accessibility/AccessibilityNodeObject.cpp:
3698         (WebCore::AccessibilityNodeObject::textUnderElement const):
3699
3700 2018-05-09  Eric Carlson  <eric.carlson@apple.com>
3701
3702         Update MediaSession to use release logging
3703         https://bugs.webkit.org/show_bug.cgi?id=185376
3704         <rdar://problem/40022203>
3705
3706         Reviewed by Youenn Fablet.
3707
3708         No new tests, tested manually.
3709
3710         * Modules/mediastream/MediaStream.h: hostingDocument() doesn't need to return a const Document.
3711         * Modules/webaudio/AudioContext.cpp:
3712         (WebCore::AudioContext::hostingDocument const): Ditto.
3713         * Modules/webaudio/AudioContext.h:
3714
3715         * html/HTMLMediaElement.h: Ditto.
3716
3717         * html/MediaElementSession.cpp:
3718         (WebCore::MediaElementSession::MediaElementSession):
3719         (WebCore::MediaElementSession::addBehaviorRestriction):
3720         (WebCore::MediaElementSession::removeBehaviorRestriction):
3721         (WebCore::MediaElementSession::dataLoadingPermitted const):
3722         (WebCore::MediaElementSession::fullscreenPermitted const):
3723         (WebCore::MediaElementSession::pageAllowsDataLoading const):
3724         (WebCore::MediaElementSession::pageAllowsPlaybackAfterResuming const):
3725         (WebCore::MediaElementSession::canShowControlsManager const):
3726         (WebCore::MediaElementSession::showPlaybackTargetPicker):
3727         (WebCore::MediaElementSession::hasWirelessPlaybackTargets const):
3728         (WebCore::MediaElementSession::wirelessVideoPlaybackDisabled const):
3729         (WebCore::MediaElementSession::setWirelessVideoPlaybackDisabled):
3730         (WebCore::MediaElementSession::setHasPlaybackTargetAvailabilityListeners):
3731         (WebCore::MediaElementSession::externalOutputDeviceAvailableDidChange):
3732         (WebCore::MediaElementSession::setShouldPlayToPlaybackTarget):
3733         (WebCore::MediaElementSession::mediaEngineUpdated):
3734         (WebCore::MediaElementSession::willLog const): Deleted.
3735         (WebCore::MediaElementSession::logger const): Deleted.
3736         (WebCore::MediaElementSession::logIdentifier const): Deleted.
3737         (WebCore::MediaElementSession::logChannel const): Deleted.
3738         * html/MediaElementSession.h:
3739
3740         * platform/audio/PlatformMediaSession.cpp:
3741         (WebCore::nextLogIdentifier):
3742         (WebCore::convertEnumerationToString):
3743         (WebCore::PlatformMediaSession::PlatformMediaSession):
3744         (WebCore::PlatformMediaSession::setState):
3745         (WebCore::PlatformMediaSession::beginInterruption):
3746         (WebCore::PlatformMediaSession::endInterruption):
3747         (WebCore::PlatformMediaSession::clientWillBeginAutoplaying):
3748         (WebCore::PlatformMediaSession::clientWillPausePlayback):
3749         (WebCore::PlatformMediaSession::pauseSession):
3750         (WebCore::PlatformMediaSession::stopSession):
3751         (WebCore::PlatformMediaSession::clientDataBufferingTimerFired):
3752         (WebCore::PlatformMediaSession::logChannel const):
3753         (WebCore::stateName): Deleted.
3754         (WebCore::interruptionName): Deleted.
3755         * platform/audio/PlatformMediaSession.h:
3756         (WTF::LogArgument<WebCore::PlatformMediaSession::State>::toString):
3757         (WTF::LogArgument<WebCore::PlatformMediaSession::InterruptionType>::toString):
3758
3759 2018-05-09  Thibault Saunier  <tsaunier@igalia.com>
3760
3761         [GStreamer] Never call updateTracks if running on legacy pipeline
3762         https://bugs.webkit.org/show_bug.cgi?id=184581
3763
3764         This makes sure failling code path is never reached in the conditions where it should not have been reached.
3765
3766         Reviewed by Philippe Normand.
3767
3768         Re enables all tests that were disabled after fixing.
3769
3770         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3771         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
3772
3773 2018-05-09  Daniel Bates  <dabates@apple.com>
3774
3775         REGRESSION (r231479): http/tests/appcache/x-frame-options-prevents-framing.php is timing out
3776         https://bugs.webkit.org/show_bug.cgi?id=185443
3777         <rdar://problem/40100660>
3778
3779         Reviewed by Andy Estes.
3780
3781         Following r231479 when using WebKit2 and Restricted HTTP Response Access is enabled (enabled in
3782         WebKitTestRunner) we only check the CSP frame-ancestors directive and X-Frame-Options in
3783         NetworkProcess. We need to check these security requirements in WebContent process whenever
3784         we are performing a substitute data load, such as for app cache, as these loads do not go
3785         through NetworkProcess.
3786
3787         * loader/DocumentLoader.cpp:
3788         (WebCore::DocumentLoader::responseReceived):
3789
3790 2018-05-09  Justin Fan  <justin_fan@apple.com>
3791
3792         Hooked up ASTC support in WebGL; requires OpenGL ES 3 context to work. 
3793         https://bugs.webkit.org/show_bug.cgi?id=185272
3794         <rdar://problem/15745737>
3795
3796         Reviewed by Dean Jackson.
3797
3798         Also added in Khronos' ASTC test from version 1.0.4 beta of their conformance test suite,
3799         although again, this requires OpenGL ES 3 context for WebKit to detect proper support.
3800
3801         Test: fast/canvas/webgl/webgl-compressed-texture-astc.html
3802
3803         * DerivedSources.make:
3804         * Sources.txt:
3805         * WebCore.xcodeproj/project.pbxproj:
3806         * bindings/js/JSDOMConvertWebGL.cpp:
3807         (WebCore::convertToJSValue):
3808         * html/canvas/WebGL2RenderingContext.cpp:
3809         (WebCore::WebGL2RenderingContext::getExtension):
3810         (WebCore::WebGL2RenderingContext::getSupportedExtensions):
3811         * html/canvas/WebGLCompressedTextureASTC.cpp: Added.
3812         (WebCore::WebGLCompressedTextureASTC::WebGLCompressedTextureASTC):
3813         (WebCore::WebGLCompressedTextureASTC::getName const):
3814         (WebCore::WebGLCompressedTextureASTC::supported):
3815         (WebCore::WebGLCompressedTextureASTC::getSupportedProfiles):
3816         * html/canvas/WebGLCompressedTextureASTC.h: Added.
3817         * html/canvas/WebGLCompressedTextureASTC.idl: Added.
3818         * html/canvas/WebGLExtension.h:
3819         * html/canvas/WebGLRenderingContext.cpp:
3820         (WebCore::WebGLRenderingContext::getExtension):
3821         (WebCore::WebGLRenderingContext::getSupportedExtensions):
3822         * html/canvas/WebGLRenderingContextBase.cpp:
3823         (WebCore::WebGLRenderingContextBase::validateCompressedTexFuncData):
3824         (WebCore::WebGLRenderingContextBase::validateCompressedTexDimensions):
3825         * html/canvas/WebGLRenderingContextBase.h:
3826         * platform/graphics/Extensions3D.h:
3827
3828 2018-05-09  Youenn Fablet  <youenn@apple.com>
3829
3830         Allow WebResourceLoader to cancel a load served from a service worker
3831         https://bugs.webkit.org/show_bug.cgi?id=185274
3832
3833         Reviewed by Chris Dumez.
3834
3835         Add support for cancelling a fetch from WebProcess to service worker process.
3836         Use FetchIdentifier instead of uint64_t.
3837
3838         * Modules/fetch/FetchIdentifier.h: Added.
3839         * WebCore.xcodeproj/project.pbxproj:
3840         * workers/service/context/ServiceWorkerFetch.h:
3841         * workers/service/context/ServiceWorkerThreadProxy.cpp:
3842         (WebCore::ServiceWorkerThreadProxy::startFetch):
3843         (WebCore::ServiceWorkerThreadProxy::cancelFetch):
3844         * workers/service/context/ServiceWorkerThreadProxy.h:
3845
3846 2018-05-09  Thibault Saunier  <tsaunier@igalia.com>
3847
3848         [GStreamer] Fix style issue in MediaPlayerPrivateGStreamer
3849         https://bugs.webkit.org/show_bug.cgi?id=185479
3850
3851         Reviewed by Philippe Normand.
3852
3853         ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:114:  Multi line control clauses should use braces.  [whitespace/braces] [4]
3854         ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:194:  Multi line control clauses should use braces.  [whitespace/braces] [4]
3855         ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:398:  One line control clauses should not use braces.  [whitespace/braces] [4]
3856         ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:440:  One line control clauses should not use braces.  [whitespace/braces] [4]
3857         ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:806:  More than one command on the same line  [whitespace/newline] [4]
3858         ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:869:  More than one command on the same line  [whitespace/newline] [4]
3859         ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:880:  More than one command on the same line  [whitespace/newline] [4]
3860         ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:940:  More than one command on the same line  [whitespace/newline] [4]
3861         ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1102:  Multi line control clauses should use braces.  [whitespace/braces] [4]
3862         ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1109:  Multi line control clauses should use braces.  [whitespace/braces] [4]
3863
3864         Indentation and style issue fixed only.
3865
3866         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3867         (WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine):
3868         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
3869         (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
3870         (WebCore::MediaPlayerPrivateGStreamer::play):
3871         (WebCore::MediaPlayerPrivateGStreamer::videoChangedCallback):
3872         (WebCore::MediaPlayerPrivateGStreamer::videoSinkCapsChangedCallback):
3873         (WebCore::MediaPlayerPrivateGStreamer::audioChangedCallback):
3874         (WebCore::MediaPlayerPrivateGStreamer::textChangedCallback):
3875         (WebCore::MediaPlayerPrivateGStreamer::buffered const):
3876         (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
3877
3878 2018-05-09  Daniel Bates  <dabates@apple.com>
3879
3880         REGRESSION (r231479): com.apple.WebCore crash in WebCore::DocumentLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied()
3881         https://bugs.webkit.org/show_bug.cgi?id=185475
3882         <rdar://problem/40093853>
3883
3884         Reviewed by Andy Estes.
3885
3886         DocumentLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied() must extends its lifetime
3887         until completion as dispatching a DOM load event at the associated frame can cause JavaScript execution
3888         that can do anything, including destroying the loader that dispatched the event.
3889
3890         Following r231479 DocumentLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied() is now
3891         invoked by both DocumentLoader::responseReceived() and WebResourceLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied().
3892         The latter only can happen when using WebKit2 and the experimental feature Restricted HTTP Response Access
3893         is enabled (RuntimeEnabledFeatures::sharedFeatures().restrictedHTTPResponseAccess()). Unlike DocumentLoader::responseReceived()
3894         WebResourceLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied() does not take out a ref
3895         on the DocumentLoader before invoking DocumentLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied().
3896         Therefore, DocumentLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied() can cause its
3897         own destruction as a result of dispatching a DOM load event at the frame. We should take out a ref on
3898         the DocumentLoader when executing DocumentLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied().
3899
3900         * loader/DocumentLoader.cpp:
3901         (WebCore::DocumentLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied):
3902
3903 2018-05-09  Tim Horton  <timothy_horton@apple.com>
3904
3905         Fix the build by ignoring some deprecation warnings
3906
3907         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3908         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldDisableSleep):
3909
3910 2018-05-09  Michael Catanzaro  <mcatanzaro@igalia.com>
3911
3912         [WPE] Build cleanly with GCC 8 and ICU 60
3913         https://bugs.webkit.org/show_bug.cgi?id=185462
3914
3915         Reviewed by Carlos Alberto Lopez Perez.
3916
3917         * PlatformGTK.cmake: Include directories are in the wrong place.
3918         * accessibility/AXObjectCache.cpp: Silence -Wclass-memaccess problems and leave warnings.
3919         (WebCore::AXObjectCache::startOrEndTextMarkerDataForRange):
3920         (WebCore::AXObjectCache::textMarkerDataForCharacterOffset):
3921         (WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
3922         (WebCore::AXObjectCache::textMarkerDataForFirstPositionInTextControl):
3923         * css/CSSFontFace.cpp: Silence -Wfallthrough
3924         (WebCore::CSSFontFace::fontLoadTiming const):
3925         * css/CSSSelectorList.cpp: Silence -Wclass-memaccess, this one is intentional.
3926         (WebCore::CSSSelectorList::adoptSelectorVector):
3927         * editing/TextIterator.cpp: Silence ICU deprecation warnings.
3928         * platform/Length.h:
3929         (WebCore::Length::operator=): More -Wclass-memaccess, looks benign.
3930         * platform/graphics/Gradient.cpp:
3931         (WebCore::Gradient::hash const): -Wclass-memaccess again. Leave a warning.
3932         * platform/graphics/SurrogatePairAwareTextIterator.cpp: Silence ICU deprecation warnings.
3933         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
3934         (WebCore::FontCascade::fontForCombiningCharacterSequence const): Silence ICU deprecation.
3935         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
3936         (WebCore::FontCustomPlatformData::FontCustomPlatformData): Silence -Wcast-function-type.
3937         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
3938         (WebCore::Font::canRenderCombiningCharacterSequence const): Silence ICU deprecation.
3939         * platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp:
3940         (gstAllocatorFastMallocMemUnmap): Fix -Wcast-function-type.
3941         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3942         (WebCore::MediaPlayerPrivateGStreamer::updateTracks): Fix bad printf.
3943         (WebCore::MediaPlayerPrivateGStreamer::enableTrack): Another bad printf.
3944         (WebCore::findHLSQueue): Fix -Wcast-function-type.
3945         * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
3946         (webKitMediaClearKeyDecryptorDecrypt): Fix another bad printf.
3947         * platform/network/soup/SocketStreamHandleImplSoup.cpp: Silence -Wcast-function-type.
3948         (WebCore::SocketStreamHandleImpl::beginWaitingForSocketWritability):
3949         * platform/text/TextEncoding.cpp: Silence ICU deprecration.
3950
3951 2018-05-08  Simon Fraser  <simon.fraser@apple.com>
3952
3953         SVG lighting colors need to be converted into linearSRGB<