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