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