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