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