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