Prevent cross-site top-level navigations from third-party iframes
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2019-01-08  Chris Dumez  <cdumez@apple.com>
2
3         Prevent cross-site top-level navigations from third-party iframes
4         https://bugs.webkit.org/show_bug.cgi?id=193076
5         <rdar://problem/36074736>
6
7         Reviewed by Alex Christensen.
8
9         Prevent cross-site top-level navigations from third-party iframes if the following conditions are met:
10         1. Its tries to navigate the top-level page cross-site (different eTDL+1)
11         2. The user has never interacted with the third-party iframe or any of its subframes
12
13         This experiment's intent is to block suspicious main-frame navigations by third-party content. The feature
14         is behind a runtime experimental feature flag, on by default.
15
16         Tests: http/tests/security/allow-top-level-navigations-by-third-party-iframes-to-same-origin.html
17                http/tests/security/allow-top-level-navigations-by-third-party-iframes-with-previous-user-activation.html
18                http/tests/security/allow-top-level-navigations-by-third-party-iframes-with-user-activation.html
19                http/tests/security/block-top-level-navigations-by-third-party-iframes.html
20
21         * dom/Document.cpp:
22         (WebCore::printNavigationErrorMessage):
23         (WebCore::Document::canNavigate):
24         (WebCore::Document::canNavigateInternal):
25         (WebCore::Document::isNavigationBlockedByThirdPartyIFrameRedirectBlocking):
26         * dom/Document.h:
27         * dom/UserGestureIndicator.cpp:
28         * page/DOMWindow.cpp:
29         (WebCore::DOMWindow::setLocation):
30         * page/DOMWindow.h:
31         * page/Frame.h:
32         * page/Location.cpp:
33         (WebCore::Location::replace):
34         (WebCore::Location::setLocation):
35         * page/Settings.yaml:
36
37 2019-01-08  Alex Christensen  <achristensen@webkit.org>
38
39         Stop using NetworkStorageSession in WebProcess
40         https://bugs.webkit.org/show_bug.cgi?id=193236
41
42         Reviewed by Don Olmstead.
43
44         No change in behavior.  Some code was only used for ResourceHandle, which isn't used in modern WebKit,
45         and for cookies, which are handled in the NetworkProcess in modern WebKit.
46
47         * loader/CookieJar.cpp:
48         (WebCore::storageSession):
49         * loader/EmptyClients.cpp:
50         * platform/network/NetworkingContext.h:
51         * platform/network/mac/ResourceHandleMac.mm:
52         (WebCore::ResourceHandle::createNSURLConnection):
53         (WebCore::ResourceHandle::start):
54         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
55         (WebCore::ResourceHandle::willSendRequest):
56         (WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication):
57         (WebCore::ResourceHandle::receivedCredential):
58
59 2019-01-08  Alex Christensen  <achristensen@webkit.org>
60
61         Unreviewed, rolling out r239727.
62
63         Broke API tests
64
65         Reverted changeset:
66
67         "Stop using NetworkStorageSession in WebProcess"
68         https://bugs.webkit.org/show_bug.cgi?id=193236
69         https://trac.webkit.org/changeset/239727
70
71 2019-01-08  Alex Christensen  <achristensen@webkit.org>
72
73         Stop using NetworkStorageSession in WebProcess
74         https://bugs.webkit.org/show_bug.cgi?id=193236
75
76         Reviewed by Don Olmstead.
77
78         No change in behavior.  Some code was only used for ResourceHandle, which isn't used in modern WebKit,
79         and for cookies, which are handled in the NetworkProcess in modern WebKit.
80
81         * loader/CookieJar.cpp:
82         (WebCore::storageSession):
83         * loader/EmptyClients.cpp:
84         * platform/network/NetworkingContext.h:
85         * platform/network/mac/ResourceHandleMac.mm:
86         (WebCore::ResourceHandle::createNSURLConnection):
87         (WebCore::ResourceHandle::start):
88         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
89         (WebCore::ResourceHandle::willSendRequest):
90         (WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication):
91         (WebCore::ResourceHandle::receivedCredential):
92
93 2019-01-08  Chris Dumez  <cdumez@apple.com>
94
95         Regression(PSON-r239182): Blank view when navigating back and forth between google.com and stack overflow
96         https://bugs.webkit.org/show_bug.cgi?id=193224
97         <rdar://problem/47097726>
98
99         Reviewed by Alex Christensen.
100
101         Since r239182, pages get suspended in-place when we suspend the old process after a process-swap on navigation.
102         When we return to a suspended page, we load the current history item again and it normally properly restores
103         the page from PageCache, even though we load the same history item and the current one and even though the
104         page is suspended in-place (i.e. we did not navigate away, which is the usual case for page cache).
105
106         The issue is that if the page URL contains a fragment, FrameLoader::shouldPerformFragmentNavigation() would
107         return true because both the source and destination URLs (which are the same) contains a fragment. To address
108         the issue, update FrameLoader::shouldPerformFragmentNavigation() to return false if the current page is
109         suspended.
110
111         * loader/FrameLoader.cpp:
112         (WebCore::FrameLoader::shouldPerformFragmentNavigation):
113
114 2019-01-08  Alex Christensen  <achristensen@webkit.org>
115
116         Move Windows-specific code from NetworkStorageSessionCFNet.cpp to its own file
117         https://bugs.webkit.org/show_bug.cgi?id=192958
118
119         Reviewed by Yusuke Suzuki.
120
121         This makes it easier to reason about what code is used where.
122
123         * PlatformAppleWin.cmake:
124         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
125         (WebCore::createPrivateStorageSession): Deleted.
126         (WebCore::cookieDomain): Deleted.
127         (WebCore::canonicalCookieTime): Deleted.
128         (WebCore::cookieCreatedTime): Deleted.
129         (WebCore::cookieExpirationTime): Deleted.
130         (WebCore::cookieName): Deleted.
131         (WebCore::cookiePath): Deleted.
132         (WebCore::cookieValue): Deleted.
133         (WebCore::filterCookies): Deleted.
134         (WebCore::copyCookiesForURLWithFirstPartyURL): Deleted.
135         (WebCore::createCookies): Deleted.
136         (WebCore::NetworkStorageSession::setCookiesFromDOM const): Deleted.
137         (WebCore::containsSecureCookies): Deleted.
138         (WebCore::NetworkStorageSession::cookiesForDOM const): Deleted.
139         (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const): Deleted.
140         (WebCore::NetworkStorageSession::cookiesEnabled const): Deleted.
141         (WebCore::NetworkStorageSession::getRawCookies const): Deleted.
142         (WebCore::NetworkStorageSession::deleteCookie const): Deleted.
143         (WebCore::NetworkStorageSession::getHostnamesWithCookies): Deleted.
144         (WebCore::NetworkStorageSession::deleteAllCookies): Deleted.
145         (WebCore::NetworkStorageSession::deleteCookiesForHostnames): Deleted.
146         (WebCore::NetworkStorageSession::deleteAllCookiesModifiedSince): Deleted.
147         * platform/network/cf/NetworkStorageSessionCFNetWin.cpp: Added.
148         (WebCore::createPrivateStorageSession):
149         (WebCore::NetworkStorageSession::setCookies):
150         (WebCore::cookieDomain):
151         (WebCore::canonicalCookieTime):
152         (WebCore::cookieCreatedTime):
153         (WebCore::cookieExpirationTime):
154         (WebCore::cookieName):
155         (WebCore::cookiePath):
156         (WebCore::cookieValue):
157         (WebCore::filterCookies):
158         (WebCore::copyCookiesForURLWithFirstPartyURL):
159         (WebCore::createCookies):
160         (WebCore::NetworkStorageSession::setCookiesFromDOM const):
161         (WebCore::containsSecureCookies):
162         (WebCore::NetworkStorageSession::cookiesForDOM const):
163         (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const):
164         (WebCore::NetworkStorageSession::cookiesEnabled const):
165         (WebCore::NetworkStorageSession::getRawCookies const):
166         (WebCore::NetworkStorageSession::deleteCookie const):
167         (WebCore::NetworkStorageSession::getHostnamesWithCookies):
168         (WebCore::NetworkStorageSession::deleteAllCookies):
169         (WebCore::NetworkStorageSession::deleteCookiesForHostnames):
170         (WebCore::NetworkStorageSession::deleteAllCookiesModifiedSince):
171
172 2018-12-19  Antoine Quint  <graouts@apple.com>
173
174         [Web Animations] Compute animation effect timing properties in batch
175         https://bugs.webkit.org/show_bug.cgi?id=192850
176
177         Reviewed by Dean Jackson.
178
179         We remove a host of functions from AnimationEffect that would allow the computation of various timing properties
180         defined by the Web Animations specification: phase, progress, current iteration, etc. Indeed, a lot of these functions
181         would call each other in a chain, and we would re-compute a lot of the earlier properties in those chains several times
182         when doing something like querying the animation progress. Additionally, some functions, such as WebAnimation::computeRelevance()
183         and WebAnimation::timeToNextTick() would yield the computation of several such properties numerous times. All of those
184         functions are called during each animation frame and are ripe for optimizations.
185
186         We now compute all timing properties across two functions:
187         
188         1. the new AnimationEffect::getBasicTiming() which computes the local time, end time, active duration, active time and phase,
189         2. the existing AnimationEffect::getComputedTiming() which now also exposes the phase and simple iteration progress.
190
191         To support this we introduce a new BasicEffectTiming struct to contain the values computed in AnimationEffect::getBasicTiming()
192         and spun the AnimationEffect::Phase struct as AnimationEffectPhase so that it may be used across BasicEffectTiming and
193         ComputedEffectTiming.
194
195         No new test since there is no user-observable change.
196
197         * WebCore.xcodeproj/project.pbxproj:
198         * animation/AnimationEffect.cpp:
199         (WebCore::AnimationEffect::getTiming const):
200         (WebCore::AnimationEffect::getBasicTiming const):
201         (WebCore::AnimationEffect::getComputedTiming const):
202         (WebCore::AnimationEffect::localTime const): Deleted.
203         (WebCore::AnimationEffect::phase const): Deleted.
204         (WebCore::AnimationEffect::activeTime const): Deleted.
205         (WebCore::AnimationEffect::overallProgress const): Deleted.
206         (WebCore::AnimationEffect::simpleIterationProgress const): Deleted.
207         (WebCore::AnimationEffect::currentIteration const): Deleted.
208         (WebCore::AnimationEffect::currentDirection const): Deleted.
209         (WebCore::AnimationEffect::directedProgress const): Deleted.
210         (WebCore::AnimationEffect::transformedProgress const): Deleted.
211         (WebCore::AnimationEffect::iterationProgress const): Deleted.
212         (WebCore::AnimationEffect::getTiming): Deleted.
213         (WebCore::AnimationEffect::getComputedTiming): Deleted.
214         (WebCore::AnimationEffect::endTime const): Deleted.
215         (WebCore::AnimationEffect::activeDuration const): Deleted.
216         * animation/AnimationEffect.h:
217         * animation/AnimationEffectPhase.h: Copied from Source/WebCore/animation/ComputedEffectTiming.h.
218         * animation/AnimationTimeline.cpp:
219         (WebCore::AnimationTimeline::updateCSSTransitionsForElement):
220         * animation/AnimationTimeline.h:
221         * animation/BasicEffectTiming.h: Copied from Source/WebCore/animation/ComputedEffectTiming.h.
222         * animation/ComputedEffectTiming.h:
223         * animation/DeclarativeAnimation.cpp:
224         (WebCore::DeclarativeAnimation::cancel):
225         (WebCore::DeclarativeAnimation::phaseWithoutEffect const):
226         (WebCore::DeclarativeAnimation::invalidateDOMEvents):
227         * animation/DeclarativeAnimation.h:
228         * animation/KeyframeEffect.cpp:
229         (WebCore::KeyframeEffect::apply):
230         (WebCore::KeyframeEffect::getAnimatedStyle):
231         * animation/WebAnimation.cpp:
232         (WebCore::WebAnimation::effectEndTime const):
233         (WebCore::WebAnimation::computeRelevance):
234         (WebCore::WebAnimation::timeToNextTick const):
235
236 2019-01-07  Youenn Fablet  <youenn@apple.com>
237
238         Crash in SWServer::Connection::resolveRegistrationReadyRequests
239         https://bugs.webkit.org/show_bug.cgi?id=193217
240
241         Reviewed by Chris Dumez.
242
243         As can be seen from the traces, SWServer might clear its connections HashMap in its destructor.
244         This might then trigger calling SWServer::resolveRegistrationReadyRequests.
245         This method is iterating on the connections HashMap which is being cleared.
246         To remove this problem, move the HashMap in a temporary variable and clear the temporary variable.
247
248         * workers/service/server/SWServer.cpp:
249         (WebCore::SWServer::~SWServer):
250
251 2019-01-07  Jer Noble  <jer.noble@apple.com>
252
253         REGRESSION (r239519): ASSERTION FAILED: !m_adoptionIsRequired in com.apple.WebCore: void WTF::refIfNotNull<WebCore::CDMSessionMediaSourceAVFObjC> + 53
254         https://bugs.webkit.org/show_bug.cgi?id=193211
255         <rdar://problem/46937412>
256
257         Reviewed by Eric Carlson.
258
259         Make CDMSessionMediaSourceAVFObjC a CanMakeWeakPtr rather than RefCounted, as CDMSessions are stored in
260         std::unique_ptrs, and not in Ref or RefPtr.
261
262         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
263         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
264         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
265         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):
266
267 2019-01-07  David Kilzer  <ddkilzer@apple.com>
268
269         Prefer RetainPtr<NSObject> to RetainPtr<NSObject *>
270         <https://webkit.org/b/193056>
271
272         Reviewed by Alex Christensen.
273
274         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
275         (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:]):
276         (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:withDiscontinuity:]):
277         * platform/network/cf/AuthenticationChallenge.h:
278         - Remove '*' from RetainPtr<> type.
279
280         * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
281         (WebCore::cookiesForURL):
282         - Once retainPtr() was changed to return RetainPtr<NSArray>
283           instead of RetainPtr<NSArray *> here, that forced the type of
284           `cookiesPtr` to change as well since
285           Optional<RetainPtr<NSArray>> is not assignable to
286           Optional<RetainPtr<NSArray *>> without further template
287           specialization, which didn't seem useful since
288           Optional<RetainPtr<>> variable types are rarely used.
289
290 2019-01-07  Devin Rousso  <drousso@apple.com>
291
292         Web Inspector: extend XHR breakpoints to work with fetch
293         https://bugs.webkit.org/show_bug.cgi?id=185843
294         <rdar://problem/40431027>
295
296         Reviewed by Matt Baker.
297
298         Test: inspector/dom-debugger/url-breakpoints.html
299
300         * Modules/fetch/FetchResponse.cpp:
301         (WebCore::FetchResponse::fetch):
302
303         * inspector/InspectorInstrumentation.h:
304         (WebCore::InspectorInstrumentation::willFetch): Added.
305         * inspector/InspectorInstrumentation.cpp:
306         (WebCore::InspectorInstrumentation::willFetchImpl): Added.
307
308         * inspector/agents/InspectorDOMDebuggerAgent.h:
309         * inspector/agents/InspectorDOMDebuggerAgent.cpp:
310         (WebCore::InspectorDOMDebuggerAgent::disable):
311         (WebCore::InspectorDOMDebuggerAgent::discardBindings):
312         (WebCore::InspectorDOMDebuggerAgent::setURLBreakpoint): Added.
313         (WebCore::InspectorDOMDebuggerAgent::removeURLBreakpoint): Added.
314         (WebCore::InspectorDOMDebuggerAgent::breakOnURLIfNeeded): Added.
315         (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
316         (WebCore::InspectorDOMDebuggerAgent::willFetch): Added.
317         (WebCore::InspectorDOMDebuggerAgent::setXHRBreakpoint): Deleted.
318         (WebCore::InspectorDOMDebuggerAgent::removeXHRBreakpoint): Deleted.
319
320 2019-01-07  Eric Carlson  <eric.carlson@apple.com>
321
322         Cleanup AudioTrackPrivateMediaStreamCocoa
323         https://bugs.webkit.org/show_bug.cgi?id=193208
324         <rdar://problem/42225870>
325
326         Reviewed by Youenn Fablet.
327
328         * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
329         (WebCore::AudioTrackPrivateMediaStreamCocoa::audioSamplesAvailable): Clear input and
330         output format descriptions after stopping the audio unit.
331
332 2019-01-07  Devin Rousso  <drousso@apple.com>
333
334         Web Inspector: Network: show secure connection details per-request
335         https://bugs.webkit.org/show_bug.cgi?id=191539
336         <rdar://problem/45979891>
337
338         Reviewed by Joseph Pecoraro.
339
340         Test: http/tests/inspector/network/resource-security-connection.html
341
342         * platform/network/NetworkLoadMetrics.h:
343         (WebCore::NetworkLoadMetrics:isolatedCopy):
344         (WebCore::NetworkLoadMetrics:clearNonTimingData):
345         (WebCore::NetworkLoadMetrics:operator==):
346         (WebCore::NetworkLoadMetrics:encode):
347         (WebCore::NetworkLoadMetrics:decode):
348
349         * inspector/agents/InspectorNetworkAgent.cpp:
350         (WebCore::InspectorNetworkAgent::buildObjectForMetrics):
351
352 2019-01-07  Eric Carlson  <eric.carlson@apple.com>
353
354         Deactivate audio session whenever possible
355         https://bugs.webkit.org/show_bug.cgi?id=193188
356         <rdar://problem/42678977>
357
358         Reviewed by Jer Noble.
359
360         Test: media/deactivate-audio-session.html
361
362         * platform/audio/AudioSession.cpp:
363         (WebCore::AudioSession::tryToSetActive):
364         (WebCore::AudioSession::tryToSetActiveInternal):
365         * platform/audio/AudioSession.h:
366         (WebCore::AudioSession::isActive const):
367
368         * platform/audio/PlatformMediaSessionManager.cpp:
369         (WebCore::PlatformMediaSessionManager::removeSession):
370         (WebCore::deactivateAudioSession):
371         (WebCore::PlatformMediaSessionManager::shouldDeactivateAudioSession):
372         (WebCore::PlatformMediaSessionManager::setShouldDeactivateAudioSession):
373         * platform/audio/PlatformMediaSessionManager.h:
374
375         * platform/audio/ios/AudioSessionIOS.mm:
376         (WebCore::AudioSession::tryToSetActiveInternal):
377         (WebCore::AudioSession::tryToSetActive): Deleted.
378
379         * platform/audio/mac/AudioSessionMac.cpp:
380         (WebCore::AudioSession::tryToSetActiveInternal):
381         (WebCore::AudioSession::tryToSetActive): Deleted.
382
383         * testing/Internals.cpp:
384         (WebCore::Internals::audioSessionActive const):
385         * testing/Internals.h:
386         * testing/Internals.idl:
387
388 2019-01-07  David Kilzer  <ddkilzer@apple.com>
389
390         PlatformECKey should use a std::unique_ptr
391         <https://webkit.org/b/193170>
392
393         Reviewed by Brent Fulgham.
394
395         Broadly:
396         - Switch from using raw pointers to using std::unique_ptr<> to
397           hold PlatformECKey.
398         - Introduce PlatformECKeyContainer type to handle different
399           std::unique_ptr<> types on each platform.
400         - Get rid of custom CryptoKeyEC destructors since the
401           std::unique_ptr<> handles that with a Deleter.
402         - Initialize stack variables to nullptr.
403
404         * crypto/gcrypt/CryptoKeyECGCrypt.cpp:
405         (WebCore::CryptoKeyEC::keySizeInBits const):
406         (WebCore::CryptoKeyEC::platformGeneratePair):
407         (WebCore::CryptoKeyEC::platformImportRaw):
408         (WebCore::CryptoKeyEC::platformImportJWKPublic):
409         (WebCore::CryptoKeyEC::platformImportJWKPrivate):
410         (WebCore::CryptoKeyEC::platformImportSpki):
411         (WebCore::CryptoKeyEC::platformImportPkcs8):
412         (WebCore::CryptoKeyEC::platformExportRaw const):
413         (WebCore::CryptoKeyEC::platformAddFieldElements const):
414         (WebCore::CryptoKeyEC::platformExportSpki const):
415         (WebCore::CryptoKeyEC::platformExportPkcs8 const):
416         (WebCore::CryptoKeyEC::~CryptoKeyEC): Deleted.
417         * crypto/keys/CryptoKeyEC.cpp:
418         (WebCore::CryptoKeyEC::CryptoKeyEC):
419         * crypto/keys/CryptoKeyEC.h:
420         (WebCore::CCECCryptorRefDeleter::operator() const):
421         * crypto/mac/CryptoKeyECMac.cpp:
422         (WebCore::CryptoKeyEC::keySizeInBits const):
423         (WebCore::CryptoKeyEC::platformGeneratePair):
424         (WebCore::CryptoKeyEC::platformImportRaw):
425         (WebCore::CryptoKeyEC::platformExportRaw const):
426         (WebCore::CryptoKeyEC::platformImportJWKPublic):
427         (WebCore::CryptoKeyEC::platformImportJWKPrivate):
428         (WebCore::CryptoKeyEC::platformAddFieldElements const):
429         (WebCore::CryptoKeyEC::platformImportSpki):
430         (WebCore::CryptoKeyEC::platformExportSpki const):
431         (WebCore::CryptoKeyEC::platformImportPkcs8):
432         (WebCore::CryptoKeyEC::platformExportPkcs8 const):
433         (WebCore::CryptoKeyEC::~CryptoKeyEC): Deleted.
434
435 2019-01-07  Antti Koivisto  <antti@apple.com>
436
437         UI process side scrollbars for UI side compositing on Mac
438         https://bugs.webkit.org/show_bug.cgi?id=193106
439
440         Reviewed by Tim Horton.
441
442         * page/FrameView.cpp:
443         (WebCore::FrameView::paintScrollCorner):
444         * page/scrolling/AsyncScrollingCoordinator.cpp:
445         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
446
447         Pass scrollbar host layers and the dark appearance bit to the scrolling tree.
448
449         * page/scrolling/ScrollingCoordinator.cpp:
450         (WebCore::ScrollingCoordinator::verticalScrollbarLayerForFrameView):
451         (WebCore::ScrollingCoordinator::horizontalScrollbarLayerForFrameView):
452         * page/scrolling/ScrollingCoordinator.h:
453         (WebCore::ScrollableAreaParameters::ScrollableAreaParameters):
454         (WebCore::ScrollableAreaParameters::operator== const):
455         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
456         (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
457         (WebCore::ScrollingStateFrameScrollingNode::setScrollbarLayers):
458         * page/scrolling/ScrollingStateFrameScrollingNode.h:
459         * page/scrolling/ScrollingTreeFrameScrollingNode.h:
460         * page/scrolling/ScrollingTreeScrollingNode.h:
461         (WebCore::ScrollingTreeScrollingNode::scrollableAreaSize const):
462         (WebCore::ScrollingTreeScrollingNode::totalContentsSize const):
463         (WebCore::ScrollingTreeScrollingNode::useDarkAppearanceForScrollbars const):
464         (WebCore::ScrollingTreeScrollingNode::lastCommittedScrollPosition const):
465         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
466         * platform/ScrollableArea.cpp:
467         (WebCore::ScrollableArea::useDarkAppearanceForScrollbars const):
468
469         Factor into a function as this is used in several places.
470
471         * platform/ScrollableArea.h:
472         * platform/mac/NSScrollerImpDetails.h:
473         * platform/mac/ScrollAnimatorMac.mm:
474         (-[WebScrollerImpDelegate effectiveAppearanceForScrollerImp:]):
475         * platform/mac/ScrollbarThemeMac.h:
476
477 2019-01-07  Wenson Hsieh  <wenson_hsieh@apple.com>
478
479         Native caret shows up alongside the page's caret when requesting desktop site on jsfiddle.net
480         https://bugs.webkit.org/show_bug.cgi?id=193180
481         <rdar://problem/45971041>
482
483         Reviewed by Tim Horton.
484
485         Adjust a method on RenderObject to additionally detect when the RenderObject is inside of an `overflow: hidden`
486         container that is also empty. See WebKit ChangeLog for more details.
487
488         Test:   editing/selection/ios/hide-selection-in-empty-overflow-hidden-container.html
489                 editing/selection/ios/show-selection-in-empty-overflow-hidden-document.html
490
491         * rendering/RenderObject.cpp:
492         (WebCore::RenderObject::isTransparentOrFullyClippedRespectingParentFrames const):
493         (WebCore::RenderObject::isTransparentRespectingParentFrames const): Deleted.
494         * rendering/RenderObject.h:
495
496 2019-01-07  Zalan Bujtas  <zalan@apple.com>
497
498         [LFC][BFC] Margin collapsing should not be limited to in-flow non-replaced boxes.
499         https://bugs.webkit.org/show_bug.cgi?id=193183
500
501         Reviewed by Antti Koivisto.
502
503         * layout/FormattingContext.cpp:
504         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):
505         * layout/FormattingContextGeometry.cpp:
506         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
507         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
508         (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
509         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
510         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin):
511         * layout/LayoutUnits.h:
512         * layout/blockformatting/BlockFormattingContext.cpp:
513         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):
514         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
515         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
516         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
517         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
518         (WebCore::Layout::BlockFormattingContext::Quirks::stretchedHeight):
519         * layout/inlineformatting/InlineFormattingContext.cpp:
520         (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin const):
521
522 2019-01-07  Zalan Bujtas  <zalan@apple.com>
523
524         [LFC][BFC] Move MarginCollapse from BlockFormattingContext::Geometry to BlockFormattingContext
525         https://bugs.webkit.org/show_bug.cgi?id=193181
526
527         Reviewed by Antti Koivisto.
528
529         This is in preparation to share margin collapsing across all boxes in block formatting context.
530
531         * layout/blockformatting/BlockFormattingContext.h:
532         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
533         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
534         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin):
535         * layout/blockformatting/BlockMarginCollapse.cpp:
536         (WebCore::Layout::BlockFormattingContext::MarginCollapse::computedNonCollapsedMarginBefore):
537         (WebCore::Layout::BlockFormattingContext::MarginCollapse::computedNonCollapsedMarginAfter):
538         (WebCore::Layout::BlockFormattingContext::MarginCollapse::nonCollapsedMarginBefore):
539         (WebCore::Layout::BlockFormattingContext::MarginCollapse::nonCollapsedMarginAfter):
540         (WebCore::Layout::BlockFormattingContext::MarginCollapse::collapsedMarginBeforeFromFirstChild):
541         (WebCore::Layout::BlockFormattingContext::MarginCollapse::collapsedMarginAfterFromLastChild):
542         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginAfter):
543         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore):
544         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance):
545         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginBefore):
546         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginAfter):
547         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithPreviousSibling):
548         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithNextSibling):
549         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough):
550         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBefore):
551         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfter):
552         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginBefore): Deleted.
553         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginAfter): Deleted.
554         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::nonCollapsedMarginBefore): Deleted.
555         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::nonCollapsedMarginAfter): Deleted.
556         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginBeforeFromFirstChild): Deleted.
557         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginAfterFromLastChild): Deleted.
558         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithParentMarginAfter): Deleted.
559         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore): Deleted.
560         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance): Deleted.
561         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginBefore): Deleted.
562         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginAfter): Deleted.
563         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithPreviousSibling): Deleted.
564         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithNextSibling): Deleted.
565         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginsCollapseThrough): Deleted.
566         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBefore): Deleted.
567         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfter): Deleted.
568
569 2019-01-07  Zan Dobersek  <zdobersek@igalia.com>
570
571         [WPE] Use Widget bounds for PlatformScreen rectangle information
572         https://bugs.webkit.org/show_bug.cgi?id=193190
573
574         Reviewed by Philippe Normand.
575
576         Provide a better screen area estimate in screenRect() and
577         screenAvailableRect() return values than the current 1240x640 value by
578         using the Widget's bounds rectangle.
579
580         This approach is only factually correct when the Widget-associated view
581         is displayed in fullscreen, but it provides a better estimate even when
582         displayed in any other case as well. WPE doesn't provide specific API
583         that could enable the embedding environment to provide this information.
584
585         * platform/wpe/PlatformScreenWPE.cpp:
586         (WebCore::screenRect): Return bounds of the Widget object.
587         (WebCore::screenAvailableRect): Relay the call to screenRect().
588
589 2019-01-07  Zan Dobersek  <zdobersek@igalia.com>
590
591         Make Gradient::gradientSpaceTransform(), Pattern::patternSpaceTransform() methods const
592         https://bugs.webkit.org/show_bug.cgi?id=193189
593
594         Reviewed by Philippe Normand.
595
596         The transform getter methods on the Gradient and Pattern classes both
597         return const references to the transform objects, and don't modify any
598         internal state. They should be marked const accordingly, allowing
599         invocations of these two methods through const references to Gradient
600         and Pattern objects.
601
602         * platform/graphics/Gradient.h:
603         (WebCore::Gradient::gradientSpaceTransform): Now const.
604         * platform/graphics/Pattern.h:
605         (WebCore::Pattern::patternSpaceTransform): Now const.
606
607 2019-01-07  Zan Dobersek  <zdobersek@igalia.com>
608
609         REGRESSION(r239636): ImageDecoder::setEncodedDataStatusChangeCallback() can be called on a null decoder
610         https://bugs.webkit.org/show_bug.cgi?id=193187
611
612         Reviewed by Philippe Normand.
613
614         * platform/graphics/ImageSource.cpp:
615         (WebCore::ImageSource::ensureDecoderAvailable): Bail before calling the
616         setEncodedDataStatusChangeCallback() method when the returned
617         ImageDecoder object is null.
618
619 2019-01-06  Zan Dobersek  <zdobersek@igalia.com>
620
621         [Nicosia] Take over CoordinatedGraphics-named implementation of async scrolling classes
622         https://bugs.webkit.org/show_bug.cgi?id=193133
623
624         Reviewed by Michael Catanzaro.
625
626         Move the CoordinatedGraphics-specific files under
627         page/scrolling/coordinatedgraphics/ to page/scrolling/nicosia/, along
628         with renaming the files and classes accordingly. Implementation will
629         only depend on the Nicosia-specific layer structure and is not specific
630         to the CoordinatedGraphics system.
631
632         * PlatformPlayStation.cmake:
633         * SourcesGTK.txt:
634         * SourcesWPE.txt:
635         * page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp.
636         * page/scrolling/nicosia/ScrollingCoordinatorNicosia.h: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h.
637         * page/scrolling/nicosia/ScrollingStateNodeNicosia.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingStateNodeCoordinatedGraphics.cpp.
638         * page/scrolling/nicosia/ScrollingTreeFixedNode.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeFixedNode.cpp.
639         * page/scrolling/nicosia/ScrollingTreeFixedNode.h: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeFixedNode.h.
640         * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeFrameScrollingNodeCoordinatedGraphics.cpp.
641         * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeFrameScrollingNodeCoordinatedGraphics.h.
642         * page/scrolling/nicosia/ScrollingTreeNicosia.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeCoordinatedGraphics.cpp.
643         * page/scrolling/nicosia/ScrollingTreeNicosia.h: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeCoordinatedGraphics.h.
644         * page/scrolling/nicosia/ScrollingTreeStickyNode.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeStickyNode.cpp.
645         * page/scrolling/nicosia/ScrollingTreeStickyNode.h: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeStickyNode.h.
646         * platform/TextureMapper.cmake:
647
648 2019-01-06  Jiewen Tan  <jiewen_tan@apple.com>
649
650         [WebAuthN] Import U2F command/response converters from Chromium
651         https://bugs.webkit.org/show_bug.cgi?id=193150
652         <rdar://problem/47054028>
653
654         Reviewed by Brent Fulgham.
655
656         This patch imports Chromium's U2F command/response converters:
657         https://fidoalliance.org/specs/fido-v2.0-id-20180227/fido-client-to-authenticator-protocol-v2.0-id-20180227.html#u2f-interoperability
658         1. It directly imports the following files and suit them to WebKit's coding style:
659         https://cs.chromium.org/chromium/src/device/fido/u2f_command_constructor.cc?l=1&rcl=db624110317d01efa78cd32e7be1524190e1beb0
660         https://cs.chromium.org/chromium/src/device/fido/u2f_command_constructor.h?rcl=db624110317d01efa78cd32e7be1524190e1beb0
661         https://cs.chromium.org/chromium/src/device/fido/u2f_command_constructor_unittest.cc?rcl=db624110317d01efa78cd32e7be1524190e1beb0
662         2. It gathers the following methods into U2fResponseConverter:
663         AuthenticatorMakeCredentialResponse::CreateFromU2fRegisterResponse()
664         AuthenticatorGetAssertionResponse::CreateFromU2fSignResponse()
665         3. It also updates FidoConstants.h, FidoTestData.h and CtapResponseTest.cpp accordingly.
666
667         Besides importing stuff from Chroimum, it also gathers a bunch of constants and helper functions into WebAuthenticationConstants.h
668         and WebAuthenticationUtils.h. It also fixes Bug 183534: 2) and 7).
669
670         Covered by API tests.
671
672         * Modules/webauthn/AuthenticatorCoordinator.cpp:
673         (WebCore::AuthenticatorCoordinatorInternal::produceClientDataJsonHash):
674         * Modules/webauthn/WebAuthenticationConstants.h: Copied from Source/WebCore/Modules/webauthn/COSEConstants.h.
675         * Modules/webauthn/WebAuthenticationUtils.cpp: Added.
676         (WebCore::convertBytesToVector):
677         (WebCore::produceRpIdHash):
678         (WebCore::encodeES256PublicKeyAsCBOR):
679         (WebCore::buildAttestedCredentialData):
680         (WebCore::buildAuthData):
681         (WebCore::buildAttestationObject):
682         * Modules/webauthn/WebAuthenticationUtils.h: Renamed from Source/WebCore/Modules/webauthn/COSEConstants.h.
683         * Modules/webauthn/fido/DeviceResponseConverter.cpp:
684         (fido::getCredentialId):
685         (fido::readCTAPGetInfoResponse):
686         * Modules/webauthn/fido/FidoConstants.h:
687         * Modules/webauthn/fido/U2fCommandConstructor.cpp: Added.
688         (fido::WebCore::constructU2fRegisterCommand):
689         (fido::WebCore::constructU2fSignCommand):
690         (fido::isConvertibleToU2fRegisterCommand):
691         (fido::isConvertibleToU2fSignCommand):
692         (fido::convertToU2fRegisterCommand):
693         (fido::convertToU2fCheckOnlySignCommand):
694         (fido::convertToU2fSignCommand):
695         (fido::constructBogusU2fRegistrationCommand):
696         * Modules/webauthn/fido/U2fCommandConstructor.h: Added.
697         * Modules/webauthn/fido/U2fResponseConverter.cpp: Added.
698         (fido::WebCore::extractECPublicKeyFromU2fRegistrationResponse):
699         (fido::WebCore::extractCredentialIdFromU2fRegistrationResponse):
700         (fido::WebCore::createAttestedCredentialDataFromU2fRegisterResponse):
701         (fido::WebCore::parseX509Length):
702         (fido::WebCore::createFidoAttestationStatementFromU2fRegisterResponse):
703         (fido::readU2fRegisterResponse):
704         (fido::readFromU2fSignResponse):
705         * Modules/webauthn/fido/U2fResponseConverter.h: Added.
706         * Modules/webgpu/WebGPUCommandBuffer.cpp:
707         * Sources.txt:
708         * WebCore.xcodeproj/project.pbxproj:
709
710 2019-01-06  David Kilzer  <ddkilzer@apple.com>
711
712         Leak of WTF::Function objects in WebCore::CryptoKeyRSA::generatePair() (64-80 bytes each) in com.apple.WebKit.WebContent running WebKit layout tests
713         <https://webkit.org/b/193177>
714         <rdar://problem/47072196>
715
716         Reviewed by Saam Barati.
717
718         * crypto/mac/CryptoKeyRSAMac.cpp:
719         (WebCore::CryptoKeyRSA::generatePair): Fix the leak by changing
720         raw pointers to heap-allocated __block variables to hold the
721         WTF::Function objects until they are consumed within the block
722         passed to dispatch_async().  The __block variables act like
723         captured variables in a C++ lambda and have the same lifetime as
724         the block that they are captured in.  Note that we would have to
725         convert the source file from C++ to Objective-C++ to use a C++
726         lambda functor with dispatch_async(), which creates its own
727         issue because the comipiler requires a copy constructor to
728         convert the C++ lambda to a block functor, but the copy
729         constructor for the C++ lambda is implicitly deleted because the
730         WTF::Function copy constructor is explicitly deleted.  Whew!
731
732 2019-01-06  Pablo Saavedra  <psaavedra@igalia.com>
733
734         [WPE][GTK] Building with ENABLE_VIDEO=OFF fails trying to use Document MediaPlayback functions.
735         https://bugs.webkit.org/show_bug.cgi?id=193174
736
737         Reviewed by Michael Catanzaro.
738
739         * page/Page.cpp:
740         (WebCore::Page::stopAllMediaPlayback):
741         (WebCore::Page::suspendAllMediaPlayback):
742         (WebCore::Page::resumeAllMediaPlayback):
743
744 2019-01-05  David Kilzer  <ddkilzer@apple.com>
745
746         Leak of two CCRSACryptorRef (4.0 Kbytes/1 page each) in com.apple.WebKit.WebContent running WebKit layout tests
747         <https://webkit.org/b/193154>
748         <rdar://problem/47052993>
749
750         Reviewed by Brent Fulgham.
751
752         Broadly:
753         - Fix leaks by switching from using raw pointers to using
754           std::unique_ptr<>.
755         - Introduce PlatformRSAKeyContainer type to handle different
756           std::unique_ptr<> on each platform.
757         - Get rid of custom CryptoKeyRSA destructors since the
758           std::unique_ptr<> handles that with a Deleter.
759         - Initialize stack variables to nullptr.
760
761         * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
762         (WebCore::CryptoKeyRSA::create):
763         (WebCore::CryptoKeyRSA::CryptoKeyRSA):
764         (WebCore::CryptoKeyRSA::keySizeInBits const):
765         (WebCore::CryptoKeyRSA::generatePair):
766         (WebCore::CryptoKeyRSA::importSpki):
767         (WebCore::CryptoKeyRSA::importPkcs8):
768         (WebCore::CryptoKeyRSA::exportSpki const):
769         (WebCore::CryptoKeyRSA::exportPkcs8 const):
770         (WebCore::CryptoKeyRSA::algorithm const):
771         (WebCore::CryptoKeyRSA::exportData const):
772         (WebCore::CryptoKeyRSA::~CryptoKeyRSA): Deleted.
773         * crypto/keys/CryptoKeyRSA.h:
774         (WebCore::CCRSACryptorRefDeleter::operator() const):
775         * crypto/mac/CryptoKeyRSAMac.cpp:
776         (WebCore::getPublicKeyComponents):
777         (WebCore::getPrivateKeyComponents):
778         (WebCore::CryptoKeyRSA::CryptoKeyRSA):
779         (WebCore::CryptoKeyRSA::create):
780         (WebCore::CryptoKeyRSA::exportData const):
781         (WebCore::CryptoKeyRSA::generatePair):
782         (WebCore::CryptoKeyRSA::importSpki):
783         (WebCore::CryptoKeyRSA::importPkcs8):
784         (WebCore::CryptoKeyRSA::~CryptoKeyRSA): Deleted.
785
786 2019-01-05  Zalan Bujtas  <zalan@apple.com>
787
788         Incorrect clipping across compositing boundary.
789         https://bugs.webkit.org/show_bug.cgi?id=193172
790         <rdar://problem/44693008>
791
792         Reviewed by Simon Fraser.
793
794         Use temporary cliprect type when crossing compositing boundary to prevent cliprect caching.
795
796         The issue here is that RenderLayer::backgroundClipRect() could cross compositing boundary by calling parentClipRects() which triggers
797         clip rect update using the wrong painting root. This happens when the layer hierarchy and the compositing context do not match.
798         For clip rect computation, we need to climb up on the layer hierarchy (calling parent layer's cliprect functions)
799         but we also need to make sure that the computed cliprects on any given layer are cached only when the painting root is correct.
800         It ensures that when we paint a layer (with the painting root as entry point), the cached cliprects are always based on its onw painting root. 
801
802         Test: compositing/clipping/cached-cliprect-with-compositing-boundary.html
803
804         * rendering/RenderLayer.cpp:
805         (WebCore::RenderLayer::calculateClipRects const):
806
807 2019-01-05  Youenn Fablet  <youenn@apple.com>
808
809         Service Worker fetch should obey its referrer policy
810         https://bugs.webkit.org/show_bug.cgi?id=193152
811
812         Reviewed by Chris Dumez.
813
814         Pass referrer policy retrieved when fetching the service worker script to the SWServer.
815         The SWServer then stores it persistently and sends it to the manager creating service workers.
816         This manager will then set the referrer policy on the dummy Document of the corresponding service worker.
817
818         Covered by rebased test.
819
820         * workers/WorkerScriptLoader.cpp:
821         (WebCore::WorkerScriptLoader::didReceiveResponse):
822         * workers/WorkerScriptLoader.h:
823         (WebCore::WorkerScriptLoader::referrerPolicy const):
824         * workers/service/SWClientConnection.cpp:
825         (WebCore::SWClientConnection::failedFetchingScript):
826         * workers/service/ServiceWorkerContainer.cpp:
827         (WebCore::ServiceWorkerContainer::jobFinishedLoadingScript):
828         * workers/service/ServiceWorkerContainer.h:
829         * workers/service/ServiceWorkerContextData.cpp:
830         (WebCore::ServiceWorkerContextData::isolatedCopy const):
831         * workers/service/ServiceWorkerContextData.h:
832         (WebCore::ServiceWorkerContextData::encode const):
833         (WebCore::ServiceWorkerContextData::decode):
834         * workers/service/ServiceWorkerFetchResult.h:
835         (WebCore::ServiceWorkerFetchResult::encode const):
836         (WebCore::ServiceWorkerFetchResult::decode):
837         * workers/service/ServiceWorkerJob.cpp:
838         (WebCore::ServiceWorkerJob::notifyFinished):
839         * workers/service/ServiceWorkerJobClient.h:
840         * workers/service/context/ServiceWorkerThreadProxy.cpp:
841         (WebCore::createPageForServiceWorker):
842         * workers/service/server/RegistrationDatabase.cpp:
843         (WebCore::recordsTableSchema):
844         (WebCore::RegistrationDatabase::doPushChanges):
845         (WebCore::RegistrationDatabase::importRecords):
846         * workers/service/server/SWServer.cpp:
847         (WebCore::SWServer::addRegistrationFromStore):
848         (WebCore::SWServer::updateWorker):
849         (WebCore::SWServer::installContextData):
850         * workers/service/server/SWServer.h:
851         * workers/service/server/SWServerJobQueue.cpp:
852         (WebCore::SWServerJobQueue::scriptFetchFinished):
853         * workers/service/server/SWServerWorker.cpp:
854         (WebCore::SWServerWorker::SWServerWorker):
855         (WebCore::SWServerWorker::contextData const):
856         * workers/service/server/SWServerWorker.h:
857
858 2019-01-04  Simon Fraser  <simon.fraser@apple.com>
859
860         Factor legacy WK1 code for fixed and scrolling layers into their own helper class
861         https://bugs.webkit.org/show_bug.cgi?id=193165
862
863         Reviewed by Frédéric Wang.
864
865         RenderLayerCompositor has some code to handle registration of viewport-constrained
866         and scrolling layers which is specific to iOS WK1. To reduce pollution, move this
867         into its own helper class called LegacyWebKitScrollingLayerCoordinator, which is only
868         allocated for iOS WK1.
869         
870         iOS WK1 never has a ScrollingCoordinator, so rather than the check for scrollingCoordinator(),
871         we know that we only made a LegacyWebKitScrollingLayerCoordinator when there's a platform widget
872         (i.e. WK1).
873         
874         * page/ChromeClient.h:
875         * rendering/RenderLayerCompositor.cpp:
876         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
877         (WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush):
878         (WebCore::RenderLayerCompositor::didFlushChangesForLayer):
879         (WebCore::RenderLayerCompositor::setIsInWindow):
880         (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking): No longer check the page cache state; now we
881         destroy the render tree of pages in the page cache, so we should never hit this code path.
882         (WebCore::RenderLayerCompositor::didAddScrollingLayer):
883         (WebCore::LegacyWebKitScrollingLayerCoordinator::registerAllViewportConstrainedLayers):
884         (WebCore::LegacyWebKitScrollingLayerCoordinator::unregisterAllViewportConstrainedLayers):
885         (WebCore::scrollbarHasDisplayNone):
886         (WebCore::LegacyWebKitScrollingLayerCoordinator::updateScrollingLayer):
887         (WebCore::LegacyWebKitScrollingLayerCoordinator::registerAllScrollingLayers):
888         (WebCore::LegacyWebKitScrollingLayerCoordinator::registerScrollingLayersNeedingUpdate):
889         (WebCore::LegacyWebKitScrollingLayerCoordinator::unregisterAllScrollingLayers):
890         (WebCore::LegacyWebKitScrollingLayerCoordinator::addScrollingLayer):
891         (WebCore::LegacyWebKitScrollingLayerCoordinator::removeScrollingLayer):
892         (WebCore::LegacyWebKitScrollingLayerCoordinator::didFlushChangesForLayer):
893         (WebCore::updateScrollingLayerWithClient): Deleted.
894         (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers): Deleted.
895         (WebCore::RenderLayerCompositor::unregisterAllViewportConstrainedLayers): Deleted.
896         (WebCore::RenderLayerCompositor::registerAllScrollingLayers): Deleted.
897         (WebCore::RenderLayerCompositor::unregisterAllScrollingLayers): Deleted.
898         * rendering/RenderLayerCompositor.h:
899         (WebCore::LegacyWebKitScrollingLayerCoordinator::LegacyWebKitScrollingLayerCoordinator):
900         * workers/service/ServiceWorkerContainer.cpp:
901         (WebCore::ServiceWorkerContainer::~ServiceWorkerContainer):
902
903 2019-01-05  Zalan Bujtas  <zalan@apple.com>
904
905         [LFC] VerticalMargin should only have the used values.
906         https://bugs.webkit.org/show_bug.cgi?id=193168
907
908         Reviewed by Antti Koivisto.
909
910         Split VerticalMargin into ComputedVerticalMargin and UsedVerticalMargin.
911         ComputedVerticalMargin holds the computed (optional) values while UsedVerticalMargin holds both the
912         collapsed (optional) and the non-collapsed values.
913
914         * layout/FormattingContext.cpp:
915         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):
916         * layout/FormattingContext.h:
917         * layout/FormattingContextGeometry.cpp:
918         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
919         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
920         (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
921         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin):
922         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
923         (WebCore::Layout::FormattingContext::Geometry::computedVerticalMargin):
924         (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedVerticalMarginValue): Deleted.
925         * layout/FormattingContextQuirks.cpp:
926         (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
927         * layout/LayoutUnits.h:
928         * layout/MarginTypes.h:
929         (WebCore::Layout::UsedVerticalMargin::before const):
930         (WebCore::Layout::UsedVerticalMargin::after const):
931         (WebCore::Layout::UsedVerticalMargin::nonCollapsedValues const):
932         (WebCore::Layout::UsedVerticalMargin::collapsedValues const):
933         (WebCore::Layout::UsedVerticalMargin::hasCollapsedValues const):
934         (WebCore::Layout::UsedVerticalMargin::setCollapsedValues):
935         (WebCore::Layout::UsedVerticalMargin::UsedVerticalMargin):
936         (WebCore::Layout::VerticalMargin::nonCollapsedValues const): Deleted.
937         (WebCore::Layout::VerticalMargin::collapsedValues const): Deleted.
938         (WebCore::Layout::VerticalMargin::setCollapsedValues): Deleted.
939         (WebCore::Layout::VerticalMargin::VerticalMargin): Deleted.
940         (WebCore::Layout::VerticalMargin::usedValues const): Deleted.
941         * layout/blockformatting/BlockFormattingContext.cpp:
942         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):
943         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
944         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
945         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
946         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
947         (WebCore::Layout::BlockFormattingContext::Quirks::stretchedHeight):
948         * layout/blockformatting/BlockMarginCollapse.cpp:
949         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginBefore):
950         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginAfter):
951         * layout/displaytree/DisplayBox.h:
952         (WebCore::Display::Box::setVerticalMargin):
953         (WebCore::Display::Box::verticalMargin const):
954         (WebCore::Display::Box::marginBefore const):
955         (WebCore::Display::Box::marginAfter const):
956         * layout/floats/FloatingContext.cpp:
957         (WebCore::Layout::FloatingContext::verticalPositionWithClearance const):
958         * layout/inlineformatting/InlineFormattingContext.cpp:
959         (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin const):
960
961 2019-01-04  Daniel Bates  <dabates@apple.com>
962
963         REGRESSION (r238522): Erratic scrolling on Google flights search result page and vrbo.com
964         https://bugs.webkit.org/show_bug.cgi?id=192996
965         <rdar://problem/46573552>
966
967         Reviewed by Simon Fraser.
968
969         Only scroll a text field if its inner text size changes and it is the currently active and
970         focused element on the page.
971
972         Test: fast/scrolling/page-should-not-scroll-on-unfocused-text-field-layout.html
973
974         * rendering/RenderTextControlSingleLine.cpp:
975         (WebCore::RenderTextControlSingleLine::layout):
976
977 2019-01-04  Alex Christensen  <achristensen@webkit.org>
978
979         Progress towards fixing Mac CMake build
980         https://bugs.webkit.org/show_bug.cgi?id=193105
981
982         Reviewed by Don Olmstead.
983
984         * PlatformMac.cmake:
985         * Sources.txt:
986         * SourcesCocoa.txt:
987         * WebCore.xcodeproj/project.pbxproj:
988         * platform/graphics/gpu/GPURenderPassEncoder.h:
989
990 2019-01-04  Zalan Bujtas  <zalan@apple.com>
991
992         [iOS] ERROR: post-layout: dirty renderer(s) in WebCore::RenderTreeNeedsLayoutChecker::~RenderTreeNeedsLayoutChecker()
993         https://bugs.webkit.org/show_bug.cgi?id=189608
994         <rdar://problem/44473299>
995
996         Reviewed by Simon Fraser.
997
998         When a frameset/iframe is hidden and we skip layout, clear the dirty flag on its subtree as well.
999
1000         Covered by fast/frames/invalid-frameset.html.
1001
1002         * rendering/RenderFrameSet.cpp:
1003         (WebCore::clearSiblingSubtrees):
1004         (WebCore::RenderFrameSet::positionFrames):
1005         (WebCore::RenderFrameSet::positionFramesWithFlattening):
1006
1007 2019-01-04  Youenn Fablet  <youenn@apple.com>
1008
1009         [Fetch API] Implement abortable fetch
1010         https://bugs.webkit.org/show_bug.cgi?id=174980
1011         <rdar://problem/46861402>
1012
1013         Reviewed by Chris Dumez.
1014
1015         Add an AbortSignal to FetchRequest.
1016
1017         Add support for AbortSignal algorithm.
1018         The fetch request signal is added an algorithm to abort the fetch.
1019         Update clone algorithm to let signal of the cloned request be following the origin request.
1020
1021         Update ReadableStream error handling to return an exception instead of a string.
1022         This allows passing an AbortError instead of a TypeError as previously done.
1023
1024         Update FetchBodyOwner to store a loading error either as an exception or as a resource error.
1025         The latter is used for passing the error from service worker back to the page.
1026         The former is used to pass it to ReadableStream or body accessors.
1027
1028         Covered by enabled tests.
1029
1030         * Modules/cache/DOMCache.cpp:
1031         (WebCore::DOMCache::put):
1032         * Modules/fetch/FetchBody.cpp:
1033         (WebCore::FetchBody::consumeAsStream):
1034         (WebCore::FetchBody::loadingFailed):
1035         * Modules/fetch/FetchBody.h:
1036         * Modules/fetch/FetchBodyConsumer.cpp:
1037         (WebCore::FetchBodyConsumer::loadingFailed):
1038         * Modules/fetch/FetchBodyConsumer.h:
1039         * Modules/fetch/FetchBodyOwner.cpp:
1040         (WebCore::FetchBodyOwner::arrayBuffer):
1041         (WebCore::FetchBodyOwner::blob):
1042         (WebCore::FetchBodyOwner::cloneBody):
1043         (WebCore::FetchBodyOwner::formData):
1044         (WebCore::FetchBodyOwner::json):
1045         (WebCore::FetchBodyOwner::text):
1046         (WebCore::FetchBodyOwner::loadBlob):
1047         (WebCore::FetchBodyOwner::blobLoadingFailed):
1048         (WebCore::FetchBodyOwner::consumeBodyAsStream):
1049         (WebCore::FetchBodyOwner::setLoadingError):
1050         * Modules/fetch/FetchBodyOwner.h:
1051         (WebCore::FetchBodyOwner::loadingError const):
1052         (WebCore::FetchBodyOwner::loadingException const):
1053         * Modules/fetch/FetchBodySource.cpp:
1054         (WebCore::FetchBodySource::error):
1055         * Modules/fetch/FetchBodySource.h:
1056         * Modules/fetch/FetchRequest.cpp:
1057         (WebCore::FetchRequest::initializeWith):
1058         (WebCore::FetchRequest::clone):
1059         * Modules/fetch/FetchRequest.h:
1060         (WebCore::FetchRequest::FetchRequest):
1061         * Modules/fetch/FetchRequest.idl:
1062         * Modules/fetch/FetchRequestInit.h:
1063         (WebCore::FetchRequestInit::hasMembers const):
1064         * Modules/fetch/FetchRequestInit.idl:
1065         * Modules/fetch/FetchResponse.cpp:
1066         (WebCore::FetchResponse::clone):
1067         (WebCore::FetchResponse::fetch):
1068         (WebCore::FetchResponse::BodyLoader::didFail):
1069         * Modules/fetch/FetchResponse.h:
1070         * bindings/js/ReadableStreamDefaultController.h:
1071         (WebCore::ReadableStreamDefaultController::error):
1072         * dom/AbortSignal.cpp:
1073         (WebCore::AbortSignal::abort):
1074         (WebCore::AbortSignal::follow):
1075         * dom/AbortSignal.h:
1076
1077 2019-01-04  Brent Fulgham  <bfulgham@apple.com>
1078
1079         Parsed protocol of javascript URLs with embedded newlines and carriage returns do not match parsed protocol in Chrome and Firefox
1080         https://bugs.webkit.org/show_bug.cgi?id=193155
1081         <rdar://problem/40230982>
1082
1083         Reviewed by Chris Dumez.
1084
1085         Test: fast/loader/comment-only-javascript-url.html
1086
1087         Make a special case for URLs beginning with 'javascript:'. We should always
1088         treat these as JS URLs, even if the content contained within the URL
1089         string might match other parts of the URL parsing spec.
1090
1091         * html/URLUtils.h:
1092         (WebCore::URLUtils<T>::protocol const):
1093
1094 2019-01-04  Jer Noble  <jer.noble@apple.com>
1095
1096         [WebKitLegacy] Media playback pauses on scroll
1097         https://bugs.webkit.org/show_bug.cgi?id=192829
1098
1099         Reviewed by Eric Carlson.
1100
1101         New API tests:
1102             WebKitLegacy.ScrollingDoesNotPauseMedia
1103             WKWebView.StopAllMediaPlayback
1104             WKWebView.SuspendResumeAllMediaPlayback
1105
1106         Do not use suspendActiveDOMObjects(ReasonForSuspension::PageWillBeSuspended) to pause
1107         video. Roll back the changes to HTMLMediaElement, and introduce a new set of Page calls
1108         suspendAllMediaPlayback() & resumeAllMediaPlayback() which replaces the removed bahavior.
1109
1110         * dom/Document.cpp:
1111         (WebCore::Document::~Document):
1112         (WebCore::Document::stopAllMediaPlayback):
1113         (WebCore::Document::suspendAllMediaPlayback):
1114         (WebCore::Document::resumeAllMediaPlayback):
1115         * dom/Document.h:
1116         * html/HTMLMediaElement.cpp:
1117         (WebCore::HTMLMediaElement::HTMLMediaElement):
1118         (WebCore::HTMLMediaElement::parseAttribute):
1119         (WebCore::HTMLMediaElement::didFinishInsertingNode):
1120         (WebCore::HTMLMediaElement::setSrcObject):
1121         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
1122         (WebCore::HTMLMediaElement::suspend):
1123         (WebCore::HTMLMediaElement::resume):
1124         (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless const):
1125         * html/HTMLMediaElement.h:
1126         (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless const): Deleted.
1127         * html/MediaElementSession.cpp:
1128         (WebCore::MediaElementSession::playbackPermitted const):
1129         * page/Page.cpp:
1130         (WebCore::Page::stopAllMediaPlayback):
1131         (WebCore::Page::suspendAllMediaPlayback):
1132         (WebCore::Page::resumeAllMediaPlayback):
1133         * page/Page.h:
1134         (WebCore::Page::mediaPlaybackIsSuspended):
1135         * platform/audio/PlatformMediaSession.h:
1136         * platform/audio/PlatformMediaSessionManager.cpp:
1137         (WebCore::PlatformMediaSessionManager::suspendAllMediaPlaybackForDocument):
1138         (WebCore::PlatformMediaSessionManager::resumeAllMediaPlaybackForDocument):
1139         * platform/audio/PlatformMediaSessionManager.h:
1140
1141 2019-01-04  Chris Dumez  <cdumez@apple.com>
1142
1143         Add support for toggling device orientation API support per site
1144         https://bugs.webkit.org/show_bug.cgi?id=193143
1145         <rdar://problem/46605724>
1146
1147         Reviewed by Alex Christensen.
1148
1149         Add support for toggling device orientation API support per site via _WKWebsitePolicies.
1150
1151         * dom/Document.cpp:
1152         (WebCore::Document::simulateDeviceOrientationChange):
1153         * dom/Document.h:
1154         * loader/DocumentLoader.h:
1155         (WebCore::DocumentLoader::deviceOrientationEventEnabled const):
1156         (WebCore::DocumentLoader::setDeviceOrientationEventEnabled):
1157         * page/DOMWindow.cpp:
1158         (WebCore::DOMWindow::addEventListener):
1159
1160 2019-01-04  Jer Noble  <jer.noble@apple.com>
1161
1162         Web Content process main thread blocked beneath ImageDecoderAVFObjC::readSamples for many seconds on imgur.com
1163         https://bugs.webkit.org/show_bug.cgi?id=191806
1164         <rdar://problem/46151477>
1165
1166         Reviewed by Dean Jackson.
1167
1168         Test: http/tests/images/mp4-partial-load.html
1169
1170         Rather than use an AVAssetReaderTrackOutput, which will load both sample metadata and sample data
1171         synchronously when a sample is requested, use AVAssetReaderSampleReferenceOutput, which only loads
1172         sample metadata, including the byte offset and byte length of the sample data. By waiting until the
1173         AVAsset signals that it's own metadata is loaded, we can safely parse all the sample metadata without
1174         blocking on network loads. Once enough data is loaded, we can replace the byte reference and offset
1175         attachements in the sample with actual data, and mark the sample as "complete".
1176
1177         Because the existing ImageSource assumes that image data parsing will occur synchronously, and that
1178         synchronous parsing could cause a hang if the metadata is not loaded, add a new callback method which
1179         allows the ImageSource to be notified when the encodedDataStatus changes. The ImageSource notifies the
1180         CacheImage, which notifies the RenderImage, and thus the asynchronous parsing will kick off the
1181         renderer's animation loop.
1182
1183         * loader/cache/CachedImage.cpp:
1184         (WebCore::CachedImage::CachedImageObserver::encodedDataStatusChanged):
1185         (WebCore::CachedImage::encodedDataStatusChanged):
1186         * loader/cache/CachedImage.h:
1187         * platform/graphics/ImageDecoder.h:
1188         (WebCore::ImageDecoder::setEncodedDataStatusChangeCallback):
1189         * platform/graphics/ImageObserver.h:
1190         (WebCore::ImageObserver::encodedDataStatusChanged):
1191         * platform/graphics/ImageSource.cpp:
1192         (WebCore::ImageSource::ensureDecoderAvailable):
1193         (WebCore::ImageSource::encodedDataStatusChanged):
1194         (WebCore::ImageSource::frameDecodingStatusAtIndex):
1195         * platform/graphics/ImageSource.h:
1196         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h:
1197         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
1198         (-[WebCoreSharedBufferResourceLoaderDelegate data]):
1199         (WebCore::ImageDecoderAVFObjCSample::byteRange const):
1200         (WebCore::ImageDecoderAVFObjC::readSamples):
1201         (WebCore::ImageDecoderAVFObjC::setEncodedDataStatusChangeCallback):
1202         (WebCore::ImageDecoderAVFObjC::encodedDataStatus const):
1203         (WebCore::ImageDecoderAVFObjC::frameIsCompleteAtIndex const):
1204         (WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex):
1205         (WebCore::ImageDecoderAVFObjC::sampleIsComplete const):
1206
1207 2019-01-04  Youenn Fablet  <youenn@apple.com>
1208
1209         CSP violation reports should bypass CSP checks
1210         https://bugs.webkit.org/show_bug.cgi?id=192857
1211         <rdar://problem/46887236>
1212
1213         Reviewed by Chris Dumez.
1214
1215         For ping loads, pass the option to do CSP checks from PingLoader to LoaderStrategy.
1216         This new option is unused by WebKit Legacy.
1217         It is used by WebKit loader strategy to only send any CSP response header to network process
1218         in case CSP checks should be done.
1219
1220         This option is used to disable CSP checks for Ping Loads that report CSP violations.
1221
1222         Test: http/wpt/fetch/csp-reports-bypass-csp-checks.html
1223
1224         * loader/LoaderStrategy.h:
1225         * loader/PingLoader.cpp:
1226         (WebCore::PingLoader::loadImage):
1227         (WebCore::PingLoader::sendPing):
1228         (WebCore::PingLoader::sendViolationReport):
1229         (WebCore::PingLoader::startPingLoad):
1230         * loader/PingLoader.h:
1231         * loader/cache/CachedResource.cpp:
1232         (WebCore::CachedResource::load):
1233
1234 2019-01-04  Wenson Hsieh  <wenson_hsieh@apple.com>
1235
1236         [Cocoa] Merge WebEditCommandProxy::nameForEditAction and undoNameForEditAction into a single function
1237         https://bugs.webkit.org/show_bug.cgi?id=193129
1238
1239         Reviewed by Tim Horton.
1240
1241         Adds a new helper function that returns the undo/redo name for a given EditAction. No change in behavior.
1242
1243         * Sources.txt:
1244         * WebCore.xcodeproj/project.pbxproj:
1245         * editing/EditAction.cpp: Copied from Source/WebKit/UIProcess/WebEditCommandProxy.cpp.
1246         (WebCore::nameForUndoRedo):
1247         * editing/EditAction.h:
1248         * editing/Editor.cpp:
1249
1250 2019-01-03  Matt Rajca  <mrajca@apple.com>
1251
1252         Make DidPlayMediaPreventedFromPlaying autoplay event more generic.
1253         https://bugs.webkit.org/show_bug.cgi?id=193128
1254         rdar://34554231
1255
1256         Reviewed by Jer Noble.
1257
1258         Today, the "DidPlayMediaPreventedFromPlaying" autoplay event is only sent for
1259         media prevented from autoplaying. It could be generalized to a "DidPlayMediaWithUserGesture"
1260         event along with a flag that indicates whether or not autoplay was actually prevented.
1261         Moreover, we can include a flag that indicates whether the media element in question
1262         is main content. Clients will then know in more cases when media was played with a user
1263         gesture, whether or not it has audio, as well as its main content status. While the main
1264         content heuristics may not be perfect, they covered the top 20 video-centric websites that
1265         this was tested with and are meant to be used by clients for data evaluation purposes.
1266
1267         As part of this, the PlaybackWithoutUserGesture enum was renamed to AutoplayEventPlaybackState
1268         since it now also applies to cases where there is a user gesture. The
1269         `m_playbackWithoutUserGestureStartedTime` member variable was also removed in favor of
1270         `playbackStartedTime` which also covers all the cases we care about.
1271
1272         Tests: existing API tests were updated to reflect the new names. New API tests
1273         were added for the new case in which the "DidPlayMediaWithUserGesture" event is sent.
1274
1275         * html/HTMLMediaElement.cpp:
1276         (WebCore::convertEnumerationToString): Update to new enum cases.
1277         (WebCore::HTMLMediaElement::setReadyState): Ditto.
1278         (WebCore::HTMLMediaElement::play): Ditto.
1279         (WebCore::HTMLMediaElement::playInternal): Also cover the case where
1280          playback was not prevented but there was a user gesture.
1281         (WebCore::HTMLMediaElement::pauseInternal): Use new name.
1282         (WebCore::HTMLMediaElement::setVolume): Use new name.
1283         (WebCore::HTMLMediaElement::playbackProgressTimerFired): Dispatch the
1284          DidPlayMediaWithUserGesture event when playback was started with a user
1285          gesture as well.
1286         (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): Use new name.
1287         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Ditto.
1288         (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): Ditto.
1289         (WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer): Ditto.
1290         (WebCore::HTMLMediaElement::handleAutoplayEvent): Pass along new media state.
1291         (WebCore::HTMLMediaElement::userDidInterfereWithAutoplay): Use new name.
1292         (WebCore::HTMLMediaElement::setAutoplayEventPlaybackState): Stop setting
1293          m_playbackWithoutUserGestureStartedTime in favor of using playbackStartedTime.
1294         (WebCore::HTMLMediaElement::updateShouldPlay): Use new name.
1295         (WebCore::HTMLMediaElement::setPlaybackWithoutUserGesture): Renamed.
1296         * html/HTMLMediaElement.h:
1297         (WTF::LogArgument<WebCore::HTMLMediaElement::AutoplayEventPlaybackState>::toString): Renamed from...
1298         (WTF::LogArgument<WebCore::HTMLMediaElement::PlaybackWithoutUserGesture>::toString):
1299         * html/MediaElementSession.cpp:
1300         (WebCore::MediaElementSession::isMainContentForPurposesOfAutoplayEvents const): Don't
1301          do the hit testing check for the purposes of autoplay events. It seems to fail on the
1302          basic Vimeo player due to overlapping divs.
1303         (WebCore::isElementMainContentForPurposesOfAutoplay):
1304         (WebCore::MediaElementSession::updateIsMainContent const): Keep the existing behavior
1305          here of hit testing.
1306         (WebCore::isMainContentForPurposesOfAutoplay): Renamed.
1307         * html/MediaElementSession.h:
1308         * page/AutoplayEvent.h:
1309
1310 2019-01-04  Youenn Fablet  <youenn@apple.com>
1311
1312         Crash in WebCore::ServiceWorkerGlobalScope
1313         https://bugs.webkit.org/show_bug.cgi?id=192513
1314         <rdar://problem/46563880>
1315
1316         Reviewed by Alex Christensen.
1317
1318         Store the identifier in its own variable to make sure we do not use workerThread after being moved.
1319
1320         * workers/service/ServiceWorkerGlobalScope.cpp:
1321         (WebCore::ServiceWorkerGlobalScope::skipWaiting):
1322
1323 2019-01-04  Chris Fleizach  <cfleizach@apple.com>
1324
1325         AX: String check: "Rule" does not reflect the meaning of the <hr> html tag
1326         https://bugs.webkit.org/show_bug.cgi?id=193041
1327         <rdar://problem/46954090>
1328
1329         Reviewed by Zalan Bujtas.
1330
1331         * en.lproj/Localizable.strings:
1332         * platform/cocoa/LocalizedStringsCocoa.mm:
1333         (WebCore::AXHorizontalRuleDescriptionText):
1334
1335 2019-01-04  Zalan Bujtas  <zalan@apple.com>
1336
1337         [LFC] ComputedHorizontalMargin should have optional members
1338         https://bugs.webkit.org/show_bug.cgi?id=193131
1339
1340         Reviewed by Antti Koivisto.
1341
1342         Split HorizontalMargin into UsedHorizontalMargin and ComputedHorizontalMargin. ComputedHorizontalMargin's members are optional.
1343         (see computed vs used values)
1344
1345         * layout/FormattingContext.h:
1346         * layout/FormattingContextGeometry.cpp:
1347         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
1348         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
1349         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
1350         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
1351         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
1352         (WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin):
1353         (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedHorizontalMarginValue): Deleted.
1354         * layout/LayoutUnits.h:
1355         * layout/MarginTypes.h:
1356         * layout/Verification.cpp:
1357         (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
1358         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
1359         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
1360         * layout/displaytree/DisplayBox.h:
1361         (WebCore::Display::Box::setHorizontalMargin):
1362         (WebCore::Display::Box::setHorizontalComputedMargin):
1363         (WebCore::Display::Box::computedMarginStart const):
1364         (WebCore::Display::Box::computedMarginEnd const):
1365         * layout/floats/FloatAvoider.h:
1366         (WebCore::Layout::FloatAvoider::marginStart const):
1367         (WebCore::Layout::FloatAvoider::marginEnd const):
1368         * layout/inlineformatting/InlineFormattingContext.cpp:
1369         (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
1370         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
1371         (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
1372
1373 2019-01-04  Zalan Bujtas  <zalan@apple.com>
1374
1375         [LFC][BFC] Use computedValue and usedValue consistently
1376         https://bugs.webkit.org/show_bug.cgi?id=193059
1377
1378         Reviewed by Antti Koivisto.
1379
1380         https://www.w3.org/TR/CSS22/cascade.html#value-stages
1381
1382         6.1.2 Computed values
1383         Specified values are resolved to computed values during the cascade; for example URIs are made absolute and 'em' and 'ex' units
1384         are computed to pixel or absolute lengths. Computing a value never requires the user agent to render the document...
1385
1386         6.1.3 Used values
1387         Computed values are processed as far as possible without formatting the document. Some values, however, can only be determined when the document
1388         is being laid out. For example, if the width of an element is set to be a certain percentage of its containing block, the width cannot be determined
1389         until the width of the containing block has been determined. The used value is the result of taking the computed value and resolving any remaining
1390         dependencies into an absolute value.
1391
1392         * layout/FormattingContext.cpp:
1393         (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const):
1394         * layout/FormattingContextGeometry.cpp:
1395         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
1396         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
1397         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
1398         (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
1399         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
1400         * layout/LayoutState.cpp:
1401         (WebCore::Layout::LayoutState::LayoutState):
1402         * layout/LayoutUnits.h:
1403         * layout/Verification.cpp:
1404         (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
1405         * layout/blockformatting/BlockFormattingContext.cpp:
1406         (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const):
1407         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
1408         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
1409         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin):
1410         * layout/displaytree/DisplayBox.cpp:
1411         (WebCore::Display::Box::Box):
1412         * layout/displaytree/DisplayBox.h:
1413         (WebCore::Display::Box::setHasValidHorizontalComputedMargin):
1414         (WebCore::Display::Box::setHorizontalComputedMargin):
1415         (WebCore::Display::Box::computedMarginStart const):
1416         (WebCore::Display::Box::computedMarginEnd const):
1417         (WebCore::Display::Box::setHasValidHorizontalNonComputedMargin): Deleted.
1418         (WebCore::Display::Box::setHorizontalNonComputedMargin): Deleted.
1419         (WebCore::Display::Box::nonComputedMarginStart const): Deleted.
1420         (WebCore::Display::Box::nonComputedMarginEnd const): Deleted.
1421         * layout/floats/FloatAvoider.h:
1422         (WebCore::Layout::FloatAvoider::marginStart const):
1423         (WebCore::Layout::FloatAvoider::marginEnd const):
1424         * layout/inlineformatting/InlineFormattingContext.cpp:
1425         (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin const):
1426
1427 2019-01-03  Zalan Bujtas  <zalan@apple.com>
1428
1429         REGRESSION: -webkit-appearance test case crashes
1430         https://bugs.webkit.org/show_bug.cgi?id=189302
1431         <rdar://problem/44143049>
1432
1433         Reviewed by Wenson Hsieh.
1434
1435         The painting and the layout positions of the cancel button need to match in order to be able to interact with it.
1436         This patch removes the previous position inlining attempts.
1437
1438         Test: fast/forms/webkit-appearance-searchfield-cancel-button-crash.html
1439
1440         * rendering/RenderThemeMac.mm:
1441         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
1442
1443 2019-01-03  David Kilzer  <ddkilzer@apple.com>
1444
1445         Leak of WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback (48 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
1446         <https://webkit.org/b/193122>
1447         <rdar://problem/47022987>
1448
1449         Reviewed by Youenn Fablet.
1450
1451         * Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp:
1452         (WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback::AddRef const):
1453         (WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback::Release const):
1454         - Remove `final` keyword so that
1455           `new rtc::RefCountedObject<RTCCertificateGeneratorCallback>()`
1456           can be called.
1457         (WebCore::LibWebRTCCertificateGenerator::generateCertificate):
1458         - To fix the leak call
1459           `new rtc::RefCountedObject<RTCCertificateGeneratorCallback>()`
1460           to create the object.
1461
1462 2019-01-03  Simon Fraser  <simon.fraser@apple.com>
1463
1464         REGRESSION (r238090): After showing the Find banner or tab bar, hit tests are vertically offset (or painting is not offset)
1465         https://bugs.webkit.org/show_bug.cgi?id=193124
1466         rdar://problem/46755409
1467
1468         Reviewed by Tim Horton.
1469
1470         Top content inset feeds into scrolling tree geometry, so when it changes we need to trigger
1471         an update of the root scrolling node, which happens via RenderLayerBacking::updateGeometry().
1472         So set a dirty bit on the root layer in frameViewDidChangeSize(), which is called from the code
1473         path that runs when top content inset changes.
1474
1475         Find banner behavior is not easily testable. platform/mac/fast/events/content-inset-hit-testing.html did not detect the regression.
1476
1477         * rendering/RenderLayerCompositor.cpp:
1478         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
1479
1480 2019-01-03  Chris Dumez  <cdumez@apple.com>
1481
1482         Potential infinite recursion in isFrameFamiliarWith(Frame&, Frame&)
1483         https://bugs.webkit.org/show_bug.cgi?id=192997
1484         <rdar://problem/46217271>
1485
1486         Reviewed by Antti Koivisto.
1487
1488         isFrameFamiliarWith(Frame&, Frame&) was called recursively using the passed frames' openers.
1489         The issue is that a Frame can be its opener. There could also be a cycle in the opener chain.
1490
1491         To address the issue, simplify isFrameFamiliarWith() so that it is no longer recursive. We now
1492         only check if the frames belong to the same pages or if their openers do. We no longer check
1493         openers' opener and up.
1494
1495         Note that this function is used to check if a frame is allowed to target another. In practice,
1496         it is unlikely to be useful to navigate an opener's opener and an openee's openee.
1497
1498         Tests: fast/dom/Window/window-open-opener-cycle.html
1499                fast/dom/Window/window-open-self-as-opener.html
1500
1501         * page/FrameTree.cpp:
1502         (WebCore::isFrameFamiliarWith):
1503
1504 2019-01-02  Simon Fraser  <simon.fraser@apple.com>
1505
1506         REGRESSION (r239306): Don't disable font smoothing in transparent layers on macOS Mojave and later
1507         https://bugs.webkit.org/show_bug.cgi?id=193095
1508         <rdar://problem/47014944>
1509
1510         Reviewed by Zalan Bujtas.
1511         
1512         In r239306 we stopped making CALayers for font-smoothed text when not necessary on macOS Mojave
1513         and later. However, we still turned off smoothing for non-opaque layers (setShouldSmoothFonts(false)),
1514         which continues to affect the appearance of text.
1515         
1516         Fix by only calling setShouldSmoothFonts(false) when the OS supports font smoothing.
1517
1518         Test: compositing/contents-format/subpixel-antialiased-text.html
1519
1520         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
1521         (WebCore::PlatformCALayer::drawLayerContents):
1522
1523 2019-01-02  David Kilzer  <ddkilzer@apple.com>
1524
1525         Leak of CMSampleBuffer (752 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
1526         <https://webkit.org/b/193016>
1527         <rdar://problem/46925703>
1528
1529         Reviewed by Simon Fraser.
1530
1531         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
1532         (WebCore::copySampleBufferWithCurrentTimeStamp):
1533         - Change to return RetainPtr<CMSampleBufferRef>.
1534         - Check return value of CMSampleBufferCreateCopyWithNewTiming().
1535         (WebCore::MediaRecorderPrivateWriter::appendVideoSampleBuffer):
1536         - Check return value of copySampleBufferWithCurrentTimeStamp().
1537         - Fix leak by using RetainPtr<CMSampleBufferRef> returned from
1538           copySampleBufferWithCurrentTimeStamp() instead of leaking
1539           `bufferWithCurrentTime` by using retainPtr().
1540         (WebCore::createAudioFormatDescription):
1541         - Extract method from appendAudioSampleBuffer() to return
1542           RetainPtr<CMFormatDescriptionRef> after calling
1543           CMAudioFormatDescriptionCreate().
1544         - Check return value of CMAudioFormatDescriptionCreate().
1545         (WebCore::createAudioSampleBufferWithPacketDescriptions):
1546         - Extract method from appendAudioSampleBuffer() to return
1547           RetainPtr<CMSampleBufferRef> after calling
1548           CMAudioSampleBufferCreateWithPacketDescriptions().
1549         (WebCore::MediaRecorderPrivateWriter::appendAudioSampleBuffer):
1550         - Check return values of createAudioFormatDescription() and
1551           createAudioSampleBufferWithPacketDescriptions().
1552         - Fix leaks by extracting code into helper methods that return
1553           RetainPtr<> objects instead of leaking CMFormatDescriptionRef
1554           directly or leaking `sampleBuffer` by using retainPtr().
1555
1556 2019-01-02  Wenson Hsieh  <wenson_hsieh@apple.com>
1557
1558         Add support for using the current text selection as the find string on iOS
1559         https://bugs.webkit.org/show_bug.cgi?id=193034
1560         <rdar://problem/45138739>
1561
1562         Reviewed by Tim Horton.
1563
1564         Add support for "TakeFindStringFromSelection" on iOS. Unlike macOS, iOS does not have a notion of a "find
1565         pasteboard" like macOS; instead, we handle this editing command by sending the selection string to the UI
1566         process, where it is exposed via WebKit SPI so that clients that present find-in-page UI (i.e. MobileSafari) are
1567         able to trigger find-in-page with this string.
1568
1569         Test: WebKit.UseSelectionAsFindString
1570
1571         * editing/Editor.cpp:
1572         (WebCore::Editor::canCopyExcludingStandaloneImages const):
1573
1574         Make this helper function cross-platform.
1575
1576         * editing/Editor.h:
1577         * editing/EditorCommand.cpp:
1578         (WebCore::createCommandMap):
1579         * editing/cocoa/EditorCocoa.mm:
1580         (WebCore::Editor::takeFindStringFromSelection):
1581
1582         Move this from EditorMac to EditorCocoa, and implement it on iOS by calling into the editor client to update the
1583         find string (see WebKit/ChangeLog for more details).
1584
1585         * editing/mac/EditorMac.mm:
1586         (WebCore::Editor::canCopyExcludingStandaloneImages): Deleted.
1587         (WebCore::Editor::takeFindStringFromSelection): Deleted.
1588         * loader/EmptyClients.cpp:
1589         * page/EditorClient.h:
1590
1591         Add a new editor client method to send the string for find-in-page to the UI process.
1592
1593 2019-01-02  Devin Rousso  <webkit@devinrousso.com>
1594
1595         Web Inspector: Implement `queryObjects` Command Line API
1596         https://bugs.webkit.org/show_bug.cgi?id=176766
1597         <rdar://problem/34890689>
1598
1599         Reviewed by Joseph Pecoraro.
1600
1601         Test: inspector/console/queryObjects.html
1602
1603         * inspector/CommandLineAPIModuleSource.js:
1604         (CommandLineAPI):
1605         (CommandLineAPIImpl.prototype.queryObjects): Added.
1606
1607 2019-01-02  Charles Vazac  <cvazac@gmail.com>
1608
1609         Fix resourcetimingbufferfull bubbles attribute
1610         https://bugs.webkit.org/show_bug.cgi?id=193087
1611
1612         Reviewed by Chris Dumez.
1613
1614         This change is covered by web-platform-tests [1].
1615
1616         [1] https://github.com/web-platform-tests/wpt/blob/master/resource-timing/buffer-full-when-populate-entries.html#L20
1617
1618         * page/Performance.cpp:
1619         (WebCore::Performance::resourceTimingBufferFullTimerFired):
1620
1621 2019-01-02  Simon Fraser  <simon.fraser@apple.com>
1622
1623         Rename LayerScrollCoordinationRole to ScrollCoordinationRole and make an enum class
1624         https://bugs.webkit.org/show_bug.cgi?id=193010
1625
1626         Reviewed by Zalan Bujtas.
1627
1628         Move the enum LayerScrollCoordinationRole from RenderLayer.h to RenderLayerCompositor.h,
1629         and make it an enum class.
1630
1631         * page/FrameView.cpp:
1632         (WebCore::FrameView::scrollLayerID const):
1633         * rendering/RenderLayer.h:
1634         * rendering/RenderLayerBacking.cpp:
1635         (WebCore::RenderLayerBacking::~RenderLayerBacking):
1636         (WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
1637         (WebCore::operator<<):
1638         * rendering/RenderLayerBacking.h:
1639         * rendering/RenderLayerCompositor.cpp:
1640         (WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus):
1641         (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers):
1642         (WebCore::scrollCoordinationRoleForNodeType):
1643         (WebCore::RenderLayerCompositor::attachScrollingNode):
1644         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
1645         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
1646         (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
1647         * rendering/RenderLayerCompositor.h:
1648
1649 2019-01-02  Simon Fraser  <simon.fraser@apple.com>
1650
1651         Don't spin up a CalcParser if the current token is not a function token
1652         https://bugs.webkit.org/show_bug.cgi?id=193067
1653
1654         Reviewed by Zalan Bujtas.
1655
1656         Various functions in CSSPropertyParserHelpers fall back to trying to parse
1657         a calc expression if the normal parsing fails. Don't do this unless the
1658         current token is a function token, which should be slightly more efficient.
1659
1660         * css/parser/CSSPropertyParserHelpers.cpp:
1661         (WebCore::CSSPropertyParserHelpers::consumeInteger):
1662         (WebCore::CSSPropertyParserHelpers::consumePositiveIntegerRaw):
1663         (WebCore::CSSPropertyParserHelpers::consumeNumberRaw):
1664         (WebCore::CSSPropertyParserHelpers::consumeNumber):
1665         (WebCore::CSSPropertyParserHelpers::consumeFontWeightNumber):
1666         (WebCore::CSSPropertyParserHelpers::consumeLength):
1667         (WebCore::CSSPropertyParserHelpers::consumePercent):
1668         (WebCore::CSSPropertyParserHelpers::consumeLengthOrPercent):
1669         (WebCore::CSSPropertyParserHelpers::consumeAngle):
1670         (WebCore::CSSPropertyParserHelpers::consumeAngleOrPercent):
1671         (WebCore::CSSPropertyParserHelpers::consumeTime):
1672
1673 2019-01-02  Simon Fraser  <simon.fraser@apple.com>
1674
1675         Support css-color-4 rgb functions
1676         https://bugs.webkit.org/show_bug.cgi?id=192321
1677
1678         Reviewed by Zalan Bujtas.
1679         
1680         Support the new rgb()/rgba() syntax described in https://drafts.csswg.org/css-color/#rgb-functions.
1681         The differences are:
1682         1. There is a new comma-free syntax, where the optional alpha is separated by a slash:
1683             rgb(128 34 56)
1684             rgb(128 34 56 / 50%)
1685         2. Floating point values are allowed, and rounded:
1686             rgb(128.5 34.2 56.5) becomes rgb(129 34 57)
1687         3. rgba() is a pure alias for rgb(), so these are equivalent:
1688             rgb(128 34 56 / 50%)
1689             rgba(128 34 56 / 50%)
1690             
1691         hsl()/hsla() parsing was already updated to this new syntax in r230861.
1692
1693         Tested by tests in imported/w3c/web-platform-tests/css/css-color/
1694
1695         * css/parser/CSSPropertyParserHelpers.cpp:
1696         (WebCore::CSSPropertyParserHelpers::clampRGBComponent):
1697         (WebCore::CSSPropertyParserHelpers::parseRGBParameters):
1698         (WebCore::CSSPropertyParserHelpers::parseColorFunction):
1699
1700 2019-01-02  Simon Fraser  <simon.fraser@apple.com>
1701
1702         Handle calc() expressions in gradient color stops
1703         https://bugs.webkit.org/show_bug.cgi?id=193066
1704         rdar://problem/46961985
1705
1706         Reviewed by Sam Weinig.
1707         
1708         Fix two issues that prevented calc() expressions from working in conic-gradient color stops,
1709         for the angle or percent value. First, consumeAngleOrPercent() needs to look for CalculationCategory::Percent
1710         calc values as well as angle ones.
1711
1712         Second, CSSPrimitiveValue::isAngle() needs to use primitiveType() (which takes calc into account),
1713         just as isPx() etc do.
1714
1715         Test: fast/gradients/conic-calc-stop-position.html
1716
1717         * css/CSSPrimitiveValue.h:
1718         (WebCore::CSSPrimitiveValue::isAngle const):
1719         * css/parser/CSSPropertyParserHelpers.cpp:
1720         (WebCore::CSSPropertyParserHelpers::consumeAngleOrPercent):
1721         (WebCore::CSSPropertyParserHelpers::consumeGradientColorStops):
1722
1723 2018-12-31  Keith Miller  <keith_miller@apple.com>
1724
1725         SourceProviders should use an actual URL instead of a string
1726         https://bugs.webkit.org/show_bug.cgi?id=192734
1727
1728         Reviewed by Yusuke Suzuki.
1729
1730         Remove ScriptSourceCode's URL member and make the url() method
1731         reference the URL on the SourceProvider. Also, avoid some
1732         ref count churn.
1733
1734         Additionally, this patch fixes an existing bug in
1735         WorkletGlobalScope() that would use a ScriptSourceCode after
1736         WTFMoving it.
1737
1738         * bindings/js/CachedScriptSourceProvider.h:
1739         (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
1740         * bindings/js/ScheduledAction.cpp:
1741         (WebCore::ScheduledAction::execute):
1742         * bindings/js/ScriptController.cpp:
1743         (WebCore::ScriptController::executeScriptInWorld):
1744         (WebCore::ScriptController::executeScript):
1745         * bindings/js/ScriptSourceCode.h:
1746         (WebCore::ScriptSourceCode::ScriptSourceCode):
1747         (WebCore::ScriptSourceCode::m_code):
1748         (WebCore::ScriptSourceCode::url const):
1749         (WebCore::ScriptSourceCode::m_url): Deleted.
1750         * dom/ScriptElement.cpp:
1751         (WebCore::ScriptElement::prepareScript):
1752         (WebCore::ScriptElement::requestModuleScript):
1753         (WebCore::ScriptElement::executePendingScript):
1754         * html/HTMLMediaElement.cpp:
1755         (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
1756         * page/Frame.cpp:
1757         (WebCore::Frame::injectUserScriptImmediately):
1758         * workers/WorkerGlobalScope.cpp:
1759         (WebCore::WorkerGlobalScope::importScripts):
1760         * workers/WorkerThread.cpp:
1761         (WebCore::WorkerThread::workerThread):
1762         * worklets/WorkletGlobalScope.cpp:
1763         (WebCore::WorkletGlobalScope::WorkletGlobalScope):
1764         * xml/parser/XMLDocumentParserLibxml2.cpp:
1765         (WebCore::XMLDocumentParser::endElementNs):
1766
1767 2019-01-01  Jeff Miller  <jeffm@apple.com>
1768
1769         Update user-visible copyright strings to include 2019
1770         https://bugs.webkit.org/show_bug.cgi?id=192811
1771
1772         Reviewed by Mark Lam.
1773
1774         * Info.plist:
1775
1776 2018-12-30  David Kilzer  <ddkilzer@apple.com>
1777
1778         clang-tidy: Save 8 padding bytes on WebCore::BorderEdge
1779         <https://webkit.org/b/193058>
1780         <rdar://problem/46979275>
1781
1782         Reviewed by Yusuke Suzuki.
1783
1784         * rendering/BorderEdge.cpp:
1785         (WebCore::BorderEdge::BorderEdge): Reorder initialization to
1786         match new instance variable order.
1787         * rendering/BorderEdge.h: Reorder instance variables to save
1788         8 padding bytes.
1789
1790 2018-12-28  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
1791
1792         [JSC] Remove one indirection in JSObject::toStringName
1793         https://bugs.webkit.org/show_bug.cgi?id=193037
1794
1795         Reviewed by Keith Miller.
1796
1797         Use old JSObject::toStringName function here.
1798
1799         * bindings/js/JSDOMConstructorBase.cpp:
1800         (WebCore::JSDOMConstructorBase::className):
1801         (WebCore::JSDOMConstructorBase::toStringName):
1802         * bindings/js/JSDOMConstructorBase.h:
1803         (WebCore::JSDOMConstructorBase::className): Deleted.
1804
1805 2018-12-27  Alex Christensen  <achristensen@webkit.org>
1806
1807         Resurrect Mac CMake build
1808         https://bugs.webkit.org/show_bug.cgi?id=192658
1809
1810         Reviewed by Yusuke Suzuki.
1811
1812         This makes it so JSC and most of WebCore builds.
1813         WebCore's use of ARC seems inconsistent, so I'll fix that later.
1814
1815         * PlatformMac.cmake:
1816         * config.h:
1817
1818 2018-12-26  Jim Mason  <jmason@ibinx.com>
1819
1820         [FreeType] Restore conditional compilation logic for recent HarfBuzz refactoring
1821         https://bugs.webkit.org/show_bug.cgi?id=193036
1822
1823         Reviewed by Michael Catanzaro.
1824
1825         * platform/graphics/FontPlatformData.h:
1826         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1827
1828 2018-12-24  Fujii Hironori  <Hironori.Fujii@sony.com>
1829
1830         Remove "using namespace std;"
1831         https://bugs.webkit.org/show_bug.cgi?id=192973
1832         <rdar://problem/46937309>
1833
1834         Unreviewed Windows port Debug builds fix.
1835
1836         No new tests since no behavior changes.
1837
1838         * accessibility/win/AXObjectCacheWin.cpp:
1839         (WebCore::AXObjectCache::postPlatformNotification): Add "std::" prefix to numeric_limits in ASSERT macro.
1840
1841 2018-12-24  Fujii Hironori  <Hironori.Fujii@sony.com>
1842
1843         Remove "using namespace std;"
1844         https://bugs.webkit.org/show_bug.cgi?id=192973
1845
1846         Reviewed by Alex Christensen.
1847
1848         Removed "using namespace std" statement, and use std:: prefix.
1849
1850         No new tests since no behavior changes.
1851
1852         * accessibility/win/AXObjectCacheWin.cpp:
1853         * platform/graphics/GraphicsContext3DPrivate.cpp:
1854         * platform/graphics/cairo/ImageBufferCairo.cpp:
1855         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
1856         * platform/graphics/win/FontWin.cpp:
1857         (WebCore::FontCascade::floatWidthForComplexText const):
1858         * platform/graphics/win/GraphicsContextCGWin.cpp:
1859         * platform/graphics/win/GraphicsContextCairoWin.cpp:
1860         * platform/graphics/win/GraphicsContextDirect2D.cpp:
1861         * platform/graphics/win/GraphicsContextWin.cpp:
1862         * platform/graphics/win/SimpleFontDataCGWin.cpp:
1863         * platform/graphics/win/UniscribeController.cpp:
1864         (WebCore::UniscribeController::UniscribeController):
1865         (WebCore::UniscribeController::shapeAndPlaceItem):
1866         * platform/image-decoders/ScalableImageDecoder.cpp:
1867         * platform/text/LocaleICU.cpp:
1868         * platform/text/win/LocaleWin.cpp:
1869         * platform/win/ScrollbarThemeWin.cpp:
1870         * rendering/RenderRubyRun.cpp:
1871         (WebCore::RenderRubyRun::layoutBlock):
1872         * rendering/RenderThemeWin.cpp:
1873         (WebCore::RenderThemeWin::adjustMenuListButtonStyle const):
1874         (WebCore::RenderThemeWin::paintSearchFieldCancelButton):
1875         (WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle const):
1876         (WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle const):
1877         (WebCore::RenderThemeWin::paintSearchFieldResultsDecorationPart):
1878         (WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle const):
1879         (WebCore::RenderThemeWin::paintSearchFieldResultsButton):
1880
1881 2018-12-24  Simon Fraser  <simon.fraser@apple.com>
1882
1883         Change ScrollingNodeType to an enum class
1884         https://bugs.webkit.org/show_bug.cgi?id=193009
1885
1886         Reviewed by Zalan Bujtas.
1887
1888         Change the ScrollingNodeType enum to an enum class.
1889         
1890         No behavior change.
1891
1892         * page/scrolling/AsyncScrollingCoordinator.cpp:
1893         (WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
1894         * page/scrolling/ScrollingCoordinator.cpp:
1895         (WebCore::operator<<):
1896         * page/scrolling/ScrollingCoordinator.h:
1897         * page/scrolling/ScrollingStateFixedNode.cpp:
1898         (WebCore::ScrollingStateFixedNode::ScrollingStateFixedNode):
1899         * page/scrolling/ScrollingStateNode.h:
1900         (WebCore::ScrollingStateNode::isFixedNode const):
1901         (WebCore::ScrollingStateNode::isStickyNode const):
1902         (WebCore::ScrollingStateNode::isFrameScrollingNode const):
1903         (WebCore::ScrollingStateNode::isOverflowScrollingNode const):
1904         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
1905         (WebCore::ScrollingStateOverflowScrollingNode::ScrollingStateOverflowScrollingNode):
1906         * page/scrolling/ScrollingStateStickyNode.cpp:
1907         (WebCore::ScrollingStateStickyNode::ScrollingStateStickyNode):
1908         * page/scrolling/ScrollingStateTree.cpp:
1909         (WebCore::ScrollingStateTree::createNode):
1910         (WebCore::ScrollingStateTree::attachNode):
1911         * page/scrolling/ScrollingTreeNode.h:
1912         (WebCore::ScrollingTreeNode::isFixedNode const):
1913         (WebCore::ScrollingTreeNode::isStickyNode const):
1914         (WebCore::ScrollingTreeNode::isFrameScrollingNode const):
1915         (WebCore::ScrollingTreeNode::isOverflowScrollingNode const):
1916         * page/scrolling/ScrollingTreeOverflowScrollingNode.cpp:
1917         (WebCore::ScrollingTreeOverflowScrollingNode::ScrollingTreeOverflowScrollingNode):
1918         * page/scrolling/ios/ScrollingTreeIOS.cpp:
1919         (WebCore::ScrollingTreeIOS::createScrollingTreeNode):
1920         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
1921         (WebCore::ScrollingTreeFixedNode::ScrollingTreeFixedNode):
1922         * page/scrolling/mac/ScrollingTreeMac.cpp:
1923         (ScrollingTreeMac::createScrollingTreeNode):
1924         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
1925         (WebCore::ScrollingTreeStickyNode::ScrollingTreeStickyNode):
1926         * platform/graphics/GraphicsLayerClient.h:
1927         * rendering/RenderLayerCompositor.cpp:
1928         (WebCore::RenderLayerCompositor::reattachSubframeScrollLayers):
1929         (WebCore::scrollCoordinationRoleForNodeType):
1930         (WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame):
1931         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
1932
1933 2018-12-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1934
1935         [HarfBuzz] Width not correctly reported as 0 for zero font size
1936         https://bugs.webkit.org/show_bug.cgi?id=192986
1937
1938         Reviewed by Michael Catanzaro.
1939
1940         Fixes test fast/text/font-size-zero.html
1941
1942         * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
1943         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Use empty advances for glyphs when the font
1944         size is zero.
1945
1946 2018-12-20  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
1947
1948         Use Ref<> as much as possible
1949         https://bugs.webkit.org/show_bug.cgi?id=192808
1950
1951         Reviewed by Alex Christensen.
1952
1953         * Modules/encryptedmedia/NavigatorEME.cpp:
1954         (WebCore::NavigatorEME::requestMediaKeySystemAccess):
1955         * Modules/fetch/FetchBody.cpp:
1956         (WebCore::FetchBody::bodyAsFormData const):
1957         * Modules/geolocation/Geolocation.cpp:
1958         (WebCore::Geolocation::getCurrentPosition):
1959         (WebCore::Geolocation::watchPosition):
1960         * Modules/indexeddb/IDBDatabase.cpp:
1961         (WebCore::IDBDatabase::objectStoreNames const):
1962         * Modules/indexeddb/IDBDatabase.h:
1963         * Modules/indexeddb/IDBObjectStore.cpp:
1964         (WebCore::IDBObjectStore::indexNames const):
1965         * Modules/indexeddb/IDBObjectStore.h:
1966         * Modules/indexeddb/IDBTransaction.cpp:
1967         (WebCore::IDBTransaction::scheduleOperation):
1968         * Modules/indexeddb/IDBTransaction.h:
1969         * Modules/indexeddb/client/TransactionOperation.h:
1970         (WebCore::IDBClient::createTransactionOperation):
1971         * Modules/mediastream/MediaDevices.cpp:
1972         (WebCore::MediaDevices::getUserMedia const):
1973         (WebCore::MediaDevices::getDisplayMedia const):
1974         * Modules/mediastream/UserMediaRequest.cpp:
1975         (WebCore::UserMediaRequest::create):
1976         * Modules/mediastream/UserMediaRequest.h:
1977         * Modules/webaudio/AudioParam.cpp:
1978         (WebCore::AudioParam::calculateFinalValues):
1979         * Modules/webaudio/ScriptProcessorNode.cpp:
1980         (WebCore::ScriptProcessorNode::initialize):
1981         * Modules/webdatabase/SQLStatement.cpp:
1982         (WebCore::SQLStatement::execute):
1983         * Modules/webgpu/WebGPU.cpp:
1984         (WebCore::WebGPU::requestAdapter const):
1985         * Modules/webgpu/WebGPUAdapter.cpp:
1986         (WebCore::WebGPUAdapter::create):
1987         * Modules/webgpu/WebGPUAdapter.h:
1988         * Modules/webgpu/WebGPUBuffer.cpp:
1989         (WebCore::WebGPUBuffer::create):
1990         * Modules/webgpu/WebGPUBuffer.h:
1991         * Modules/webgpu/WebGPUCommandBuffer.cpp:
1992         (WebCore::WebGPUCommandBuffer::create):
1993         (WebCore::WebGPUCommandBuffer::beginRenderPass):
1994         * Modules/webgpu/WebGPUCommandBuffer.h:
1995         * Modules/webgpu/WebGPUDevice.cpp:
1996         (WebCore::WebGPUDevice::create):
1997         (WebCore::WebGPUDevice::createBuffer const):
1998         (WebCore::WebGPUDevice::createShaderModule const):
1999         (WebCore::WebGPUDevice::createRenderPipeline const):
2000         (WebCore::WebGPUDevice::createCommandBuffer const):
2001         * Modules/webgpu/WebGPURenderPassEncoder.cpp:
2002         (WebCore::WebGPURenderPassEncoder::create):
2003         * Modules/webgpu/WebGPURenderPassEncoder.h:
2004         * Modules/webgpu/WebGPURenderPipeline.cpp:
2005         (WebCore::WebGPURenderPipeline::create):
2006         * Modules/webgpu/WebGPURenderPipeline.h:
2007         * Modules/webgpu/WebGPUShaderModule.cpp:
2008         (WebCore::WebGPUShaderModule::create):
2009         * Modules/webgpu/WebGPUShaderModule.h:
2010         * Modules/webgpu/WebGPUTexture.cpp:
2011         (WebCore::WebGPUTexture::createDefaultTextureView):
2012         * Modules/webgpu/WebGPUTextureView.cpp:
2013         (WebCore::WebGPUTextureView::create):
2014         * Modules/webgpu/WebGPUTextureView.h:
2015         * accessibility/AXObjectCache.cpp:
2016         (WebCore::AXObjectCache::rangeMatchesTextNearRange):
2017         * accessibility/atk/AXObjectCacheAtk.cpp:
2018         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
2019         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
2020         (webkitAccessibleHyperlinkGetStartIndex):
2021         (webkitAccessibleHyperlinkGetEndIndex):
2022         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2023         (getSelectionOffsetsForObject):
2024         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2025         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
2026         * bindings/js/JSDOMGlobalObjectTask.cpp:
2027         * bindings/js/JSDOMWindowBase.cpp:
2028         (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
2029         * bindings/js/JSWorkerGlobalScopeBase.cpp:
2030         (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
2031         * bindings/js/ScriptControllerMac.mm:
2032         (WebCore::ScriptController::createScriptInstanceForWidget):
2033         * bindings/js/SerializedScriptValue.cpp:
2034         (WebCore::CloneDeserializer::readTerminal):
2035         (WebCore::SerializedScriptValue::create):
2036         * bridge/objc/objc_instance.h:
2037         * bridge/objc/objc_instance.mm:
2038         (ObjcInstance::create):
2039         * css/CSSComputedStyleDeclaration.cpp:
2040         (WebCore::ComputedStyleExtractor::currentColorOrValidColor const):
2041         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties):
2042         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand):
2043         (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
2044         * css/CSSComputedStyleDeclaration.h:
2045         * css/CSSFontFaceSource.cpp:
2046         (WebCore::CSSFontFaceSource::load):
2047         * css/CSSStyleSheet.cpp:
2048         (WebCore::CSSStyleSheet::rules):
2049         * css/FontFace.cpp:
2050         (WebCore::FontFace::unicodeRange const):
2051         (WebCore::FontFace::featureSettings const):
2052         * css/InspectorCSSOMWrappers.cpp:
2053         (WebCore::InspectorCSSOMWrappers::collectFromStyleSheetContents):
2054         * css/SVGCSSComputedStyleDeclaration.cpp:
2055         (WebCore::strokeDashArrayToCSSValueList):
2056         (WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor const):
2057         * css/StyleResolver.cpp:
2058         (WebCore::StyleResolver::createFilterOperations):
2059         * css/StyleRule.cpp:
2060         (WebCore::StyleRuleBase::createCSSOMWrapper const):
2061         * css/StyleRule.h:
2062         * dom/ChildListMutationScope.cpp:
2063         (WebCore::ChildListMutationAccumulator::getOrCreate):
2064         * dom/ChildListMutationScope.h:
2065         * dom/DocumentMarkerController.cpp:
2066         (WebCore::updateRenderedRectsForMarker):
2067         * dom/InlineStyleSheetOwner.cpp:
2068         (WebCore::InlineStyleSheetOwner::createSheet):
2069         * dom/PointerEvent.h:
2070         * dom/UserGestureIndicator.h:
2071         (WebCore::UserGestureToken::create):
2072         * editing/AlternativeTextController.cpp:
2073         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
2074         (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
2075         (WebCore::AlternativeTextController::respondToUnappliedEditing):
2076         (WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
2077         (WebCore::AlternativeTextController::respondToMarkerAtEndOfWord):
2078         * editing/ApplyStyleCommand.cpp:
2079         (WebCore::ApplyStyleCommand::applyBlockStyle):
2080         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
2081         * editing/CompositeEditCommand.cpp:
2082         (WebCore::CompositeEditCommand::targetRanges const):
2083         (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
2084         (WebCore::CompositeEditCommand::moveParagraphs):
2085         * editing/DeleteSelectionCommand.cpp:
2086         (WebCore::DeleteSelectionCommand::mergeParagraphs):
2087         * editing/Editing.cpp:
2088         (WebCore::visiblePositionForIndexUsingCharacterIterator):
2089         * editing/EditingStyle.cpp:
2090         (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
2091         (WebCore::EditingStyle::conflictsWithInlineStyleOfElement const):
2092         (WebCore::EditingStyle::prepareToApplyAt):
2093         (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
2094         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
2095         (WebCore::EditingStyle::removeStyleFromRulesAndContext):
2096         (WebCore::extractPropertiesNotIn):
2097         * editing/Editor.cpp:
2098         (WebCore::Editor::setBaseWritingDirection):
2099         (WebCore::Editor::setComposition):
2100         * editing/EditorCommand.cpp:
2101         (WebCore::executeApplyParagraphStyle):
2102         (WebCore::executeMakeTextWritingDirectionLeftToRight):
2103         (WebCore::executeMakeTextWritingDirectionNatural):
2104         (WebCore::executeMakeTextWritingDirectionRightToLeft):
2105         * editing/FormatBlockCommand.cpp:
2106         (WebCore::FormatBlockCommand::formatRange):
2107         * editing/RemoveFormatCommand.cpp:
2108         (WebCore::RemoveFormatCommand::doApply):
2109         * editing/ReplaceRangeWithTextCommand.cpp:
2110         (WebCore::ReplaceRangeWithTextCommand::targetRanges const):
2111         * editing/ReplaceSelectionCommand.cpp:
2112         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
2113         (WebCore::handleStyleSpansBeforeInsertion):
2114         (WebCore::ReplaceSelectionCommand::handleStyleSpans):
2115         * editing/SpellingCorrectionCommand.cpp:
2116         (WebCore::SpellingCorrectionCommand::targetRanges const):
2117         * editing/TextCheckingHelper.cpp:
2118         (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
2119         * editing/TypingCommand.cpp:
2120         (WebCore::TypingCommand::insertText):
2121         (WebCore::TypingCommand::willAddTypingToOpenCommand):
2122         * editing/VisibleUnits.cpp:
2123         (WebCore::distanceBetweenPositions):
2124         * editing/cocoa/EditorCocoa.mm:
2125         (WebCore::Editor::selectionInWebArchiveFormat):
2126         * editing/ios/DictationCommandIOS.cpp:
2127         (WebCore::DictationCommandIOS::doApply):
2128         * editing/ios/EditorIOS.mm:
2129         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
2130         (WebCore::Editor::removeUnchangeableStyles):
2131         (WebCore::Editor::writeImageToPasteboard):
2132         * editing/mac/EditorMac.mm:
2133         (WebCore::Editor::replaceNodeFromPasteboard):
2134         (WebCore::Editor::imageInWebArchiveFormat):
2135         * editing/markup.cpp:
2136         (WebCore::styleFromMatchedRulesAndInlineDecl):
2137         (WebCore::createFragmentForTransformToFragment):
2138         * fileapi/FileReaderLoader.cpp:
2139         (WebCore::FileReaderLoader::didFinishLoading):
2140         * html/FTPDirectoryDocument.cpp:
2141         (WebCore::createTemplateDocumentData):
2142         * html/HTMLMediaElement.cpp:
2143         (WebCore::HTMLMediaElement::scheduleEvent):
2144         (WebCore::HTMLMediaElement::createMediaControls):
2145         * html/HTMLTableElement.cpp:
2146         (WebCore::HTMLTableElement::createSharedCellStyle):
2147         * html/HTMLTableElement.h:
2148         * html/URLUtils.h:
2149         (WebCore::URLUtils<T>::origin const):
2150         * html/parser/HTMLConstructionSite.cpp:
2151         (WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface):
2152         * html/shadow/TextControlInnerElements.cpp:
2153         (WebCore::TextControlInnerElement::resolveCustomStyle):
2154         * html/track/WebVTTParser.cpp:
2155         (WebCore::WebVTTParser::createNewCue):
2156         * inspector/DOMPatchSupport.cpp:
2157         * inspector/InspectorCanvas.cpp:
2158         (WebCore::InspectorCanvas::buildInitialState):
2159         (WebCore::InspectorCanvas::buildAction):
2160         * inspector/InspectorFrontendClientLocal.cpp:
2161         (WebCore::InspectorFrontendClientLocal::openInNewTab):
2162         * inspector/InspectorStyleSheet.cpp:
2163         (WebCore::asCSSRuleList):
2164         (WebCore::InspectorStyle::styleWithProperties const):
2165         (WebCore::InspectorStyleSheet::ensureSourceData):
2166         * inspector/agents/InspectorCanvasAgent.cpp:
2167         (WebCore::InspectorCanvasAgent::didCreateCanvasRenderingContext):
2168         * inspector/agents/InspectorIndexedDBAgent.cpp:
2169         (WebCore::Inspector::keyPathFromIDBKeyPath):
2170         * inspector/agents/InspectorPageAgent.cpp:
2171         (WebCore::InspectorPageAgent::archive):
2172         * loader/EmptyClients.cpp:
2173         (WebCore::EmptyStorageNamespaceProvider::createSessionStorageNamespace):
2174         (WebCore::EmptyStorageNamespaceProvider::createLocalStorageNamespace):
2175         (WebCore::EmptyStorageNamespaceProvider::createEphemeralLocalStorageNamespace):
2176         (WebCore::EmptyStorageNamespaceProvider::createTransientLocalStorageNamespace):
2177         * loader/FrameLoader.cpp:
2178         (WebCore::FrameLoader::loadURL):
2179         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
2180         (WebCore::FrameLoader::loadDifferentDocumentItem):
2181         * loader/WorkerThreadableLoader.cpp:
2182         (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
2183         * loader/archive/mhtml/MHTMLParser.cpp:
2184         (WebCore::MHTMLParser::addResourceToArchive):
2185         (WebCore::MHTMLParser::parseNextPart):
2186         * loader/cache/MemoryCache.cpp:
2187         (WebCore::MemoryCache::addImageToCache):
2188         (WebCore::MemoryCache::removeResourcesWithOrigin):
2189         * page/DOMWindow.cpp:
2190         (WebCore::DOMWindow::getMatchedCSSRules const):
2191         (WebCore::DOMWindow::createWindow):
2192         * page/EventHandler.cpp:
2193         (WebCore::textDistance):
2194         * page/Page.cpp:
2195         (WebCore::Page::userStyleSheet const):
2196         * page/animation/CSSPropertyAnimation.cpp:
2197         (WebCore::blendFilterOperations):
2198         * page/ios/FrameIOS.mm:
2199         (WebCore::Frame::initWithSimpleHTMLDocument):
2200         (WebCore::Frame::interpretationsForCurrentRoot const):
2201         * page/mac/ServicesOverlayController.mm:
2202         (WebCore::ServicesOverlayController::Highlight::fadeIn):
2203         (WebCore::ServicesOverlayController::Highlight::fadeOut):
2204         * platform/SharedBuffer.cpp:
2205         (WebCore::SharedBuffer::tryCreateArrayBuffer const):
2206         * platform/audio/HRTFElevation.cpp:
2207         (WebCore::HRTFElevation::calculateKernelsForAzimuthElevation):
2208         * platform/audio/SincResampler.cpp:
2209         (WebCore::SincResampler::consumeSource):
2210         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
2211         (WebCore::AudioFileReader::createBus):
2212         * platform/audio/mac/AudioFileReaderMac.cpp:
2213         (WebCore::AudioFileReader::createBus):
2214         * platform/graphics/Icon.h:
2215         (WebCore::Icon::create):
2216         * platform/graphics/InbandTextTrackPrivate.h:
2217         (WebCore::InbandTextTrackPrivate::create):
2218         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2219         (WebCore::AVFWrapper::shouldWaitForLoadingOfResource):
2220         * platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.h:
2221         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2222         (WebCore::fulfillRequestWithKeyData):
2223         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
2224         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
2225         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
2226         (WebCore::MediaSourcePrivateAVFObjC::create):
2227         (WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer):
2228         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
2229         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2230         (WebCore::SourceBufferPrivateAVFObjC::create):
2231         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
2232         * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h:
2233         * platform/graphics/ca/TileController.cpp:
2234         (WebCore::TileController::createTileLayer):
2235         * platform/graphics/ca/TileController.h:
2236         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
2237         (WebCore::CACFLayerTreeHost::acceleratedCompositingAvailable):
2238         (WebCore::CACFLayerTreeHost::create):
2239         * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
2240         (WebCore::GPUBuffer::create):
2241         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2242         (WebCore::MediaPlayerPrivateGStreamer::updateTracks):
2243         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
2244         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
2245         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
2246         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
2247         (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
2248         (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
2249         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2250         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
2251         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
2252         (WebCore::AppendPipeline::appsinkNewSample):
2253         * platform/graphics/iso/ISOProtectionSystemSpecificHeaderBox.cpp:
2254         (WebCore::ISOProtectionSystemSpecificHeaderBox::parse):
2255         * platform/graphics/iso/ISOTrackEncryptionBox.cpp:
2256         (WebCore::ISOTrackEncryptionBox::parse):
2257         * platform/graphics/texmap/TextureMapperAnimation.cpp:
2258         (WebCore::applyFilterAnimation):
2259         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
2260         (WebCore::TextureMapperPlatformLayerBuffer::clone):
2261         * platform/graphics/transforms/TransformOperations.cpp:
2262         (WebCore::TransformOperations::blendByMatchingOperations const):
2263         * platform/image-decoders/ico/ICOImageDecoder.cpp:
2264         (WebCore::ICOImageDecoder::setDataForPNGDecoderAtIndex):
2265         * platform/mock/mediasource/MockBox.cpp:
2266         (WebCore::MockInitializationBox::MockInitializationBox):
2267         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
2268         (WebCore::MockSourceBufferPrivate::create):
2269         (WebCore::MockSourceBufferPrivate::append):
2270         * platform/mock/mediasource/MockSourceBufferPrivate.h:
2271         * platform/mock/mediasource/MockTracks.h:
2272         (WebCore::MockTextTrackPrivate::create):
2273         (WebCore::MockVideoTrackPrivate::create):
2274         * platform/network/FormData.h:
2275         (WebCore::FormData::decode):
2276         * platform/network/cocoa/CookieStorageObserver.h:
2277         * platform/network/cocoa/CookieStorageObserver.mm:
2278         (WebCore::CookieStorageObserver::create):
2279         * platform/network/soup/ResourceRequestSoup.cpp:
2280         (WebCore::appendEncodedBlobItemToSoupMessageBody):
2281         (WebCore::ResourceRequest::updateSoupMessageBody const):
2282         * platform/text/hyphen/HyphenationLibHyphen.cpp:
2283         (WebCore::HyphenationDictionary::createNull):
2284         (WebCore::HyphenationDictionary::create):
2285         * platform/win/SearchPopupMenuWin.cpp:
2286         (WebCore::SearchPopupMenuWin::SearchPopupMenuWin):
2287         (WebCore::SearchPopupMenuWin::popupMenu):
2288         * platform/win/SearchPopupMenuWin.h:
2289         * rendering/RenderThemeIOS.mm:
2290         (WebCore::applyCommonButtonPaddingToStyle):
2291         (WebCore::RenderThemeIOS::paintProgressBar):
2292         (WebCore::RenderThemeIOS::adjustButtonStyle const):
2293         (WebCore::paintAttachmentIcon):
2294         * rendering/svg/SVGRenderTreeAsText.cpp:
2295         (WebCore::writeSVGResourceContainer):
2296         * storage/Storage.cpp:
2297         (WebCore::Storage::create):
2298         (WebCore::Storage::Storage):
2299         * storage/Storage.h:
2300         (WebCore::Storage::area const):
2301         * storage/StorageNamespace.h:
2302         * storage/StorageNamespaceProvider.cpp:
2303         (WebCore::StorageNamespaceProvider::localStorageArea):
2304         * storage/StorageNamespaceProvider.h:
2305         * svg/SVGElement.cpp:
2306         (WebCore::SVGElement::getPresentationAttribute):
2307         * svg/SVGFEBlendElement.cpp:
2308         (WebCore::SVGFEBlendElement::build):
2309         * svg/SVGFEColorMatrixElement.cpp:
2310         (WebCore::SVGFEColorMatrixElement::build):
2311         * svg/SVGFEComponentTransferElement.cpp:
2312         (WebCore::SVGFEComponentTransferElement::build):
2313         * svg/SVGFECompositeElement.cpp:
2314         (WebCore::SVGFECompositeElement::build):
2315         * svg/SVGFEDiffuseLightingElement.cpp:
2316         (WebCore::SVGFEDiffuseLightingElement::build):
2317         * svg/SVGFEDisplacementMapElement.cpp:
2318         (WebCore::SVGFEDisplacementMapElement::build):
2319         * svg/SVGFEDropShadowElement.cpp:
2320         (WebCore::SVGFEDropShadowElement::build):
2321         * svg/SVGFEGaussianBlurElement.cpp:
2322         (WebCore::SVGFEGaussianBlurElement::build):
2323         * svg/SVGFEMergeElement.cpp:
2324         (WebCore::SVGFEMergeElement::build):
2325         * svg/SVGFEMorphologyElement.cpp:
2326         (WebCore::SVGFEMorphologyElement::build):
2327         * svg/SVGFEOffsetElement.cpp:
2328         (WebCore::SVGFEOffsetElement::build):
2329         * svg/SVGFESpecularLightingElement.cpp:
2330         (WebCore::SVGFESpecularLightingElement::build):
2331         * svg/SVGFETileElement.cpp:
2332         (WebCore::SVGFETileElement::build):
2333         * testing/GCObservation.h:
2334         * xml/XSLTProcessor.cpp:
2335         (WebCore::XSLTProcessor::createDocumentFromSource):
2336         * xml/parser/XMLDocumentParser.cpp:
2337         (WebCore::XMLDocumentParser::parseDocumentFragment):
2338
2339 2018-12-21  Chris Dumez  <cdumez@apple.com>
2340
2341         navigator.userAgent in service workers does not reflect customUserAgent set by client
2342         https://bugs.webkit.org/show_bug.cgi?id=192951
2343
2344         Reviewed by Youenn Fablet.
2345
2346         Whenever a service worker client registers itself, also pass its effective user agent.
2347         In the network process, for each origin, we store the latest client's user agent and
2348         use it when starting the service worker.
2349
2350         * dom/Document.cpp:
2351         (WebCore::Document::setServiceWorkerConnection):
2352         * loader/DocumentLoader.cpp:
2353         (WebCore::DocumentLoader::registerTemporaryServiceWorkerClient):
2354         * workers/service/SWClientConnection.h:
2355         * workers/service/server/SWServer.cpp:
2356         (WebCore::SWServer::serviceWorkerClientUserAgent const):
2357         (WebCore::SWServer::installContextData):
2358         (WebCore::SWServer::runServiceWorker):
2359         (WebCore::SWServer::registerServiceWorkerClient):
2360         * workers/service/server/SWServer.h:
2361         * workers/service/server/SWServerToContextConnection.h:
2362         * workers/service/server/SWServerWorker.cpp:
2363         (WebCore::SWServerWorker::userAgent const):
2364         * workers/service/server/SWServerWorker.h:
2365
2366 2018-12-21  Youenn Fablet  <youenn@apple.com>
2367
2368         RTCRtpSender.setParameters() does set active parameter
2369         https://bugs.webkit.org/show_bug.cgi?id=192848
2370
2371         Reviewed by Eric Carlson.
2372
2373         Covered by updated test.
2374
2375         * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
2376         (WebCore::updateRTCRtpSendParameters):
2377         The routine was updating the local value, not the out parameter.
2378
2379 2018-12-21  Eric Carlson  <eric.carlson@apple.com>
2380
2381         'ended' Event doesn't fire on MediaStreamTrack when a USB camera is unplugged
2382         https://bugs.webkit.org/show_bug.cgi?id=187896
2383         <rdar://problem/42681445>
2384
2385         Reviewed by Jer Noble.
2386
2387         No new tests, tested manually.
2388
2389         * platform/mediastream/mac/AVVideoCaptureSource.h:
2390         * platform/mediastream/mac/AVVideoCaptureSource.mm:
2391         (WebCore::AVVideoCaptureSource::deviceDisconnected):
2392         (-[WebCoreAVVideoCaptureSourceObserver addNotificationObservers]):
2393         (-[WebCoreAVVideoCaptureSourceObserver removeNotificationObservers]):
2394         (-[WebCoreAVVideoCaptureSourceObserver deviceConnectedDidChange:]):
2395         * platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
2396         (WebCore::deviceHasInputStreams):
2397         (WebCore::isValidCaptureDevice):
2398         (WebCore::CoreAudioCaptureDeviceManager::coreAudioCaptureDevices):
2399         (WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices):
2400         (WebCore::CoreAudioCaptureDeviceManager::devicesChanged): Deleted.
2401         * platform/mediastream/mac/CoreAudioCaptureDeviceManager.h:
2402         * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
2403         (WebCore::CoreAudioSharedUnit::setCaptureDevice):
2404         (WebCore::CoreAudioSharedUnit::devicesChanged):
2405         (WebCore::CoreAudioSharedUnit::startProducingData):
2406         (WebCore::CoreAudioSharedUnit::startInternal):
2407         (WebCore::CoreAudioSharedUnit::verifyIsCapturing):
2408         (WebCore::CoreAudioSharedUnit::captureFailed):
2409         (WebCore::CoreAudioCaptureSourceFactory::devicesChanged):
2410         (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):
2411         (WebCore::CoreAudioSharedUnit::setCaptureDeviceID): Deleted.
2412         * platform/mediastream/mac/CoreAudioCaptureSource.h:
2413
2414 2018-12-20  Ryosuke Niwa  <rniwa@webkit.org>
2415
2416         REGRESSION(r239353): iOS WK1 Assertion failure in notifyChildNodeRemoved while running
2417         TestWebKitAPI.QuickLook.LegacyQuickLookContent
2418         https://bugs.webkit.org/show_bug.cgi?id=192859
2419         <rdar://problem/46887237>
2420
2421         Reviewed by Antti Koivisto.
2422
2423         After r239353, ScriptDisallowedScope::InMainThread::isScriptAllowed() may return false when the web thread
2424         is inside a delegate callback even when there is a ScriptDisallowedScope defined.
2425
2426         Replace the existign debug assertions which assert !ScriptDisallowedScope::InMainThread::isScriptAllowed()
2427         by a newly added ScriptDisallowedScope::InMainThread::hasDisallowedScope to avoid hitting this assertion.
2428
2429         Tests: TestWebKitAPI.QuickLook.LegacyQuickLookContent
2430
2431         * dom/ContainerNodeAlgorithms.cpp:
2432         (WebCore::notifyChildNodeInserted):
2433         (WebCore::notifyChildNodeRemoved):
2434         * dom/Document.cpp:
2435         (WebCore::Document::nodeChildrenWillBeRemoved):
2436         (WebCore::Document::nodeWillBeRemoved):
2437         * dom/ScriptDisallowedScope.h:
2438         (WebCore::ScriptDisallowedScope::InMainThread::hasDisallowedScope):
2439         * html/HTMLFormElement.cpp:
2440         (WebCore:: const):
2441
2442 2018-12-21  Joseph Pecoraro  <pecoraro@apple.com>
2443
2444         Update status of some WebCore features in features.json
2445         https://bugs.webkit.org/show_bug.cgi?id=192998
2446
2447         Reviewed by Tim Horton.
2448
2449         * features.json:
2450         - Variation Fonts: Supported
2451         - Conic Gradients: Supported in Preview
2452         - Web Share: Supported in Preview
2453         - <datalist>: Supported in Preview
2454         - Intersection Observers: Supported in Preview
2455
2456 2018-12-21  Zalan Bujtas  <zalan@apple.com>
2457
2458         [iOS] Using file upload can trigger a crash under RenderThemeIOS::paintFileUploadIconDecorations()
2459         https://bugs.webkit.org/show_bug.cgi?id=192357
2460         <rdar://problem/42852260>
2461
2462         Reviewed by Simon Fraser.
2463
2464         Do not try to paint the file picker when painting is disabled.
2465
2466         * rendering/RenderFileUploadControl.cpp:
2467         (WebCore::RenderFileUploadControl::paintObject):
2468
2469 2018-12-21  Jiewen Tan  <jiewen_tan@apple.com>
2470
2471         [WebAuthN] userPresence should always be true
2472         https://bugs.webkit.org/show_bug.cgi?id=192835
2473         <rdar://problem/46538788>
2474
2475         Reviewed by Brent Fulgham.
2476
2477         In the current spec as of 7 August 2018, userPresence is suggested to set to the inverse of userVerification.
2478         This doesn't comply with the CTAP spec. Details in: https://github.com/w3c/webauthn/issues/1123.
2479         After discussing with other members of the working group, we decided to make userPresence always default to true.
2480
2481         Covered by exisiting tests.
2482
2483         * Modules/webauthn/fido/DeviceRequestConverter.cpp:
2484         (fido::encodeGetAssertionRequestAsCBOR):
2485
2486 2018-12-21  Jiewen Tan  <jiewen_tan@apple.com>
2487
2488         [WebAuthN] Import an APDU coder from Chromium
2489         https://bugs.webkit.org/show_bug.cgi?id=192949
2490         <rdar://problem/46879933>
2491
2492         Reviewed by Brent Fulgham.
2493
2494         This patch imports an APDU coder from Chromium. Here is the documentation:
2495         https://fidoalliance.org/specs/fido-u2f-v1.2-ps-20170411/fido-u2f-raw-message-formats-v1.2-ps-20170411.html#u2f-message-framing
2496         APDU is a binary format to frame any U2F requests/responses into binaries. It is equivalent to CBOR in CTAP2.
2497
2498         Here is a list of files that are imported from Chromium:
2499         https://cs.chromium.org/chromium/src/components/apdu/apdu_command.cc?rcl=a2f290c10d132f53518e7f99d5635ee814ff8090
2500         https://cs.chromium.org/chromium/src/components/apdu/apdu_command.h?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
2501         https://cs.chromium.org/chromium/src/components/apdu/apdu_response.cc?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
2502         https://cs.chromium.org/chromium/src/components/apdu/apdu_response.h?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
2503         https://cs.chromium.org/chromium/src/components/apdu/apdu_unittest.cc?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
2504
2505         Covered by API tests.
2506
2507         * Modules/webauthn/apdu/ApduCommand.cpp: Added.
2508         (apdu::ApduCommand::createFromMessage):
2509         (apdu::ApduCommand::ApduCommand):
2510         (apdu::ApduCommand::getEncodedCommand const):
2511         * Modules/webauthn/apdu/ApduCommand.h: Added.
2512         * Modules/webauthn/apdu/ApduResponse.cpp: Added.
2513         (apdu::ApduResponse::createFromMessage):
2514         (apdu::ApduResponse::ApduResponse):
2515         (apdu::ApduResponse::getEncodedResponse const):
2516         * Modules/webauthn/apdu/ApduResponse.h: Added.
2517         * Sources.txt:
2518         * WebCore.xcodeproj/project.pbxproj:
2519
2520 2018-12-21  Jer Noble  <jer.noble@apple.com>
2521
2522         Convert raw CDMSessionMediaSourceAVFObjC pointer in MediaPlayerPrivateMediaSourceAVFObjC
2523         https://bugs.webkit.org/show_bug.cgi?id=192985
2524         <rdar://problem/46750743>
2525
2526         Reviewed by Eric Carlson.
2527
2528         Make m_session a RefPtr; drive-by fix: make m_mediaElement in WebKitMediaKeys a WeakPtr.
2529
2530         * Modules/encryptedmedia/legacy/WebKitMediaKeys.cpp:
2531         (WebCore::WebKitMediaKeys::setMediaElement):
2532         * Modules/encryptedmedia/legacy/WebKitMediaKeys.h:
2533         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
2534         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
2535         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2536         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
2537         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):
2538
2539 2018-12-21  Justin Michaud  <justin_michaud@apple.com>
2540
2541         CSS variables don't work for colors in "border" property
2542         https://bugs.webkit.org/show_bug.cgi?id=192922
2543
2544         Reviewed by Simon Fraser.
2545
2546         ParseColorFunction no longer consumes anything if the color was not valid.
2547
2548         Test: css-custom-properties-api/border-variable-parsing.html
2549
2550         * css/parser/CSSPropertyParserHelpers.cpp:
2551         (WebCore::CSSPropertyParserHelpers::parseColorFunction):
2552
2553 2018-12-21  Justin Fan  <justin_fan@apple.com>
2554
2555         [WebGPU] GPUBindGroupLayout refactoring: no HashMap, and failure logging
2556         https://bugs.webkit.org/show_bug.cgi?id=192990
2557
2558         Reviewed by Myles C. Maxfield.
2559
2560         Refactor away the unnecessary HashMaps when creating MTLArgumentEncoders in GPUBindGroupLayout creation.
2561         Also update GPUBindGroupLayout::create -> tryCreate, in order to better handle Objective-C exceptions.
2562
2563         No new tests; no change in behavior.
2564
2565         * Modules/webgpu/WebGPUBindGroupLayout.cpp:
2566         (WebCore::WebGPUBindGroupLayout::create):
2567         (WebCore::WebGPUBindGroupLayout::WebGPUBindGroupLayout):
2568         * Modules/webgpu/WebGPUBindGroupLayout.h:
2569         (WebCore::WebGPUBindGroupLayout::bindGroupLayout const):
2570         * Modules/webgpu/WebGPUDevice.cpp:
2571         (WebCore::WebGPUDevice::createBindGroupLayout const):
2572         * platform/graphics/gpu/GPUBindGroupLayout.h:
2573         * platform/graphics/gpu/GPUDevice.cpp:
2574         (WebCore::GPUDevice::tryCreateBindGroupLayout const): Renamed from ::create*. Now returning a RefPtr. 
2575         (WebCore::GPUDevice::createBindGroupLayout const): Deleted.
2576         * platform/graphics/gpu/GPUDevice.h:
2577         * platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:
2578         (WebCore::appendArgumentToArray):
2579         (WebCore::newEncoder):
2580         (WebCore::GPUBindGroupLayout::tryCreate): Renamed from ::create. Now returning a RefPtr.
2581         (WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
2582         (WebCore::appendArgumentToArrayInMap): Deleted.
2583         (WebCore::GPUBindGroupLayout::create): Deleted.
2584
2585         Deleted unneeded GPUBindGroupLayout.cpp:
2586         * Sources.txt:
2587         * WebCore.xcodeproj/project.pbxproj:
2588         * platform/graphics/gpu/GPUBindGroupLayout.cpp: Removed.
2589
2590 2018-12-21  Alejandro G. Castro  <alex@igalia.com>
2591
2592         [GTK][WPE] Add DeviceIdHashSaltStorage disk persistence
2593         https://bugs.webkit.org/show_bug.cgi?id=190466
2594
2595         Reviewed by Youenn Fablet.
2596
2597         Added persistency to the DeviceIdHashSaltStorage.
2598
2599         * platform/glib/FileSystemGlib.cpp:
2600         (WebCore::FileSystem::getFileSize): Implemented this function to
2601         allow sharing code with the statistics storage class.
2602         * platform/glib/KeyedDecoderGlib.cpp:
2603         (WebCore::KeyedDecoderGlib::dictionaryFromGVariant): Added a
2604         condition to control situations where the key is empty, it can
2605         happen if the user modifies the file in the disk.
2606         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp: Add include
2607         to make work compilation with debug, unified builds.
2608
2609 2018-12-21  Zalan Bujtas  <zalan@apple.com>
2610
2611         Synchronous media query evaluation could destroy current Frame/FrameView.
2612         https://bugs.webkit.org/show_bug.cgi?id=192781
2613         <rdar://problem/34416793>
2614
2615         Reviewed by Chris Dumez.
2616
2617         Protect Frame and FrameView when coming back from printing and check if the current Frame/FrameView/FrameLoader objects are still valid.
2618
2619         Test: printing/print-with-media-query-destory.html
2620
2621         * loader/DocumentLoader.cpp:
2622         (WebCore::DocumentLoader::finishedLoading):
2623         * page/Frame.cpp:
2624         (WebCore::Frame::setPrinting):
2625         * page/FrameView.cpp:
2626         (WebCore::FrameView::forceLayoutForPagination):
2627         * page/PrintContext.cpp:
2628         (WebCore::PrintContext::PrintContext):
2629         (WebCore::PrintContext::computePageRects):
2630         (WebCore::PrintContext::computePageRectsWithPageSizeInternal):
2631         (WebCore::PrintContext::begin):
2632         (WebCore::PrintContext::computeAutomaticScaleFactor):
2633         (WebCore::PrintContext::spoolPage):
2634         (WebCore::PrintContext::spoolRect):
2635         (WebCore::PrintContext::end):
2636         * page/PrintContext.h:
2637         (WebCore::PrintContext::frame const): Deleted.
2638
2639 2018-12-21  Wenson Hsieh  <wenson_hsieh@apple.com>
2640
2641         Setting the file wrapper and content type of an attachment to a PDF should update its image
2642         https://bugs.webkit.org/show_bug.cgi?id=192984
2643         <rdar://problem/46798028>
2644
2645         Reviewed by Tim Horton.
2646
2647         Allow PDF data to be used to update enclosing image elements when setting the file wrapper for an attachment.
2648         Covered by a new API test: WKAttachmentTests.SetFileWrapperForPDFImageAttachment.
2649
2650         * html/HTMLAttachmentElement.cpp:
2651         (WebCore::mimeTypeIsSuitableForInlineImageAttachment):
2652         (WebCore::HTMLAttachmentElement::updateEnclosingImageWithData):
2653
2654 2018-12-21  Justin Michaud  <justin_michaud@apple.com>
2655
2656         Repeated background images with zero size should display the background color
2657         https://bugs.webkit.org/show_bug.cgi?id=192962
2658
2659         Reviewed by Antti Koivisto.
2660
2661         Test: fast/backgrounds/background-repeat-with-zero-size.html
2662
2663         * platform/LengthSize.h:
2664         (WebCore::LengthSize::isEmpty const):
2665         * rendering/RenderBoxModelObject.cpp:
2666         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2667         * rendering/style/FillLayer.h:
2668         (WebCore::FillLayer::isEmpty const):
2669
2670 2018-12-21  Manuel Rego Casasnovas  <rego@igalia.com>
2671
2672         [css-grid] Fix percentages in relative offsets for grid items
2673         https://bugs.webkit.org/show_bug.cgi?id=190492
2674
2675         Reviewed by Sergio Villar Senin.
2676
2677         The method RenderBoxModelObject::relativePositionOffset() was not considering the case of grid items,
2678         where the containing block is the grid area.
2679         The patch modifies the method so the new code uses overrideContainingBlockContentWidth|Height when required.
2680
2681         Test: imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-relative-offsets-002.html
2682
2683         * rendering/RenderBox.cpp: Implement the physical versions of the already existent methods.
2684         (WebCore::RenderBox::overrideContainingBlockContentWidth const):
2685         (WebCore::RenderBox::overrideContainingBlockContentHeight const):
2686         (WebCore::RenderBox::hasOverrideContainingBlockContentWidth const):
2687         (WebCore::RenderBox::hasOverrideContainingBlockContentHeight const):
2688         * rendering/RenderBox.h:
2689         * rendering/RenderBoxModelObject.cpp:
2690         (WebCore::RenderBoxModelObject::relativePositionOffset const): Modified method
2691         to take into account overrideContainingBlockContentWidth|Height for grid items.
2692         * rendering/RenderBoxModelObject.h: Added new headers for physical virtual methods
2693         that will be overridden in RenderBox.
2694         (WebCore::RenderBoxModelObject::overrideContainingBlockContentWidth const):
2695         (WebCore::RenderBoxModelObject::overrideContainingBlockContentHeight const):
2696         (WebCore::RenderBoxModelObject::hasOverrideContainingBlockContentWidth const):
2697         (WebCore::RenderBoxModelObject::hasOverrideContainingBlockContentHeight const):
2698
2699 2018-12-20  Justin Fan  <justin_fan@apple.com>
2700
2701         [WebGPU] Convert WebGPUBindGroups into MTLArgumentEncoders
2702         https://bugs.webkit.org/show_bug.cgi?id=192956
2703
2704         Reviewed by Myles Maxfield.
2705
2706         No testable behavior change. Existing tests cover possible crashing.
2707
2708         Add GPUBindGroupLayoutMetal.mm:
2709         * SourcesCocoa.txt:
2710         * WebCore.xcodeproj/project.pbxproj:
2711
2712         Flesh out GPUBindGroupLayout::create:
2713         * platform/graphics/gpu/GPUBindGroupLayout.cpp:
2714         * platform/graphics/gpu/GPUBindGroupLayout.h:
2715         * platform/graphics/gpu/GPUDevice.cpp:
2716         (WebCore::GPUDevice::createBindGroupLayout const):
2717         * platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm: Added.
2718         (WebCore::appendArgumentToArrayInMap): Added.
2719         (WebCore::GPUBindGroupLayout::create):
2720         (WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
2721         (WebCore::MTLDataTypeForBindingType): Added.
2722
2723 2018-12-20  Michael Catanzaro  <mcatanzaro@igalia.com>
2724
2725         Unreviewed, remove stray #pragma once added to .cpp file
2726
2727         * svg/properties/SVGAttributeOwnerProxy.cpp:
2728
2729 2018-12-20  Justin Michaud  <justin_michaud@apple.com>
2730
2731         Adding runtime-enabled attribute to Element prevents inlining property access
2732         https://bugs.webkit.org/show_bug.cgi?id=192901
2733
2734         Add a call to flattenDictionaryObject after disabling runtime-enabled attributes.
2735
2736         Reviewed by Ryosuke Niwa.
2737
2738         * bindings/scripts/CodeGeneratorJS.pm:
2739         (GenerateImplementation):
2740         * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
2741         (WebCore::JSTestEnabledBySettingPrototype::finishCreation):
2742         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2743         (WebCore::JSTestGenerateIsReachablePrototype::finishCreation):
2744         * bindings/scripts/test/JS/JSTestNode.cpp:
2745         (WebCore::JSTestNodePrototype::finishCreation):
2746         * bindings/scripts/test/JS/JSTestObj.cpp:
2747         (WebCore::JSTestObjPrototype::finishCreation):
2748
2749 2018-12-20  Chris Dumez  <cdumez@apple.com>
2750
2751         Use Optional::hasValue() instead of Optional::has_value()
2752         https://bugs.webkit.org/show_bug.cgi?id=192948
2753
2754         Reviewed by Tim Horton.
2755
2756         * bindings/js/DOMPromiseProxy.h:
2757         (WebCore::DOMPromiseProxy<IDLType>::isFulfilled const):
2758         (WebCore::DOMPromiseProxy<IDLVoid>::isFulfilled const):
2759         (WebCore::DOMPromiseProxyWithResolveCallback<IDLType>::isFulfilled const):
2760         * dom/DataTransferItemList.h:
2761         (WebCore::DataTransferItemList::hasItems const):
2762         * dom/EventTarget.cpp:
2763         (WebCore::EventTarget::addEventListener):
2764         * html/HTMLMediaElement.cpp:
2765         (WebCore::HTMLMediaElement::captionDisplayMode):
2766         * platform/graphics/MediaPlayer.cpp:
2767         (WebCore::MediaPlayer::wouldTaintOrigin const):
2768         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
2769         (WebCore::AppendPipeline::parseDemuxerSrcPadCaps):
2770         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
2771         (WebCore::MediaPlayerPrivateGStreamerMSE::trackDetected):
2772         * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
2773         (webKitMediaSrcUpdatePresentationSize):
2774         * platform/mac/NSScrollerImpDetails.mm:
2775         (WebCore::ScrollerStyle::recommendedScrollerStyle):
2776         * rendering/RenderListItem.cpp:
2777         (WebCore::RenderListItem::setExplicitValue):
2778
2779 2018-12-20  Chris Dumez  <cdumez@apple.com>
2780
2781         Move HTTPS_UPGRADE code behind a runtime flag, off by default
2782         https://bugs.webkit.org/show_bug.cgi?id=192937
2783
2784         Reviewed by Youenn Fablet.
2785
2786         Move HTTPS_UPGRADE code behind a runtime flag, off by default and drop the build time flag.
2787
2788         * page/Settings.yaml:
2789
2790 2018-12-20  Youenn Fablet  <youenn@apple.com>
2791
2792         Remove custom constructors of ReadableStreamDefaultReader and ReadableStreamBYOBReader
2793         https://bugs.webkit.org/show_bug.cgi?id=192838
2794
2795         Reviewed by Chris Dumez.
2796
2797         Generate constructor code in case of a Private but not Public constructor.
2798         Make sure this is correctly exposed in global objects.
2799         Add JS built-in constructor implementations for those two objects.
2800
2801         Also add JS built-in constructors for controller and byob request.
2802         To keep existing behavior, JS built-ins calling these constructors need to pass
2803         an additional parameter that allows making the difference between a JS builtin caller or a JS caller.
2804         In the latter case, the constructor will throw.
2805
2806         Covered by existing tests, no observable change of behavior.
2807
2808         * Modules/streams/ReadableByteStreamController.idl:
2809         * Modules/streams/ReadableByteStreamController.js:
2810         (initializeReadableByteStreamController):
2811         (getter.byobRequest):
2812         * Modules/streams/ReadableByteStreamInternals.js:
2813         (privateInitializeReadableByteStreamController): Deleted.
2814         (privateInitializeReadableStreamBYOBRequest): Deleted.
2815         * Modules/streams/ReadableStream.js:
2816         (initializeReadableStream):
2817         * Modules/streams/ReadableStreamBYOBReader.js:
2818         (initializeReadableStreamBYOBReader):
2819         * Modules/streams/ReadableStreamBYOBRequest.idl:
2820         * Modules/streams/ReadableStreamBYOBRequest.js:
2821         (initializeReadableStreamBYOBRequest):
2822         * Modules/streams/ReadableStreamDefaultController.idl:
2823         * Modules/streams/ReadableStreamDefaultController.js:
2824         (initializeReadableStreamDefaultController):
2825         (enqueue):
2826         * Modules/streams/ReadableStreamDefaultReader.js:
2827         (initializeReadableStreamDefaultReader):
2828         * Modules/streams/ReadableStreamInternals.js:
2829         (readableStreamDefaultControllerError): Deleted.
2830         * Sources.txt:
2831         * UnifiedSources-input.xcfilelist:
2832         * WebCore.xcodeproj/project.pbxproj:
2833         * bindings/js/JSDOMBuiltinConstructor.h:
2834         * bindings/js/JSDOMGlobalObject.cpp:
2835         (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
2836         * bindings/js/JSReadableStreamPrivateConstructors.cpp: Removed.
2837         * bindings/js/JSReadableStreamPrivateConstructors.h: Removed.
2838         * bindings/scripts/CodeGeneratorJS.pm:
2839         (GeneratePropertiesHashTable):
2840         * bindings/scripts/preprocess-idls.pl:
2841         (shouldExposeInterface):
2842
2843 2018-12-20  Jiewen Tan  <jiewen_tan@apple.com>
2844
2845         [WebAuthN] Remove hash from Client Data
2846         https://bugs.webkit.org/show_bug.cgi?id=192727
2847         <rdar://problem/46746673>
2848
2849         Reviewed by Brent Fulgham.
2850
2851         The hash algorithm for hashing the client data is enforced to SHA_256 in the latest spec:
2852         https://www.w3.org/TR/webauthn/#sec-client-data. Therefore, we should remove it.
2853
2854         Covered by existing tests.
2855
2856         * Modules/webauthn/AuthenticatorCoordinator.cpp:
2857         (WebCore::AuthenticatorCoordinatorInternal::produceClientDataJson):
2858
2859 2018-12-20  Jiewen Tan  <jiewen_tan@apple.com>
2860
2861         [WebAuthN] Add a runtime flag for local authenticator
2862         https://bugs.webkit.org/show_bug.cgi?id=192792
2863         <rdar://problem/46798738>
2864
2865         Reviewed by Brent Fulgham.
2866
2867         No tests.
2868
2869         This patch adds a runtime flag for local authenticator and removes ways to
2870         set the runtime flag for web authentication in LegacyWebKit.
2871
2872         * page/RuntimeEnabledFeatures.h:
2873         (WebCore::RuntimeEnabledFeatures::setWebAuthenticationLocalAuthenticatorEnabled):
2874         (WebCore::RuntimeEnabledFeatures::webAuthenticationLocalAuthenticatorEnabled const):
2875
2876 2018-12-20  Jeremy Jones  <jeremyj@apple.com>
2877
2878         Pointer lock causes abandoned documents
2879         https://bugs.webkit.org/show_bug.cgi?id=188727
2880         rdar://problem/44248197
2881         
2882         Reviewed by Simon Fraser.
2883
2884         Fixes --world-leaks in these tests:
2885
2886         pointer-lock/locked-element-removed-from-dom.html
2887         pointer-lock/mouse-event-delivery.html
2888         fast/shadow-dom/pointerlockelement-in-slot.html
2889
2890         PointerLockController now uses WeakPtr instead of RefPtr because it has no need to extend the lifetime of a document.
2891
2892         * page/PointerLockController.cpp:
2893         (WebCore::PointerLockController::elementRemoved):
2894         (WebCore::PointerLockController::documentDetached):
2895         (WebCore::PointerLockController::didAcquirePointerLock):
2896         * page/PointerLockController.h:
2897
2898 2018-12-20  Chris Dumez  <cdumez@apple.com>
2899
2900         Use Optional::valueOr() instead of Optional::value_or()
2901         https://bugs.webkit.org/show_bug.cgi?id=192933
2902
2903         Reviewed by Geoffrey Garen.
2904
2905         * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
2906         (WebCore::convert):
2907         (WebCore::ApplePayPaymentHandler::didAuthorizePayment):
2908         * Modules/encryptedmedia/MediaKeySession.cpp:
2909         (WebCore::MediaKeySession::load):
2910         * Modules/indexeddb/IDBDatabaseIdentifier.h:
2911         (WebCore::IDBDatabaseIdentifier::hash const):
2912         * Modules/indexeddb/IDBFactory.cpp:
2913         (WebCore::IDBFactory::open):
2914         * Modules/mediastream/MediaStreamTrack.cpp:
2915         (WebCore::MediaStreamTrack::applyConstraints):
2916         * Modules/mediastream/RTCDTMFSender.cpp:
2917         (WebCore::RTCDTMFSender::insertDTMF):
2918         * Modules/webdatabase/SQLTransaction.cpp:
2919         (WebCore::SQLTransaction::executeSql):
2920         * Modules/webvr/VRFrameData.cpp:
2921         (WebCore::VRFrameData::update):
2922         * animation/AnimationTimeline.cpp:
2923         (WebCore::AnimationTimeline::updateCSSTransitionsForElement):
2924         * animation/DeclarativeAnimation.cpp:
2925         (WebCore::DeclarativeAnimation::cancel):
2926         (WebCore::DeclarativeAnimation::invalidateDOMEvents):
2927         * animation/KeyframeEffect.cpp:
2928         (WebCore::computeMissingKeyframeOffsets):
2929         (WebCore::KeyframeEffect::applyPendingAcceleratedActions):
2930         * animation/WebAnimation.cpp:
2931         (WebCore::WebAnimation::runPendingPlayTask):
2932         (WebCore::WebAnimation::runPendingPauseTask):
2933         * bindings/js/SerializedScriptValue.cpp:
2934         (WebCore::CloneSerializer::write):
2935         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
2936         (WebCore::CryptoAlgorithmHMAC::generateKey):
2937         (WebCore::CryptoAlgorithmHMAC::importKey):
2938         * crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp:
2939         (WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
2940         (WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):
2941         * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
2942         (WebCore::CryptoKeyRSA::importSpki):
2943         (WebCore::CryptoKeyRSA::importPkcs8):
2944         * crypto/keys/CryptoKeyRSA.cpp:
2945         (WebCore::CryptoKeyRSA::importJwk):
2946         * crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:
2947         (WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
2948         (WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):
2949         * crypto/mac/CryptoKeyRSAMac.cpp:
2950         (WebCore::CryptoKeyRSA::importSpki):
2951         (WebCore::CryptoKeyRSA::importPkcs8):
2952         * css/CSSComputedStyleDeclaration.cpp:
2953         (WebCore::counterToCSSValue):
2954         * css/CSSFontFace.cpp:
2955         (WebCore::calculateItalicRange):
2956         * css/CSSPrimitiveValue.cpp:
2957         (WebCore::CSSPrimitiveValue::doubleValue const):
2958         * css/CSSStyleSheet.cpp:
2959         (WebCore::CSSStyleSheet::addRule):
2960         * css/DOMMatrix.cpp:
2961         (WebCore::DOMMatrix::rotateSelf):
2962         * css/DOMMatrixReadOnly.cpp:
2963         (WebCore::DOMMatrixReadOnly::validateAndFixup):
2964         * css/StyleBuilderCustom.h:
2965         (WebCore::StyleBuilderCustom::applyValueCounter):
2966         * css/parser/MediaQueryParser.cpp:
2967         (WebCore::MediaQueryParser::commitMediaQuery):
2968         * dom/Document.h:
2969         (WebCore::Document::referrerPolicy const):
2970         * dom/Element.cpp:
2971         (WebCore::toScrollAlignment):
2972         * dom/EventTarget.cpp:
2973         (WebCore::EventTarget::addEventListener):
2974         * dom/MutationObserver.cpp:
2975         (WebCore::MutationObserver::observe):
2976         * editing/cocoa/FontAttributeChangesCocoa.mm:
2977         (WebCore::FontChanges::platformFontFamilyNameForCSS const):
2978         * fileapi/File.cpp:
2979         (WebCore::File::File):
2980         * html/DOMTokenList.cpp:
2981         (WebCore::DOMTokenList::toggle):
2982         * html/HTMLOListElement.h:
2983         * html/ImageBitmap.cpp:
2984         (WebCore::croppedSourceRectangleWithFormatting):
2985         * html/canvas/CanvasPattern.cpp:
2986         (WebCore::CanvasPattern::setTransform):
2987         * html/canvas/CanvasRenderingContext2DBase.cpp:
2988         (WebCore::CanvasRenderingContext2DBase::setTransform):
2989         (WebCore::CanvasRenderingContext2DBase::isPointInPathInternal):
2990         (WebCore::CanvasRenderingContext2DBase::isPointInStrokeInternal):
2991         * html/canvas/Path2D.cpp:
2992         (WebCore::Path2D::addPath):
2993         * inspector/InspectorCanvas.cpp:
2994         (WebCore::InspectorCanvas::buildAction):
2995         * inspector/InspectorFrontendHost.cpp:
2996         (WebCore::populateContextMenu):
2997         * layout/FormattingContext.cpp:
2998         (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
2999         * layout/FormattingContextGeometry.cpp:
3000         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
3001         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
3002         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
3003         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
3004         (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
3005         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
3006         (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset):
3007         (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedHorizontalMarginValue):
3008         (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedVerticalMarginValue):
3009         * layout/FormattingContextQuirks.cpp:
3010         (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
3011         * layout/MarginTypes.h:
3012         (WebCore::Layout::VerticalMargin::usedValues const):
3013         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
3014         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
3015         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
3016         (WebCore::Layout::BlockFormattingContext::Geometry::instrinsicWidthConstraints):
3017         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
3018         (WebCore::Layout::BlockFormattingContext::Quirks::stretchedHeight):
3019         * layout/displaytree/DisplayBox.h:
3020         (WebCore::Display::Box::width const):
3021         (WebCore::Display::Box::height const):
3022         (WebCore::Display::Box::contentBoxTop const):
3023         (WebCore::Display::Box::contentBoxLeft const):
3024         * layout/floats/FloatingContext.cpp:
3025         (WebCore::Layout::Iterator::set):
3026         * layout/inlineformatting/InlineFormattingContext.cpp:
3027         (WebCore::Layout::InlineFormattingContext::appendContentToLine const):
3028         (WebCore::Layout::InlineFormattingContext::placeInFlowPositionedChildren const):
3029         * loader/FrameLoader.cpp:
3030         (WebCore::FrameLoader::urlSelected):
3031         * loader/NavigationAction.cpp:
3032         * page/FrameView.cpp:
3033         (WebCore::FrameView::setLayoutViewportOverrideRect):
3034         (WebCore::FrameView::documentToAbsoluteScaleFactor const):
3035         (WebCore::FrameView::viewportSizeForCSSViewportUnits const):
3036         * page/Page.cpp:
3037         (WebCore::Page::setLowPowerModeEnabledOverrideForTesting):
3038         * page/SecurityOriginData.cpp:
3039         (WebCore::SecurityOriginData::databaseIdentifier const):
3040         * page/SecurityOriginData.h:
3041         (WebCore::SecurityOriginDataHash::hash):
3042         * page/SecurityOriginHash.h:
3043         (WebCore::SecurityOriginHash::hash):
3044         * page/ViewportConfiguration.cpp:
3045         (WebCore::ViewportConfiguration::setViewLayoutSize):
3046         * page/WindowFeatures.cpp:
3047         (WebCore::parseDialogFeatures):
3048         * page/animation/AnimationBase.cpp:
3049         (WebCore::AnimationBase::updateStateMachine):
3050         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
3051         (WebCore::AnimationBase::getTimeToNextEvent const):
3052         (WebCore::AnimationBase::freezeAtTime):
3053         (WebCore::AnimationBase::getElapsedTime const):
3054         * page/animation/CSSAnimationController.cpp:
3055         (WebCore::CSSAnimationControllerPrivate::updateAnimationTimer):
3056         * page/cocoa/ResourceUsageThreadCocoa.mm:
3057         (WebCore::ResourceUsageThread::platformThreadBody):
3058         * page/linux/ResourceUsageThreadLinux.cpp:
3059         (WebCore::ResourceUsageThread::platformThreadBody):
3060         * platform/graphics/ComplexTextController.cpp:
3061         (WebCore::ComplexTextController::offsetForPosition):
3062         * platform/graphics/FontCache.h:
3063         (WebCore::FontDescriptionKey::computeHash const):
3064         * platform/graphics/FontCascade.cpp:
3065         (WebCore::FontCascade::drawText const):
3066         (WebCore::FontCascade::drawEmphasisMarks const):
3067         (WebCore::FontCascade::displayListForTextRun const):
3068         (WebCore::FontCascade::adjustSelectionRectForText const):
3069         (WebCore::FontCascade::codePath const):
3070         * platform/graphics/FontSelectionAlgorithm.cpp:
3071         (WebCore::FontSelectionAlgorithm::styleDistance const):
3072         * platform/graphics/FontSelectionAlgorithm.h:
3073         (WebCore::operator<<):
3074         (WebCore::FontSelectionSpecifiedCapabilities::computeWeight const):
3075         (WebCore::FontSelectionSpecifiedCapabilities::computeWidth const):
3076         (WebCore::FontSelectionSpecifiedCapabilities::computeSlope const):
3077         * platform/graphics/ShadowBlur.cpp:
3078         (WebCore::ShadowBlur::calculateLayerBoundingRect):
3079         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
3080         (WebCore::WebCoreAVCFResourceLoader::startLoading):
3081         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3082         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
3083         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
3084         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext):
3085         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3086         (WebCore::SourceBufferPrivateAVFObjC::naturalSize):
3087         * platform/graphics/ca/GraphicsLayerCA.cpp:
3088         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
3089         * platform/graphics/cocoa/FontCacheCoreText.cpp:
3090         (WebCore::preparePlatformFont):
3091         * platform/graphics/filters/FETurbulence.cpp:
3092         (WebCore::FETurbulence::fillRegion const):
3093         * platform/graphics/gstreamer/GStreamerCommon.cpp:
3094         (WebCore::initializeGStreamer):
3095         * platform/graphics/texmap/TextureMapperLayer.cpp:
3096         (WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica):
3097         (WebCore::TextureMapperLayer::replicaTransform):
3098         (WebCore::TextureMapperLayer::syncAnimations):
3099         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
3100         (WebCore::CoordinatedGraphicsLayer::transformedVisibleRect):
3101         (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
3102         * platform/graphics/transforms/TransformState.cpp:
3103         (WebCore::TransformState::mappedPoint const):
3104         (WebCore::TransformState::mapQuad const):
3105         (WebCore::TransformState::flattenWithTransform):
3106         * platform/network/CacheValidation.cpp:
3107         (WebCore::computeCurrentAge):
3108         (WebCore::computeFreshnessLifetimeForHTTPFamily):
3109         * platform/network/NetworkStateNotifier.cpp:
3110         (WebCore::NetworkStateNotifier::onLine):
3111         * rendering/FloatingObjects.cpp:
3112         (WebCore::FindNextFloatLogicalBottomAdapter::nextLogicalBottom const):
3113         (WebCore::FindNextFloatLogicalBottomAdapter::nextShapeLogicalBottom const):
3114         * rendering/GridBaselineAlignment.cpp:
3115         (WebCore::GridBaselineAlignment::ascentForChild const):
3116         * rendering/GridTrackSizingAlgorithm.cpp:
3117         (WebCore::GridTrack::setGrowthLimit):
3118         (WebCore::GridTrackSizingAlgorithm::initialBaseSize const):
3119         (WebCore::GridTrackSizingAlgorithm::initialGrowthLimit const):
3120         (WebCore::GridTrackSizingAlgorithm::sizeTrackToFitNonSpanningItem):
3121         (WebCore::sortByGridTrackGrowthPotential):
3122         (WebCore::GridTrackSizingAlgorithm::estimatedGridAreaBreadthForChild const):
3123         (WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const):
3124         (WebCore::GridTrackSizingAlgorithm::initializeTrackSizes):
3125         * rendering/PaintInfo.h:
3126         (WebCore::PaintInfo::applyTransform):
3127         * rendering/RenderBox.cpp:
3128         (WebCore::RenderBox::computeLogicalHeight const):
3129         * rendering/RenderCounter.cpp:
3130         (WebCore::planCounter):
3131         * rendering/RenderDeprecatedFlexibleBox.cpp:
3132         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
3133         * rendering/RenderFlexibleBox.cpp:
3134         (WebCore::RenderFlexibleBox::baselinePosition const):
3135         (WebCore::RenderFlexibleBox::marginBoxAscentForChild):
3136         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
3137         * rendering/RenderGrid.cpp:
3138         (WebCore::RenderGrid::gridGap const):
3139         (WebCore::RenderGrid::baselinePosition const):
3140         * rendering/RenderLayer.cpp:
3141         (WebCore::RenderLayer::paintLayerByApplyingTransform):
3142         * rendering/RenderListBox.cpp:
3143         (WebCore::RenderListBox::paintItem):
3144         (WebCore::RenderListBox::listIndexIsVisible):
3145         * rendering/RenderMultiColumnSet.cpp:
3146         (WebCore::RenderMultiColumnSet::calculateMaxColumnHeight const):
3147         * rendering/RenderTable.cpp:
3148         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
3149         * rendering/RenderTableCell.cpp:
3150         (WebCore::RenderTableCell::cellBaselinePosition const):
3151         * rendering/RenderTableSection.cpp:
3152         (WebCore::RenderTableSection::firstLineBaseline const):
3153         * rendering/RenderText.cpp:
3154         (WebCore::RenderText::computePreferredLogicalWidths):
3155         (WebCore::RenderText::previousOffset const):
3156         (WebCore::RenderText::previousOffsetForBackwardDeletion const):
3157         (WebCore::RenderText::nextOffset const):
3158         (WebCore::RenderText::stringView const):
3159         * rendering/RenderView.cpp:
3160         (WebCore::RenderView::layout):
3161         * rendering/mathml/RenderMathMLBlock.cpp:
3162         (WebCore::RenderMathMLBlock::baselinePosition const):
3163         * rendering/mathml/RenderMathMLBlock.h:
3164         (WebCore::RenderMathMLBlock::ascentForChild):
3165         * rendering/style/GridPosition.cpp:
3166         (WebCore::GridPosition::max):
3167         * rendering/style/TextUnderlineOffset.h:
3168         (WebCore::TextUnderlineOffset::lengthOr const):
3169         * rendering/svg/RenderSVGContainer.cpp:
3170         (WebCore::RenderSVGContainer::nodeAtFloatPoint):
3171         * rendering/svg/RenderSVGForeignObject.cpp:
3172         (WebCore::RenderSVGForeignObject::nodeAtFloatPoint):
3173         * rendering/svg/RenderSVGImage.cpp:
3174         (WebCore::RenderSVGImage::nodeAtFloatPoint):
3175         * rendering/svg/RenderSVGResourceClipper.cpp:
3176         (WebCore::RenderSVGResourceClipper::hitTestClipContent):
3177         * rendering/svg/RenderSVGResourceFilter.cpp:
3178         (WebCore::RenderSVGResourceFilter::postApplyResource):
3179         * rendering/svg/RenderSVGRoot.cpp:
3180         (WebCore::RenderSVGRoot::nodeAtPoint):
3181         * rendering/svg/RenderSVGShape.cpp:
3182         (WebCore::RenderSVGShape::nodeAtFloatPoint):
3183         * rendering/svg/RenderSVGText.cpp:
3184         (WebCore::RenderSVGText::nodeAtFloatPoint):
3185         * rendering/svg/SVGRenderingContext.cpp:
3186         (WebCore::SVGRenderingContext::clipToImageBuffer):
3187         * svg/SVGToOTFFontConversion.cpp:
3188         (WebCore::SVGToOTFFontConverter::processGlyphElement):
3189         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
3190
3191 2018-12-20  Jer Noble  <jer.noble@apple.com>
3192
3193         REGRESSION (r239419): heap-use-after-free in AudioSourceProviderAVFObjC::finalizeCallback()
3194         https://bugs.webkit.org/show_bug.cgi?id=192941
3195         <rdar://problem/46874096>
3196
3197         Reviewed by Brent Fulgham.
3198
3199         Don't delete the locked lock before unlocking the lock. 
3200
3201         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
3202         (WebCore::AudioSourceProviderAVFObjC::finalizeCallback):
3203
3204 2018-12-20  Keith Rollin  <krollin@apple.com>
3205
3206         Improve release-level page-load logging
3207         https://bugs.webkit.org/show_bug.cgi?id=192872
3208         <rdar://problem/46850309>
3209
3210         Reviewed by Chris Dumez.
3211
3212         There are a number of reported bugs that are difficult or impossible
3213         to track down with our current level of logging. Additionally, some
3214         software groups lower in the page-loading stack have requested logging
3215         sufficient for tracking a user-visible error message down to the
3216         requested resource that caused the message. Add more-comprehensive
3217         logging to address these issues/requests.
3218
3219         No new tests -- no changed functionality.
3220
3221         * loader/DocumentLoader.cpp:
3222         (WebCore::DocumentLoader::setMainDocumentError):
3223         (WebCore::DocumentLoader::mainReceivedError):
3224         (WebCore::DocumentLoader::stopLoading):
3225         (WebCore::DocumentLoader::notifyFinished):
3226         (WebCore::DocumentLoader::willSendRequest):
3227         (WebCore::DocumentLoader::continueAfterContentPolicy):
3228         (WebCore::DocumentLoader::startLoadingMainResource):
3229         (WebCore::DocumentLoader::loadMainResource):
3230         (WebCore::DocumentLoader::cancelMainResourceLoad):
3231         * loader/FrameLoader.cpp:
3232         (WebCore::FrameLoader::urlSelected):
3233         (WebCore::FrameLoader::loadURLIntoChildFrame):
3234         (WebCore::FrameLoader::loadArchive):
3235         (WebCore::FrameLoader::loadInSameDocument):
3236         (WebCore::FrameLoader::loadFrameRequest):
3237         (WebCore::FrameLoader::loadURL):
3238         (WebCore::FrameLoader::load):
3239         (WebCore::FrameLoader::loadWithNavigationAction):
3240         (WebCore::FrameLoader::loadWithDocumentLoader):
3241         (WebCore::FrameLoader::reloadWithOverrideEncoding):
3242         (WebCore::FrameLoader::reload):
3243         (WebCore::FrameLoader::setState):
3244         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
3245         (WebCore::FrameLoader::loadPostRequest):
3246         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
3247         (WebCore::FrameLoader::loadDifferentDocumentItem):
3248         * loader/ProgressTracker.cpp:
3249         (WebCore::ProgressItem::ProgressItem):
3250         (WebCore::ProgressTracker::reset):
3251         (WebCore::ProgressTracker::progressStarted):
3252         (WebCore::ProgressTracker::progressCompleted):
3253         (WebCore::ProgressTracker::finalProgressComplete):
3254         (WebCore::ProgressTracker::incrementProgress):
3255         (WebCore::ProgressTracker::completeProgress):
3256         (WebCore::ProgressTracker::isAlwaysOnLoggingAllowed const):
3257         * loader/ProgressTracker.h:
3258         * loader/ResourceLoader.cpp:
3259         (WebCore::ResourceLoader::loadDataURL):
3260         (WebCore::ResourceLoader::willSendRequestInternal):
3261         (WebCore::ResourceLoader::didFinishLoading):
3262         (WebCore::ResourceLoader::didFail):
3263         (WebCore::ResourceLoader::willSendRequestAsync):
3264         (WebCore::ResourceLoader::wasBlocked):
3265         (WebCore::ResourceLoader::cannotShowURL):
3266         * loader/SubresourceLoader.cpp:
3267         (WebCore::SubresourceLoader::willSendRequestInternal):
3268         (WebCore::=):
3269         (WebCore::SubresourceLoader::didReceiveResponse):
3270         (WebCore::SubresourceLoader::didFinishLoading):
3271         (WebCore::SubresourceLoader::didFail):
3272         (WebCore::SubresourceLoader::willCancel):
3273         * loader/cache/CachedResource.cpp:
3274         (WebCore::CachedResource::load):
3275
3276 2018-12-20  Jeremy Jones  <jeremyj@apple.com>
3277
3278         Switch tabs before retuning PiP video to inline.
3279         https://bugs.webkit.org/show_bug.cgi?id=192767
3280         rdar://problem/46006046
3281
3282         Reviewed by Jer Noble.
3283
3284         No new tests because this code path only happens with a user action on system UI.
3285
3286         When exiting PiP, notify the fullscreen change observer so it can restore client UI state before exiting.
3287
3288         * platform/mac/VideoFullscreenInterfaceMac.mm:
3289         (-[WebVideoFullscreenInterfaceMacObjC pipShouldClose:]):
3290
3291 2018-12-19  Michael Catanzaro  <mcatanzaro@igalia.com>
3292
3293         Unreviewed, fix GTK build after r239410
3294
3295         It added a new file to the build, breaking the unified sources magic that obscured a bug in
3296         URLSoup.h. It forward-declares URL, but this never worked unless the URL.h header was
3297         included via another source file in the unified source bundle.
3298
3299         * platform/network/soup/URLSoup.h:
3300
3301 2018-12-19  Chris Dumez  <cdumez@apple.com>
3302
3303         wtf/Optional.h: move-constructor and move-assignment operator should disengage the value being moved from
3304         https://bugs.webkit.org/show_bug.cgi?id=192728
3305         <rdar://problem/46746779>
3306
3307         Reviewed by Geoff Garen.
3308
3309         * Modules/*:
3310         * animation/*:
3311         * bindings/*:
3312         * crypto/*:
3313         * css/*:
3314         * dom/*:
3315         * editing/*:
3316         * fileapi/*:
3317         * html/*:
3318         * inspector/*:
3319         * layout/*:
3320         * loader/*:
3321         * mathml/*:
3322         * page/*:
3323         * platform/*:
3324         * plugins/*:
3325         * rendering/*:
3326         * testing/*:
3327         * workers/*:
3328         * xml/*:
3329
3330 2018-12-19  Jer Noble  <jer.noble@apple.com>
3331
3332         Leak of MTAudioProcessingTap (304 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
3333         https://bugs.webkit.org/show_bug.cgi?id=192896
3334         <rdar://46732186>
3335
3336         Reviewed by Eric Carlson.
3337
3338         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
3339         (WebCore::AudioSourceProviderAVFObjC::initCallback):
3340
3341 2018-12-19  Timothy Hatcher  <timothy@apple.com>
3342
3343         REGRESSION (r232991): Switching to dark mode in Mail does not update the message view to be transparent
3344         https://bugs.webkit.org/show_bug.cgi?id=188891
3345         rdar://problem/42344352
3346
3347         Reviewed by Simon Fraser.
3348
3349         * rendering/RenderLayerCompositor.cpp:
3350         (WebCore::RenderLayerCompositor::rootBackgroundColorOrTransparencyChanged):
3351         Don't return early when m_layerForOverhangAreas is null to avoid skipping
3352         setRootLayerConfigurationNeedsUpdate() and scheduleCompositingLayerUpdate().
3353
3354 2018-12-19  Justin Fan  <justin_fan@apple.com>
3355
3356         [WebGPU] Add stubs for WebGPUPipelineLayout/Descriptor and device::createPipelineLayout
3357         https://bugs.webkit.org/show_bug.cgi?id=192843
3358         <rdar://problem/46820395>
3359
3360         Reviewed by Myles Maxfield.
3361
3362         Test: webgpu/pipeline-layouts.html
3363
3364         Implement the emtpy WebGPUPipelineLayout interface, and enable creation via WebGPUDevice::createPipelineLayout:
3365         * Modules/webgpu/WebGPUBindGroupLayout.cpp:
3366         (WebCore::WebGPUBindGroupLayout::WebGPUBindGroupLayout):
3367         * Modules/webgpu/WebGPUBindGroupLayout.h:
3368         (WebCore::WebGPUBindGroupLayout::bindGroupLayout const): Added getter.
3369         * Modules/webgpu/WebGPUDevice.cpp:
3370         (WebCore::WebGPUDevice::createPipelineLayout const): Added.
3371         * Modules/webgpu/WebGPUDevice.h:
3372         * Modules/webgpu/WebGPUDevice.idl: Enable createPipelineLayout.
3373         * Modules/webgpu/WebGPUPipelineLayout.cpp: Added.
3374         (WebCore::WebGPUPipelineLayout::create):
3375         (WebCore::WebGPUPipelineLayout::WebGPUPipelineLayout):
3376         * Modules/webgpu/WebGPUPipelineLayout.h: Added.
3377         * Modules/webgpu/WebGPUPipelineLayout.idl: Added.
3378         * Modules/webgpu/WebGPUPipelineLayoutDescriptor.h: Added.
3379         * Modules/webgpu/WebGPUPipelineLayoutDescriptor.idl: Added.
3380         * platform/graphics/gpu/GPUDevice.cpp:
3381         (WebCore::GPUDevice::createPipelineLayout const): Added.
3382         * platform/graphics/gpu/GPUDevice.h:
3383         * platform/graphics/gpu/GPUPipelineLayout.cpp: Added.
3384         (WebCore::GPUPipelineLayout::create):
3385         (WebCore::GPUPipelineLayout::GPUPipelineLayout):
3386         * platform/graphics/gpu/GPUPipelineLayout.h: Added.
3387         * platform/graphics/gpu/GPUPipelineLayoutDescriptor.h: Added.
3388
3389         Add files and symbols to project:
3390         * CMakeLists.txt:
3391         * DerivedSources.make:
3392         * Sources.txt:
3393         * WebCore.xcodeproj/project.pbxproj:
3394         * bindings/js/WebCoreBuiltinNames.h:
3395
3396         Add missing include:
3397         * Modules/webgpu/WebGPUQueue.h:
3398
3399 2018-12-18  Ryosuke Niwa  <rniwa@webkit.org>
3400
3401         SVGUseElement::findTarget should return nullptr when there is a cycle
3402         https://bugs.webkit.org/show_bug.cgi?id=192840
3403
3404         Reviewed by Tim Horton.
3405
3406         r233366 added an early return to updateShadowTree() when there is a cycle between an use element and its target.
3407         Consolidate this cycle detection code with the one in SVGUseElement::findTarget which detected cycles when
3408         the SVG use element itself had a corresponding element.
3409
3410         No new tests since there should be no behavioral change.
3411
3412         * svg/SVGUseElement.cpp:
3413         (WebCore::SVGUseElement::updateShadowTree):
3414         (WebCore::SVGUseElement::findTarget const):
3415
3416 2018-12-19  Myles C. Maxfield  <mmaxfield@apple.com>
3417
3418         [WHLSL] Add a handwritten lexer
3419         https://bugs.webkit.org/show_bug.cgi?id=192294
3420
3421         Reviewed by Jon Lee.
3422
3423         This is infrastructure necessary for https://bugs.webkit.org/show_bug.cgi?id=192355. The
3424         implementation matches the lexing rules in the spec (specifically, the rules that start
3425         with an uppercase letter). The spec is at
3426         https://github.com/gpuweb/WHLSL/blob/master/Spec/WHLSL.g4.
3427
3428         This patch also modifies the lexer according to https://github.com/gpuweb/WHLSL/pull/283.
3429
3430         No new tests because the lexer isn't hooked up yet; there are tests in the parser,
3431         once that gets committed.
3432
3433         * Modules/webgpu/WHLSL/WHLSLLexer.cpp: Added.
3434         (WebCore::WHLSL::Lexer::Token::typeName):
3435         (WebCore::WHLSL::Lexer::recognizeKeyword):
3436         (WebCore::WHLSL::Lexer::consumeTokenFromStream):
3437         (WebCore::WHLSL::Lexer::skipWhitespaceAndComments):
3438         (WebCore::WHLSL::isWhitespace):
3439         (WebCore::WHLSL::isNewline):
3440         (WebCore::WHLSL::Lexer::skipWhitespace):
3441         (WebCore::WHLSL::Lexer::skipLineComment):
3442         (WebCore::WHLSL::Lexer::skipLongComment):
3443         (WebCore::WHLSL::Lexer::coreDecimalIntLiteral const):
3444         (WebCore::WHLSL::Lexer::decimalIntLiteral const):
3445         (WebCore::WHLSL::Lexer::decimalUintLiteral const):
3446         (WebCore::WHLSL::isHexadecimalCharacter):
3447         (WebCore::WHLSL::Lexer::coreHexadecimalIntLiteral const):
3448         (WebCore::WHLSL::Lexer::hexadecimalIntLiteral const):
3449         (WebCore::WHLSL::Lexer::hexadecimalUintLiteral const):
3450         (WebCore::WHLSL::Lexer::intLiteral const):
3451         (WebCore::WHLSL::Lexer::uintLiteral const):
3452         (WebCore::WHLSL::Lexer::digit const):
3453         (WebCore::WHLSL::Lexer::digitStar const):
3454         (WebCore::WHLSL::Lexer::character const):
3455         (WebCore::WHLSL::Lexer::coreFloatLiteralType1 const):
3456         (WebCore::WHLSL::Lexer::coreFloatLiteral const):
3457         (WebCore::WHLSL::Lexer::floatLiteral const):
3458         (WebCore::WHLSL::Lexer::validIdentifier const):
3459         (WebCore::WHLSL::Lexer::identifier const):
3460         (WebCore::WHLSL::Lexer::operatorName const):
3461         * Modules/webgpu/WHLSL/WHLSLLexer.h: Added.
3462         (WebCore::WHLSL::Lexer::Lexer):
3463         (WebCore::WHLSL::Lexer::consumeToken):
3464         (WebCore::WHLSL::Lexer::unconsumeToken):
3465         (WebCore::WHLSL::Lexer::state const):
3466         (WebCore::WHLSL::Lexer::setState):
3467         (WebCore::WHLSL::Lexer::isFullyConsumed const):
3468         (WebCore::WHLSL::Lexer::errorString):
3469         (WebCore::WHLSL::Lexer::string const):
3470         (WebCore::WHLSL::Lexer::anyCharacter const):
3471         * Sources.txt:
3472         * WebCore.xcodeproj/project.pbxproj:
3473
3474 2018-12-18  Simon Fraser  <simon.fraser@apple.com>
3475
3476         Web Inspector: Timelines: correctly label Intersection Observer callbacks
3477         https://bugs.webkit.org/show_bug.cgi?id=192669
3478         <rdar://problem/46702490>
3479
3480         Reviewed by Joseph Pecoraro.
3481
3482         Add InspectorInstrumentation::willFireObserverCallback() and use it to wrap calls
3483         to Intersection Observer, Performance Observer and Mutation Observer callbacks so 
3484         that they get correctly labeled in the Inspector timeline.
3485
3486         * dom/MutationObserver.cpp:
3487         (WebCore::MutationObserver::deliver):
3488         * en.lproj/Localizable.strings:
3489         * inspector/InspectorInstrumentation.cpp:
3490         (WebCore::InspectorInstrumentation::willFireObserverCallbackImpl):
3491         (WebCore::InspectorInstrumentation::didFireObserverCallbackImpl):
3492         * inspector/InspectorInstrumentation.h:
3493         (WebCore::InspectorInstrumentation::willFireObserverCallback):
3494         (WebCore::InspectorInstrumentation::didFireObserverCallback):
3495         * inspector/TimelineRecordFactory.cpp:
3496         (WebCore::TimelineRecordFactory::createObserverCallbackData):
3497         * inspector/TimelineRecordFactory.h:
3498         * inspector/agents/InspectorTimelineAgent.cpp:
3499         (WebCore::InspectorTimelineAgent::willFireObserverCallback):
3500         (WebCore::InspectorTimelineAgent::didFireObserverCallback):
3501         (WebCore::toProtocol):
3502         * inspector/agents/InspectorTimelineAgent.h:
3503         * page/IntersectionObserver.cpp:
3504         (WebCore::IntersectionObserver::notify):
3505         * page/PerformanceObserver.cpp:
3506         (WebCore::PerformanceObserver::deliver):
3507
3508 2018-12-19  Claudio Saavedra  <csaavedra@igalia.com>
3509
3510         ContentExtensions: DFANode.cpp:66:44: error: narrowing conversion of '-1' from 'int' to 'char' inside { }
3511         https://bugs.webkit.org/show_bug.cgi?id=192854
3512
3513         Reviewed by Alex Christensen.
3514
3515         * contentextensions/DFANode.h: Define CharRange's chars as signed
3516
3517 2018-12-19  Youenn Fablet  <youenn@apple.com>
3518
3519         Remove RTCRtpTransceiver.setDirection
3520         https://bugs.webkit.org/show_bug.cgi?id=192869
3521
3522         Reviewed by Alex Christensen.
3523
3524         Covered by rebased test.
3525
3526         * Modules/mediastream/RTCRtpTransceiver.idl:
3527
3528 2018-12-19  Jer Noble  <jer.noble@apple.com>
3529
3530         Force synchronous decode in WebCoreDecompressionSession::decodeSampleSync()
3531         https://bugs.webkit.org/show_bug.cgi?id=192856
3532         <rdar://problem/46843245>
3533
3534         Reviewed by Alex Christensen.
3535
3536         Some decoders exposed through VideoToolbox will decode asynchronously even when 
3537         kVTDecodeInfo_Asynchronous is not set. Force synchronous behavior with a Semaphore.
3538
3539         * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
3540         (WebCore::WebCoreDecompressionSession::decodeSampleSync):
3541
3542 2018-12-19  Megan Gardner  <megan_gardner@apple.com>
3543
3544         Allow clients to set the navigator platform
3545         https://bugs.webkit.org/show_bug.cgi?id=192735
3546
3547         Reviewed by Tim Horton.
3548
3549         Expanded TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm.
3550
3551         Lots of piping to allow the setting of a custom navigator platform.
3552
3553         * loader/DocumentLoader.h:
3554         (WebCore::DocumentLoader::setCustomNavigatorPlatform):
3555         (WebCore::DocumentLoader::customNavigatorPlatform const):
3556         * loader/FrameLoader.cpp:
3557         (WebCore::FrameLoader::navigatorPlatform const):
3558         * loader/FrameLoader.h:
3559         * page/Navigator.cpp:
3560         (WebCore::Navigator::platform const):
3561         * page/Navigator.h:
3562         * page/NavigatorBase.cpp:
3563         (WebCore::NavigatorBase::platform const):
3564         (WebCore::NavigatorBase::platform): Deleted.
3565         * page/NavigatorBase.h:
3566
3567 2018-12-19  Ryan Haddad  <ryanhaddad@apple.com>
3568
3569         Unreviewed, rolling out r239347.
3570
3571         Caused the leaks bot to hit an exception and the new test
3572         crashes on certain configurations.
3573
3574         Reverted changeset:
3575
3576         "Synchronous media query evaluation could destroy current
3577         Frame/FrameView."
3578         https://bugs.webkit.org/show_bug.cgi?id=192781
3579         https://trac.webkit.org/changeset/239347
3580
3581 2018-12-19  Truitt Savell  <tsavell@apple.com>
3582
3583         Unreviewed, rolling out r239358.
3584
3585         Revision caused imported/w3c/web-platform-tests/IndexedDB/ to
3586         crash on Debug bots
3587
3588         Reverted changeset:
3589
3590         "Clean up IndexedDB files between tests"
3591         https://bugs.webkit.org/show_bug.cgi?id=192796
3592         https://trac.webkit.org/changeset/239358
3593
3594 2018-12-19  Don Olmstead  <don.olmstead@sony.com>
3595
3596         Sync some include directories in WebCore
3597         https://bugs.webkit.org/show_bug.cgi?id=192819
3598
3599         Reviewed by Michael Catanzaro.
3600
3601         Added missing include directories around features that have only been enabled on
3602         Apple ports. Removes obsolete directories from list and moves harfbuzz directories
3603         into the freetype cmake file.
3604
3605         * CMakeLists.txt:
3606         * platform/FreeType.cmake:
3607
3608 2018-12-19  Alicia Boya García  <aboya@igalia.com>
3609
3610         [MSE] Remove unused method: stopAskingForMoreSamples()
3611         https://bugs.webkit.org/show_bug.cgi?id=192754
3612
3613         Reviewed by Xabier Rodriguez-Calvar.
3614
3615         The stopAskingForMoreSamples() method from SourceBufferPrivate is not
3616         being used by anyone. SourceBuffer is not calling it and no
3617         SourceBufferPrivate is implementing it. Let's remove that noise.
3618
3619         * platform/graphics/SourceBufferPrivate.h:
3620         (WebCore::SourceBufferPrivate::setActive):
3621         (WebCore::SourceBufferPrivate::stopAskingForMoreSamples): Deleted.
3622         * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
3623         (WebCore::SourceBufferPrivateGStreamer::stopAskingForMoreSamples): Deleted.
3624         * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:
3625
3626 2018-12-19  Alicia Boya García  <aboya@igalia.com>
3627
3628         [MSE] Remove dead code: sourceBufferPrivateSeekToTime()
3629         https://bugs.webkit.org/show_bug.cgi?id=192827
3630
3631         Reviewed by Xabier Rodriguez-Calvar.
3632
3633         This patch makes two dead code removal changes in
3634         SourceBufferPrivateClient:
3635
3636         First, sourceBufferPrivateFastSeekTimeForMediaTime() is made pure
3637         virtual in SourceBufferPrivateClient. Since SourceBufferPrivateClient
3638         is only inherited by SourceBuffer, it makes no sense to have default
3639         implementations there (they will never be used), moreso it being a
3640         client interface.
3641
3642         Second, sourceBufferPrivateSeekToTime() is removed entirely. It used
3643         to had an empty implementation, which SourceBuffer did not overwrite,
3644         therefore making any calls to it useless.
3645
3646         All calls to sourceBufferPrivateSeekToTime() have been removed:
3647
3648         SourceBufferPrivateAVFObjC::seekToTime(), which was also dead code
3649         itself, used to call this method. This patch deletes it completely.
3650
3651         MockSourceBufferPrivate::seekToTime(), which only called this empty
3652         method, has also been removed along with its only usage in
3653         MockMediaSourcePrivate::seekToTime().
3654
3655         * platform/graphics/SourceBufferPrivateClient.h:
3656         (WebCore::SourceBufferPrivateClient::sourceBufferPrivateFastSeekTimeForMediaTime): Deleted.
3657         (WebCore::SourceBufferPrivateClient::sourceBufferPrivateSeekToTime): Deleted.
3658         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
3659         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3660         (WebCore::SourceBufferPrivateAVFObjC::seekToTime): Deleted.
3661         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
3662         (WebCore::MockMediaSourcePrivate::seekToTime):
3663         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
3664         (WebCore::MockSourceBufferPrivate::seekToTime): Deleted.
3665         * platform/mock/mediasource/MockSourceBufferPrivate.h:
3666
3667 2018-12-19  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3668
3669         [EME] MediaKeySystemConfiguration distinctiveIdentifier and persistentState should default to optional
3670         https://bugs.webkit.org/show_bug.cgi?id=192815
3671
3672         Reviewed by Jer Noble.
3673
3674         https://www.w3.org/TR/encrypted-media/#dom-mediakeysystemconfiguration
3675         says that distinctiveIdentifier and persistentState default to
3676         optional. Our implementation does not define a default leaving it
3677         to the first option of the enum, which currently is Required.
3678
3679         * platform/encryptedmedia/CDMKeySystemConfiguration.h:
3680
3681 2018-12-19  Rob Buis  <rbuis@igalia.com>
3682
3683         Merge parseAccessControlExposeHeadersAllowList into parseAccessControlAllowList
3684         https://bugs.webkit.org/show_bug.cgi?id=192288
3685
3686         Reviewed by Frédéric Wang.
3687
3688         Prefer return value to out parameter for parseAccessControlAllowList.
3689
3690         * loader/CrossOriginPreflightResultCache.cpp:
3691         (WebCore::CrossOriginPreflightResultCacheItem::parse):
3692         * platform/network/HTTPParsers.h:
3693         (WebCore::parseAccessControlAllowList):
3694         * platform/network/ResourceResponseBase.cpp:
3695         (WebCore::ResourceResponseBase::filter):
3696         (WebCore::ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingToTainting):
3697
3698 2018-12-18  Zan Dobersek  <zdobersek@igalia.com>
3699
3700         REGRESSION(r235165): [GTK][WPE] Garbled rendering on GitLab
3701         https://bugs.webkit.org/show_bug.cgi?id=192230
3702
3703         Reviewed by Carlos Garcia Campos.
3704
3705         Single tile can after r235165 be assigned multiple content updates
3706         without a commit occurring between each update, whereas before these
3707         commits were done for each update.
3708
3709         To avoid repeating updates for a single tile purging information about
3710         the previous update, these updates are now accumulated inside a Vector
3711         and then iterated over during the commit phase.
3712
3713         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
3714         (WebCore::CoordinatedBackingStoreTile::addUpdate):
3715         (WebCore::CoordinatedBackingStoreTile::swapBuffers):
3716         (WebCore::CoordinatedBackingStore::updateTile):
3717         (WebCore::CoordinatedBackingStoreTile::setBackBuffer): Deleted.
3718         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.h:
3719         (WebCore::CoordinatedBackingStoreTile::scale const):
3720
3721 2018-12-18  Wenson Hsieh  <wenson_hsieh@apple.com>
3722
3723         [iOS] A copied text selection is pasted as a web archive attachment in the entry view in Messages
3724         https://bugs.webkit.org/show_bug.cgi?id=192842
3725         <rdar://problem/46823586>
3726
3727         Reviewed by Tim Horton.
3728
3729         Temporarily revert a behavior change introduced by r238661, where we now add "com.apple.webarchive" as a
3730         registered UTI when dragging or copying a text selection. This broke the Messages app on iOS, which currently
3731         inserts a copied or dragged text selection from WebKit-based views as a web archive file attachment. A fix for
3732         this is internally tracked in <rdar://problem/46830277>.
3733
3734         * platform/ios/PlatformPasteboardIOS.mm:
3735         (WebCore::PlatformPasteboard::write):
3736
3737 2018-12-18  Michael Catanzaro  <mcatanzaro@igalia.com>
3738
3739         Unreviewed, add a missing UNUSED_PARAM()
3740
3741         * Modules/mediarecorder/MediaRecorder.cpp:
3742         (WebCore::MediaRecorder::getPrivateImpl):
3743
3744 2018-12-18  Justin Michaud  <justin_michaud@apple.com>
3745
3746         Update CSS Properties and Values API to use new cycle fallback behaviour
3747         https://bugs.webkit.org/show_bug.cgi?id=192800
3748
3749         Reviewed by Antti Koivisto.
3750
3751         Make CSS variables that are registered and involved in a cycle be treated as invalid. This also fixes a crash in the
3752         wpt tests where relative units and calc() in a registered property's initial value would break things instead of failing. 
3753
3754         * css/CSSCustomPropertyValue.h:
3755         * css/CSSVariableReferenceValue.cpp:
3756         (WebCore::resolveVariableReference):
3757         * css/DOMCSSRegisterCustomProperty.cpp:
3758         (WebCore::DOMCSSRegisterCustomProperty::registerProperty):
3759         * css/StyleResolver.cpp:
3760         (WebCore::StyleResolver::applyCascadedCustomProperty):
3761         * css/parser/CSSPropertyParser.cpp:
3762         (WebCore::CSSPropertyParser::parseTypedCustomPropertyValue):
3763
3764 2018-12-18  Daniel Bates  <dabates@apple.com>
3765
3766         Wrong value for key property in keydown and keyup events generated holding Control key
3767         https://bugs.webkit.org/show_bug.cgi?id=192788
3768         <rdar://problem/46795214>
3769
3770         Reviewed by Wenson Hsieh.
3771
3772         Similar to what we do on Mac, compute the DOM key property from the characters ignoring
3773         modifier keys input string when the Control key is held down.
3774
3775         * platform/ios/PlatformEventFactoryIOS.mm:
3776         (WebCore::keyForKeyEvent):
3777         * platform/mac/PlatformEventFactoryMac.mm:
3778         (WebCore::keyForKeyEvent):
3779
3780 2018-12-18  Sihui Liu  <sihui_liu@apple.com>
3781
3782         Clean up IndexedDB files between tests
3783         https://bugs.webkit.org/show_bug.cgi?id=192796
3784
3785         Reviewed by Geoffrey Garen.
3786
3787         We should clean up the IndexedDB files between tests to make sure each test is independent of others.
3788
3789         This patch also fixes some issues in IDB.
3790
3791         Covered by existing tests.
3792
3793         * Modules/indexeddb/server/IDBServer.cpp:
3794         (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesModifiedSince):
3795         We should shut down all open databases instead of databases from open database connections before deleting 
3796         files, because database starts accessing files before connection to database is established.
3797
3798         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3799         (WebCore::IDBServer::UniqueIDBDatabase::shutdownForClose):
3800         We should shutdown database after tasks in queue are completed, because tasks have pointer of UniqueIDBDatabase 
3801         and UniqueIDBDatabase can be destructed after shutdown.
3802
3803         (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
3804         didDeleteBackingStore can be posted to main thread after immediateCloseForUserDelete, and timer should not be 
3805         invoked during the hard close.
3806
3807         (WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
3808         Tasks like didOpenBackingStore could be posted from database thread to main thread after 
3809         immediateCloseForUserDelete, but we know the backing store will be deleted soon, so no need to handle any 
3810         database operation. 
3811
3812         (WebCore::IDBServer::UniqueIDBDatabase::performPrefetchCursor):
3813         performPrefetchCursor needs to be aware of whether UniqueIDBDatabase is being closed, so that it will not access 
3814         m_backingStore when m_backingStore may already be deleted. 
3815
3816         (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):
3817         immediateCloseForUserDelete does not handle transactions that are in the process of commit or abort. 
3818         m_objectStoreTransactionCounts and m_objectStoreWriteTransactions may be used by those transactions in 
3819         transactionCompleted, so they do not need to be cleared here.
3820
3821 2018-12-18  Myles C. Maxfield  <mmaxfield@apple.com>
3822
3823         Thick overlines and line-throughs grow in the wrong direction
3824         https://bugs.webkit.org/show_bug.cgi?id=192264
3825
3826         Reviewed by Dean Jackson.
3827
3828         Overlines should grow upward, and line-throughs should stay centered.
3829
3830         Test: fast/css3-text/css3-text-decoration/text-decoration-thicknes-overline-grow-direction.html
3831
3832         * rendering/TextDecorationPainter.cpp:
3833         (WebCore::TextDecorationPainter::paintTextDecoration):
3834         * style/InlineTextBoxStyle.cpp:
3835         (WebCore::visualOverflowForDecorations):
3836
3837 2018-12-18  Ryosuke Niwa  <rniwa@webkit.org>
3838
3839         Some iOS app crash in FrameLoader::checkCompleted
3840         https://bugs.webkit.org/show_bug.cgi?id=192804
3841         <rdar://problem/44240573>
3842
3843         Reviewed by Tim Horton.
3844
3845         It's possible for the main thread to call into WebCore / UIWebView selectors while Web thread
3846         is trying to send a delegate message. Disable the release assertion while this is happening
3847         so that iOS app would not crash.
3848
3849         Unfortunately no new test as there is no way to easily test UIWebView in iOS,
3850         and this requires a race between the web thread & the main thread.
3851
3852         * dom/ScriptDisallowedScope.h:
3853         (WebCore::ScriptDisallowedScope::InMainThread::isScriptAllowed):
3854         * platform/ios/wak/WebCoreThread.h:
3855         * platform/ios/wak/WebCoreThread.mm:
3856         (WebThreadDelegateMessageScope::WebThreadDelegateMessageScope):
3857         (WebThreadDelegateMessageScope::~WebThreadDelegateMessageScope):
3858         (SendDelegateMessage):
3859
3860 2018-12-18  David Kilzer  <ddkilzer@apple.com>
3861
3862         clang-tidy: Use const reference for MediaTime parameter to prevent object copy
3863         <https://webkit.org/b/192814>
3864
3865         Reviewed by Mark Lam.
3866
3867         * bindings/js/JSDOMConvertNumbers.h:
3868         (WebCore::JSConverter<IDLUnrestrictedDouble>::convert):
3869
3870 2018-12-18  Justin Fan  <justin_fan@apple.com>
3871
3872         [WebGPU] BindGroupLayout and Device::createBindGroupLayout
3873         https://bugs.webkit.org/show_bug.cgi?id=192817
3874
3875         Reviewed by Dean Jackson.
3876
3877         Update bind-group-layouts to test new functionality.
3878
3879         Implement the emtpy WebGPUBindGroupLayout interface, and enable creation via WebGPUDevice::createBindGroupLayout:
3880         * Modules/webgpu/WebGPUBindGroupLayout.cpp: Added.
3881         (WebCore::WebGPUBindGroupLayout::create):
3882         (WebCore::WebGPUBindGroupLayout::WebGPUBindGroupLayout):
3883         * Modules/webgpu/WebGPUBindGroupLayout.h: Added.
3884         * Modules/webgpu/WebGPUBindGroupLayout.idl: Added. Empty interface for now.
3885         * Modules/webgpu/WebGPUDevice.cpp:
3886         (WebCore::WebGPUDevice::createBindGroupLayout const): Added.
3887         * Modules/webgpu/WebGPUDevice.h:
3888         * Modules/webgpu/WebGPUDevice.idl:
3889         * platform/graphics/gpu/GPUBindGroupLayout.cpp: Added.
3890         (WebCore::GPUBindGroupLayout::tryCreate):
3891         (WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
3892         * platform/graphics/gpu/GPUBindGroupLayout.h: Added.
3893         * platform/graphics/gpu/GPUDevice.cpp:
3894         (WebCore::GPUDevice::tryCreateBindGroupLayout const): Added.
3895         * platform/graphics/gpu/GPUDevice.h:
3896
3897         Add files and symbols to project:
3898         * CMakeLists.txt:
3899         * DerivedSources.make:
3900         * Sources.txt:
3901         * WebCore.xcodeproj/project.pbxproj:
3902         * bindings/js/WebCoreBuiltinNames.h:
3903
3904         Missing includes that were previously provided via UnifiedSources:
3905         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
3906         * platform/sql/SQLiteFileSystem.h:
3907
3908 2018-12-18  Youenn Fablet  <youenn@apple.com>
3909
3910         Make ReadableStreamXX constructs use PrivateIdentifier
3911         https://bugs.webkit.org/show_bug.cgi?id=192771
3912
3913         Reviewed by Chris Dumez.
3914
3915         PrivateIdentifier is a better name for making sure a given construct does not show up in the global scope.
3916         Covered by existing binding tests.
3917
3918         * Modules/streams/ReadableByteStreamController.idl:
3919         * Modules/streams/ReadableStreamBYOBReader.idl:
3920         * Modules/streams/ReadableStreamBYOBRequest.idl:
3921         * Modules/streams/ReadableStreamDefaultController.idl:
3922         * Modules/streams/ReadableStreamDefaultReader.idl:
3923         * bindings/scripts/CodeGeneratorJS.pm:
3924         (NeedsConstructorProperty):
3925         * bindings/scripts/preprocess-idls.pl:
3926         (shouldExposeInterface):
3927         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: Removed.
3928         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h: Removed.
3929         * bindings/scripts/test/TestCustomConstructor.idl: Removed.
3930
3931 2018-12-18  Zalan Bujtas  <zalan@apple.com>
3932
3933         Synchronous media query evaluation could destroy current Frame/FrameView.
3934         https://bugs.webkit.org/show_bug.cgi?id=192781
3935         <rdar://problem/34416793>
3936
3937         Reviewed by Chris Dumez.
3938
3939         Protect Frame and FrameView when coming back from printing and check if the current Frame/FrameView/FrameLoader objects are still valid.
3940
3941         Test: printing/print-with-media-query-destory.html
3942
3943         * loader/DocumentLoader.cpp:
3944         (WebCore::DocumentLoader::finishedLoading):
3945         * page/Frame.cpp:
3946         (WebCore::Frame::setPrinting):
3947         * page/FrameView.cpp:
3948         (WebCore::FrameView::forceLayoutForPagination):
3949
3950 2018-12-18  Joseph Pecoraro  <pecoraro@apple.com>
3951
3952         Web Inspector: m3u8 content not shown, it should be text
3953         https://bugs.webkit.org/show_bug.cgi?id=192731
3954         <rdar://problem/46747728>
3955
3956         Reviewed by Devin Rousso.
3957
3958         * inspector/NetworkResourcesData.cpp:
3959         (WebCore::NetworkResourcesData::setResourceContent):
3960         Don't clobber data if setting empty content on a resource that has content.
3961
3962         * inspector/agents/InspectorNetworkAgent.cpp:
3963         (WebCore::InspectorNetworkAgent::shouldTreatAsText):
3964         Additional non-"text/" mime types that can be treated as text.
3965
3966         * platform/MIMETypeRegistry.cpp:
3967         (WebCore::MIMETypeRegistry::isTextMediaPlaylistMIMEType):
3968         * platform/MIMETypeRegistry.h:
3969         Detect media playlist mime types that are text (m3u8/m3u).
3970
3971 2018-12-18  Daniel Bates  <dabates@apple.com>
3972
3973         Remove <meta http-equiv=set-cookie> support
3974         https://bugs.webkit.org/show_bug.cgi?id=185077
3975         <rdar://problem/41791397>
3976
3977         Reviewed by Brent Fulgham.
3978
3979         Remove support for the HTTP-equiv. pragma Set-Cookie to set a cookie. In <https://github.com/whatwg/html/pull/3649>
39