1862b34d02bbc85cd4d0ac630edc7b5b5933419f
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2018-05-25  Eric Carlson  <eric.carlson@apple.com>
2
3         Encode ISOWebVTTCue "strings" when logging
4         https://bugs.webkit.org/show_bug.cgi?id=185991
5         <rdar://problem/40563902>
6
7         Reviewed by Jer Noble.
8
9         * platform/graphics/iso/ISOVTTCue.cpp:
10         (WebCore::ISOWebVTTCue::toJSONString const): Use encodeWithURLEscapeSequences for all Strings
11         taken from ISO boxes.
12
13 2018-05-25  Alex Christensen  <achristensen@webkit.org>
14
15         URL::host should return a StringView to reduce allocations
16         https://bugs.webkit.org/show_bug.cgi?id=185986
17
18         Reviewed by Geoff Garen.
19
20         No change in behaviour.  Just fewer allocations.
21
22         * Modules/plugins/YouTubePluginReplacement.cpp:
23         (WebCore::isYouTubeURL):
24         (WebCore::processAndCreateYouTubeURL):
25         * Modules/websockets/WebSocketHandshake.cpp:
26         (WebCore::hostName):
27         (WebCore::WebSocketHandshake::host const):
28         * contentextensions/ContentExtension.cpp:
29         (WebCore::ContentExtensions::ContentExtension::populateConditionCacheIfNeeded):
30         * html/HTMLAnchorElement.cpp:
31         (WebCore::HTMLAnchorElement::parseAttribute):
32         * html/HTMLMediaElement.cpp:
33         (WebCore::HTMLMediaElement::mediaSessionTitle const):
34         (WebCore::needsSeekingSupportQuirk):
35         * html/HTMLPlugInImageElement.cpp:
36         (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
37         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot):
38         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
39         * html/ImageDocument.cpp:
40         (WebCore::ImageDocument::finishedParsing):
41         * html/URLUtils.h:
42         (WebCore::URLUtils<T>::hostname const):
43         * loader/FrameLoader.cpp:
44         (WebCore::FrameLoader::setFirstPartyForCookies):
45         * loader/LinkLoader.cpp:
46         (WebCore::LinkLoader::loadLink):
47         * loader/ResourceLoadStatistics.cpp:
48         (WebCore::ResourceLoadStatistics::primaryDomain):
49         * loader/mac/LoaderNSURLExtras.mm:
50         (suggestedFilenameWithMIMEType):
51         * page/Chrome.cpp:
52         (WebCore::Chrome::mouseDidMoveOverElement):
53         * page/Location.cpp:
54         (WebCore::Location::hostname const):
55         * page/Page.cpp:
56         (WebCore::Page::mainFrameLoadStarted):
57         * page/PerformanceMonitor.cpp:
58         (WebCore::reportPageOverPostLoadResourceThreshold):
59         * page/SecurityOrigin.cpp:
60         (WebCore::isLoopbackIPAddress):
61         (WebCore::shouldTreatAsPotentiallyTrustworthy):
62         (WebCore::SecurityOrigin::isLocalHostOrLoopbackIPAddress):
63         * page/SecurityOrigin.h:
64         * page/SecurityOriginData.h:
65         (WebCore::SecurityOriginData::fromURL):
66         * page/UserContentURLPattern.cpp:
67         (WebCore::UserContentURLPattern::matchesHost const):
68         * page/csp/ContentSecurityPolicySource.cpp:
69         (WebCore::ContentSecurityPolicySource::hostMatches const):
70         * platform/PublicSuffix.h:
71         * platform/URL.cpp:
72         (WebCore::URL::host const):
73         (WebCore::URL::hostAndPort const):
74         (WebCore::URL::isMatchingDomain const):
75         * platform/URL.h:
76         * platform/mac/SSLKeyGeneratorMac.mm:
77         (WebCore::signedPublicKeyAndChallengeString):
78         * platform/network/ResourceRequestBase.h:
79         (WebCore::registrableDomainsAreEqual):
80         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
81         (WebCore::getPartitioningDomain):
82         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
83         (WebCore::SocketStreamHandleImpl::createStreams):
84         * workers/WorkerLocation.cpp:
85         (WebCore::WorkerLocation::hostname const):
86         * workers/service/server/SWServer.cpp:
87         (WebCore::SWServer::performGetOriginsWithRegistrationsCallbacks):
88
89 2018-05-24  Dean Jackson  <dino@apple.com>
90
91         Need to provide a way to feature detect support for system preview
92         https://bugs.webkit.org/show_bug.cgi?id=185970
93         <rdar://problem/40538321>
94
95         Reviewed by Sam Weinig.
96
97         Update the supports function in the DOMTokenList that HTMLAnchorElement
98         produces for relList to return true for the system preview token.
99
100         Tested internally.
101
102         * html/HTMLAnchorElement.cpp:
103         (WebCore::HTMLAnchorElement::relList const):
104
105 2018-05-25  Chris Dumez  <cdumez@apple.com>
106
107         Minor ApplicationCacheStorage clean up
108         https://bugs.webkit.org/show_bug.cgi?id=185984
109
110         Reviewed by Youenn Fablet.
111
112         * loader/appcache/ApplicationCacheStorage.cpp:
113         (WebCore::ApplicationCacheStorage::getManifestURLs):
114         (WebCore::ApplicationCacheStorage::deleteCacheGroup):
115         (WebCore::ApplicationCacheStorage::originsWithCache):
116         (WebCore::ApplicationCacheStorage::deleteAllCaches):
117         (WebCore::ApplicationCacheStorage::deleteCacheForOrigin):
118         (WebCore::ApplicationCacheStorage::ApplicationCacheStorage):
119         (WebCore::ApplicationCacheStorage::cacheDirectory const): Deleted.
120         (WebCore::ApplicationCacheStorage::cacheGroupSize): Deleted.
121         (WebCore::ApplicationCacheStorage::getOriginsWithCache): Deleted.
122         (WebCore::ApplicationCacheStorage::create): Deleted.
123         * loader/appcache/ApplicationCacheStorage.h:
124         (WebCore::ApplicationCacheStorage::create):
125
126 2018-05-25  Sihui Liu  <sihui_liu@apple.com>
127
128         [WKHTTPCookieStore getAllCookies] returns inconsistent creation time
129         https://bugs.webkit.org/show_bug.cgi?id=185041
130         <rdar://problem/34684214>
131
132         Reviewed by Geoffrey Garen.
133
134         Set creationtime property when creating Cookie object to keep consistency after conversion.
135
136         New API test: WebKit.WKHTTPCookieStoreCreationTime.
137
138         * platform/network/cocoa/CookieCocoa.mm:
139         (WebCore::Cookie::operator NSHTTPCookie * const):
140
141 2018-05-25  Zalan Bujtas  <zalan@apple.com>
142
143         [LFC] Implement border and padding computation
144         https://bugs.webkit.org/show_bug.cgi?id=185972
145
146         Reviewed by Antti Koivisto.
147
148         This patch also removes redundant Display::Box methods and adds a lightweight Edge struct.
149         (Since padding is optional, if during layout we mistakenly try to access paddingTop/Left/Bottom/Right, Display::Box will assert!)
150
151         * layout/FormattingContext.cpp:
152         (WebCore::Layout::FormattingContext::computeBorderAndPadding const):
153         * layout/FormattingContext.h:
154         * layout/FormattingContextGeometry.cpp:
155         (WebCore::Layout::FormattingContext::Geometry::computedBorder):
156         (WebCore::Layout::FormattingContext::Geometry::computedPadding):
157         * layout/blockformatting/BlockFormattingContext.cpp:
158         (WebCore::Layout::BlockFormattingContext::layout const):
159         * layout/displaytree/DisplayBox.cpp:
160         (WebCore::Display::Box::marginBox const):
161         (WebCore::Display::Box::paddingBox const):
162         (WebCore::Display::Box::contentBox const):
163         * layout/displaytree/DisplayBox.h:
164         (WebCore::Display::Box::Edges::Edges):
165         (WebCore::Display::Box::setHasValidPosition):
166         (WebCore::Display::Box::setWidth):
167         (WebCore::Display::Box::setHeight):
168         (WebCore::Display::Box::setMargin):
169         (WebCore::Display::Box::setBorder):
170         (WebCore::Display::Box::setPadding):
171         (WebCore::Display::Box::marginTop const):
172         (WebCore::Display::Box::marginLeft const):
173         (WebCore::Display::Box::marginBottom const):
174         (WebCore::Display::Box::marginRight const):
175         (WebCore::Display::Box::paddingTop const):
176         (WebCore::Display::Box::paddingLeft const):
177         (WebCore::Display::Box::paddingBottom const):
178         (WebCore::Display::Box::paddingRight const):
179         (WebCore::Display::Box::borderTop const):
180         (WebCore::Display::Box::borderLeft const):
181         (WebCore::Display::Box::borderBottom const):
182         (WebCore::Display::Box::borderRight const):
183         (WebCore::Display::Box::invalidateSize): Deleted.
184         (WebCore::Display::Box::setHasValidSize): Deleted.
185         (WebCore::Display::Box::setHasValidGeometry): Deleted.
186         (WebCore::Display::Box::setRect): Deleted.
187         (WebCore::Display::Box::setSize): Deleted.
188         * layout/layouttree/LayoutBox.cpp:
189         (WebCore::Layout::Box::isPaddingEnabled const):
190         * layout/layouttree/LayoutBox.h:
191
192 2018-05-25  David Kilzer  <ddkilzer@apple.com>
193
194         Fix issues with -dealloc methods found by clang static analyzer
195         <https://webkit.org/b/185887>
196
197         Reviewed by Joseph Pecoraro.
198
199         * platform/ios/WebAVPlayerController.mm:
200         (-[WebAVPlayerController dealloc]): Release `_minTiming` and
201         `_maxTiming` to fix leaks.
202         * platform/ios/WebBackgroundTaskController.mm:
203         (-[WebBackgroundTaskController dealloc]): Release
204         `_backgroundTaskStartBlock` and `_backgroundTaskEndBlock` to fix
205         leaks.
206         * platform/ios/WebItemProviderPasteboard.mm:
207         (-[WebItemProviderRegistrationInfoList dealloc]): Release
208         `_teamData` to fix leak.
209
210 2018-05-25  Antoine Quint  <graouts@apple.com>
211
212         [Web Animations] WebAnimation objects never get destroyed
213         https://bugs.webkit.org/show_bug.cgi?id=185917
214         <rdar://problem/39539371>
215
216         Reviewed by Dean Jackson and Antti Koivisto.
217
218         The AnimationTimeline class keeps references to WebAnimation objects organized in various ways. First, there
219         are three main maps across which all animations are stored, one for non-subclass WebAnimation objects
220         (m_elementToAnimationsMap), one for CSSSAnimation objects (m_elementToCSSAnimationsMap) and one for CSSTranstion
221         objects (m_elementToCSSTransitionsMap). On top of that, we also keep a map to access CSSAnimation objects for
222         a given element by CSS animation name (m_elementToCSSAnimationByName) and another map to access CSSTransition 
223         objects for a given element by CSS property (m_elementToCSSTransitionByCSSPropertyID).
224
225         None of the RefPtr<WebAnimation> stored in these maps would get cleared when the document would get torn down,
226         which would also prevent the AnimationTimeline (and its DocumentTimeline subclass) from being destroyed.
227
228         We now ensure that element and document tear-down correctly removes animations and clears those maps, which
229         in turn allows the DocumentTimeline to be destroyed, fixing the significant memory leak introduced by Web Animations
230         so far.
231
232         Finally, we change the collection type for those maps to be ListHashRef instead of Vector to guarantee we only
233         add an animation once per collection due to changes in how setEffect() and setTimeline() operate.
234
235         Test: animations/leak-document-with-css-animation.html
236
237         * animation/AnimationTimeline.cpp:
238         (WebCore::AnimationTimeline::~AnimationTimeline): There is no need to clear those tables as they'll need to be empty
239         for the AnimationTimeline to even be destroyed.
240         (WebCore::AnimationTimeline::relevantMapForAnimation): Change to use ListHashRef instead of Vector.
241         (WebCore::AnimationTimeline::animationWasAddedToElement): Change to use ListHashRef instead of Vector.
242         (WebCore::AnimationTimeline::animationWasRemovedFromElement): When an animation is removed from an element, ensure that
243         references to this animation stored in the m_elementToCSSAnimationByName and m_elementToCSSTransitionByCSSPropertyID maps
244         are cleared.
245         (WebCore::AnimationTimeline::animationsForElement const): Change to use ListHashRef instead of Vector.
246         (WebCore::AnimationTimeline::removeAnimationsForElement): Instead of just calling cancel() on all known declarative animations
247         (this method used to be called cancelDeclarativeAnimationsForElement()), we now set the effect of known animations, declarative
248         or not, for the provided element which will in turn call animationWasRemovedFromElement() and remove the animation from all
249         maps that might keep a reference to it.
250         (WebCore::AnimationTimeline::updateCSSTransitionsForElement): Replace call to removeDeclarativeAnimation() with a simple call
251         to removeAnimation() which will remove references for this animation from the relevant maps.
252         (WebCore::AnimationTimeline::cancelOrRemoveDeclarativeAnimation): Ditto.
253         (WebCore::AnimationTimeline::cancelDeclarativeAnimationsForElement): Deleted.
254         (WebCore::AnimationTimeline::removeDeclarativeAnimation): Deleted.
255         * animation/AnimationTimeline.h:
256         (WebCore::AnimationTimeline::elementToAnimationsMap): Change to use ListHashRef instead of Vector.
257         (WebCore::AnimationTimeline::elementToCSSAnimationsMap): Change to use ListHashRef instead of Vector.
258         (WebCore::AnimationTimeline::elementToCSSTransitionsMap): Change to use ListHashRef instead of Vector.
259         * animation/WebAnimation.cpp:
260         (WebCore::WebAnimation::setEffect): In the case of a declarative animation, we don't want to remove the animation from the relevant
261         maps because while the effect was set via the API, the element still has a transition or animation set up and we must not break the
262         timeline-to-animation relationship.
263         (WebCore::WebAnimation::setEffectInternal): Factor parts of setEffect() out into a new method that can be called from
264         AnimationTimeline::removeAnimationsForElement() to reset the m_effect member and correctly call animationWasRemovedFromElement()
265         without all the Web Animations machinery of setEffect(), which is a public API that has unwanted side effects (such as rejecting
266         promises).
267         (WebCore::WebAnimation::setTimeline): In the case of a declarative animation, we don't want to remove the animation from the
268         relevant maps because, while the timeline was set via the API, the element still has a transition or animation set up and we must
269         not break the relationship.
270         * animation/DocumentTimeline.cpp:
271         (WebCore::DocumentTimeline::~DocumentTimeline):
272         (WebCore::DocumentTimeline::detachFromDocument): Close the GenericTaskQueues when detaching from the document as it's too late to
273         perform this work in the destructor. We also cancel the schedule timer which we had forgotten to do before.
274         * animation/WebAnimation.h:
275         * dom/Document.cpp:
276         (WebCore::Document::prepareForDestruction):
277         * dom/Element.cpp:
278         (WebCore::Element::removedFromAncestor):
279         * dom/PseudoElement.cpp:
280         (WebCore::PseudoElement::clearHostElement):
281         * rendering/updating/RenderTreeUpdater.cpp:
282         (WebCore::RenderTreeUpdater::tearDownRenderers):
283
284 2018-05-24  Chris Dumez  <cdumez@apple.com>
285
286         Avoid doing unnecessary work in Document::shouldEnforceContentDispositionAttachmentSandbox() when setting is disabled
287         https://bugs.webkit.org/show_bug.cgi?id=185964
288
289         Reviewed by Geoffrey Garen.
290
291         * dom/Document.cpp:
292         (WebCore::Document::shouldEnforceContentDispositionAttachmentSandbox const):
293
294 2018-05-24  Chris Dumez  <cdumez@apple.com>
295
296         [iOS] Avoid dlopening QuickLooks in the common case where the main resource is HTML or plain text
297         https://bugs.webkit.org/show_bug.cgi?id=185966
298
299         Reviewed by Geoffrey Garen.
300
301         Avoid dlopening QuickLooks in the common case where the main resource is HTML or plain text
302         for performance reasons.
303
304         * loader/ios/PreviewLoader.mm:
305         (WebCore::PreviewLoader::shouldCreateForMIMEType):
306
307 2018-05-24  Sam Weinig  <sam@webkit.org>
308
309         Modernize RenderStyleConstants.h - Part 2
310         https://bugs.webkit.org/show_bug.cgi?id=185901
311
312         Reviewed by Simon Fraser.
313
314         Modernized the second set of enums in RenderStyleConstants.h by:
315             - Converting them to enum classes
316             - Renaming them to remove unnecessary prefix 'E's
317             - Renaming values to take advantage of enum class scoping (e.g. StyleDifferenceEqual -> StyleDifference::Equal)
318             - Renaming to match modern conventions (e.g BNONE -> None)
319             - Reformatting them so that each value is on its own line.
320
321         Modernizes the following enums:
322             PseudoId
323             ListStyleType (renamed from EListStyleType)
324             BorderFit (renamed from EBorderFit)
325             AnimationFillMode (renamed from EAnimationFillMode)
326             AnimationPlayState (renamed from EAnimPlayState)
327             WhiteSpace (renamed from EWhiteSpace)
328             TextAlignMode (renamed from ETextAlign)
329             TextTransform (renamed from ETextTransform)
330             TextDecorationStyle
331             TextAlignLast
332             TextJustify
333             TextZoom
334             BreakBetween
335             BreakInside
336             EmptyCell (renamed from EEmptyCell)
337             CaptionSide (renamed from ECaptionSide)
338             ListStylePosition (renamed from EListStylePosition)
339             Visibility (renamed from EVisibility)
340             CursorType (renamed from ECursor)
341             CursorVisibility
342             DisplayType (renamed from EDisplay)
343             InsideLink (renamed from EInsideLink)
344             PointerEvents (renamed from EPointerEvents)
345             Hyphens
346             TextEmphasisFill
347             TextEmphasisMark
348             ImageResolutionSource
349             ImageResolutionSnap
350             Order
351             ColumnAxis
352             ColumnProgression
353             LineSnap
354             LineAlign
355             RubyPosition
356             AutoRepeatType
357             CSSBoxType
358
359         * accessibility/AXObjectCache.cpp:
360         (WebCore::AXObjectCache::isNodeVisible const):
361         * accessibility/AccessibilityList.cpp:
362         (WebCore::AccessibilityList::determineAccessibilityRole):
363         * accessibility/AccessibilityMediaControls.cpp:
364         (WebCore::AccessibilityMediaControl::computeAccessibilityIsIgnored const):
365         (WebCore::AccessibilityMediaTimeDisplay::computeAccessibilityIsIgnored const):
366         * accessibility/AccessibilityObject.cpp:
367         (WebCore::AccessibilityObject::isDOMHidden const):
368         * accessibility/AccessibilityRenderObject.cpp:
369         (WebCore::AccessibilityRenderObject::defaultObjectInclusion const):
370         (WebCore::AccessibilityRenderObject::isUnvisited const):
371         (WebCore::AccessibilityRenderObject::isVisited const):
372         (WebCore::AccessibilityRenderObject::setValue):
373         * accessibility/AccessibilityTable.cpp:
374         (WebCore::AccessibilityTable::isDataTable const):
375         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
376         (getAttributeSetForAccessibilityObject):
377         * animation/AnimationTimeline.cpp:
378         (WebCore::AnimationTimeline::updateCSSAnimationsForElement):
379         (WebCore::AnimationTimeline::updateCSSTransitionsForElement):
380         * animation/CSSAnimation.cpp:
381         (WebCore::CSSAnimation::syncPropertiesWithBackingAnimation):
382         * animation/DeclarativeAnimation.cpp:
383         (WebCore::DeclarativeAnimation::initialize):
384         * animation/KeyframeEffectReadOnly.cpp:
385         (WebCore::KeyframeEffectReadOnly::backingAnimationForCompositedRenderer const):
386         * css/CSSComputedStyleDeclaration.cpp:
387         (WebCore::renderTextDecorationStyleFlagsToCSSValue):
388         (WebCore::convertToPageBreak):
389         (WebCore::convertToColumnBreak):
390         (WebCore::ComputedStyleExtractor::styledElement const):
391         (WebCore::ComputedStyleExtractor::styledRenderer const):
392         (WebCore::computeRenderStyleForProperty):
393         (WebCore::shapePropertyValue):
394         (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
395         * css/CSSComputedStyleDeclaration.h:
396         * css/CSSPrimitiveValueMappings.h:
397         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
398         (WebCore::CSSPrimitiveValue::operator CaptionSide const):
399         (WebCore::CSSPrimitiveValue::operator CursorType const):
400         (WebCore::CSSPrimitiveValue::operator CursorVisibility const):
401         (WebCore::CSSPrimitiveValue::operator DisplayType const):
402         (WebCore::CSSPrimitiveValue::operator EmptyCell const):
403         (WebCore::CSSPrimitiveValue::operator ListStylePosition const):
404         (WebCore::CSSPrimitiveValue::operator ListStyleType const):
405         (WebCore::CSSPrimitiveValue::operator BreakBetween const):
406         (WebCore::CSSPrimitiveValue::operator BreakInside const):
407         (WebCore::CSSPrimitiveValue::operator TextAlignMode const):
408         (WebCore::CSSPrimitiveValue::operator TextAlignLast const):
409         (WebCore::CSSPrimitiveValue::operator TextJustify const):
410         (WebCore::CSSPrimitiveValue::operator TextDecorationStyle const):
411         (WebCore::CSSPrimitiveValue::operator TextTransform const):
412         (WebCore::CSSPrimitiveValue::operator Visibility const):
413         (WebCore::CSSPrimitiveValue::operator WhiteSpace const):
414         (WebCore::CSSPrimitiveValue::operator RubyPosition const):
415         (WebCore::CSSPrimitiveValue::operator TextEmphasisFill const):
416         (WebCore::CSSPrimitiveValue::operator TextEmphasisMark const):
417         (WebCore::CSSPrimitiveValue::operator PointerEvents const):
418         (WebCore::CSSPrimitiveValue::operator Hyphens const):
419         (WebCore::CSSPrimitiveValue::operator LineSnap const):
420         (WebCore::CSSPrimitiveValue::operator LineAlign const):
421         (WebCore::CSSPrimitiveValue::operator Order const):
422         (WebCore::CSSPrimitiveValue::operator BorderFit const):
423         (WebCore::CSSPrimitiveValue::operator ColumnAxis const):
424         (WebCore::CSSPrimitiveValue::operator ColumnProgression const):
425         (WebCore::CSSPrimitiveValue::operator CSSBoxType const):
426         (WebCore::CSSPrimitiveValue::operator TextZoom const):
427         (WebCore::CSSPrimitiveValue::operator ECaptionSide const): Deleted.
428         (WebCore::CSSPrimitiveValue::operator ECursor const): Deleted.
429         (WebCore::CSSPrimitiveValue::operator EDisplay const): Deleted.
430         (WebCore::CSSPrimitiveValue::operator EEmptyCell const): Deleted.
431         (WebCore::CSSPrimitiveValue::operator EListStylePosition const): Deleted.
432         (WebCore::CSSPrimitiveValue::operator EListStyleType const): Deleted.
433         (WebCore::CSSPrimitiveValue::operator ETextAlign const): Deleted.
434         (WebCore::CSSPrimitiveValue::operator ETextTransform const): Deleted.
435         (WebCore::CSSPrimitiveValue::operator EVisibility const): Deleted.
436         (WebCore::CSSPrimitiveValue::operator EWhiteSpace const): Deleted.
437         (WebCore::CSSPrimitiveValue::operator EPointerEvents const): Deleted.
438         (WebCore::CSSPrimitiveValue::operator EBorderFit const): Deleted.
439         * css/CSSSelector.cpp:
440         (WebCore::CSSSelector::pseudoId):
441         * css/CSSToStyleMap.cpp:
442         (WebCore::CSSToStyleMap::mapAnimationFillMode):
443         (WebCore::CSSToStyleMap::mapAnimationPlayState):
444         * css/CSSValueKeywords.in:
445         * css/ElementRuleCollector.cpp:
446         (WebCore::ElementRuleCollector::collectMatchingRules):
447         (WebCore::ElementRuleCollector::ruleMatches):
448         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
449         * css/ElementRuleCollector.h:
450         * css/SelectorChecker.cpp:
451         (WebCore::SelectorChecker::match const):
452         (WebCore::SelectorChecker::matchHostPseudoClass const):
453         (WebCore::hasScrollbarPseudoElement):
454         (WebCore::SelectorChecker::matchRecursively const):
455         * css/SelectorChecker.h:
456         * css/StyleBuilderConverter.h:
457         (WebCore::StyleBuilderConverter::convertTextAlign):
458         (WebCore::StyleBuilderConverter::convertClipPath):
459         (WebCore::StyleBuilderConverter::convertShapeValue):
460         (WebCore::StyleBuilderConverter::createGridTrackList):
461         (WebCore::StyleBuilderConverter::csstoLengthConversionDataWithTextZoomFactor):
462         (WebCore::StyleBuilderConverter::convertPageBreakBetween):
463         (WebCore::StyleBuilderConverter::convertPageBreakInside):
464         (WebCore::StyleBuilderConverter::convertColumnBreakBetween):
465         (WebCore::StyleBuilderConverter::convertColumnBreakInside):
466         * css/StyleBuilderCustom.h:
467         (WebCore::StyleBuilderCustom::applyValueImageResolution):
468         (WebCore::computeBaseSpecifiedFontSize):
469         (WebCore::StyleBuilderCustom::applyValueWebkitTextZoom):
470         (WebCore::StyleBuilderCustom::isValidDisplayValue):
471         (WebCore::StyleBuilderCustom::applyInheritDisplay):
472         (WebCore::StyleBuilderCustom::applyValueDisplay):
473         (WebCore::StyleBuilderCustom::applyValueWebkitTextEmphasisStyle):
474         (WebCore::StyleBuilderCustom::applyValueCursor):
475         (WebCore::StyleBuilderCustom::applyValueContent):
476         (WebCore::StyleBuilderCustom::determineRubyTextSizeMultiplier):
477         (WebCore::StyleBuilderCustom::applyValueAlt):
478         * css/StyleResolver.cpp:
479         (WebCore::StyleResolver::styleForElement):
480         (WebCore::equivalentBlockDisplay):
481         (WebCore::doesNotInheritTextDecoration):
482         (WebCore::StyleResolver::adjustStyleForInterCharacterRuby):
483         (WebCore::adjustDisplayContentsStyle):
484         (WebCore::StyleResolver::adjustSVGElementStyle):
485         (WebCore::StyleResolver::adjustRenderStyle):
486         (WebCore::StyleResolver::styleRulesForElement):
487         (WebCore::isCacheableInMatchedPropertiesCache):
488         (WebCore::StyleResolver::applyMatchedProperties):
489         (WebCore::StyleResolver::CascadedProperties::Property::apply):
490         * css/StyleResolver.h:
491         (WebCore::StyleResolver::State::elementLinkState const):
492         * cssjit/SelectorCompiler.cpp:
493         (WebCore::SelectorCompiler::constructFragmentsInternal):
494         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement):
495         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateMarkPseudoStyleForPseudoElement):
496         * dom/Document.cpp:
497         (WebCore::Document::styleForElementIgnoringPendingStylesheets):
498         (WebCore::Document::isPageBoxVisible):
499         (WebCore::Document::setVisuallyOrdered):
500         * dom/Document.h:
501         * dom/Element.cpp:
502         (WebCore::Element::isFocusable const):
503         (WebCore::Element::hasDisplayContents const):
504         (WebCore::Element::storeDisplayContentsStyle):
505         (WebCore::Element::rendererIsNeeded):
506         (WebCore::beforeOrAfterPseudoElement):
507         (WebCore::Element::computedStyle):
508         * dom/Element.h:
509         * dom/Node.cpp:
510         (WebCore::computeEditabilityFromComputedStyle):
511         * dom/Node.h:
512         (WebCore::Node::isPseudoElement const):
513         (WebCore::Node::isBeforePseudoElement const):
514         (WebCore::Node::isAfterPseudoElement const):
515         (WebCore::Node::pseudoId const):
516         (WebCore::Node::customPseudoId const):
517         * dom/Position.cpp:
518         (WebCore::Position::upstream const):
519         (WebCore::Position::downstream const):
520         (WebCore::Position::isCandidate const):
521         (WebCore::Position::rendersInDifferentPosition const):
522         * dom/PositionIterator.cpp:
523         (WebCore::PositionIterator::isCandidate const):
524         * dom/PseudoElement.cpp:
525         (WebCore::PseudoElement::pseudoElementNameForEvents):
526         (WebCore::PseudoElement::PseudoElement):
527         * dom/VisitedLinkState.cpp:
528         (WebCore::VisitedLinkState::determineLinkStateSlowCase):
529         * dom/VisitedLinkState.h:
530         (WebCore::VisitedLinkState::determineLinkState):
531         * editing/Editing.cpp:
532         (WebCore::isSpecialHTMLElement):
533         (WebCore::isNodeRendered):
534         * editing/TextIterator.cpp:
535         (WebCore::hasVisibleTextNode):
536         (WebCore::TextIterator::handleTextNode):
537         (WebCore::TextIterator::handleTextBox):
538         (WebCore::TextIterator::handleTextNodeFirstLetter):
539         (WebCore::TextIterator::handleReplacedElement):
540         (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
541         (WebCore::SimplifiedBackwardsTextIterator::advance):
542         * editing/VisibleUnits.cpp:
543         (WebCore::findStartOfParagraph):
544         (WebCore::findEndOfParagraph):
545         * editing/ios/EditorIOS.mm:
546         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
547         * html/HTMLAreaElement.cpp:
548         (WebCore::HTMLAreaElement::isFocusable const):
549         * html/HTMLFormElement.cpp:
550         (WebCore::HTMLFormElement::rendererIsNeeded):
551         * html/HTMLIFrameElement.cpp:
552         (WebCore::HTMLIFrameElement::rendererIsNeeded):
553         * html/HTMLInputElement.cpp:
554         (WebCore::HTMLInputElement::createInnerTextStyle):
555         * html/HTMLOptGroupElement.cpp:
556         (WebCore::HTMLOptGroupElement::isFocusable const):
557         * html/HTMLOptionElement.cpp:
558         (WebCore::HTMLOptionElement::isFocusable const):
559         * html/HTMLTextAreaElement.cpp:
560         (WebCore::HTMLTextAreaElement::createInnerTextStyle):
561         * html/HTMLTextFormControlElement.cpp:
562         (WebCore::HTMLTextFormControlElement::setSelectionRange):
563         (WebCore::HTMLTextFormControlElement::adjustInnerTextStyle const):
564         * html/MediaElementSession.cpp:
565         (WebCore::MediaElementSession::autoplayPermitted const):
566         (WebCore::isMainContentForPurposesOfAutoplay):
567         * html/RubyElement.cpp:
568         (WebCore::RubyElement::createElementRenderer):
569         * html/RubyTextElement.cpp:
570         (WebCore::RubyTextElement::createElementRenderer):
571         * html/shadow/TextControlInnerElements.cpp:
572         (WebCore::TextControlInnerElement::resolveCustomStyle):
573         (WebCore::TextControlPlaceholderElement::resolveCustomStyle):
574         * inspector/InspectorOverlay.cpp:
575         (WebCore::buildObjectForElementData):
576         * inspector/agents/InspectorCSSAgent.cpp:
577         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
578         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
579         * inspector/agents/InspectorDOMAgent.cpp:
580         (WebCore::pseudoElementType):
581         (WebCore::InspectorDOMAgent::buildObjectForNode):
582         * inspector/agents/InspectorLayerTreeAgent.cpp:
583         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
584         * layout/layouttree/LayoutBox.cpp:
585         (WebCore::Layout::Box::isInlineBlockBox const):
586         (WebCore::Layout::Box::isBlockLevelBox const):
587         (WebCore::Layout::Box::isInlineLevelBox const):
588         (WebCore::Layout::Box::isBlockContainerBox const):
589         * page/EventHandler.cpp:
590         (WebCore::EventHandler::selectCursor):
591         * page/Frame.cpp:
592         (WebCore::Frame::searchForLabelsAboveCell):
593         (WebCore::Frame::searchForLabelsBeforeElement):
594         * page/FrameView.cpp:
595         (WebCore::FrameView::createScrollbar):
596         (WebCore::FrameView::adjustScrollStepForFixedContent):
597         (WebCore::FrameView::updateScrollCorner):
598         * page/animation/AnimationBase.cpp:
599         (WebCore::AnimationBase::playStatePlaying const):
600         (WebCore::AnimationBase::updatePlayState):
601         * page/animation/AnimationBase.h:
602         * page/animation/CSSPropertyAnimation.cpp:
603         (WebCore::blendFunc):
604         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
605         * page/animation/CompositeAnimation.cpp:
606         (WebCore::CompositeAnimation::updateTransitions):
607         (WebCore::CompositeAnimation::updateKeyframeAnimations):
608         (WebCore::CompositeAnimation::suspendAnimations):
609         (WebCore::CompositeAnimation::resumeAnimations):
610         * page/animation/KeyframeAnimation.cpp:
611         (WebCore::KeyframeAnimation::animate):
612         * page/ios/FrameIOS.mm:
613         (WebCore::Frame::nodeRespondingToClickEvents):
614         * platform/animation/Animation.cpp:
615         (WebCore::Animation::Animation):
616         * platform/animation/Animation.h:
617         (WebCore::Animation::clearPlayState):
618         (WebCore::Animation::fillMode const):
619         (WebCore::Animation::playState const):
620         (WebCore::Animation::setFillMode):
621         (WebCore::Animation::setPlayState):
622         (WebCore::Animation::fillsBackwards const):
623         (WebCore::Animation::fillsForwards const):
624         (WebCore::Animation::initialFillMode):
625         (WebCore::Animation::initialPlayState):
626         * platform/graphics/GraphicsTypes.h:
627         * platform/graphics/ca/GraphicsLayerCA.cpp:
628         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
629         * platform/ios/wak/WAKWindow.mm:
630         (-[WAKWindow dumpTiles]):
631         * platform/mac/WebCoreNSURLExtras.mm:
632         (WebCore::isLookalikeCharacter):
633         * rendering/ClipPathOperation.h:
634         * rendering/InlineBox.h:
635         (WebCore::InlineBox::visibleToHitTesting const):
636         * rendering/InlineFlowBox.cpp:
637         (WebCore::InlineFlowBox::addToLine):
638         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
639         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
640         (WebCore::InlineFlowBox::paint):
641         (WebCore::InlineFlowBox::paintBoxDecorations):
642         (WebCore::InlineFlowBox::paintMask):
643         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment const):
644         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment const):
645         (WebCore::InlineFlowBox::collectLeafBoxesInLogicalOrder const):
646         * rendering/InlineFlowBox.h:
647         (WebCore::InlineFlowBox::InlineFlowBox):
648         * rendering/InlineTextBox.cpp:
649         (WebCore::InlineTextBox::emphasisMarkExistsAndIsAbove const):
650         (WebCore::InlineTextBox::paint):
651         (WebCore::InlineTextBox::createTextRun const):
652         * rendering/PointerEventsHitRules.cpp:
653         (WebCore::PointerEventsHitRules::PointerEventsHitRules):
654         * rendering/PointerEventsHitRules.h:
655         * rendering/RenderBlock.cpp:
656         (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
657         (WebCore::RenderBlock::paint):
658         (WebCore::RenderBlock::paintObject):
659         (WebCore::RenderBlock::shouldPaintSelectionGaps const):
660         (WebCore::RenderBlock::adjustLogicalLeftOffsetForLine const):
661         (WebCore::RenderBlock::adjustLogicalRightOffsetForLine const):
662         (WebCore::isChildHitTestCandidate):
663         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths const):
664         (WebCore::RenderBlock::firstLineBlock const):
665         (WebCore::findFirstLetterBlock):
666         (WebCore::RenderBlock::getFirstLetter):
667         (WebCore::RenderBlock::createAnonymousBlockWithStyleAndDisplay):
668         (WebCore::RenderBlock::childBoxIsUnsplittableForFragmentation const):
669         (WebCore::RenderBlock::constructTextRun):
670         (WebCore::RenderBlock::layoutExcludedChildren):
671         * rendering/RenderBlock.h:
672         (WebCore::RenderBlock::createAnonymousWithParentRendererAndDisplay):
673         (WebCore::RenderBlock::createAnonymousBlock const):
674         * rendering/RenderBlockFlow.cpp:
675         (WebCore::RenderBlockFlow::willCreateColumns const):
676         (WebCore::RenderBlockFlow::layoutBlock):
677         (WebCore::RenderBlockFlow::applyBeforeBreak):
678         (WebCore::RenderBlockFlow::applyAfterBreak):
679         (WebCore::RenderBlockFlow::adjustForUnsplittableChild):
680         (WebCore::RenderBlockFlow::updateStylesForColumnChildren):
681         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
682         (WebCore::RenderBlockFlow::lowestInitialLetterLogicalBottom const):
683         (WebCore::RenderBlockFlow::adjustForBorderFit const):
684         (WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded):
685         (WebCore::RenderBlockFlow::lineAtIndex const):
686         (WebCore::RenderBlockFlow::lineCount const):
687         (WebCore::getHeightForLineCount):
688         (WebCore::RenderBlockFlow::clearTruncation):
689         (WebCore::RenderBlockFlow::findClosestTextAtAbsolutePoint):
690         (WebCore::RenderBlockFlow::lineCountForTextAutosizing):
691         (WebCore::RenderBlockFlow::setComputedColumnCountAndWidth):
692         (WebCore::RenderBlockFlow::updateColumnProgressionFromStyle):
693         (WebCore::RenderBlockFlow::isTopLayoutOverflowAllowed const):
694         (WebCore::RenderBlockFlow::isLeftLayoutOverflowAllowed const):
695         * rendering/RenderBlockFlow.h:
696         * rendering/RenderBlockLineLayout.cpp:
697         (WebCore::RenderBlockFlow::constructLine):
698         (WebCore::RenderBlockFlow::textAlignmentForLine const):
699         (WebCore::RenderBlockFlow::updateLogicalWidthForAlignment):
700         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
701         (WebCore::expansionBehaviorForInlineTextBox):
702         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
703         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
704         (WebCore::RenderBlockFlow::checkFloatInCleanLine):
705         (WebCore::RenderBlockFlow::deleteEllipsisLineBoxes):
706         (WebCore::RenderBlockFlow::checkLinesForTextOverflow):
707         (WebCore::RenderBlockFlow::startAlignedOffsetForLine):
708         * rendering/RenderBox.cpp:
709         (WebCore::RenderBox::hasVerticalScrollbarWithAutoBehavior const):
710         (WebCore::RenderBox::hasHorizontalScrollbarWithAutoBehavior const):
711         (WebCore::isCandidateForOpaquenessTest):
712         (WebCore::RenderBox::paintMask):
713         (WebCore::RenderBox::paintClippingMask):
714         (WebCore::RenderBox::positionLineBox):
715         (WebCore::RenderBox::clippedOverflowRectForRepaint const):
716         (WebCore::RenderBox::computeLogicalWidthInFragment const):
717         (WebCore::RenderBox::computeInlineDirectionMargins const):
718         (WebCore::RenderBox::skipContainingBlockForPercentHeightCalculation const):
719         (WebCore::RenderBox::positionForPoint):
720         (WebCore::RenderBox::isUnsplittableForPagination const):
721         * rendering/RenderBoxModelObject.cpp:
722         (WebCore::RenderBoxModelObject::localCaretRectForEmptyElement):
723         * rendering/RenderBoxModelObject.h:
724         * rendering/RenderCounter.cpp:
725         (WebCore::planCounter):
726         (WebCore::RenderCounter::originalText const):
727         * rendering/RenderDeprecatedFlexibleBox.cpp:
728         (WebCore::childDoesNotAffectWidthOrFlexing):
729         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
730         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
731         * rendering/RenderDetailsMarker.cpp:
732         (WebCore::RenderDetailsMarker::paint):
733         * rendering/RenderElement.cpp:
734         (WebCore::RenderElement::createFor):
735         (WebCore::RenderElement::computeFirstLineStyle const):
736         (WebCore::RenderElement::propagateStyleToAnonymousChildren):
737         (WebCore::RenderElement::styleWillChange):
738         (WebCore::RenderElement::insertedIntoTree):
739         (WebCore::RenderElement::willBeRemovedFromTree):
740         (WebCore::RenderElement::repaintAfterLayoutIfNeeded):
741         (WebCore::RenderElement::isVisibleInDocumentRect const):
742         (WebCore::RenderElement::getCachedPseudoStyle const):
743         (WebCore::RenderElement::getUncachedPseudoStyle const):
744         (WebCore::RenderElement::selectionPseudoStyle const):
745         * rendering/RenderElement.h:
746         (WebCore::RenderElement::visibleToHitTesting const):
747         * rendering/RenderFileUploadControl.cpp:
748         (WebCore::RenderFileUploadControl::paintObject):
749         * rendering/RenderFullScreen.cpp:
750         (WebCore::createFullScreenStyle):
751         * rendering/RenderGrid.cpp:
752         (WebCore::RenderGrid::computeEmptyTracksForAutoRepeat const):
753         * rendering/RenderImage.cpp:
754         (WebCore::RenderImage::repaintOrMarkForLayout):
755         * rendering/RenderInline.cpp:
756         (WebCore::RenderInline::willBeDestroyed):
757         (WebCore::updateStyleOfAnonymousBlockContinuations):
758         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
759         (WebCore::RenderInline::clippedOverflowRectForRepaint const):
760         (WebCore::RenderInline::addAnnotatedRegions):
761         * rendering/RenderLayer.cpp:
762         (WebCore::RenderLayer::RenderLayer):
763         (WebCore::RenderLayer::updateDescendantDependentFlags):
764         (WebCore::RenderLayer::createScrollbar):
765         (WebCore::styleRequiresScrollbar):
766         (WebCore::styleDefinesAutomaticScrollbar):
767         (WebCore::computeReferenceBox):
768         (WebCore::RenderLayer::calculateClipRects const):
769         * rendering/RenderLayerBacking.cpp:
770         (WebCore::RenderLayerBacking::updateAfterDescendants):
771         * rendering/RenderLayerCompositor.cpp:
772         (WebCore::scrollbarHasDisplayNone):
773         (WebCore::RenderLayerCompositor::requiresCompositingForPlugin const):
774         (WebCore::RenderLayerCompositor::requiresCompositingForFrame const):
775         * rendering/RenderListBox.cpp:
776         (WebCore::RenderListBox::paintObject):
777         (WebCore::itemOffsetForAlignment):
778         (WebCore::RenderListBox::paintItemForeground):
779         (WebCore::RenderListBox::paintItemBackground):
780         (WebCore::RenderListBox::createScrollbar):
781         * rendering/RenderListItem.cpp:
782         (WebCore::RenderListItem::computeMarkerStyle const):
783         * rendering/RenderListMarker.cpp:
784         (WebCore::effectiveListMarkerType):
785         (WebCore::listMarkerSuffix):
786         (WebCore::listMarkerText):
787         (WebCore::RenderListMarker::paint):
788         (WebCore::RenderListMarker::updateContent):
789         (WebCore::RenderListMarker::computePreferredLogicalWidths):
790         (WebCore::RenderListMarker::updateMargins):
791         (WebCore::RenderListMarker::suffix const):
792         (WebCore::RenderListMarker::isInside const):
793         (WebCore::RenderListMarker::getRelativeMarkerRect):
794         * rendering/RenderListMarker.h:
795         * rendering/RenderMediaControlElements.cpp:
796         (WebCore::RenderMediaVolumeSliderContainer::layout):
797         (WebCore::RenderTextTrackContainerElement::layout):
798         * rendering/RenderMenuList.cpp:
799         (WebCore::RenderMenuList::adjustInnerStyle):
800         (WebCore::if):
801         (RenderMenuList::itemStyle const):
802         (RenderMenuList::menuStyle const):
803         (RenderMenuList::createScrollbar):
804         * rendering/RenderMultiColumnSpannerPlaceholder.cpp:
805         (WebCore::RenderMultiColumnSpannerPlaceholder::createAnonymous):
806         * rendering/RenderObject.cpp:
807         (WebCore::RenderObject::addAnnotatedRegions):
808         * rendering/RenderObject.h:
809         (WebCore::RenderObject::isAnonymousBlock const):
810         (WebCore::RenderObject::isBeforeContent const):
811         (WebCore::RenderObject::isAfterContent const):
812         * rendering/RenderReplaced.cpp:
813         (WebCore::RenderReplaced::shouldPaint):
814         (WebCore::RenderReplaced::clippedOverflowRectForRepaint const):
815         * rendering/RenderRubyBase.cpp:
816         (WebCore::RenderRubyBase::textAlignmentForLine const):
817         * rendering/RenderRubyBase.h:
818         * rendering/RenderRubyRun.cpp:
819         (WebCore::RenderRubyRun::createRubyBase const):
820         (WebCore::RenderRubyRun::staticCreateRubyRun):
821         (WebCore::RenderRubyRun::layoutBlock):
822         * rendering/RenderRubyText.cpp:
823         (WebCore::RenderRubyText::textAlignmentForLine const):
824         (WebCore::RenderRubyText::adjustInlineDirectionLineBounds const):
825         * rendering/RenderRubyText.h:
826         * rendering/RenderScrollbar.cpp:
827         (WebCore::pseudoForScrollbarPart):
828         (WebCore::RenderScrollbar::updateScrollbarPart):
829         * rendering/RenderSearchField.cpp:
830         (WebCore::RenderSearchField::updateCancelButtonVisibility const):
831         (WebCore::RenderSearchField::visibilityForCancelButton const):
832         (WebCore::RenderSearchField::menuStyle const):
833         (WebCore::RenderSearchField::createScrollbar):
834         * rendering/RenderSearchField.h:
835         * rendering/RenderTable.cpp:
836         (WebCore::RenderTable::willInsertTableSection):
837         (WebCore::RenderTable::layoutCaptions):
838         (WebCore::RenderTable::layout):
839         (WebCore::RenderTable::paintObject):
840         (WebCore::RenderTable::adjustBorderBoxRectForPainting):
841         (WebCore::RenderTable::paintMask):
842         (WebCore::RenderTable::recalcSections const):
843         (WebCore::RenderTable::createTableWithStyle):
844         * rendering/RenderTableCell.cpp:
845         (WebCore::RenderTableCell::styleDidChange):
846         (WebCore::RenderTableCell::paintCollapsedBorders):
847         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
848         (WebCore::RenderTableCell::paintBoxDecorations):
849         (WebCore::RenderTableCell::paintMask):
850         (WebCore::RenderTableCell::createTableCellWithStyle):
851         * rendering/RenderTableCol.cpp:
852         (WebCore::RenderTableCol::updateFromElement):
853         (WebCore::RenderTableCol::isChildAllowed const):
854         * rendering/RenderTableCol.h:
855         * rendering/RenderTableRow.cpp:
856         (WebCore::RenderTableRow::styleDidChange):
857         (WebCore::RenderTableRow::paintOutlineForRowIfNeeded):
858         (WebCore::RenderTableRow::createTableRowWithStyle):
859         * rendering/RenderTableSection.cpp:
860         (WebCore::RenderTableSection::addCell):
861         (WebCore::RenderTableSection::paint):
862         (WebCore::RenderTableSection::createTableSectionWithStyle):
863         * rendering/RenderText.cpp:
864         (WebCore::RenderText::styleDidChange):
865         (WebCore::RenderText::computePreferredLogicalWidths):
866         (WebCore::applyTextTransform):
867         * rendering/RenderTextFragment.cpp:
868         (WebCore::RenderTextFragment::styleDidChange):
869         (WebCore::RenderTextFragment::blockForAccompanyingFirstLetter):
870         * rendering/RenderTheme.cpp:
871         (WebCore::RenderTheme::adjustStyle):
872         * rendering/RenderThemeMac.mm:
873         (WebCore::RenderThemeMac::adjustMenuListStyle const):
874         * rendering/RenderThemeWin.cpp:
875         (WebCore::RenderThemeWin::adjustMenuListButtonStyle const):
876         * rendering/RenderView.cpp:
877         (WebCore::rendererObscuresBackground):
878         * rendering/RenderWidget.cpp:
879         (WebCore::RenderWidget::setWidget):
880         (WebCore::RenderWidget::styleDidChange):
881         * rendering/RootInlineBox.cpp:
882         (WebCore::RootInlineBox::paintEllipsisBox const):
883         (WebCore::RootInlineBox::lineSnapAdjustment const):
884         (WebCore::RootInlineBox::lineSelectionGap):
885         (WebCore::RootInlineBox::computeCaretRect const):
886         * rendering/SimpleLineLayout.cpp:
887         (WebCore::SimpleLineLayout::canUseForFontAndText):
888         (WebCore::SimpleLineLayout::canUseForStyle):
889         (WebCore::SimpleLineLayout::computeLineLeft):
890         (WebCore::SimpleLineLayout::updateLineConstrains):
891         (WebCore::SimpleLineLayout::createLineRuns):
892         (WebCore::SimpleLineLayout::textAlignForLine):
893         (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
894         * rendering/SimpleLineLayoutFunctions.cpp:
895         (WebCore::SimpleLineLayout::paintFlow):
896         (WebCore::SimpleLineLayout::hitTestFlow):
897         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
898         (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
899         * rendering/SimpleLineLayoutTextFragmentIterator.h:
900         * rendering/TextDecorationPainter.cpp:
901         (WebCore::textDecorationStyleToStrokeStyle):
902         (WebCore::TextDecorationPainter::paintTextDecoration):
903         (WebCore::collectStylesForRenderer):
904         * rendering/TextDecorationPainter.h:
905         * rendering/line/BreakingContext.h:
906         (WebCore::BreakingContext::BreakingContext):
907         (WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
908         (WebCore::BreakingContext::handleBR):
909         (WebCore::BreakingContext::handleOutOfFlowPositioned):
910         (WebCore::BreakingContext::handleText):
911         (WebCore::BreakingContext::canBreakAtThisPosition):
912         (WebCore::BreakingContext::handleEndOfLine):
913         * rendering/line/LineInlineHeaders.h:
914         (WebCore::shouldCollapseWhiteSpace):
915         * rendering/line/LineWidth.cpp:
916         (WebCore::newFloatShrinksLine):
917         * rendering/mathml/MathOperator.cpp:
918         (WebCore::MathOperator::paint):
919         * rendering/mathml/RenderMathMLFraction.cpp:
920         (WebCore::RenderMathMLFraction::paint):
921         * rendering/mathml/RenderMathMLMath.cpp:
922         (WebCore::RenderMathMLMath::layoutBlock):
923         * rendering/mathml/RenderMathMLMenclose.cpp:
924         (WebCore::RenderMathMLMenclose::paint):
925         * rendering/mathml/RenderMathMLRoot.cpp:
926         (WebCore::RenderMathMLRoot::paint):
927         * rendering/mathml/RenderMathMLToken.cpp:
928         (WebCore::RenderMathMLToken::paint):
929         * rendering/shapes/BoxShape.cpp:
930         (WebCore::computeRoundedRectForBoxShape):
931         * rendering/shapes/ShapeOutsideInfo.cpp:
932         (WebCore::referenceBox):
933         (WebCore::ShapeOutsideInfo::setReferenceBoxLogicalSize):
934         (WebCore::ShapeOutsideInfo::logicalTopOffset const):
935         (WebCore::ShapeOutsideInfo::logicalLeftOffset const):
936         * rendering/style/CounterContent.h:
937         (WebCore::CounterContent::CounterContent):
938         (WebCore::CounterContent::listStyle const):
939         * rendering/style/RenderStyle.cpp:
940         (WebCore::RenderStyle::createAnonymousStyleWithDisplay):
941         (WebCore::RenderStyle::createStyleInheritingFromPseudoStyle):
942         (WebCore::RenderStyle::RenderStyle):
943         (WebCore::RenderStyle::hasUniquePseudoStyle const):
944         (WebCore::RenderStyle::getCachedPseudoStyle const):
945         (WebCore::RenderStyle::addCachedPseudoStyle):
946         (WebCore::RenderStyle::changeRequiresLayout const):
947         (WebCore::requiresPainting):
948         (WebCore::RenderStyle::hyphenString const):
949         (WebCore::RenderStyle::textEmphasisMarkString const):
950         (WebCore::RenderStyle::visitedDependentColor const):
951         (WebCore::RenderStyle::textEmphasisMark const):
952         (WebCore::RenderStyle::setColumnStylesFromPaginationMode):
953         * rendering/style/RenderStyle.h:
954         (WebCore::RenderStyle::setStyleType):
955         (WebCore::RenderStyle::setRTLOrdering):
956         (WebCore::RenderStyle::display const):
957         (WebCore::RenderStyle::visibility const):
958         (WebCore::RenderStyle::textAlign const):
959         (WebCore::RenderStyle::textTransform const):
960         (WebCore::RenderStyle::whiteSpace const):
961         (WebCore::RenderStyle::emptyCells const):
962         (WebCore::RenderStyle::captionSide const):
963         (WebCore::RenderStyle::listStyleType const):
964         (WebCore::RenderStyle::listStylePosition const):
965         (WebCore::RenderStyle::cursor const):
966         (WebCore::RenderStyle::insideLink const):
967         (WebCore::RenderStyle::borderFit const):
968         (WebCore::RenderStyle::pointerEvents const):
969         (WebCore::RenderStyle::setDisplay):
970         (WebCore::RenderStyle::setOriginalDisplay):
971         (WebCore::RenderStyle::setVisibility):
972         (WebCore::RenderStyle::setTextAlign):
973         (WebCore::RenderStyle::setTextTransform):
974         (WebCore::RenderStyle::setTextDecorationStyle):
975         (WebCore::RenderStyle::setTextDecorationSkip):
976         (WebCore::RenderStyle::setTextUnderlinePosition):
977         (WebCore::RenderStyle::setDirection):
978         (WebCore::RenderStyle::setTextZoom):
979         (WebCore::RenderStyle::setWhiteSpace):
980         (WebCore::RenderStyle::setEmptyCells):
981         (WebCore::RenderStyle::setCaptionSide):
982         (WebCore::RenderStyle::setListStyleType):
983         (WebCore::RenderStyle::setListStylePosition):
984         (WebCore::RenderStyle::setCursor):
985         (WebCore::RenderStyle::setCursorVisibility):
986         (WebCore::RenderStyle::setInsideLink):
987         (WebCore::RenderStyle::setHyphens):
988         (WebCore::RenderStyle::setBorderFit):
989         (WebCore::RenderStyle::setColumnAxis):
990         (WebCore::RenderStyle::setColumnProgression):
991         (WebCore::RenderStyle::setTextEmphasisFill):
992         (WebCore::RenderStyle::setTextEmphasisMark):
993         (WebCore::RenderStyle::setRubyPosition):
994         (WebCore::RenderStyle::setBreakBefore):
995         (WebCore::RenderStyle::setBreakAfter):
996         (WebCore::RenderStyle::setBreakInside):
997         (WebCore::RenderStyle::setHangingPunctuation):
998         (WebCore::RenderStyle::setLineSnap):
999         (WebCore::RenderStyle::setLineAlign):
1000         (WebCore::RenderStyle::setPointerEvents):
1001         (WebCore::RenderStyle::initialDisplay):
1002         (WebCore::RenderStyle::initialBreakBetween):
1003         (WebCore::RenderStyle::initialBreakInside):
1004         (WebCore::RenderStyle::initialCaptionSide):
1005         (WebCore::RenderStyle::initialColumnAxis):
1006         (WebCore::RenderStyle::initialColumnProgression):
1007         (WebCore::RenderStyle::initialEmptyCells):
1008         (WebCore::RenderStyle::initialListStylePosition):
1009         (WebCore::RenderStyle::initialListStyleType):
1010         (WebCore::RenderStyle::initialTextTransform):
1011         (WebCore::RenderStyle::initialVisibility):
1012         (WebCore::RenderStyle::initialWhiteSpace):
1013         (WebCore::RenderStyle::initialCursor):
1014         (WebCore::RenderStyle::initialTextAlign):
1015         (WebCore::RenderStyle::initialTextDecorationStyle):
1016         (WebCore::RenderStyle::initialTextZoom):
1017         (WebCore::RenderStyle::initialHyphens):
1018         (WebCore::RenderStyle::initialBorderFit):
1019         (WebCore::RenderStyle::initialRTLOrdering):
1020         (WebCore::RenderStyle::initialPointerEvents):
1021         (WebCore::RenderStyle::initialTextEmphasisColor):
1022         (WebCore::RenderStyle::initialTextEmphasisFill):
1023         (WebCore::RenderStyle::initialTextEmphasisMark):
1024         (WebCore::RenderStyle::initialRubyPosition):
1025         (WebCore::RenderStyle::initialImageResolutionSource):
1026         (WebCore::RenderStyle::initialImageResolutionSnap):
1027         (WebCore::RenderStyle::initialTextAlignLast):
1028         (WebCore::RenderStyle::initialTextJustify):
1029         (WebCore::RenderStyle::initialCursorVisibility):
1030         (WebCore::RenderStyle::initialGridAutoRepeatType):
1031         (WebCore::RenderStyle::initialLineSnap):
1032         (WebCore::RenderStyle::initialLineAlign):
1033         (WebCore::RenderStyle::NonInheritedFlags::hasAnyPublicPseudoStyles const):
1034         (WebCore::RenderStyle::originalDisplay const):
1035         (WebCore::RenderStyle::NonInheritedFlags::hasPseudoStyle const):
1036         (WebCore::RenderStyle::NonInheritedFlags::setHasPseudoStyle):
1037         (WebCore::RenderStyle::NonInheritedFlags::setHasPseudoStyles):
1038         (WebCore::RenderStyle::autoWrap):
1039         (WebCore::RenderStyle::preserveNewline):
1040         (WebCore::RenderStyle::collapseWhiteSpace):
1041         (WebCore::RenderStyle::breakOnlyAfterWhiteSpace const):
1042         (WebCore::RenderStyle::hasInlineColumnAxis const):
1043         (WebCore::RenderStyle::isDisplayRegionType const):
1044         (WebCore::RenderStyle::isDisplayReplacedType):
1045         (WebCore::RenderStyle::isDisplayInlineType):
1046         (WebCore::RenderStyle::isDisplayFlexibleBox):
1047         (WebCore::RenderStyle::isDisplayGridBox):
1048         (WebCore::RenderStyle::isDisplayFlexibleOrGridBox):
1049         (WebCore::pseudoElementRendererIsNeeded):
1050         * rendering/style/RenderStyleConstants.cpp:
1051         (WebCore::operator<<):
1052         (WebCore::alwaysPageBreak):
1053         * rendering/style/RenderStyleConstants.h:
1054         (WebCore::PseudoIdSet::has const):
1055         (WebCore::PseudoIdSet::add):
1056         * rendering/style/ShapeValue.h:
1057         * rendering/style/StyleMultiColData.cpp:
1058         (WebCore::StyleMultiColData::StyleMultiColData):
1059         * rendering/style/StyleRareInheritedData.cpp:
1060         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1061         * rendering/style/StyleRareNonInheritedData.cpp:
1062         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1063         * rendering/style/StyleRareNonInheritedData.h:
1064         * rendering/svg/RenderSVGContainer.cpp:
1065         (WebCore::RenderSVGContainer::paint):
1066         * rendering/svg/RenderSVGImage.cpp:
1067         (WebCore::RenderSVGImage::paint):
1068         (WebCore::RenderSVGImage::nodeAtFloatPoint):
1069         * rendering/svg/RenderSVGInlineText.cpp:
1070         (WebCore::RenderSVGInlineText::styleDidChange):
1071         * rendering/svg/RenderSVGModelObject.cpp:
1072         (WebCore::RenderSVGModelObject::checkIntersection):
1073         (WebCore::RenderSVGModelObject::checkEnclosure):
1074         * rendering/svg/RenderSVGResource.cpp:
1075         (WebCore::requestPaintingResource):
1076         * rendering/svg/RenderSVGResourceClipper.cpp:
1077         (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
1078         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
1079         (WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
1080         * rendering/svg/RenderSVGResourceMasker.cpp:
1081         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
1082         (WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
1083         * rendering/svg/RenderSVGRoot.cpp:
1084         (WebCore::RenderSVGRoot::clippedOverflowRectForRepaint const):
1085         * rendering/svg/RenderSVGShape.cpp:
1086         (WebCore::RenderSVGShape::paint):
1087         (WebCore::RenderSVGShape::nodeAtFloatPoint):
1088         * rendering/svg/RenderSVGText.cpp:
1089         (WebCore::RenderSVGText::nodeAtFloatPoint):
1090         * rendering/svg/SVGInlineTextBox.cpp:
1091         (WebCore::SVGInlineTextBox::paintSelectionBackground):
1092         (WebCore::SVGInlineTextBox::paint):
1093         (WebCore::SVGInlineTextBox::constructTextRun const):
1094         (WebCore::SVGInlineTextBox::paintDecoration):
1095         (WebCore::SVGInlineTextBox::nodeAtPoint):
1096         * rendering/svg/SVGRenderSupport.cpp:
1097         (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
1098         * rendering/svg/SVGRenderingContext.cpp:
1099         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
1100         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
1101         (WebCore::processRenderSVGInlineText):
1102         * rendering/svg/SVGTextMetricsBuilder.cpp:
1103         (WebCore::SVGTextMetricsBuilder::measureTextRenderer):
1104         * rendering/updating/RenderTreeBuilderBlock.cpp:
1105         (WebCore::RenderTreeBuilder::Block::detach):
1106         * rendering/updating/RenderTreeBuilderFirstLetter.cpp:
1107         (WebCore::styleForFirstLetter):
1108         (WebCore::RenderTreeBuilder::FirstLetter::updateAfterDescendants):
1109         (WebCore::RenderTreeBuilder::FirstLetter::updateStyle):
1110         (WebCore::RenderTreeBuilder::FirstLetter::createRenderers):
1111         * rendering/updating/RenderTreeBuilderInline.cpp:
1112         (WebCore::RenderTreeBuilder::Inline::attachIgnoringContinuation):
1113         (WebCore::RenderTreeBuilder::Inline::newChildIsInline):
1114         * rendering/updating/RenderTreeBuilderList.cpp:
1115         (WebCore::RenderTreeBuilder::List::updateItemMarker):
1116         * rendering/updating/RenderTreeBuilderMathML.cpp:
1117         (WebCore::RenderTreeBuilder::MathML::createMathMLOperator):
1118         * rendering/updating/RenderTreeBuilderMultiColumn.cpp:
1119         (WebCore::RenderTreeBuilder::MultiColumn::createFragmentedFlow):
1120         (WebCore::RenderTreeBuilder::MultiColumn::processPossibleSpannerDescendant):
1121         * rendering/updating/RenderTreeBuilderRuby.cpp:
1122         (WebCore::isAnonymousRubyInlineBlock):
1123         (WebCore::isRubyBeforeBlock):
1124         (WebCore::isRubyAfterBlock):
1125         (WebCore::createAnonymousRubyInlineBlock):
1126         * rendering/updating/RenderTreeBuilderTable.cpp:
1127         (WebCore::RenderTreeBuilder::Table::findOrCreateParentForChild):
1128         * rendering/updating/RenderTreeUpdater.cpp:
1129         (WebCore::RenderTreeUpdater::updateBeforeDescendants):
1130         (WebCore::RenderTreeUpdater::updateAfterDescendants):
1131         (WebCore::RenderTreeUpdater::updateElementRenderer):
1132         (WebCore::elementImplicitVisibility):
1133         (WebCore::CheckForVisibilityChange::CheckForVisibilityChange):
1134         (WebCore::CheckForVisibilityChange::~CheckForVisibilityChange):
1135         * rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
1136         (WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement):
1137         * style/InlineTextBoxStyle.cpp:
1138         (WebCore::visualOverflowForDecorations):
1139         * style/StyleChange.cpp:
1140         (WebCore::Style::determineChange):
1141         * style/StyleFontSizeFunctions.cpp:
1142         (WebCore::Style::computedFontSizeFromSpecifiedSize):
1143         * style/StyleResolveForDocument.cpp:
1144         (WebCore::Style::resolveForDocument):
1145         * style/StyleSharingResolver.cpp:
1146         * style/StyleTreeResolver.cpp:
1147         (WebCore::Style::affectsRenderedSubtree):
1148         (WebCore::Style::TreeResolver::resolveElement):
1149         (WebCore::Style::TreeResolver::resolvePseudoStyle):
1150         (WebCore::Style::TreeResolver::parentBoxStyle const):
1151         (WebCore::Style::createInheritedDisplayContentsStyleIfNeeded):
1152         (WebCore::Style::TreeResolver::resolveComposedTree):
1153         * svg/SVGElement.h:
1154         * svg/SVGGElement.cpp:
1155         (WebCore::SVGGElement::createElementRenderer):
1156
1157 2018-05-24  Chris Dumez  <cdumez@apple.com>
1158
1159         Enable subsampling for progressive JPEG images
1160         https://bugs.webkit.org/show_bug.cgi?id=185956
1161
1162         Reviewed by Said Abou-Hallawa.
1163
1164         Enable subsampling for progressive JPEG images now that it is supposed (rdar://problem/5191418).
1165         I verified locally that such images are still loading and do not cause any hang on iOS.
1166
1167         * platform/graphics/cg/ImageDecoderCG.cpp:
1168         (WebCore::ImageDecoderCG::frameAllowSubsamplingAtIndex const):
1169
1170 2018-05-24  Chris Dumez  <cdumez@apple.com>
1171
1172         Reduce copying of FontCascadeDescription objects by moving them around
1173         https://bugs.webkit.org/show_bug.cgi?id=185963
1174
1175         Reviewed by Simon Fraser.
1176
1177         Reduce copying of FontCascadeDescription objects by moving them around when possible.
1178
1179         * css/StyleBuilderCustom.h:
1180         (WebCore::StyleBuilderCustom::applyValueWebkitLocale):
1181         (WebCore::StyleBuilderCustom::applyInitialFontFamily):
1182         (WebCore::StyleBuilderCustom::applyInheritFontFamily):
1183         (WebCore::StyleBuilderCustom::applyValueFontFamily):
1184         (WebCore::StyleBuilderCustom::applyInheritFontVariantLigatures):
1185         (WebCore::StyleBuilderCustom::applyInitialFontVariantLigatures):
1186         (WebCore::StyleBuilderCustom::applyValueFontVariantLigatures):
1187         (WebCore::StyleBuilderCustom::applyInheritFontVariantNumeric):
1188         (WebCore::StyleBuilderCustom::applyInitialFontVariantNumeric):
1189         (WebCore::StyleBuilderCustom::applyValueFontVariantNumeric):
1190         (WebCore::StyleBuilderCustom::applyInheritFontVariantEastAsian):
1191         (WebCore::StyleBuilderCustom::applyInitialFontVariantEastAsian):
1192         (WebCore::StyleBuilderCustom::applyValueFontVariantEastAsian):
1193         (WebCore::StyleBuilderCustom::applyInitialFontSize):
1194         (WebCore::StyleBuilderCustom::applyInheritFontSize):
1195         (WebCore::StyleBuilderCustom::applyInitialFontStyle):
1196         (WebCore::StyleBuilderCustom::applyInheritFontStyle):
1197         (WebCore::StyleBuilderCustom::applyValueFontStyle):
1198         (WebCore::StyleBuilderCustom::applyValueFontSize):
1199         * css/StyleResolver.cpp:
1200         (WebCore::checkForOrientationChange):
1201         (WebCore::StyleResolver::checkForTextSizeAdjust):
1202         (WebCore::StyleResolver::checkForZoomChange):
1203         (WebCore::StyleResolver::checkForGenericFamilyChange):
1204         (WebCore::StyleResolver::initializeFontStyle):
1205         * css/StyleResolver.h:
1206         (WebCore::StyleResolver::State::setFontDescription):
1207         (WebCore::StyleResolver::setFontDescription):
1208         * css/makeprop.pl:
1209         (generateInitialValueSetter):
1210         (generateInheritValueSetter):
1211         (generateValueSetter):
1212         * html/canvas/CanvasRenderingContext2D.cpp:
1213         (WebCore::CanvasRenderingContext2D::setFont):
1214         * page/DebugPageOverlays.cpp:
1215         (WebCore::NonFastScrollableRegionOverlay::drawRect):
1216         * page/linux/ResourceUsageOverlayLinux.cpp:
1217         * platform/graphics/FontCascade.cpp:
1218         (WebCore::FontCascade::FontCascade):
1219         * platform/graphics/FontCascade.h:
1220         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1221         (PlatformCALayerWin::drawTextAtPoint const):
1222         * platform/mock/MockRealtimeVideoSource.cpp:
1223         (WebCore::MockRealtimeVideoSource::drawText):
1224         * platform/win/DragImageWin.cpp:
1225         (WebCore::dragLabelFont):
1226         * platform/win/PopupMenuWin.cpp:
1227         (WebCore::PopupMenuWin::calculatePositionAndSize):
1228         (WebCore::PopupMenuWin::paint):
1229         * rendering/RenderBox.cpp:
1230         (WebCore::RenderBox::styleDidChange):
1231         * rendering/RenderCombineText.cpp:
1232         (WebCore::RenderCombineText::combineTextIfNeeded):
1233         * rendering/RenderEmbeddedObject.cpp:
1234         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry const):
1235         * rendering/RenderListBox.cpp:
1236         (WebCore::bolder):
1237         (WebCore::RenderListBox::paintItemForeground):
1238         * rendering/RenderListItem.cpp:
1239         (WebCore::RenderListItem::computeMarkerStyle const):
1240         * rendering/RenderTheme.cpp:
1241         (WebCore::RenderTheme::adjustStyle):
1242         * rendering/RenderThemeMac.mm:
1243         (WebCore::RenderThemeMac::setFontFromControlSize const):
1244         * rendering/TextAutoSizing.cpp:
1245         (WebCore::TextAutoSizingValue::adjustTextNodeSizes):
1246         (WebCore::TextAutoSizingValue::reset):
1247         * rendering/style/RenderStyle.cpp:
1248         (WebCore::RenderStyle::setFontDescription):
1249         (WebCore::RenderStyle::setFontSize):
1250         (WebCore::RenderStyle::setFontVariationSettings):
1251         (WebCore::RenderStyle::setFontWeight):
1252         (WebCore::RenderStyle::setFontStretch):
1253         (WebCore::RenderStyle::setFontItalic):
1254         * rendering/style/RenderStyle.h:
1255         * rendering/svg/RenderSVGInlineText.cpp:
1256         (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
1257         * rendering/updating/RenderTreeBuilderFirstLetter.cpp:
1258         (WebCore::styleForFirstLetter):
1259         * style/StyleResolveForDocument.cpp:
1260         (WebCore::Style::resolveForDocument):
1261
1262 2018-05-24  Chris Dumez  <cdumez@apple.com>
1263
1264         Avoid constructing the string "all" repeatedly in MediaQueryParser
1265         https://bugs.webkit.org/show_bug.cgi?id=185961
1266
1267         Reviewed by Simon Fraser.
1268
1269         Avoid constructing the string "all" repeatedly in MediaQueryParser by:
1270         - Having MediaQueryData use an std::optional<String> instead of a String
1271         - Updating MediaQueryParser to use a static to store the default media type
1272           and use it when the MediaQueryData's media type is std::nullopt.
1273
1274         Also do some cleanup.
1275
1276         * css/parser/MediaQueryParser.cpp:
1277         (WebCore::MediaQueryParser::commitMediaQuery):
1278         (WebCore::MediaQueryParser::MediaQueryData::MediaQueryData):
1279         (WebCore::MediaQueryParser::MediaQueryData::clear):
1280         (WebCore::MediaQueryParser::MediaQueryData::addExpression):
1281         (WebCore::MediaQueryParser::MediaQueryData::lastExpressionValid):
1282         (WebCore::MediaQueryParser::MediaQueryData::removeLastExpression):
1283         * css/parser/MediaQueryParser.h:
1284         (WebCore::MediaQueryParser::MediaQueryData::setMediaType):
1285         (WebCore::MediaQueryParser::MediaQueryData::restrictor const):
1286         (WebCore::MediaQueryParser::MediaQueryData::expressions):
1287         (WebCore::MediaQueryParser::MediaQueryData::mediaType const):
1288         (WebCore::MediaQueryParser::MediaQueryData::currentMediaQueryChanged const):
1289         (WebCore::MediaQueryParser::MediaQueryData::restrictor):
1290         (WebCore::MediaQueryParser::MediaQueryData::setRestrictor):
1291         (WebCore::MediaQueryParser::MediaQueryData::setMediaFeature):
1292         (WebCore::MediaQueryParser::MediaQueryData::setMediaQueryParserContext):
1293
1294 2018-05-24  Joseph Pecoraro  <pecoraro@apple.com>
1295
1296         [iOS] Hard link AppSupport instead of soft linking
1297         https://bugs.webkit.org/show_bug.cgi?id=185959
1298         <rdar://problem/40506538>
1299
1300         Reviewed by Timothy Horton.
1301
1302         * Configurations/WebCore.xcconfig:
1303         * platform/network/ios/NetworkStateNotifierIOS.mm:
1304         (-[WebNetworkStateObserver initWithBlock:]):
1305         (WebCore::NetworkStateNotifier::updateStateWithoutNotifying):
1306
1307 2018-05-24  Chris Dumez  <cdumez@apple.com>
1308
1309         Cache navigator.userAgent for performance
1310         https://bugs.webkit.org/show_bug.cgi?id=185952
1311
1312         Reviewed by Geoffrey Garen.
1313
1314         Cache navigator.userAgent for performance. Previously, we would ask the client 5 times
1315         while loading apple.com.
1316
1317         * page/Navigator.cpp:
1318         (WebCore::Navigator::userAgent const):
1319         * page/Navigator.h:
1320         * page/NavigatorBase.h:
1321         * page/NavigatorID.idl:
1322         * page/WorkerNavigator.cpp:
1323         (WebCore::WorkerNavigator::userAgent const):
1324         * page/WorkerNavigator.h:
1325
1326 2018-05-24  Chris Dumez  <cdumez@apple.com>
1327
1328         Some of the work in initializeLogChannelsIfNecessary() is unnecessary for release builds
1329         https://bugs.webkit.org/show_bug.cgi?id=185951
1330
1331         Reviewed by Geoffrey Garen.
1332
1333         Some of the work in initializeLogChannelsIfNecessary() is unnecessary for release builds and slows down
1334         launch time. In particular, it is unnecessary to read NSDefaults to figure out which logging channels
1335         should be enabled.
1336
1337         * platform/mac/LoggingMac.mm:
1338         (WebCore::logLevelString):
1339         * platform/unix/LoggingUnix.cpp:
1340         (WebCore::logLevelString):
1341         * platform/win/LoggingWin.cpp:
1342         (WebCore::logLevelString):
1343
1344 2018-05-24  Chris Dumez  <cdumez@apple.com>
1345
1346         [iOS WK2] Layout Test imported/w3c/web-platform-tests/service-workers/service-worker/update-after-navigation-fetch-event.https.html is a flaky failure
1347         https://bugs.webkit.org/show_bug.cgi?id=181499
1348         <rdar://problem/36443428>
1349
1350         Reviewed by Youenn Fablet.
1351
1352         After resolving a registration promise, we send an IPC back to the StorageProcess
1353         for synchronization purposes, to make sure the registration does not get updated
1354         before the promise's JS code has been executed. However, resolving a promise
1355         schedules a microtask to run the JS and we would therefore send the IPC back too
1356         early, thus causing flakiness. We now only send the IPC back back only after that
1357         microtask has run and the JS has been executed.
1358
1359         * bindings/js/JSDOMPromiseDeferred.cpp:
1360         (WebCore::DeferredPromise::callFunction):
1361         (WebCore::DeferredPromise::whenSettled):
1362         * bindings/js/JSDOMPromiseDeferred.h:
1363         * workers/service/ServiceWorkerContainer.cpp:
1364         (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
1365
1366 2018-05-24  Jinho Bang  <zino@chromium.org>
1367
1368         [PaymentRequest] Remove currencySystem member
1369         https://bugs.webkit.org/show_bug.cgi?id=185860
1370
1371         Reviewed by Andy Estes.
1372
1373         After a long discussion, Web Payment Working Group decided to remove
1374         the `currencySystem` member[1]. The currency code should be well-formed
1375         3-letter alphabetic code and is allowed even if that is not part of
1376         the official ISO 4217 list.
1377
1378         [1] https://github.com/w3c/payment-request/pull/694
1379
1380         Test: http/tests/inspector/paymentrequest/payment-request-internal-properties.https.html
1381
1382         * Modules/paymentrequest/PaymentCurrencyAmount.h:
1383         * Modules/paymentrequest/PaymentCurrencyAmount.idl:
1384         * Modules/paymentrequest/PaymentRequest.cpp:
1385         (WebCore::checkAndCanonicalizeAmount):
1386         (WebCore::checkAndCanonicalizeTotal):
1387         * inspector/WebInjectedScriptHost.cpp:
1388         (WebCore::objectForPaymentCurrencyAmount):
1389
1390 2018-05-24  Zalan Bujtas  <zalan@apple.com>
1391
1392         [LFC] Implement position computation for inflow positioned elements
1393         https://bugs.webkit.org/show_bug.cgi?id=185936
1394
1395         Reviewed by Antti Koivisto.
1396
1397         * layout/blockformatting/BlockFormattingContext.cpp:
1398         (WebCore::Layout::BlockFormattingContext::computeInFlowPositionedPosition const):
1399         * layout/blockformatting/BlockFormattingContext.h:
1400         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
1401         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowPositionedPosition):
1402
1403 2018-05-24  Zalan Bujtas  <zalan@apple.com>
1404
1405         [LFC] Implement FormattingContext::placeInFlowPositionedChildren
1406         https://bugs.webkit.org/show_bug.cgi?id=185934
1407
1408         Reviewed by Antti Koivisto.
1409
1410         * layout/FormattingContext.cpp:
1411         (WebCore::Layout::FormattingContext::computeInFlowPositionedPosition const):
1412         (WebCore::Layout::FormattingContext::placeInFlowPositionedChildren const):
1413         * layout/FormattingContext.h:
1414         * layout/blockformatting/BlockFormattingContext.cpp:
1415         (WebCore::Layout::BlockFormattingContext::layout const):
1416
1417 2018-05-23  Joseph Pecoraro  <pecoraro@apple.com>
1418
1419         Use ASCIILiteral with applicationBundleIsEqualTo in RuntimeApplicationChecksCocoa
1420         https://bugs.webkit.org/show_bug.cgi?id=185935
1421
1422         Reviewed by Yusuke Suzuki.
1423
1424         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
1425         (WebCore::MacApplication::isSafari):
1426         (WebCore::MacApplication::isAppleMail):
1427         (WebCore::MacApplication::isIBooks):
1428         (WebCore::MacApplication::isITunes):
1429         (WebCore::MacApplication::isMicrosoftMessenger):
1430         (WebCore::MacApplication::isAdobeInstaller):
1431         (WebCore::MacApplication::isAOLInstantMessenger):
1432         (WebCore::MacApplication::isMicrosoftMyDay):
1433         (WebCore::MacApplication::isMicrosoftOutlook):
1434         (WebCore::MacApplication::isQuickenEssentials):
1435         (WebCore::MacApplication::isAperture):
1436         (WebCore::MacApplication::isVersions):
1437         (WebCore::MacApplication::isHRBlock):
1438         (WebCore::MacApplication::isIAdProducer):
1439         (WebCore::MacApplication::isSolidStateNetworksDownloader):
1440         (WebCore::IOSApplication::isMobileMail):
1441         (WebCore::IOSApplication::isMobileSafari):
1442         (WebCore::IOSApplication::isWebBookmarksD):
1443         (WebCore::IOSApplication::isDumpRenderTree):
1444         (WebCore::IOSApplication::isMobileStore):
1445         (WebCore::IOSApplication::isSpringBoard):
1446         (WebCore::IOSApplication::isWebApp):
1447         (WebCore::IOSApplication::isIBooks):
1448         (WebCore::IOSApplication::isIBooksStorytime):
1449         (WebCore::IOSApplication::isTheSecretSocietyHiddenMystery):
1450         (WebCore::IOSApplication::isCardiogram):
1451         (WebCore::IOSApplication::isNike):
1452
1453 2018-05-23  Brent Fulgham  <bfulgham@apple.com>
1454
1455         Avoid keeping FormState alive longer than necessary
1456         https://bugs.webkit.org/show_bug.cgi?id=185877
1457         <rdar://problem/39329219>
1458
1459         Reviewed by Ryosuke Niwa.
1460
1461         A number of crash fixes were done to prevent FormState objects from being
1462         accessed after their relevant Frames had been destroyed. Unfortunately, this
1463         could cause the FormState to persist after the owning Frame had been
1464         destroyed, resulting in nullptr dereferences.
1465
1466         This patch does the following:
1467
1468         1. Uses WeakPtr's for FormState objects passed to completion handlers, rather
1469            than RefPtr, since those completion handlers might fire as part of the
1470            clean-up process during Frame destruction. This allows us to use the FormState
1471            if they are still valid, but gracefully handle cases where a form submission
1472            is cancelled in-flight.
1473         2. Moves FormState object as they pass through the loader.
1474         3. Removes some extraneous WTFMove() calls being made on bare FormState pointers.
1475         4. Changes FormSubmission to hold a RefPtr so we can move the FormState to the
1476            loader in the code path that uses it (the FormSubmission is always destroyed
1477            shortly afterwards).
1478         5. Changes the trap from Bug 183704 so that it only fires if the FormState object
1479            is being retained more than once.
1480
1481         * loader/DocumentLoader.cpp:
1482         (WebCore::DocumentLoader::willSendRequest): Update for new CompletionHandler
1483         signature.
1484         * loader/FormState.cpp:
1485         (WebCore::FormState::willDetachPage): Revise trap to check for retain counts
1486         above one.
1487         * loader/FormState.h:
1488         (WebCore::FormState::weakPtrFactory const): Added.
1489         * loader/FormSubmission.h:
1490         (WebCore::FormSubmission::state const): Revised for change to RefPtr.
1491         (WebCore::FormSubmission::takeState): Added.
1492         * loader/FrameLoader.cpp:
1493         (WebCore::FrameLoader::urlSelected): Update for new CompletionHandler signature.
1494         (WebCore::FrameLoader::loadURLIntoChildFrame): Ditto.
1495         (WebCore::FrameLoader::loadFrameRequest): Ditto.
1496         (WebCore::FrameLoader::loadURL): Ditto.
1497         (WebCore::FrameLoader::load): Ditto.
1498         (WebCore::FrameLoader::loadWithNavigationAction): Ditto.
1499         (WebCore::FrameLoader::loadWithDocumentLoader): Ditto.
1500         (WebCore::FrameLoader::reloadWithOverrideEncoding): Ditto.
1501         (WebCore::FrameLoader::reload): Ditto.
1502         (WebCore::FrameLoader::loadPostRequest): Ditto.
1503         (WebCore::FrameLoader::loadDifferentDocumentItem): Ditto.
1504         * loader/FrameLoader.h:
1505         * loader/NavigationScheduler.cpp:
1506         * loader/PolicyChecker.cpp:
1507         (WebCore::PolicyChecker::checkNavigationPolicy):Revise to use WeakPtr for
1508         FormState passed to the completion handler. Remove some extraneous WTFMove()
1509         calls on bare pointers.
1510         (WebCore::PolicyChecker::checkNewWindowPolicy): Ditto.
1511         * loader/PolicyChecker.h:
1512         * page/ContextMenuController.cpp:
1513         (WebCore::openNewWindow): Revise for new signatures.
1514         (WebCore::ContextMenuController::contextMenuItemSelected): Ditto.
1515
1516 2018-05-23  Keith Miller  <keith_miller@apple.com>
1517
1518         Expose $vm if window.internals is exposed
1519         https://bugs.webkit.org/show_bug.cgi?id=185900
1520
1521         Reviewed by Mark Lam.
1522
1523         This is useful for testing vm internals when running LayoutTests.
1524
1525         * testing/js/WebCoreTestSupport.cpp:
1526         (WebCoreTestSupport::injectInternalsObject):
1527
1528 2018-05-23  David Kilzer  <ddkilzer@apple.com>
1529
1530         Don't create the SubimageCache just to clear an image from it
1531         <https://webkit.org/b/185757>
1532
1533         Reviewed by Said Abou-Hallawa.
1534
1535         To fix this we make SubimageCacheWithTimer::clearImage() a
1536         static class method that checks whether the cache exists before
1537         removing it.  We also make SubimageCacheWithTimer::getImage() a
1538         static class method, and move more methods into the
1539         SubimageCacheWithTimer class and make them private to reduce API
1540         footprint.
1541
1542         * platform/graphics/cg/GraphicsContextCG.cpp:
1543         (WebCore::GraphicsContext::drawNativeImage): Switch to use new
1544         SubimageCacheWithTimer::getSubimage() static class method.
1545         * platform/graphics/cg/NativeImageCG.cpp:
1546         (WebCore::clearNativeImageSubimages): Switch to use new
1547         SubimageCacheWithTimer::clearImage() static class method which
1548         returns early if the subimage cache has not been created yet.
1549         This fixes the bug.
1550
1551         * platform/graphics/cg/SubimageCacheWithTimer.cpp:
1552         (WebCore::SubimageCacheWithTimer::s_cache): Allocate space for
1553         static class variable.
1554         (WebCore::SubimageCacheWithTimer::getSubimage): Replace instance
1555         method with new static class method that gets the subimage cache
1556         singleton and calls the subimage() instance method.
1557         (WebCore::SubimageCacheWithTimer::clearImage): Replace instance
1558         methdod with new static class method that returns early if the
1559         static cache singleton doesn't exist (fixes the bug), otherwise
1560         calls the clearImageAndSubimages() instance method.
1561         (WebCore::SubimageCacheWithTimer::subimage): Rename from
1562         getSubimage().  Use `auto` after renaming SubimageCache typedef
1563         to SubimageCacheHashSet.
1564         (WebCore::SubimageCacheWithTimer::clearImageAndSubimages):
1565         Rename from clearImage().  Modernize loops.
1566         (WebCore::SubimageCacheWithTimer::subimageCache): Change
1567         WebCore::subimageCache() to a static class method that creates
1568         the subimage cache singleton if it doesn't exist yet, and
1569         returns it.
1570         (WebCore::SubimageCacheWithTimer::subimageCacheExists): Add.
1571         Returns false if the subimage cache singleton has not been
1572         created yet.
1573
1574         * platform/graphics/cg/SubimageCacheWithTimer.h:
1575         - Rename typedef SubimageCache to SubimageCacheHashSet to avoid
1576           general confusion.
1577         (WebCore::SubimageCacheWithTimer::getSubimage):
1578         (WebCore::SubimageCacheWithTimer::clearImage):
1579         - Change to static class methods.
1580         (WebCore::SubimageCacheWithTimer::SubimageCacheWithTimer):
1581         - Make private.
1582         (WebCore::SubimageCacheWithTimer::subimage):
1583         - Rename from getSubimage() and make private.
1584         (WebCore::SubimageCacheWithTimer::clearImageAndSubimages):
1585         - Rename from clearImage() and make private.
1586         (WebCore::SubimageCacheWithTimer::subimageCache):
1587         - Rename from WebCore::subimageCache() and make a private static
1588           class method.
1589         (WebCore::SubimageCacheWithTimer::subimageCacheExists):
1590         - Add private static class method.
1591         (WebCore::SubimageCacheWithTimer::s_cache):
1592         - Declare private static variable to hold singleton.
1593
1594 2018-05-23  Eric Carlson  <eric.carlson@apple.com>
1595
1596         Avoid loading AVFoundation to check supported MIME types if possible
1597         https://bugs.webkit.org/show_bug.cgi?id=185839
1598         <rdar://problem/40182010>
1599
1600         Reviewed by Jer Noble.
1601
1602         Avoid loading AVFoundation to call +[AVURLAssetClass audiovisualMIMETypes] as long as possible,
1603         and when they are loaded send the list to the UI process so it can pass it to all extant
1604         and all new web processes so they can won't have call it at all.
1605
1606         * WebCore.xcodeproj/project.pbxproj:
1607         * platform/graphics/ImageDecoder.cpp:
1608         (WebCore::ImageDecoder::create): Don't call ImageDecoderAVFObjC::canDecodeType if 
1609         ImageDecoderCG can decode the type so we don't have to load AVFoundation.
1610         (WebCore::ImageDecoder::supportsMediaType): Return as soon as a decoder class says
1611         it supports a media type to avoid calling more than one. Call ImageDecoderAVFObjC last.
1612
1613         * platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.h:
1614         (WebCore::AVFoundationMIMETypeCache::setCacheMIMETypesCallback):
1615         * platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm:
1616         (WebCore::AVFoundationMIMETypeCache::singleton): Simplify.
1617         (WebCore::AVFoundationMIMETypeCache::setSupportedTypes): Cache the supplied list of types
1618         so we won't have to load AVFoundation when asked for types later.
1619         (WebCore::AVFoundationMIMETypeCache::types):
1620         (WebCore::AVFoundationMIMETypeCache::supportsContentType): New convenience routine.
1621         (WebCore::AVFoundationMIMETypeCache::canDecodeType): Ditto.
1622         (WebCore::AVFoundationMIMETypeCache::isAvailable const): New, check to see if AVFoundation.framework
1623         is available without actually loading it.
1624         (WebCore::AVFoundationMIMETypeCache::loadMIMETypes): Load types if possible.
1625         (WebCore::AVFoundationMIMETypeCache::AVFoundationMIMETypeCache): Deleted.
1626         (WebCore::AVFoundationMIMETypeCache::loadTypes): Deleted.
1627
1628         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
1629         (WebCore::ImageDecoderAVFObjC::create): Use AVFoundationMIMETypeCache::isAvailable instead
1630         of loading the frameworks.
1631         (WebCore::ImageDecoderAVFObjC::supportsMediaType): Ditto.
1632         (WebCore::ImageDecoderAVFObjC::supportsContentType): Use AVFoundationMIMETypeCache::supportsContentType.
1633         (WebCore::ImageDecoderAVFObjC::canDecodeType): Use AVFoundationMIMETypeCache::canDecodeType.
1634
1635         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1636         (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine): ASSERT if the 
1637         AVFoundationMIMETypeCache is empty, it shouldn't be possible to get here in that state.
1638         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType): Use AVFoundationMIMETypeCache::supportsContentType.
1639         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem): Use AVFoundationMIMETypeCache::canDecodeType.
1640
1641         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1642         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine): ASSERT if the 
1643         AVFoundationMIMETypeCache is empty, it shouldn't be possible to get here in that state.
1644         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType): Use AVFoundationMIMETypeCache::canDecodeType.
1645
1646         * platform/graphics/cg/ImageDecoderCG.cpp:
1647         (WebCore::ImageDecoderCG::canDecodeType): New.
1648         * platform/graphics/cg/ImageDecoderCG.h:
1649
1650 2018-05-23  Chris Dumez  <cdumez@apple.com>
1651
1652         RenderLayer::scrollRectToVisible() should not propagate a subframe's scroll to its cross-origin parent
1653         https://bugs.webkit.org/show_bug.cgi?id=185664
1654         <rdar://problem/36185260>
1655
1656         Reviewed by Simon Fraser.
1657
1658         RenderLayer::scrollRectToVisible() should not propagate a subframe's scroll to its
1659         cross-origin parent. There was logic in FrameLoader::scrollToFragmentWithParentBoundary()
1660         to temporarily set the 'safeToPropagateScrollToParent' flag to false on the cross-origin
1661         ancestor frame during the call to FrameView::scrollToFragment(). This would correctly
1662         prevent RenderLayer::scrollRectToVisible() to propagate the scroll to the cross-origin
1663         ancestor frame when scrollRectToVisible() is called synchronously. However,
1664         scrollRectToVisible() can get called asynchronously in case of a dirty layout, as part
1665         of the post layout tasks.
1666
1667         To address the issue, we get rid of the safeToPropagateScrollToParent flag on FrameView
1668         and instead update FrameView::safeToPropagateScrollToParent() to do the cross-origin
1669         check. FrameView::safeToPropagateScrollToParent() is called by RenderLayer::scrollRectToVisible()
1670         and this is a lot more robust than relying on a flag which gets temporarily set.
1671
1672         Test: http/tests/navigation/fragment-navigation-cross-origin-subframe-no-scrolling-parent.html
1673
1674         * dom/Document.cpp:
1675         * dom/Document.h:
1676         * loader/FrameLoader.cpp:
1677         (WebCore::FrameLoader::scrollToFragmentWithParentBoundary):
1678         * page/FrameView.cpp:
1679         (WebCore::FrameView::FrameView):
1680         (WebCore::FrameView::reset):
1681         (WebCore::FrameView::safeToPropagateScrollToParent const):
1682         * page/FrameView.h:
1683
1684 2018-05-23  Youenn Fablet  <youenn@apple.com>
1685
1686         NetworkLoadChecker should check cached redirections
1687         https://bugs.webkit.org/show_bug.cgi?id=185849
1688
1689         Reviewed by Chris Dumez.
1690
1691         Covered by rebased tests.
1692
1693         * loader/SubresourceLoader.cpp:
1694         (WebCore::SubresourceLoader::willSendRequestInternal):
1695        Log the case of a redirection with fetch error mode.
1696
1697 2018-05-23  Nan Wang  <n_wang@apple.com>
1698
1699         AX: setValue on contenteditable should preserve whitespace
1700         https://bugs.webkit.org/show_bug.cgi?id=185897
1701
1702         Reviewed by Chris Fleizach.
1703
1704         RenderText is using its parent renderer's style to determine if
1705         whitespace collapsing is necessary. So when setting the innerText
1706         of the element in setValue, let's also set its style in order to 
1707         preserve whitespaces.
1708
1709         Modified an existing test to cover this change.
1710
1711         * accessibility/AccessibilityRenderObject.cpp:
1712         (WebCore::AccessibilityRenderObject::setValue):
1713
1714 2018-05-23  Michael Catanzaro  <mcatanzaro@igalia.com>
1715
1716         [GTK] Silence GCC 8 warnings
1717         https://bugs.webkit.org/show_bug.cgi?id=185556
1718
1719         Reviewed by Žan Doberšek.
1720
1721         Silence remaining -Wcast-function-type warnings by casting through void (*)(void), aka
1722         GCallback.
1723
1724         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
1725         (webkitAccessibleHyperlinkSetProperty):
1726         (webkitAccessibleHyperlinkGetType):
1727         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1728         (webkitAccessibleGetType):
1729         * platform/network/soup/NetworkStorageSessionSoup.cpp:
1730         (WebCore::NetworkStorageSession::getCredentialFromPersistentStorage):
1731
1732 2018-05-23  Zalan Bujtas  <zalan@apple.com>
1733
1734         [LFC] Move sizing/positioning logic to helper classes
1735         https://bugs.webkit.org/show_bug.cgi?id=185898
1736
1737         Reviewed by Antti Koivisto.
1738
1739         The idea here is to move all the sizing and positioning logic to helper classes so that
1740         the formatting context code stays lean.
1741         This is similar to the dedicated BlockMarginCollapse class for the collapsing logic.
1742         The helper classes have only static functions. These static functions do not mutate the associated DisplayBoxes,
1743         but instead they simply retun the computed values.
1744
1745         * Sources.txt:
1746         * WebCore.xcodeproj/project.pbxproj:
1747         * layout/FormattingContext.cpp:
1748         (WebCore::Layout::FormattingContext::computeOutOfFlowPosition const):
1749         (WebCore::Layout::FormattingContext::computeOutOfFlowWidth const):
1750         (WebCore::Layout::FormattingContext::computeFloatingWidth const):
1751         (WebCore::Layout::FormattingContext::computeOutOfFlowHeight const):
1752         (WebCore::Layout::FormattingContext::computeFloatingHeight const):
1753         (WebCore::Layout::FormattingContext::computeOutOfFlowNonReplacedHeight const): Deleted.
1754         (WebCore::Layout::FormattingContext::computeFloatingNonReplacedHeight const): Deleted.
1755         (WebCore::Layout::FormattingContext::computeReplacedHeight const): Deleted.
1756         (WebCore::Layout::FormattingContext::computeReplacedWidth const): Deleted.
1757         (WebCore::Layout::FormattingContext::contentHeightForFormattingContextRoot const): Deleted.
1758         (WebCore::Layout::FormattingContext::computeFloatingNonReplacedWidth const): Deleted.
1759         (WebCore::Layout::FormattingContext::computeOutOfFlowNonReplacedWidth const): Deleted.
1760         (WebCore::Layout::FormattingContext::computeOutOfFlowReplacedHeight const): Deleted.
1761         (WebCore::Layout::FormattingContext::computeOutOfFlowReplacedWidth const): Deleted.
1762         (WebCore::Layout::FormattingContext::computeOutOfFlowNonReplacedPosition const): Deleted.
1763         (WebCore::Layout::FormattingContext::computeOutOfFlowReplacedPosition const): Deleted.
1764         (WebCore::Layout::FormattingContext::shrinkToFitWidth const): Deleted.
1765         * layout/FormattingContext.h:
1766         * layout/FormattingContextGeometry.cpp: Copied from Source/WebCore/layout/FormattingContext.cpp.
1767         (WebCore::Layout::contentHeightForFormattingContextRoot):
1768         (WebCore::Layout::shrinkToFitWidth):
1769         (WebCore::Layout::FormattingContextGeometry::outOfFlowNonReplacedHeight):
1770         (WebCore::Layout::FormattingContextGeometry::outOfFlowNonReplacedWidth):
1771         (WebCore::Layout::FormattingContextGeometry::outOfFlowReplacedHeight):
1772         (WebCore::Layout::FormattingContextGeometry::outOfFlowReplacedWidth):
1773         (WebCore::Layout::FormattingContextGeometry::floatingNonReplacedHeight):
1774         (WebCore::Layout::FormattingContextGeometry::floatingNonReplacedWidth):
1775         (WebCore::Layout::FormattingContextGeometry::floatingReplacedHeight):
1776         (WebCore::Layout::FormattingContextGeometry::floatingReplacedWidth):
1777         (WebCore::Layout::FormattingContextGeometry::outOfFlowNonReplacedPosition):
1778         (WebCore::Layout::FormattingContextGeometry::outOfFlowReplacedPosition):
1779         (WebCore::Layout::FormattingContextGeometry::replacedHeight):
1780         (WebCore::Layout::FormattingContextGeometry::replacedWidth):
1781         * layout/FormattingContextGeometry.h: Copied from Source/WebCore/layout/blockformatting/BlockFormattingContext.h.
1782         * layout/blockformatting/BlockFormattingContext.cpp:
1783         (WebCore::Layout::BlockFormattingContext::computeStaticPosition const):
1784         (WebCore::Layout::BlockFormattingContext::computeInFlowHeight const):
1785         (WebCore::Layout::BlockFormattingContext::computeInFlowWidth const):
1786         (WebCore::Layout::BlockFormattingContext::computeInFlowNonReplacedWidth const): Deleted.
1787         (WebCore::Layout::BlockFormattingContext::computeInFlowNonReplacedHeight const): Deleted.
1788         * layout/blockformatting/BlockFormattingContext.h:
1789         * layout/blockformatting/BlockFormattingContextGeometry.cpp: Added.
1790         (WebCore::Layout::BlockFormattingContextGeometry::inFlowNonReplacedHeight):
1791         (WebCore::Layout::BlockFormattingContextGeometry::inFlowNonReplacedWidth):
1792         (WebCore::Layout::BlockFormattingContextGeometry::inFlowReplacedHeight):
1793         (WebCore::Layout::BlockFormattingContextGeometry::inFlowReplacedWidth):
1794         (WebCore::Layout::BlockFormattingContextGeometry::staticPosition):
1795         * layout/blockformatting/BlockFormattingContextGeometry.h: Copied from Source/WebCore/layout/blockformatting/BlockFormattingContext.h.
1796         * layout/displaytree/DisplayBox.h:
1797
1798 2018-05-23  Antti Koivisto  <antti@apple.com>
1799
1800         Page keeps reloading when viewing photos in google drive (due to too high canvas memory limits)
1801         https://bugs.webkit.org/show_bug.cgi?id=185903
1802         <rdar://problem/38420562>
1803
1804         Reviewed by Simon Fraser.
1805
1806         The canvas memory usage limits don't work on iOS since the current 2GB minimum limit is
1807         larger than the maximum process size.
1808
1809         * html/HTMLCanvasElement.cpp:
1810         (WebCore::maxActivePixelMemory):
1811
1812         Always base this on the reported ramSize() on iOS. Make it still fairly large to not risk breaking
1813         any currently working content. In practice the limit computes to 448MB on device at the moment.
1814
1815 2018-05-23  Zalan Bujtas  <zalan@apple.com>
1816
1817         [LFC] Implement positioning for replaced out-of-flow elements
1818         https://bugs.webkit.org/show_bug.cgi?id=185902
1819
1820         Reviewed by Antti Koivisto.
1821
1822         * layout/FormattingContext.cpp:
1823         (WebCore::Layout::FormattingContext::computeOutOfFlowReplacedPosition const):
1824
1825 2018-05-22  Myles C. Maxfield  <mmaxfield@apple.com>
1826
1827         Text can wrap between hyphens and commas
1828         https://bugs.webkit.org/show_bug.cgi?id=185899
1829         <rdar://problem/40118983>
1830
1831         Reviewed by Zalan Bujtas.
1832
1833         Chrome, Firefox, and ICU all agree that text shouldn't wrap there.
1834
1835         Test: fast/text/line-break-hyphen-comma.html
1836
1837         * rendering/BreakLines.cpp:
1838
1839 2018-05-22  Simon Fraser  <simon.fraser@apple.com>
1840
1841         Add notifyutil callbacks to dump the memory cache, and the list of live Pages and Documents
1842         https://bugs.webkit.org/show_bug.cgi?id=185853
1843
1844         Reviewed by Keith Miller.
1845
1846         Add a notifyutil callback to dump the PageCache, which dumps the stats, and the list of live pages.
1847         This can be invoked on iOS and macOS via "notifyutil -p com.apple.WebKit.showPageCache".
1848         
1849         Add a notifyutil callback that dumps the list of all Pages, and the list of all Documents, with
1850         Document pointer address and URL.
1851         This can be invoked on iOS and macOS via "notifyutil -p com.apple.WebKit.showAllDocuments".
1852
1853         * history/PageCache.cpp:
1854         (WebCore::PageCache::PageCache):
1855         (WebCore::PageCache::dump const):
1856         * history/PageCache.h:
1857         * loader/cache/CachedResource.h:
1858         (WebCore::CachedResource::numberOfClients const):
1859         (WebCore::CachedResource::count const): Deleted.
1860         * loader/cache/MemoryCache.cpp:
1861         (WebCore::MemoryCache::MemoryCache):
1862         (WebCore::MemoryCache::pruneLiveResourcesToSize):
1863         (WebCore::MemoryCache::dumpStats):
1864         (WebCore::MemoryCache::dumpLRULists const):
1865         * loader/cache/MemoryCache.h:
1866         * page/mac/PageMac.mm:
1867         (WebCore::Page::platformInitialize):
1868
1869 2018-05-22  Dean Jackson  <dino@apple.com>
1870
1871         Optimized path zoom animation needs a valid UIImage and CGRect
1872         https://bugs.webkit.org/show_bug.cgi?id=185883
1873         <rdar://problem/40306056>
1874
1875         Build fix.
1876
1877         * loader/FrameLoadRequest.h:
1878
1879 2018-05-22  Commit Queue  <commit-queue@webkit.org>
1880
1881         Unreviewed, rolling out r232081.
1882         https://bugs.webkit.org/show_bug.cgi?id=185895
1883
1884         Broke two API tests (Requested by bfulgham_ on #webkit).
1885
1886         Reverted changeset:
1887
1888         "Avoid keeping FormState alive longer than necessary"
1889         https://bugs.webkit.org/show_bug.cgi?id=185877
1890         https://trac.webkit.org/changeset/232081
1891
1892 2018-05-22  Dean Jackson  <dino@apple.com>
1893
1894         Optimized path zoom animation needs a valid UIImage and CGRect
1895         https://bugs.webkit.org/show_bug.cgi?id=185883
1896         <rdar://problem/40306056>
1897
1898         Reviewed by Jon Lee.
1899
1900         Pass the bounding box of the element that was clicked onto
1901         the UI process, so it can perform an animation from that spot.
1902
1903         This involved adding an IntRect to the ResourceRequest, and passing
1904         that info into it from the HTMLAnchorElement, using a new struct
1905         called SystemPreviewInfo.
1906
1907         * html/HTMLAnchorElement.cpp:
1908         (WebCore::HTMLAnchorElement::handleClick):
1909         * loader/FrameLoadRequest.cpp:
1910         (WebCore::FrameLoadRequest::FrameLoadRequest):
1911         * loader/FrameLoadRequest.h:
1912         (WebCore::FrameLoadRequest::FrameLoadRequest):
1913         (WebCore::FrameLoadRequest::isSystemPreview const):
1914         (WebCore::FrameLoadRequest::systemPreviewRect const):
1915         * loader/FrameLoader.cpp:
1916         (WebCore::FrameLoader::urlSelected):
1917         (WebCore::FrameLoader::loadURL):
1918         * loader/FrameLoader.h:
1919         (WebCore::FrameLoader::urlSelected):
1920         * loader/FrameLoaderTypes.h:
1921         * platform/network/ResourceRequestBase.cpp:
1922         (WebCore::ResourceRequestBase::systemPreviewRect const):
1923         (WebCore::ResourceRequestBase::setSystemPreviewRect):
1924         * platform/network/ResourceRequestBase.h:
1925
1926 2018-05-22  Chris Dumez  <cdumez@apple.com>
1927
1928         [POSIX] Use access() instead of stat() in FileSystem::fileExists()
1929         https://bugs.webkit.org/show_bug.cgi?id=185882
1930
1931         Reviewed by Geoffrey Garen.
1932
1933         Use access() instead of stat() in FileSystem::fileExists(). stat() returns a lot of information we
1934         do not leverage and local benchmarking on macOS shows access() being > 80% faster than stat():
1935         stat: 0.31567 (lower is better)
1936         access: 0.16074 (lower is better)
1937         stat: 0.303665 (lower is better)
1938         access: 0.165468 (lower is better)
1939
1940         * platform/posix/FileSystemPOSIX.cpp:
1941         (WebCore::FileSystem::fileExists):
1942
1943 2018-05-22  Brent Fulgham  <bfulgham@apple.com>
1944
1945         Avoid keeping FormState alive longer than necessary
1946         https://bugs.webkit.org/show_bug.cgi?id=185877
1947         <rdar://problem/39329219>
1948
1949         Reviewed by Ryosuke Niwa.
1950
1951         A number of crash fixes were done to prevent FormState objects from being
1952         accessed after their relevant Frames had been destroyed. Unfortunately, this
1953         could cause the FormState to persist after the owning Frame had been
1954         destroyed, resulting in nullptr dereferences.
1955
1956         This patch does the following:
1957
1958         1. Changes to use WeakPtr's for FormState objects passed to completion handlers,
1959            rather than RefPtr, since those completion handlers might fire as part of
1960            the clean-up process during Frame destruction. This allows us to use the FormState
1961            if they are still valid, but gracefully handle cases where a form submission
1962            is cancelled in-flight.
1963         2. Removes some extraneous WTFMove() calls being made on bare FormState pointers.
1964         3. Changes the trap from Bug 183704 so that it only fires if the FormState object
1965            is being retained more than once.
1966
1967         * loader/DocumentLoader.cpp:
1968         (WebCore::DocumentLoader::willSendRequest): Update for new CompletionHandler
1969         signature.
1970         * loader/FormState.cpp:
1971         (WebCore::FormState::willDetachPage): Revise trap to check for retain counts
1972         above one.
1973         * loader/FormState.h:
1974         (WebCore::FormState::weakPtrFactory const): Added.
1975         * loader/FrameLoader.cpp:
1976         (WebCore::FrameLoader::loadFrameRequest): Revise to use WeakPtr for FormState
1977         passed to the completion handler.
1978         (WebCore::FrameLoader::loadURL): Update for new CompletionHandler signature.
1979         (WebCore::FrameLoader::load): Ditto.
1980         (WebCore::FrameLoader::loadWithDocumentLoader): Ditto.
1981         (WebCore::FrameLoader::loadPostRequest): Ditto.
1982         * loader/PolicyChecker.cpp:
1983         (WebCore::PolicyChecker::checkNavigationPolicy): Revise to use WeakPtr for
1984         FormState passed to the completion handler. Remove some extraneous WTFMove()
1985         calls on bare pointers.
1986         (WebCore::PolicyChecker::checkNewWindowPolicy): Ditto.
1987         * loader/PolicyChecker.h:
1988
1989 2018-05-22  Sihui Liu  <sihui_liu@apple.com>
1990
1991         Conversion between SecurityOriginData and DatabaseIdentifier is asymmetric when port is null
1992         https://bugs.webkit.org/show_bug.cgi?id=185715
1993
1994         Reviewed by Geoffrey Garen.
1995
1996         Fixed the issue of null port when converting between SecurityOriginData and DatabaseIdentifier.
1997
1998         Test: WKWebView.LocalStorageFetchDataRecords.
1999
2000         * page/SecurityOriginData.cpp:
2001         (WebCore::SecurityOriginData::fromDatabaseIdentifier):
2002
2003 2018-05-22  Keith Miller  <keith_miller@apple.com>
2004
2005         We should have a CoW storage for NewArrayBuffer arrays.
2006         https://bugs.webkit.org/show_bug.cgi?id=185003
2007
2008         Reviewed by Filip Pizlo.
2009
2010         * bindings/js/JSDOMConvertSequences.h:
2011         (WebCore::Detail::NumericSequenceConverter::convertArray):
2012         (WebCore::Detail::SequenceConverter::convertArray):
2013
2014 2018-05-22  Ryan Haddad  <ryanhaddad@apple.com>
2015
2016         Unreviewed, rolling out r232052.
2017
2018         Breaks internal builds.
2019
2020         Reverted changeset:
2021
2022         "Use more C++17"
2023         https://bugs.webkit.org/show_bug.cgi?id=185176
2024         https://trac.webkit.org/changeset/232052
2025
2026 2018-05-22  Carlos Garcia Campos  <cgarcia@igalia.com>
2027
2028         [GTK] WebDriver: Network process crash when running imported/w3c/webdriver/tests/delete_cookie/delete.py::test_unknown_cookie
2029         https://bugs.webkit.org/show_bug.cgi?id=185867
2030
2031         Reviewed by Michael Catanzaro.
2032
2033         We need to null check the value returned by URL::createSoupURI() before passing it to soup.
2034
2035         * platform/network/soup/CookieJarSoup.cpp:
2036         (WebCore::setCookiesFromDOM):
2037         (WebCore::cookiesForSession):
2038         (WebCore::getRawCookies):
2039         (WebCore::deleteCookie):
2040         * platform/network/soup/NetworkStorageSessionSoup.cpp:
2041         (WebCore::NetworkStorageSession::getCookies):
2042
2043 2018-05-22  Zalan Bujtas  <zalan@apple.com>
2044
2045         [LFC] Implement positioning for non-replaced out-of-flow elements.
2046         https://bugs.webkit.org/show_bug.cgi?id=185858
2047
2048         Reviewed by Antti Koivisto.
2049
2050         In certain cases, the out-of-flow element's final position depends on the element's size.
2051         Call computeOutOfFlowPosition() after width/height are resolved.
2052
2053         * layout/FormattingContext.cpp:
2054         (WebCore::Layout::FormattingContext::computeOutOfFlowPosition const):
2055         (WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
2056         (WebCore::Layout::FormattingContext::computeOutOfFlowNonReplacedPosition const):
2057         (WebCore::Layout::FormattingContext::computeOutOfFlowReplacedPosition const):
2058         * layout/FormattingContext.h:
2059
2060 2018-05-22  Olivier Blin  <olivier.blin@softathome.com>
2061
2062         Fix build without MathML
2063         https://bugs.webkit.org/show_bug.cgi?id=185865
2064
2065         Reviewed by Frédéric Wang.
2066
2067         Regression(r226654): [RenderTreeBuilder] Move MathML addChild logic to RenderTreeBuilder
2068         https://bugs.webkit.org/show_bug.cgi?id=181443
2069
2070         Regression(r229694): Put the DOM in IsoHeaps
2071         https://bugs.webkit.org/show_bug.cgi?id=183546
2072
2073         No new tests, build fix.
2074
2075         * mathml/MathMLUnknownElement.cpp:
2076         * mathml/MathMLUnknownElement.h:
2077         * rendering/updating/RenderTreeBuilder.cpp:
2078         (WebCore::RenderTreeBuilder::RenderTreeBuilder):
2079         (WebCore::RenderTreeBuilder::attach):
2080         * rendering/updating/RenderTreeBuilder.h:
2081         * rendering/updating/RenderTreeBuilderMathML.cpp:
2082         * rendering/updating/RenderTreeBuilderMathML.h:
2083
2084 2018-05-22  Yacine Bandou  <yacine.bandou_ext@softathome.com>
2085
2086         [GStreamer] Don't set the ReadyState to HaveNothing when an error occurs in playback pipeline
2087         https://bugs.webkit.org/show_bug.cgi?id=185725
2088
2089         Reviewed by Philippe Normand.
2090
2091         The ReadyState should not be set to HaveNothing when an error occurs in playback pipeline, because
2092         at least we should have the metadata in order to have an error in pipeline.
2093
2094         Here is the definition of HaveNothing state in W3C spec https://dev.w3.org/html5/spec-preview/media-elements.html#ready-states
2095         "HAVE_NOTHING (numeric value 0): No information regarding the media resource is available. No data for the current
2096         playback position is available. Media elements whose networkState attribute is NETWORK_EMPTY are always in the HAVE_NOTHING state."
2097
2098         In MSE case, this patch fixes the crashes of the followings WPT encrypted-media tests:
2099         - clearkey-mp4-playback-temporary-clear-encrypted.https.html
2100         - clearkey-mp4-playback-temporary-multikey-sequential.https.html
2101         - clearkey-mp4-playback-temporary-multikey-sequential-readyState.https.html
2102
2103         Here is the cause of the crashes: When an error occurs in playback pipeline like no decipher key, in case of encrypted content,
2104         the MediaPlayerPrivateGstreamer sets NetworkState to FormatError which causes the detachment of MediaElement from MediaSource,
2105         then MediaPlayerPrivateGstreamer sets the ReadyState to HaveNothing which causes a trying again to play the same URI,
2106         thus the crash occurs because the MediaElement is detached from MediaSource, see bugzilla for more details.
2107         Note: these crashes should be fixed in 185242 but unfortunately it isn't the case. See bug 185242 for more details.
2108
2109         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2110         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
2111
2112 2018-05-22  Yacine Bandou  <yacine.bandou_ext@softathome.com>
2113
2114         [MSE][GStreamer] Fix the deadlock caused by bug 185242 (r231351)
2115         https://bugs.webkit.org/show_bug.cgi?id=185723
2116
2117         Reviewed by Xabier Rodriguez-Calvar.
2118
2119         After a detailed investigation, we found that, the patch r231351 doesn't fix the crash that expected to fix,
2120         it just replaces it by a deadlock. Now the crash is fixed in the bug 185725.
2121
2122         This Patch will remove a part of r231351 that causes the deadlock.
2123
2124         * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
2125         (webKitMediaSrcFreeStream):
2126
2127 2018-05-21  Yusuke Suzuki  <utatane.tea@gmail.com>
2128
2129         Use more C++17
2130         https://bugs.webkit.org/show_bug.cgi?id=185176
2131
2132         Reviewed by JF Bastien.
2133
2134         * Configurations/Base.xcconfig:
2135         * DerivedSources.make:
2136         * platform/ios/LegacyTileGrid.mm:
2137         (WebCore::LegacyTileGrid::dropDistantTiles):
2138
2139 2018-05-21  Zalan Bujtas  <zalan@apple.com>
2140
2141         [LFC] Box::isDescendantOf() should work with out-of-flow elements.
2142         https://bugs.webkit.org/show_bug.cgi?id=185812
2143
2144         Reviewed by Antti Koivisto.
2145
2146         Use the containing block chain instead of the parent chain to check for isDescendantOf().
2147         (containing block is not always the direct parent)
2148
2149         * layout/layouttree/LayoutBox.cpp:
2150         (WebCore::Layout::Box::isDescendantOf const):
2151
2152 2018-05-21  Chris Nardi  <cnardi@chromium.org>
2153
2154         Remove dead exception in MediaList.appendMedium
2155         https://bugs.webkit.org/show_bug.cgi?id=185278
2156
2157         Reviewed by Chris Dumez.
2158
2159         MediaList.appendMedium was able to throw an exception, but MediaQuerySet::add() always
2160         returned true, making it impossible for that exception to be thrown. This matched the
2161         spec, as |appendMedium| is not specified to throw an exception. Remove the dead code
2162         surrounding the exception, and make MediaQuerySet::add() return false if the medium is
2163         not added.
2164
2165         No new/modified tests as there should be no functional changes.
2166
2167         * css/MediaList.cpp:
2168         (WebCore::MediaQuerySet::add):
2169         (WebCore::MediaList::appendMedium):
2170         * css/MediaList.h:
2171         * css/MediaList.idl:
2172
2173 2018-05-21  Chris Dumez  <cdumez@apple.com>
2174
2175         File's structured serialization should serialize lastModified attribute
2176         https://bugs.webkit.org/show_bug.cgi?id=185773
2177
2178         Reviewed by Youenn Fablet.
2179
2180         Update our implementation for the stuctured serialization of a File to include
2181         its lastModified attribute, as per:
2182         - https://w3c.github.io/FileAPI/#file-section
2183
2184         No new tests, rebaselined existing test.
2185
2186         * bindings/js/SerializedScriptValue.cpp:
2187         (WebCore::CloneSerializer::write):
2188         (WebCore::CloneDeserializer::readFile):
2189         * fileapi/File.cpp:
2190         (WebCore::File::File):
2191         * fileapi/File.h:
2192
2193 2018-05-21  Zalan Bujtas  <zalan@apple.com>
2194
2195         [LFC] Add FormattingContext::validateGeometryConstraintsAfterLayout
2196         https://bugs.webkit.org/show_bug.cgi?id=185811
2197
2198         Reviewed by Antti Koivisto.
2199
2200         Also implement LayoutDescendantIterator and fix LayoutIterator.
2201
2202         * WebCore.xcodeproj/project.pbxproj:
2203         * layout/FormattingContext.cpp:
2204         (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
2205         * layout/FormattingContext.h:
2206         * layout/blockformatting/BlockFormattingContext.cpp:
2207         (WebCore::Layout::BlockFormattingContext::layout const):
2208         * layout/layouttree/LayoutDescendantIterator.h: Added.
2209         (WebCore::Layout::LayoutDescendantIterator<T>::LayoutDescendantIterator):
2210         (WebCore::Layout::LayoutDescendantIterator<T>::operator):
2211         (WebCore::Layout::LayoutDescendantIteratorAdapter<T>::LayoutDescendantIteratorAdapter):
2212         (WebCore::Layout::LayoutDescendantIteratorAdapter<T>::begin):
2213         (WebCore::Layout::LayoutDescendantIteratorAdapter<T>::end):
2214         (WebCore::Layout::LayoutDescendantIteratorAdapter<T>::at):
2215         (WebCore::Layout::descendantsOfType):
2216         * layout/layouttree/LayoutIterator.h:
2217         (WebCore::Layout::LayoutBoxTraversal::firstChild):
2218         (WebCore::Layout::LayoutBoxTraversal::nextAncestorSibling):
2219         (WebCore::Layout::LayoutBoxTraversal::next):
2220         (WebCore::Layout::LayoutBoxTraversal::nextSkippingChildren):
2221         (WebCore::Layout::Traversal::firstChild):
2222         (WebCore::Layout::Traversal::nextSibling):
2223         (WebCore::Layout::Traversal::previousSibling):
2224         (WebCore::Layout::Traversal::findAncestorOfType):
2225         (WebCore::Layout::Traversal::firstWithin):
2226         (WebCore::Layout::Traversal::next):
2227         (WebCore::Layout::LayoutIterator<T>::traversePreviousSibling):
2228         (WebCore::Layout::LayoutIterator<T>::traverseAncestor):
2229         (WebCore::Layout::Traversal::nextAncestorSibling): Deleted.
2230         (WebCore::Layout::Traversal::nextWithin): Deleted.
2231
2232 2018-05-21  Basuke Suzuki  <Basuke.Suzuki@sony.com>
2233
2234         [Curl] Bugfix for r231968, Suspend/Resume with WK2
2235         https://bugs.webkit.org/show_bug.cgi?id=185830
2236
2237         The flags are needed to be updated even if it is cancelled or finished to cleanup correctly.
2238         Also fixed trivial bug for very rare case (hard to produce the situation).
2239
2240         Reviewed by Youenn Fablet.
2241
2242         No new tests because WK2 is not ready for WinCairo yet in public., tested internaly.
2243
2244         * platform/network/curl/CurlRequest.cpp:
2245         (WebCore::CurlRequest::suspend):
2246         (WebCore::CurlRequest::resume):
2247         (WebCore::CurlRequest::pausedStatusChanged):
2248
2249 2018-05-21  Commit Queue  <commit-queue@webkit.org>
2250
2251         Unreviewed, rolling out r232030.
2252         https://bugs.webkit.org/show_bug.cgi?id=185850
2253
2254         "Caused
2255         TestWebKitAPI.IndexedDB.StructuredCloneBackwardCompatibility
2256         API test to fail" (Requested by cdumez on #webkit).
2257
2258         Reverted changeset:
2259
2260         "File's structured serialization should serialize lastModified
2261         attribute"
2262         https://bugs.webkit.org/show_bug.cgi?id=185773
2263         https://trac.webkit.org/changeset/232030
2264
2265 2018-05-21  Daniel Bates  <dabates@apple.com>
2266
2267         REGRESSION (r231107): CSP report-only policies are ignored for beacon, importScripts, fetch(), EventSource, and XHR
2268         https://bugs.webkit.org/show_bug.cgi?id=185789
2269         <rdar://problem/40380175>
2270
2271         Reviewed by Andy Estes.
2272
2273         Fixes an issue where CSP report-only policies were ignored for DocumentThreadableLoader and
2274         PingLoad initiated loads as a result of moving CSP processing to NetworkProcess.
2275
2276         Have NetworkLoadChecker implement the ContentSecurityPolicyClient interface and support logging
2277         console messages, sending CSP reports, and dispatching SecurityPolicyViolation events. To support
2278         the latter we introduce a new WebPage message, EnqueueSecurityPolicyViolationEvent, to enqueue
2279         a SecurityPolicyViolationEvent created from an event init dictionary on the document's event
2280         dispatch queue.
2281
2282         Additionally, shorten the description for a ResourceError caused by CSP to "Blocked by Content Security Policy"
2283         because the CSP code run in NetworkProcess can now log its more detailed error description to
2284         Web Inspector.
2285
2286         Tests: http/tests/security/contentSecurityPolicy/connect-src-beacon-allowed.html
2287                http/tests/security/contentSecurityPolicy/connect-src-beacon-blocked.html
2288                http/tests/security/contentSecurityPolicy/report-only-connect-src-beacon-redirect-blocked.php
2289                http/tests/security/contentSecurityPolicy/report-only-connect-src-xmlhttprequest-redirect-to-blocked.php
2290
2291         * WebCore.xcodeproj/project.pbxproj: Change SecurityPolicyViolationEvent.h from a project header to
2292         a private header so that we can include it in WebKit code.
2293         * dom/Document.cpp:
2294         (WebCore::Document::enqueueSecurityPolicyViolationEvent): Added.
2295         * dom/Document.h:
2296
2297         * dom/EventInit.h:
2298         (WebCore::EventInit::encode const):
2299         (WebCore::EventInit::decode
2300         * dom/SecurityPolicyViolationEvent.h:
2301         (WebCore::SecurityPolicyViolationEvent::Init::encode const):
2302         (WebCore::SecurityPolicyViolationEvent::Init::decode):
2303         Support encoding and decoding for the event.
2304
2305         * loader/DocumentLoader.cpp:
2306         (WebCore::DocumentLoader::enqueueSecurityPolicyViolationEvent): Formerly named "dispatchSecurityPolicyViolationEvent".
2307         (WebCore::DocumentLoader::dispatchSecurityPolicyViolationEvent): Deleted; renamed to "enqueueSecurityPolicyViolationEvent".
2308         * loader/DocumentLoader.h:
2309
2310         * loader/DocumentThreadableLoader.cpp:
2311         (WebCore::DocumentThreadableLoader::redirectReceived): While I am here, move the check for whether the loader
2312         strategy took responsibility for performing security checks to be before we perform the CSP check to avoid doing
2313         such CSP checks twice in the case that the loader strategy already did them.
2314         (WebCore::DocumentThreadableLoader::didFail): Remove code that checked the CSP policy if the load failed. When
2315         the loader strategy (NetworkProcess) is responsible for performing security checks then this code would never
2316         be executed for a violation of a CSP report-only policy because the loader does not and should not fail the load
2317         for a report-only violations. As the name implies, a report-only violation is only reported. That is, it is not
2318         enforced such that the load is blocked; => fail the load.
2319         (WebCore::DocumentThreadableLoader::reportContentSecurityPolicyError): Update the error description to more
2320         accurately describe the error and be consistent with the error message used in NetworkProcess. This error
2321         message is shown for a redirect blocked by CSP regardless of whether the redirect was to a same-origin or
2322         cross-origin resource. I chose to make the error message more vague than necessary for simplicity because
2323         the CSP code will log a more detailed message for this error than could ever be captured by error message
2324         for the ResourceError. Also use ASCIILiteral to efficiently construct the String object for the error
2325         message.
2326
2327         * page/csp/ContentSecurityPolicy.cpp:
2328         (WebCore::ContentSecurityPolicy::reportViolation const): Build up a SecurityPolicyViolationEvent::Init and
2329         pass that to the delegate to dispatch.
2330         * page/csp/ContentSecurityPolicy.h: Export allowScriptFromSource() and allowChildContextFromSource() so that
2331         we can call them from WebKit.
2332         * page/csp/ContentSecurityPolicyClient.h: Update for renaming.
2333         * platform/network/ResourceRequestBase.h: Define a new requester type to be able to differentiate a request
2334         initiated by importScripts() from other requests. We use this to perform the appropriate CSP checks in NetworkProcess.
2335         * workers/WorkerScriptLoader.cpp:
2336         (WebCore::WorkerScriptLoader::loadSynchronously): Set the requester on the ResourceRequest to ResourceRequest::Requester::ImportScripts
2337         so that we can differentiate this request from other requests. See remark for file ResourceRequestBase.h for
2338         more details.
2339
2340 2018-05-21  Chris Dumez  <cdumez@apple.com>
2341
2342         File's structured serialization should serialize lastModified attribute
2343         https://bugs.webkit.org/show_bug.cgi?id=185773
2344
2345         Reviewed by Youenn Fablet.
2346
2347         Update our implementation for the stuctured serialization of a File to include
2348         its lastModified attribute, as per:
2349         - https://w3c.github.io/FileAPI/#file-section
2350
2351         No new tests, rebaselined existing test.
2352
2353         * bindings/js/SerializedScriptValue.cpp:
2354         (WebCore::CloneSerializer::write):
2355         (WebCore::CloneDeserializer::readFile):
2356         * fileapi/File.cpp:
2357         (WebCore::File::File):
2358         * fileapi/File.h:
2359
2360 2018-05-21  Jer Noble  <jer.noble@apple.com>
2361
2362         Complete fix for enabling modern EME by default
2363         https://bugs.webkit.org/show_bug.cgi?id=185770
2364         <rdar://problem/40368220>
2365
2366         Reviewed by Eric Carlson.
2367
2368         * Configurations/FeatureDefines.xcconfig:
2369
2370 2018-05-21  Olivier Blin  <olivier.blin@softathome.com>
2371
2372         [CMake][WebCore] fix sqlite include dir variable
2373         https://bugs.webkit.org/show_bug.cgi?id=185825
2374
2375         Reviewed by Konstantin Tokarev.
2376
2377         WebCore's CMakeLists.txt used SQLITE_INCLUDE_DIRS, but only SQLITE_INCLUDE_DIR is defined.
2378
2379         No new tests, build fix only.
2380
2381         * CMakeLists.txt: Use SQLITE_INCLUDE_DIR instead of SQLITE_INCLUDE_DIRS.
2382
2383 2018-05-21  Olivier Blin  <olivier.blin@softathome.com>
2384
2385         Propagate WebCore system include dirs in WebCoreHeaderInterface
2386         https://bugs.webkit.org/show_bug.cgi?id=185822
2387
2388         Reviewed by Michael Catanzaro.
2389
2390         System include directories from WebCore are not propagated anymore to its users.
2391         For example gcrypt, sqlite and ICU system headers defined in PAL are not properly passed to WebKit build.
2392
2393         This may have been caused partly by the fix in r230385:
2394         [CMake] WebKit should link to WebCore as a PRIVATE library if WebCore is a static library
2395         https://bugs.webkit.org/show_bug.cgi?id=184127
2396
2397         No new tests, build fix.
2398
2399         * CMakeLists.txt:
2400
2401 2018-05-21  Olivier Blin  <olivier.blin@softathome.com>
2402
2403         Fix FrameLoader build without video
2404         https://bugs.webkit.org/show_bug.cgi?id=185821
2405
2406         Reviewed by Michael Catanzaro.
2407
2408         Regression(r231392): Release assert in ScriptController::canExecuteScripts via HTMLMediaElement::~HTMLMediaElement()
2409         https://bugs.webkit.org/show_bug.cgi?id=185288
2410
2411         No new tests, build fix only.
2412
2413         * loader/FrameLoader.cpp:
2414         (WebCore::FrameLoader::checkCompleted): Flag HTMLMediaElement::isRunningDestructor() usage.
2415
2416 2018-05-21  Sam Weinig  <sam@webkit.org>
2417
2418         Modernize RenderStyleConstants.h - Part 1
2419         https://bugs.webkit.org/show_bug.cgi?id=185809
2420
2421         Reviewed by Yusuke Suzuki.
2422             
2423         Modernized the first set of enums in RenderStyleConstants.h by:
2424             - Converting them to enum classes
2425             - Renaming them to remove unnecessary prefix 'E's
2426             - Renaming values to take advantage of enum class scoping (e.g. StyleDifferenceEqual -> StyleDifference::Equal)
2427             - Renaming to match modern conventions (e.g BNONE -> None)
2428             - Reformatting them so that each value is on its own line.
2429
2430         Modernizes the following enums:
2431             PrintColorAdjust
2432             StyleDifference
2433             StyleDifferenceContextSensitiveProperty
2434             ColumnFill
2435             ColumnSpan
2436             BorderCollapse (renamed from EBorderCollapse)
2437             BorderStyle (renamed from EBorderStyle)
2438             BorderPrecedence (renamed from EBorderPrecedence)
2439             OutlineIsAuto
2440             PositionType (renamed from EPosition)
2441             Float (renamed from EFloat)
2442             MarginCollapse (renamed from EMarginCollapse)
2443             BoxDecorationBreak (renamed from EBoxDecorationBreak)
2444             BoxSizing (renamed from EBoxSizing)
2445             Overflow (renamed from EOverflow)
2446             VerticalAlign (renamed from EVerticalAlign)
2447             Clear (renamed from EClear)
2448             TableLayoutType (renamed from ETableLayout)
2449             TextCombine
2450             FillAttachment (renamed from EFillAttachment)
2451             FillBox (renamed from EFillBox)
2452             FillRepeat (renamed from EFillRepeat)
2453             FillLayerType (renamed from EFillLayerType)
2454             FillSizeType (renamed from EFillSizeType)
2455             MaskSourceType (renamed from EMaskSourceType)
2456             BoxPack (renamed from EBoxPack)
2457             BoxAlignment (renamed from EBoxAlignment)
2458             BoxOrient (renamed from EBoxOrient)
2459             BoxLines (renamed from EBoxLines)
2460             BoxDirection (renamed from EBoxDirection)
2461             AlignContent (renamed from EAlignContent)
2462             FlexDirection (renamed from EFlexDirection)
2463             FlexWrap (renamed from EFlexWrap)
2464             ItemPosition
2465             OverflowAlignment
2466             ItemPositionType
2467             ContentPosition
2468             ContentDistribution (renamed from ContentDistributionType)
2469             TextSecurity (renamed from ETextSecurity)
2470             UserModify (renamed from EUserModify)
2471             UserDrag (renamed from EUserDrag)
2472             UserSelect (renamed from EUserSelect)
2473             ObjectFit
2474             AspectRatioType
2475             WordBreak (renamed from EWordBreak)
2476             OverflowWrap (renamed from EOverflowWrap)
2477             NBSPMode (renamed from ENBSPMode)
2478             LineBreak
2479             Resize (renamed from EResize)
2480             QuoteType
2481             TransformStyle3D (renamed from ETransformStyle3D)
2482             BackfaceVisibility (renamed from EBackfaceVisibility)
2483             LineClamp (renamed from ELineClamp)
2484             TextOverflow
2485             ImageRendering (renamed from EImageRendering)
2486             TextIndentLine
2487             TextIndentType
2488             Isolation
2489
2490         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2491         (AXAttributeStringSetStyle):
2492         * css/BasicShapeFunctions.cpp:
2493         (WebCore::valueForCenterCoordinate):
2494         (WebCore::valueForBasicShape):
2495         * css/CSSComputedStyleDeclaration.cpp:
2496         (WebCore::sizingBox):
2497         (WebCore::fillRepeatToCSSValue):
2498         (WebCore::fillSourceTypeToCSSValue):
2499         (WebCore::fillSizeToCSSValue):
2500         (WebCore::valueForItemPositionWithOverflowAlignment):
2501         (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
2502         (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
2503         * css/CSSPrimitiveValueMappings.h:
2504         (WebCore::CSSPrimitiveValue::operator LineClampValue const):
2505         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2506         (WebCore::CSSPrimitiveValue::operator ColumnFill const):
2507         (WebCore::CSSPrimitiveValue::operator ColumnSpan const):
2508         (WebCore::CSSPrimitiveValue::operator PrintColorAdjust const):
2509         (WebCore::CSSPrimitiveValue::operator BorderStyle const):
2510         (WebCore::CSSPrimitiveValue::operator OutlineIsAuto const):
2511         (WebCore::CSSPrimitiveValue::operator BackfaceVisibility const):
2512         (WebCore::CSSPrimitiveValue::operator FillAttachment const):
2513         (WebCore::CSSPrimitiveValue::operator FillBox const):
2514         (WebCore::CSSPrimitiveValue::operator FillRepeat const):
2515         (WebCore::CSSPrimitiveValue::operator BoxPack const):
2516         (WebCore::CSSPrimitiveValue::operator BoxAlignment const):
2517         (WebCore::CSSPrimitiveValue::operator BoxDecorationBreak const):
2518         (WebCore::CSSPrimitiveValue::operator BoxSizing const):
2519         (WebCore::CSSPrimitiveValue::operator BoxDirection const):
2520         (WebCore::CSSPrimitiveValue::operator BoxLines const):
2521         (WebCore::CSSPrimitiveValue::operator BoxOrient const):
2522         (WebCore::CSSPrimitiveValue::operator Clear const):
2523         (WebCore::CSSPrimitiveValue::operator FlexDirection const):
2524         (WebCore::CSSPrimitiveValue::operator AlignContent const):
2525         (WebCore::CSSPrimitiveValue::operator FlexWrap const):
2526         (WebCore::CSSPrimitiveValue::operator Float const):
2527         (WebCore::CSSPrimitiveValue::operator LineBreak const):
2528         (WebCore::CSSPrimitiveValue::operator MarginCollapse const):
2529         (WebCore::CSSPrimitiveValue::operator NBSPMode const):
2530         (WebCore::CSSPrimitiveValue::operator Overflow const):
2531         (WebCore::CSSPrimitiveValue::operator PositionType const):
2532         (WebCore::CSSPrimitiveValue::operator Resize const):
2533         (WebCore::CSSPrimitiveValue::operator TableLayoutType const):
2534         (WebCore::CSSPrimitiveValue::operator TextSecurity const):
2535         (WebCore::CSSPrimitiveValue::operator UserDrag const):
2536         (WebCore::CSSPrimitiveValue::operator UserModify const):
2537         (WebCore::CSSPrimitiveValue::operator UserSelect const):
2538         (WebCore::CSSPrimitiveValue::operator VerticalAlign const):
2539         (WebCore::CSSPrimitiveValue::operator WordBreak const):
2540         (WebCore::CSSPrimitiveValue::operator OverflowWrap const):
2541         (WebCore::CSSPrimitiveValue::operator TextCombine const):
2542         (WebCore::CSSPrimitiveValue::operator TextOverflow const):
2543         (WebCore::CSSPrimitiveValue::operator ObjectFit const):
2544         (WebCore::CSSPrimitiveValue::operator Isolation const):
2545         (WebCore::CSSPrimitiveValue::operator BorderCollapse const):
2546         (WebCore::CSSPrimitiveValue::operator ImageRendering const):
2547         (WebCore::CSSPrimitiveValue::operator TransformStyle3D const):
2548         (WebCore::CSSPrimitiveValue::operator ItemPosition const):
2549         (WebCore::CSSPrimitiveValue::operator OverflowAlignment const):
2550         (WebCore::CSSPrimitiveValue::operator ContentPosition const):
2551         (WebCore::CSSPrimitiveValue::operator ContentDistribution const):
2552         (WebCore::CSSPrimitiveValue::operator EBorderStyle const): Deleted.
2553         (WebCore::CSSPrimitiveValue::operator EBackfaceVisibility const): Deleted.
2554         (WebCore::CSSPrimitiveValue::operator EFillAttachment const): Deleted.
2555         (WebCore::CSSPrimitiveValue::operator EFillBox const): Deleted.
2556         (WebCore::CSSPrimitiveValue::operator EFillRepeat const): Deleted.
2557         (WebCore::CSSPrimitiveValue::operator EBoxPack const): Deleted.
2558         (WebCore::CSSPrimitiveValue::operator EBoxAlignment const): Deleted.
2559         (WebCore::CSSPrimitiveValue::operator EBoxDecorationBreak const): Deleted.
2560         (WebCore::CSSPrimitiveValue::operator EBoxSizing const): Deleted.
2561         (WebCore::CSSPrimitiveValue::operator EBoxDirection const): Deleted.
2562         (WebCore::CSSPrimitiveValue::operator EBoxLines const): Deleted.
2563         (WebCore::CSSPrimitiveValue::operator EBoxOrient const): Deleted.
2564         (WebCore::CSSPrimitiveValue::operator EClear const): Deleted.
2565         (WebCore::CSSPrimitiveValue::operator EFlexDirection const): Deleted.
2566         (WebCore::CSSPrimitiveValue::operator EAlignContent const): Deleted.
2567         (WebCore::CSSPrimitiveValue::operator EFlexWrap const): Deleted.
2568         (WebCore::CSSPrimitiveValue::operator EFloat const): Deleted.
2569         (WebCore::CSSPrimitiveValue::operator EMarginCollapse const): Deleted.
2570         (WebCore::CSSPrimitiveValue::operator ENBSPMode const): Deleted.
2571         (WebCore::CSSPrimitiveValue::operator EOverflow const): Deleted.
2572         (WebCore::CSSPrimitiveValue::operator EPosition const): Deleted.
2573         (WebCore::CSSPrimitiveValue::operator EResize const): Deleted.
2574         (WebCore::CSSPrimitiveValue::operator ETableLayout const): Deleted.
2575         (WebCore::CSSPrimitiveValue::operator ETextSecurity const): Deleted.
2576         (WebCore::CSSPrimitiveValue::operator EUserDrag const): Deleted.
2577         (WebCore::CSSPrimitiveValue::operator EUserModify const): Deleted.
2578         (WebCore::CSSPrimitiveValue::operator EUserSelect const): Deleted.
2579         (WebCore::CSSPrimitiveValue::operator EVerticalAlign const): Deleted.
2580         (WebCore::CSSPrimitiveValue::operator EWordBreak const): Deleted.
2581         (WebCore::CSSPrimitiveValue::operator EOverflowWrap const): Deleted.
2582         (WebCore::CSSPrimitiveValue::operator EBorderCollapse const): Deleted.
2583         (WebCore::CSSPrimitiveValue::operator EImageRendering const): Deleted.
2584         (WebCore::CSSPrimitiveValue::operator ETransformStyle3D const): Deleted.
2585         (WebCore::CSSPrimitiveValue::operator ContentDistributionType const): Deleted.
2586         * css/CSSProperties.json:
2587         * css/CSSToStyleMap.cpp:
2588         (WebCore::CSSToStyleMap::mapFillAttachment):
2589         (WebCore::CSSToStyleMap::mapFillSize):
2590         (WebCore::CSSToStyleMap::mapFillMaskSourceType):
2591         * css/CSSValueKeywords.in:
2592         * css/StyleBuilderConverter.h:
2593         (WebCore::StyleBuilderConverter::convertResize):
2594         (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData):
2595         * css/StyleBuilderCustom.h:
2596         (WebCore::StyleBuilderCustom::applyValueTextIndent):
2597         (WebCore::StyleBuilderCustom::applyInheritWebkitAspectRatio):
2598         (WebCore::StyleBuilderCustom::applyValueWebkitAspectRatio):
2599         (WebCore::StyleBuilderCustom::applyValueContent):
2600         * css/StyleResolver.cpp:
2601         (WebCore::isScrollableOverflow):
2602         (WebCore::StyleResolver::adjustRenderStyle):
2603         * css/StyleResolver.h:
2604         * css/makeprop.pl:
2605         (getFillLayerType):
2606         * dom/Element.h:
2607         * dom/Node.cpp:
2608         (WebCore::computeEditabilityFromComputedStyle):
2609         (WebCore::Node::canStartSelection const):
2610         * dom/Position.cpp:
2611         (WebCore::Position::nodeIsUserSelectNone):
2612         (WebCore::Position::nodeIsUserSelectAll):
2613         * dom/Range.cpp:
2614         (WebCore::Range::collectSelectionRectsWithoutUnionInteriorLines const):
2615         * editing/ApplyBlockElementCommand.cpp:
2616         (WebCore::ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded):
2617         * editing/DeleteSelectionCommand.cpp:
2618         (WebCore::DeleteSelectionCommand::doApply):
2619         * editing/Editing.cpp:
2620         (WebCore::isSpecialHTMLElement):
2621         * editing/EditorCommand.cpp:
2622         (WebCore::verticalScrollDistance):
2623         * editing/ReplaceSelectionCommand.cpp:
2624         (WebCore::ReplaceSelectionCommand::doApply):
2625         * editing/SimplifyMarkupCommand.cpp:
2626         (WebCore::SimplifyMarkupCommand::doApply):
2627         * editing/VisibleUnits.cpp:
2628         (WebCore::backwardSearchForBoundaryWithTextIterator):
2629         (WebCore::forwardSearchForBoundaryWithTextIterator):
2630         * editing/cocoa/EditorCocoa.mm:
2631         (WebCore::Editor::fontAttributesForSelectionStart const):
2632         * editing/cocoa/HTMLConverter.mm:
2633         (WebCore::editingAttributedStringFromRange):
2634         * html/HTMLInputElement.cpp:
2635         (WebCore::HTMLInputElement::shouldTruncateText const):
2636         (WebCore::HTMLInputElement::createInnerTextStyle):
2637         * html/HTMLTextFormControlElement.cpp:
2638         (WebCore::HTMLTextFormControlElement::adjustInnerTextStyle const):
2639         * html/shadow/SliderThumbElement.cpp:
2640         (WebCore::RenderSliderContainer::layout):
2641         * html/shadow/TextControlInnerElements.cpp:
2642         (WebCore::TextControlInnerContainer::resolveCustomStyle):
2643         (WebCore::TextControlInnerElement::resolveCustomStyle):
2644         (WebCore::TextControlPlaceholderElement::resolveCustomStyle):
2645         * layout/displaytree/DisplayBox.cpp:
2646         (WebCore::Display::Box::borderBox const):
2647         (WebCore::Display::Box::contentBox const):
2648         * layout/displaytree/DisplayBox.h:
2649         * layout/layouttree/LayoutBox.cpp:
2650         (WebCore::Layout::Box::isRelativelyPositioned const):
2651         (WebCore::Layout::Box::isStickyPositioned const):
2652         (WebCore::Layout::Box::isAbsolutelyPositioned const):
2653         (WebCore::Layout::Box::isFixedPositioned const):
2654         (WebCore::Layout::Box::isFloatingPositioned const):
2655         (WebCore::Layout::Box::isOverflowVisible const):
2656         * page/DragController.cpp:
2657         (WebCore::DragController::draggableElement const):
2658         * page/Frame.cpp:
2659         (WebCore::Frame::rangeForPoint):
2660         * page/FrameView.cpp:
2661         (WebCore::paginationModeForRenderStyle):
2662         (WebCore::FrameView::applyOverflowToViewport):
2663         (WebCore::FrameView::applyPaginationToViewport):
2664         (WebCore::FrameView::calculateScrollbarModesForLayout):
2665         (WebCore::FrameView::calculateExtendedBackgroundMode const):
2666         (WebCore::FrameView::adjustScrollStepForFixedContent):
2667         * page/SpatialNavigation.cpp:
2668         (WebCore::canScrollInDirection):
2669         (WebCore::canBeScrolledIntoView):
2670         * page/ios/FrameIOS.mm:
2671         (WebCore::Frame::nodeRespondingToScrollWheelEvents):
2672         * page/mac/EventHandlerMac.mm:
2673         (WebCore::scrolledToEdgeInDominantDirection):
2674         * rendering/BorderEdge.cpp:
2675         (WebCore::BorderEdge::BorderEdge):
2676         (WebCore::BorderEdge::obscuresBackgroundEdge const):
2677         (WebCore::BorderEdge::obscuresBackground const):
2678         * rendering/BorderEdge.h:
2679         (WebCore::BorderEdge::style const):
2680         (WebCore::BorderEdge::hasVisibleColorAndStyle const):
2681         * rendering/FlexibleBoxAlgorithm.h:
2682         (WebCore::FlexLayoutAlgorithm::isMultiline const):
2683         * rendering/FloatingObjects.cpp:
2684         (WebCore::FloatingObject::FloatingObject):
2685         * rendering/GridTrackSizingAlgorithm.cpp:
2686         (WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const):
2687         (WebCore::GridTrackSizingAlgorithm::stretchAutoTracks):
2688         * rendering/HitTestResult.cpp:
2689         (WebCore::HitTestResult::innerTextIfTruncated const):
2690         * rendering/ImageQualityController.cpp:
2691         (WebCore::ImageQualityController::interpolationQualityFromStyle):
2692         * rendering/InlineBox.h:
2693         (WebCore::InlineBox::verticalAlign const):
2694         * rendering/InlineFlowBox.cpp:
2695         (WebCore::InlineFlowBox::addToLine):
2696         (WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
2697         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
2698         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
2699         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
2700         (WebCore::InlineFlowBox::paintFillLayer):
2701         * rendering/LogicalSelectionOffsetCaches.h:
2702         (WebCore::LogicalSelectionOffsetCaches::containingBlockInfo const):
2703         * rendering/RenderBlock.cpp:
2704         (WebCore::RenderBlock::removePositionedObjectsIfNeeded):
2705         (WebCore::RenderBlock::styleDidChange):
2706         (WebCore::RenderBlock::isSelfCollapsingBlock const):
2707         (WebCore::RenderBlock::addOverflowFromPositionedObjects):
2708         (WebCore::RenderBlock::markFixedPositionObjectForLayoutIfNeeded):
2709         (WebCore::RenderBlock::isSelectionRoot const):
2710         (WebCore::RenderBlock::selectionGaps):
2711         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths const):
2712         (WebCore::RenderBlock::adjustBorderBoxLogicalHeightForBoxSizing const):
2713         (WebCore::RenderBlock::adjustContentBoxLogicalHeightForBoxSizing const):
2714         * rendering/RenderBlockFlow.cpp:
2715         (WebCore::RenderBlockFlow::MarginInfo::MarginInfo):
2716         (WebCore::RenderBlockFlow::willCreateColumns const):
2717         (WebCore::RenderBlockFlow::marginOffsetForSelfCollapsingBlock):
2718         (WebCore::RenderBlockFlow::clearFloatsIfNeeded):
2719         (WebCore::RenderBlockFlow::marginBeforeEstimateForChild const):
2720         (WebCore::RenderBlockFlow::setMustDiscardMarginBefore):
2721         (WebCore::RenderBlockFlow::setMustDiscardMarginAfter):
2722         (WebCore::RenderBlockFlow::mustDiscardMarginBefore const):
2723         (WebCore::RenderBlockFlow::mustDiscardMarginAfter const):
2724         (WebCore::RenderBlockFlow::mustDiscardMarginBeforeForChild const):
2725         (WebCore::RenderBlockFlow::mustDiscardMarginAfterForChild const):
2726         (WebCore::RenderBlockFlow::mustSeparateMarginBeforeForChild const):
2727         (WebCore::RenderBlockFlow::mustSeparateMarginAfterForChild const):
2728         (WebCore::RenderBlockFlow::styleDidChange):
2729         (WebCore::RenderBlockFlow::styleWillChange):
2730         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
2731         (WebCore::RenderBlockFlow::positionNewFloats):
2732         (WebCore::RenderBlockFlow::clearFloats):
2733         (WebCore::RenderBlockFlow::getClearDelta):
2734         (WebCore::RenderBlockFlow::inlineBlockBaseline const):
2735         (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):
2736         * rendering/RenderBlockFlow.h:
2737         * rendering/RenderBlockLineLayout.cpp:
2738         (WebCore::expansionBehaviorForInlineTextBox):
2739         (WebCore::isCollapsibleSpace):
2740         (WebCore::RenderBlockFlow::layoutRunsAndFloats):
2741         (WebCore::RenderBlockFlow::layoutLineBoxes):
2742         * rendering/RenderBox.cpp:
2743         (WebCore::RenderBox::styleWillChange):
2744         (WebCore::RenderBox::styleDidChange):
2745         (WebCore::RenderBox::updateFromStyle):
2746         (WebCore::RenderBox::includeVerticalScrollbarSize const):
2747         (WebCore::RenderBox::includeHorizontalScrollbarSize const):
2748         (WebCore::RenderBox::intrinsicScrollbarLogicalWidth const):
2749         (WebCore::RenderBox::hasVerticalScrollbarWithAutoBehavior const):
2750         (WebCore::RenderBox::hasHorizontalScrollbarWithAutoBehavior const):
2751         (WebCore::RenderBox::adjustBorderBoxLogicalWidthForBoxSizing const):
2752         (WebCore::RenderBox::adjustBorderBoxLogicalHeightForBoxSizing const):
2753         (WebCore::RenderBox::adjustContentBoxLogicalWidthForBoxSizing const):
2754         (WebCore::RenderBox::adjustContentBoxLogicalHeightForBoxSizing const):
2755         (WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect const):
2756         (WebCore::isCandidateForOpaquenessTest):
2757         (WebCore::RenderBox::foregroundIsKnownToBeOpaqueInRect const):
2758         (WebCore::RenderBox::backgroundHasOpaqueTopLayer const):
2759         (WebCore::RenderBox::computeRectForRepaint const):
2760         (WebCore::RenderBox::computeLogicalWidthInFragment const):
2761         (WebCore::RenderBox::columnFlexItemHasStretchAlignment const):
2762         (WebCore::RenderBox::isStretchingColumnFlexItem const):
2763         (WebCore::RenderBox::hasStretchedLogicalWidth const):
2764         (WebCore::RenderBox::sizesLogicalWidthToFitContent const):
2765         (WebCore::RenderBox::computeLogicalHeight const):
2766         (WebCore::RenderBox::computeIntrinsicLogicalContentHeightUsing const):
2767         (WebCore::RenderBox::createsNewFormattingContext const):
2768         * rendering/RenderBox.h:
2769         (WebCore::RenderBox::scrollsOverflowX const):
2770         (WebCore::RenderBox::scrollsOverflowY const):
2771         (WebCore::RenderBox::selfAlignmentNormalBehavior const):
2772         * rendering/RenderBoxModelObject.cpp:
2773         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2774         (WebCore::RenderBoxModelObject::calculateFillTileSize const):
2775         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry const):
2776         (WebCore::styleRequiresClipPolygon):
2777         (WebCore::borderStyleFillsBorderArea):
2778         (WebCore::borderStyleHasInnerDetail):
2779         (WebCore::borderStyleIsDottedOrDashed):
2780         (WebCore::borderStyleHasUnmatchedColorsAtCorner):
2781         (WebCore::borderStylesRequireMitre):
2782         (WebCore::RenderBoxModelObject::paintBorder):
2783         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
2784         (WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground const):
2785         * rendering/RenderBoxModelObject.h:
2786         * rendering/RenderDeprecatedFlexibleBox.cpp:
2787         (WebCore::FlexBoxIterator::FlexBoxIterator):
2788         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
2789         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
2790         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
2791         * rendering/RenderDeprecatedFlexibleBox.h:
2792         * rendering/RenderElement.cpp:
2793         (WebCore::RenderElement::adjustStyleDifference const):
2794         (WebCore::RenderElement::shouldRepaintForStyleDifference const):
2795         (WebCore::RenderElement::initializeStyle):
2796         (WebCore::RenderElement::setStyle):
2797         (WebCore::RenderElement::didAttachChild):
2798         (WebCore::RenderElement::propagateStyleToAnonymousChildren):
2799         (WebCore::RenderElement::styleWillChange):
2800         (WebCore::RenderElement::styleDidChange):
2801         (WebCore::mustRepaintFillLayers):
2802         (WebCore::RenderElement::selectionColor const):
2803         (WebCore::RenderElement::selectionBackgroundColor const):
2804         (WebCore::RenderElement::drawLineForBoxSide const):
2805         (WebCore::RenderElement::paintFocusRing):
2806         (WebCore::RenderElement::paintOutline):
2807         (WebCore::RenderElement::updateOutlineAutoAncestor):
2808         (WebCore::includeNonFixedHeight):
2809         * rendering/RenderElement.h:
2810         (WebCore::RenderElement::hasHiddenBackface const):
2811         (WebCore::RenderElement::canContainAbsolutelyPositionedObjects const):
2812         * rendering/RenderFlexibleBox.cpp:
2813         (WebCore::RenderFlexibleBox::firstLineBaseline const):
2814         (WebCore::contentAlignmentNormalBehavior):
2815         (WebCore::RenderFlexibleBox::styleDidChange):
2816         (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems):
2817         (WebCore::RenderFlexibleBox::isLeftToRightFlow const):
2818         (WebCore::RenderFlexibleBox::isMultiline const):
2819         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
2820         (WebCore::RenderFlexibleBox::crossSizeForPercentageResolution):
2821         (WebCore::initialJustifyContentOffset):
2822         (WebCore::justifyContentSpaceBetweenChildren):
2823         (WebCore::alignmentOffset):
2824         (WebCore::RenderFlexibleBox::staticMainAxisPositionForPositionedChild):
2825         (WebCore::RenderFlexibleBox::staticCrossAxisPositionForPositionedChild):
2826         (WebCore::RenderFlexibleBox::alignmentForChild const):
2827         (WebCore::RenderFlexibleBox::needToStretchChildLogicalHeight const):
2828         (WebCore::RenderFlexibleBox::mainAxisOverflowForChild const):
2829         (WebCore::RenderFlexibleBox::crossAxisOverflowForChild const):
2830         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
2831         (WebCore::RenderFlexibleBox::layoutColumnReverse):
2832         (WebCore::initialAlignContentOffset):
2833         (WebCore::alignContentSpaceBetweenChildren):
2834         (WebCore::RenderFlexibleBox::alignFlexLines):
2835         (WebCore::RenderFlexibleBox::alignChildren):
2836         * rendering/RenderFlexibleBox.h:
2837         * rendering/RenderFragmentContainer.cpp:
2838         (WebCore::RenderFragmentContainer::overflowRectForFragmentedFlowPortion):
2839         * rendering/RenderFullScreen.cpp:
2840         (WebCore::createFullScreenStyle):
2841         * rendering/RenderFullScreen.h:
2842         * rendering/RenderGrid.cpp:
2843         (WebCore::RenderGrid::selfAlignmentChangedToStretch const):
2844         (WebCore::RenderGrid::selfAlignmentChangedFromStretch const):
2845         (WebCore::RenderGrid::styleDidChange):
2846         (WebCore::contentAlignmentNormalBehaviorGrid):
2847         (WebCore::computeOverflowAlignmentOffset):
2848         (WebCore::RenderGrid::isInlineBaselineAlignedChild const):
2849         (WebCore::RenderGrid::columnAxisPositionForChild const):
2850         (WebCore::RenderGrid::rowAxisPositionForChild const):
2851         (WebCore::RenderGrid::resolveAutoStartGridPosition const):
2852         (WebCore::RenderGrid::resolveAutoEndGridPosition const):
2853         (WebCore::resolveContentDistributionFallback):
2854         (WebCore::contentDistributionOffset):
2855         (WebCore::RenderGrid::computeContentPositionAndDistributionOffset const):
2856         * rendering/RenderGrid.h:
2857         * rendering/RenderIFrame.cpp:
2858         (WebCore::RenderIFrame::requiresLayer const):
2859         * rendering/RenderImage.cpp:
2860         (WebCore::RenderImage::styleDidChange):
2861         (WebCore::RenderImage::foregroundIsKnownToBeOpaqueInRect const):
2862         * rendering/RenderInline.cpp:
2863         (WebCore::RenderInline::styleWillChange):
2864         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
2865         (WebCore::RenderInline::paintOutline):
2866         (WebCore::RenderInline::paintOutlineForLine):
2867         * rendering/RenderLayer.cpp:
2868         (WebCore::isContainerForPositioned):
2869         (WebCore::RenderLayer::enclosingAncestorForPosition const):
2870         (WebCore::accumulateOffsetTowardsAncestor):
2871         (WebCore::RenderLayer::canResize const):
2872         (WebCore::RenderLayer::resize):
2873         (WebCore::RenderLayer::scrollCornerRect const):
2874         (WebCore::resizerCornerRect):
2875         (WebCore::RenderLayer::hasOverflowControls const):
2876         (WebCore::styleRequiresScrollbar):
2877         (WebCore::styleDefinesAutomaticScrollbar):
2878         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
2879         (WebCore::RenderLayer::paintResizer):
2880         (WebCore::RenderLayer::hitTestOverflowControls):
2881         (WebCore::RenderLayer::hitTestLayer):
2882         (WebCore::RenderLayer::calculateClipRects const):
2883         * rendering/RenderLayer.h:
2884         * rendering/RenderLayerBacking.cpp:
2885         (WebCore::RenderLayerBacking::updateGeometry):
2886         (WebCore::canDirectlyCompositeBackgroundBackgroundImage):
2887         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer const):
2888         (WebCore::backgroundRectForBox):
2889         * rendering/RenderLayerCompositor.cpp:
2890         (WebCore::isScrollableOverflow):
2891         (WebCore::styleChangeRequiresLayerRebuild):
2892         (WebCore::RenderLayerCompositor::layerStyleChanged):
2893         (WebCore::RenderLayerCompositor::reasonsForCompositing const):
2894         (WebCore::RenderLayerCompositor::requiresCompositingForBackfaceVisibility const):
2895         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const):
2896         (WebCore::RenderLayerCompositor::isViewportConstrainedFixedOrStickyLayer const):
2897         (WebCore::RenderLayerCompositor::requiresCompositingForPosition const):
2898         (WebCore::RenderLayerCompositor::layerHas3DContent const):
2899         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
2900         * rendering/RenderLayerModelObject.cpp:
2901         (WebCore::RenderLayerModelObject::styleWillChange):
2902         * rendering/RenderMenuList.cpp:
2903         (WebCore::RenderMenuList::adjustInnerStyle):
2904         * rendering/RenderMultiColumnFlow.cpp:
2905         (WebCore::RenderMultiColumnFlow::isColumnSpanningDescendant const):
2906         * rendering/RenderMultiColumnSet.cpp:
2907         (WebCore::RenderMultiColumnSet::requiresBalancing const):
2908         (WebCore::RenderMultiColumnSet::paintColumnRules):
2909         * rendering/RenderMultiColumnSpannerPlaceholder.cpp:
2910         (WebCore::RenderMultiColumnSpannerPlaceholder::createAnonymous):
2911         * rendering/RenderObject.cpp:
2912         (WebCore::RenderObject::propagateRepaintToParentWithOutlineAutoIfNeeded const):
2913         (WebCore::containerForElement):
2914         (WebCore::RenderObject::calculateBorderStyleColor):
2915         * rendering/RenderObject.h:
2916         (WebCore::RenderObject::isFixedPositioned const):
2917         (WebCore::RenderObject::isAbsolutelyPositioned const):
2918         (WebCore::RenderObject::setPositionState):
2919         (WebCore::RenderObject::RenderObjectBitfields::setPositionedState):
2920         (WebCore::RenderObject::RenderObjectBitfields::clearPositionedState):
2921         * rendering/RenderQuote.cpp:
2922         (WebCore::RenderQuote::styleDidChange):
2923         (WebCore::RenderQuote::computeText const):
2924         (WebCore::RenderQuote::isOpen const):
2925         * rendering/RenderReplaced.cpp:
2926         (WebCore::RenderReplaced::layout):
2927         (WebCore::RenderReplaced::setNeedsLayoutIfNeededAfterIntrinsicSizeChange):
2928         (WebCore::RenderReplaced::replacedContentRect const):
2929         * rendering/RenderScrollbarPart.cpp:
2930         (WebCore::RenderScrollbarPart::styleDidChange):
2931         * rendering/RenderTable.cpp:
2932         (WebCore::RenderTable::styleDidChange):
2933         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
2934         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
2935         (WebCore::RenderTable::calcBorderStart const):
2936         (WebCore::RenderTable::calcBorderEnd const):
2937         (WebCore::RenderTable::outerBorderBefore const):
2938         (WebCore::RenderTable::outerBorderAfter const):
2939         (WebCore::RenderTable::outerBorderStart const):
2940         (WebCore::RenderTable::outerBorderEnd const):
2941         * rendering/RenderTable.h:
2942         (WebCore::RenderTable::collapseBorders const):
2943         * rendering/RenderTableCell.cpp:
2944         (WebCore::RenderTableCell::computeIntrinsicPadding):
2945         (WebCore::RenderTableCell::styleDidChange):
2946         (WebCore::compareBorders):
2947         (WebCore::chooseBorder):
2948         (WebCore::emptyBorder):
2949         (WebCore::RenderTableCell::computeCollapsedStartBorder const):
2950         (WebCore::RenderTableCell::computeCollapsedEndBorder const):
2951         (WebCore::RenderTableCell::computeCollapsedBeforeBorder const):
2952         (WebCore::RenderTableCell::computeCollapsedAfterBorder const):
2953         (WebCore::CollapsedBorders::addBorder):
2954         (WebCore::RenderTableCell::paintCollapsedBorders):
2955         (WebCore::RenderTableCell::scrollbarsChanged):
2956         * rendering/RenderTableCell.h:
2957         (WebCore::RenderTableCell::logicalHeightForRowSizing const):
2958         (WebCore::RenderTableCell::isBaselineAligned const):
2959         * rendering/RenderTableRow.cpp:
2960         (WebCore::RenderTableRow::styleDidChange):
2961         * rendering/RenderTableSection.cpp:
2962         (WebCore::RenderTableSection::calcOuterBorderBefore const):
2963         (WebCore::RenderTableSection::calcOuterBorderAfter const):
2964         (WebCore::RenderTableSection::calcOuterBorderStart const):
2965         (WebCore::RenderTableSection::calcOuterBorderEnd const):
2966         (WebCore::RenderTableSection::paintRowGroupBorder):
2967         (WebCore::RenderTableSection::paintRowGroupBorderIfRequired):
2968         (WebCore::RenderTableSection::cachedCollapsedBorder):
2969         * rendering/RenderTableSection.h:
2970         * rendering/RenderText.cpp:
2971         (WebCore::RenderText::styleDidChange):
2972         (WebCore::RenderText::absoluteQuadsClippedToEllipsis const):
2973         (WebCore::isSpaceAccordingToStyle):
2974         (WebCore::mapLineBreakToIteratorMode):
2975         (WebCore::RenderText::computePreferredLogicalWidths):
2976         (WebCore::RenderText::setRenderedText):
2977         (WebCore::RenderText::textWithoutConvertingBackslashToYenSymbol const):
2978         (WebCore::RenderText::momentarilyRevealLastTypedCharacter):
2979         * rendering/RenderTextControl.cpp:
2980         (WebCore::RenderTextControl::computeLogicalHeight const):
2981         * rendering/RenderTextControlSingleLine.cpp:
2982         (WebCore::RenderTextControlSingleLine::styleDidChange):
2983         * rendering/RenderTheme.cpp:
2984         (WebCore::RenderTheme::extractControlStatesForRenderer const):
2985         * rendering/RenderThemeIOS.mm:
2986         (WebCore::adjustInputElementButtonStyle):
2987         * rendering/RenderThemeMac.mm:
2988         (WebCore::RenderThemeMac::updateFocusedState):
2989         (WebCore::RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary):
2990         (WebCore::RenderThemeMac::adjustSearchFieldStyle const):
2991         * rendering/RenderTreeAsText.cpp:
2992         (WebCore::printBorderStyle):
2993         * rendering/RenderVideo.cpp:
2994         (WebCore::RenderVideo::updatePlayer):
2995         * rendering/RenderView.cpp:
2996         (WebCore::RenderView::RenderView):
2997         (WebCore::rendererObscuresBackground):
2998         * rendering/RootInlineBox.cpp:
2999         (WebCore::RootInlineBox::verticalPositionForBox):
3000         * rendering/SimpleLineLayout.cpp:
3001         (WebCore::SimpleLineLayout::canUseForStyle):
3002         (WebCore::SimpleLineLayout::canUseForWithReason):
3003         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
3004         (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
3005         * rendering/TextPaintStyle.cpp:
3006         (WebCore::computeTextPaintStyle):
3007         * rendering/line/BreakingContext.h:
3008         (WebCore::BreakingContext::handleBR):
3009         (WebCore::shouldAddBorderPaddingMargin):
3010         (WebCore::BreakingContext::handleText):
3011         (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord):
3012         * rendering/line/LineBreaker.cpp:
3013         (WebCore::LineBreaker::reset):
3014         * rendering/line/LineBreaker.h:
3015         (WebCore::LineBreaker::clear):
3016         * rendering/line/LineInlineHeaders.h:
3017         (WebCore::skipNonBreakingSpace):
3018         * rendering/line/LineWidth.cpp:
3019         (WebCore::requiresIndent):
3020         * rendering/style/BorderData.h:
3021         (WebCore::BorderData::borderLeftWidth const):
3022         (WebCore::BorderData::borderRightWidth const):
3023         (WebCore::BorderData::borderTopWidth const):
3024         (WebCore::BorderData::borderBottomWidth const):
3025         * rendering/style/BorderValue.h:
3026         (WebCore::BorderValue::BorderValue):
3027         (WebCore::BorderValue::nonZero const):
3028         (WebCore::BorderValue::isVisible const):
3029         (WebCore::BorderValue::style const):
3030         * rendering/style/CollapsedBorderValue.h:
3031         (WebCore::CollapsedBorderValue::CollapsedBorderValue):
3032         (WebCore::CollapsedBorderValue::width const):
3033         (WebCore::CollapsedBorderValue::style const):
3034         (WebCore::CollapsedBorderValue::exists const):
3035         (WebCore::CollapsedBorderValue::precedence const):
3036         * rendering/style/FillLayer.cpp:
3037         (WebCore::FillLayer::FillLayer):
3038         (WebCore::clipMax):
3039         (WebCore::FillLayer::computeClipMax const):
3040         (WebCore::FillLayer::hasRepeatXY const):
3041         (WebCore::FillLayer::hasFixedImage const):
3042         * rendering/style/FillLayer.h:
3043         (WebCore::FillSize::FillSize):
3044         (WebCore::FillLayer::attachment const):
3045         (WebCore::FillLayer::clip const):
3046         (WebCore::FillLayer::origin const):
3047         (WebCore::FillLayer::repeatX const):
3048         (WebCore::FillLayer::repeatY const):
3049         (WebCore::FillLayer::sizeType const):
3050         (WebCore::FillLayer::size const):
3051         (WebCore::FillLayer::maskSourceType const):
3052         (WebCore::FillLayer::isSizeSet const):
3053         (WebCore::FillLayer::setAttachment):
3054         (WebCore::FillLayer::setClip):
3055         (WebCore::FillLayer::setOrigin):
3056         (WebCore::FillLayer::setRepeatX):
3057         (WebCore::FillLayer::setRepeatY):
3058         (WebCore::FillLayer::setComposite):
3059         (WebCore::FillLayer::setBlendMode):
3060         (WebCore::FillLayer::setSizeType):
3061         (WebCore::FillLayer::setSize):
3062         (WebCore::FillLayer::setMaskSourceType):
3063         (WebCore::FillLayer::clearSize):
3064         (WebCore::FillLayer::type const):
3065         (WebCore::FillLayer::initialFillAttachment):
3066         (WebCore::FillLayer::initialFillClip):
3067         (WebCore::FillLayer::initialFillOrigin):
3068         (WebCore::FillLayer::initialFillRepeatX):
3069         (WebCore::FillLayer::initialFillRepeatY):
3070         (WebCore::FillLayer::initialFillComposite):
3071         (WebCore::FillLayer::initialFillBlendMode):
3072         (WebCore::FillLayer::initialFillSize):
3073         (WebCore::FillLayer::initialFillXPosition):
3074         (WebCore::FillLayer::initialFillYPosition):
3075         (WebCore::FillLayer::initialFillImage):
3076         (WebCore::FillLayer::initialFillMaskSourceType):
3077         * rendering/style/LineClampValue.h:
3078         (WebCore::LineClampValue::LineClampValue):
3079         (WebCore::LineClampValue::isPercentage const):
3080         * rendering/style/RenderStyle.cpp:
3081         (WebCore::RenderStyle::RenderStyle):
3082         (WebCore::resolvedSelfAlignment):
3083         (WebCore::RenderStyle::resolvedAlignSelf const):
3084         (WebCore::RenderStyle::resolvedJustifySelf const):
3085         (WebCore::resolvedContentAlignment):
3086         (WebCore::resolvedContentAlignmentPosition):
3087         (WebCore::resolvedContentAlignmentDistribution):
3088         (WebCore::RenderStyle::resolvedJustifyContentDistribution const):
3089         (WebCore::RenderStyle::resolvedAlignContentDistribution const):
3090         (WebCore::RenderStyle::changeRequiresLayout const):
3091         (WebCore::RenderStyle::changeRequiresPositionedLayoutOnly const):
3092         (WebCore::RenderStyle::changeRequiresLayerRepaint const):
3093         (WebCore::RenderStyle::changeRequiresRepaint const):
3094         (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline const):
3095         (WebCore::RenderStyle::changeRequiresRecompositeLayer const):
3096         (WebCore::RenderStyle::diff const):
3097         (WebCore::RenderStyle::diffRequiresLayerRepaint const):
3098         (WebCore::allLayersAreFixed):
3099         (WebCore::RenderStyle::colorIncludingFallback const):
3100         (WebCore::RenderStyle::setColumnStylesFromPaginationMode):
3101         (WebCore::RenderStyle::outlineWidth const):
3102         (WebCore::RenderStyle::outlineOffset const):
3103         * rendering/style/RenderStyle.h:
3104         (WebCore::RenderStyle::isFloating const):
3105         (WebCore::RenderStyle::position const):
3106         (WebCore::RenderStyle::hasOutOfFlowPosition const):
3107         (WebCore::RenderStyle::hasInFlowPosition const):
3108         (WebCore::RenderStyle::hasViewportConstrainedPosition const):
3109         (WebCore::RenderStyle::floating const):
3110         (WebCore::RenderStyle::borderLeftStyle const):
3111         (WebCore::RenderStyle::borderRightStyle const):
3112         (WebCore::RenderStyle::borderTopStyle const):
3113         (WebCore::RenderStyle::borderBottomStyle const):
3114         (WebCore::RenderStyle::hasOutline const):
3115         (WebCore::RenderStyle::outlineStyle const):
3116         (WebCore::RenderStyle::overflowX const):
3117         (WebCore::RenderStyle::overflowY const):
3118         (WebCore::RenderStyle::overflowInlineDirection const):
3119         (WebCore::RenderStyle::overflowBlockDirection const):
3120         (WebCore::RenderStyle::verticalAlign const):
3121         (WebCore::RenderStyle::clear const):
3122         (WebCore::RenderStyle::tableLayout const):
3123         (WebCore::RenderStyle::backgroundRepeatX const):
3124         (WebCore::RenderStyle::backgroundRepeatY const):
3125         (WebCore::RenderStyle::backgroundAttachment const):
3126         (WebCore::RenderStyle::backgroundClip const):
3127         (WebCore::RenderStyle::backgroundOrigin const):
3128         (WebCore::RenderStyle::backgroundSizeType const):
3129         (WebCore::RenderStyle::maskRepeatX const):
3130         (WebCore::RenderStyle::maskRepeatY const):
3131         (WebCore::RenderStyle::maskClip const):
3132         (WebCore::RenderStyle::maskOrigin const):
3133         (WebCore::RenderStyle::maskSizeType const):
3134         (WebCore::RenderStyle::borderCollapse const):
3135         (WebCore::RenderStyle::boxAlign const):
3136         (WebCore::RenderStyle::boxDirection const):
3137         (WebCore::RenderStyle::boxLines const):
3138         (WebCore::RenderStyle::boxOrient const):
3139         (WebCore::RenderStyle::boxPack const):
3140         (WebCore::RenderStyle::flexDirection const):
3141         (WebCore::RenderStyle::isColumnFlexDirection const):
3142         (WebCore::RenderStyle::isReverseFlexDirection const):
3143         (WebCore::RenderStyle::flexWrap const):
3144         (WebCore::RenderStyle::boxDecorationBreak const):
3145         (WebCore::RenderStyle::boxSizing const):
3146         (WebCore::RenderStyle::userModify const):
3147         (WebCore::RenderStyle::userDrag const):
3148         (WebCore::RenderStyle::userSelect const):
3149         (WebCore::RenderStyle::marginBeforeCollapse const):
3150         (WebCore::RenderStyle::marginAfterCollapse const):
3151         (WebCore::RenderStyle::wordBreak const):
3152         (WebCore::RenderStyle::overflowWrap const):
3153         (WebCore::RenderStyle::nbspMode const):
3154         (WebCore::RenderStyle::resize const):
3155         (WebCore::RenderStyle::columnRuleStyle const):
3156         (WebCore::RenderStyle::hasTextCombine const):
3157         (WebCore::RenderStyle::transformStyle3D const):
3158         (WebCore::RenderStyle::preserves3D const):
3159         (WebCore::RenderStyle::backfaceVisibility const):
3160         (WebCore::RenderStyle::textSecurity const):
3161         (WebCore::RenderStyle::imageRendering const):
3162         (WebCore::RenderStyle::setIsolation):
3163         (WebCore::RenderStyle::hasIsolation const):
3164         (WebCore::RenderStyle::isolation const):
3165         (WebCore::RenderStyle::setPosition):
3166         (WebCore::RenderStyle::setFloating):
3167         (WebCore::RenderStyle::setBackgroundSize):
3168         (WebCore::RenderStyle::setBorderLeftStyle):
3169         (WebCore::RenderStyle::setBorderRightStyle):
3170         (WebCore::RenderStyle::setBorderTopStyle):
3171         (WebCore::RenderStyle::setBorderBottomStyle):
3172         (WebCore::RenderStyle::setOutlineStyleIsAuto):
3173         (WebCore::RenderStyle::setOutlineStyle):
3174         (WebCore::RenderStyle::setOverflowX):
3175         (WebCore::RenderStyle::setOverflowY):
3176         (WebCore::RenderStyle::setVerticalAlign):
3177         (WebCore::RenderStyle::setVerticalAlignLength):
3178         (WebCore::RenderStyle::setClear):
3179         (WebCore::RenderStyle::setTableLayout):
3180         (WebCore::RenderStyle::setImageRendering):
3181         (WebCore::RenderStyle::clearBackgroundLayers):
3182         (WebCore::RenderStyle::clearMaskLayers):
3183         (WebCore::RenderStyle::setBorderCollapse):
3184         (WebCore::RenderStyle::setAspectRatioType):
3185         (WebCore::RenderStyle::setPrintColorAdjust):
3186         (WebCore::RenderStyle::setBoxAlign):
3187         (WebCore::RenderStyle::setBoxDirection):
3188         (WebCore::RenderStyle::setBoxLines):
3189         (WebCore::RenderStyle::setBoxOrient):
3190         (WebCore::RenderStyle::setBoxPack):
3191         (WebCore::RenderStyle::setBoxSizing):
3192         (WebCore::RenderStyle::setFlexDirection):
3193         (WebCore::RenderStyle::setFlexWrap):
3194         (WebCore::RenderStyle::setBoxDecorationBreak):
3195         (WebCore::RenderStyle::setUserModify):
3196         (WebCore::RenderStyle::setUserDrag):
3197         (WebCore::RenderStyle::setUserSelect):
3198         (WebCore::RenderStyle::setTextOverflow):
3199         (WebCore::RenderStyle::setMarginBeforeCollapse):
3200         (WebCore::RenderStyle::setMarginAfterCollapse):
3201         (WebCore::RenderStyle::setWordBreak):
3202         (WebCore::RenderStyle::setOverflowWrap):
3203         (WebCore::RenderStyle::setNBSPMode):
3204         (WebCore::RenderStyle::setLineBreak):
3205         (WebCore::RenderStyle::setResize):
3206         (WebCore::RenderStyle::setColumnFill):
3207         (WebCore::RenderStyle::setColumnRuleStyle):
3208         (WebCore::RenderStyle::setColumnSpan):
3209         (WebCore::RenderStyle::setTextCombine):
3210         (WebCore::RenderStyle::setObjectFit):
3211         (WebCore::RenderStyle::setTransformStyle3D):
3212         (WebCore::RenderStyle::setBackfaceVisibility):
3213         (WebCore::RenderStyle::setTextSecurity):
3214         (WebCore::RenderStyle::initialOverflowX):
3215         (WebCore::RenderStyle::initialOverflowY):
3216         (WebCore::RenderStyle::initialClear):
3217         (WebCore::RenderStyle::initialPosition):
3218         (WebCore::RenderStyle::initialVerticalAlign):
3219         (WebCore::RenderStyle::initialFloating):
3220         (WebCore::RenderStyle::initialTableLayout):
3221         (WebCore::RenderStyle::initialBorderCollapse):
3222         (WebCore::RenderStyle::initialBorderStyle):
3223         (WebCore::RenderStyle::initialOutlineStyleIsAuto):
3224         (WebCore::RenderStyle::initialTextCombine):
3225         (WebCore::RenderStyle::initialObjectFit):
3226         (WebCore::RenderStyle::initialBoxAlign):
3227         (WebCore::RenderStyle::initialBoxDecorationBreak):
3228         (WebCore::RenderStyle::initialBoxDirection):
3229         (WebCore::RenderStyle::initialBoxLines):
3230         (WebCore::RenderStyle::initialBoxOrient):
3231         (WebCore::RenderStyle::initialBoxPack):
3232         (WebCore::RenderStyle::initialBoxSizing):
3233         (WebCore::RenderStyle::initialJustifyItems):
3234         (WebCore::RenderStyle::initialSelfAlignment):
3235         (WebCore::RenderStyle::initialDefaultAlignment):
3236         (WebCore::RenderStyle::initialContentAlignment):
3237         (WebCore::RenderStyle::initialFlexDirection):
3238         (WebCore::RenderStyle::initialFlexWrap):
3239         (WebCore::RenderStyle::initialUserModify):
3240         (WebCore::RenderStyle::initialUserDrag):
3241         (WebCore::RenderStyle::initialUserSelect):
3242         (WebCore::RenderStyle::initialTextOverflow):
3243         (WebCore::RenderStyle::initialMarginBeforeCollapse):
3244         (WebCore::RenderStyle::initialMarginAfterCollapse):
3245         (WebCore::RenderStyle::initialWordBreak):
3246         (WebCore::RenderStyle::initialOverflowWrap):
3247         (WebCore::RenderStyle::initialNBSPMode):
3248         (WebCore::RenderStyle::initialLineBreak):
3249         (WebCore::RenderStyle::initialResize):
3250         (WebCore::RenderStyle::initialAspectRatioType):
3251         (WebCore::RenderStyle::initialColumnFill):
3252         (WebCore::RenderStyle::initialColumnSpan):
3253         (WebCore::RenderStyle::initialTransformStyle3D):
3254         (WebCore::RenderStyle::initialBackfaceVisibility):
3255         (WebCore::RenderStyle::initialImageRendering):
3256         (WebCore::RenderStyle::initialPrintColorAdjust):
3257         (WebCore::RenderStyle::initialTextIndentLine):
3258         (WebCore::RenderStyle::initialTextIndentType):
3259         (WebCore::RenderStyle::initialTextSecurity):
3260         (WebCore::RenderStyle::initialIsolation):
3261         (WebCore::collapsedBorderStyle):
3262         (WebCore::RenderStyle::breakOnlyAfterWhiteSpace const):
3263         (WebCore::RenderStyle::breakWords const):
3264         (WebCore::RenderStyle::setTextOrientation):
3265         * rendering/style/RenderStyleConstants.cpp:
3266         (WebCore::operator<<):
3267         * rendering/style/RenderStyleConstants.h:
3268         (WebCore::operator|):
3269         (WebCore::operator|=):
3270         (WebCore::operator| ): Deleted.
3271         (WebCore::operator|= ): Deleted.
3272         * rendering/style/SVGRenderStyle.cpp:
3273         (WebCore::SVGRenderStyle::diff const):
3274         * rendering/style/StyleBackgroundData.cpp:
3275         (WebCore::StyleBackgroundData::StyleBackgroundData):
3276         * rendering/style/StyleBoxData.cpp:
3277         (WebCore::StyleBoxData::StyleBoxData):
3278         * rendering/style/StyleBoxData.h:
3279         (WebCore::StyleBoxData::boxSizing const):
3280         (WebCore::StyleBoxData::boxDecorationBreak const):
3281         * rendering/style/StyleContentAlignmentData.h:
3282         (WebCore::StyleContentAlignmentData::StyleContentAlignmentData):
3283         (WebCore::StyleContentAlignmentData::setPosition):
3284         (WebCore::StyleContentAlignmentData::setDistribution):
3285         (WebCore::StyleContentAlignmentData::setOverflow):
3286         (WebCore::StyleContentAlignmentData::distribution const):
3287         * rendering/style/StyleDeprecatedFlexibleBoxData.cpp:
3288         (WebCore::StyleDeprecatedFlexibleBoxData::StyleDeprecatedFlexibleBoxData):
3289         * rendering/style/StyleDeprecatedFlexibleBoxData.h:
3290         * rendering/style/StyleFlexibleBoxData.cpp:
3291         (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
3292         * rendering/style/StyleFlexibleBoxData.h:
3293         * rendering/style/StyleMultiColData.cpp:
3294         (WebCore::StyleMultiColData::StyleMultiColData):
3295         * rendering/style/StyleMultiColData.h:
3296         (WebCore::StyleMultiColData::ruleWidth const):
3297         * rendering/style/StyleRareInheritedData.cpp:
3298         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
3299         * rendering/style/StyleRareInheritedData.h:
3300         * rendering/style/StyleRareNonInheritedData.cpp:
3301         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
3302         * rendering/style/StyleRareNonInheritedData.h:
3303         * rendering/style/StyleSelfAlignmentData.h:
3304         (WebCore::StyleSelfAlignmentData::StyleSelfAlignmentData):
3305         (WebCore::StyleSelfAlignmentData::setPosition):
3306         (WebCore::StyleSelfAlignmentData::setPositionType):
3307         (WebCore::StyleSelfAlignmentData::setOverflow):
3308         * rendering/svg/RenderSVGBlock.cpp:
3309         (WebCore::RenderSVGBlock::styleDidChange):
3310         * rendering/svg/RenderSVGGradientStop.cpp:
3311         (WebCore::RenderSVGGradientStop::styleDidChange):
3312         * rendering/svg/RenderSVGInline.cpp:
3313         (WebCore::RenderSVGInline::styleDidChange):
3314         * rendering/svg/RenderSVGInlineText.cpp:
3315         (WebCore::RenderSVGInlineText::styleDidChange):
3316         * rendering/svg/RenderSVGModelObject.cpp:
3317         (WebCore::RenderSVGModelObject::styleDidChange):
3318         * rendering/svg/RenderSVGResourceContainer.cpp:
3319         (WebCore::RenderSVGResourceContainer::registerResource):
3320         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
3321         (WebCore::RenderSVGResourceFilterPrimitive::styleDidChange):
3322         * rendering/svg/RenderSVGRoot.cpp:
3323         (WebCore::RenderSVGRoot::layout):
3324         (WebCore::RenderSVGRoot::shouldApplyViewportClip const):
3325         (WebCore::RenderSVGRoot::styleDidChange):
3326         * rendering/svg/SVGInlineTextBox.cpp:
3327         (WebCore::SVGInlineTextBox::paintText):
3328         * rendering/svg/SVGRenderSupport.cpp:
3329         (WebCore::SVGRenderSupport::isOverflowHidden):
3330         * rendering/svg/SVGResourcesCache.cpp:
3331         (WebCore::SVGResourcesCache::clientStyleChanged):
3332         * rendering/updating/RenderTreeBuilder.cpp:
3333         (WebCore::RenderTreeBuilder::attachToRenderElementInternal):
3334         * rendering/updating/RenderTreeBuilderBlock.cpp:
3335         (WebCore::RenderTreeBuilder::Block::insertChildToContinuation):
3336         * rendering/updating/RenderTreeBuilderFirstLetter.cpp:
3337         (WebCore::styleForFirstLetter):
3338         * rendering/updating/RenderTreeBuilderMultiColumn.cpp:
3339         (WebCore::isValidColumnSpanner):
3340         (WebCore::RenderTreeBuilder::MultiColumn::resolveMovedChild):
3341         (WebCore::RenderTreeBuilder::MultiColumn::multiColumnRelativeWillBeRemoved):
3342         * rendering/updating/RenderTreeUpdater.cpp:
3343         (WebCore::RenderTreeUpdater::updateElementRenderer):
3344         * style/StyleResolveForDocument.cpp:
3345         (WebCore::Style::resolveForDocument):
3346
3347 2018-05-21  Alicia Boya García  <aboya@igalia.com>
3348
3349         [MSE][GStreamer] Stream::decodebinSinkPad is read but never assigned
3350         https://bugs.webkit.org/show_bug.cgi?id=185724
3351
3352         Reviewed by Xabier Rodriguez-Calvar.
3353
3354         This is a dead code removal patch; except when a Stream instance
3355         happens to be instantiated in such a place that the non-initialized
3356         decodeSinkPad is != 0, then it is a crash bug fix.
3357
3358         * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
3359         (webKitMediaSrcLinkStreamToSrcPad):
3360         * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamerPrivate.h:
3361
3362 2018-05-21  Alicia Boya García  <aboya@igalia.com>
3363
3364         [MSE][GStreamer] Force segment.start = 0 after matroskademux
3365         https://bugs.webkit.org/show_bug.cgi?id=185740
3366
3367         Reviewed by Xabier Rodriguez-Calvar.
3368
3369         This patch ensures that when WebM MSE media segments are appended in
3370         an out of order fashion their frames are not discarded by opusparse or
3371         any other potential elements downstream in the AppendPipeline that
3372         perform segment clipping.
3373
3374         This patch fixes the following YTTV 2018 tests:
3375
3376         38. OpusAudioWithOverlap
3377         39. OpusAudioWithSmallGap
3378         40. OpusAudioWithLargeGap
3379         70. VP9VideoWithOverlap
3380         71. VP9VideoWithSmallGap
3381
3382         This patch is necessary, but not sufficient for fixing the following
3383         YTTV 2018 tests:
3384
3385         36. AppendOpusAudioOutOfOrder
3386         67. AppendVP9VideoOutOfOrder
3387
3388         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
3389         (WebCore::AppendPipeline::connectDemuxerSrcPadToAppsink):
3390         (WebCore::matroskademuxForceSegmentStartToEqualZero):
3391
3392 2018-05-19  Eric Carlson  <eric.carlson@apple.com>
3393
3394         Improve NowPlaying "title"
3395         https://bugs.webkit.org/show_bug.cgi?id=185680
3396         <rdar://problem/40296700>
3397
3398         Reviewed by Dean Jackson.
3399
3400         * html/HTMLMediaElement.cpp:
3401         (WebCore::HTMLMediaElement::mediaSessionTitle const): Use decodeHostName and 
3402         topPrivatelyControlledDomain when possible to make the host name more readable.
3403
3404         * platform/PublicSuffix.h:
3405         * platform/mac/PublicSuffixMac.mm:
3406         (WebCore::decodeHostName): Expose topPrivatelyControlledDomain method to .cpp functions.
3407
3408 2018-05-19  Commit Queue  <commit-queue@webkit.org>
3409
3410         Unreviewed, rolling out r231996.
3411         https://bugs.webkit.org/show_bug.cgi?id=185799
3412
3413          Broke the GTK build (Requested by eric_carlson on #webkit).
3414
3415         Reverted changeset:
3416
3417         "Improve NowPlaying "title""
3418         https://bugs.webkit.org/show_bug.cgi?id=185680
3419         https://trac.webkit.org/changeset/231996
3420
3421 2018-05-18  Eric Carlson  <eric.carlson@apple.com>
3422
3423         Improve NowPlaying "title"
3424         https://bugs.webkit.org/show_bug.cgi?id=185680
3425         <rdar://problem/40296700>
3426
3427         Reviewed by Dean Jackson.
3428
3429         * html/HTMLMediaElement.cpp:
3430         (WebCore::HTMLMediaElement::mediaSessionTitle const): Use decodeHostName and 
3431         topPrivatelyControlledDomain when possible to make the host name more readable.
3432
3433         * platform/PublicSuffix.h:
3434         * platform/mac/PublicSuffixMac.mm:
3435         (WebCore::decodeHostName): Expose topPrivatelyControlledDomain method to .cpp functions.
3436
3437 2018-05-18  Rob Buis  <rbuis@igalia.com>
3438
3439         Cannot unset transition with important
3440         https://bugs.webkit.org/show_bug.cgi?id=177684
3441
3442         Reviewed by Chris Dumez.
3443
3444         Make removeProperty remove the property regardless
3445         if it was set using !important [1].
3446
3447         The new behavior is consistent with Firefox, Chrome and Edge.
3448
3449         [1] https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-removeproperty
3450
3451         Test: web-platform-tests/cssom/cssom-setProperty-shorthand.html
3452
3453         * css/StyleProperties.cpp:
3454         (WebCore::MutableStyleProperties::removePropertiesInSet):
3455
3456 2018-05-18  Commit Queue  <commit-queue@webkit.org>
3457
3458         Unreviewed, rolling out r231982.
3459         https://bugs.webkit.org/show_bug.cgi?id=185793
3460
3461         Caused layout test failures (Requested by realdawei on
3462         #webkit).
3463
3464         Reverted changeset:
3465
3466         "Complete fix for enabling modern EME by default"
3467         https://bugs.webkit.org/show_bug.cgi?id=185770
3468         https://trac.webkit.org/changeset/231982
3469
3470 2018-05-18  Jer Noble  <jer.noble@apple.com>
3471
3472         Complete fix for enabling modern EME by default
3473         https://bugs.webkit.org/show_bug.cgi?id=185770
3474         <rdar://problem/40368220>
3475
3476         Reviewed by Eric Carlson.
3477
3478         * Configurations/FeatureDefines.xcconfig:
3479
3480 2018-05-18  Brent Fulgham  <bfulgham@apple.com>
3481
3482         Convert ProcessPrivilege assertions to regular debug-only assertions
3483         https://bugs.webkit.org/show_bug.cgi?id=185775
3484         <rdar://problem/40372286>
3485
3486         Reviewed by Geoffrey Garen.
3487
3488         In Bug 184322 I added a number of RELEASE_ASSERT checks that certain
3489         UI-only calls were not being made in the WebContent process.
3490
3491         Measurements have shown that these RELEASE_ASSERTs have regressed performance
3492         by around 1% on some benchmarks, so we should convert them to normal asserts.
3493
3494         This patch changes the RELEASE_ASSERTs into ASSERTs.
3495
3496         * platform/mac/PasteboardMac.mm:
3497         (WebCore::Pasteboard::setDragImage):
3498         * platform/mac/PlatformScreenMac.mm:
3499         (WebCore::displayID):
3500         (WebCore::firstScreen):
3501         (WebCore::window):
3502         (WebCore::screen):
3503         (WebCore::getScreenProperties):
3504         (WebCore::screenIsMonochrome):
3505
3506 2018-05-18  Eric Carlson  <eric.carlson@apple.com>
3507
3508         Handle failure to extend sandbox gracefully
3509         https://bugs.webkit.org/show_bug.cgi?id=185779
3510         <rdar://problem/40316349>
3511
3512         Reviewed by Brent Fulgham.
3513
3514         Test: TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm
3515
3516         * Modules/mediastream/UserMediaRequest.cpp:
3517         (WebCore::UserMediaRequest::deny): Include the error string in the promise rejection.
3518         * Modules/mediastream/UserMediaRequest.h:
3519
3520 2018-05-18  Antoine Quint  <graouts@apple.com>
3521
3522         [Web Animations] Turn Web Animations with CSS integration on for test runners
3523         https://bugs.webkit.org/show_bug.cgi?id=184819
3524         <rdar://problem/39597337>
3525
3526         Unreviewed. Rolling out the patch for this bug, it caused some flaky timeouts for animation suspension tests.
3527
3528         Tests: animations/animation-internals-api-multiple-keyframes.html
3529                animations/animation-internals-api.html
3530                transitions/transition-drt-api-delay.html
3531                transitions/transition-drt-api.html
3532
3533         * dom/Element.cpp:
3534         (WebCore::Element::removedFromAncestor):
3535         * dom/PseudoElement.cpp:
3536         (WebCore::PseudoElement::clearHostElement):
3537         * page/FrameView.cpp:
3538         (WebCore::FrameView::didDestroyRenderTree):
3539         * page/RuntimeEnabledFeatures.h:
3540         * rendering/updating/RenderTreeUpdater.cpp:
3541         (WebCore::RenderTreeUpdater::tearDownRenderers):
3542
3543 2018-05-18  Basuke Suzuki  <Basuke.Suzuki@sony.com>
3544
3545         [Curl] Bug fix on suspend/resume behavior.
3546         https://bugs.webkit.org/show_bug.cgi?id=183089
3547
3548         The flag was not set correctly. Also wrong method was called.
3549
3550         Reviewed by Youenn Fablet.
3551
3552         Enable loader tests to cover this case.
3553
3554         * platform/network/curl/CurlRequest.cpp:
3555         (WebCore::CurlRequest::cancel): Remove unnecessary cleanup. Use runXXX method.
3556         (WebCore::CurlRequest::suspend): Added cancel check.
3557         (WebCore::CurlRequest::resume): Ditto.
3558         (WebCore::CurlRequest::callClient): Use runXXX method. Change to move semantics.
3559         (WebCore::runOnMainThread): Added.
3560         (WebCore::CurlRequest::runOnWorkerThreadIfRequired): Added.
3561         (WebCore::CurlRequest::setupTransfer): Bug fix. Call setRequestPaused directly.
3562         (WebCore::CurlRequest::didReceiveData): Add state flag update.
3563         (WebCore::CurlRequest::invokeDidReceiveResponseForFile): Use runXXX to simplify.
3564         (WebCore::CurlRequest::completeDidReceiveResponse): Ditto.
3565         (WebCore::CurlRequest::setRequestPaused): Protect state change by mutex.
3566         (WebCore::CurlRequest::setCallbackPaused): Ditto.
3567         (WebCore::CurlRequest::invokeCancel): Added.
3568         (WebCore::CurlRequest::pausedStatusChanged): Use runXXX to simplify.
3569         (WebCore::CurlRequest::updateHandlePauseState): Accessor for m_isHandlePaused.
3570         (WebCore::CurlRequest::isHandlePaused const): Ditto.
3571         * platform/network/curl/CurlRequest.h: Add mutex and paused state.
3572         (WebCore::CurlRequest::shouldBePaused const): Rename from isPaused.
3573         (WebCore::CurlRequest::isPaused const): Deleted.
3574
3575 2018-05-18  Chris Dumez  <cdumez@apple.com>
3576
3577         Avoid keeping the frame alive when ref'ing a WindowProxy
3578         https://bugs.webkit.org/show_bug.cgi?id=185737
3579         <rdar://problem/40004666>
3580
3581         Reviewed by Sam Weinig.
3582
3583         Avoid keeping the frame alive when ref'ing a WindowProxy by making WindowProxy
3584         manage its own refcount (instead of proxying refcounting to the Frame). As a
3585         result, a WindowProxy can now be detached from its Frame. When detached, it
3586         return null when asked for a JSWindowProxy.
3587
3588         It is important to not extend the lifetime of the Frame because we want script
3589         to stop running when the Page gets destroyed.
3590
3591         * bindings/js/JSWindowProxy.cpp:
3592         (WebCore::toJS):
3593         (WebCore::toJSWindowProxy):
3594         * bindings/js/JSWindowProxy.h:
3595         (WebCore::toJSWindowProxy):
3596         * bindings/js/ScriptController.cpp:
3597         (WebCore::ScriptController::evaluateInWorld):
3598         (WebCore::ScriptController::loadModuleScriptInWorld):
3599         (WebCore::ScriptController::linkAndEvaluateModuleScriptInWorld):
3600         (WebCore::ScriptController::evaluateModule):
3601         (WebCore::ScriptController::setupModuleScriptHandlers):
3602         (WebCore::ScriptController::jsWindowProxy):
3603         (WebCore::ScriptController::windowScriptNPObject):
3604         (WebCore::ScriptController::executeIfJavaScriptURL):
3605         * bindings/js/ScriptController.h:
3606         (WebCore::ScriptController::globalObject):
3607         * bindings/js/ScriptControllerMac.mm:
3608         (WebCore::ScriptController::windowScriptObject):
3609         * bindings/js/ScriptState.cpp:
3610         (WebCore::mainWorldExecState):
3611         * bindings/js/WindowProxy.cpp:
3612         (WebCore::WindowProxy::WindowProxy):
3613         (WebCore::WindowProxy::~WindowProxy):
3614         (WebCore::WindowProxy::detachFromFrame):
3615         (WebCore::WindowProxy::createJSWindowProxy):
3616         (WebCore::WindowProxy::globalObject):
3617         (WebCore::WindowProxy::createJSWindowProxyWithInitializedScript):
3618         (WebCore::WindowProxy::setDOMWindow):
3619         (WebCore::WindowProxy::window const):
3620         (WebCore::WindowProxy::ref): Deleted.
3621         (WebCore::WindowProxy::deref): Deleted.
3622         * bindings/js/WindowProxy.h:
3623         (WebCore::WindowProxy::create):
3624         (WebCore::WindowProxy::frame const):
3625         (WebCore::WindowProxy::jsWindowProxy):
3626         * dom/DocumentTouch.cpp:
3627         (WebCore::DocumentTouch::createTouch):
3628         * page/AbstractFrame.cpp:
3629         (WebCore::AbstractFrame::AbstractFrame):
3630         (WebCore::AbstractFrame::~AbstractFrame):
3631         * page/AbstractFrame.h:
3632
3633 2018-05-18  Myles C. Maxfield  <mmaxfield@apple.com>
3634
3635         [iOS] Password fields obscure the text with rectangles instead of circles
3636         https://bugs.webkit.org/show_bug.cgi?id=185760
3637         <rdar://problem/38644697>
3638
3639         Reviewed by Zalan Bujtas.
3640
3641         Password fields are obscured by drawing U+25CF BLACK CIRCLE. On iOS, we have custom handling
3642         for this character. However, this custom handling is unnecessary and isn't present on macOS.
3643         Instead, we should simply unify the password obscuring codepath between iOS and macOS.
3644
3645         Test: fast/text/black-circle.html
3646
3647         * platform/graphics/ios/FontCacheIOS.mm:
3648         (WebCore::requiresCustomFallbackFont):
3649         (WebCore::FontCache::getCustomFallbackFont):
3650
3651 2018-05-18  Chris Dumez  <cdumez@apple.com>
3652
3653         Unreviewed, rolling out r231935.
3654
3655         Caused an accessibility test to fail
3656
3657         Reverted changeset:
3658
3659         "RenderLayer::scrollRectToVisible() should not propagate a
3660         subframe's scroll to its cross-origin parent"
3661         https://bugs.webkit.org/show_bug.cgi?id=185664
3662         https://trac.webkit.org/changeset/231935
3663
3664 2018-05-18  Zalan Bujtas  <zalan@apple.com>
3665
3666         [LFC] Implement height computation for non-replaced floating elements.
3667         https://bugs.webkit.org/show_bug.cgi?id=185767
3668
3669         Reviewed by Antti Koivisto.
3670
3671         * layout/FormattingContext.cpp:
3672         (WebCore::Layout::FormattingContext::computeFloatingHeight const):
3673         (WebCore::Layout::FormattingContext::computeFloatingNonReplacedHeight const):
3674         (WebCore::Layout::FormattingContext::contentHeightForFormattingContextRoot const):
3675         * layout/FormattingContext.h:
3676
3677 2018-05-18  Dirk Schulze  <krit@webkit.org>
3678
3679         Make all SVG shape interfaces inherit from SVGGeometryElement
3680         https://bugs.webkit.org/show_bug.cgi?id=185600
3681
3682         Reviewed by Antti Koivisto.
3683
3684         Make all SVG shape interfaces inherit from SVGGeometryElement
3685         as defined by SVG2:
3686
3687         https://svgwg.org/svg2-draft/shapes.html#DOMInterfaces
3688
3689         Tests: svg/dom/SVGGeometry-circle.xhtml
3690                svg/dom/SVGGeometry-ellipse.xhtml
3691                svg/dom/SVGGeometry-line.xhtml
3692                svg/dom/SVGGeometry-polygon.xhtml
3693                svg/dom/SVGGeometry-polyline.xhtml
3694                svg/dom/SVGGeometry-rect.xhtml
3695
3696         * rendering/svg/RenderSVGShape.cpp:
3697         (WebCore::RenderSVGShape::getTotalLength const): Added shape
3698                 independent implementation for all methods defined
3699                 by SVGGeometryElement interface. Calculations are
3700                 based on the Path object created and referenced by
3701                 RenderSVGShape.
3702         (WebCore::RenderSVGShape::getPointAtLength const):
3703         * rendering/svg/RenderSVGShape.h:
3704         * svg/SVGCircleElement.cpp:
3705                 Repeating pattern: Change inheritance from
3706                 SVGGraphicsElement to SVGGeometryElement.
3707         (WebCore::SVGCircleElement::SVGCircleElement):
3708         * svg/SVGCircleElement.h:
3709         * svg/SVGCircleElement.idl:
3710         * svg/SVGEllipseElement.cpp:
3711         (WebCore::SVGEllipseElement::SVGEllipseElement):
3712         * svg/SVGEllipseElement.h:
3713         * svg/SVGEllipseElement.idl:
3714         * svg/SVGGeometryElement.cpp:
3715         (WebCore::SVGGeometryElement::getTotalLength const):
3716         (WebCore::SVGGeometryElement::getPointAtLength const):
3717         * svg/SVGGeometryElement.h:
3718         * svg/SVGLineElement.cpp:
3719         (WebCore::SVGLineElement::SVGLineElement):
3720         * svg/SVGLineElement.h:
3721         * svg/SVGLineElement.idl:
3722         * svg/SVGPolyElement.cpp:
3723         (WebCore::SVGPolyElement::SVGPolyElement):
3724         * svg/SVGPolyElement.h:
3725         * svg/SVGPolygonElement.idl:
3726         * svg/SVGPolylineElement.idl:
3727         * svg/SVGRectElement.cpp:
3728         (WebCore::SVGRectElement::SVGRectElement):
3729         * svg/SVGRectElement.h:
3730         * svg/SVGRectElement.idl:
3731
3732 2018-05-18  Zalan Bujtas  <zalan@apple.com>
3733
3734         [LFC] Implement height computation for replaced elements.
3735         https://bugs.webkit.org/show_bug.cgi?id=185756
3736
3737         Reviewed by Antti Koivisto.
3738
3739         * layout/FormattingContext.cpp:
3740         (WebCore::Layout::FormattingContext::computeHeight const):
3741         (WebCore::Layout::FormattingContext::computeOutOfFlowWidth const):
3742         (WebCore::Layout::FormattingContext::computeOutOfFlowHeight const):
3743         (WebCore::Layout::FormattingContext::computeFloatingHeight const):
3744         (WebCore::Layout::FormattingContext::computeReplacedHeight const):
3745         (WebCore::Layout::FormattingContext::computeReplacedWidth const):
3746         (WebCore::Layout::FormattingContext::computeOutOfFlowReplacedHeight const):
3747         * layout/FormattingContext.h:
3748
3749 2018-05-18  Zalan Bujtas  <zalan@apple.com>
3750
3751         [LFC] Implement width computation for non-replaced floating elements.
3752         https://bugs.webkit.org/show_bug.cgi?id=185759
3753
3754         Reviewed by Antti Koivisto.
3755
3756         * layout/FormattingContext.cpp:
3757         (WebCore::Layout::FormattingContext::computeFloatingWidth const):
3758         (WebCore::Layout::FormattingContext::computeFloatingNonReplacedWidth const):
3759         * layout/FormattingContext.h:
3760
3761 2018-05-18  Antoine Quint  <graouts@apple.com>
3762
3763         [modern-media-controls] AirPlaySupport should be disabled by default
3764         https://bugs.webkit.org/show_bug.cgi?id=185658
3765         <rdar://problem/40272213>
3766
3767         Reviewed by Simon Fraser.
3768
3769         We now only enable AirplaySupport if the controls are visible to the user _and_ media has played.
3770
3771         Test: media/modern-media-controls/airplay-support/airplay-support-disable-event-listeners-until-play.html
3772
3773         * Modules/modern-media-controls/media/airplay-support.js:
3774         (AirplaySupport.prototype.enable):
3775         (AirplaySupport.prototype.controlsUserVisibilityDidChange):
3776         (AirplaySupport.prototype._shouldBeEnabled):
3777         (AirplaySupport):
3778
3779 2018-05-18  Tim Horton  <timothy_horton@apple.com>
3780
3781         Stop softlinking QuickLook when loading from client-registered schemes
3782         https://bugs.webkit.org/show_bug.cgi?id=185716
3783         <rdar://problem/40303227>
3784
3785         Reviewed by Dan Bernstein.
3786
3787         No new tests, just a performance improvement.
3788
3789         * dom/Document.cpp:
3790         * platform/SchemeRegistry.cpp:
3791         * platform/ios/QuickLook.h:
3792         * platform/ios/QuickLook.mm:
3793         (WebCore::isQuickLookPreviewURL):
3794         (WebCore::QLPreviewProtocol): Deleted.
3795         Hard-code the QuickLook preview URL scheme, instead of loading the QuickLook
3796         framework to retrieve it. It will never change, and just in case it does,
3797         add an ASSERT (which does load QuickLook) so that we'll find out.
3798
3799 2018-05-18  Antoine Quint  <graouts@apple.com>
3800
3801         [Web Animations] Turn Web Animations with CSS integration on for test runners
3802         https://bugs.webkit.org/show_bug.cgi?id=184819
3803         <rdar://problem/39597337>
3804
3805         Reviewed by Jon Lee.
3806
3807         We ensure we always call into both CSSAnimationController::cancelAnimations() and
3808         AnimationTimeline::cancelDeclarativeAnimationsForElement() since we want teardown of animations
3809         to be performed no matter which animation code path is used. What that in mind, we don't
3810         conditionalize the CSSAnimationController-related ASSERT() in FrameView::didDestroyRenderTree().
3811
3812         * dom/Element.cpp:
3813         (WebCore::Element::removedFromAncestor):
3814         * dom/PseudoElement.cpp:
3815         (WebCore::PseudoElement::clearHostElement):
3816         * page/FrameView.cpp:
3817         (WebCore::FrameView::didDestroyRenderTree):
3818         * page/RuntimeEnabledFeatures.h:
3819         * rendering/updating/RenderTreeUpdater.cpp:
3820         (WebCore::RenderTreeUpdater::tearDownRenderers):
3821
3822 2018-05-17  David Kilzer  <ddkilzer@apple.com>
3823
3824         Lazily create WebCore::Timer for WebCore::Image
3825         <https://webkit.org/b/185752>
3826
3827         Reviewed by Simon Fraser.
3828
3829         Not every image is an animated image, so lazily creating
3830         m_animationStartTimer saves 64 bytes per instance of
3831         WebCore::Image.
3832
3833         * platform/graphics/Image.cpp:
3834         (WebCore::Image::Image): Remove default initializer for
3835         m_animationStartTimer.
3836         (WebCore::Image::startAnimationAsynchronously): Initialize
3837         m_animationStartTimer if it's not already created.
3838         * platform/graphics/Image.h:
3839         (WebCore::Image::animationPending const): Update to check if
3840         m_animationStartTimer has been set before dereferencing it.
3841         (WebCore::Image::m_animationStartTimer): Change type to
3842         std::unique_ptr<Timer>.
3843
3844 2018-05-17  Nan Wang  <n_wang@apple.com>
3845
3846         AX: [macOS] Expose the primary screen height through AX API
3847         https://bugs.webkit.org/show_bug.cgi?id=185742
3848
3849         Reviewed by Chris Fleizach.
3850
3851         Added a new attribute to expose the primary screen size on both
3852         WebAccessibilityObjectWrapper and WKAccessibilityWebPageObject.
3853
3854         Test: accessibility/mac/primary-screen-height.html
3855
3856         * WebCore.xcodeproj/project.pbxproj:
3857         * accessibility/mac/WebAccessibilityObjectWrapperMac.h:
3858         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3859         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
3860         (-[WebAccessibilityObjectWrapper primaryScreenHeight]):
3861         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
3862         * platform/PlatformScreen.h:
3863         * platform/mac/PlatformScreenMac.mm:
3864         (WebCore::screenRectForPrimaryScreen):
3865
3866 2018-05-17  Chris Dumez  <cdumez@apple.com>
3867
3868         RenderLayer::scrollRectToVisible() should not propagate a subframe's scroll to its cross-origin parent
3869         https://bugs.webkit.org/show_bug.cgi?id=185664
3870         <rdar://problem/36185260>
3871
3872         Reviewed by Simon Fraser.
3873
3874         RenderLayer::scrollRectToVisible() should not propagate a subframe's scroll to its
3875         cross-origin parent. There was logic in FrameLoader::scrollToFragmentWithParentBoundary()
3876         to temporarily set the 'safeToPropagateScrollToParent' flag to false on the cross-origin
3877         ancestor frame during the call to FrameView::scrollToFragment(). This would correctly
3878         prevent RenderLayer::scrollRectToVisible() to propagate the scroll to the cross-origin
3879         ancestor frame when scrollRectToVisible() is called synchronously. However,
3880         scrollRectToVisible() can get called asynchronously in case of a dirty layout, as part
3881         of the post layout tasks.
3882
3883         To address the issue, we get rid of the safeToPropagateScrollToParent flag on FrameView
3884         and instead update FrameView::safeToPropagateScrollToParent() to do the cross-origin
3885         check. FrameView::safeToPropagateScrollToParent() is called by RenderLayer::scrollRectToVisible()
3886         and this is a lot more robust than relying on a flag which gets temporarily set.
3887
3888         Test: http/tests/navigation/fragment-navigation-cross-origin-subframe-no-scrolling-parent.html
3889
3890         * dom/Document.cpp:
3891         * dom/Document.h:
3892         * loader/FrameLoader.cpp:
3893         (WebCore::FrameLoader::scrollToFragmentWithParentBoundary):
3894         * page/FrameView.cpp:
3895         (WebCore::FrameView::FrameView):
3896         (WebCore::FrameView::reset):
3897         (WebCore::FrameView::safeToPropagateScrollToParent const):
3898         * page/FrameView.h:
3899
3900 2018-05-17  Don Olmstead  <don.olmstead@sony.com>
3901
3902         [Curl] Enable HTTP/2 Multiplexing
3903         https://bugs.webkit.org/show_bug.cgi?id=185746
3904
3905         Reviewed by Youenn Fablet.
3906
3907         Covered by existing tests.
3908
3909         * platform/network/curl/CurlContext.cpp:
3910         (WebCore::CurlMultiHandle::CurlMultiHandle):
3911
3912 2018-05-17  Jeremy Jones  <jeremyj@apple.com>
3913
3914         Remove unnecessary exit fullscreen call on application resume
3915         https://bugs.webkit.org/show_bug.cgi?id=185747
3916         rdar://problem/40345725
3917
3918         Reviewed by Jer Noble.
3919
3920         No new tests because no behavior change.
3921
3922         Auto-PiP doesn't automatically return to fullscreen on app resume,
3923         so we don't need to keep this vestigial code for handling a corner case of that feature.
3924         Also, this can cause an unnecessary exit fullscreen that could cause debug asserts.
3925
3926         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
3927         (VideoFullscreenInterfaceAVKit::applicationDidBecomeActive):
3928
3929 2018-05-17  Jeremy Jones  <jeremyj@apple.com>
3930
3931         Fullscreen to PiP results in exit fullscreen call failure
3932         https://bugs.webkit.org/show_bug.cgi?id=185699
3933         rdar://problem/40310291
3934
3935         Reviewed by Eric Carlson.
3936
3937         No new tests because no behavior change.
3938
3939         Prevent multiple exit fullscreen calls when transitioning from fullscreen to picture-in-picture.
3940
3941         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
3942         (-[WebAVPlayerViewControllerDelegate playerViewControllerShouldAutomaticallyDismissAtPictureInPictureStart:]):
3943         Implement this to prevent AVKit from automatically initiating exit fullscreen on pip.
3944         
3945         (VideoFullscreenInterfaceAVKit::didStartPictureInPicture):
3946         Set the return to fullscreen flag here, since this is where exit fullscreen happens.
3947
3948         (VideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason):
3949         Don't exit fullscreen here since it is already initiated in didStartPictureInPicture.
3950
3951 2018-05-17  Ryan Haddad  <ryanhaddad@apple.com>