1 2019-01-08 Dean Jackson <dino@apple.com>
3 Blob references for System Previews don't get a correct file extension
4 https://bugs.webkit.org/show_bug.cgi?id=193268
5 <rdar://problem/47133037>
7 Reviewed by Tim Horton.
9 Apple platforms don't yet have a mapping from the USD MIME type to
10 file extensions (and we support some non-standard MIME types), which
11 means that downloads from Blob references don't get correctly named.
13 Fix this by adding an explicit mapping between System Preview types
16 WebKit API test: _WKDownload.SystemPreviewUSDZBlobNaming
18 * platform/MIMETypeRegistry.cpp:
19 (WebCore::MIMETypeRegistry::isSystemPreviewMIMEType): Remove USE(SYSTEM_PREVIEW) since
20 this applies to macOS and iOS now.
21 * platform/MIMETypeRegistry.h:
22 * platform/cocoa/MIMETypeRegistryCocoa.mm:
23 (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType): Add a mapping
26 2019-01-08 Tim Horton <timothy_horton@apple.com>
28 Editable images sometimes don't become focused when tapped
29 https://bugs.webkit.org/show_bug.cgi?id=193259
30 <rdar://problem/47038424>
32 Reviewed by Wenson Hsieh.
34 Often when tapping an editable image inside an editable text area, the
35 text area's selection will change instead of focusing the editable image.
37 No new tests; I have had no luck writing a test that reliably failed
38 beforehand (the "sometimes" is a problem).
40 * html/HTMLImageElement.cpp:
41 (WebCore::HTMLImageElement::defaultEventHandler):
42 * html/HTMLImageElement.h:
43 Override mousedown on editable images, focus the image, and prevent
46 2019-01-08 Jiewen Tan <jiewen_tan@apple.com>
48 [WebAuthN] Support U2F HID Authenticators on macOS
49 https://bugs.webkit.org/show_bug.cgi?id=191535
50 <rdar://problem/47102027>
52 Reviewed by Brent Fulgham.
54 This patch changes U2fCommandConstructor to produce register commands with
55 enforcing test of user presence. Otherwise, authenticators would silently
56 generate credentials. It also renames readFromU2fSignResponse to
59 Tests: http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https.html
60 http/wpt/webauthn/public-key-credential-create-failure-u2f.https.html
61 http/wpt/webauthn/public-key-credential-create-success-u2f.https.html
62 http/wpt/webauthn/public-key-credential-get-failure-u2f-silent.https.html
63 http/wpt/webauthn/public-key-credential-get-failure-u2f.https.html
64 http/wpt/webauthn/public-key-credential-get-success-u2f.https.html
66 * Modules/webauthn/fido/U2fCommandConstructor.cpp:
67 (fido::WebCore::constructU2fRegisterCommand):
68 * Modules/webauthn/fido/U2fResponseConverter.cpp:
69 (fido::readU2fSignResponse):
70 (fido::readFromU2fSignResponse): Deleted.
71 * Modules/webauthn/fido/U2fResponseConverter.h:
73 2019-01-08 Wenson Hsieh <wenson_hsieh@apple.com>
75 [iOS] Dispatch a synthetic mousedown event prior to starting drags
76 https://bugs.webkit.org/show_bug.cgi?id=193229
77 <rdar://problem/46717097>
79 Reviewed by Tim Horton.
81 Tweaks some drag initiation logic on iOS to actually send a "mousedown" event to the page prior to drag start.
82 This improves drag and drop compatibility with web pages that expect a mousedown to always precede dragging.
83 Additionally, ensure that preventing the "mousedown" event also prevents "dragstart", which matches macOS
86 Test: DragAndDropTests.PreventingMouseDownShouldPreventDragStart
88 * page/EventHandler.cpp:
90 Make the text drag delay 0 on iOS. This was introduced on iOS when originally bringing up drag and drop, and was
91 made to simply match macOS. However, it doesn't make sense to respect the delay here, since the purpose of this
92 delay is to disambiguate between making a text selection and starting a drag when pressing on text that is
93 already selected; on iOS (including iOSMac), this gesture conflict is already resolved by platform gesture
94 recognizers in the client layer, so there is always no delay between mouse down and drag here.
96 * page/ios/EventHandlerIOS.mm:
98 Dispatch a mousedown and inspect the value of `m_mouseDownMayStartDrag` when starting a drag on iOS. This brings
99 our behavior closer in line with macOS.
101 (WebCore::EventHandler::tryToBeginDataInteractionAtPoint):
103 2019-01-08 Youenn Fablet <youenn@apple.com>
105 service worker fetch handler results in bad referrer
106 https://bugs.webkit.org/show_bug.cgi?id=188248
107 <rdar://problem/47050478>
109 Reviewed by Alex Christensen.
111 Response sanitization was removing the ReferrerPolicy header from opaque redirect responses.
112 Reduce sanitization of opaque redirect responses to opaque responses and allow Location header.
113 Make sure referrer policy is updated for all load redirections, not only CORS loads.
115 Test: http/tests/security/referrer-policy-redirect-link-downgrade.html
117 * loader/SubresourceLoader.cpp:
118 (WebCore::SubresourceLoader::checkRedirectionCrossOriginAccessControl):
119 * platform/network/ResourceResponseBase.cpp:
120 (WebCore::isSafeCrossOriginResponseHeader):
121 (WebCore::ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingToTainting):
123 2019-01-08 Youenn Fablet <youenn@apple.com>
125 IDB storage of Crypto keys does not work in private browsing mode
126 https://bugs.webkit.org/show_bug.cgi?id=193219
128 Reviewed by Brady Eidson.
130 https://trac.webkit.org/changeset/238677 moved from using a JSGlobalObject to a JSDOMGlobalObject for serialization/deserialization.
131 This does not work for crypto keys as they require not only a JSDOMGlobalObject but either a window or worker global object.
133 To fix the issue, revert 238677, and fix it by checking whether the dumping of an ArrayBuffer happens for a JSDOMGlobalObject or a JSGlobalObject.
134 If it is the latter, use JSC routines instead of toJS() which requires a JSDOMGlobalObject.
136 Covered by updated test.
138 * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
139 (WebCore::IDBServer::UniqueIDBDatabase::databaseThreadVM):
140 (WebCore::IDBServer::UniqueIDBDatabase::databaseThreadExecState):
141 * bindings/js/JSDOMGlobalObject.cpp:
142 * bindings/js/JSDOMGlobalObject.h:
143 * bindings/js/JSDOMWrapper.cpp:
144 (WebCore::JSDOMObject::JSDOMObject):
145 * bindings/js/SerializedScriptValue.cpp:
146 (WebCore::CloneSerializer::dumpArrayBufferView):
147 (WebCore::CloneSerializer::toJSArrayBuffer):
149 2019-01-08 Justin Fan <justin_fan@apple.com>
151 [WebGPU] Update createRenderPipeline for WebGPUPipelineLayout
152 https://bugs.webkit.org/show_bug.cgi?id=193247
154 Reviewed by Dean Jackson.
156 Add WebGPUPipelineLayout to WebGPURenderPipeline via WebGPUPipelineDescriptorBase.
158 Test: Updated render-pipelines.html to test new functionality.
160 * Modules/webgpu/WebGPUDevice.cpp:
161 (WebCore::WebGPUDevice::createRenderPipeline const): Convert WebGPUPipelineLayout to GPUPipelineLayout.
162 * Modules/webgpu/WebGPUPipelineDescriptorBase.h:
163 * Modules/webgpu/WebGPUPipelineDescriptorBase.idl: Add layout field.
164 * Modules/webgpu/WebGPUPipelineLayout.h:
165 (WebCore::WebGPUPipelineLayout::pipelineLayout): Added. Getter.
166 * platform/graphics/gpu/GPUPipelineDescriptorBase.h: Updated from out-of-date version.
167 * platform/graphics/gpu/GPUPipelineLayout.cpp:
168 (WebCore::GPUPipelineLayout::GPUPipelineLayout): Now retains bindGroupLayouts from descriptor.
169 * platform/graphics/gpu/GPUPipelineLayout.h:
170 * platform/graphics/gpu/GPURenderPipelineDescriptor.h: Now inherits from GPUPipelineDescriptorBase.
171 (WebCore::GPURenderPipelineDescriptor::GPURenderPipelineDescriptor): Custom constructor for non-aggregate struct.
173 2019-01-08 Chris Dumez <cdumez@apple.com>
175 Prevent cross-site top-level navigations from third-party iframes
176 https://bugs.webkit.org/show_bug.cgi?id=193076
177 <rdar://problem/36074736>
179 Reviewed by Alex Christensen.
181 Prevent cross-site top-level navigations from third-party iframes if the following conditions are met:
182 1. Its tries to navigate the top-level page cross-site (different eTDL+1)
183 2. The user has never interacted with the third-party iframe or any of its subframes
185 This experiment's intent is to block suspicious main-frame navigations by third-party content. The feature
186 is behind a runtime experimental feature flag, on by default.
188 Tests: http/tests/security/allow-top-level-navigations-by-third-party-iframes-to-same-origin.html
189 http/tests/security/allow-top-level-navigations-by-third-party-iframes-with-previous-user-activation.html
190 http/tests/security/allow-top-level-navigations-by-third-party-iframes-with-user-activation.html
191 http/tests/security/block-top-level-navigations-by-third-party-iframes.html
194 (WebCore::printNavigationErrorMessage):
195 (WebCore::Document::canNavigate):
196 (WebCore::Document::canNavigateInternal):
197 (WebCore::Document::isNavigationBlockedByThirdPartyIFrameRedirectBlocking):
199 * dom/UserGestureIndicator.cpp:
200 * page/DOMWindow.cpp:
201 (WebCore::DOMWindow::setLocation):
205 (WebCore::Location::replace):
206 (WebCore::Location::setLocation):
207 * page/Settings.yaml:
209 2019-01-08 Alex Christensen <achristensen@webkit.org>
211 Stop using NetworkStorageSession in WebProcess
212 https://bugs.webkit.org/show_bug.cgi?id=193236
214 Reviewed by Don Olmstead.
216 No change in behavior. Some code was only used for ResourceHandle, which isn't used in modern WebKit,
217 and for cookies, which are handled in the NetworkProcess in modern WebKit.
219 * loader/CookieJar.cpp:
220 (WebCore::storageSession):
221 * loader/EmptyClients.cpp:
222 * platform/network/NetworkingContext.h:
223 * platform/network/mac/ResourceHandleMac.mm:
224 (WebCore::ResourceHandle::createNSURLConnection):
225 (WebCore::ResourceHandle::start):
226 (WebCore::ResourceHandle::platformLoadResourceSynchronously):
227 (WebCore::ResourceHandle::willSendRequest):
228 (WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication):
229 (WebCore::ResourceHandle::receivedCredential):
231 2019-01-08 Alex Christensen <achristensen@webkit.org>
233 Unreviewed, rolling out r239727.
239 "Stop using NetworkStorageSession in WebProcess"
240 https://bugs.webkit.org/show_bug.cgi?id=193236
241 https://trac.webkit.org/changeset/239727
243 2019-01-08 Alex Christensen <achristensen@webkit.org>
245 Stop using NetworkStorageSession in WebProcess
246 https://bugs.webkit.org/show_bug.cgi?id=193236
248 Reviewed by Don Olmstead.
250 No change in behavior. Some code was only used for ResourceHandle, which isn't used in modern WebKit,
251 and for cookies, which are handled in the NetworkProcess in modern WebKit.
253 * loader/CookieJar.cpp:
254 (WebCore::storageSession):
255 * loader/EmptyClients.cpp:
256 * platform/network/NetworkingContext.h:
257 * platform/network/mac/ResourceHandleMac.mm:
258 (WebCore::ResourceHandle::createNSURLConnection):
259 (WebCore::ResourceHandle::start):
260 (WebCore::ResourceHandle::platformLoadResourceSynchronously):
261 (WebCore::ResourceHandle::willSendRequest):
262 (WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication):
263 (WebCore::ResourceHandle::receivedCredential):
265 2019-01-08 Chris Dumez <cdumez@apple.com>
267 Regression(PSON-r239182): Blank view when navigating back and forth between google.com and stack overflow
268 https://bugs.webkit.org/show_bug.cgi?id=193224
269 <rdar://problem/47097726>
271 Reviewed by Alex Christensen.
273 Since r239182, pages get suspended in-place when we suspend the old process after a process-swap on navigation.
274 When we return to a suspended page, we load the current history item again and it normally properly restores
275 the page from PageCache, even though we load the same history item and the current one and even though the
276 page is suspended in-place (i.e. we did not navigate away, which is the usual case for page cache).
278 The issue is that if the page URL contains a fragment, FrameLoader::shouldPerformFragmentNavigation() would
279 return true because both the source and destination URLs (which are the same) contains a fragment. To address
280 the issue, update FrameLoader::shouldPerformFragmentNavigation() to return false if the current page is
283 * loader/FrameLoader.cpp:
284 (WebCore::FrameLoader::shouldPerformFragmentNavigation):
286 2019-01-08 Alex Christensen <achristensen@webkit.org>
288 Move Windows-specific code from NetworkStorageSessionCFNet.cpp to its own file
289 https://bugs.webkit.org/show_bug.cgi?id=192958
291 Reviewed by Yusuke Suzuki.
293 This makes it easier to reason about what code is used where.
295 * PlatformAppleWin.cmake:
296 * platform/network/cf/NetworkStorageSessionCFNet.cpp:
297 (WebCore::createPrivateStorageSession): Deleted.
298 (WebCore::cookieDomain): Deleted.
299 (WebCore::canonicalCookieTime): Deleted.
300 (WebCore::cookieCreatedTime): Deleted.
301 (WebCore::cookieExpirationTime): Deleted.
302 (WebCore::cookieName): Deleted.
303 (WebCore::cookiePath): Deleted.
304 (WebCore::cookieValue): Deleted.
305 (WebCore::filterCookies): Deleted.
306 (WebCore::copyCookiesForURLWithFirstPartyURL): Deleted.
307 (WebCore::createCookies): Deleted.
308 (WebCore::NetworkStorageSession::setCookiesFromDOM const): Deleted.
309 (WebCore::containsSecureCookies): Deleted.
310 (WebCore::NetworkStorageSession::cookiesForDOM const): Deleted.
311 (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const): Deleted.
312 (WebCore::NetworkStorageSession::cookiesEnabled const): Deleted.
313 (WebCore::NetworkStorageSession::getRawCookies const): Deleted.
314 (WebCore::NetworkStorageSession::deleteCookie const): Deleted.
315 (WebCore::NetworkStorageSession::getHostnamesWithCookies): Deleted.
316 (WebCore::NetworkStorageSession::deleteAllCookies): Deleted.
317 (WebCore::NetworkStorageSession::deleteCookiesForHostnames): Deleted.
318 (WebCore::NetworkStorageSession::deleteAllCookiesModifiedSince): Deleted.
319 * platform/network/cf/NetworkStorageSessionCFNetWin.cpp: Added.
320 (WebCore::createPrivateStorageSession):
321 (WebCore::NetworkStorageSession::setCookies):
322 (WebCore::cookieDomain):
323 (WebCore::canonicalCookieTime):
324 (WebCore::cookieCreatedTime):
325 (WebCore::cookieExpirationTime):
326 (WebCore::cookieName):
327 (WebCore::cookiePath):
328 (WebCore::cookieValue):
329 (WebCore::filterCookies):
330 (WebCore::copyCookiesForURLWithFirstPartyURL):
331 (WebCore::createCookies):
332 (WebCore::NetworkStorageSession::setCookiesFromDOM const):
333 (WebCore::containsSecureCookies):
334 (WebCore::NetworkStorageSession::cookiesForDOM const):
335 (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const):
336 (WebCore::NetworkStorageSession::cookiesEnabled const):
337 (WebCore::NetworkStorageSession::getRawCookies const):
338 (WebCore::NetworkStorageSession::deleteCookie const):
339 (WebCore::NetworkStorageSession::getHostnamesWithCookies):
340 (WebCore::NetworkStorageSession::deleteAllCookies):
341 (WebCore::NetworkStorageSession::deleteCookiesForHostnames):
342 (WebCore::NetworkStorageSession::deleteAllCookiesModifiedSince):
344 2018-12-19 Antoine Quint <graouts@apple.com>
346 [Web Animations] Compute animation effect timing properties in batch
347 https://bugs.webkit.org/show_bug.cgi?id=192850
349 Reviewed by Dean Jackson.
351 We remove a host of functions from AnimationEffect that would allow the computation of various timing properties
352 defined by the Web Animations specification: phase, progress, current iteration, etc. Indeed, a lot of these functions
353 would call each other in a chain, and we would re-compute a lot of the earlier properties in those chains several times
354 when doing something like querying the animation progress. Additionally, some functions, such as WebAnimation::computeRelevance()
355 and WebAnimation::timeToNextTick() would yield the computation of several such properties numerous times. All of those
356 functions are called during each animation frame and are ripe for optimizations.
358 We now compute all timing properties across two functions:
360 1. the new AnimationEffect::getBasicTiming() which computes the local time, end time, active duration, active time and phase,
361 2. the existing AnimationEffect::getComputedTiming() which now also exposes the phase and simple iteration progress.
363 To support this we introduce a new BasicEffectTiming struct to contain the values computed in AnimationEffect::getBasicTiming()
364 and spun the AnimationEffect::Phase struct as AnimationEffectPhase so that it may be used across BasicEffectTiming and
365 ComputedEffectTiming.
367 No new test since there is no user-observable change.
369 * WebCore.xcodeproj/project.pbxproj:
370 * animation/AnimationEffect.cpp:
371 (WebCore::AnimationEffect::getTiming const):
372 (WebCore::AnimationEffect::getBasicTiming const):
373 (WebCore::AnimationEffect::getComputedTiming const):
374 (WebCore::AnimationEffect::localTime const): Deleted.
375 (WebCore::AnimationEffect::phase const): Deleted.
376 (WebCore::AnimationEffect::activeTime const): Deleted.
377 (WebCore::AnimationEffect::overallProgress const): Deleted.
378 (WebCore::AnimationEffect::simpleIterationProgress const): Deleted.
379 (WebCore::AnimationEffect::currentIteration const): Deleted.
380 (WebCore::AnimationEffect::currentDirection const): Deleted.
381 (WebCore::AnimationEffect::directedProgress const): Deleted.
382 (WebCore::AnimationEffect::transformedProgress const): Deleted.
383 (WebCore::AnimationEffect::iterationProgress const): Deleted.
384 (WebCore::AnimationEffect::getTiming): Deleted.
385 (WebCore::AnimationEffect::getComputedTiming): Deleted.
386 (WebCore::AnimationEffect::endTime const): Deleted.
387 (WebCore::AnimationEffect::activeDuration const): Deleted.
388 * animation/AnimationEffect.h:
389 * animation/AnimationEffectPhase.h: Copied from Source/WebCore/animation/ComputedEffectTiming.h.
390 * animation/AnimationTimeline.cpp:
391 (WebCore::AnimationTimeline::updateCSSTransitionsForElement):
392 * animation/AnimationTimeline.h:
393 * animation/BasicEffectTiming.h: Copied from Source/WebCore/animation/ComputedEffectTiming.h.
394 * animation/ComputedEffectTiming.h:
395 * animation/DeclarativeAnimation.cpp:
396 (WebCore::DeclarativeAnimation::cancel):
397 (WebCore::DeclarativeAnimation::phaseWithoutEffect const):
398 (WebCore::DeclarativeAnimation::invalidateDOMEvents):
399 * animation/DeclarativeAnimation.h:
400 * animation/KeyframeEffect.cpp:
401 (WebCore::KeyframeEffect::apply):
402 (WebCore::KeyframeEffect::getAnimatedStyle):
403 * animation/WebAnimation.cpp:
404 (WebCore::WebAnimation::effectEndTime const):
405 (WebCore::WebAnimation::computeRelevance):
406 (WebCore::WebAnimation::timeToNextTick const):
408 2019-01-07 Youenn Fablet <youenn@apple.com>
410 Crash in SWServer::Connection::resolveRegistrationReadyRequests
411 https://bugs.webkit.org/show_bug.cgi?id=193217
413 Reviewed by Chris Dumez.
415 As can be seen from the traces, SWServer might clear its connections HashMap in its destructor.
416 This might then trigger calling SWServer::resolveRegistrationReadyRequests.
417 This method is iterating on the connections HashMap which is being cleared.
418 To remove this problem, move the HashMap in a temporary variable and clear the temporary variable.
420 * workers/service/server/SWServer.cpp:
421 (WebCore::SWServer::~SWServer):
423 2019-01-07 Jer Noble <jer.noble@apple.com>
425 REGRESSION (r239519): ASSERTION FAILED: !m_adoptionIsRequired in com.apple.WebCore: void WTF::refIfNotNull<WebCore::CDMSessionMediaSourceAVFObjC> + 53
426 https://bugs.webkit.org/show_bug.cgi?id=193211
427 <rdar://problem/46937412>
429 Reviewed by Eric Carlson.
431 Make CDMSessionMediaSourceAVFObjC a CanMakeWeakPtr rather than RefCounted, as CDMSessions are stored in
432 std::unique_ptrs, and not in Ref or RefPtr.
434 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
435 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
436 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
437 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):
439 2019-01-07 David Kilzer <ddkilzer@apple.com>
441 Prefer RetainPtr<NSObject> to RetainPtr<NSObject *>
442 <https://webkit.org/b/193056>
444 Reviewed by Alex Christensen.
446 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
447 (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:]):
448 (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:withDiscontinuity:]):
449 * platform/network/cf/AuthenticationChallenge.h:
450 - Remove '*' from RetainPtr<> type.
452 * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
453 (WebCore::cookiesForURL):
454 - Once retainPtr() was changed to return RetainPtr<NSArray>
455 instead of RetainPtr<NSArray *> here, that forced the type of
456 `cookiesPtr` to change as well since
457 Optional<RetainPtr<NSArray>> is not assignable to
458 Optional<RetainPtr<NSArray *>> without further template
459 specialization, which didn't seem useful since
460 Optional<RetainPtr<>> variable types are rarely used.
462 2019-01-07 Devin Rousso <drousso@apple.com>
464 Web Inspector: extend XHR breakpoints to work with fetch
465 https://bugs.webkit.org/show_bug.cgi?id=185843
466 <rdar://problem/40431027>
468 Reviewed by Matt Baker.
470 Test: inspector/dom-debugger/url-breakpoints.html
472 * Modules/fetch/FetchResponse.cpp:
473 (WebCore::FetchResponse::fetch):
475 * inspector/InspectorInstrumentation.h:
476 (WebCore::InspectorInstrumentation::willFetch): Added.
477 * inspector/InspectorInstrumentation.cpp:
478 (WebCore::InspectorInstrumentation::willFetchImpl): Added.
480 * inspector/agents/InspectorDOMDebuggerAgent.h:
481 * inspector/agents/InspectorDOMDebuggerAgent.cpp:
482 (WebCore::InspectorDOMDebuggerAgent::disable):
483 (WebCore::InspectorDOMDebuggerAgent::discardBindings):
484 (WebCore::InspectorDOMDebuggerAgent::setURLBreakpoint): Added.
485 (WebCore::InspectorDOMDebuggerAgent::removeURLBreakpoint): Added.
486 (WebCore::InspectorDOMDebuggerAgent::breakOnURLIfNeeded): Added.
487 (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
488 (WebCore::InspectorDOMDebuggerAgent::willFetch): Added.
489 (WebCore::InspectorDOMDebuggerAgent::setXHRBreakpoint): Deleted.
490 (WebCore::InspectorDOMDebuggerAgent::removeXHRBreakpoint): Deleted.
492 2019-01-07 Eric Carlson <eric.carlson@apple.com>
494 Cleanup AudioTrackPrivateMediaStreamCocoa
495 https://bugs.webkit.org/show_bug.cgi?id=193208
496 <rdar://problem/42225870>
498 Reviewed by Youenn Fablet.
500 * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
501 (WebCore::AudioTrackPrivateMediaStreamCocoa::audioSamplesAvailable): Clear input and
502 output format descriptions after stopping the audio unit.
504 2019-01-07 Devin Rousso <drousso@apple.com>
506 Web Inspector: Network: show secure connection details per-request
507 https://bugs.webkit.org/show_bug.cgi?id=191539
508 <rdar://problem/45979891>
510 Reviewed by Joseph Pecoraro.
512 Test: http/tests/inspector/network/resource-security-connection.html
514 * platform/network/NetworkLoadMetrics.h:
515 (WebCore::NetworkLoadMetrics:isolatedCopy):
516 (WebCore::NetworkLoadMetrics:clearNonTimingData):
517 (WebCore::NetworkLoadMetrics:operator==):
518 (WebCore::NetworkLoadMetrics:encode):
519 (WebCore::NetworkLoadMetrics:decode):
521 * inspector/agents/InspectorNetworkAgent.cpp:
522 (WebCore::InspectorNetworkAgent::buildObjectForMetrics):
524 2019-01-07 Eric Carlson <eric.carlson@apple.com>
526 Deactivate audio session whenever possible
527 https://bugs.webkit.org/show_bug.cgi?id=193188
528 <rdar://problem/42678977>
530 Reviewed by Jer Noble.
532 Test: media/deactivate-audio-session.html
534 * platform/audio/AudioSession.cpp:
535 (WebCore::AudioSession::tryToSetActive):
536 (WebCore::AudioSession::tryToSetActiveInternal):
537 * platform/audio/AudioSession.h:
538 (WebCore::AudioSession::isActive const):
540 * platform/audio/PlatformMediaSessionManager.cpp:
541 (WebCore::PlatformMediaSessionManager::removeSession):
542 (WebCore::deactivateAudioSession):
543 (WebCore::PlatformMediaSessionManager::shouldDeactivateAudioSession):
544 (WebCore::PlatformMediaSessionManager::setShouldDeactivateAudioSession):
545 * platform/audio/PlatformMediaSessionManager.h:
547 * platform/audio/ios/AudioSessionIOS.mm:
548 (WebCore::AudioSession::tryToSetActiveInternal):
549 (WebCore::AudioSession::tryToSetActive): Deleted.
551 * platform/audio/mac/AudioSessionMac.cpp:
552 (WebCore::AudioSession::tryToSetActiveInternal):
553 (WebCore::AudioSession::tryToSetActive): Deleted.
555 * testing/Internals.cpp:
556 (WebCore::Internals::audioSessionActive const):
557 * testing/Internals.h:
558 * testing/Internals.idl:
560 2019-01-07 David Kilzer <ddkilzer@apple.com>
562 PlatformECKey should use a std::unique_ptr
563 <https://webkit.org/b/193170>
565 Reviewed by Brent Fulgham.
568 - Switch from using raw pointers to using std::unique_ptr<> to
570 - Introduce PlatformECKeyContainer type to handle different
571 std::unique_ptr<> types on each platform.
572 - Get rid of custom CryptoKeyEC destructors since the
573 std::unique_ptr<> handles that with a Deleter.
574 - Initialize stack variables to nullptr.
576 * crypto/gcrypt/CryptoKeyECGCrypt.cpp:
577 (WebCore::CryptoKeyEC::keySizeInBits const):
578 (WebCore::CryptoKeyEC::platformGeneratePair):
579 (WebCore::CryptoKeyEC::platformImportRaw):
580 (WebCore::CryptoKeyEC::platformImportJWKPublic):
581 (WebCore::CryptoKeyEC::platformImportJWKPrivate):
582 (WebCore::CryptoKeyEC::platformImportSpki):
583 (WebCore::CryptoKeyEC::platformImportPkcs8):
584 (WebCore::CryptoKeyEC::platformExportRaw const):
585 (WebCore::CryptoKeyEC::platformAddFieldElements const):
586 (WebCore::CryptoKeyEC::platformExportSpki const):
587 (WebCore::CryptoKeyEC::platformExportPkcs8 const):
588 (WebCore::CryptoKeyEC::~CryptoKeyEC): Deleted.
589 * crypto/keys/CryptoKeyEC.cpp:
590 (WebCore::CryptoKeyEC::CryptoKeyEC):
591 * crypto/keys/CryptoKeyEC.h:
592 (WebCore::CCECCryptorRefDeleter::operator() const):
593 * crypto/mac/CryptoKeyECMac.cpp:
594 (WebCore::CryptoKeyEC::keySizeInBits const):
595 (WebCore::CryptoKeyEC::platformGeneratePair):
596 (WebCore::CryptoKeyEC::platformImportRaw):
597 (WebCore::CryptoKeyEC::platformExportRaw const):
598 (WebCore::CryptoKeyEC::platformImportJWKPublic):
599 (WebCore::CryptoKeyEC::platformImportJWKPrivate):
600 (WebCore::CryptoKeyEC::platformAddFieldElements const):
601 (WebCore::CryptoKeyEC::platformImportSpki):
602 (WebCore::CryptoKeyEC::platformExportSpki const):
603 (WebCore::CryptoKeyEC::platformImportPkcs8):
604 (WebCore::CryptoKeyEC::platformExportPkcs8 const):
605 (WebCore::CryptoKeyEC::~CryptoKeyEC): Deleted.
607 2019-01-07 Antti Koivisto <antti@apple.com>
609 UI process side scrollbars for UI side compositing on Mac
610 https://bugs.webkit.org/show_bug.cgi?id=193106
612 Reviewed by Tim Horton.
614 * page/FrameView.cpp:
615 (WebCore::FrameView::paintScrollCorner):
616 * page/scrolling/AsyncScrollingCoordinator.cpp:
617 (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
619 Pass scrollbar host layers and the dark appearance bit to the scrolling tree.
621 * page/scrolling/ScrollingCoordinator.cpp:
622 (WebCore::ScrollingCoordinator::verticalScrollbarLayerForFrameView):
623 (WebCore::ScrollingCoordinator::horizontalScrollbarLayerForFrameView):
624 * page/scrolling/ScrollingCoordinator.h:
625 (WebCore::ScrollableAreaParameters::ScrollableAreaParameters):
626 (WebCore::ScrollableAreaParameters::operator== const):
627 * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
628 (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
629 (WebCore::ScrollingStateFrameScrollingNode::setScrollbarLayers):
630 * page/scrolling/ScrollingStateFrameScrollingNode.h:
631 * page/scrolling/ScrollingTreeFrameScrollingNode.h:
632 * page/scrolling/ScrollingTreeScrollingNode.h:
633 (WebCore::ScrollingTreeScrollingNode::scrollableAreaSize const):
634 (WebCore::ScrollingTreeScrollingNode::totalContentsSize const):
635 (WebCore::ScrollingTreeScrollingNode::useDarkAppearanceForScrollbars const):
636 (WebCore::ScrollingTreeScrollingNode::lastCommittedScrollPosition const):
637 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
638 * platform/ScrollableArea.cpp:
639 (WebCore::ScrollableArea::useDarkAppearanceForScrollbars const):
641 Factor into a function as this is used in several places.
643 * platform/ScrollableArea.h:
644 * platform/mac/NSScrollerImpDetails.h:
645 * platform/mac/ScrollAnimatorMac.mm:
646 (-[WebScrollerImpDelegate effectiveAppearanceForScrollerImp:]):
647 * platform/mac/ScrollbarThemeMac.h:
649 2019-01-07 Wenson Hsieh <wenson_hsieh@apple.com>
651 Native caret shows up alongside the page's caret when requesting desktop site on jsfiddle.net
652 https://bugs.webkit.org/show_bug.cgi?id=193180
653 <rdar://problem/45971041>
655 Reviewed by Tim Horton.
657 Adjust a method on RenderObject to additionally detect when the RenderObject is inside of an `overflow: hidden`
658 container that is also empty. See WebKit ChangeLog for more details.
660 Test: editing/selection/ios/hide-selection-in-empty-overflow-hidden-container.html
661 editing/selection/ios/show-selection-in-empty-overflow-hidden-document.html
663 * rendering/RenderObject.cpp:
664 (WebCore::RenderObject::isTransparentOrFullyClippedRespectingParentFrames const):
665 (WebCore::RenderObject::isTransparentRespectingParentFrames const): Deleted.
666 * rendering/RenderObject.h:
668 2019-01-07 Zalan Bujtas <zalan@apple.com>
670 [LFC][BFC] Margin collapsing should not be limited to in-flow non-replaced boxes.
671 https://bugs.webkit.org/show_bug.cgi?id=193183
673 Reviewed by Antti Koivisto.
675 * layout/FormattingContext.cpp:
676 (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):
677 * layout/FormattingContextGeometry.cpp:
678 (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
679 (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
680 (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
681 (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
682 (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin):
683 * layout/LayoutUnits.h:
684 * layout/blockformatting/BlockFormattingContext.cpp:
685 (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):
686 * layout/blockformatting/BlockFormattingContextGeometry.cpp:
687 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
688 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
689 * layout/blockformatting/BlockFormattingContextQuirks.cpp:
690 (WebCore::Layout::BlockFormattingContext::Quirks::stretchedHeight):
691 * layout/inlineformatting/InlineFormattingContext.cpp:
692 (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin const):
694 2019-01-07 Zalan Bujtas <zalan@apple.com>
696 [LFC][BFC] Move MarginCollapse from BlockFormattingContext::Geometry to BlockFormattingContext
697 https://bugs.webkit.org/show_bug.cgi?id=193181
699 Reviewed by Antti Koivisto.
701 This is in preparation to share margin collapsing across all boxes in block formatting context.
703 * layout/blockformatting/BlockFormattingContext.h:
704 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
705 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
706 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin):
707 * layout/blockformatting/BlockMarginCollapse.cpp:
708 (WebCore::Layout::BlockFormattingContext::MarginCollapse::computedNonCollapsedMarginBefore):
709 (WebCore::Layout::BlockFormattingContext::MarginCollapse::computedNonCollapsedMarginAfter):
710 (WebCore::Layout::BlockFormattingContext::MarginCollapse::nonCollapsedMarginBefore):
711 (WebCore::Layout::BlockFormattingContext::MarginCollapse::nonCollapsedMarginAfter):
712 (WebCore::Layout::BlockFormattingContext::MarginCollapse::collapsedMarginBeforeFromFirstChild):
713 (WebCore::Layout::BlockFormattingContext::MarginCollapse::collapsedMarginAfterFromLastChild):
714 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginAfter):
715 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore):
716 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance):
717 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginBefore):
718 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginAfter):
719 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithPreviousSibling):
720 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithNextSibling):
721 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough):
722 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBefore):
723 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfter):
724 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginBefore): Deleted.
725 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginAfter): Deleted.
726 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::nonCollapsedMarginBefore): Deleted.
727 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::nonCollapsedMarginAfter): Deleted.
728 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginBeforeFromFirstChild): Deleted.
729 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginAfterFromLastChild): Deleted.
730 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithParentMarginAfter): Deleted.
731 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore): Deleted.
732 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance): Deleted.
733 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginBefore): Deleted.
734 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginAfter): Deleted.
735 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithPreviousSibling): Deleted.
736 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithNextSibling): Deleted.
737 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginsCollapseThrough): Deleted.
738 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBefore): Deleted.
739 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfter): Deleted.
741 2019-01-07 Zan Dobersek <zdobersek@igalia.com>
743 [WPE] Use Widget bounds for PlatformScreen rectangle information
744 https://bugs.webkit.org/show_bug.cgi?id=193190
746 Reviewed by Philippe Normand.
748 Provide a better screen area estimate in screenRect() and
749 screenAvailableRect() return values than the current 1240x640 value by
750 using the Widget's bounds rectangle.
752 This approach is only factually correct when the Widget-associated view
753 is displayed in fullscreen, but it provides a better estimate even when
754 displayed in any other case as well. WPE doesn't provide specific API
755 that could enable the embedding environment to provide this information.
757 * platform/wpe/PlatformScreenWPE.cpp:
758 (WebCore::screenRect): Return bounds of the Widget object.
759 (WebCore::screenAvailableRect): Relay the call to screenRect().
761 2019-01-07 Zan Dobersek <zdobersek@igalia.com>
763 Make Gradient::gradientSpaceTransform(), Pattern::patternSpaceTransform() methods const
764 https://bugs.webkit.org/show_bug.cgi?id=193189
766 Reviewed by Philippe Normand.
768 The transform getter methods on the Gradient and Pattern classes both
769 return const references to the transform objects, and don't modify any
770 internal state. They should be marked const accordingly, allowing
771 invocations of these two methods through const references to Gradient
774 * platform/graphics/Gradient.h:
775 (WebCore::Gradient::gradientSpaceTransform): Now const.
776 * platform/graphics/Pattern.h:
777 (WebCore::Pattern::patternSpaceTransform): Now const.
779 2019-01-07 Zan Dobersek <zdobersek@igalia.com>
781 REGRESSION(r239636): ImageDecoder::setEncodedDataStatusChangeCallback() can be called on a null decoder
782 https://bugs.webkit.org/show_bug.cgi?id=193187
784 Reviewed by Philippe Normand.
786 * platform/graphics/ImageSource.cpp:
787 (WebCore::ImageSource::ensureDecoderAvailable): Bail before calling the
788 setEncodedDataStatusChangeCallback() method when the returned
789 ImageDecoder object is null.
791 2019-01-06 Zan Dobersek <zdobersek@igalia.com>
793 [Nicosia] Take over CoordinatedGraphics-named implementation of async scrolling classes
794 https://bugs.webkit.org/show_bug.cgi?id=193133
796 Reviewed by Michael Catanzaro.
798 Move the CoordinatedGraphics-specific files under
799 page/scrolling/coordinatedgraphics/ to page/scrolling/nicosia/, along
800 with renaming the files and classes accordingly. Implementation will
801 only depend on the Nicosia-specific layer structure and is not specific
802 to the CoordinatedGraphics system.
804 * PlatformPlayStation.cmake:
807 * page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp.
808 * page/scrolling/nicosia/ScrollingCoordinatorNicosia.h: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h.
809 * page/scrolling/nicosia/ScrollingStateNodeNicosia.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingStateNodeCoordinatedGraphics.cpp.
810 * page/scrolling/nicosia/ScrollingTreeFixedNode.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeFixedNode.cpp.
811 * page/scrolling/nicosia/ScrollingTreeFixedNode.h: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeFixedNode.h.
812 * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeFrameScrollingNodeCoordinatedGraphics.cpp.
813 * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeFrameScrollingNodeCoordinatedGraphics.h.
814 * page/scrolling/nicosia/ScrollingTreeNicosia.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeCoordinatedGraphics.cpp.
815 * page/scrolling/nicosia/ScrollingTreeNicosia.h: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeCoordinatedGraphics.h.
816 * page/scrolling/nicosia/ScrollingTreeStickyNode.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeStickyNode.cpp.
817 * page/scrolling/nicosia/ScrollingTreeStickyNode.h: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeStickyNode.h.
818 * platform/TextureMapper.cmake:
820 2019-01-06 Jiewen Tan <jiewen_tan@apple.com>
822 [WebAuthN] Import U2F command/response converters from Chromium
823 https://bugs.webkit.org/show_bug.cgi?id=193150
824 <rdar://problem/47054028>
826 Reviewed by Brent Fulgham.
828 This patch imports Chromium's U2F command/response converters:
829 https://fidoalliance.org/specs/fido-v2.0-id-20180227/fido-client-to-authenticator-protocol-v2.0-id-20180227.html#u2f-interoperability
830 1. It directly imports the following files and suit them to WebKit's coding style:
831 https://cs.chromium.org/chromium/src/device/fido/u2f_command_constructor.cc?l=1&rcl=db624110317d01efa78cd32e7be1524190e1beb0
832 https://cs.chromium.org/chromium/src/device/fido/u2f_command_constructor.h?rcl=db624110317d01efa78cd32e7be1524190e1beb0
833 https://cs.chromium.org/chromium/src/device/fido/u2f_command_constructor_unittest.cc?rcl=db624110317d01efa78cd32e7be1524190e1beb0
834 2. It gathers the following methods into U2fResponseConverter:
835 AuthenticatorMakeCredentialResponse::CreateFromU2fRegisterResponse()
836 AuthenticatorGetAssertionResponse::CreateFromU2fSignResponse()
837 3. It also updates FidoConstants.h, FidoTestData.h and CtapResponseTest.cpp accordingly.
839 Besides importing stuff from Chroimum, it also gathers a bunch of constants and helper functions into WebAuthenticationConstants.h
840 and WebAuthenticationUtils.h. It also fixes Bug 183534: 2) and 7).
842 Covered by API tests.
844 * Modules/webauthn/AuthenticatorCoordinator.cpp:
845 (WebCore::AuthenticatorCoordinatorInternal::produceClientDataJsonHash):
846 * Modules/webauthn/WebAuthenticationConstants.h: Copied from Source/WebCore/Modules/webauthn/COSEConstants.h.
847 * Modules/webauthn/WebAuthenticationUtils.cpp: Added.
848 (WebCore::convertBytesToVector):
849 (WebCore::produceRpIdHash):
850 (WebCore::encodeES256PublicKeyAsCBOR):
851 (WebCore::buildAttestedCredentialData):
852 (WebCore::buildAuthData):
853 (WebCore::buildAttestationObject):
854 * Modules/webauthn/WebAuthenticationUtils.h: Renamed from Source/WebCore/Modules/webauthn/COSEConstants.h.
855 * Modules/webauthn/fido/DeviceResponseConverter.cpp:
856 (fido::getCredentialId):
857 (fido::readCTAPGetInfoResponse):
858 * Modules/webauthn/fido/FidoConstants.h:
859 * Modules/webauthn/fido/U2fCommandConstructor.cpp: Added.
860 (fido::WebCore::constructU2fRegisterCommand):
861 (fido::WebCore::constructU2fSignCommand):
862 (fido::isConvertibleToU2fRegisterCommand):
863 (fido::isConvertibleToU2fSignCommand):
864 (fido::convertToU2fRegisterCommand):
865 (fido::convertToU2fCheckOnlySignCommand):
866 (fido::convertToU2fSignCommand):
867 (fido::constructBogusU2fRegistrationCommand):
868 * Modules/webauthn/fido/U2fCommandConstructor.h: Added.
869 * Modules/webauthn/fido/U2fResponseConverter.cpp: Added.
870 (fido::WebCore::extractECPublicKeyFromU2fRegistrationResponse):
871 (fido::WebCore::extractCredentialIdFromU2fRegistrationResponse):
872 (fido::WebCore::createAttestedCredentialDataFromU2fRegisterResponse):
873 (fido::WebCore::parseX509Length):
874 (fido::WebCore::createFidoAttestationStatementFromU2fRegisterResponse):
875 (fido::readU2fRegisterResponse):
876 (fido::readFromU2fSignResponse):
877 * Modules/webauthn/fido/U2fResponseConverter.h: Added.
878 * Modules/webgpu/WebGPUCommandBuffer.cpp:
880 * WebCore.xcodeproj/project.pbxproj:
882 2019-01-06 David Kilzer <ddkilzer@apple.com>
884 Leak of WTF::Function objects in WebCore::CryptoKeyRSA::generatePair() (64-80 bytes each) in com.apple.WebKit.WebContent running WebKit layout tests
885 <https://webkit.org/b/193177>
886 <rdar://problem/47072196>
888 Reviewed by Saam Barati.
890 * crypto/mac/CryptoKeyRSAMac.cpp:
891 (WebCore::CryptoKeyRSA::generatePair): Fix the leak by changing
892 raw pointers to heap-allocated __block variables to hold the
893 WTF::Function objects until they are consumed within the block
894 passed to dispatch_async(). The __block variables act like
895 captured variables in a C++ lambda and have the same lifetime as
896 the block that they are captured in. Note that we would have to
897 convert the source file from C++ to Objective-C++ to use a C++
898 lambda functor with dispatch_async(), which creates its own
899 issue because the comipiler requires a copy constructor to
900 convert the C++ lambda to a block functor, but the copy
901 constructor for the C++ lambda is implicitly deleted because the
902 WTF::Function copy constructor is explicitly deleted. Whew!
904 2019-01-06 Pablo Saavedra <psaavedra@igalia.com>
906 [WPE][GTK] Building with ENABLE_VIDEO=OFF fails trying to use Document MediaPlayback functions.
907 https://bugs.webkit.org/show_bug.cgi?id=193174
909 Reviewed by Michael Catanzaro.
912 (WebCore::Page::stopAllMediaPlayback):
913 (WebCore::Page::suspendAllMediaPlayback):
914 (WebCore::Page::resumeAllMediaPlayback):
916 2019-01-05 David Kilzer <ddkilzer@apple.com>
918 Leak of two CCRSACryptorRef (4.0 Kbytes/1 page each) in com.apple.WebKit.WebContent running WebKit layout tests
919 <https://webkit.org/b/193154>
920 <rdar://problem/47052993>
922 Reviewed by Brent Fulgham.
925 - Fix leaks by switching from using raw pointers to using
927 - Introduce PlatformRSAKeyContainer type to handle different
928 std::unique_ptr<> on each platform.
929 - Get rid of custom CryptoKeyRSA destructors since the
930 std::unique_ptr<> handles that with a Deleter.
931 - Initialize stack variables to nullptr.
933 * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
934 (WebCore::CryptoKeyRSA::create):
935 (WebCore::CryptoKeyRSA::CryptoKeyRSA):
936 (WebCore::CryptoKeyRSA::keySizeInBits const):
937 (WebCore::CryptoKeyRSA::generatePair):
938 (WebCore::CryptoKeyRSA::importSpki):
939 (WebCore::CryptoKeyRSA::importPkcs8):
940 (WebCore::CryptoKeyRSA::exportSpki const):
941 (WebCore::CryptoKeyRSA::exportPkcs8 const):
942 (WebCore::CryptoKeyRSA::algorithm const):
943 (WebCore::CryptoKeyRSA::exportData const):
944 (WebCore::CryptoKeyRSA::~CryptoKeyRSA): Deleted.
945 * crypto/keys/CryptoKeyRSA.h:
946 (WebCore::CCRSACryptorRefDeleter::operator() const):
947 * crypto/mac/CryptoKeyRSAMac.cpp:
948 (WebCore::getPublicKeyComponents):
949 (WebCore::getPrivateKeyComponents):
950 (WebCore::CryptoKeyRSA::CryptoKeyRSA):
951 (WebCore::CryptoKeyRSA::create):
952 (WebCore::CryptoKeyRSA::exportData const):
953 (WebCore::CryptoKeyRSA::generatePair):
954 (WebCore::CryptoKeyRSA::importSpki):
955 (WebCore::CryptoKeyRSA::importPkcs8):
956 (WebCore::CryptoKeyRSA::~CryptoKeyRSA): Deleted.
958 2019-01-05 Zalan Bujtas <zalan@apple.com>
960 Incorrect clipping across compositing boundary.
961 https://bugs.webkit.org/show_bug.cgi?id=193172
962 <rdar://problem/44693008>
964 Reviewed by Simon Fraser.
966 Use temporary cliprect type when crossing compositing boundary to prevent cliprect caching.
968 The issue here is that RenderLayer::backgroundClipRect() could cross compositing boundary by calling parentClipRects() which triggers
969 clip rect update using the wrong painting root. This happens when the layer hierarchy and the compositing context do not match.
970 For clip rect computation, we need to climb up on the layer hierarchy (calling parent layer's cliprect functions)
971 but we also need to make sure that the computed cliprects on any given layer are cached only when the painting root is correct.
972 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.
974 Test: compositing/clipping/cached-cliprect-with-compositing-boundary.html
976 * rendering/RenderLayer.cpp:
977 (WebCore::RenderLayer::calculateClipRects const):
979 2019-01-05 Youenn Fablet <youenn@apple.com>
981 Service Worker fetch should obey its referrer policy
982 https://bugs.webkit.org/show_bug.cgi?id=193152
984 Reviewed by Chris Dumez.
986 Pass referrer policy retrieved when fetching the service worker script to the SWServer.
987 The SWServer then stores it persistently and sends it to the manager creating service workers.
988 This manager will then set the referrer policy on the dummy Document of the corresponding service worker.
990 Covered by rebased test.
992 * workers/WorkerScriptLoader.cpp:
993 (WebCore::WorkerScriptLoader::didReceiveResponse):
994 * workers/WorkerScriptLoader.h:
995 (WebCore::WorkerScriptLoader::referrerPolicy const):
996 * workers/service/SWClientConnection.cpp:
997 (WebCore::SWClientConnection::failedFetchingScript):
998 * workers/service/ServiceWorkerContainer.cpp:
999 (WebCore::ServiceWorkerContainer::jobFinishedLoadingScript):
1000 * workers/service/ServiceWorkerContainer.h:
1001 * workers/service/ServiceWorkerContextData.cpp:
1002 (WebCore::ServiceWorkerContextData::isolatedCopy const):
1003 * workers/service/ServiceWorkerContextData.h:
1004 (WebCore::ServiceWorkerContextData::encode const):
1005 (WebCore::ServiceWorkerContextData::decode):
1006 * workers/service/ServiceWorkerFetchResult.h:
1007 (WebCore::ServiceWorkerFetchResult::encode const):
1008 (WebCore::ServiceWorkerFetchResult::decode):
1009 * workers/service/ServiceWorkerJob.cpp:
1010 (WebCore::ServiceWorkerJob::notifyFinished):
1011 * workers/service/ServiceWorkerJobClient.h:
1012 * workers/service/context/ServiceWorkerThreadProxy.cpp:
1013 (WebCore::createPageForServiceWorker):
1014 * workers/service/server/RegistrationDatabase.cpp:
1015 (WebCore::recordsTableSchema):
1016 (WebCore::RegistrationDatabase::doPushChanges):
1017 (WebCore::RegistrationDatabase::importRecords):
1018 * workers/service/server/SWServer.cpp:
1019 (WebCore::SWServer::addRegistrationFromStore):
1020 (WebCore::SWServer::updateWorker):
1021 (WebCore::SWServer::installContextData):
1022 * workers/service/server/SWServer.h:
1023 * workers/service/server/SWServerJobQueue.cpp:
1024 (WebCore::SWServerJobQueue::scriptFetchFinished):
1025 * workers/service/server/SWServerWorker.cpp:
1026 (WebCore::SWServerWorker::SWServerWorker):
1027 (WebCore::SWServerWorker::contextData const):
1028 * workers/service/server/SWServerWorker.h:
1030 2019-01-04 Simon Fraser <simon.fraser@apple.com>
1032 Factor legacy WK1 code for fixed and scrolling layers into their own helper class
1033 https://bugs.webkit.org/show_bug.cgi?id=193165
1035 Reviewed by Frédéric Wang.
1037 RenderLayerCompositor has some code to handle registration of viewport-constrained
1038 and scrolling layers which is specific to iOS WK1. To reduce pollution, move this
1039 into its own helper class called LegacyWebKitScrollingLayerCoordinator, which is only
1040 allocated for iOS WK1.
1042 iOS WK1 never has a ScrollingCoordinator, so rather than the check for scrollingCoordinator(),
1043 we know that we only made a LegacyWebKitScrollingLayerCoordinator when there's a platform widget
1046 * page/ChromeClient.h:
1047 * rendering/RenderLayerCompositor.cpp:
1048 (WebCore::RenderLayerCompositor::RenderLayerCompositor):
1049 (WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush):
1050 (WebCore::RenderLayerCompositor::didFlushChangesForLayer):
1051 (WebCore::RenderLayerCompositor::setIsInWindow):
1052 (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking): No longer check the page cache state; now we
1053 destroy the render tree of pages in the page cache, so we should never hit this code path.
1054 (WebCore::RenderLayerCompositor::didAddScrollingLayer):
1055 (WebCore::LegacyWebKitScrollingLayerCoordinator::registerAllViewportConstrainedLayers):
1056 (WebCore::LegacyWebKitScrollingLayerCoordinator::unregisterAllViewportConstrainedLayers):
1057 (WebCore::scrollbarHasDisplayNone):
1058 (WebCore::LegacyWebKitScrollingLayerCoordinator::updateScrollingLayer):
1059 (WebCore::LegacyWebKitScrollingLayerCoordinator::registerAllScrollingLayers):
1060 (WebCore::LegacyWebKitScrollingLayerCoordinator::registerScrollingLayersNeedingUpdate):
1061 (WebCore::LegacyWebKitScrollingLayerCoordinator::unregisterAllScrollingLayers):
1062 (WebCore::LegacyWebKitScrollingLayerCoordinator::addScrollingLayer):
1063 (WebCore::LegacyWebKitScrollingLayerCoordinator::removeScrollingLayer):
1064 (WebCore::LegacyWebKitScrollingLayerCoordinator::didFlushChangesForLayer):
1065 (WebCore::updateScrollingLayerWithClient): Deleted.
1066 (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers): Deleted.
1067 (WebCore::RenderLayerCompositor::unregisterAllViewportConstrainedLayers): Deleted.
1068 (WebCore::RenderLayerCompositor::registerAllScrollingLayers): Deleted.
1069 (WebCore::RenderLayerCompositor::unregisterAllScrollingLayers): Deleted.
1070 * rendering/RenderLayerCompositor.h:
1071 (WebCore::LegacyWebKitScrollingLayerCoordinator::LegacyWebKitScrollingLayerCoordinator):
1072 * workers/service/ServiceWorkerContainer.cpp:
1073 (WebCore::ServiceWorkerContainer::~ServiceWorkerContainer):
1075 2019-01-05 Zalan Bujtas <zalan@apple.com>
1077 [LFC] VerticalMargin should only have the used values.
1078 https://bugs.webkit.org/show_bug.cgi?id=193168
1080 Reviewed by Antti Koivisto.
1082 Split VerticalMargin into ComputedVerticalMargin and UsedVerticalMargin.
1083 ComputedVerticalMargin holds the computed (optional) values while UsedVerticalMargin holds both the
1084 collapsed (optional) and the non-collapsed values.
1086 * layout/FormattingContext.cpp:
1087 (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):
1088 * layout/FormattingContext.h:
1089 * layout/FormattingContextGeometry.cpp:
1090 (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
1091 (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
1092 (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
1093 (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin):
1094 (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
1095 (WebCore::Layout::FormattingContext::Geometry::computedVerticalMargin):
1096 (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedVerticalMarginValue): Deleted.
1097 * layout/FormattingContextQuirks.cpp:
1098 (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
1099 * layout/LayoutUnits.h:
1100 * layout/MarginTypes.h:
1101 (WebCore::Layout::UsedVerticalMargin::before const):
1102 (WebCore::Layout::UsedVerticalMargin::after const):
1103 (WebCore::Layout::UsedVerticalMargin::nonCollapsedValues const):
1104 (WebCore::Layout::UsedVerticalMargin::collapsedValues const):
1105 (WebCore::Layout::UsedVerticalMargin::hasCollapsedValues const):
1106 (WebCore::Layout::UsedVerticalMargin::setCollapsedValues):
1107 (WebCore::Layout::UsedVerticalMargin::UsedVerticalMargin):
1108 (WebCore::Layout::VerticalMargin::nonCollapsedValues const): Deleted.
1109 (WebCore::Layout::VerticalMargin::collapsedValues const): Deleted.
1110 (WebCore::Layout::VerticalMargin::setCollapsedValues): Deleted.
1111 (WebCore::Layout::VerticalMargin::VerticalMargin): Deleted.
1112 (WebCore::Layout::VerticalMargin::usedValues const): Deleted.
1113 * layout/blockformatting/BlockFormattingContext.cpp:
1114 (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):
1115 * layout/blockformatting/BlockFormattingContextGeometry.cpp:
1116 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
1117 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
1118 * layout/blockformatting/BlockFormattingContextQuirks.cpp:
1119 (WebCore::Layout::BlockFormattingContext::Quirks::stretchedHeight):
1120 * layout/blockformatting/BlockMarginCollapse.cpp:
1121 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginBefore):
1122 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginAfter):
1123 * layout/displaytree/DisplayBox.h:
1124 (WebCore::Display::Box::setVerticalMargin):
1125 (WebCore::Display::Box::verticalMargin const):
1126 (WebCore::Display::Box::marginBefore const):
1127 (WebCore::Display::Box::marginAfter const):
1128 * layout/floats/FloatingContext.cpp:
1129 (WebCore::Layout::FloatingContext::verticalPositionWithClearance const):
1130 * layout/inlineformatting/InlineFormattingContext.cpp:
1131 (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin const):
1133 2019-01-04 Daniel Bates <dabates@apple.com>
1135 REGRESSION (r238522): Erratic scrolling on Google flights search result page and vrbo.com
1136 https://bugs.webkit.org/show_bug.cgi?id=192996
1137 <rdar://problem/46573552>
1139 Reviewed by Simon Fraser.
1141 Only scroll a text field if its inner text size changes and it is the currently active and
1142 focused element on the page.
1144 Test: fast/scrolling/page-should-not-scroll-on-unfocused-text-field-layout.html
1146 * rendering/RenderTextControlSingleLine.cpp:
1147 (WebCore::RenderTextControlSingleLine::layout):
1149 2019-01-04 Alex Christensen <achristensen@webkit.org>
1151 Progress towards fixing Mac CMake build
1152 https://bugs.webkit.org/show_bug.cgi?id=193105
1154 Reviewed by Don Olmstead.
1156 * PlatformMac.cmake:
1159 * WebCore.xcodeproj/project.pbxproj:
1160 * platform/graphics/gpu/GPURenderPassEncoder.h:
1162 2019-01-04 Zalan Bujtas <zalan@apple.com>
1164 [iOS] ERROR: post-layout: dirty renderer(s) in WebCore::RenderTreeNeedsLayoutChecker::~RenderTreeNeedsLayoutChecker()
1165 https://bugs.webkit.org/show_bug.cgi?id=189608
1166 <rdar://problem/44473299>
1168 Reviewed by Simon Fraser.
1170 When a frameset/iframe is hidden and we skip layout, clear the dirty flag on its subtree as well.
1172 Covered by fast/frames/invalid-frameset.html.
1174 * rendering/RenderFrameSet.cpp:
1175 (WebCore::clearSiblingSubtrees):
1176 (WebCore::RenderFrameSet::positionFrames):
1177 (WebCore::RenderFrameSet::positionFramesWithFlattening):
1179 2019-01-04 Youenn Fablet <youenn@apple.com>
1181 [Fetch API] Implement abortable fetch
1182 https://bugs.webkit.org/show_bug.cgi?id=174980
1183 <rdar://problem/46861402>
1185 Reviewed by Chris Dumez.
1187 Add an AbortSignal to FetchRequest.
1189 Add support for AbortSignal algorithm.
1190 The fetch request signal is added an algorithm to abort the fetch.
1191 Update clone algorithm to let signal of the cloned request be following the origin request.
1193 Update ReadableStream error handling to return an exception instead of a string.
1194 This allows passing an AbortError instead of a TypeError as previously done.
1196 Update FetchBodyOwner to store a loading error either as an exception or as a resource error.
1197 The latter is used for passing the error from service worker back to the page.
1198 The former is used to pass it to ReadableStream or body accessors.
1200 Covered by enabled tests.
1202 * Modules/cache/DOMCache.cpp:
1203 (WebCore::DOMCache::put):
1204 * Modules/fetch/FetchBody.cpp:
1205 (WebCore::FetchBody::consumeAsStream):
1206 (WebCore::FetchBody::loadingFailed):
1207 * Modules/fetch/FetchBody.h:
1208 * Modules/fetch/FetchBodyConsumer.cpp:
1209 (WebCore::FetchBodyConsumer::loadingFailed):
1210 * Modules/fetch/FetchBodyConsumer.h:
1211 * Modules/fetch/FetchBodyOwner.cpp:
1212 (WebCore::FetchBodyOwner::arrayBuffer):
1213 (WebCore::FetchBodyOwner::blob):
1214 (WebCore::FetchBodyOwner::cloneBody):
1215 (WebCore::FetchBodyOwner::formData):
1216 (WebCore::FetchBodyOwner::json):
1217 (WebCore::FetchBodyOwner::text):
1218 (WebCore::FetchBodyOwner::loadBlob):
1219 (WebCore::FetchBodyOwner::blobLoadingFailed):
1220 (WebCore::FetchBodyOwner::consumeBodyAsStream):
1221 (WebCore::FetchBodyOwner::setLoadingError):
1222 * Modules/fetch/FetchBodyOwner.h:
1223 (WebCore::FetchBodyOwner::loadingError const):
1224 (WebCore::FetchBodyOwner::loadingException const):
1225 * Modules/fetch/FetchBodySource.cpp:
1226 (WebCore::FetchBodySource::error):
1227 * Modules/fetch/FetchBodySource.h:
1228 * Modules/fetch/FetchRequest.cpp:
1229 (WebCore::FetchRequest::initializeWith):
1230 (WebCore::FetchRequest::clone):
1231 * Modules/fetch/FetchRequest.h:
1232 (WebCore::FetchRequest::FetchRequest):
1233 * Modules/fetch/FetchRequest.idl:
1234 * Modules/fetch/FetchRequestInit.h:
1235 (WebCore::FetchRequestInit::hasMembers const):
1236 * Modules/fetch/FetchRequestInit.idl:
1237 * Modules/fetch/FetchResponse.cpp:
1238 (WebCore::FetchResponse::clone):
1239 (WebCore::FetchResponse::fetch):
1240 (WebCore::FetchResponse::BodyLoader::didFail):
1241 * Modules/fetch/FetchResponse.h:
1242 * bindings/js/ReadableStreamDefaultController.h:
1243 (WebCore::ReadableStreamDefaultController::error):
1244 * dom/AbortSignal.cpp:
1245 (WebCore::AbortSignal::abort):
1246 (WebCore::AbortSignal::follow):
1247 * dom/AbortSignal.h:
1249 2019-01-04 Brent Fulgham <bfulgham@apple.com>
1251 Parsed protocol of javascript URLs with embedded newlines and carriage returns do not match parsed protocol in Chrome and Firefox
1252 https://bugs.webkit.org/show_bug.cgi?id=193155
1253 <rdar://problem/40230982>
1255 Reviewed by Chris Dumez.
1257 Test: fast/loader/comment-only-javascript-url.html
1259 Make a special case for URLs beginning with 'javascript:'. We should always
1260 treat these as JS URLs, even if the content contained within the URL
1261 string might match other parts of the URL parsing spec.
1264 (WebCore::URLUtils<T>::protocol const):
1266 2019-01-04 Jer Noble <jer.noble@apple.com>
1268 [WebKitLegacy] Media playback pauses on scroll
1269 https://bugs.webkit.org/show_bug.cgi?id=192829
1271 Reviewed by Eric Carlson.
1274 WebKitLegacy.ScrollingDoesNotPauseMedia
1275 WKWebView.StopAllMediaPlayback
1276 WKWebView.SuspendResumeAllMediaPlayback
1278 Do not use suspendActiveDOMObjects(ReasonForSuspension::PageWillBeSuspended) to pause
1279 video. Roll back the changes to HTMLMediaElement, and introduce a new set of Page calls
1280 suspendAllMediaPlayback() & resumeAllMediaPlayback() which replaces the removed bahavior.
1283 (WebCore::Document::~Document):
1284 (WebCore::Document::stopAllMediaPlayback):
1285 (WebCore::Document::suspendAllMediaPlayback):
1286 (WebCore::Document::resumeAllMediaPlayback):
1288 * html/HTMLMediaElement.cpp:
1289 (WebCore::HTMLMediaElement::HTMLMediaElement):
1290 (WebCore::HTMLMediaElement::parseAttribute):
1291 (WebCore::HTMLMediaElement::didFinishInsertingNode):
1292 (WebCore::HTMLMediaElement::setSrcObject):
1293 (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
1294 (WebCore::HTMLMediaElement::suspend):
1295 (WebCore::HTMLMediaElement::resume):
1296 (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless const):
1297 * html/HTMLMediaElement.h:
1298 (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless const): Deleted.
1299 * html/MediaElementSession.cpp:
1300 (WebCore::MediaElementSession::playbackPermitted const):
1302 (WebCore::Page::stopAllMediaPlayback):
1303 (WebCore::Page::suspendAllMediaPlayback):
1304 (WebCore::Page::resumeAllMediaPlayback):
1306 (WebCore::Page::mediaPlaybackIsSuspended):
1307 * platform/audio/PlatformMediaSession.h:
1308 * platform/audio/PlatformMediaSessionManager.cpp:
1309 (WebCore::PlatformMediaSessionManager::suspendAllMediaPlaybackForDocument):
1310 (WebCore::PlatformMediaSessionManager::resumeAllMediaPlaybackForDocument):
1311 * platform/audio/PlatformMediaSessionManager.h:
1313 2019-01-04 Chris Dumez <cdumez@apple.com>
1315 Add support for toggling device orientation API support per site
1316 https://bugs.webkit.org/show_bug.cgi?id=193143
1317 <rdar://problem/46605724>
1319 Reviewed by Alex Christensen.
1321 Add support for toggling device orientation API support per site via _WKWebsitePolicies.
1324 (WebCore::Document::simulateDeviceOrientationChange):
1326 * loader/DocumentLoader.h:
1327 (WebCore::DocumentLoader::deviceOrientationEventEnabled const):
1328 (WebCore::DocumentLoader::setDeviceOrientationEventEnabled):
1329 * page/DOMWindow.cpp:
1330 (WebCore::DOMWindow::addEventListener):
1332 2019-01-04 Jer Noble <jer.noble@apple.com>
1334 Web Content process main thread blocked beneath ImageDecoderAVFObjC::readSamples for many seconds on imgur.com
1335 https://bugs.webkit.org/show_bug.cgi?id=191806
1336 <rdar://problem/46151477>
1338 Reviewed by Dean Jackson.
1340 Test: http/tests/images/mp4-partial-load.html
1342 Rather than use an AVAssetReaderTrackOutput, which will load both sample metadata and sample data
1343 synchronously when a sample is requested, use AVAssetReaderSampleReferenceOutput, which only loads
1344 sample metadata, including the byte offset and byte length of the sample data. By waiting until the
1345 AVAsset signals that it's own metadata is loaded, we can safely parse all the sample metadata without
1346 blocking on network loads. Once enough data is loaded, we can replace the byte reference and offset
1347 attachements in the sample with actual data, and mark the sample as "complete".
1349 Because the existing ImageSource assumes that image data parsing will occur synchronously, and that
1350 synchronous parsing could cause a hang if the metadata is not loaded, add a new callback method which
1351 allows the ImageSource to be notified when the encodedDataStatus changes. The ImageSource notifies the
1352 CacheImage, which notifies the RenderImage, and thus the asynchronous parsing will kick off the
1353 renderer's animation loop.
1355 * loader/cache/CachedImage.cpp:
1356 (WebCore::CachedImage::CachedImageObserver::encodedDataStatusChanged):
1357 (WebCore::CachedImage::encodedDataStatusChanged):
1358 * loader/cache/CachedImage.h:
1359 * platform/graphics/ImageDecoder.h:
1360 (WebCore::ImageDecoder::setEncodedDataStatusChangeCallback):
1361 * platform/graphics/ImageObserver.h:
1362 (WebCore::ImageObserver::encodedDataStatusChanged):
1363 * platform/graphics/ImageSource.cpp:
1364 (WebCore::ImageSource::ensureDecoderAvailable):
1365 (WebCore::ImageSource::encodedDataStatusChanged):
1366 (WebCore::ImageSource::frameDecodingStatusAtIndex):
1367 * platform/graphics/ImageSource.h:
1368 * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h:
1369 * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
1370 (-[WebCoreSharedBufferResourceLoaderDelegate data]):
1371 (WebCore::ImageDecoderAVFObjCSample::byteRange const):
1372 (WebCore::ImageDecoderAVFObjC::readSamples):
1373 (WebCore::ImageDecoderAVFObjC::setEncodedDataStatusChangeCallback):
1374 (WebCore::ImageDecoderAVFObjC::encodedDataStatus const):
1375 (WebCore::ImageDecoderAVFObjC::frameIsCompleteAtIndex const):
1376 (WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex):
1377 (WebCore::ImageDecoderAVFObjC::sampleIsComplete const):
1379 2019-01-04 Youenn Fablet <youenn@apple.com>
1381 CSP violation reports should bypass CSP checks
1382 https://bugs.webkit.org/show_bug.cgi?id=192857
1383 <rdar://problem/46887236>
1385 Reviewed by Chris Dumez.
1387 For ping loads, pass the option to do CSP checks from PingLoader to LoaderStrategy.
1388 This new option is unused by WebKit Legacy.
1389 It is used by WebKit loader strategy to only send any CSP response header to network process
1390 in case CSP checks should be done.
1392 This option is used to disable CSP checks for Ping Loads that report CSP violations.
1394 Test: http/wpt/fetch/csp-reports-bypass-csp-checks.html
1396 * loader/LoaderStrategy.h:
1397 * loader/PingLoader.cpp:
1398 (WebCore::PingLoader::loadImage):
1399 (WebCore::PingLoader::sendPing):
1400 (WebCore::PingLoader::sendViolationReport):
1401 (WebCore::PingLoader::startPingLoad):
1402 * loader/PingLoader.h:
1403 * loader/cache/CachedResource.cpp:
1404 (WebCore::CachedResource::load):
1406 2019-01-04 Wenson Hsieh <wenson_hsieh@apple.com>
1408 [Cocoa] Merge WebEditCommandProxy::nameForEditAction and undoNameForEditAction into a single function
1409 https://bugs.webkit.org/show_bug.cgi?id=193129
1411 Reviewed by Tim Horton.
1413 Adds a new helper function that returns the undo/redo name for a given EditAction. No change in behavior.
1416 * WebCore.xcodeproj/project.pbxproj:
1417 * editing/EditAction.cpp: Copied from Source/WebKit/UIProcess/WebEditCommandProxy.cpp.
1418 (WebCore::nameForUndoRedo):
1419 * editing/EditAction.h:
1420 * editing/Editor.cpp:
1422 2019-01-03 Matt Rajca <mrajca@apple.com>
1424 Make DidPlayMediaPreventedFromPlaying autoplay event more generic.
1425 https://bugs.webkit.org/show_bug.cgi?id=193128
1428 Reviewed by Jer Noble.
1430 Today, the "DidPlayMediaPreventedFromPlaying" autoplay event is only sent for
1431 media prevented from autoplaying. It could be generalized to a "DidPlayMediaWithUserGesture"
1432 event along with a flag that indicates whether or not autoplay was actually prevented.
1433 Moreover, we can include a flag that indicates whether the media element in question
1434 is main content. Clients will then know in more cases when media was played with a user
1435 gesture, whether or not it has audio, as well as its main content status. While the main
1436 content heuristics may not be perfect, they covered the top 20 video-centric websites that
1437 this was tested with and are meant to be used by clients for data evaluation purposes.
1439 As part of this, the PlaybackWithoutUserGesture enum was renamed to AutoplayEventPlaybackState
1440 since it now also applies to cases where there is a user gesture. The
1441 `m_playbackWithoutUserGestureStartedTime` member variable was also removed in favor of
1442 `playbackStartedTime` which also covers all the cases we care about.
1444 Tests: existing API tests were updated to reflect the new names. New API tests
1445 were added for the new case in which the "DidPlayMediaWithUserGesture" event is sent.
1447 * html/HTMLMediaElement.cpp:
1448 (WebCore::convertEnumerationToString): Update to new enum cases.
1449 (WebCore::HTMLMediaElement::setReadyState): Ditto.
1450 (WebCore::HTMLMediaElement::play): Ditto.
1451 (WebCore::HTMLMediaElement::playInternal): Also cover the case where
1452 playback was not prevented but there was a user gesture.
1453 (WebCore::HTMLMediaElement::pauseInternal): Use new name.
1454 (WebCore::HTMLMediaElement::setVolume): Use new name.
1455 (WebCore::HTMLMediaElement::playbackProgressTimerFired): Dispatch the
1456 DidPlayMediaWithUserGesture event when playback was started with a user
1458 (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): Use new name.
1459 (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Ditto.
1460 (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): Ditto.
1461 (WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer): Ditto.
1462 (WebCore::HTMLMediaElement::handleAutoplayEvent): Pass along new media state.
1463 (WebCore::HTMLMediaElement::userDidInterfereWithAutoplay): Use new name.
1464 (WebCore::HTMLMediaElement::setAutoplayEventPlaybackState): Stop setting
1465 m_playbackWithoutUserGestureStartedTime in favor of using playbackStartedTime.
1466 (WebCore::HTMLMediaElement::updateShouldPlay): Use new name.
1467 (WebCore::HTMLMediaElement::setPlaybackWithoutUserGesture): Renamed.
1468 * html/HTMLMediaElement.h:
1469 (WTF::LogArgument<WebCore::HTMLMediaElement::AutoplayEventPlaybackState>::toString): Renamed from...
1470 (WTF::LogArgument<WebCore::HTMLMediaElement::PlaybackWithoutUserGesture>::toString):
1471 * html/MediaElementSession.cpp:
1472 (WebCore::MediaElementSession::isMainContentForPurposesOfAutoplayEvents const): Don't
1473 do the hit testing check for the purposes of autoplay events. It seems to fail on the
1474 basic Vimeo player due to overlapping divs.
1475 (WebCore::isElementMainContentForPurposesOfAutoplay):
1476 (WebCore::MediaElementSession::updateIsMainContent const): Keep the existing behavior
1477 here of hit testing.
1478 (WebCore::isMainContentForPurposesOfAutoplay): Renamed.
1479 * html/MediaElementSession.h:
1480 * page/AutoplayEvent.h:
1482 2019-01-04 Youenn Fablet <youenn@apple.com>
1484 Crash in WebCore::ServiceWorkerGlobalScope
1485 https://bugs.webkit.org/show_bug.cgi?id=192513
1486 <rdar://problem/46563880>
1488 Reviewed by Alex Christensen.
1490 Store the identifier in its own variable to make sure we do not use workerThread after being moved.
1492 * workers/service/ServiceWorkerGlobalScope.cpp:
1493 (WebCore::ServiceWorkerGlobalScope::skipWaiting):
1495 2019-01-04 Chris Fleizach <cfleizach@apple.com>
1497 AX: String check: "Rule" does not reflect the meaning of the <hr> html tag
1498 https://bugs.webkit.org/show_bug.cgi?id=193041
1499 <rdar://problem/46954090>
1501 Reviewed by Zalan Bujtas.
1503 * en.lproj/Localizable.strings:
1504 * platform/cocoa/LocalizedStringsCocoa.mm:
1505 (WebCore::AXHorizontalRuleDescriptionText):
1507 2019-01-04 Zalan Bujtas <zalan@apple.com>
1509 [LFC] ComputedHorizontalMargin should have optional members
1510 https://bugs.webkit.org/show_bug.cgi?id=193131
1512 Reviewed by Antti Koivisto.
1514 Split HorizontalMargin into UsedHorizontalMargin and ComputedHorizontalMargin. ComputedHorizontalMargin's members are optional.
1515 (see computed vs used values)
1517 * layout/FormattingContext.h:
1518 * layout/FormattingContextGeometry.cpp:
1519 (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
1520 (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
1521 (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
1522 (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
1523 (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
1524 (WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin):
1525 (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedHorizontalMarginValue): Deleted.
1526 * layout/LayoutUnits.h:
1527 * layout/MarginTypes.h:
1528 * layout/Verification.cpp:
1529 (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
1530 * layout/blockformatting/BlockFormattingContextGeometry.cpp:
1531 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
1532 * layout/displaytree/DisplayBox.h:
1533 (WebCore::Display::Box::setHorizontalMargin):
1534 (WebCore::Display::Box::setHorizontalComputedMargin):
1535 (WebCore::Display::Box::computedMarginStart const):
1536 (WebCore::Display::Box::computedMarginEnd const):
1537 * layout/floats/FloatAvoider.h:
1538 (WebCore::Layout::FloatAvoider::marginStart const):
1539 (WebCore::Layout::FloatAvoider::marginEnd const):
1540 * layout/inlineformatting/InlineFormattingContext.cpp:
1541 (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
1542 * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
1543 (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
1545 2019-01-04 Zalan Bujtas <zalan@apple.com>
1547 [LFC][BFC] Use computedValue and usedValue consistently
1548 https://bugs.webkit.org/show_bug.cgi?id=193059
1550 Reviewed by Antti Koivisto.
1552 https://www.w3.org/TR/CSS22/cascade.html#value-stages
1554 6.1.2 Computed values
1555 Specified values are resolved to computed values during the cascade; for example URIs are made absolute and 'em' and 'ex' units
1556 are computed to pixel or absolute lengths. Computing a value never requires the user agent to render the document...
1559 Computed values are processed as far as possible without formatting the document. Some values, however, can only be determined when the document
1560 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
1561 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
1562 dependencies into an absolute value.
1564 * layout/FormattingContext.cpp:
1565 (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const):
1566 * layout/FormattingContextGeometry.cpp:
1567 (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
1568 (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
1569 (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
1570 (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
1571 (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
1572 * layout/LayoutState.cpp:
1573 (WebCore::Layout::LayoutState::LayoutState):
1574 * layout/LayoutUnits.h:
1575 * layout/Verification.cpp:
1576 (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
1577 * layout/blockformatting/BlockFormattingContext.cpp:
1578 (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const):
1579 * layout/blockformatting/BlockFormattingContextGeometry.cpp:
1580 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
1581 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin):
1582 * layout/displaytree/DisplayBox.cpp:
1583 (WebCore::Display::Box::Box):
1584 * layout/displaytree/DisplayBox.h:
1585 (WebCore::Display::Box::setHasValidHorizontalComputedMargin):
1586 (WebCore::Display::Box::setHorizontalComputedMargin):
1587 (WebCore::Display::Box::computedMarginStart const):
1588 (WebCore::Display::Box::computedMarginEnd const):
1589 (WebCore::Display::Box::setHasValidHorizontalNonComputedMargin): Deleted.
1590 (WebCore::Display::Box::setHorizontalNonComputedMargin): Deleted.
1591 (WebCore::Display::Box::nonComputedMarginStart const): Deleted.
1592 (WebCore::Display::Box::nonComputedMarginEnd const): Deleted.
1593 * layout/floats/FloatAvoider.h:
1594 (WebCore::Layout::FloatAvoider::marginStart const):
1595 (WebCore::Layout::FloatAvoider::marginEnd const):
1596 * layout/inlineformatting/InlineFormattingContext.cpp:
1597 (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin const):
1599 2019-01-03 Zalan Bujtas <zalan@apple.com>
1601 REGRESSION: -webkit-appearance test case crashes
1602 https://bugs.webkit.org/show_bug.cgi?id=189302
1603 <rdar://problem/44143049>
1605 Reviewed by Wenson Hsieh.
1607 The painting and the layout positions of the cancel button need to match in order to be able to interact with it.
1608 This patch removes the previous position inlining attempts.
1610 Test: fast/forms/webkit-appearance-searchfield-cancel-button-crash.html
1612 * rendering/RenderThemeMac.mm:
1613 (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
1615 2019-01-03 David Kilzer <ddkilzer@apple.com>
1617 Leak of WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback (48 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
1618 <https://webkit.org/b/193122>
1619 <rdar://problem/47022987>
1621 Reviewed by Youenn Fablet.
1623 * Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp:
1624 (WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback::AddRef const):
1625 (WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback::Release const):
1626 - Remove `final` keyword so that
1627 `new rtc::RefCountedObject<RTCCertificateGeneratorCallback>()`
1629 (WebCore::LibWebRTCCertificateGenerator::generateCertificate):
1630 - To fix the leak call
1631 `new rtc::RefCountedObject<RTCCertificateGeneratorCallback>()`
1632 to create the object.
1634 2019-01-03 Simon Fraser <simon.fraser@apple.com>
1636 REGRESSION (r238090): After showing the Find banner or tab bar, hit tests are vertically offset (or painting is not offset)
1637 https://bugs.webkit.org/show_bug.cgi?id=193124
1638 rdar://problem/46755409
1640 Reviewed by Tim Horton.
1642 Top content inset feeds into scrolling tree geometry, so when it changes we need to trigger
1643 an update of the root scrolling node, which happens via RenderLayerBacking::updateGeometry().
1644 So set a dirty bit on the root layer in frameViewDidChangeSize(), which is called from the code
1645 path that runs when top content inset changes.
1647 Find banner behavior is not easily testable. platform/mac/fast/events/content-inset-hit-testing.html did not detect the regression.
1649 * rendering/RenderLayerCompositor.cpp:
1650 (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
1652 2019-01-03 Chris Dumez <cdumez@apple.com>
1654 Potential infinite recursion in isFrameFamiliarWith(Frame&, Frame&)
1655 https://bugs.webkit.org/show_bug.cgi?id=192997
1656 <rdar://problem/46217271>
1658 Reviewed by Antti Koivisto.
1660 isFrameFamiliarWith(Frame&, Frame&) was called recursively using the passed frames' openers.
1661 The issue is that a Frame can be its opener. There could also be a cycle in the opener chain.
1663 To address the issue, simplify isFrameFamiliarWith() so that it is no longer recursive. We now
1664 only check if the frames belong to the same pages or if their openers do. We no longer check
1665 openers' opener and up.
1667 Note that this function is used to check if a frame is allowed to target another. In practice,
1668 it is unlikely to be useful to navigate an opener's opener and an openee's openee.
1670 Tests: fast/dom/Window/window-open-opener-cycle.html
1671 fast/dom/Window/window-open-self-as-opener.html
1673 * page/FrameTree.cpp:
1674 (WebCore::isFrameFamiliarWith):
1676 2019-01-02 Simon Fraser <simon.fraser@apple.com>
1678 REGRESSION (r239306): Don't disable font smoothing in transparent layers on macOS Mojave and later
1679 https://bugs.webkit.org/show_bug.cgi?id=193095
1680 <rdar://problem/47014944>
1682 Reviewed by Zalan Bujtas.
1684 In r239306 we stopped making CALayers for font-smoothed text when not necessary on macOS Mojave
1685 and later. However, we still turned off smoothing for non-opaque layers (setShouldSmoothFonts(false)),
1686 which continues to affect the appearance of text.
1688 Fix by only calling setShouldSmoothFonts(false) when the OS supports font smoothing.
1690 Test: compositing/contents-format/subpixel-antialiased-text.html
1692 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
1693 (WebCore::PlatformCALayer::drawLayerContents):
1695 2019-01-02 David Kilzer <ddkilzer@apple.com>
1697 Leak of CMSampleBuffer (752 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
1698 <https://webkit.org/b/193016>
1699 <rdar://problem/46925703>
1701 Reviewed by Simon Fraser.
1703 * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
1704 (WebCore::copySampleBufferWithCurrentTimeStamp):
1705 - Change to return RetainPtr<CMSampleBufferRef>.
1706 - Check return value of CMSampleBufferCreateCopyWithNewTiming().
1707 (WebCore::MediaRecorderPrivateWriter::appendVideoSampleBuffer):
1708 - Check return value of copySampleBufferWithCurrentTimeStamp().
1709 - Fix leak by using RetainPtr<CMSampleBufferRef> returned from
1710 copySampleBufferWithCurrentTimeStamp() instead of leaking
1711 `bufferWithCurrentTime` by using retainPtr().
1712 (WebCore::createAudioFormatDescription):
1713 - Extract method from appendAudioSampleBuffer() to return
1714 RetainPtr<CMFormatDescriptionRef> after calling
1715 CMAudioFormatDescriptionCreate().
1716 - Check return value of CMAudioFormatDescriptionCreate().
1717 (WebCore::createAudioSampleBufferWithPacketDescriptions):
1718 - Extract method from appendAudioSampleBuffer() to return
1719 RetainPtr<CMSampleBufferRef> after calling
1720 CMAudioSampleBufferCreateWithPacketDescriptions().
1721 (WebCore::MediaRecorderPrivateWriter::appendAudioSampleBuffer):
1722 - Check return values of createAudioFormatDescription() and
1723 createAudioSampleBufferWithPacketDescriptions().
1724 - Fix leaks by extracting code into helper methods that return
1725 RetainPtr<> objects instead of leaking CMFormatDescriptionRef
1726 directly or leaking `sampleBuffer` by using retainPtr().
1728 2019-01-02 Wenson Hsieh <wenson_hsieh@apple.com>
1730 Add support for using the current text selection as the find string on iOS
1731 https://bugs.webkit.org/show_bug.cgi?id=193034
1732 <rdar://problem/45138739>
1734 Reviewed by Tim Horton.
1736 Add support for "TakeFindStringFromSelection" on iOS. Unlike macOS, iOS does not have a notion of a "find
1737 pasteboard" like macOS; instead, we handle this editing command by sending the selection string to the UI
1738 process, where it is exposed via WebKit SPI so that clients that present find-in-page UI (i.e. MobileSafari) are
1739 able to trigger find-in-page with this string.
1741 Test: WebKit.UseSelectionAsFindString
1743 * editing/Editor.cpp:
1744 (WebCore::Editor::canCopyExcludingStandaloneImages const):
1746 Make this helper function cross-platform.
1749 * editing/EditorCommand.cpp:
1750 (WebCore::createCommandMap):
1751 * editing/cocoa/EditorCocoa.mm:
1752 (WebCore::Editor::takeFindStringFromSelection):
1754 Move this from EditorMac to EditorCocoa, and implement it on iOS by calling into the editor client to update the
1755 find string (see WebKit/ChangeLog for more details).
1757 * editing/mac/EditorMac.mm:
1758 (WebCore::Editor::canCopyExcludingStandaloneImages): Deleted.
1759 (WebCore::Editor::takeFindStringFromSelection): Deleted.
1760 * loader/EmptyClients.cpp:
1761 * page/EditorClient.h:
1763 Add a new editor client method to send the string for find-in-page to the UI process.
1765 2019-01-02 Devin Rousso <webkit@devinrousso.com>
1767 Web Inspector: Implement `queryObjects` Command Line API
1768 https://bugs.webkit.org/show_bug.cgi?id=176766
1769 <rdar://problem/34890689>
1771 Reviewed by Joseph Pecoraro.
1773 Test: inspector/console/queryObjects.html
1775 * inspector/CommandLineAPIModuleSource.js:
1777 (CommandLineAPIImpl.prototype.queryObjects): Added.
1779 2019-01-02 Charles Vazac <cvazac@gmail.com>
1781 Fix resourcetimingbufferfull bubbles attribute
1782 https://bugs.webkit.org/show_bug.cgi?id=193087
1784 Reviewed by Chris Dumez.
1786 This change is covered by web-platform-tests [1].
1788 [1] https://github.com/web-platform-tests/wpt/blob/master/resource-timing/buffer-full-when-populate-entries.html#L20
1790 * page/Performance.cpp:
1791 (WebCore::Performance::resourceTimingBufferFullTimerFired):
1793 2019-01-02 Simon Fraser <simon.fraser@apple.com>
1795 Rename LayerScrollCoordinationRole to ScrollCoordinationRole and make an enum class
1796 https://bugs.webkit.org/show_bug.cgi?id=193010
1798 Reviewed by Zalan Bujtas.
1800 Move the enum LayerScrollCoordinationRole from RenderLayer.h to RenderLayerCompositor.h,
1801 and make it an enum class.
1803 * page/FrameView.cpp:
1804 (WebCore::FrameView::scrollLayerID const):
1805 * rendering/RenderLayer.h:
1806 * rendering/RenderLayerBacking.cpp:
1807 (WebCore::RenderLayerBacking::~RenderLayerBacking):
1808 (WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
1809 (WebCore::operator<<):
1810 * rendering/RenderLayerBacking.h:
1811 * rendering/RenderLayerCompositor.cpp:
1812 (WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus):
1813 (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers):
1814 (WebCore::scrollCoordinationRoleForNodeType):
1815 (WebCore::RenderLayerCompositor::attachScrollingNode):
1816 (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
1817 (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
1818 (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
1819 * rendering/RenderLayerCompositor.h:
1821 2019-01-02 Simon Fraser <simon.fraser@apple.com>
1823 Don't spin up a CalcParser if the current token is not a function token
1824 https://bugs.webkit.org/show_bug.cgi?id=193067
1826 Reviewed by Zalan Bujtas.
1828 Various functions in CSSPropertyParserHelpers fall back to trying to parse
1829 a calc expression if the normal parsing fails. Don't do this unless the
1830 current token is a function token, which should be slightly more efficient.
1832 * css/parser/CSSPropertyParserHelpers.cpp:
1833 (WebCore::CSSPropertyParserHelpers::consumeInteger):
1834 (WebCore::CSSPropertyParserHelpers::consumePositiveIntegerRaw):
1835 (WebCore::CSSPropertyParserHelpers::consumeNumberRaw):
1836 (WebCore::CSSPropertyParserHelpers::consumeNumber):
1837 (WebCore::CSSPropertyParserHelpers::consumeFontWeightNumber):
1838 (WebCore::CSSPropertyParserHelpers::consumeLength):
1839 (WebCore::CSSPropertyParserHelpers::consumePercent):
1840 (WebCore::CSSPropertyParserHelpers::consumeLengthOrPercent):
1841 (WebCore::CSSPropertyParserHelpers::consumeAngle):
1842 (WebCore::CSSPropertyParserHelpers::consumeAngleOrPercent):
1843 (WebCore::CSSPropertyParserHelpers::consumeTime):
1845 2019-01-02 Simon Fraser <simon.fraser@apple.com>
1847 Support css-color-4 rgb functions
1848 https://bugs.webkit.org/show_bug.cgi?id=192321
1850 Reviewed by Zalan Bujtas.
1852 Support the new rgb()/rgba() syntax described in https://drafts.csswg.org/css-color/#rgb-functions.
1853 The differences are:
1854 1. There is a new comma-free syntax, where the optional alpha is separated by a slash:
1856 rgb(128 34 56 / 50%)
1857 2. Floating point values are allowed, and rounded:
1858 rgb(128.5 34.2 56.5) becomes rgb(129 34 57)
1859 3. rgba() is a pure alias for rgb(), so these are equivalent:
1860 rgb(128 34 56 / 50%)
1861 rgba(128 34 56 / 50%)
1863 hsl()/hsla() parsing was already updated to this new syntax in r230861.
1865 Tested by tests in imported/w3c/web-platform-tests/css/css-color/
1867 * css/parser/CSSPropertyParserHelpers.cpp:
1868 (WebCore::CSSPropertyParserHelpers::clampRGBComponent):
1869 (WebCore::CSSPropertyParserHelpers::parseRGBParameters):
1870 (WebCore::CSSPropertyParserHelpers::parseColorFunction):
1872 2019-01-02 Simon Fraser <simon.fraser@apple.com>
1874 Handle calc() expressions in gradient color stops
1875 https://bugs.webkit.org/show_bug.cgi?id=193066
1876 rdar://problem/46961985
1878 Reviewed by Sam Weinig.
1880 Fix two issues that prevented calc() expressions from working in conic-gradient color stops,
1881 for the angle or percent value. First, consumeAngleOrPercent() needs to look for CalculationCategory::Percent
1882 calc values as well as angle ones.
1884 Second, CSSPrimitiveValue::isAngle() needs to use primitiveType() (which takes calc into account),
1885 just as isPx() etc do.
1887 Test: fast/gradients/conic-calc-stop-position.html
1889 * css/CSSPrimitiveValue.h:
1890 (WebCore::CSSPrimitiveValue::isAngle const):
1891 * css/parser/CSSPropertyParserHelpers.cpp:
1892 (WebCore::CSSPropertyParserHelpers::consumeAngleOrPercent):
1893 (WebCore::CSSPropertyParserHelpers::consumeGradientColorStops):
1895 2018-12-31 Keith Miller <keith_miller@apple.com>
1897 SourceProviders should use an actual URL instead of a string
1898 https://bugs.webkit.org/show_bug.cgi?id=192734
1900 Reviewed by Yusuke Suzuki.
1902 Remove ScriptSourceCode's URL member and make the url() method
1903 reference the URL on the SourceProvider. Also, avoid some
1906 Additionally, this patch fixes an existing bug in
1907 WorkletGlobalScope() that would use a ScriptSourceCode after
1910 * bindings/js/CachedScriptSourceProvider.h:
1911 (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
1912 * bindings/js/ScheduledAction.cpp:
1913 (WebCore::ScheduledAction::execute):
1914 * bindings/js/ScriptController.cpp:
1915 (WebCore::ScriptController::executeScriptInWorld):
1916 (WebCore::ScriptController::executeScript):
1917 * bindings/js/ScriptSourceCode.h:
1918 (WebCore::ScriptSourceCode::ScriptSourceCode):
1919 (WebCore::ScriptSourceCode::m_code):
1920 (WebCore::ScriptSourceCode::url const):
1921 (WebCore::ScriptSourceCode::m_url): Deleted.
1922 * dom/ScriptElement.cpp:
1923 (WebCore::ScriptElement::prepareScript):
1924 (WebCore::ScriptElement::requestModuleScript):
1925 (WebCore::ScriptElement::executePendingScript):
1926 * html/HTMLMediaElement.cpp:
1927 (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
1929 (WebCore::Frame::injectUserScriptImmediately):
1930 * workers/WorkerGlobalScope.cpp:
1931 (WebCore::WorkerGlobalScope::importScripts):
1932 * workers/WorkerThread.cpp:
1933 (WebCore::WorkerThread::workerThread):
1934 * worklets/WorkletGlobalScope.cpp:
1935 (WebCore::WorkletGlobalScope::WorkletGlobalScope):
1936 * xml/parser/XMLDocumentParserLibxml2.cpp:
1937 (WebCore::XMLDocumentParser::endElementNs):
1939 2019-01-01 Jeff Miller <jeffm@apple.com>
1941 Update user-visible copyright strings to include 2019
1942 https://bugs.webkit.org/show_bug.cgi?id=192811
1944 Reviewed by Mark Lam.
1948 2018-12-30 David Kilzer <ddkilzer@apple.com>
1950 clang-tidy: Save 8 padding bytes on WebCore::BorderEdge
1951 <https://webkit.org/b/193058>
1952 <rdar://problem/46979275>
1954 Reviewed by Yusuke Suzuki.
1956 * rendering/BorderEdge.cpp:
1957 (WebCore::BorderEdge::BorderEdge): Reorder initialization to
1958 match new instance variable order.
1959 * rendering/BorderEdge.h: Reorder instance variables to save
1962 2018-12-28 Yusuke Suzuki <yusukesuzuki@slowstart.org>
1964 [JSC] Remove one indirection in JSObject::toStringName
1965 https://bugs.webkit.org/show_bug.cgi?id=193037
1967 Reviewed by Keith Miller.
1969 Use old JSObject::toStringName function here.
1971 * bindings/js/JSDOMConstructorBase.cpp:
1972 (WebCore::JSDOMConstructorBase::className):
1973 (WebCore::JSDOMConstructorBase::toStringName):
1974 * bindings/js/JSDOMConstructorBase.h:
1975 (WebCore::JSDOMConstructorBase::className): Deleted.
1977 2018-12-27 Alex Christensen <achristensen@webkit.org>
1979 Resurrect Mac CMake build
1980 https://bugs.webkit.org/show_bug.cgi?id=192658
1982 Reviewed by Yusuke Suzuki.
1984 This makes it so JSC and most of WebCore builds.
1985 WebCore's use of ARC seems inconsistent, so I'll fix that later.
1987 * PlatformMac.cmake:
1990 2018-12-26 Jim Mason <jmason@ibinx.com>
1992 [FreeType] Restore conditional compilation logic for recent HarfBuzz refactoring
1993 https://bugs.webkit.org/show_bug.cgi?id=193036
1995 Reviewed by Michael Catanzaro.
1997 * platform/graphics/FontPlatformData.h:
1998 * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
2000 2018-12-24 Fujii Hironori <Hironori.Fujii@sony.com>
2002 Remove "using namespace std;"
2003 https://bugs.webkit.org/show_bug.cgi?id=192973
2004 <rdar://problem/46937309>
2006 Unreviewed Windows port Debug builds fix.
2008 No new tests since no behavior changes.
2010 * accessibility/win/AXObjectCacheWin.cpp:
2011 (WebCore::AXObjectCache::postPlatformNotification): Add "std::" prefix to numeric_limits in ASSERT macro.
2013 2018-12-24 Fujii Hironori <Hironori.Fujii@sony.com>
2015 Remove "using namespace std;"
2016 https://bugs.webkit.org/show_bug.cgi?id=192973
2018 Reviewed by Alex Christensen.
2020 Removed "using namespace std" statement, and use std:: prefix.
2022 No new tests since no behavior changes.
2024 * accessibility/win/AXObjectCacheWin.cpp:
2025 * platform/graphics/GraphicsContext3DPrivate.cpp:
2026 * platform/graphics/cairo/ImageBufferCairo.cpp:
2027 * platform/graphics/win/FontPlatformDataCairoWin.cpp:
2028 * platform/graphics/win/FontWin.cpp:
2029 (WebCore::FontCascade::floatWidthForComplexText const):
2030 * platform/graphics/win/GraphicsContextCGWin.cpp:
2031 * platform/graphics/win/GraphicsContextCairoWin.cpp:
2032 * platform/graphics/win/GraphicsContextDirect2D.cpp:
2033 * platform/graphics/win/GraphicsContextWin.cpp:
2034 * platform/graphics/win/SimpleFontDataCGWin.cpp:
2035 * platform/graphics/win/UniscribeController.cpp:
2036 (WebCore::UniscribeController::UniscribeController):
2037 (WebCore::UniscribeController::shapeAndPlaceItem):
2038 * platform/image-decoders/ScalableImageDecoder.cpp:
2039 * platform/text/LocaleICU.cpp:
2040 * platform/text/win/LocaleWin.cpp:
2041 * platform/win/ScrollbarThemeWin.cpp:
2042 * rendering/RenderRubyRun.cpp:
2043 (WebCore::RenderRubyRun::layoutBlock):
2044 * rendering/RenderThemeWin.cpp:
2045 (WebCore::RenderThemeWin::adjustMenuListButtonStyle const):
2046 (WebCore::RenderThemeWin::paintSearchFieldCancelButton):
2047 (WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle const):
2048 (WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle const):
2049 (WebCore::RenderThemeWin::paintSearchFieldResultsDecorationPart):
2050 (WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle const):
2051 (WebCore::RenderThemeWin::paintSearchFieldResultsButton):
2053 2018-12-24 Simon Fraser <simon.fraser@apple.com>
2055 Change ScrollingNodeType to an enum class
2056 https://bugs.webkit.org/show_bug.cgi?id=193009
2058 Reviewed by Zalan Bujtas.
2060 Change the ScrollingNodeType enum to an enum class.
2064 * page/scrolling/AsyncScrollingCoordinator.cpp:
2065 (WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
2066 * page/scrolling/ScrollingCoordinator.cpp:
2067 (WebCore::operator<<):
2068 * page/scrolling/ScrollingCoordinator.h:
2069 * page/scrolling/ScrollingStateFixedNode.cpp:
2070 (WebCore::ScrollingStateFixedNode::ScrollingStateFixedNode):
2071 * page/scrolling/ScrollingStateNode.h:
2072 (WebCore::ScrollingStateNode::isFixedNode const):
2073 (WebCore::ScrollingStateNode::isStickyNode const):
2074 (WebCore::ScrollingStateNode::isFrameScrollingNode const):
2075 (WebCore::ScrollingStateNode::isOverflowScrollingNode const):
2076 * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
2077 (WebCore::ScrollingStateOverflowScrollingNode::ScrollingStateOverflowScrollingNode):
2078 * page/scrolling/ScrollingStateStickyNode.cpp:
2079 (WebCore::ScrollingStateStickyNode::ScrollingStateStickyNode):
2080 * page/scrolling/ScrollingStateTree.cpp:
2081 (WebCore::ScrollingStateTree::createNode):
2082 (WebCore::ScrollingStateTree::attachNode):
2083 * page/scrolling/ScrollingTreeNode.h:
2084 (WebCore::ScrollingTreeNode::isFixedNode const):
2085 (WebCore::ScrollingTreeNode::isStickyNode const):
2086 (WebCore::ScrollingTreeNode::isFrameScrollingNode const):
2087 (WebCore::ScrollingTreeNode::isOverflowScrollingNode const):
2088 * page/scrolling/ScrollingTreeOverflowScrollingNode.cpp:
2089 (WebCore::ScrollingTreeOverflowScrollingNode::ScrollingTreeOverflowScrollingNode):
2090 * page/scrolling/ios/ScrollingTreeIOS.cpp:
2091 (WebCore::ScrollingTreeIOS::createScrollingTreeNode):
2092 * page/scrolling/mac/ScrollingTreeFixedNode.mm:
2093 (WebCore::ScrollingTreeFixedNode::ScrollingTreeFixedNode):
2094 * page/scrolling/mac/ScrollingTreeMac.cpp:
2095 (ScrollingTreeMac::createScrollingTreeNode):
2096 * page/scrolling/mac/ScrollingTreeStickyNode.mm:
2097 (WebCore::ScrollingTreeStickyNode::ScrollingTreeStickyNode):
2098 * platform/graphics/GraphicsLayerClient.h:
2099 * rendering/RenderLayerCompositor.cpp:
2100 (WebCore::RenderLayerCompositor::reattachSubframeScrollLayers):
2101 (WebCore::scrollCoordinationRoleForNodeType):
2102 (WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame):
2103 (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
2105 2018-12-22 Carlos Garcia Campos <cgarcia@igalia.com>
2107 [HarfBuzz] Width not correctly reported as 0 for zero font size
2108 https://bugs.webkit.org/show_bug.cgi?id=192986
2110 Reviewed by Michael Catanzaro.
2112 Fixes test fast/text/font-size-zero.html
2114 * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
2115 (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Use empty advances for glyphs when the font
2118 2018-12-20 Yusuke Suzuki <yusukesuzuki@slowstart.org>
2120 Use Ref<> as much as possible
2121 https://bugs.webkit.org/show_bug.cgi?id=192808
2123 Reviewed by Alex Christensen.
2125 * Modules/encryptedmedia/NavigatorEME.cpp:
2126 (WebCore::NavigatorEME::requestMediaKeySystemAccess):
2127 * Modules/fetch/FetchBody.cpp:
2128 (WebCore::FetchBody::bodyAsFormData const):
2129 * Modules/geolocation/Geolocation.cpp:
2130 (WebCore::Geolocation::getCurrentPosition):
2131 (WebCore::Geolocation::watchPosition):
2132 * Modules/indexeddb/IDBDatabase.cpp:
2133 (WebCore::IDBDatabase::objectStoreNames const):
2134 * Modules/indexeddb/IDBDatabase.h:
2135 * Modules/indexeddb/IDBObjectStore.cpp:
2136 (WebCore::IDBObjectStore::indexNames const):
2137 * Modules/indexeddb/IDBObjectStore.h:
2138 * Modules/indexeddb/IDBTransaction.cpp:
2139 (WebCore::IDBTransaction::scheduleOperation):
2140 * Modules/indexeddb/IDBTransaction.h:
2141 * Modules/indexeddb/client/TransactionOperation.h:
2142 (WebCore::IDBClient::createTransactionOperation):
2143 * Modules/mediastream/MediaDevices.cpp:
2144 (WebCore::MediaDevices::getUserMedia const):
2145 (WebCore::MediaDevices::getDisplayMedia const):
2146 * Modules/mediastream/UserMediaRequest.cpp:
2147 (WebCore::UserMediaRequest::create):
2148 * Modules/mediastream/UserMediaRequest.h:
2149 * Modules/webaudio/AudioParam.cpp:
2150 (WebCore::AudioParam::calculateFinalValues):
2151 * Modules/webaudio/ScriptProcessorNode.cpp:
2152 (WebCore::ScriptProcessorNode::initialize):
2153 * Modules/webdatabase/SQLStatement.cpp:
2154 (WebCore::SQLStatement::execute):
2155 * Modules/webgpu/WebGPU.cpp:
2156 (WebCore::WebGPU::requestAdapter const):
2157 * Modules/webgpu/WebGPUAdapter.cpp:
2158 (WebCore::WebGPUAdapter::create):
2159 * Modules/webgpu/WebGPUAdapter.h:
2160 * Modules/webgpu/WebGPUBuffer.cpp:
2161 (WebCore::WebGPUBuffer::create):
2162 * Modules/webgpu/WebGPUBuffer.h:
2163 * Modules/webgpu/WebGPUCommandBuffer.cpp:
2164 (WebCore::WebGPUCommandBuffer::create):
2165 (WebCore::WebGPUCommandBuffer::beginRenderPass):
2166 * Modules/webgpu/WebGPUCommandBuffer.h:
2167 * Modules/webgpu/WebGPUDevice.cpp:
2168 (WebCore::WebGPUDevice::create):
2169 (WebCore::WebGPUDevice::createBuffer const):
2170 (WebCore::WebGPUDevice::createShaderModule const):
2171 (WebCore::WebGPUDevice::createRenderPipeline const):
2172 (WebCore::WebGPUDevice::createCommandBuffer const):
2173 * Modules/webgpu/WebGPURenderPassEncoder.cpp:
2174 (WebCore::WebGPURenderPassEncoder::create):
2175 * Modules/webgpu/WebGPURenderPassEncoder.h:
2176 * Modules/webgpu/WebGPURenderPipeline.cpp:
2177 (WebCore::WebGPURenderPipeline::create):
2178 * Modules/webgpu/WebGPURenderPipeline.h:
2179 * Modules/webgpu/WebGPUShaderModule.cpp:
2180 (WebCore::WebGPUShaderModule::create):
2181 * Modules/webgpu/WebGPUShaderModule.h:
2182 * Modules/webgpu/WebGPUTexture.cpp:
2183 (WebCore::WebGPUTexture::createDefaultTextureView):
2184 * Modules/webgpu/WebGPUTextureView.cpp:
2185 (WebCore::WebGPUTextureView::create):
2186 * Modules/webgpu/WebGPUTextureView.h:
2187 * accessibility/AXObjectCache.cpp:
2188 (WebCore::AXObjectCache::rangeMatchesTextNearRange):
2189 * accessibility/atk/AXObjectCacheAtk.cpp:
2190 (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
2191 * accessibility/atk/WebKitAccessibleHyperlink.cpp:
2192 (webkitAccessibleHyperlinkGetStartIndex):
2193 (webkitAccessibleHyperlinkGetEndIndex):
2194 * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2195 (getSelectionOffsetsForObject):
2196 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2197 (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
2198 * bindings/js/JSDOMGlobalObjectTask.cpp:
2199 * bindings/js/JSDOMWindowBase.cpp:
2200 (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
2201 * bindings/js/JSWorkerGlobalScopeBase.cpp:
2202 (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
2203 * bindings/js/ScriptControllerMac.mm:
2204 (WebCore::ScriptController::createScriptInstanceForWidget):
2205 * bindings/js/SerializedScriptValue.cpp:
2206 (WebCore::CloneDeserializer::readTerminal):
2207 (WebCore::SerializedScriptValue::create):
2208 * bridge/objc/objc_instance.h:
2209 * bridge/objc/objc_instance.mm:
2210 (ObjcInstance::create):
2211 * css/CSSComputedStyleDeclaration.cpp:
2212 (WebCore::ComputedStyleExtractor::currentColorOrValidColor const):
2213 (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties):
2214 (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand):
2215 (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
2216 * css/CSSComputedStyleDeclaration.h:
2217 * css/CSSFontFaceSource.cpp:
2218 (WebCore::CSSFontFaceSource::load):
2219 * css/CSSStyleSheet.cpp:
2220 (WebCore::CSSStyleSheet::rules):
2222 (WebCore::FontFace::unicodeRange const):
2223 (WebCore::FontFace::featureSettings const):
2224 * css/InspectorCSSOMWrappers.cpp:
2225 (WebCore::InspectorCSSOMWrappers::collectFromStyleSheetContents):
2226 * css/SVGCSSComputedStyleDeclaration.cpp:
2227 (WebCore::strokeDashArrayToCSSValueList):
2228 (WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor const):
2229 * css/StyleResolver.cpp:
2230 (WebCore::StyleResolver::createFilterOperations):
2231 * css/StyleRule.cpp:
2232 (WebCore::StyleRuleBase::createCSSOMWrapper const):
2234 * dom/ChildListMutationScope.cpp:
2235 (WebCore::ChildListMutationAccumulator::getOrCreate):
2236 * dom/ChildListMutationScope.h:
2237 * dom/DocumentMarkerController.cpp:
2238 (WebCore::updateRenderedRectsForMarker):
2239 * dom/InlineStyleSheetOwner.cpp:
2240 (WebCore::InlineStyleSheetOwner::createSheet):
2241 * dom/PointerEvent.h:
2242 * dom/UserGestureIndicator.h:
2243 (WebCore::UserGestureToken::create):
2244 * editing/AlternativeTextController.cpp:
2245 (WebCore::AlternativeTextController::applyAlternativeTextToRange):
2246 (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
2247 (WebCore::AlternativeTextController::respondToUnappliedEditing):
2248 (WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
2249 (WebCore::AlternativeTextController::respondToMarkerAtEndOfWord):
2250 * editing/ApplyStyleCommand.cpp:
2251 (WebCore::ApplyStyleCommand::applyBlockStyle):
2252 (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
2253 * editing/CompositeEditCommand.cpp:
2254 (WebCore::CompositeEditCommand::targetRanges const):
2255 (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
2256 (WebCore::CompositeEditCommand::moveParagraphs):
2257 * editing/DeleteSelectionCommand.cpp:
2258 (WebCore::DeleteSelectionCommand::mergeParagraphs):
2259 * editing/Editing.cpp:
2260 (WebCore::visiblePositionForIndexUsingCharacterIterator):
2261 * editing/EditingStyle.cpp:
2262 (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
2263 (WebCore::EditingStyle::conflictsWithInlineStyleOfElement const):
2264 (WebCore::EditingStyle::prepareToApplyAt):
2265 (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
2266 (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
2267 (WebCore::EditingStyle::removeStyleFromRulesAndContext):
2268 (WebCore::extractPropertiesNotIn):
2269 * editing/Editor.cpp:
2270 (WebCore::Editor::setBaseWritingDirection):
2271 (WebCore::Editor::setComposition):
2272 * editing/EditorCommand.cpp:
2273 (WebCore::executeApplyParagraphStyle):
2274 (WebCore::executeMakeTextWritingDirectionLeftToRight):
2275 (WebCore::executeMakeTextWritingDirectionNatural):
2276 (WebCore::executeMakeTextWritingDirectionRightToLeft):
2277 * editing/FormatBlockCommand.cpp:
2278 (WebCore::FormatBlockCommand::formatRange):
2279 * editing/RemoveFormatCommand.cpp:
2280 (WebCore::RemoveFormatCommand::doApply):
2281 * editing/ReplaceRangeWithTextCommand.cpp:
2282 (WebCore::ReplaceRangeWithTextCommand::targetRanges const):
2283 * editing/ReplaceSelectionCommand.cpp:
2284 (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
2285 (WebCore::handleStyleSpansBeforeInsertion):
2286 (WebCore::ReplaceSelectionCommand::handleStyleSpans):
2287 * editing/SpellingCorrectionCommand.cpp:
2288 (WebCore::SpellingCorrectionCommand::targetRanges const):
2289 * editing/TextCheckingHelper.cpp:
2290 (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
2291 * editing/TypingCommand.cpp:
2292 (WebCore::TypingCommand::insertText):
2293 (WebCore::TypingCommand::willAddTypingToOpenCommand):
2294 * editing/VisibleUnits.cpp:
2295 (WebCore::distanceBetweenPositions):
2296 * editing/cocoa/EditorCocoa.mm:
2297 (WebCore::Editor::selectionInWebArchiveFormat):
2298 * editing/ios/DictationCommandIOS.cpp:
2299 (WebCore::DictationCommandIOS::doApply):
2300 * editing/ios/EditorIOS.mm:
2301 (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
2302 (WebCore::Editor::removeUnchangeableStyles):
2303 (WebCore::Editor::writeImageToPasteboard):
2304 * editing/mac/EditorMac.mm:
2305 (WebCore::Editor::replaceNodeFromPasteboard):
2306 (WebCore::Editor::imageInWebArchiveFormat):
2307 * editing/markup.cpp:
2308 (WebCore::styleFromMatchedRulesAndInlineDecl):
2309 (WebCore::createFragmentForTransformToFragment):
2310 * fileapi/FileReaderLoader.cpp:
2311 (WebCore::FileReaderLoader::didFinishLoading):
2312 * html/FTPDirectoryDocument.cpp:
2313 (WebCore::createTemplateDocumentData):
2314 * html/HTMLMediaElement.cpp:
2315 (WebCore::HTMLMediaElement::scheduleEvent):
2316 (WebCore::HTMLMediaElement::createMediaControls):
2317 * html/HTMLTableElement.cpp:
2318 (WebCore::HTMLTableElement::createSharedCellStyle):
2319 * html/HTMLTableElement.h:
2321 (WebCore::URLUtils<T>::origin const):
2322 * html/parser/HTMLConstructionSite.cpp:
2323 (WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface):
2324 * html/shadow/TextControlInnerElements.cpp:
2325 (WebCore::TextControlInnerElement::resolveCustomStyle):
2326 * html/track/WebVTTParser.cpp:
2327 (WebCore::WebVTTParser::createNewCue):
2328 * inspector/DOMPatchSupport.cpp:
2329 * inspector/InspectorCanvas.cpp:
2330 (WebCore::InspectorCanvas::buildInitialState):
2331 (WebCore::InspectorCanvas::buildAction):
2332 * inspector/InspectorFrontendClientLocal.cpp:
2333 (WebCore::InspectorFrontendClientLocal::openInNewTab):
2334 * inspector/InspectorStyleSheet.cpp:
2335 (WebCore::asCSSRuleList):
2336 (WebCore::InspectorStyle::styleWithProperties const):
2337 (WebCore::InspectorStyleSheet::ensureSourceData):
2338 * inspector/agents/InspectorCanvasAgent.cpp:
2339 (WebCore::InspectorCanvasAgent::didCreateCanvasRenderingContext):
2340 * inspector/agents/InspectorIndexedDBAgent.cpp:
2341 (WebCore::Inspector::keyPathFromIDBKeyPath):
2342 * inspector/agents/InspectorPageAgent.cpp:
2343 (WebCore::InspectorPageAgent::archive):
2344 * loader/EmptyClients.cpp:
2345 (WebCore::EmptyStorageNamespaceProvider::createSessionStorageNamespace):
2346 (WebCore::EmptyStorageNamespaceProvider::createLocalStorageNamespace):
2347 (WebCore::EmptyStorageNamespaceProvider::createEphemeralLocalStorageNamespace):
2348 (WebCore::EmptyStorageNamespaceProvider::createTransientLocalStorageNamespace):
2349 * loader/FrameLoader.cpp:
2350 (WebCore::FrameLoader::loadURL):
2351 (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
2352 (WebCore::FrameLoader::loadDifferentDocumentItem):
2353 * loader/WorkerThreadableLoader.cpp:
2354 (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
2355 * loader/archive/mhtml/MHTMLParser.cpp:
2356 (WebCore::MHTMLParser::addResourceToArchive):
2357 (WebCore::MHTMLParser::parseNextPart):
2358 * loader/cache/MemoryCache.cpp:
2359 (WebCore::MemoryCache::addImageToCache):
2360 (WebCore::MemoryCache::removeResourcesWithOrigin):
2361 * page/DOMWindow.cpp:
2362 (WebCore::DOMWindow::getMatchedCSSRules const):
2363 (WebCore::DOMWindow::createWindow):
2364 * page/EventHandler.cpp:
2365 (WebCore::textDistance):
2367 (WebCore::Page::userStyleSheet const):
2368 * page/animation/CSSPropertyAnimation.cpp:
2369 (WebCore::blendFilterOperations):
2370 * page/ios/FrameIOS.mm:
2371 (WebCore::Frame::initWithSimpleHTMLDocument):
2372 (WebCore::Frame::interpretationsForCurrentRoot const):
2373 * page/mac/ServicesOverlayController.mm:
2374 (WebCore::ServicesOverlayController::Highlight::fadeIn):
2375 (WebCore::ServicesOverlayController::Highlight::fadeOut):
2376 * platform/SharedBuffer.cpp:
2377 (WebCore::SharedBuffer::tryCreateArrayBuffer const):
2378 * platform/audio/HRTFElevation.cpp:
2379 (WebCore::HRTFElevation::calculateKernelsForAzimuthElevation):
2380 * platform/audio/SincResampler.cpp:
2381 (WebCore::SincResampler::consumeSource):
2382 * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
2383 (WebCore::AudioFileReader::createBus):
2384 * platform/audio/mac/AudioFileReaderMac.cpp:
2385 (WebCore::AudioFileReader::createBus):
2386 * platform/graphics/Icon.h:
2387 (WebCore::Icon::create):
2388 * platform/graphics/InbandTextTrackPrivate.h:
2389 (WebCore::InbandTextTrackPrivate::create):
2390 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2391 (WebCore::AVFWrapper::shouldWaitForLoadingOfResource):
2392 * platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.h:
2393 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2394 (WebCore::fulfillRequestWithKeyData):
2395 (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
2396 * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
2397 * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
2398 (WebCore::MediaSourcePrivateAVFObjC::create):
2399 (WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer):
2400 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
2401 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2402 (WebCore::SourceBufferPrivateAVFObjC::create):
2403 (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
2404 * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h:
2405 * platform/graphics/ca/TileController.cpp:
2406 (WebCore::TileController::createTileLayer):
2407 * platform/graphics/ca/TileController.h:
2408 * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
2409 (WebCore::CACFLayerTreeHost::acceleratedCompositingAvailable):
2410 (WebCore::CACFLayerTreeHost::create):
2411 * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
2412 (WebCore::GPUBuffer::create):
2413 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2414 (WebCore::MediaPlayerPrivateGStreamer::updateTracks):
2415 (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
2416 (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
2417 (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
2418 (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
2419 (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
2420 (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
2421 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2422 (WebCore::MediaPlayerPrivateGStreamerBase::paint):
2423 * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
2424 (WebCore::AppendPipeline::appsinkNewSample):
2425 * platform/graphics/iso/ISOProtectionSystemSpecificHeaderBox.cpp:
2426 (WebCore::ISOProtectionSystemSpecificHeaderBox::parse):
2427 * platform/graphics/iso/ISOTrackEncryptionBox.cpp:
2428 (WebCore::ISOTrackEncryptionBox::parse):
2429 * platform/graphics/texmap/TextureMapperAnimation.cpp:
2430 (WebCore::applyFilterAnimation):
2431 * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
2432 (WebCore::TextureMapperPlatformLayerBuffer::clone):
2433 * platform/graphics/transforms/TransformOperations.cpp:
2434 (WebCore::TransformOperations::blendByMatchingOperations const):
2435 * platform/image-decoders/ico/ICOImageDecoder.cpp:
2436 (WebCore::ICOImageDecoder::setDataForPNGDecoderAtIndex):
2437 * platform/mock/mediasource/MockBox.cpp:
2438 (WebCore::MockInitializationBox::MockInitializationBox):
2439 * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
2440 (WebCore::MockSourceBufferPrivate::create):
2441 (WebCore::MockSourceBufferPrivate::append):
2442 * platform/mock/mediasource/MockSourceBufferPrivate.h:
2443 * platform/mock/mediasource/MockTracks.h:
2444 (WebCore::MockTextTrackPrivate::create):
2445 (WebCore::MockVideoTrackPrivate::create):
2446 * platform/network/FormData.h:
2447 (WebCore::FormData::decode):
2448 * platform/network/cocoa/CookieStorageObserver.h:
2449 * platform/network/cocoa/CookieStorageObserver.mm:
2450 (WebCore::CookieStorageObserver::create):
2451 * platform/network/soup/ResourceRequestSoup.cpp:
2452 (WebCore::appendEncodedBlobItemToSoupMessageBody):
2453 (WebCore::ResourceRequest::updateSoupMessageBody const):
2454 * platform/text/hyphen/HyphenationLibHyphen.cpp:
2455 (WebCore::HyphenationDictionary::createNull):
2456 (WebCore::HyphenationDictionary::create):
2457 * platform/win/SearchPopupMenuWin.cpp:
2458 (WebCore::SearchPopupMenuWin::SearchPopupMenuWin):
2459 (WebCore::SearchPopupMenuWin::popupMenu):
2460 * platform/win/SearchPopupMenuWin.h:
2461 * rendering/RenderThemeIOS.mm:
2462 (WebCore::applyCommonButtonPaddingToStyle):
2463 (WebCore::RenderThemeIOS::paintProgressBar):
2464 (WebCore::RenderThemeIOS::adjustButtonStyle const):
2465 (WebCore::paintAttachmentIcon):
2466 * rendering/svg/SVGRenderTreeAsText.cpp:
2467 (WebCore::writeSVGResourceContainer):
2468 * storage/Storage.cpp:
2469 (WebCore::Storage::create):
2470 (WebCore::Storage::Storage):
2471 * storage/Storage.h:
2472 (WebCore::Storage::area const):
2473 * storage/StorageNamespace.h:
2474 * storage/StorageNamespaceProvider.cpp:
2475 (WebCore::StorageNamespaceProvider::localStorageArea):
2476 * storage/StorageNamespaceProvider.h:
2477 * svg/SVGElement.cpp:
2478 (WebCore::SVGElement::getPresentationAttribute):
2479 * svg/SVGFEBlendElement.cpp:
2480 (WebCore::SVGFEBlendElement::build):
2481 * svg/SVGFEColorMatrixElement.cpp:
2482 (WebCore::SVGFEColorMatrixElement::build):
2483 * svg/SVGFEComponentTransferElement.cpp:
2484 (WebCore::SVGFEComponentTransferElement::build):
2485 * svg/SVGFECompositeElement.cpp:
2486 (WebCore::SVGFECompositeElement::build):
2487 * svg/SVGFEDiffuseLightingElement.cpp:
2488 (WebCore::SVGFEDiffuseLightingElement::build):
2489 * svg/SVGFEDisplacementMapElement.cpp:
2490 (WebCore::SVGFEDisplacementMapElement::build):
2491 * svg/SVGFEDropShadowElement.cpp:
2492 (WebCore::SVGFEDropShadowElement::build):
2493 * svg/SVGFEGaussianBlurElement.cpp:
2494 (WebCore::SVGFEGaussianBlurElement::build):
2495 * svg/SVGFEMergeElement.cpp:
2496 (WebCore::SVGFEMergeElement::build):
2497 * svg/SVGFEMorphologyElement.cpp:
2498 (WebCore::SVGFEMorphologyElement::build):
2499 * svg/SVGFEOffsetElement.cpp:
2500 (WebCore::SVGFEOffsetElement::build):
2501 * svg/SVGFESpecularLightingElement.cpp:
2502 (WebCore::SVGFESpecularLightingElement::build):
2503 * svg/SVGFETileElement.cpp:
2504 (WebCore::SVGFETileElement::build):
2505 * testing/GCObservation.h:
2506 * xml/XSLTProcessor.cpp:
2507 (WebCore::XSLTProcessor::createDocumentFromSource):
2508 * xml/parser/XMLDocumentParser.cpp:
2509 (WebCore::XMLDocumentParser::parseDocumentFragment):
2511 2018-12-21 Chris Dumez <cdumez@apple.com>
2513 navigator.userAgent in service workers does not reflect customUserAgent set by client
2514 https://bugs.webkit.org/show_bug.cgi?id=192951
2516 Reviewed by Youenn Fablet.
2518 Whenever a service worker client registers itself, also pass its effective user agent.
2519 In the network process, for each origin, we store the latest client's user agent and
2520 use it when starting the service worker.
2523 (WebCore::Document::setServiceWorkerConnection):
2524 * loader/DocumentLoader.cpp:
2525 (WebCore::DocumentLoader::registerTemporaryServiceWorkerClient):
2526 * workers/service/SWClientConnection.h:
2527 * workers/service/server/SWServer.cpp:
2528 (WebCore::SWServer::serviceWorkerClientUserAgent const):
2529 (WebCore::SWServer::installContextData):
2530 (WebCore::SWServer::runServiceWorker):
2531 (WebCore::SWServer::registerServiceWorkerClient):
2532 * workers/service/server/SWServer.h:
2533 * workers/service/server/SWServerToContextConnection.h:
2534 * workers/service/server/SWServerWorker.cpp:
2535 (WebCore::SWServerWorker::userAgent const):
2536 * workers/service/server/SWServerWorker.h:
2538 2018-12-21 Youenn Fablet <youenn@apple.com>
2540 RTCRtpSender.setParameters() does set active parameter
2541 https://bugs.webkit.org/show_bug.cgi?id=192848
2543 Reviewed by Eric Carlson.
2545 Covered by updated test.
2547 * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
2548 (WebCore::updateRTCRtpSendParameters):
2549 The routine was updating the local value, not the out parameter.
2551 2018-12-21 Eric Carlson <eric.carlson@apple.com>
2553 'ended' Event doesn't fire on MediaStreamTrack when a USB camera is unplugged
2554 https://bugs.webkit.org/show_bug.cgi?id=187896
2555 <rdar://problem/42681445>
2557 Reviewed by Jer Noble.
2559 No new tests, tested manually.
2561 * platform/mediastream/mac/AVVideoCaptureSource.h:
2562 * platform/mediastream/mac/AVVideoCaptureSource.mm:
2563 (WebCore::AVVideoCaptureSource::deviceDisconnected):
2564 (-[WebCoreAVVideoCaptureSourceObserver addNotificationObservers]):
2565 (-[WebCoreAVVideoCaptureSourceObserver removeNotificationObservers]):
2566 (-[WebCoreAVVideoCaptureSourceObserver deviceConnectedDidChange:]):
2567 * platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
2568 (WebCore::deviceHasInputStreams):
2569 (WebCore::isValidCaptureDevice):
2570 (WebCore::CoreAudioCaptureDeviceManager::coreAudioCaptureDevices):
2571 (WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices):
2572 (WebCore::CoreAudioCaptureDeviceManager::devicesChanged): Deleted.
2573 * platform/mediastream/mac/CoreAudioCaptureDeviceManager.h:
2574 * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
2575 (WebCore::CoreAudioSharedUnit::setCaptureDevice):
2576 (WebCore::CoreAudioSharedUnit::devicesChanged):
2577 (WebCore::CoreAudioSharedUnit::startProducingData):
2578 (WebCore::CoreAudioSharedUnit::startInternal):
2579 (WebCore::CoreAudioSharedUnit::verifyIsCapturing):
2580 (WebCore::CoreAudioSharedUnit::captureFailed):
2581 (WebCore::CoreAudioCaptureSourceFactory::devicesChanged):
2582 (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):
2583 (WebCore::CoreAudioSharedUnit::setCaptureDeviceID): Deleted.
2584 * platform/mediastream/mac/CoreAudioCaptureSource.h:
2586 2018-12-20 Ryosuke Niwa <rniwa@webkit.org>
2588 REGRESSION(r239353): iOS WK1 Assertion failure in notifyChildNodeRemoved while running
2589 TestWebKitAPI.QuickLook.LegacyQuickLookContent
2590 https://bugs.webkit.org/show_bug.cgi?id=192859
2591 <rdar://problem/46887237>
2593 Reviewed by Antti Koivisto.
2595 After r239353, ScriptDisallowedScope::InMainThread::isScriptAllowed() may return false when the web thread
2596 is inside a delegate callback even when there is a ScriptDisallowedScope defined.
2598 Replace the existign debug assertions which assert !ScriptDisallowedScope::InMainThread::isScriptAllowed()
2599 by a newly added ScriptDisallowedScope::InMainThread::hasDisallowedScope to avoid hitting this assertion.
2601 Tests: TestWebKitAPI.QuickLook.LegacyQuickLookContent
2603 * dom/ContainerNodeAlgorithms.cpp:
2604 (WebCore::notifyChildNodeInserted):
2605 (WebCore::notifyChildNodeRemoved):
2607 (WebCore::Document::nodeChildrenWillBeRemoved):
2608 (WebCore::Document::nodeWillBeRemoved):
2609 * dom/ScriptDisallowedScope.h:
2610 (WebCore::ScriptDisallowedScope::InMainThread::hasDisallowedScope):
2611 * html/HTMLFormElement.cpp:
2614 2018-12-21 Joseph Pecoraro <pecoraro@apple.com>
2616 Update status of some WebCore features in features.json
2617 https://bugs.webkit.org/show_bug.cgi?id=192998
2619 Reviewed by Tim Horton.
2622 - Variation Fonts: Supported
2623 - Conic Gradients: Supported in Preview
2624 - Web Share: Supported in Preview
2625 - <datalist>: Supported in Preview
2626 - Intersection Observers: Supported in Preview
2628 2018-12-21 Zalan Bujtas <zalan@apple.com>
2630 [iOS] Using file upload can trigger a crash under RenderThemeIOS::paintFileUploadIconDecorations()
2631 https://bugs.webkit.org/show_bug.cgi?id=192357
2632 <rdar://problem/42852260>
2634 Reviewed by Simon Fraser.
2636 Do not try to paint the file picker when painting is disabled.
2638 * rendering/RenderFileUploadControl.cpp:
2639 (WebCore::RenderFileUploadControl::paintObject):
2641 2018-12-21 Jiewen Tan <jiewen_tan@apple.com>
2643 [WebAuthN] userPresence should always be true
2644 https://bugs.webkit.org/show_bug.cgi?id=192835
2645 <rdar://problem/46538788>
2647 Reviewed by Brent Fulgham.
2649 In the current spec as of 7 August 2018, userPresence is suggested to set to the inverse of userVerification.
2650 This doesn't comply with the CTAP spec. Details in: https://github.com/w3c/webauthn/issues/1123.
2651 After discussing with other members of the working group, we decided to make userPresence always default to true.
2653 Covered by exisiting tests.
2655 * Modules/webauthn/fido/DeviceRequestConverter.cpp:
2656 (fido::encodeGetAssertionRequestAsCBOR):
2658 2018-12-21 Jiewen Tan <jiewen_tan@apple.com>
2660 [WebAuthN] Import an APDU coder from Chromium
2661 https://bugs.webkit.org/show_bug.cgi?id=192949
2662 <rdar://problem/46879933>
2664 Reviewed by Brent Fulgham.
2666 This patch imports an APDU coder from Chromium. Here is the documentation:
2667 https://fidoalliance.org/specs/fido-u2f-v1.2-ps-20170411/fido-u2f-raw-message-formats-v1.2-ps-20170411.html#u2f-message-framing
2668 APDU is a binary format to frame any U2F requests/responses into binaries. It is equivalent to CBOR in CTAP2.
2670 Here is a list of files that are imported from Chromium:
2671 https://cs.chromium.org/chromium/src/components/apdu/apdu_command.cc?rcl=a2f290c10d132f53518e7f99d5635ee814ff8090
2672 https://cs.chromium.org/chromium/src/components/apdu/apdu_command.h?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
2673 https://cs.chromium.org/chromium/src/components/apdu/apdu_response.cc?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
2674 https://cs.chromium.org/chromium/src/components/apdu/apdu_response.h?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
2675 https://cs.chromium.org/chromium/src/components/apdu/apdu_unittest.cc?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
2677 Covered by API tests.
2679 * Modules/webauthn/apdu/ApduCommand.cpp: Added.
2680 (apdu::ApduCommand::createFromMessage):
2681 (apdu::ApduCommand::ApduCommand):
2682 (apdu::ApduCommand::getEncodedCommand const):
2683 * Modules/webauthn/apdu/ApduCommand.h: Added.
2684 * Modules/webauthn/apdu/ApduResponse.cpp: Added.
2685 (apdu::ApduResponse::createFromMessage):
2686 (apdu::ApduResponse::ApduResponse):
2687 (apdu::ApduResponse::getEncodedResponse const):
2688 * Modules/webauthn/apdu/ApduResponse.h: Added.
2690 * WebCore.xcodeproj/project.pbxproj:
2692 2018-12-21 Jer Noble <jer.noble@apple.com>
2694 Convert raw CDMSessionMediaSourceAVFObjC pointer in MediaPlayerPrivateMediaSourceAVFObjC
2695 https://bugs.webkit.org/show_bug.cgi?id=192985
2696 <rdar://problem/46750743>
2698 Reviewed by Eric Carlson.
2700 Make m_session a RefPtr; drive-by fix: make m_mediaElement in WebKitMediaKeys a WeakPtr.
2702 * Modules/encryptedmedia/legacy/WebKitMediaKeys.cpp:
2703 (WebCore::WebKitMediaKeys::setMediaElement):
2704 * Modules/encryptedmedia/legacy/WebKitMediaKeys.h:
2705 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
2706 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
2707 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2708 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
2709 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):
2711 2018-12-21 Justin Michaud <justin_michaud@apple.com>
2713 CSS variables don't work for colors in "border" property
2714 https://bugs.webkit.org/show_bug.cgi?id=192922
2716 Reviewed by Simon Fraser.
2718 ParseColorFunction no longer consumes anything if the color was not valid.
2720 Test: css-custom-properties-api/border-variable-parsing.html
2722 * css/parser/CSSPropertyParserHelpers.cpp:
2723 (WebCore::CSSPropertyParserHelpers::parseColorFunction):
2725 2018-12-21 Justin Fan <justin_fan@apple.com>
2727 [WebGPU] GPUBindGroupLayout refactoring: no HashMap, and failure logging
2728 https://bugs.webkit.org/show_bug.cgi?id=192990
2730 Reviewed by Myles C. Maxfield.
2732 Refactor away the unnecessary HashMaps when creating MTLArgumentEncoders in GPUBindGroupLayout creation.
2733 Also update GPUBindGroupLayout::create -> tryCreate, in order to better handle Objective-C exceptions.
2735 No new tests; no change in behavior.
2737 * Modules/webgpu/WebGPUBindGroupLayout.cpp:
2738 (WebCore::WebGPUBindGroupLayout::create):
2739 (WebCore::WebGPUBindGroupLayout::WebGPUBindGroupLayout):
2740 * Modules/webgpu/WebGPUBindGroupLayout.h:
2741 (WebCore::WebGPUBindGroupLayout::bindGroupLayout const):
2742 * Modules/webgpu/WebGPUDevice.cpp:
2743 (WebCore::WebGPUDevice::createBindGroupLayout const):
2744 * platform/graphics/gpu/GPUBindGroupLayout.h:
2745 * platform/graphics/gpu/GPUDevice.cpp:
2746 (WebCore::GPUDevice::tryCreateBindGroupLayout const): Renamed from ::create*. Now returning a RefPtr.
2747 (WebCore::GPUDevice::createBindGroupLayout const): Deleted.
2748 * platform/graphics/gpu/GPUDevice.h:
2749 * platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:
2750 (WebCore::appendArgumentToArray):
2751 (WebCore::newEncoder):
2752 (WebCore::GPUBindGroupLayout::tryCreate): Renamed from ::create. Now returning a RefPtr.
2753 (WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
2754 (WebCore::appendArgumentToArrayInMap): Deleted.
2755 (WebCore::GPUBindGroupLayout::create): Deleted.
2757 Deleted unneeded GPUBindGroupLayout.cpp:
2759 * WebCore.xcodeproj/project.pbxproj:
2760 * platform/graphics/gpu/GPUBindGroupLayout.cpp: Removed.
2762 2018-12-21 Alejandro G. Castro <alex@igalia.com>
2764 [GTK][WPE] Add DeviceIdHashSaltStorage disk persistence
2765 https://bugs.webkit.org/show_bug.cgi?id=190466
2767 Reviewed by Youenn Fablet.
2769 Added persistency to the DeviceIdHashSaltStorage.
2771 * platform/glib/FileSystemGlib.cpp:
2772 (WebCore::FileSystem::getFileSize): Implemented this function to
2773 allow sharing code with the statistics storage class.
2774 * platform/glib/KeyedDecoderGlib.cpp:
2775 (WebCore::KeyedDecoderGlib::dictionaryFromGVariant): Added a
2776 condition to control situations where the key is empty, it can
2777 happen if the user modifies the file in the disk.
2778 * Modules/indexeddb/shared/IDBResourceIdentifier.cpp: Add include
2779 to make work compilation with debug, unified builds.
2781 2018-12-21 Zalan Bujtas <zalan@apple.com>
2783 Synchronous media query evaluation could destroy current Frame/FrameView.
2784 https://bugs.webkit.org/show_bug.cgi?id=192781
2785 <rdar://problem/34416793>
2787 Reviewed by Chris Dumez.
2789 Protect Frame and FrameView when coming back from printing and check if the current Frame/FrameView/FrameLoader objects are still valid.
2791 Test: printing/print-with-media-query-destory.html
2793 * loader/DocumentLoader.cpp:
2794 (WebCore::DocumentLoader::finishedLoading):
2796 (WebCore::Frame::setPrinting):
2797 * page/FrameView.cpp:
2798 (WebCore::FrameView::forceLayoutForPagination):
2799 * page/PrintContext.cpp:
2800 (WebCore::PrintContext::PrintContext):
2801 (WebCore::PrintContext::computePageRects):
2802 (WebCore::PrintContext::computePageRectsWithPageSizeInternal):
2803 (WebCore::PrintContext::begin):
2804 (WebCore::PrintContext::computeAutomaticScaleFactor):
2805 (WebCore::PrintContext::spoolPage):
2806 (WebCore::PrintContext::spoolRect):
2807 (WebCore::PrintContext::end):
2808 * page/PrintContext.h:
2809 (WebCore::PrintContext::frame const): Deleted.
2811 2018-12-21 Wenson Hsieh <wenson_hsieh@apple.com>
2813 Setting the file wrapper and content type of an attachment to a PDF should update its image
2814 https://bugs.webkit.org/show_bug.cgi?id=192984
2815 <rdar://problem/46798028>
2817 Reviewed by Tim Horton.
2819 Allow PDF data to be used to update enclosing image elements when setting the file wrapper for an attachment.
2820 Covered by a new API test: WKAttachmentTests.SetFileWrapperForPDFImageAttachment.
2822 * html/HTMLAttachmentElement.cpp:
2823 (WebCore::mimeTypeIsSuitableForInlineImageAttachment):
2824 (WebCore::HTMLAttachmentElement::updateEnclosingImageWithData):
2826 2018-12-21 Justin Michaud <justin_michaud@apple.com>
2828 Repeated background images with zero size should display the background color
2829 https://bugs.webkit.org/show_bug.cgi?id=192962
2831 Reviewed by Antti Koivisto.
2833 Test: fast/backgrounds/background-repeat-with-zero-size.html
2835 * platform/LengthSize.h:
2836 (WebCore::LengthSize::isEmpty const):
2837 * rendering/RenderBoxModelObject.cpp:
2838 (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2839 * rendering/style/FillLayer.h:
2840 (WebCore::FillLayer::isEmpty const):
2842 2018-12-21 Manuel Rego Casasnovas <rego@igalia.com>
2844 [css-grid] Fix percentages in relative offsets for grid items
2845 https://bugs.webkit.org/show_bug.cgi?id=190492
2847 Reviewed by Sergio Villar Senin.
2849 The method RenderBoxModelObject::relativePositionOffset() was not considering the case of grid items,
2850 where the containing block is the grid area.
2851 The patch modifies the method so the new code uses overrideContainingBlockContentWidth|Height when required.
2853 Test: imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-relative-offsets-002.html
2855 * rendering/RenderBox.cpp: Implement the physical versions of the already existent methods.
2856 (WebCore::RenderBox::overrideContainingBlockContentWidth const):
2857 (WebCore::RenderBox::overrideContainingBlockContentHeight const):
2858 (WebCore::RenderBox::hasOverrideContainingBlockContentWidth const):
2859 (WebCore::RenderBox::hasOverrideContainingBlockContentHeight const):
2860 * rendering/RenderBox.h:
2861 * rendering/RenderBoxModelObject.cpp:
2862 (WebCore::RenderBoxModelObject::relativePositionOffset const): Modified method
2863 to take into account overrideContainingBlockContentWidth|Height for grid items.
2864 * rendering/RenderBoxModelObject.h: Added new headers for physical virtual methods
2865 that will be overridden in RenderBox.
2866 (WebCore::RenderBoxModelObject::overrideContainingBlockContentWidth const):
2867 (WebCore::RenderBoxModelObject::overrideContainingBlockContentHeight const):
2868 (WebCore::RenderBoxModelObject::hasOverrideContainingBlockContentWidth const):
2869 (WebCore::RenderBoxModelObject::hasOverrideContainingBlockContentHeight const):
2871 2018-12-20 Justin Fan <justin_fan@apple.com>
2873 [WebGPU] Convert WebGPUBindGroups into MTLArgumentEncoders
2874 https://bugs.webkit.org/show_bug.cgi?id=192956
2876 Reviewed by Myles Maxfield.
2878 No testable behavior change. Existing tests cover possible crashing.
2880 Add GPUBindGroupLayoutMetal.mm:
2882 * WebCore.xcodeproj/project.pbxproj:
2884 Flesh out GPUBindGroupLayout::create:
2885 * platform/graphics/gpu/GPUBindGroupLayout.cpp:
2886 * platform/graphics/gpu/GPUBindGroupLayout.h:
2887 * platform/graphics/gpu/GPUDevice.cpp:
2888 (WebCore::GPUDevice::createBindGroupLayout const):
2889 * platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm: Added.
2890 (WebCore::appendArgumentToArrayInMap): Added.
2891 (WebCore::GPUBindGroupLayout::create):
2892 (WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
2893 (WebCore::MTLDataTypeForBindingType): Added.
2895 2018-12-20 Michael Catanzaro <mcatanzaro@igalia.com>
2897 Unreviewed, remove stray #pragma once added to .cpp file
2899 * svg/properties/SVGAttributeOwnerProxy.cpp:
2901 2018-12-20 Justin Michaud <justin_michaud@apple.com>
2903 Adding runtime-enabled attribute to Element prevents inlining property access
2904 https://bugs.webkit.org/show_bug.cgi?id=192901
2906 Add a call to flattenDictionaryObject after disabling runtime-enabled attributes.
2908 Reviewed by Ryosuke Niwa.
2910 * bindings/scripts/CodeGeneratorJS.pm:
2911 (GenerateImplementation):
2912 * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
2913 (WebCore::JSTestEnabledBySettingPrototype::finishCreation):
2914 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2915 (WebCore::JSTestGenerateIsReachablePrototype::finishCreation):
2916 * bindings/scripts/test/JS/JSTestNode.cpp:
2917 (WebCore::JSTestNodePrototype::finishCreation):
2918 * bindings/scripts/test/JS/JSTestObj.cpp:
2919 (WebCore::JSTestObjPrototype::finishCreation):
2921 2018-12-20 Chris Dumez <cdumez@apple.com>
2923 Use Optional::hasValue() instead of Optional::has_value()
2924 https://bugs.webkit.org/show_bug.cgi?id=192948
2926 Reviewed by Tim Horton.
2928 * bindings/js/DOMPromiseProxy.h:
2929 (WebCore::DOMPromiseProxy<IDLType>::isFulfilled const):
2930 (WebCore::DOMPromiseProxy<IDLVoid>::isFulfilled const):
2931 (WebCore::DOMPromiseProxyWithResolveCallback<IDLType>::isFulfilled const):
2932 * dom/DataTransferItemList.h:
2933 (WebCore::DataTransferItemList::hasItems const):
2934 * dom/EventTarget.cpp:
2935 (WebCore::EventTarget::addEventListener):
2936 * html/HTMLMediaElement.cpp:
2937 (WebCore::HTMLMediaElement::captionDisplayMode):
2938 * platform/graphics/MediaPlayer.cpp:
2939 (WebCore::MediaPlayer::wouldTaintOrigin const):
2940 * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
2941 (WebCore::AppendPipeline::parseDemuxerSrcPadCaps):
2942 * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
2943 (WebCore::MediaPlayerPrivateGStreamerMSE::trackDetected):
2944 * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
2945 (webKitMediaSrcUpdatePresentationSize):
2946 * platform/mac/NSScrollerImpDetails.mm:
2947 (WebCore::ScrollerStyle::recommendedScrollerStyle):
2948 * rendering/RenderListItem.cpp:
2949 (WebCore::RenderListItem::setExplicitValue):
2951 2018-12-20 Chris Dumez <cdumez@apple.com>
2953 Move HTTPS_UPGRADE code behind a runtime flag, off by default
2954 https://bugs.webkit.org/show_bug.cgi?id=192937
2956 Reviewed by Youenn Fablet.
2958 Move HTTPS_UPGRADE code behind a runtime flag, off by default and drop the build time flag.
2960 * page/Settings.yaml:
2962 2018-12-20 Youenn Fablet <youenn@apple.com>
2964 Remove custom constructors of ReadableStreamDefaultReader and ReadableStreamBYOBReader
2965 https://bugs.webkit.org/show_bug.cgi?id=192838
2967 Reviewed by Chris Dumez.
2969 Generate constructor code in case of a Private but not Public constructor.
2970 Make sure this is correctly exposed in global objects.
2971 Add JS built-in constructor implementations for those two objects.
2973 Also add JS built-in constructors for controller and byob request.
2974 To keep existing behavior, JS built-ins calling these constructors need to pass
2975 an additional parameter that allows making the difference between a JS builtin caller or a JS caller.
2976 In the latter case, the constructor will throw.
2978 Covered by existing tests, no observable change of behavior.
2980 * Modules/streams/ReadableByteStreamController.idl:
2981 * Modules/streams/ReadableByteStreamController.js:
2982 (initializeReadableByteStreamController):
2983 (getter.byobRequest):
2984 * Modules/streams/ReadableByteStreamInternals.js:
2985 (privateInitializeReadableByteStreamController): Deleted.
2986 (privateInitializeReadableStreamBYOBRequest): Deleted.
2987 * Modules/streams/ReadableStream.js:
2988 (initializeReadableStream):
2989 * Modules/streams/ReadableStreamBYOBReader.js:
2990 (initializeReadableStreamBYOBReader):
2991 * Modules/streams/ReadableStreamBYOBRequest.idl:
2992 * Modules/streams/ReadableStreamBYOBRequest.js:
2993 (initializeReadableStreamBYOBRequest):
2994 * Modules/streams/ReadableStreamDefaultController.idl:
2995 * Modules/streams/ReadableStreamDefaultController.js:
2996 (initializeReadableStreamDefaultController):
2998 * Modules/streams/ReadableStreamDefaultReader.js:
2999 (initializeReadableStreamDefaultReader):
3000 * Modules/streams/ReadableStreamInternals.js:
3001 (readableStreamDefaultControllerError): Deleted.
3003 * UnifiedSources-input.xcfilelist:
3004 * WebCore.xcodeproj/project.pbxproj:
3005 * bindings/js/JSDOMBuiltinConstructor.h:
3006 * bindings/js/JSDOMGlobalObject.cpp:
3007 (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
3008 * bindings/js/JSReadableStreamPrivateConstructors.cpp: Removed.
3009 * bindings/js/JSReadableStreamPrivateConstructors.h: Removed.
3010 * bindings/scripts/CodeGeneratorJS.pm:
3011 (GeneratePropertiesHashTable):
3012 * bindings/scripts/preprocess-idls.pl:
3013 (shouldExposeInterface):
3015 2018-12-20 Jiewen Tan <jiewen_tan@apple.com>
3017 [WebAuthN] Remove hash from Client Data
3018 https://bugs.webkit.org/show_bug.cgi?id=192727
3019 <rdar://problem/46746673>
3021 Reviewed by Brent Fulgham.
3023 The hash algorithm for hashing the client data is enforced to SHA_256 in the latest spec:
3024 https://www.w3.org/TR/webauthn/#sec-client-data. Therefore, we should remove it.
3026 Covered by existing tests.
3028 * Modules/webauthn/AuthenticatorCoordinator.cpp:
3029 (WebCore::AuthenticatorCoordinatorInternal::produceClientDataJson):
3031 2018-12-20 Jiewen Tan <jiewen_tan@apple.com>
3033 [WebAuthN] Add a runtime flag for local authenticator
3034 https://bugs.webkit.org/show_bug.cgi?id=192792
3035 <rdar://problem/46798738>
3037 Reviewed by Brent Fulgham.
3041 This patch adds a runtime flag for local authenticator and removes ways to
3042 set the runtime flag for web authentication in LegacyWebKit.
3044 * page/RuntimeEnabledFeatures.h:
3045 (WebCore::RuntimeEnabledFeatures::setWebAuthenticationLocalAuthenticatorEnabled):
3046 (WebCore::RuntimeEnabledFeatures::webAuthenticationLocalAuthenticatorEnabled const):
3048 2018-12-20 Jeremy Jones <jeremyj@apple.com>
3050 Pointer lock causes abandoned documents
3051 https://bugs.webkit.org/show_bug.cgi?id=188727
3052 rdar://problem/44248197
3054 Reviewed by Simon Fraser.
3056 Fixes --world-leaks in these tests:
3058 pointer-lock/locked-element-removed-from-dom.html
3059 pointer-lock/mouse-event-delivery.html
3060 fast/shadow-dom/pointerlockelement-in-slot.html
3062 PointerLockController now uses WeakPtr instead of RefPtr because it has no need to extend the lifetime of a document.
3064 * page/PointerLockController.cpp:
3065 (WebCore::PointerLockController::elementRemoved):
3066 (WebCore::PointerLockController::documentDetached):
3067 (WebCore::PointerLockController::didAcquirePointerLock):
3068 * page/PointerLockController.h:
3070 2018-12-20 Chris Dumez <cdumez@apple.com>
3072 Use Optional::valueOr() instead of Optional::value_or()
3073 https://bugs.webkit.org/show_bug.cgi?id=192933
3075 Reviewed by Geoffrey Garen.
3077 * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
3079 (WebCore::ApplePayPaymentHandler::didAuthorizePayment):
3080 * Modules/encryptedmedia/MediaKeySession.cpp:
3081 (WebCore::MediaKeySession::load):
3082 * Modules/indexeddb/IDBDatabaseIdentifier.h:
3083 (WebCore::IDBDatabaseIdentifier::hash const):
3084 * Modules/indexeddb/IDBFactory.cpp:
3085 (WebCore::IDBFactory::open):
3086 * Modules/mediastream/MediaStreamTrack.cpp:
3087 (WebCore::MediaStreamTrack::applyConstraints):
3088 * Modules/mediastream/RTCDTMFSender.cpp:
3089 (WebCore::RTCDTMFSender::insertDTMF):
3090 * Modules/webdatabase/SQLTransaction.cpp:
3091 (WebCore::SQLTransaction::executeSql):
3092 * Modules/webvr/VRFrameData.cpp:
3093 (WebCore::VRFrameData::update):
3094 * animation/AnimationTimeline.cpp:
3095 (WebCore::AnimationTimeline::updateCSSTransitionsForElement):
3096 * animation/DeclarativeAnimation.cpp:
3097 (WebCore::DeclarativeAnimation::cancel):
3098 (WebCore::DeclarativeAnimation::invalidateDOMEvents):
3099 * animation/KeyframeEffect.cpp:
3100 (WebCore::computeMissingKeyframeOffsets):
3101 (WebCore::KeyframeEffect::applyPendingAcceleratedActions):
3102 * animation/WebAnimation.cpp:
3103 (WebCore::WebAnimation::runPendingPlayTask):
3104 (WebCore::WebAnimation::runPendingPauseTask):
3105 * bindings/js/SerializedScriptValue.cpp:
3106 (WebCore::CloneSerializer::write):
3107 * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
3108 (WebCore::CryptoAlgorithmHMAC::generateKey):
3109 (WebCore::CryptoAlgorithmHMAC::importKey):
3110 * crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp:
3111 (WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
3112 (WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):
3113 * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
3114 (WebCore::CryptoKeyRSA::importSpki):
3115 (WebCore::CryptoKeyRSA::importPkcs8):
3116 * crypto/keys/CryptoKeyRSA.cpp:
3117 (WebCore::CryptoKeyRSA::importJwk):
3118 * crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:
3119 (WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
3120 (WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):
3121 * crypto/mac/CryptoKeyRSAMac.cpp:
3122 (WebCore::CryptoKeyRSA::importSpki):
3123 (WebCore::CryptoKeyRSA::importPkcs8):
3124 * css/CSSComputedStyleDeclaration.cpp:
3125 (WebCore::counterToCSSValue):
3126 * css/CSSFontFace.cpp:
3127 (WebCore::calculateItalicRange):
3128 * css/CSSPrimitiveValue.cpp:
3129 (WebCore::CSSPrimitiveValue::doubleValue const):
3130 * css/CSSStyleSheet.cpp:
3131 (WebCore::CSSStyleSheet::addRule):
3132 * css/DOMMatrix.cpp:
3133 (WebCore::DOMMatrix::rotateSelf):
3134 * css/DOMMatrixReadOnly.cpp:
3135 (WebCore::DOMMatrixReadOnly::validateAndFixup):
3136 * css/StyleBuilderCustom.h:
3137 (WebCore::StyleBuilderCustom::applyValueCounter):
3138 * css/parser/MediaQueryParser.cpp:
3139 (WebCore::MediaQueryParser::commitMediaQuery):
3141 (WebCore::Document::referrerPolicy const):
3143 (WebCore::toScrollAlignment):
3144 * dom/EventTarget.cpp:
3145 (WebCore::EventTarget::addEventListener):
3146 * dom/MutationObserver.cpp:
3147 (WebCore::MutationObserver::observe):
3148 * editing/cocoa/FontAttributeChangesCocoa.mm:
3149 (WebCore::FontChanges::platformFontFamilyNameForCSS const):
3151 (WebCore::File::File):
3152 * html/DOMTokenList.cpp:
3153 (WebCore::DOMTokenList::toggle):
3154 * html/HTMLOListElement.h:
3155 * html/ImageBitmap.cpp:
3156 (WebCore::croppedSourceRectangleWithFormatting):
3157 * html/canvas/CanvasPattern.cpp:
3158 (WebCore::CanvasPattern::setTransform):
3159 * html/canvas/CanvasRenderingContext2DBase.cpp:
3160 (WebCore::CanvasRenderingContext2DBase::setTransform):
3161 (WebCore::CanvasRenderingContext2DBase::isPointInPathInternal):
3162 (WebCore::CanvasRenderingContext2DBase::isPointInStrokeInternal):
3163 * html/canvas/Path2D.cpp:
3164 (WebCore::Path2D::addPath):
3165 * inspector/InspectorCanvas.cpp:
3166 (WebCore::InspectorCanvas::buildAction):
3167 * inspector/InspectorFrontendHost.cpp:
3168 (WebCore::populateContextMenu):
3169 * layout/FormattingContext.cpp:
3170 (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
3171 * layout/FormattingContextGeometry.cpp:
3172 (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
3173 (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
3174 (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
3175 (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
3176 (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
3177 (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
3178 (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset):
3179 (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedHorizontalMarginValue):
3180 (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedVerticalMarginValue):
3181 * layout/FormattingContextQuirks.cpp:
3182 (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
3183 * layout/MarginTypes.h:
3184 (WebCore::Layout::VerticalMargin::usedValues const):
3185 * layout/blockformatting/BlockFormattingContextGeometry.cpp:
3186 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
3187 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
3188 (WebCore::Layout::BlockFormattingContext::Geometry::instrinsicWidthConstraints):
3189 * layout/blockformatting/BlockFormattingContextQuirks.cpp:
3190 (WebCore::Layout::BlockFormattingContext::Quirks::stretchedHeight):
3191 * layout/displaytree/DisplayBox.h:
3192 (WebCore::Display::Box::width const):
3193 (WebCore::Display::Box::height const):
3194 (WebCore::Display::Box::contentBoxTop const):
3195 (WebCore::Display::Box::contentBoxLeft const):
3196 * layout/floats/FloatingContext.cpp:
3197 (WebCore::Layout::Iterator::set):
3198 * layout/inlineformatting/InlineFormattingContext.cpp:
3199 (WebCore::Layout::InlineFormattingContext::appendContentToLine const):
3200 (WebCore::Layout::InlineFormattingContext::placeInFlowPositionedChildren const):
3201 * loader/FrameLoader.cpp:
3202 (WebCore::FrameLoader::urlSelected):
3203 * loader/NavigationAction.cpp:
3204 * page/FrameView.cpp:
3205 (WebCore::FrameView::setLayoutViewportOverrideRect):
3206 (WebCore::FrameView::documentToAbsoluteScaleFactor const):
3207 (WebCore::FrameView::viewportSizeForCSSViewportUnits const):
3209 (WebCore::Page::setLowPowerModeEnabledOverrideForTesting):
3210 * page/SecurityOriginData.cpp:
3211 (WebCore::SecurityOriginData::databaseIdentifier const):
3212 * page/SecurityOriginData.h:
3213 (WebCore::SecurityOriginDataHash::hash):
3214 * page/SecurityOriginHash.h:
3215 (WebCore::SecurityOriginHash::hash):
3216 * page/ViewportConfiguration.cpp:
3217 (WebCore::ViewportConfiguration::setViewLayoutSize):
3218 * page/WindowFeatures.cpp:
3219 (WebCore::parseDialogFeatures):
3220 * page/animation/AnimationBase.cpp:
3221 (WebCore::AnimationBase::updateStateMachine):
3222 (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
3223 (WebCore::AnimationBase::getTimeToNextEvent const):
3224 (WebCore::AnimationBase::freezeAtTime):
3225 (WebCore::AnimationBase::getElapsedTime const):
3226 * page/animation/CSSAnimationController.cpp:
3227 (WebCore::CSSAnimationControllerPrivate::updateAnimationTimer):
3228 * page/cocoa/ResourceUsageThreadCocoa.mm:
3229 (WebCore::ResourceUsageThread::platformThreadBody):
3230 * page/linux/ResourceUsageThreadLinux.cpp:
3231 (WebCore::ResourceUsageThread::platformThreadBody):
3232 * platform/graphics/ComplexTextController.cpp:
3233 (WebCore::ComplexTextController::offsetForPosition):
3234 * platform/graphics/FontCache.h:
3235 (WebCore::FontDescriptionKey::computeHash const):
3236 * platform/graphics/FontCascade.cpp:
3237 (WebCore::FontCascade::drawText const):
3238 (WebCore::FontCascade::drawEmphasisMarks const):
3239 (WebCore::FontCascade::displayListForTextRun const):
3240 (WebCore::FontCascade::adjustSelectionRectForText const):
3241 (WebCore::FontCascade::codePath const):
3242 * platform/graphics/FontSelectionAlgorithm.cpp:
3243 (WebCore::FontSelectionAlgorithm::styleDistance const):
3244 * platform/graphics/FontSelectionAlgorithm.h:
3245 (WebCore::operator<<):
3246 (WebCore::FontSelectionSpecifiedCapabilities::computeWeight const):
3247 (WebCore::FontSelectionSpecifiedCapabilities::computeWidth const):
3248 (WebCore::FontSelectionSpecifiedCapabilities::computeSlope const):
3249 * platform/graphics/ShadowBlur.cpp:
3250 (WebCore::ShadowBlur::calculateLayerBoundingRect):
3251 * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
3252 (WebCore::WebCoreAVCFResourceLoader::startLoading):
3253 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3254 (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
3255 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
3256 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext):
3257 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3258 (WebCore::SourceBufferPrivateAVFObjC::naturalSize):
3259 * platform/graphics/ca/GraphicsLayerCA.cpp:
3260 (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
3261 * platform/graphics/cocoa/FontCacheCoreText.cpp:
3262 (WebCore::preparePlatformFont):
3263 * platform/graphics/filters/FETurbulence.cpp:
3264 (WebCore::FETurbulence::fillRegion const):
3265 * platform/graphics/gstreamer/GStreamerCommon.cpp:
3266 (WebCore::initializeGStreamer):
3267 * platform/graphics/texmap/TextureMapperLayer.cpp:
3268 (WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica):
3269 (WebCore::TextureMapperLayer::replicaTransform):
3270 (WebCore::TextureMapperLayer::syncAnimations):
3271 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
3272 (WebCore::CoordinatedGraphicsLayer::transformedVisibleRect):
3273 (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
3274 * platform/graphics/transforms/TransformState.cpp:
3275 (WebCore::TransformState::mappedPoint const):
3276 (WebCore::TransformState::mapQuad const):
3277 (WebCore::TransformState::flattenWithTransform):
3278 * platform/network/CacheValidation.cpp:
3279 (WebCore::computeCurrentAge):
3280 (WebCore::computeFreshnessLifetimeForHTTPFamily):
3281 * platform/network/NetworkStateNotifier.cpp:
3282 (WebCore::NetworkStateNotifier::onLine):
3283 * rendering/FloatingObjects.cpp:
3284 (WebCore::FindNextFloatLogicalBottomAdapter::nextLogicalBottom const):
3285 (WebCore::FindNextFloatLogicalBottomAdapter::nextShapeLogicalBottom const):
3286 * rendering/GridBaselineAlignment.cpp:
3287 (WebCore::GridBaselineAlignment::ascentForChild const):
3288 * rendering/GridTrackSizingAlgorithm.cpp:
3289 (WebCore::GridTrack::setGrowthLimit):
3290 (WebCore::GridTrackSizingAlgorithm::initialBaseSize const):
3291 (WebCore::GridTrackSizingAlgorithm::initialGrowthLimit const):
3292 (WebCore::GridTrackSizingAlgorithm::sizeTrackToFitNonSpanningItem):
3293 (WebCore::sortByGridTrackGrowthPotential):
3294 (WebCore::GridTrackSizingAlgorithm::estimatedGridAreaBreadthForChild const):
3295 (WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const):
3296 (WebCore::GridTrackSizingAlgorithm::initializeTrackSizes):
3297 * rendering/PaintInfo.h:
3298 (WebCore::PaintInfo::applyTransform):
3299 * rendering/RenderBox.cpp:
3300 (WebCore::RenderBox::computeLogicalHeight const):
3301 * rendering/RenderCounter.cpp:
3302 (WebCore::planCounter):
3303 * rendering/RenderDeprecatedFlexibleBox.cpp:
3304 (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
3305 * rendering/RenderFlexibleBox.cpp:
3306 (WebCore::RenderFlexibleBox::baselinePosition const):
3307 (WebCore::RenderFlexibleBox::marginBoxAscentForChild):
3308 (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
3309 * rendering/RenderGrid.cpp:
3310 (WebCore::RenderGrid::gridGap const):
3311 (WebCore::RenderGrid::baselinePosition const):
3312 * rendering/RenderLayer.cpp:
3313 (WebCore::RenderLayer::paintLayerByApplyingTransform):
3314 * rendering/RenderListBox.cpp:
3315 (WebCore::RenderListBox::paintItem):
3316 (WebCore::RenderListBox::listIndexIsVisible):
3317 * rendering/RenderMultiColumnSet.cpp:
3318 (WebCore::RenderMultiColumnSet::calculateMaxColumnHeight const):
3319 * rendering/RenderTable.cpp:
3320 (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
3321 * rendering/RenderTableCell.cpp:
3322 (WebCore::RenderTableCell::cellBaselinePosition const):
3323 * rendering/RenderTableSection.cpp:
3324 (WebCore::RenderTableSection::firstLineBaseline const):
3325 * rendering/RenderText.cpp:
3326 (WebCore::RenderText::computePreferredLogicalWidths):
3327 (WebCore::RenderText::previousOffset const):
3328 (WebCore::RenderText::previousOffsetForBackwardDeletion const):
3329 (WebCore::RenderText::nextOffset const):
3330 (WebCore::RenderText::stringView const):
3331 * rendering/RenderView.cpp:
3332 (WebCore::RenderView::layout):
3333 * rendering/mathml/RenderMathMLBlock.cpp:
3334 (WebCore::RenderMathMLBlock::baselinePosition const):
3335 * rendering/mathml/RenderMathMLBlock.h:
3336 (WebCore::RenderMathMLBlock::ascentForChild):
3337 * rendering/style/GridPosition.cpp:
3338 (WebCore::GridPosition::max):
3339 * rendering/style/TextUnderlineOffset.h:
3340 (WebCore::TextUnderlineOffset::lengthOr const):
3341 * rendering/svg/RenderSVGContainer.cpp:
3342 (WebCore::RenderSVGContainer::nodeAtFloatPoint):
3343 * rendering/svg/RenderSVGForeignObject.cpp:
3344 (WebCore::RenderSVGForeignObject::nodeAtFloatPoint):
3345 * rendering/svg/RenderSVGImage.cpp:
3346 (WebCore::RenderSVGImage::nodeAtFloatPoint):
3347 * rendering/svg/RenderSVGResourceClipper.cpp:
3348 (WebCore::RenderSVGResourceClipper::hitTestClipContent):
3349 * rendering/svg/RenderSVGResourceFilter.cpp:
3350 (WebCore::RenderSVGResourceFilter::postApplyResource):
3351 * rendering/svg/RenderSVGRoot.cpp:
3352 (WebCore::RenderSVGRoot::nodeAtPoint):
3353 * rendering/svg/RenderSVGShape.cpp:
3354 (WebCore::RenderSVGShape::nodeAtFloatPoint):
3355 * rendering/svg/RenderSVGText.cpp:
3356 (WebCore::RenderSVGText::nodeAtFloatPoint):
3357 * rendering/svg/SVGRenderingContext.cpp:
3358 (WebCore::SVGRenderingContext::clipToImageBuffer):
3359 * svg/SVGToOTFFontConversion.cpp:
3360 (WebCore::SVGToOTFFontConverter::processGlyphElement):
3361 (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
3363 2018-12-20 Jer Noble <jer.noble@apple.com>
3365 REGRESSION (r239419): heap-use-after-free in AudioSourceProviderAVFObjC::finalizeCallback()
3366 https://bugs.webkit.org/show_bug.cgi?id=192941
3367 <rdar://problem/46874096>
3369 Reviewed by Brent Fulgham.
3371 Don't delete the locked lock before unlocking the lock.
3373 * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
3374 (WebCore::AudioSourceProviderAVFObjC::finalizeCallback):
3376 2018-12-20 Keith Rollin <krollin@apple.com>
3378 Improve release-level page-load logging
3379 https://bugs.webkit.org/show_bug.cgi?id=192872
3380 <rdar://problem/46850309>
3382 Reviewed by Chris Dumez.
3384 There are a number of reported bugs that are difficult or impossible
3385 to track down with our current level of logging. Additionally, some
3386 software groups lower in the page-loading stack have requested logging
3387 sufficient for tracking a user-visible error message down to the
3388 requested resource that caused the message. Add more-comprehensive
3389 logging to address these issues/requests.
3391 No new tests -- no changed functionality.
3393 * loader/DocumentLoader.cpp:
3394 (WebCore::DocumentLoader::setMainDocumentError):
3395 (WebCore::DocumentLoader::mainReceivedError):
3396 (WebCore::DocumentLoader::stopLoading):
3397 (WebCore::DocumentLoader::notifyFinished):
3398 (WebCore::DocumentLoader::willSendRequest):
3399 (WebCore::DocumentLoader::continueAfterContentPolicy):
3400 (WebCore::DocumentLoader::startLoadingMainResource):