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