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