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