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