1 2018-03-03 Zalan Bujtas <zalan@apple.com>
3 [RenderTreeBuilder] Move styleDidChange mutation logic to RenderTreeUpdater
4 https://bugs.webkit.org/show_bug.cgi?id=183273
5 <rdar://problem/38054892>
7 Reviewed by Antti Koivisto.
9 Covered by existing tests.
11 * rendering/RenderBlockFlow.cpp:
12 (WebCore::RenderBlockFlow::styleDidChange):
13 * rendering/RenderElement.cpp:
14 (WebCore::RenderElement::styleDidChange):
15 (WebCore::RenderElement::noLongerAffectsParentBlock const): Deleted.
16 * rendering/RenderElement.h:
17 * rendering/updating/RenderTreeUpdater.cpp:
18 (WebCore::RenderTreeUpdater::updateElementRenderer):
20 2018-03-03 Yoav Weiss <yoav@yoav.ws>
22 Link headers for subresources are not being processes
23 https://bugs.webkit.org/show_bug.cgi?id=181789
25 Reviewed by Youenn Fablet.
27 Triggers Link header processing when the Link headers arrive on a subresource.
29 Test: http/tests/preload/link-header-on-subresource.html
31 * loader/LinkLoader.cpp:
32 (WebCore::LinkLoader::loadLinksFromHeader): Change the media check conditions.
33 * loader/LinkLoader.h: Add a third state for media checks.
34 * loader/SubresourceLoader.cpp:
35 (WebCore::SubresourceLoader::didReceiveResponse): Preload links from headers for subresources.
37 2018-03-02 Yusuke Suzuki <utatane.tea@gmail.com>
39 [WTF] Remove RunLoop and RunLoop::Timer's interface using double as seconds
40 https://bugs.webkit.org/show_bug.cgi?id=183293
42 Reviewed by Alex Christensen.
44 * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
45 (WebCore::TextureMapperPlatformLayerProxy::dropCurrentBufferWhilePreservingTexture):
47 2018-03-02 Dean Jackson <dino@apple.com>
49 Remove NP_GLContext since it is unsupported
50 https://bugs.webkit.org/show_bug.cgi?id=183305
51 <rdar://problem/36875555>
53 Reviewed by Simon Fraser.
55 * plugins/npapi.h: Remove NP_GLContext and mention that
58 2018-03-02 Chris Dumez <cdumez@apple.com>
60 imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html crashes with async policy delegates
61 https://bugs.webkit.org/show_bug.cgi?id=183294
62 <rdar://problem/38073596>
64 Reviewed by Youenn Fablet.
66 Drop code that was added to SubresourceLoader::willCancel() in r228852. The purpose of this code
67 was to make sure that SubresourceLoader::m_policyForResponseCompletionHandler always gets called,
68 even when the load is cancelled. However, this code is not needed (since m_policyForResponseCompletionHandler
69 is a CompletionHandler, an assertion will be hit if we fail to call it and we'll know). Calling
70 the completionHandler inside SubresourceLoader::willCancel() is too early and leads to crashes.
72 The completionHandler currently gets called DocumentLoader::responseReceived() via a call to
73 mainResourceLoader->didReceiveResponsePolicy(). Note that in r229177, we made sure that the
74 call to didReceiveResponsePolicy() happens *after* the call to continueAfterContentPolicy()
75 to maintain our non-async policy delegate behavior. However, continueAfterContentPolicy()
76 would end up calling willCancel() and call the completionHandler when shouldContinue was
79 Test: http/wpt/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-async-delegate.html
81 * loader/SubresourceLoader.cpp:
82 (WebCore::SubresourceLoader::willCancel):
84 2018-03-02 Tim Horton <timothy_horton@apple.com>
86 Fix the build after r229185 and r229184
88 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
89 (WebCore::exernalDeviceDisplayNameForPlayer):
90 * platform/ios/DeviceOrientationClientIOS.h:
91 * platform/ios/DeviceOrientationClientIOS.mm:
93 2018-03-02 Tim Horton <timothy_horton@apple.com>
95 Make the !ENABLE(DEVICE_ORIENTATION) iOS build succeed
96 https://bugs.webkit.org/show_bug.cgi?id=183296
98 Reviewed by Dan Bernstein.
100 * platform/ios/DeviceMotionClientIOS.h:
101 * platform/ios/DeviceMotionClientIOS.mm:
102 * platform/ios/WebCoreMotionManager.h:
103 * platform/ios/WebCoreMotionManager.mm:
105 2018-03-02 Tim Horton <timothy_horton@apple.com>
107 Make it possible to build for iOS without Celestial
108 https://bugs.webkit.org/show_bug.cgi?id=183295
109 <rdar://problem/38074468>
111 Reviewed by Dan Bernstein.
113 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
114 (WebCore::exernalDeviceDisplayNameForPlayer):
116 2018-03-02 Youenn Fablet <youenn@apple.com>
118 Clients should register to StorageProcess with their service worker registration identifier
119 https://bugs.webkit.org/show_bug.cgi?id=182313
120 <rdar://problem/38044403>
122 Reviewed by Chris Dumez.
124 Relanding with fixing matchAll for uncontrolled clients.
126 No observable change of behavior in regular conditions.
127 When service worker process crashes, the service worker identifiers sent by the WebProcess might be wrong
128 and we will not be able to retrieve the registration from these identifiers.
129 The storage process will be able to still process correctly messages coming from the WebProcess to register clients of the registration.
130 Otherwise, there is a chance that WebProcess clients will not be added to the SWServerRegistration.m_clientsUsingRegistration maps.
133 (WebCore::Document::setServiceWorkerConnection):
134 * workers/service/SWClientConnection.h:
135 * workers/service/server/SWServer.cpp:
136 (WebCore::SWServer::matchAll):
137 (WebCore::SWServer::claim):
138 (WebCore::SWServer::registerServiceWorkerClient):
139 (WebCore::SWServer::unregisterServiceWorkerClient):
140 (WebCore::SWServer::setClientActiveWorker): Deleted.
141 * workers/service/server/SWServer.h:
142 * workers/service/server/SWServerRegistration.cpp:
143 (WebCore::SWServerRegistration::activate):
145 2018-03-02 Youenn Fablet <youenn@apple.com>
147 Loads for a Document controlled by a Service Worker should not use AppCache
148 https://bugs.webkit.org/show_bug.cgi?id=183148
150 Reviewed by Chris Dumez.
152 Covered by updated test.
154 Postponing document loading through app cache after matching service worker registration.
155 Trying to load through app cache only if there is no service worker registration.
157 Disabling app cache for any load that has a service worker registration identifier.
159 * loader/DocumentLoader.cpp:
160 (WebCore::DocumentLoader::redirectReceived):
161 (WebCore::DocumentLoader::willSendRequest):
162 (WebCore::DocumentLoader::tryLoadingRequestFromApplicationCache):
163 (WebCore::DocumentLoader::tryLoadingRedirectRequestFromApplicationCache):
164 (WebCore::DocumentLoader::restartLoadingDueToServiceWorkerRegistrationChange):
165 (WebCore::DocumentLoader::scheduleSubstituteResourceLoad):
166 (WebCore::DocumentLoader::startLoadingMainResource):
167 * loader/DocumentLoader.h:
168 * loader/appcache/ApplicationCacheHost.cpp:
169 (WebCore::ApplicationCacheHost::maybeLoadMainResource):
170 (WebCore::ApplicationCacheHost::maybeLoadMainResourceForRedirect):
171 (WebCore::ApplicationCacheHost::maybeLoadResource):
172 (WebCore::ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache):
173 * loader/appcache/ApplicationCacheHost.h:
175 2018-03-02 Chris Dumez <cdumez@apple.com>
177 fast/events/before-unload-remove-itself.html crashes with async policy delegates
178 https://bugs.webkit.org/show_bug.cgi?id=183290
179 <rdar://problem/38069045>
181 Reviewed by Alex Christensen.
183 When the navigation policy happens asynchronously, it is now possible for the
184 Frame / FrameLoader to get destroyed between the point that policyChecker().checkNavigationPolicy()
185 is called and when continueLoadAfterNavigationPolicy() is called.
187 To address the issue, we now protect the Frame and capture it in the lambda passed
188 to policyChecker().checkNavigationPolicy().
190 Test: fast/events/before-unload-remove-itself-async-delegate.html
192 * loader/FrameLoader.cpp:
193 (WebCore::FrameLoader::loadURL):
194 (WebCore::FrameLoader::loadWithDocumentLoader):
196 2018-03-02 Chris Dumez <cdumez@apple.com>
198 Converting a load to a download does not work with async policy delegates
199 https://bugs.webkit.org/show_bug.cgi?id=183254
200 <rdar://problem/38035334>
202 Reviewed by Youenn Fablet.
204 Update DocumentLoader::responseReceived() to call didReceiveResponsePolicy()
205 on the mainResourceLoader *after* calling continueAfterContentPolicy(),
206 not *before*. This makes sure that the WebResourceLoader sends the
207 NetworkResourceLoader::ContinueDidReceiveResponse IPC back to the Network
208 Process *after* the policy decision has been processed, which restores the
211 Test: fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-async-delegate.html
213 * loader/DocumentLoader.cpp:
214 (WebCore::DocumentLoader::responseReceived):
216 2018-03-02 Youenn Fablet <youenn@apple.com>
218 Some RealtimeMediaSource methods do not need to be marked as virtual
219 https://bugs.webkit.org/show_bug.cgi?id=183272
221 Reviewed by Eric Carlson.
223 No change of behavior.
225 * platform/mediastream/RealtimeMediaSource.h:
227 2018-03-01 Yusuke Suzuki <utatane.tea@gmail.com>
229 Remove monotonicallyIncreasingTime
230 https://bugs.webkit.org/show_bug.cgi?id=182911
232 Reviewed by Michael Catanzaro.
234 While generic code uses MonotonicTime, CAAnimation uses media time (CFTimeInterval).
235 At this boundary, we convert MonotonicTime to media time, this is the same logic to
236 the code before this patch.
238 * Modules/gamepad/Gamepad.h:
239 * Modules/mediasource/SourceBuffer.cpp:
240 (WebCore::SourceBuffer::SourceBuffer):
241 (WebCore::SourceBuffer::monitorBufferingRate):
242 * Modules/mediasource/SourceBuffer.h:
243 * Modules/speech/SpeechSynthesis.cpp:
244 (WebCore::SpeechSynthesis::startSpeakingImmediately):
245 (WebCore::SpeechSynthesis::fireEvent):
246 * Modules/speech/SpeechSynthesisUtterance.h:
247 * contentextensions/ContentExtensionCompiler.cpp:
248 (WebCore::ContentExtensions::compileRuleList):
249 * contentextensions/ContentExtensionParser.cpp:
250 (WebCore::ContentExtensions::parseRuleList):
251 * contentextensions/ContentExtensionsBackend.cpp:
252 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad const):
254 (WebCore::Element::setActive):
255 * history/CachedPage.cpp:
256 (WebCore::CachedPage::CachedPage):
257 (WebCore::CachedPage::hasExpired const):
258 * history/CachedPage.h:
259 * html/HTMLMediaElement.cpp:
260 (WebCore::HTMLMediaElement::startProgressEventTimer):
261 (WebCore::HTMLMediaElement::progressEventTimerFired):
262 (WebCore::HTMLMediaElement::refreshCachedTime const):
263 (WebCore::HTMLMediaElement::invalidateCachedTime const):
264 (WebCore::HTMLMediaElement::currentMediaTime const):
265 (WebCore::HTMLMediaElement::startPlaybackProgressTimer):
266 * html/HTMLMediaElement.h:
267 * html/MediaElementSession.cpp:
268 (WebCore::MediaElementSession::removeBehaviorRestriction):
269 (WebCore::MediaElementSession::mostRecentUserInteractionTime const):
270 (WebCore::MediaElementSession::resetPlaybackSessionState):
271 * html/MediaElementSession.h:
272 * html/parser/HTMLParserScheduler.cpp:
273 (WebCore::PumpSession::PumpSession):
274 (WebCore::HTMLParserScheduler::HTMLParserScheduler):
275 * html/parser/HTMLParserScheduler.h:
276 (WebCore::HTMLParserScheduler::checkForYield):
277 * inspector/InspectorCanvas.cpp:
278 (WebCore::InspectorCanvas::recordAction):
279 (WebCore::InspectorCanvas::finalizeFrame):
280 * inspector/InspectorCanvas.h:
281 * inspector/agents/InspectorMemoryAgent.cpp:
282 (WebCore::InspectorMemoryAgent::startTracking):
283 (WebCore::InspectorMemoryAgent::didHandleMemoryPressure):
284 (WebCore::InspectorMemoryAgent::collectSample):
285 * inspector/agents/InspectorNetworkAgent.cpp:
286 (WebCore::InspectorNetworkAgent::buildObjectForTiming):
287 (WebCore::InspectorNetworkAgent::timestamp):
288 (WebCore::InspectorNetworkAgent::didFinishLoading):
289 * inspector/agents/InspectorPageAgent.cpp:
290 (WebCore::InspectorPageAgent::timestamp):
291 * inspector/agents/InspectorTimelineAgent.cpp:
292 (WebCore::InspectorTimelineAgent::timestamp):
293 * inspector/agents/WebHeapAgent.cpp:
294 (WebCore::WebHeapAgent::dispatchGarbageCollectedEvent):
295 * inspector/agents/WebHeapAgent.h:
296 * loader/cache/CachedCSSStyleSheet.cpp:
297 (WebCore::CachedCSSStyleSheet::restoreParsedStyleSheet):
298 * loader/cache/CachedImage.cpp:
299 (WebCore::CachedImage::didDraw):
300 * loader/cache/CachedResource.cpp:
301 (WebCore::CachedResource::didAccessDecodedData):
302 * loader/cache/CachedResource.h:
303 * loader/cache/MemoryCache.cpp:
304 (WebCore::MemoryCache::pruneLiveResourcesToSize):
305 * page/EventHandler.cpp:
306 (WebCore::MaximumDurationTracker::MaximumDurationTracker):
307 (WebCore::MaximumDurationTracker::~MaximumDurationTracker):
308 * page/FocusController.cpp:
309 (WebCore::FocusController::setFocusedElement):
310 (WebCore::FocusController::timeSinceFocusWasSet const):
311 * page/FocusController.h:
312 * page/FrameView.cpp:
313 (WebCore::FrameView::reset):
314 (WebCore::FrameView::willPaintContents):
315 (WebCore::FrameView::didPaintContents):
317 * page/animation/AnimationBase.cpp:
318 (WebCore::AnimationBase::freezeAtTime):
319 (WebCore::AnimationBase::beginAnimationUpdateTime const):
320 * page/animation/AnimationBase.h:
321 (WebCore::AnimationBase::onAnimationStartResponse):
322 * page/animation/CSSAnimationController.cpp:
323 (WebCore::CSSAnimationControllerPrivate::beginAnimationUpdateTime):
324 (WebCore::CSSAnimationControllerPrivate::receivedStartTimeResponse):
325 (WebCore::CSSAnimationControllerPrivate::startTimeResponse):
326 (WebCore::CSSAnimationController::notifyAnimationStarted):
327 * page/animation/CSSAnimationController.h:
328 * page/animation/CSSAnimationControllerPrivate.h:
329 * page/mac/WheelEventDeltaFilterMac.h:
330 * page/mac/WheelEventDeltaFilterMac.mm:
331 (WebCore::WheelEventDeltaFilterMac::beginFilteringDeltas):
332 (WebCore::WheelEventDeltaFilterMac::updateFromDelta):
333 (WebCore::WheelEventDeltaFilterMac::endFilteringDeltas):
334 * platform/ControlStates.h:
335 (WebCore::ControlStates::timeSinceControlWasFocused const):
336 (WebCore::ControlStates::setTimeSinceControlWasFocused):
337 * platform/PlatformSpeechSynthesisUtterance.h:
338 (WebCore::PlatformSpeechSynthesisUtterance::startTime const):
339 (WebCore::PlatformSpeechSynthesisUtterance::setStartTime):
340 * platform/gamepad/PlatformGamepad.h:
341 (WebCore::PlatformGamepad::lastUpdateTime const):
342 (WebCore::PlatformGamepad::connectTime const):
343 (WebCore::PlatformGamepad::PlatformGamepad):
344 * platform/gamepad/cocoa/GameControllerGamepad.mm:
345 (WebCore::GameControllerGamepad::setupAsExtendedGamepad):
346 (WebCore::GameControllerGamepad::setupAsGamepad):
347 * platform/gamepad/mac/HIDGamepad.cpp:
348 (WebCore::HIDGamepad::HIDGamepad):
349 (WebCore::HIDGamepad::valueChanged):
350 * platform/graphics/GraphicsLayer.cpp:
351 (WebCore::GraphicsLayer::suspendAnimations):
352 * platform/graphics/GraphicsLayer.h:
353 * platform/graphics/GraphicsLayerClient.h:
354 (WebCore::GraphicsLayerClient::notifyAnimationStarted):
355 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
356 (WebCore::LayerClient::platformCALayerAnimationStarted):
357 (WebCore::AVFWrapper::createImageForTimeInRect):
358 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
359 (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect):
360 (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage):
361 * platform/graphics/ca/GraphicsLayerCA.cpp:
362 (WebCore::GraphicsLayerCA::addAnimation):
363 (WebCore::GraphicsLayerCA::pauseAnimation):
364 (WebCore::GraphicsLayerCA::platformCALayerAnimationStarted):
365 (WebCore::GraphicsLayerCA::setAnimationOnLayer):
366 (WebCore::GraphicsLayerCA::pauseCAAnimationOnLayer):
367 (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
368 (WebCore::GraphicsLayerCA::appendToUncommittedAnimations):
369 (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
370 * platform/graphics/ca/GraphicsLayerCA.h:
371 (WebCore::GraphicsLayerCA::LayerPropertyAnimation::LayerPropertyAnimation):
372 (WebCore::GraphicsLayerCA::AnimationProcessingAction::AnimationProcessingAction):
373 * platform/graphics/ca/LayerPool.cpp:
374 (WebCore::LayerPool::LayerPool):
375 (WebCore::LayerPool::addLayer):
376 (WebCore::LayerPool::decayedCapacity const):
377 (WebCore::LayerPool::pruneTimerFired):
378 * platform/graphics/ca/LayerPool.h:
379 * platform/graphics/ca/PlatformCAAnimation.h:
380 * platform/graphics/ca/PlatformCALayer.h:
381 * platform/graphics/ca/PlatformCALayerClient.h:
382 (WebCore::PlatformCALayerClient::platformCALayerAnimationStarted):
383 * platform/graphics/ca/TileGrid.cpp:
384 (WebCore::TileGrid::revalidateTiles):
385 (WebCore::TileGrid::startedNewCohort):
386 (WebCore::TileGrid::TileCohortInfo::timeUntilExpiration):
387 (WebCore::TileGrid::cohortRemovalTimerFired):
388 * platform/graphics/ca/TileGrid.h:
389 (WebCore::TileGrid::TileCohortInfo::TileCohortInfo):
390 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
391 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
392 (mediaTimeToCurrentTime):
393 (-[WebAnimationDelegate animationDidStart:]):
394 (PlatformCALayerCocoa::animationStarted):
395 * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
396 (WebCore::CACFLayerTreeHost::notifyAnimationsStarted):
397 * platform/graphics/ca/win/PlatformCALayerWin.cpp:
398 (PlatformCALayerWin::animationStarted):
399 (PlatformCALayerWin::layerTreeAsString const):
400 * platform/graphics/ca/win/PlatformCALayerWin.h:
401 * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
402 (WebCore::WebCoreDecompressionSession::decodeSample):
403 * platform/graphics/texmap/BitmapTexturePool.cpp:
404 (WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired):
405 * platform/graphics/texmap/BitmapTexturePool.h:
406 (WebCore::BitmapTexturePool::Entry::markIsInUse):
407 (WebCore::BitmapTexturePool::Entry::canBeReleased const):
409 * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
410 (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
411 (WebCore::GraphicsLayerTextureMapper::addAnimation):
412 (WebCore::GraphicsLayerTextureMapper::pauseAnimation):
413 * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
414 * platform/graphics/texmap/TextureMapperAnimation.cpp:
415 (WebCore::TextureMapperAnimation::TextureMapperAnimation):
416 (WebCore::TextureMapperAnimation::apply):
417 (WebCore::TextureMapperAnimation::pause):
418 (WebCore::TextureMapperAnimation::resume):
419 (WebCore::TextureMapperAnimation::computeTotalRunningTime):
420 (WebCore::TextureMapperAnimations::pause):
421 (WebCore::TextureMapperAnimations::suspend):
422 * platform/graphics/texmap/TextureMapperAnimation.h:
423 (WebCore::TextureMapperAnimation::startTime const):
424 (WebCore::TextureMapperAnimation::pauseTime const):
425 * platform/graphics/texmap/TextureMapperFPSCounter.cpp:
426 (WebCore::TextureMapperFPSCounter::TextureMapperFPSCounter):
427 (WebCore::TextureMapperFPSCounter::updateFPSAndDisplay):
428 * platform/graphics/texmap/TextureMapperFPSCounter.h:
429 * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
430 (WebCore::TextureMapperPlatformLayerBuffer::markUsed):
431 (WebCore::TextureMapperPlatformLayerBuffer::lastUsedTime const):
433 * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
434 (WebCore::TextureMapperPlatformLayerProxy::releaseUnusedBuffersTimerFired):
435 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
436 (WebCore::CoordinatedGraphicsLayer::addAnimation):
437 (WebCore::CoordinatedGraphicsLayer::pauseAnimation):
438 (WebCore::CoordinatedGraphicsLayer::suspendAnimations):
439 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
440 * platform/mediastream/RealtimeMediaSource.h:
441 * platform/mediastream/RealtimeOutgoingVideoSource.cpp:
442 (WebCore::RealtimeOutgoingVideoSource::sendFrame):
443 * platform/mediastream/libwebrtc/LibWebRTCAudioModule.cpp:
444 (WebCore::LibWebRTCAudioModule::StartPlayoutOnAudioThread):
445 * platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:
446 (WebCore::DisplayCaptureSourceCocoa::startProducingData):
447 (WebCore::DisplayCaptureSourceCocoa::stopProducingData):
448 (WebCore::DisplayCaptureSourceCocoa::elapsedTime):
449 * platform/mediastream/mac/DisplayCaptureSourceCocoa.h:
450 * platform/mediastream/mac/MockRealtimeAudioSourceMac.h:
451 * platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:
452 (WebCore::MockRealtimeAudioSourceMac::render):
453 * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
454 (WebCore::MockRealtimeVideoSourceMac::CMSampleBufferFromPixelBuffer):
455 * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.h:
456 * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
457 (WebCore::ScreenDisplayCaptureSourceMac::sampleBufferFromPixelBuffer):
458 (WebCore::ScreenDisplayCaptureSourceMac::frameAvailable):
459 * platform/mock/MockRealtimeAudioSource.cpp:
460 (WebCore::MockRealtimeAudioSource::startProducingData):
461 (WebCore::MockRealtimeAudioSource::stopProducingData):
462 (WebCore::MockRealtimeAudioSource::elapsedTime):
463 (WebCore::MockRealtimeAudioSource::tick):
464 (WebCore::MockRealtimeAudioSource::delaySamples):
465 * platform/mock/MockRealtimeAudioSource.h:
466 (WebCore::MockRealtimeAudioSource::render):
467 * platform/mock/MockRealtimeVideoSource.cpp:
468 (WebCore::MockRealtimeVideoSource::startProducingData):
469 (WebCore::MockRealtimeVideoSource::stopProducingData):
470 (WebCore::MockRealtimeVideoSource::elapsedTime):
471 (WebCore::MockRealtimeVideoSource::drawText):
472 (WebCore::MockRealtimeVideoSource::delaySamples):
473 (WebCore::MockRealtimeVideoSource::generateFrame):
474 * platform/mock/MockRealtimeVideoSource.h:
475 * platform/network/DNSResolveQueue.cpp:
476 (WebCore::DNSResolveQueue::DNSResolveQueue):
477 (WebCore::DNSResolveQueue::isUsingProxy):
478 * platform/network/DNSResolveQueue.h:
479 * rendering/RenderBoxModelObject.cpp:
480 (WebCore::RenderBoxModelObject::suspendAnimations):
481 * rendering/RenderBoxModelObject.h:
482 * rendering/RenderElement.cpp:
483 (WebCore::RenderElement::paintFocusRing):
484 * rendering/RenderImage.cpp:
485 (WebCore::RenderImage::paintAreaElementFocusRing):
486 * rendering/RenderLayerBacking.cpp:
487 (WebCore::RenderLayerBacking::notifyAnimationStarted):
488 (WebCore::RenderLayerBacking::suspendAnimations):
489 * rendering/RenderLayerBacking.h:
490 * rendering/RenderLayerCompositor.cpp:
491 (WebCore::RenderLayerCompositor::didPaintBacking):
492 * rendering/RenderProgress.cpp:
493 (WebCore::RenderProgress::RenderProgress):
494 (WebCore::RenderProgress::animationProgress const):
495 (WebCore::RenderProgress::updateAnimationState):
496 * rendering/RenderProgress.h:
497 * rendering/RenderTheme.cpp:
498 (WebCore::RenderTheme::animationDurationForProgressBar const):
499 * rendering/RenderTheme.h:
500 * rendering/RenderThemeGtk.cpp:
501 (WebCore::RenderThemeGtk::animationDurationForProgressBar const):
502 * rendering/RenderThemeGtk.h:
503 * rendering/RenderThemeIOS.h:
504 * rendering/RenderThemeIOS.mm:
505 (WebCore::RenderThemeIOS::animationDurationForProgressBar const):
506 * rendering/RenderThemeMac.h:
507 * rendering/RenderThemeMac.mm:
508 (WebCore::RenderThemeMac::animationDurationForProgressBar const):
509 * svg/animation/SMILTimeContainer.cpp:
510 (WebCore::SMILTimeContainer::SMILTimeContainer):
511 (WebCore::SMILTimeContainer::elapsed const):
512 (WebCore::SMILTimeContainer::isActive const):
513 (WebCore::SMILTimeContainer::isPaused const):
514 (WebCore::SMILTimeContainer::isStarted const):
515 (WebCore::SMILTimeContainer::begin):
516 (WebCore::SMILTimeContainer::pause):
517 (WebCore::SMILTimeContainer::resume):
518 (WebCore::SMILTimeContainer::setElapsed):
519 (WebCore::SMILTimeContainer::timerFired):
520 * svg/animation/SMILTimeContainer.h:
521 * testing/Internals.cpp:
522 (WebCore::Internals::delayMediaStreamTrackSamples):
523 * testing/MockGamepad.cpp:
524 (WebCore::MockGamepad::MockGamepad):
525 (WebCore::MockGamepad::updateDetails):
526 (WebCore::MockGamepad::setAxisValue):
527 (WebCore::MockGamepad::setButtonValue):
529 2018-03-02 Alejandro G. Castro <alex@igalia.com>
531 Make LibWebRTCProvider port agnostic again after r215424
532 https://bugs.webkit.org/show_bug.cgi?id=183080
534 Reviewed by Youenn Fablet.
536 In the r215424 commit the webRTCAvailable function started to use a function from the DARWIN platform,
537 we have moved that code to the cocoa class and created a glib implementation that will be used in the future
538 to implement the LibWebRTCProviderGlib class.
540 No new tests, this is a refactor.
542 * Sources.txt: Add the compilation of the new file.
543 * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: Remove the webRTCAvailable function from this file.
544 (WebCore::LibWebRTCProvider::create): We want to use this even when LIBWEBRTC is not used.
545 * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
546 (WebCore::LibWebRTCProvider::webRTCAvailable): Moved the code from the LibWebRTCProvider class.
547 * platform/mediastream/libwebrtc/LibWebRTCProviderGlib.cpp:
548 (WebCore::LibWebRTCProvider::webRTCAvailable): Add the glib implementation, basically true, we are always
549 linking libwebrtc for the moment in these situations.
551 2018-03-01 Carlos Garcia Campos <cgarcia@igalia.com>
553 REGRESSION(r222843): [HarfBuzz] Combining enclosed keycap not correctly handled
554 https://bugs.webkit.org/show_bug.cgi?id=183246
556 Reviewed by Michael Catanzaro.
558 We are not correctly handling the combining enclosed keycap since we switched to use
559 ComplexTextController. This is because fontForCombiningCharacterSequence() always returns the font of the first
560 character, without checking if that font can render the whole sequence or not. Before 222843, the shaper did
561 that check when creating the text runs. In this case the sequence was split and a different font was used for the
562 text and the mark. This patch makes fontForCombiningCharacterSequence() try to find a suitable font for the
563 whole sequence, first looking at the CSS fallbacks and finally at system ones. The result is much better than
564 the old one, because we use the same font for both the text and the mark. If there isn't any font to render the
565 mark, then we fallback to use the first character font, since we will end up rendering the missing glyph
566 character, it's better to use the same font than the first character one.
568 Test: fast/text/combining-enclosing-keycap.html
570 * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
571 (WebCore::FontCascade::fontForCombiningCharacterSequence const): Check if the first charatcer font can render
572 the whole sequence, trying with fallbacks otherwise.
573 * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
574 (WebCore::Font::canRenderCombiningCharacterSequence const): Check if the font face has glyphs for the whole
575 sequence not just the first character.
577 2018-03-01 Carlos Garcia Campos <cgarcia@igalia.com>
579 [FreeType] Remove FontPlatformData fallbacks
580 https://bugs.webkit.org/show_bug.cgi?id=183210
582 Reviewed by Michael Catanzaro.
584 They are only used by FontCache::systemFallbackForCharacters() where a direct FcFontMatch provides the same
587 * platform/graphics/FontPlatformData.h: Remove fallbacks.
588 * platform/graphics/freetype/FontCacheFreeType.cpp:
589 (WebCore::FontCache::systemFallbackForCharacters): Use FcFontMatch() only.
590 * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
591 (WebCore::FontPlatformData::fallbacks): Removed.
593 2018-03-01 Commit Queue <commit-queue@webkit.org>
595 Unreviewed, rolling out r229153.
596 https://bugs.webkit.org/show_bug.cgi?id=183274
598 it is breaking imported/w3c/web-platform-tests/service-workers
599 /service-worker/clients-matchall-exact-controller.https.html
600 (Requested by youenn on #webkit).
604 "Clients should register to StorageProcess with their service
605 worker registration identifier"
606 https://bugs.webkit.org/show_bug.cgi?id=182313
607 https://trac.webkit.org/changeset/229153
609 2018-03-01 Youenn Fablet <youenn@apple.com>
611 Clients should register to StorageProcess with their service worker registration identifier
612 https://bugs.webkit.org/show_bug.cgi?id=182313
614 Reviewed by Chris Dumez.
616 No observable change of behavior in regular conditions.
617 When service worker process crashes, the service worker identifiers sent by the WebProcess might be wrong
618 and we will not be able to retrieve the registration from these identifiers.
619 The storage process will be able to still process correctly messages coming from the WebProcess to register clients of the registration.
620 Otherwise, there is a chance that WebProcess clients will not be added to the SWServerRegistration.m_clientsUsingRegistration maps.
623 (WebCore::Document::setServiceWorkerConnection):
624 * workers/service/SWClientConnection.h:
625 * workers/service/server/SWServer.cpp:
626 (WebCore::SWServer::registerServiceWorkerClient):
627 * workers/service/server/SWServer.h:
629 2018-03-01 Youenn Fablet <youenn@apple.com>
631 Add API test to validate setting of service worker and cache storage directories
632 https://bugs.webkit.org/show_bug.cgi?id=182543
634 Reviewed by Chris Dumez.
636 Covered by API tests.
638 Add getters to service worker registration directory.
640 * testing/Internals.cpp:
641 (WebCore::Internals::serviceWorkerRegistrationDirectory):
642 * testing/Internals.h:
643 * testing/Internals.idl:
644 * workers/service/SWClientConnection.h:
645 * workers/service/server/RegistrationDatabase.h:
646 (WebCore::RegistrationDatabase::serviceWorkerRegistrationDirectory const):
647 * workers/service/server/RegistrationStore.h:
648 (WebCore::RegistrationStore::serviceWorkerRegistrationDirectory const):
649 * workers/service/server/SWServer.h:
650 (WebCore::SWServer::serviceWorkerRegistrationDirectory const):
652 2018-03-01 Youenn Fablet <youenn@apple.com>
654 SWServer::removeClientServiceWorkerRegistration should not log an error if there is no registration
655 https://bugs.webkit.org/show_bug.cgi?id=183248
657 Reviewed by Chris Dumez.
659 No change of behavior.
660 Removed the error logging.
661 As can be seen from running api and layout tests, a web process can ask a registration to be unregistered
662 and by the time it goes to the StorageProcess, the registration is already cleared.
664 * workers/service/server/SWServer.cpp:
665 (WebCore::SWServer::removeClientServiceWorkerRegistration):
667 2018-03-01 Daniel Bates <dabates@apple.com>
669 CSS ::selection stroke-color and stroke-width are not applied to selected text in text fields
670 and ::selection:window-inactive stroke-color and stroke-width are never applied
671 https://bugs.webkit.org/show_bug.cgi?id=183178
673 Reviewed by David Hyatt.
675 This change fixes the following two issues:
676 1. Properties stroke-color and stroke-width are not applied to the ::selection pseudo-
677 element of text fields.
678 2. Properties stroke-color and stroke-width are never applied to ::selection:window-inactive
681 Currently when computing the paint styles for selected text we query the cached styles for
682 the ::selection pseudo element on the renderer. Text fields are implemented using a User Agent
683 shadow DOM. With regards to issue (1) the renderer queried was the inner most renderer for
684 the text in the text field. But it should have been the shadow host renderer (i.e. the renderer
685 for the <input>). With regards to issue (2) we cannot retrieve cached styles for the
686 ::selection pseudo element because it can be effected by a pseudo class, :window-inactive,
687 which matches when the page is deactivated (i.e. the window is in the background as the user
688 made another window the frontmost window). Both of these issues are fixed by making use
689 of RenderElement::selectionPseudoStyle().
691 Tests: fast/selectors/selection-window-inactive-stroke-color.html
692 fast/selectors/selection-window-inactive-text-shadow.html
693 fast/selectors/text-field-selection-stroke-color.html
694 fast/selectors/text-field-selection-text-shadow.html
695 fast/selectors/text-field-selection-window-inactive-stroke-color.html
696 fast/selectors/text-field-selection-window-inactive-text-shadow.html
698 * rendering/RenderText.h:
699 (WebCore::RenderText::selectionPseudoStyle const): Add a convenience function that turns
700 around and calls the function of the same name on its parent.
701 * rendering/TextPaintStyle.cpp:
702 (WebCore::computeTextSelectionPaintStyle): Modified to use RenderText::selectionPseudoStyle()
703 instead of directly querying for the cached styles for the ::selection pseudo element.
705 2018-03-01 Per Arne Vollan <pvollan@apple.com>
707 Scrollbar preferences are ignored when the WebContent process doesn't have access to the WindowServer.
708 https://bugs.webkit.org/show_bug.cgi?id=183231
709 <rdar://problem/37793457>
711 Reviewed by Brent Fulgham.
713 When the WebContent process doesn't have access to the WindowServer, the scrollbars are always of the overlay type.
714 The notification about scrollbar preferences is never received by the WebContent process when there is no
715 WindowServer access. This can be fixed by adding an observer of scrollbar preferences in the UI process, and
716 notifying the WebProcess about this by sending it a message. This message should also contain the preferred
717 scrollbar type, since the call '[NSScroller preferredScrollerStyle]' will always return the overlay style when
718 there is no WindowServer access.
720 No new tests, covered by existing tests.
722 * WebCore.xcodeproj/project.pbxproj:
723 * platform/mac/NSScrollerImpDetails.h:
724 * platform/mac/NSScrollerImpDetails.mm:
725 (WebCore::ScrollerStyle::recommendedScrollerStyle):
726 (WebCore::ScrollerStyle::setUseOverlayScrollbars):
727 (WebCore::recommendedScrollerStyle): Deleted.
728 * platform/mac/ScrollAnimatorMac.mm:
729 (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
730 (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar const):
731 (WebCore::ScrollAnimatorMac::mouseExitedScrollbar const):
732 (WebCore::ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting):
733 * platform/mac/ScrollbarThemeMac.mm:
734 (WebCore::ScrollbarThemeMac::registerScrollbar):
735 (WebCore::ScrollbarThemeMac::scrollbarThickness):
736 (WebCore::ScrollbarThemeMac::usesOverlayScrollbarsChanged):
738 2018-03-01 Myles C. Maxfield <mmaxfield@apple.com>
740 Temporarily enable user-installed-fonts everywhere until we can stop crashing on launch
741 https://bugs.webkit.org/show_bug.cgi?id=183255
745 Tests are already disabled.
747 * platform/graphics/cocoa/FontCacheCoreText.cpp:
749 2018-03-01 Basuke Suzuki <Basuke.Suzuki@sony.com>
751 [Curl] Split DNS cache expiration and connection timeout setting.
752 https://bugs.webkit.org/show_bug.cgi?id=182979
754 It was mis-implemented and was named ambiguous name 'enableTimeout'.
755 Implement each feature correctly.
757 Reviewed by Per Arne Vollan.
759 * platform/network/curl/CurlContext.cpp:
760 (WebCore::EnvironmentVariableReader::read):
761 (WebCore::EnvironmentVariableReader::defined):
762 (WebCore::EnvironmentVariableReader::readAs):
763 (WebCore::EnvironmentVariableReader::sscanTemplate):
764 (WebCore::EnvironmentVariableReader::sscanTemplate<unsigned>):
765 (WebCore::CurlContext::CurlContext):
766 (WebCore::safeTimeValue):
767 (WebCore::CurlHandle::setDnsCacheTimeout):
768 (WebCore::CurlHandle::setConnectTimeout):
769 (WebCore::CurlHandle::setTimeout):
770 (WebCore::CurlHandle::enableTimeout): Deleted.
771 * platform/network/curl/CurlContext.h:
772 (WebCore::CurlContext::dnsCacheTimeout const):
773 (WebCore::CurlContext::connectTimeout const):
774 * platform/network/curl/CurlRequest.cpp:
775 (WebCore::CurlRequest::setupTransfer):
777 2018-03-01 Zalan Bujtas <zalan@apple.com>
779 Remove RenderElement::s_noLongerAffectsParentBlock
780 https://bugs.webkit.org/show_bug.cgi?id=183196
781 <rdar://problem/38030797>
783 Reviewed by Antti Koivisto.
785 Remove the hack to track floating/out-of-flow changes between styleWillChange and styleDidChange.
787 Covered by existing tests.
789 * rendering/RenderBlockFlow.cpp:
790 (WebCore::RenderBlockFlow::styleDidChange):
791 * rendering/RenderElement.cpp:
792 (WebCore::RenderElement::styleWillChange):
793 (WebCore::RenderElement::noLongerAffectsParentBlock const):
794 (WebCore::RenderElement::styleDidChange):
795 * rendering/RenderElement.h:
796 (WebCore::RenderElement::noLongerAffectsParentBlock const): Deleted.
798 2018-03-01 Chris Dumez <cdumez@apple.com>
800 imported/w3c/web-platform-tests/html/browsers/windows/browsing-context.html fails with async policy delegates
801 https://bugs.webkit.org/show_bug.cgi?id=183225
802 <rdar://problem/38003828>
804 Reviewed by Alex Christensen.
806 Bypass navigation policy check when loading about:blank. This does not seem necessary and it would not
807 be Web-compatible for such policy check to happen synchronously. This is because an iframe without src
808 or src="about:blank" should load synchronously as per HTML specification.
810 Test: http/wpt/html/browsers/windows/browsing-context.html
812 * loader/PolicyChecker.cpp:
813 (WebCore::PolicyChecker::checkNavigationPolicy):
815 2018-03-01 Christopher Reid <chris.reid@sony.com>
817 [Curl] Linker errors in some curl files due to missing exports
818 https://bugs.webkit.org/show_bug.cgi?id=183238
820 Reviewed by Alex Christensen.
822 No new tests, no change in behavior.
824 Adding WEBCORE_EXPORT to functions now used in WebKit.
826 * platform/network/NetworkStorageSession.h:
827 * platform/network/curl/CookieJarDB.h:
828 * platform/network/curl/CurlContext.h:
830 2018-03-01 Commit Queue <commit-queue@webkit.org>
832 Unreviewed, rolling out r229130.
833 https://bugs.webkit.org/show_bug.cgi?id=183244
835 It breaks AppleWin compilation (Requested by alexg__ on
840 "Make LibWebRTCProvider port agnostic again after r215424"
841 https://bugs.webkit.org/show_bug.cgi?id=183080
842 https://trac.webkit.org/changeset/229130
844 2018-03-01 Alejandro G. Castro <alex@igalia.com>
846 Make LibWebRTCProvider port agnostic again after r215424
847 https://bugs.webkit.org/show_bug.cgi?id=183080
849 Reviewed by Youenn Fablet.
851 In the r215424 commit the webRTCAvailable function started to use a function from the DARWIN platform,
852 we have moved that code to the cocoa class and created a glib implementation that will be used in the future
853 to implement the LibWebRTCProviderGlib class.
855 No new tests, this is a refactor.
857 * Sources.txt: Add the compilation of the new file.
858 * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: Remove the webRTCAvailable function from this file.
859 (WebCore::LibWebRTCProvider::create): We want to use this even when LIBWEBRTC is not used.
860 * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
861 (WebCore::LibWebRTCProvider::webRTCAvailable): Moved the code from the LibWebRTCProvider class.
862 * platform/mediastream/libwebrtc/LibWebRTCProviderGlib.cpp:
863 (WebCore::LibWebRTCProvider::webRTCAvailable): Add the glib implementation, basically true, we are always
864 linking libwebrtc for the moment in these situations.
866 2018-03-01 Carlos Garcia Campos <cgarcia@igalia.com>
868 [FreeType] Color emojis in WebKitGTK+ for great justice
869 https://bugs.webkit.org/show_bug.cgi?id=183155
871 Reviewed by Michael Catanzaro.
873 Emojis are actually rendered if there's an emoji font installed in the system, but the size is so tiny that we
874 don't see them. This is because for some reason the matrix we are getting from fontconfig contains a scale,
875 which we don't expect. We only get the fontconfig matrix to apply rotations in case of oblique fonts, and then we
876 always apply the scale for the computed pixel font size. Ignoring the fontconfig matrix scale fixes the issue.
878 * platform/graphics/freetype/FontCacheFreeType.cpp:
879 (WebCore::fontWeightToFontconfigWeight): Moved here since it's now used by configurePatternForFontDescription().
880 (WebCore::configurePatternForFontDescription): Helper function to apply the same options for fallback pattern.
881 (WebCore::createFontConfigPatternForCharacters): Use configurePatternForFontDescription().
882 (WebCore::findBestFontGivenFallbacks): Adopt the returned reference.
883 (WebCore::FontCache::systemFallbackForCharacters): Clean it up.
884 (WebCore::FontCache::createFontPlatformData): Use configurePatternForFontDescription().
885 * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
886 (WebCore::FontPlatformData::buildScaledFont): Ignore the scale returned by fontconfig matrix.
888 2018-02-28 Philippe Normand <pnormand@igalia.com>
890 [GStreamer] text samples no longer processed
891 https://bugs.webkit.org/show_bug.cgi?id=183212
893 Reviewed by Xabier Rodriguez-Calvar.
895 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
896 (WebCore::MediaPlayerPrivateGStreamer::newTextSample): Refer to
897 track stream ID instead of (potentially) manually generated track
898 ID stored as hashmap keys.
900 2018-02-28 Tim Horton <timothy_horton@apple.com>
902 Push WTF_PLATFORM_IOS down into preprocessor.pm instead of trying to determine it inside
903 https://bugs.webkit.org/show_bug.cgi?id=183193
905 Reviewed by Andy Estes.
907 * DerivedSources.make:
908 * bindings/scripts/preprocessor.pm:
910 Instead of trying to discern WTF_PLATFORM_IOS inside preprocessor.pm,
911 push it down from DerivedSources.make. Also clean up DerivedSources.make
912 a tiny bit by adding a variable, FEATURE_AND_PLATFORM_DEFINES, which
913 contains both FEATURE_DEFINES and WTF_PLATFORM macros if needed.
915 2018-02-28 Nan Wang <n_wang@apple.com>
917 AX: AOM: Dispatch accessiblesetvalue event
918 https://bugs.webkit.org/show_bug.cgi?id=183021
919 <rdar://problem/37764242>
921 Reviewed by Chris Fleizach.
923 Accessibility events.
924 Spec: https://wicg.github.io/aom/spec/phase2.html
926 Added a new event type AccessibleSetValueEvent.
928 Test: accessibility/mac/AOM-event-accessiblesetvalue.html
931 * DerivedSources.make:
933 * WebCore.xcodeproj/project.pbxproj:
934 * accessibility/AccessibilityAllInOne.cpp:
935 * accessibility/AccessibilityNodeObject.cpp:
936 (WebCore::AccessibilityNodeObject::canSetValueAttribute const):
937 * accessibility/AccessibilityObject.cpp:
938 (WebCore::AccessibilityObject::press):
939 (WebCore::AccessibilityObject::dispatchAccessibilityEvent):
940 (WebCore::AccessibilityObject::dispatchAccessibleSetValueEvent):
941 * accessibility/AccessibilityObject.h:
942 * accessibility/AccessibilityRenderObject.cpp:
943 (WebCore::AccessibilityRenderObject::setValue):
944 * accessibility/AccessibilityScrollbar.cpp:
945 (WebCore::AccessibilityScrollbar::setValue):
946 * accessibility/AccessibilitySlider.cpp:
947 (WebCore::AccessibilitySlider::setValue):
948 * accessibility/AccessibleSetValueEvent.cpp: Added.
949 (WebCore::AccessibleSetValueEvent::AccessibleSetValueEvent):
950 * accessibility/AccessibleSetValueEvent.h: Added.
951 (WebCore::AccessibleSetValueEvent::create):
952 (WebCore::AccessibleSetValueEvent::value const):
953 * accessibility/AccessibleSetValueEvent.idl: Added.
958 2018-02-28 Chris Dumez <cdumez@apple.com>
960 html/browsers/browsing-the-web/navigating-across-documents/006.html fails with async policy delegates
961 https://bugs.webkit.org/show_bug.cgi?id=183168
962 <rdar://problem/37951341>
964 Reviewed by Alex Christensen.
966 The test has an anchor element with both a 'click' event handler which submits a form
967 and an href attribute. When clicking the link, as per specification, things happen in
969 1. We fire the click event at the anchor, which will execute the event handler and submit the form.
970 Submitting the form *schedules* a navigation to 'click.html'.
971 2. We execute the anchor activation code which *navigates* to 'href.html'. The navigation to
972 'href' is supposed to cancel the pending navigation to 'click.html' and we should navigate
973 to 'href.html', which is what the test asserts.
975 The issue for us is that we do not cancel pending navigations until after the navigation
976 policy decision is made, when the provisional loads actually starts, in FrameLoader::provisionalLoadStarted().
977 Because the policy decision for the navigation can now be made asynchronously, the NavigationScheduler
978 timer can now fire while the decision is made and we'll submit the form, thus navigating to
981 To address the issue, we now cancel any pending navigations in FrameLoader::loadWithDocumentLoader(),
982 *before* doing the policy check for the navigation.
984 Test: http/wpt/html/browsers/browsing-the-web/navigating-across-documents/006.html
986 * loader/FrameLoader.cpp:
987 (WebCore::FrameLoader::loadWithDocumentLoader):
989 2018-02-28 John Wilander <wilander@apple.com>
991 Add a second tier of prevalence to facilitate telemetry on very prevalent domains
992 https://bugs.webkit.org/show_bug.cgi?id=183218
993 <rdar://problem/37992388>
995 Reviewed by Brent Fulgham.
997 Test: http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics.html
999 * loader/ResourceLoadStatistics.cpp:
1000 (WebCore::ResourceLoadStatistics::encode const):
1001 (WebCore::ResourceLoadStatistics::decode):
1002 (WebCore::ResourceLoadStatistics::toString const):
1003 (WebCore::ResourceLoadStatistics::merge):
1004 Handling of the new boolean field isVeryPrevalentResource.
1005 * loader/ResourceLoadStatistics.h:
1006 Added the new boolean field isVeryPrevalentResource.
1008 2018-02-28 Alex Christensen <achristensen@webkit.org>
1010 Reduce use of NetworkingContext in WebKit
1011 https://bugs.webkit.org/show_bug.cgi?id=183213
1013 Reviewed by Brady Eidson.
1015 NetworkingContext is intended to be used only with ResourceHandle, which is now only used in WebKitLegacy.
1016 Now that we don't use ResourceHandle in the WebProcess, everything that was done through the NetworkingContext
1017 can now be done a cleaner way with no change in behavior.
1019 * loader/FrameLoader.cpp:
1020 (WebCore::FrameLoader::loadResourceSynchronously):
1021 * loader/LinkLoader.cpp:
1022 (WebCore::LinkLoader::loadLink):
1023 * loader/LoaderStrategy.h:
1024 * platform/network/ProxyServer.h:
1025 * platform/network/cf/ProxyServerCFNet.cpp:
1026 (WebCore::proxyServersForURL):
1027 * platform/network/curl/ProxyServerCurl.cpp:
1028 (WebCore::proxyServersForURL):
1029 * platform/network/soup/ProxyServerSoup.cpp:
1030 (WebCore::proxyServersForURL):
1032 2018-02-28 Zalan Bujtas <zalan@apple.com>
1034 Remove RenderElement::s_affectsParentBlock
1035 https://bugs.webkit.org/show_bug.cgi?id=183187
1036 <rdar://problem/37961079>
1038 Reviewed by Antti Koivisto.
1040 Remove the hack to track floating/out-of-flow changes between styleWillChange and styleDidChange.
1042 Covered by existing tests.
1044 * rendering/RenderElement.cpp:
1045 (WebCore::RenderElement::styleWillChange):
1046 (WebCore::RenderElement::styleDidChange):
1047 * rendering/RenderElement.h:
1049 2018-02-28 Antti Koivisto <antti@apple.com>
1051 Filter attribute selectors with selector filter
1052 https://bugs.webkit.org/show_bug.cgi?id=183200
1054 Reviewed by Zalan Bujtas.
1056 Currently selector filtering is done based on tags, classes and ids. We should include attributes too.
1058 This patch adds filtering based on attribute name (but not content).
1060 * css/SelectorFilter.cpp:
1061 (WebCore::isExcludedAttribute):
1063 Ignore id, class and style attributes. First two are already handled and the last is common but is rarely
1066 (WebCore::collectElementIdentifierHashes):
1069 Remove the unnecessary StyledElement casting.
1071 (WebCore::collectSimpleSelectorHash):
1073 Collect attribute selectors.
1075 (WebCore::chooseSelectorHashesForFilter):
1077 Pick attributes with high priority for the filter as it is likely a good signal.
1079 2018-02-27 Sergio Villar Senin <svillar@igalia.com>
1081 [WebVR] Convert VRPlatformDisplayInfo into a class
1082 https://bugs.webkit.org/show_bug.cgi?id=183162
1084 Reviewed by Žan Doberšek.
1086 In preparation for further changes we're transforming the
1087 VRPlatformDisplayInfo into a class. All the members are now private
1088 and the class provides the needed getters/setters.
1090 Apart from that VRDisplayCapabilityFlags is now just an unsigned and
1091 the different flags are defined in VRDisplayCapabilityFlag enum.
1092 Another cleanup was the removal of VRDisplayCapabilities.cpp as
1093 everything can be implemented in the header.
1095 * Modules/webvr/VRDisplay.cpp:
1096 (WebCore::VRDisplay::VRDisplay):
1097 (WebCore::VRDisplay::isConnected const):
1098 (WebCore::VRDisplay::stageParameters const):
1099 * Modules/webvr/VRDisplayCapabilities.cpp: Removed.
1100 * Modules/webvr/VRDisplayCapabilities.h:
1101 (WebCore::VRDisplayCapabilities::hasPosition const):
1102 (WebCore::VRDisplayCapabilities::hasOrientation const):
1103 (WebCore::VRDisplayCapabilities::hasExternalDisplay const):
1104 (WebCore::VRDisplayCapabilities::canPresent const):
1105 (WebCore::VRDisplayCapabilities::maxLayer const):
1106 (WebCore::VRDisplayCapabilities::VRDisplayCapabilities):
1108 * platform/vr/VRPlatformDisplay.h:
1109 (WebCore::VRPlatformDisplayInfo::displayName const):
1110 (WebCore::VRPlatformDisplayInfo::setDisplayName):
1111 (WebCore::VRPlatformDisplayInfo::isConnected const):
1112 (WebCore::VRPlatformDisplayInfo::setIsConnected):
1113 (WebCore::VRPlatformDisplayInfo::isMounted const):
1114 (WebCore::VRPlatformDisplayInfo::setIsMounted):
1115 (WebCore::VRPlatformDisplayInfo::capabilityFlags const):
1116 (WebCore::VRPlatformDisplayInfo::setCapabilityFlags):
1117 (WebCore::VRPlatformDisplayInfo::displayIdentifier const):
1118 (WebCore::VRPlatformDisplayInfo::setDisplayIdentifier):
1119 (WebCore::VRPlatformDisplayInfo::eyeTranslation const):
1120 (WebCore::VRPlatformDisplayInfo::setEyeTranslation):
1121 (WebCore::VRPlatformDisplayInfo::eyeFieldOfView const):
1122 (WebCore::VRPlatformDisplayInfo::setEyeFieldOfView):
1123 (WebCore::VRPlatformDisplayInfo::renderSize const):
1124 (WebCore::VRPlatformDisplayInfo::setRenderSize):
1125 (WebCore::VRPlatformDisplayInfo::setPlayAreaBounds):
1126 (WebCore::VRPlatformDisplayInfo::playAreaBounds const):
1127 (WebCore::VRPlatformDisplayInfo::setSittingToStandingTransform):
1128 (WebCore::VRPlatformDisplayInfo::sittingToStandingTransform const):
1129 * platform/vr/openvr/VRPlatformDisplayOpenVR.cpp:
1130 (WebCore::VRPlatformDisplayOpenVR::VRPlatformDisplayOpenVR):
1131 (WebCore::VRPlatformDisplayOpenVR::updateEyeParameters):
1132 (WebCore::VRPlatformDisplayOpenVR::updateStageParameters):
1134 2018-02-27 Commit Queue <commit-queue@webkit.org>
1136 Unreviewed, rolling out r229060.
1137 https://bugs.webkit.org/show_bug.cgi?id=183198
1139 This patch causes crashes on two SVG tests (Requested by fredw
1144 "Relayout frames after AsyncFrameScrolling or FrameFlattening
1146 https://bugs.webkit.org/show_bug.cgi?id=183081
1147 https://trac.webkit.org/changeset/229060
1149 2018-02-27 Youenn Fablet <youenn@apple.com>
1151 Do not trigger a service worker match in case of document redirection if it will be already served by AppCache
1152 https://bugs.webkit.org/show_bug.cgi?id=183185
1153 <rdar://problem/37693796>
1155 Reviewed by Chris Dumez.
1157 Disabling service worker matching in case there is a substitute data.
1158 Otherwise there is a risk for a double load, substitute data first and the new load
1159 triggered if matching a new registration.
1160 A future fix should first do service worker registration matching and if there is no registration query appcache.
1162 Test: http/tests/appcache/main-resource-redirect-with-sw.html
1164 * loader/DocumentLoader.cpp:
1165 (WebCore::DocumentLoader::redirectReceived):
1167 2018-02-27 Tim Horton <timothy_horton@apple.com>
1169 Ensure target triple is propagated correctly to DerivedSources.make
1170 https://bugs.webkit.org/show_bug.cgi?id=183189
1171 <rdar://problem/37959694>
1173 Reviewed by Dan Bernstein.
1175 If we don't propagate the target triple, we can sometimes build with
1176 the wrong options enabled.
1178 * Configurations/Base.xcconfig:
1179 Mentioning LLVM_TARGET_TRIPLE_SUFFIX here is required to get it to be available to scripts.
1181 * DerivedSources.make:
1182 Propagate the target triple into our compiler invocations.
1184 2018-02-27 Doug Russell <doug@getitdownonpaper.com>
1186 AX: Spell check and style attributes should be optional when fetching attributed string
1187 https://bugs.webkit.org/show_bug.cgi?id=160744
1189 Reviewed by Chris Fleizach.
1191 The overhead of fetching a spell checked attributed string via AX API is substantial.
1192 In some cases on the order of 7/8 of the total time spent fetching the string.
1194 This change introduces the new attribute AXAttributedStringForTextMarkerRangeWithOptions which accepts an NSDictionary as it's parameter with keys "AXTextMarkerRange" (AXTextMarkerRangeRef) and "AXSpellCheck" (NSNumber(BOOL)).
1196 AXAttributedStringForTextMarkerRange will remain unchanged.
1198 Tests: accessibility/mac/attributed-string/attributed-string-for-range-with-options.html
1199 accessibility/mac/attributed-string/attributed-string-for-range.html
1201 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1202 (AXAttributedStringAppendText):
1203 (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
1204 (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
1205 (-[WebAccessibilityObjectWrapper doAXAttributedStringForRange:]):
1206 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
1207 (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]): Deleted.
1209 2018-02-27 Daniel Bates <dabates@apple.com>
1211 Standardize terminology for marked text
1212 https://bugs.webkit.org/show_bug.cgi?id=180999
1214 Reviewed by Zalan Bujtas.
1216 The name MarkerSubrange is a misnomer for a data structure that associates a text subrange with a type
1217 and optional document marker. In particular, a MarkerSubrange may not always correspond to a document
1218 marker. For instance, selected text is represented using a MarkerSubrange that does not have a
1219 corresponding document marker. Let's standardize on the phrase "marked text" as the canonical way to
1220 describe these tagged text subranges.
1223 * WebCore.xcodeproj/project.pbxproj:
1224 * rendering/InlineTextBox.cpp:
1225 (WebCore::InlineTextBox::localSelectionRect const):
1226 (WebCore::InlineTextBox::MarkedTextStyle::areBackgroundMarkedTextStylesEqual):
1227 (WebCore::InlineTextBox::MarkedTextStyle::areForegroundMarkedTextStylesEqual):
1228 (WebCore::InlineTextBox::MarkedTextStyle::areDecorationMarkedTextStylesEqual):
1229 (WebCore::InlineTextBox::StyledMarkedText::StyledMarkedText):
1230 (WebCore::createMarkedTextFromSelectionInBox):
1231 (WebCore::InlineTextBox::paint):
1232 (WebCore::InlineTextBox::paintPlatformDocumentMarkers):
1233 (WebCore::InlineTextBox::paintPlatformDocumentMarker):
1234 (WebCore::InlineTextBox::computeStyleForUnmarkedMarkedText const):
1235 (WebCore::InlineTextBox::resolveStyleForMarkedText):
1236 (WebCore::InlineTextBox::subdivideAndResolveStyle):
1237 (WebCore::InlineTextBox::coalesceAdjacentMarkedTexts):
1238 (WebCore::InlineTextBox::collectMarkedTextsForDraggedContent):
1239 (WebCore::InlineTextBox::collectMarkedTextsForDocumentMarkers):
1240 (WebCore::InlineTextBox::paintMarkedTexts):
1241 (WebCore::InlineTextBox::paintMarkedTextBackground):
1242 (WebCore::InlineTextBox::paintMarkedTextForeground):
1243 (WebCore::InlineTextBox::paintMarkedTextDecoration):
1244 (WebCore::InlineTextBox::paintCompositionBackground):
1245 (WebCore::InlineTextBox::MarkerSubrangeStyle::areBackgroundMarkerSubrangeStylesEqual): Deleted.
1246 (WebCore::InlineTextBox::MarkerSubrangeStyle::areForegroundMarkerSubrangeStylesEqual): Deleted.
1247 (WebCore::InlineTextBox::MarkerSubrangeStyle::areDecorationMarkerSubrangeStylesEqual): Deleted.
1248 (WebCore::InlineTextBox::StyledMarkerSubrange::StyledMarkerSubrange): Deleted.
1249 (WebCore::createMarkerSubrangeFromSelectionInBox): Deleted.
1250 (WebCore::InlineTextBox::computeStyleForUnmarkedMarkerSubrange const): Deleted.
1251 (WebCore::InlineTextBox::resolveStyleForSubrange): Deleted.
1252 (WebCore::InlineTextBox::coalesceAdjacentSubranges): Deleted.
1253 (WebCore::InlineTextBox::collectSubrangesForDraggedContent): Deleted.
1254 (WebCore::InlineTextBox::collectSubrangesForDocumentMarkers): Deleted.
1255 (WebCore::InlineTextBox::paintMarkerSubranges): Deleted.
1256 (WebCore::InlineTextBox::paintTextSubrangeBackground): Deleted.
1257 (WebCore::InlineTextBox::paintTextSubrangeForeground): Deleted.
1258 (WebCore::InlineTextBox::paintTextSubrangeDecoration): Deleted.
1259 * rendering/InlineTextBox.h:
1260 (WebCore::InlineTextBox::paintMarkedTexts):
1261 (WebCore::InlineTextBox::paintMarkerSubranges): Deleted.
1262 * rendering/MarkedText.cpp: Renamed from Source/WebCore/rendering/MarkerSubrange.cpp.
1263 (WebCore::subdivide):
1264 * rendering/MarkedText.h: Renamed from Source/WebCore/rendering/MarkerSubrange.h.
1265 (WebCore::MarkedText::MarkedText):
1266 (WebCore::MarkedText::isEmpty const):
1267 (WebCore::MarkedText::operator!= const):
1268 (WebCore::MarkedText::operator== const):
1270 2018-02-27 Chris Dumez <cdumez@apple.com>
1272 Unreviewed, roll out r228430.
1274 Roll out r228430 now that it is no longer needed after r228852.
1276 No new tests, initial fix is still covered by WebKit.RespondToPolicyForNavigationResponseAsynchronously
1279 * loader/FrameLoader.cpp:
1280 (WebCore::FrameLoader::stopLoading):
1281 * loader/NavigationScheduler.cpp:
1282 (WebCore::NavigationScheduler::schedule):
1284 2018-02-27 Antoine Quint <graouts@apple.com>
1286 [Web Animations] Correct implementation of pending tasks and promises
1287 https://bugs.webkit.org/show_bug.cgi?id=183161
1289 Reviewed by Dean Jackson.
1291 We had an incorrect implementation of the spec due to two misinterpretations.
1293 The first one is about pending tasks (play and pause) which the spec says should
1294 be performed by "scheduling a task". In WebCore, this means using postTask() on a
1295 ScriptExecutionContext, such as Document. One of the big practical changes is that
1296 calling play() on an animation correctly sets its startTime to null (unresolved)
1297 immediately after the call to play() returns before setting it to a resolved value
1298 when the task is performed asynchronously. As a result, the playState is now always
1301 The second one is about promises where new promises need to be created in certain
1302 situations called out by the spec. We used to call clear() on them, but this merely
1303 resets the fulfillment or rejection state of the promise, while the spec requires
1304 a different object to be returned for the promise. We now create our promises using
1305 makeUniqueRef<> when new promise objects are expected to be created.
1307 This patch also corrects a few smaller bugs and spec compliant issues, called out
1308 below, related to pending tasks and promises uncovered while looking at relevant
1311 * animation/DocumentTimeline.h: Expose the Document used to create this timeline such
1312 that it may be used by WebAnimation objects registered for this timeline when scheduling
1313 a task is required via postTask().
1314 * animation/WebAnimation.cpp:
1315 (WebCore::WebAnimation::WebAnimation):
1316 (WebCore::WebAnimation::setBindingsStartTime):
1317 (WebCore::WebAnimation::setCurrentTime):
1318 (WebCore::WebAnimation::cancel): Ensure the finished promise has not already been fulfilled
1319 before rejecting it. While the spec does not specifically call this out, a promise may not
1320 be rejected after being fulfilled, and we would hit an ASSERT if we didn't also check that
1321 it was in the correct pending state before attemping to reject it.
1322 (WebCore::WebAnimation::resetPendingTasks):
1323 (WebCore::WebAnimation::finish):
1324 (WebCore::WebAnimation::updateFinishedState):
1325 (WebCore::WebAnimation::finishNotificationSteps):
1326 (WebCore::WebAnimation::play): We used to only check for a pending pause task before canceling
1327 that task, but the spec says to check for either a pending pause or play task (ie. pending())
1328 and to cancel whichever is scheduled.
1329 (WebCore::WebAnimation::runPendingPlayTask): We were missing an assertion called out by the
1330 spec when running a pending task.
1331 (WebCore::WebAnimation::pause):
1332 (WebCore::WebAnimation::runPendingPauseTask):
1333 (WebCore::WebAnimation::updatePendingTasks): We now use postTask() on the animation's associated
1334 timeline's document to schedule pending tasks for which the criteria to run are met, ie. there
1335 is an associated timeline.
1336 * animation/WebAnimation.h:
1338 2018-02-27 Wenson Hsieh <wenson_hsieh@apple.com>
1340 [Extra zoom mode] Implement additional SPI for adjusting viewport shrink-to-fit behavior
1341 https://bugs.webkit.org/show_bug.cgi?id=183100
1342 <rdar://problem/37840987>
1344 Reviewed by Tim Horton.
1346 Introduce new customization options to ViewportConfiguration. The first is m_forceHorizontalShrinkToFit, which
1347 (when set to true) forces the viewport to scale using shrink-to-fit heuristics, regardless of whether
1348 "shrink-to-fit=no" is specified via viewport parameters or if content width did not exceed minimum layout size.
1349 The second is m_viewSize, which reflects the true size of the viewport. See WebKit ChangeLog for more details.
1351 Tests: ViewportSizingTests.ForceShrinkToFitViewportOverridesViewportParameters
1352 ViewportSizingTests.ShrinkToFitViewportWithMinimumAllowedLayoutWidth
1354 * page/ViewportConfiguration.cpp:
1355 (WebCore::ViewportConfiguration::ViewportConfiguration):
1356 (WebCore::ViewportConfiguration::setMinimumLayoutSize):
1358 Plumb the real size of the view alongside the minimum layout size when updating the minimum layout size.
1360 (WebCore::ViewportConfiguration::setForceHorizontalShrinkToFit):
1361 (WebCore::ViewportConfiguration::shouldIgnoreHorizontalScalingConstraints const):
1363 Bail early and return true if forceHorizontalShrinkToFit is set. This forces shrink-to-fit even in cases where
1364 "shrink-to-fit" is set to "no", or content dimensions don't exceed layout dimensions.
1366 (WebCore::ViewportConfiguration::initialScaleFromSize const):
1368 Use view dimensions rather than minimum layout dimensions when computing the initial scale. Minimum layout size
1369 is no longer always equal to the size of the view if the client has specified a minimum allowed layout width. As
1370 such, when computing the initial scale, to ensure that the content (which was laid out using the minimum layout
1371 size) fits within the real viewport, we need to divide real viewport dimensions by content dimensions.
1373 (WebCore::ViewportConfiguration::minimumScale const):
1375 Similarly, use view size instead of minimum layout size to compute minimum scale.
1377 (WebCore::ViewportConfiguration::description const):
1378 * page/ViewportConfiguration.h:
1380 2018-02-27 Wenson Hsieh <wenson_hsieh@apple.com>
1382 Unreviewed, fix the debug build after r228877.
1384 In the case where CAN_DISALLOW_USER_INSTALLED_FONTS is enabled, this function doesn't return anything when
1385 allowUserInstalledFonts != AllowUserInstalledFonts::No. Fix the build by moving `return nullptr;` back out of
1388 * platform/graphics/cocoa/FontCacheCoreText.cpp:
1389 (WebCore::installedFontMandatoryAttributes):
1391 2018-02-27 Milan Crha <mcrha@redhat.com>
1393 Potential privacy issue: DNS prefetching can be re-enabled
1394 https://bugs.webkit.org/show_bug.cgi?id=182924
1396 Reviewed by Michael Catanzaro.
1399 (WebCore::Document::parseDNSPrefetchControlHeader):
1401 2018-02-26 Antoine Quint <graouts@apple.com>
1403 [Web Animations] Implement the procedure to set the target effect of an animation
1404 https://bugs.webkit.org/show_bug.cgi?id=183146
1406 Reviewed by Dean Jackson.
1408 We only had a partial implementation of setEffect() and we now update it to cover the entire
1409 implementation as mandated by the spec. While this doesn't yield any WPT results changes, this
1410 patch will help getting a significant number of new PASS results when we get around to implement
1411 correct support for async procedures (pending pause/play tasks and promises) in the next patch.
1413 * animation/WebAnimation.cpp:
1414 (WebCore::WebAnimation::setEffect):
1416 2018-02-26 Antoine Quint <graouts@apple.com>
1418 [Web Animations] Update the playState implementation
1419 https://bugs.webkit.org/show_bug.cgi?id=183145
1421 Reviewed by Dean Jackson.
1423 The Web Animations spec has changed since we first implemented the playState property and the "pending"
1424 enum value has been dropped since then (there is a separate "pending" property which we also implement).
1425 We update our implementation to match the latest spec text. This does not change WPT test results a lot,
1426 but this patch will help getting a significant number of new PASS results when we get around to implementing
1427 correct support for async procedures (pending pause/play tasks and promises) in a couple of patches.
1429 * animation/WebAnimation.cpp:
1430 (WebCore::WebAnimation::playState const):
1431 * animation/WebAnimation.h:
1432 * animation/WebAnimation.idl:
1434 2018-02-27 Wenson Hsieh <wenson_hsieh@apple.com>
1436 Address post-review comment after r229049.
1437 https://bugs.webkit.org/show_bug.cgi?id=183142
1439 Reviewed by Tim Horton.
1441 Wrap a newly added string literal with ASCIILiteral.
1443 * rendering/RenderThemeIOS.mm:
1444 (WebCore::RenderThemeIOS::extraDefaultStyleSheet):
1446 2018-02-26 Mark Lam <mark.lam@apple.com>
1448 Modernize FINALIZE_CODE and peer macros to use __VA_ARGS__ arguments.
1449 https://bugs.webkit.org/show_bug.cgi?id=183159
1450 <rdar://problem/37930837>
1452 Reviewed by Keith Miller.
1454 No new tests needed because this is just a refactoring patch.
1456 * cssjit/SelectorCompiler.cpp:
1457 (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
1459 2018-02-26 Dan Bernstein <mitz@apple.com>
1461 Removed references to files that were removed in r228912.
1463 * WebCore.xcodeproj/project.pbxproj: Removed references to SourcesIOS.txt and SourcesMac.txt.
1465 2018-02-26 Wenson Hsieh <wenson_hsieh@apple.com>
1467 [Extra zoom mode] Tweak UA stylesheet to improve legibility of rendered text
1468 https://bugs.webkit.org/show_bug.cgi?id=183142
1469 <rdar://problem/37912966>
1471 Reviewed by Tim Horton.
1473 Force text-size-adjust and hyphens to be always on in EXTRA_ZOOM_MODE. To accomplish this, we override the extra
1474 style sheet in RenderTheme to include these two style rules.
1476 * rendering/RenderThemeIOS.h:
1477 * rendering/RenderThemeIOS.mm:
1478 (WebCore::RenderThemeIOS::extraDefaultStyleSheet):
1480 2018-02-26 Don Olmstead <don.olmstead@sony.com>
1482 Fix WebCore includes within WebKitLegacy
1483 https://bugs.webkit.org/show_bug.cgi?id=183147
1485 Reviewed by Tim Horton.
1487 No new tests. No change in behavior.
1489 * PlatformWin.cmake:
1490 * platform/win/GDIUtilities.h:
1492 2018-02-26 Youenn Fablet <youenn@apple.com>
1494 Add some more release logging related to DocumentWriter::addData crash
1495 https://bugs.webkit.org/show_bug.cgi?id=183141
1497 Reviewed by Chris Dumez.
1499 No change of behavior.
1500 Add some additional release logging to verify whether DocumentWriter::begin was called and exited before updating its state.
1502 * loader/DocumentLoader.cpp:
1503 (WebCore::DocumentLoader::commitData):
1504 * loader/DocumentWriter.cpp:
1505 (WebCore::DocumentWriter::begin):
1506 * loader/DocumentWriter.h:
1508 2018-02-26 Antoine Quint <graouts@apple.com>
1510 [Web Animations] Implement the procedure to set the start time
1511 https://bugs.webkit.org/show_bug.cgi?id=183137
1513 Reviewed by Dean Jackson.
1515 Implement the procedure to set the start time as setBindingsStartTime() and use the setStartTime() method as
1516 an internal method to set the m_startTime instance variable and invalidate the timing model rather than run
1517 the entire procedure which should only be called when setting the "startTime" property through the JS API.
1519 * animation/WebAnimation.cpp:
1520 (WebCore::WebAnimation::setTimeline):
1521 (WebCore::WebAnimation::setBindingsStartTime):
1522 (WebCore::WebAnimation::setStartTime):
1523 (WebCore::WebAnimation::silentlySetCurrentTime):
1524 (WebCore::WebAnimation::finish):
1525 (WebCore::WebAnimation::updateFinishedState):
1526 (WebCore::WebAnimation::runPendingPlayTask):
1527 (WebCore::WebAnimation::runPendingPauseTask):
1529 2018-02-26 Christopher Reid <chris.reid@sony.com>
1531 [Curl] Cookies are not being added to the Cookie field in Request Headers
1532 https://bugs.webkit.org/show_bug.cgi?id=183095
1534 Reviewed by Alex Christensen.
1536 Populating the Cookie request header field now that cookies are no longer handled in libcurl.
1538 * platform/network/curl/CookieJarCurlDatabase.cpp: Renaming the httpOnly variable as its actual use wasn't clear
1539 * platform/network/curl/ResourceHandleCurl.cpp:
1541 2018-02-26 Antoine Quint <graouts@apple.com>
1543 [Web Animations] Ensure setting the hold time invalidates the timing model
1544 https://bugs.webkit.org/show_bug.cgi?id=183136
1546 Reviewed by Dean Jackson.
1548 We used to always set the m_holdTime member variable directly, but the computation of the currentTime
1549 depends on the value of m_holdTime, so setting the hold time should invalidate the timing model as well
1550 as setting the m_holdTime member variable. In this patch we add a new setHoldTime() private method that
1551 sets the member variable and invalidates the timing model.
1553 * animation/WebAnimation.cpp:
1554 (WebCore::WebAnimation::setTimeline):
1555 (WebCore::WebAnimation::setHoldTime):
1556 (WebCore::WebAnimation::silentlySetCurrentTime):
1557 (WebCore::WebAnimation::setCurrentTime):
1558 (WebCore::WebAnimation::cancel):
1559 (WebCore::WebAnimation::finish):
1560 (WebCore::WebAnimation::updateFinishedState):
1561 (WebCore::WebAnimation::play):
1562 (WebCore::WebAnimation::runPendingPlayTask):
1563 (WebCore::WebAnimation::pause):
1564 (WebCore::WebAnimation::runPendingPauseTask):
1565 * animation/WebAnimation.h:
1567 2018-02-26 Youenn Fablet <youenn@apple.com>
1569 MessagePort is not always destroyed in the right thread
1570 https://bugs.webkit.org/show_bug.cgi?id=183053
1572 Reviewed by Chris Dumez.
1574 Make existingMessagePortForIdentifier take a lambda so that we hold the lock until there
1575 is no longer a need to keep the MessagePort around.
1576 This is very time sensitive and does not happen a lot when running WPT tests.
1578 Update existing call sites to pass a lambda.
1580 * dom/MessagePort.cpp:
1581 (WebCore::MessagePort::existingMessagePortForIdentifier):
1582 * dom/MessagePort.h:
1583 * dom/messageports/MessagePortChannelProviderImpl.cpp:
1584 (WebCore::MessagePortChannelProviderImpl::postMessageToRemote):
1585 (WebCore::MessagePortChannelProviderImpl::checkProcessLocalPortForActivity):
1587 2018-02-26 Commit Queue <commit-queue@webkit.org>
1589 Unreviewed, rolling out r226745.
1590 https://bugs.webkit.org/show_bug.cgi?id=183132
1592 This is breaking some websites (Requested by youenn on
1597 "Use no-cache fetch mode when loading main documents with
1599 https://bugs.webkit.org/show_bug.cgi?id=181285
1600 https://trac.webkit.org/changeset/226745
1602 2018-02-26 Philippe Normand <pnormand@igalia.com>
1604 Unreviewed, USE_GSTREAMER_PLAYBIN3 build fix.
1606 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1607 There is no such ENABLE_GSTREAMER_PLAYBIN3.
1609 2018-02-26 Philippe Normand <pnormand@igalia.com>
1611 Unreviewed, manual rollout of r228866 causing EGL_BAD_CONTEXT errors
1613 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1614 (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
1615 Create an EGL display, even in Wayland.
1617 2018-02-21 Sergio Villar Senin <svillar@igalia.com>
1619 [WebVR][OpenVR] Retrieve displayId and the z-depth of eye view frustum
1620 https://bugs.webkit.org/show_bug.cgi?id=182999
1622 Reviewed by Žan Doberšek.
1624 Retrieve the z-depth of the eye view frustum and the HMD unique id.
1625 The unique identifier is generated by the VRPlatormManager whereas
1626 we use the default values from the spec for the z-depth (those can
1627 be changed by applications later via JavaScript).
1629 Once this lands the only remaining data to be retrieved from VR
1630 backends for VRDisplay is the pose (getPose() call) and the frame
1631 data (getFrameData() call).
1633 * Modules/webvr/VRDisplay.cpp:
1634 (WebCore::VRDisplay::VRDisplay):
1635 (WebCore::VRDisplay::displayId const): Deleted.
1636 (WebCore::VRDisplay::displayName const): Deleted.
1637 (WebCore::VRDisplay::depthNear const): Deleted.
1638 (WebCore::VRDisplay::setDepthNear): Deleted.
1639 (WebCore::VRDisplay::depthFar const): Deleted.
1640 (WebCore::VRDisplay::setDepthFar): Deleted.
1641 * Modules/webvr/VRDisplay.h:
1642 (WebCore::VRDisplay::displayId const): Moved implementation from
1644 (WebCore::VRDisplay::displayName const): Ditto.
1645 (WebCore::VRDisplay::depthNear const):
1646 (WebCore::VRDisplay::setDepthNear):
1647 (WebCore::VRDisplay::depthFar const):
1648 (WebCore::VRDisplay::setDepthFar):
1649 * platform/vr/VRManager.cpp:
1650 (WebCore::VRManager::generateUniqueDisplayIdentifier):
1651 * platform/vr/VRManager.h:
1652 * platform/vr/VRPlatformDisplay.h:
1653 * platform/vr/openvr/VRPlatformDisplayOpenVR.cpp:
1654 (WebCore::VRPlatformDisplayOpenVR::VRPlatformDisplayOpenVR):
1656 2018-02-26 Charlie Turner <cturner@igalia.com>
1658 Fix build error with !LOG_DISABLED
1659 https://bugs.webkit.org/show_bug.cgi?id=183049
1661 Reviewed by Philippe Normand.
1663 The following error message was being reported when doing a
1664 release build with -DLOG_DISABLED=0:
1666 ../../Source/WebCore/dom/messageports/MessagePortChannel.cpp: In member function ‘void WebCore::MessagePortChannel::entanglePortWithProcess(const WebCore::MessagePortIdentifier&, WebCore::ProcessIdentifier)’:
1667 ../../Source/WebCore/dom/messageports/MessagePortChannel.cpp:85:111: error: ‘logString’ was not declared in this scope
1668 LOG(MessagePorts, "MessagePortChannel %s (%p) entangling port %s (that port has %zu messages available)", logString().utf8().data(), this, port.logString().utf8().data(), m_pendingMessages[i].size());
1670 Other uses of logString are guarded by !LOG_DISABLED rather than
1671 NDEBUG, which was the cause of this issue.
1673 * dom/messageports/MessagePortChannel.h: Guard using !LOG_DISABLED
1676 2018-02-26 Carlos Garcia Campos <cgarcia@igalia.com>
1678 [GStreamer] User current executable name instead of g_get_prgname() for gst_init
1679 https://bugs.webkit.org/show_bug.cgi?id=183119
1681 Reviewed by Philippe Normand.
1683 g_get_prgname() is only set for programs using GOptionContext, calling gtk_init or explicitly calling
1684 g_set_prgname(). Use WTF::getCurrentExecutableName() instead.
1686 * platform/graphics/gstreamer/GStreamerUtilities.cpp:
1687 (WebCore::initializeGStreamer):
1689 2018-02-25 Wenson Hsieh <wenson_hsieh@apple.com>
1691 [Extra zoom mode] Disable downloadable binary fonts by default
1692 https://bugs.webkit.org/show_bug.cgi?id=183102
1693 <rdar://problem/37860699>
1695 Reviewed by Tim Horton.
1697 Disable downloadable binary fonts by default in extra zoom mode by making the initial value of
1698 `downloadableBinaryFontsEnabled` conditional. Layout tests are not possible at this time; test to be added once
1699 layout test support is in place.
1701 * page/Settings.yaml:
1702 * page/SettingsBase.cpp:
1703 (WebCore::SettingsBase::defaultDownloadableBinaryFontsEnabled):
1704 * page/SettingsBase.h:
1706 2018-02-25 Chris Dumez <cdumez@apple.com>
1708 Service workers do not work well inside Web.app
1709 https://bugs.webkit.org/show_bug.cgi?id=183105
1710 <rdar://problem/37864140>
1712 Reviewed by Youenn Fablet.
1714 SessionID::defaultSessionID() was hardcoded in the ServiceWorkerThread constructor
1715 instead of using the sessionID of the SWServer that created the service worker thread.
1716 As a result, when the Service Worker would establish a SWClientConnection to the
1717 server, it would use the wrong sessionID and would end up using a different SWServer
1718 (Since we have a different SWServer instance per sessionID). As a result,
1719 ServiceWorkerRegistration / ServiceWorker objects inside the service worker would not
1720 be kept in sync with the server (since they registered themselves with the wrong
1723 Covered by new API test.
1725 * workers/service/ServiceWorkerContextData.cpp:
1726 (WebCore::ServiceWorkerContextData::isolatedCopy const):
1727 * workers/service/ServiceWorkerContextData.h:
1728 (WebCore::ServiceWorkerContextData::encode const):
1729 (WebCore::ServiceWorkerContextData::decode):
1730 * workers/service/context/ServiceWorkerThread.cpp:
1731 (WebCore::ServiceWorkerThread::ServiceWorkerThread):
1732 * workers/service/context/ServiceWorkerThreadProxy.cpp:
1733 (WebCore::createPageForServiceWorker):
1734 (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):
1735 * workers/service/server/RegistrationDatabase.cpp:
1736 (WebCore::RegistrationDatabase::importRecords):
1737 * workers/service/server/RegistrationStore.h:
1738 (WebCore::RegistrationStore::server):
1739 * workers/service/server/SWServer.cpp:
1740 (WebCore::SWServer::updateWorker):
1741 * workers/service/server/SWServerWorker.cpp:
1742 (WebCore::SWServerWorker::contextData const):
1744 2018-02-24 Fujii Hironori <Hironori.Fujii@sony.com>
1746 Null-dereference of the second argument `resource` of DocumentLoader::scheduleSubstituteResourceLoad
1747 https://bugs.webkit.org/show_bug.cgi?id=182920
1749 Reviewed by Darin Adler.
1752 imported/w3c/web-platform-tests/html/browsers/offline/appcache/workers/appcache-worker.html
1753 always crashes due to a null-dereference if compiled and optimized
1754 by GCC 7.2. The second argument `resource` of
1755 DocumentLoader::scheduleSubstituteResourceLoad can be null if the
1756 resource can't be found in cache. I guess GCC optimizes inline
1757 HashMap::add based on assuming the `resource` never becomes null
1758 because its type is SubstituteResource&.
1760 This changes introduces a new method
1761 DocumentLoader::scheduleCannotShowURLError because it looks tricky
1762 to pass a nullptr to the second argument of
1763 scheduleSubstituteResourceLoad.
1765 No new tests (Covered by existing tests).
1767 * loader/DocumentLoader.cpp:
1768 (WebCore::DocumentLoader::scheduleCannotShowURLError): Added a new method.
1769 * loader/DocumentLoader.h:
1770 * loader/appcache/ApplicationCacheHost.cpp:
1771 (WebCore::ApplicationCacheHost::maybeLoadResource):
1772 Call scheduleCannotShowURLError if the resource not found in the appcache.
1774 2018-02-17 Darin Adler <darin@apple.com>
1776 Prepare for ExtendedColor changes (first step)
1777 https://bugs.webkit.org/show_bug.cgi?id=182904
1779 Reviewed by Sam Weinig.
1781 * css/CSSValuePool.cpp:
1782 (WebCore::CSSValuePool::createColorValue): Use HashMap::ensure.
1783 (WebCore::CSSValuePool::createFontFamilyValue): Ditto.
1784 (WebCore::CSSValuePool::createFontFaceValue): Ditto.
1786 * css/parser/CSSParserFastPaths.cpp:
1787 (WebCore::CSSParserFastPaths::maybeParseValue): Tightened up
1790 * html/canvas/CanvasRenderingContext2D.cpp: Removed many unneeded includes.
1792 * inspector/InspectorCanvas.cpp:
1793 (WebCore::InspectorCanvas::recordAction): Updated for Ref instead of
1794 RefPtr and to use move semantics.
1795 (WebCore::buildArrayForAffineTransform): Return Ref instead of RefPtr.
1796 (WebCore::buildArrayForVector): Ditto.
1797 (WebCore::InspectorCanvas::buildInitialState): Ditto. Also use auto more.
1798 (WebCore::InspectorCanvas::buildAction): Ditto.
1799 (WebCore::InspectorCanvas::buildArrayForCanvasGradient): Ditto.
1800 (WebCore::InspectorCanvas::buildArrayForCanvasPattern): Ditto.
1801 (WebCore::InspectorCanvas::buildArrayForImageData): Ditto.
1802 * inspector/InspectorCanvas.h: Updated for the above. Also us "using" instead
1803 of typedef and removed unneeded ErrorString typedef and some includes.
1805 * page/DragController.cpp:
1806 (WebCore::DragController::concludeEditDrag): Use auto and Ref.
1808 * platform/DragData.h: Used pragma once and reorganized includes a bit.
1810 * platform/graphics/ImageFrame.h:
1811 (WebCore::ImageFrame::frameBytes const): Use uint32_t instead of RGBA32 to
1812 prepare for removal of the RGBA32 type coming in a future patch.
1813 * platform/graphics/ImageSource.cpp:
1814 (WebCore::ImageSource::cacheNativeImageAtIndex): Ditto.
1815 (WebCore::ImageSource::canUseAsyncDecoding): Ditto.
1817 * platform/graphics/cocoa/GraphicsContextCocoa.mm: Tweaked #if for Mac-only
1818 code to use PLATFORM(MAC) to be easier to read.
1819 (WebCore::GraphicsContext::focusRingColor): Use sRGBColorSpaceRef instead of
1820 calling CGColorSpaceCreateWithName each time.
1822 * platform/graphics/texmap/TextureMapperFPSCounter.cpp: Added include needed
1823 now that it was removed from some header.
1825 * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: Use uint32_t
1826 instead of RGBA32 to prepare for removal of the RGBA32 type coming in a future patch.
1827 * platform/image-decoders/ScalableImageDecoder.cpp:
1828 (WebCore::ScalableImageDecoder::frameBytesAtIndex const): Ditto.
1829 * platform/image-decoders/cairo/ImageBackingStoreCairo.cpp:
1830 (WebCore::ImageBackingStore::image const): Ditto.
1831 * platform/image-decoders/gif/GIFImageDecoder.cpp:
1832 (WebCore::GIFImageDecoder::haveDecodedRow): Ditto.
1833 * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
1834 (WebCore::setPixel): Ditto.
1835 (WebCore::JPEGImageDecoder::outputScanlines): Ditto.
1836 * platform/image-decoders/png/PNGImageDecoder.cpp:
1837 (WebCore::PNGImageDecoder::rowAvailable): Ditto.
1838 (WebCore::PNGImageDecoder::frameComplete): Ditto.
1839 * platform/image-decoders/webp/WEBPImageDecoder.cpp:
1840 (WebCore::WEBPImageDecoder::decodeFrame): Ditto.
1841 (WebCore::WEBPImageDecoder::applyPostProcessing): Ditto.
1843 * platform/mac/PlatformPasteboardMac.mm:
1844 (WebCore::PlatformPasteboard::color): Added comments.
1846 * rendering/EllipsisBox.cpp:
1847 (WebCore::EllipsisBox::paintSelection): Use Color::isVisible.
1849 2018-02-23 Chris Dumez <cdumez@apple.com>
1851 Crash under SchemeRegistry::shouldTreatURLSchemeAsLocal(WTF::String const&)
1852 https://bugs.webkit.org/show_bug.cgi?id=183066
1853 <rdar://problem/37804111>
1855 Reviewed by Ryosuke Niwa.
1857 SecurityOrigin objects are constructed on various threads. However, someone added a
1858 shouldTreatAsPotentiallyTrustworthy() call to the SecurityOrigin constructor which
1859 was not thread safe. This is because this function relies on SchemeRegistry::shouldTreatURLSchemeAsSecure()
1860 and SchemeRegistry::shouldTreatURLSchemeAsLocal() which were relying on global static HashMaps without
1863 Update SecurityOrigin to initialize m_isPotentiallyTrustworthy lazily, to avoid paying
1864 initialization cost in the constructor. This is only queries by SecurityContext::isSecureContext().
1866 Make SchemeRegistry::shouldTreatURLSchemeAsLocal() and SchemeRegistry::shouldTreatURLSchemeAsSecure()
1867 thread-safe, since they are needed to initialize SecurityOrigin::m_isPotentiallyTrustworthy from
1870 SchemeRegistry::shouldTreatURLSchemeAsSecure() is only called from SecurityOrigin (which requires
1871 thread-safety), and getUserMedia() which is not hot code so the extra locking there should not
1874 SchemeRegistry::shouldTreatURLSchemeAsLocal() is called from SecurityOrigin (which requires thread-
1875 safety). It is also called from isQuickLookPreviewURL(), MHTMLArchive::create(), Page::userStyleSheetLocationChanged(),
1876 isRemoteWebArchive() and HTMLPlugInImageElement. All these are not hot code so I do not think
1877 we need a fast path.
1879 * page/SecurityOrigin.cpp:
1880 (WebCore::isLoopbackIPAddress):
1881 (WebCore::shouldTreatAsPotentiallyTrustworthy):
1882 (WebCore::SecurityOrigin::isPotentiallyTrustworthy const):
1883 (WebCore::SecurityOrigin::isLocalHostOrLoopbackIPAddress):
1884 * page/SecurityOrigin.h:
1885 * platform/SchemeRegistry.cpp:
1886 (WebCore::localURLSchemesLock):
1887 (WebCore::localURLSchemes):
1888 (WebCore::secureSchemesLock):
1889 (WebCore::secureSchemes):
1890 (WebCore::SchemeRegistry::registerURLSchemeAsLocal):
1891 (WebCore::SchemeRegistry::removeURLSchemeRegisteredAsLocal):
1892 (WebCore::SchemeRegistry::shouldTreatURLSchemeAsLocal):
1893 (WebCore::SchemeRegistry::registerURLSchemeAsSecure):
1894 (WebCore::SchemeRegistry::shouldTreatURLSchemeAsSecure):
1895 * platform/SchemeRegistry.h:
1897 2018-02-23 Christopher Reid <chris.reid@sony.com>
1899 [Curl] Cookie Database files are wrongfully getting deleted when the database is opened
1900 https://bugs.webkit.org/show_bug.cgi?id=183051
1902 Reviewed by Per Arne Vollan.
1904 The file stat logic was backwards causing a wrongful detection of database corruption.
1905 Fixed the logic and abstracted these calls to use FileSystem.
1907 * platform/network/curl/CookieJarDB.cpp:
1909 2018-02-23 Zalan Bujtas <zalan@apple.com>
1911 [RenderTreeBuilder] Make RenderTreeBuilder::* classes WTF_MAKE_FAST_ALLOCATED
1912 https://bugs.webkit.org/show_bug.cgi?id=183084
1913 <rdar://problem/37828706>
1915 Reviewed by Antti Koivisto.
1917 * rendering/updating/RenderTreeBuilderBlock.h:
1918 * rendering/updating/RenderTreeBuilderBlockFlow.h:
1919 * rendering/updating/RenderTreeBuilderContinuation.h:
1920 * rendering/updating/RenderTreeBuilderFirstLetter.h:
1921 * rendering/updating/RenderTreeBuilderFormControls.h:
1922 * rendering/updating/RenderTreeBuilderFullScreen.h:
1923 * rendering/updating/RenderTreeBuilderInline.h:
1924 * rendering/updating/RenderTreeBuilderList.h:
1925 * rendering/updating/RenderTreeBuilderMathML.h:
1926 * rendering/updating/RenderTreeBuilderMultiColumn.h:
1927 * rendering/updating/RenderTreeBuilderRuby.h:
1928 * rendering/updating/RenderTreeBuilderSVG.h:
1929 * rendering/updating/RenderTreeBuilderTable.h:
1930 * rendering/updating/RenderTreeUpdaterGeneratedContent.h:
1932 2018-02-23 Zalan Bujtas <zalan@apple.com>
1934 [RenderTreeBuilder] Move RenderFullScreen::createPlaceholder to RenderTreeBuilder
1935 https://bugs.webkit.org/show_bug.cgi?id=183027
1936 <rdar://problem/37773058>
1938 Reviewed by Antti Koivisto.
1940 No change in functionality.
1943 (WebCore::Document::setFullScreenRenderer):
1945 * rendering/RenderFullScreen.cpp:
1946 (WebCore::RenderFullScreenPlaceholder::RenderFullScreenPlaceholder):
1947 (WebCore::RenderFullScreenPlaceholder::isRenderFullScreenPlaceholder const):
1948 (WebCore::RenderFullScreen::wrapNewRenderer):
1949 (WebCore::RenderFullScreen::wrapExistingRenderer):
1951 (WebCore::RenderFullScreen::createPlaceholder): Deleted.
1952 * rendering/RenderFullScreen.h:
1953 * rendering/updating/RenderTreeBuilder.cpp:
1954 (WebCore::RenderTreeBuilder::createPlaceholderForFullScreen):
1955 * rendering/updating/RenderTreeBuilder.h:
1956 * rendering/updating/RenderTreeBuilderFullScreen.cpp:
1957 (WebCore::RenderTreeBuilder::FullScreen::createPlaceholder):
1958 * rendering/updating/RenderTreeBuilderFullScreen.h:
1960 2018-02-23 Zalan Bujtas <zalan@apple.com>
1962 [RenderTreeBuilder] Add WARN_UNUSED_RETURN to detach()
1963 https://bugs.webkit.org/show_bug.cgi?id=183073
1964 <rdar://problem/37814585>
1966 Reviewed by Antti Koivisto.
1968 So that we don't destroy a renderer accidentally.
1970 * rendering/updating/RenderTreeBuilderBlock.h:
1971 * rendering/updating/RenderTreeBuilderRuby.h:
1972 * rendering/updating/RenderTreeBuilderSVG.h:
1974 2018-02-22 Antoine Quint <graouts@apple.com>
1976 REGRESSION (r228445): A big pause button shows over YouTube videos if you tap "Tap To Unmute" on iOS
1977 https://bugs.webkit.org/show_bug.cgi?id=183074
1978 <rdar://problem/37747028>
1980 Reviewed by Eric Carlson.
1982 Test: media/modern-media-controls/start-support/start-support-disable-controls-and-re-enable-post-play.html
1984 In the fix for webkit.org/b/182668, we made it so that when the "controls" attribute is absent from a media
1985 element we stop listening to the bulk of media events and prevent controls from updating any DOM properties
1986 so as to minimize the amount of CPU usage by the Web process.
1988 An unfortunate side effect was that, if the media controls were disabled at the time the video starts playing,
1989 the StartSupport class would thus not catch the "play" event and would not be able to set the "hasPlayed"
1990 property to "true" on the MediaController, which would then prevent the _shouldShowStartButton() from returning
1991 "false". As a result, if the "controls" attribute was turned back on after the media started playing, they
1992 would default to showing the start button, which would be then in the play state, ie. showing the pause icon.
1994 We now set the "hasPlayed" property in the "play" event handler on MediaController, which is always registered
1995 regardless of the "controls" attribute setting. We also ensure we invalidate the "showStartButton" property on
1996 the media controls when StartSupport is enabled, which is the case when the "controls" attribute is toggled back
1997 to "true" from a previous "false" value.
1999 * Modules/modern-media-controls/media/media-controller.js:
2000 (MediaController.prototype.handleEvent):
2001 * Modules/modern-media-controls/media/start-support.js:
2003 (StartSupport.prototype.enable):
2004 (StartSupport.prototype.handleEvent):
2005 (StartSupport.prototype._updateShowsStartButton):
2007 2018-02-23 Carlos Garcia Campos <cgarcia@igalia.com>
2009 [GStreamer][MiniBrowser] Honor GStreamer command line parameters in MiniBrowser
2010 https://bugs.webkit.org/show_bug.cgi?id=173655
2011 <rdar://problem/37706341>
2013 Reviewed by Philippe Normand.
2015 Do not assume gst is only used in the WebProcess, the MIMETypeRegistry also uses gst to get the list of
2016 supported media types. Move the code to extract gst options from the process command line to a helper function
2017 and use it in the UI process to pass the options to the WebProcess, but also in the current process when gst is
2018 initialized without providing options.
2020 Fixes several unit tests that use MIMETypeRegistry in the UI process.
2022 * platform/graphics/gstreamer/GStreamerUtilities.cpp:
2023 (WebCore::extractGStreamerOptionsFromCommandLine): Helper to get the gst options from the current process
2025 (WebCore::initializeGStreamer): Ensure this is called once. Get the gst options from the given vector or extract
2026 it from the command line if not provided.
2027 * platform/graphics/gstreamer/GStreamerUtilities.h:
2028 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2029 (WebCore::MediaPlayerPrivateGStreamerBase::initializeGStreamerAndRegisterWebKitElements): Bring back the gst
2030 initialization here.
2032 2018-02-23 Philippe Normand <pnormand@igalia.com>
2034 [GStreamer] HTTP totalBytes query returns 0 after seeking (sometimes)
2035 https://bugs.webkit.org/show_bug.cgi?id=183002
2037 Reviewed by Xabier Rodriguez-Calvar.
2039 * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2040 (webkit_web_src_init): Initialize member variables. Also no need
2041 to set the appsrc size at that point.
2042 (webKitWebSrcStop): There is no need to reset the size when
2043 seeking. Size should in most cases represent the Content-Length
2044 response attribute, even when seeking.
2045 (webKitWebSrcStart): No need to reset the size attribute.
2046 (webKitWebSrcQueryWithParent): Let appsrc handle DURATION queries.
2047 (CachedResourceStreamingClient::responseReceived): Emit duration notification one time only.
2049 2018-02-23 Philippe Normand <pnormand@igalia.com>
2051 [GStreamer] media/video-src-blob-using-open-panel.html crashes in Debug
2052 https://bugs.webkit.org/show_bug.cgi?id=183005
2054 Reviewed by Xabier Rodriguez-Calvar.
2056 Test: media/video-src-blob-using-open-panel.html
2058 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2059 (WebCore::convertToInternalProtocol): Also convert blob URIs
2060 because they're handled by our httpsrc element.
2061 * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2062 (webKitWebSrcGetProtocols): Prefix blob URIs too, for consistency purpose.
2064 2018-02-22 Yusuke Suzuki <utatane.tea@gmail.com>
2066 Remove currentTime() / currentTimeMS()
2067 https://bugs.webkit.org/show_bug.cgi?id=183052
2069 Reviewed by Mark Lam.
2071 * Modules/geolocation/Geolocation.cpp:
2072 (WebCore::Geolocation::haveSuitableCachedPosition):
2073 * dom/DOMTimeStamp.h:
2074 (WebCore::convertSecondsToDOMTimeStamp):
2076 (WebCore::File::File):
2077 (WebCore::File::lastModified const):
2078 * history/HistoryItem.cpp:
2079 (WebCore::generateSequenceNumber):
2080 * html/BaseDateAndTimeInputType.cpp:
2081 (WebCore::BaseDateAndTimeInputType::defaultValueForStepUp const):
2082 * html/DateTimeInputType.cpp:
2083 (WebCore::DateTimeInputType::defaultValueForStepUp const):
2084 * html/MonthInputType.cpp:
2085 (WebCore::MonthInputType::defaultValueForStepUp const):
2086 * html/TimeInputType.cpp:
2087 (WebCore::TimeInputType::defaultValueForStepUp const):
2088 * inspector/agents/InspectorNetworkAgent.cpp:
2089 (WebCore::InspectorNetworkAgent::willSendRequest):
2090 (WebCore::InspectorNetworkAgent::willSendWebSocketHandshakeRequest):
2091 * loader/EmptyFrameLoaderClient.h:
2092 * loader/FormSubmission.cpp:
2093 (WebCore::generateFormDataIdentifier):
2094 * loader/FrameLoader.cpp:
2095 (WebCore::FrameLoader::clientRedirected):
2096 * loader/FrameLoader.h:
2097 * loader/FrameLoaderClient.h:
2098 * loader/NavigationScheduler.cpp:
2100 (WebCore::History::stateObjectAdded):
2102 * page/PageOverlay.cpp:
2103 (WebCore::PageOverlay::startFadeAnimation):
2104 (WebCore::PageOverlay::fadeAnimationTimerFired):
2105 * page/PageOverlay.h:
2106 * platform/graphics/cg/GraphicsContextCG.cpp:
2107 (WebCore::GraphicsContext::drawNativeImage):
2108 * platform/ios/LegacyTileLayerPool.h:
2109 * platform/ios/LegacyTileLayerPool.mm:
2110 (WebCore::LegacyTileLayerPool::LegacyTileLayerPool):
2111 (WebCore::LegacyTileLayerPool::addLayer):
2112 (WebCore::LegacyTileLayerPool::decayedCapacity const):
2113 (WebCore::LegacyTileLayerPool::prune):
2114 * platform/ios/SystemMemoryIOS.cpp:
2115 (WebCore::systemMemoryLevel):
2116 * platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:
2117 * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
2119 2018-02-22 Per Arne Vollan <pvollan@apple.com>
2121 The WebContent process should not use NSScreen in the screenDepth implementation.
2122 https://bugs.webkit.org/show_bug.cgi?id=183048
2124 Reviewed by Brent Fulgham.
2126 NSScreen method calls should be done in the UIProcess, since these calls will communicate with
2127 the WindowServer. The screen depth property can be retrieved in the UIProcess, and sent to the
2128 WebContent process, where it is cached. Whenever screen properties change, the UIProcess will
2129 send the new screen properties to the WebProcess.
2131 No new tests, covered by existing tests.
2133 * platform/ScreenProperties.h:
2134 (WebCore::ScreenProperties::encode const):
2135 (WebCore::ScreenProperties::decode):
2136 * platform/mac/PlatformScreenMac.mm:
2137 (WebCore::getScreenProperties):
2138 (WebCore::screenDepth):
2139 (WebCore::screenDepthPerComponent):
2140 (WebCore::screenRect):
2141 (WebCore::screenAvailableRect):
2143 2018-02-22 Zalan Bujtas <zalan@apple.com>
2145 [RenderTreeBuilder] Rename insertChild() -> attach(), takeChild() -> detach() and removeAndDestroy() -> destroy()
2146 https://bugs.webkit.org/show_bug.cgi?id=183061
2147 <rdar://problem/37800269>
2149 Reviewed by Ryosuke Niwa.
2151 ...and moveChildTo() -> move() (moveChildrenTo() -> moveChildren()),
2152 removeFromParentAndDestroyCleaningUpAnonymousWrappers() -> destroyAndCleanUpAnonymousWrappers()
2154 No change in functionality.
2157 (WebCore::Document::destroyRenderTree):
2158 (WebCore::Document::setFullScreenRenderer):
2159 * rendering/RenderBlockFlow.cpp:
2160 (WebCore::RenderBlockFlow::styleDidChange):
2161 * rendering/RenderButton.cpp:
2162 (WebCore::RenderButton::setText):
2163 * rendering/RenderElement.cpp:
2164 (WebCore::RenderElement::didAttachChild):
2165 (WebCore::RenderElement::didInsertChild): Deleted.
2166 * rendering/RenderElement.h:
2167 * rendering/RenderFullScreen.cpp:
2168 (WebCore::RenderFullScreen::wrapNewRenderer):
2169 (WebCore::RenderFullScreen::wrapExistingRenderer):
2170 (WebCore::RenderFullScreen::unwrapRenderer):
2171 (WebCore::RenderFullScreen::createPlaceholder):
2172 * rendering/RenderMenuList.cpp:
2173 (RenderMenuList::didAttachChild):
2174 (RenderMenuList::setText):
2175 (RenderMenuList::didInsertChild): Deleted.
2176 * rendering/RenderMenuList.h:
2177 * rendering/RenderQuote.cpp:
2178 (WebCore::RenderQuote::updateTextRenderer):
2179 * rendering/RenderTextFragment.cpp:
2180 (WebCore::RenderTextFragment::setText):
2181 * rendering/updating/RenderTreeBuilder.cpp:
2182 (WebCore::RenderTreeBuilder::destroy):
2183 (WebCore::RenderTreeBuilder::attach):
2184 (WebCore::RenderTreeBuilder::attachIgnoringContinuation):
2185 (WebCore::RenderTreeBuilder::detach):
2186 (WebCore::RenderTreeBuilder::attachToRenderElement):
2187 (WebCore::RenderTreeBuilder::attachToRenderElementInternal):
2188 (WebCore::RenderTreeBuilder::move):
2189 (WebCore::RenderTreeBuilder::moveAllChildren):
2190 (WebCore::RenderTreeBuilder::moveChildren):
2191 (WebCore::RenderTreeBuilder::moveAllChildrenIncludingFloats):
2192 (WebCore::RenderTreeBuilder::makeChildrenNonInline):
2193 (WebCore::RenderTreeBuilder::splitAnonymousBoxesAroundChild):
2194 (WebCore::RenderTreeBuilder::childFlowStateChangesAndAffectsParentBlock):
2195 (WebCore::RenderTreeBuilder::destroyAndCleanUpAnonymousWrappers):
2196 (WebCore::RenderTreeBuilder::detachFromRenderGrid):
2197 (WebCore::RenderTreeBuilder::detachFromRenderElement):
2198 (WebCore::RenderTreeBuilder::attachToRenderGrid):
2199 (WebCore::RenderTreeBuilder::removeAndDestroy): Deleted.
2200 (WebCore::RenderTreeBuilder::insertChild): Deleted.
2201 (WebCore::RenderTreeBuilder::insertChildIgnoringContinuation): Deleted.
2202 (WebCore::RenderTreeBuilder::takeChild): Deleted.
2203 (WebCore::RenderTreeBuilder::insertChildToRenderElement): Deleted.
2204 (WebCore::RenderTreeBuilder::insertChildToRenderElementInternal): Deleted.
2205 (WebCore::RenderTreeBuilder::moveChildTo): Deleted.
2206 (WebCore::RenderTreeBuilder::moveAllChildrenTo): Deleted.
2207 (WebCore::RenderTreeBuilder::moveChildrenTo): Deleted.
2208 (WebCore::RenderTreeBuilder::moveAllChildrenIncludingFloatsTo): Deleted.
2209 (WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers): Deleted.
2210 (WebCore::RenderTreeBuilder::takeChildFromRenderGrid): Deleted.
2211 (WebCore::RenderTreeBuilder::takeChildFromRenderElement): Deleted.
2212 (WebCore::RenderTreeBuilder::insertChildToRenderGrid): Deleted.
2213 * rendering/updating/RenderTreeBuilder.h:
2214 * rendering/updating/RenderTreeBuilderBlock.cpp:
2215 (WebCore::RenderTreeBuilder::Block::attach):
2216 (WebCore::RenderTreeBuilder::Block::insertChildToContinuation):
2217 (WebCore::RenderTreeBuilder::Block::attachIgnoringContinuation):
2218 (WebCore::RenderTreeBuilder::Block::removeLeftoverAnonymousBlock):
2219 (WebCore::RenderTreeBuilder::Block::detach):
2220 (WebCore::RenderTreeBuilder::Block::dropAnonymousBoxChild):
2221 (WebCore::RenderTreeBuilder::Block::insertChild): Deleted.
2222 (WebCore::RenderTreeBuilder::Block::insertChildIgnoringContinuation): Deleted.
2223 (WebCore::RenderTreeBuilder::Block::takeChild): Deleted.
2224 * rendering/updating/RenderTreeBuilderBlock.h:
2225 * rendering/updating/RenderTreeBuilderBlockFlow.cpp:
2226 (WebCore::RenderTreeBuilder::BlockFlow::attach):
2227 (WebCore::RenderTreeBuilder::BlockFlow::moveAllChildrenIncludingFloats):
2228 (WebCore::RenderTreeBuilder::BlockFlow::insertChild): Deleted.
2229 (WebCore::RenderTreeBuilder::BlockFlow::moveAllChildrenIncludingFloatsTo): Deleted.
2230 * rendering/updating/RenderTreeBuilderBlockFlow.h:
2231 * rendering/updating/RenderTreeBuilderContinuation.cpp:
2232 (WebCore::RenderTreeBuilder::Continuation::cleanupOnDestroy):
2233 * rendering/updating/RenderTreeBuilderFirstLetter.cpp:
2234 (WebCore::RenderTreeBuilder::FirstLetter::cleanupOnDestroy):
2235 (WebCore::RenderTreeBuilder::FirstLetter::updateStyle):
2236 (WebCore::RenderTreeBuilder::FirstLetter::createRenderers):
2237 * rendering/updating/RenderTreeBuilderFormControls.cpp:
2238 (WebCore::RenderTreeBuilder::FormControls::attach):
2239 (WebCore::RenderTreeBuilder::FormControls::detach):
2240 (WebCore::RenderTreeBuilder::FormControls::findOrCreateParentForChild):
2241 (WebCore::RenderTreeBuilder::FormControls::insertChild): Deleted.
2242 (WebCore::RenderTreeBuilder::FormControls::takeChild): Deleted.
2243 * rendering/updating/RenderTreeBuilderFormControls.h:
2244 * rendering/updating/RenderTreeBuilderFullScreen.cpp:
2245 (WebCore::RenderTreeBuilder::FullScreen::cleanupOnDestroy):
2246 * rendering/updating/RenderTreeBuilderInline.cpp:
2247 (WebCore::RenderTreeBuilder::Inline::attach):
2248 (WebCore::RenderTreeBuilder::Inline::insertChildToContinuation):
2249 (WebCore::RenderTreeBuilder::Inline::attachIgnoringContinuation):
2250 (WebCore::RenderTreeBuilder::Inline::splitFlow):
2251 (WebCore::RenderTreeBuilder::Inline::splitInlines):
2252 (WebCore::RenderTreeBuilder::Inline::childBecameNonInline):
2253 (WebCore::RenderTreeBuilder::Inline::insertChild): Deleted.
2254 (WebCore::RenderTreeBuilder::Inline::insertChildIgnoringContinuation): Deleted.
2255 * rendering/updating/RenderTreeBuilderInline.h:
2256 * rendering/updating/RenderTreeBuilderList.cpp:
2257 (WebCore::RenderTreeBuilder::List::updateItemMarker):
2258 * rendering/updating/RenderTreeBuilderMathML.cpp:
2259 (WebCore::RenderTreeBuilder::MathML::makeFences):
2260 (WebCore::RenderTreeBuilder::MathML::attach):
2261 (WebCore::RenderTreeBuilder::MathML::insertChild): Deleted.
2262 * rendering/updating/RenderTreeBuilderMathML.h:
2263 * rendering/updating/RenderTreeBuilderMultiColumn.cpp:
2264 (WebCore::RenderTreeBuilder::MultiColumn::createFragmentedFlow):
2265 (WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow):
2266 (WebCore::RenderTreeBuilder::MultiColumn::processPossibleSpannerDescendant):
2267 (WebCore::RenderTreeBuilder::MultiColumn::handleSpannerRemoval):
2268 * rendering/updating/RenderTreeBuilderRuby.cpp:
2269 (WebCore::RenderTreeBuilder::Ruby::moveInlineChildren):
2270 (WebCore::RenderTreeBuilder::Ruby::moveBlockChildren):
2271 (WebCore::RenderTreeBuilder::Ruby::attach):
2272 (WebCore::RenderTreeBuilder::Ruby::findOrCreateParentForChild):
2273 (WebCore::RenderTreeBuilder::Ruby::rubyBaseSafe):
2274 (WebCore::RenderTreeBuilder::Ruby::detach):
2275 (WebCore::RenderTreeBuilder::Ruby::insertChild): Deleted.
2276 (WebCore::RenderTreeBuilder::Ruby::takeChild): Deleted.
2277 * rendering/updating/RenderTreeBuilderRuby.h:
2278 * rendering/updating/RenderTreeBuilderSVG.cpp:
2279 (WebCore::RenderTreeBuilder::SVG::attach):
2280 (WebCore::RenderTreeBuilder::SVG::detach):
2281 (WebCore::RenderTreeBuilder::SVG::insertChild): Deleted.
2282 (WebCore::RenderTreeBuilder::SVG::takeChild): Deleted.
2283 * rendering/updating/RenderTreeBuilderSVG.h:
2284 * rendering/updating/RenderTreeBuilderTable.cpp:
2285 (WebCore::RenderTreeBuilder::Table::findOrCreateParentForChild):
2286 (WebCore::RenderTreeBuilder::Table::attach):
2287 (WebCore::RenderTreeBuilder::Table::collapseAndDestroyAnonymousSiblingRows):
2288 (WebCore::RenderTreeBuilder::Table::insertChild): Deleted.
2289 * rendering/updating/RenderTreeBuilderTable.h:
2290 * rendering/updating/RenderTreeUpdater.cpp:
2291 (WebCore::RenderTreeUpdater::createRenderer):
2292 (WebCore::RenderTreeUpdater::createTextRenderer):
2293 (WebCore::RenderTreeUpdater::tearDownRenderers):
2294 (WebCore::RenderTreeUpdater::tearDownTextRenderer):
2295 (WebCore::RenderTreeUpdater::tearDownLeftoverPaginationRenderersIfNeeded):
2296 * rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
2297 (WebCore::createContentRenderers):
2299 2018-02-22 Chris Dumez <cdumez@apple.com>
2301 ResourceRequestBase::isolatedCopy() fails to isolate copy the cachePartition
2302 https://bugs.webkit.org/show_bug.cgi?id=183059
2303 <rdar://problem/37800202>
2305 Reviewed by Youenn Fablet.
2307 Update ResourceRequestBase::setAsIsolatedCopy() to call isolatedCopy() on the cachePartition as well,
2308 given that it is a String and it would not be safe to send it to another thread otherwise.
2310 * platform/network/ResourceRequestBase.cpp:
2311 (WebCore::ResourceRequestBase::setAsIsolatedCopy):
2313 2018-02-22 Chris Dumez <cdumez@apple.com>
2315 ServiceWorkerContainer::startScriptFetchForJob() fails to isolate copy the registrationKey before passing it to the main thread
2316 https://bugs.webkit.org/show_bug.cgi?id=183050
2317 <rdar://problem/37796881>
2319 Reviewed by Youenn Fablet.
2321 Create an isolated copy of the registrationKey before passing it to the main thread in ServiceWorkerContainer's
2322 startScriptFetchForJob() / jobFinishedLoadingScript() / jobFailedLoadingScript().
2324 * workers/service/ServiceWorkerContainer.cpp:
2325 (WebCore::ServiceWorkerContainer::startScriptFetchForJob):
2326 (WebCore::ServiceWorkerContainer::jobFinishedLoadingScript):
2327 (WebCore::ServiceWorkerContainer::jobFailedLoadingScript):
2329 2018-02-22 Chris Dumez <cdumez@apple.com>
2331 ServiceWorkerContainer::scheduleJob() fails to isolate copy the jobData before passing it to the main thread
2332 https://bugs.webkit.org/show_bug.cgi?id=183046
2333 <rdar://problem/37793395>
2335 Reviewed by Youenn Fablet.
2337 Make sure we isolate copy the jobData before passing it to the main thread in ServiceWorkerContainer::scheduleJob().
2338 The jobData contains Strings / URLs so it is not safe to have non-isolated copies of it on various threads.
2340 * workers/service/ServiceWorkerContainer.cpp:
2341 (WebCore::ServiceWorkerContainer::scheduleJob):
2343 2018-02-22 Basuke Suzuki <Basuke.Suzuki@sony.com>
2345 [Curl] Fix warning on clang.
2346 https://bugs.webkit.org/show_bug.cgi?id=182986
2348 Reviewed by Konstantin Tokarev.
2350 No new tests because there's no behaviro changes.
2352 * platform/network/curl/CurlResourceHandleDelegate.cpp:
2353 (WebCore::CurlResourceHandleDelegate::curlDidSendData):
2354 (WebCore::CurlResourceHandleDelegate::curlDidReceiveBuffer):
2355 (WebCore::CurlResourceHandleDelegate::curlDidFailWithError):
2356 * platform/network/curl/CurlResourceHandleDelegate.h:
2358 2018-02-22 Youenn Fablet <youenn@apple.com>
2360 WorkerCacheStorageConnection::doRemove can assert in case two frames try to delete the same cache at the same time
2361 https://bugs.webkit.org/show_bug.cgi?id=183041
2363 Reviewed by Chris Dumez.
2365 * Modules/cache/WorkerCacheStorageConnection.cpp:
2366 (WebCore::WorkerCacheStorageConnection::doRemove): Update the assertion to accept the
2367 case of an already deleted cache, i.e. returned identifer is 0.
2369 2018-02-22 Alejandro G. Castro <alex@igalia.com>
2371 Remove some code leftovers in LibWebRTCMediaEndpoint and RealtimeOutgoingVideoSource classes
2372 https://bugs.webkit.org/show_bug.cgi?id=183031
2374 Reviewed by Youenn Fablet.
2376 This include and namespace are not required in the file.
2378 Just removing unused code, no tests required.
2380 * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
2382 2018-02-22 Chris Dumez <cdumez@apple.com>
2384 Document.open() cancels existing provisional load but not navigation policy check
2385 https://bugs.webkit.org/show_bug.cgi?id=183012
2386 <rdar://problem/37755831>
2388 Reviewed by Alex Christensen.
2390 Test: fast/dom/Document/open-with-pending-load-async-policy.html
2393 (WebCore::Document::open):
2394 The existing code was calling FrameLoader::stopAllLoaders() when the loader's state
2395 is FrameStateProvisional. The issue is that the FrameLoader's state only gets set
2396 to FrameStateProvisional after the policy decision for the navigation is made.
2397 This means that we fail to cancel a pending load if is still in the policy decision
2398 stage, which can happen when the policy decision is made asynchronously. We now
2399 also cancel such pending navigation policy checks as well.
2401 * loader/PolicyChecker.cpp:
2402 (WebCore::PolicyChecker::checkNavigationPolicy):
2403 Make sure the m_delegateIsDecidingNavigationPolicy flag gets reset inside the
2404 lambda. Otherwise, it gets reset too early when the policy decision is made
2407 2018-02-22 Youenn Fablet <youenn@apple.com>
2409 Add release asserts for service worker fetch and postMessage events
2410 https://bugs.webkit.org/show_bug.cgi?id=183025
2411 rdar://problem/37765052
2413 Reviewed by Daniel Bates.
2415 Add release assertion so that a service worker will only dispatch a message event
2416 for clients and service workers with the same origin.
2417 No change of behavior.
2419 * platform/network/ResourceRequestBase.h:
2420 * workers/service/context/ServiceWorkerThread.cpp:
2421 (WebCore::ServiceWorkerThread::postMessageToServiceWorker):
2422 * workers/service/context/ServiceWorkerThreadProxy.h:
2424 2018-02-22 Miguel Gomez <magomez@igalia.com>
2426 including both gl3.h and gl2.h when USE_OPENGL_ES is enabled
2427 https://bugs.webkit.org/show_bug.cgi?id=183008
2429 Reviewed by Michael Catanzaro.
2431 Don't include GLES3 headers as we stick to GLES2 API resources.
2433 No new tests, no behavior change.
2435 * platform/graphics/GLContext.cpp:
2437 2018-02-22 Ms2ger <Ms2ger@igalia.com>
2439 [GTK][WPE] Fix some build errors in service workers code
2440 https://bugs.webkit.org/show_bug.cgi?id=182966
2442 Reviewed by Žan Doberšek.
2444 No new tests: no change in behavior.
2446 * workers/service/ServiceWorkerProvider.h: add missing forward declaration.
2448 2018-02-21 Zalan Bujtas <zalan@apple.com>
2450 [RenderTreeBuilder] Move RenderObject::insertedInto() mutation logic to RenderTreeBuilder
2451 https://bugs.webkit.org/show_bug.cgi?id=183022
2452 <rdar://problem/37764326>
2454 Reviewed by Antti Koivisto.
2456 No change in functionality.
2458 * rendering/RenderObject.cpp:
2459 (WebCore::RenderObject::insertedIntoTree):
2460 * rendering/updating/RenderTreeBuilder.cpp:
2461 (WebCore::RenderTreeBuilder::insertChildToRenderElementInternal):
2462 (WebCore::RenderTreeBuilder::moveChildrenTo):
2463 (WebCore::RenderTreeBuilder::multiColumnDescendantInserted): Deleted.
2464 * rendering/updating/RenderTreeBuilder.h:
2466 2018-02-21 Tim Horton <timothy_horton@apple.com>
2468 Include all Cocoa sources in all Cocoa platform builds
2469 https://bugs.webkit.org/show_bug.cgi?id=183026
2470 <rdar://problem/37513101>
2472 Reviewed by Dan Bernstein.
2474 Similar to r228571, don't have separate Sources files for iOS and Mac.
2475 All sources now have #ifdefs that ensure that only the right ones
2476 build on the right platforms. This makes it much easier to reason
2477 about what builds where by just looking at the sources.
2480 * SourcesIOS.txt: Removed.
2481 * SourcesMac.txt: Removed.
2482 * WebCore.xcodeproj/project.pbxproj:
2483 * editing/WebContentReader.h:
2484 * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.h:
2486 2018-02-21 Youenn Fablet <youenn@apple.com>
2488 Make SubstituteResource take a ResourceResponse r-value
2489 https://bugs.webkit.org/show_bug.cgi?id=183020
2491 Reviewed by Alex Christensen.
2493 No change of behavior.
2494 Make SubstituteResource take a ResourceResponse r-value.
2495 Update ArchiveResource accordingly.
2496 Take benefit of that in ApplicationCacheResource to set the response source to ApplicationCache
2497 before passing it to SubstituteResource constructor.
2499 * loader/SubstituteResource.h:
2500 (WebCore::SubstituteResource::SubstituteResource):
2501 (WebCore::SubstituteResource::resourceResponse): Deleted.
2502 * loader/appcache/ApplicationCacheResource.cpp:
2503 (WebCore::ApplicationCacheResource::create):
2504 (WebCore::ApplicationCacheResource::ApplicationCacheResource):
2505 * loader/appcache/ApplicationCacheResource.h:
2506 (WebCore::ApplicationCacheResource::create): Deleted.
2507 * loader/archive/ArchiveResource.cpp:
2508 (WebCore::ArchiveResource::ArchiveResource):
2510 2018-02-21 Zalan Bujtas <zalan@apple.com>
2512 [RenderTreeBuilder] ::willBeRemoved() does not need RenderTreeBuilder anymore.
2513 https://bugs.webkit.org/show_bug.cgi?id=183019
2514 <rdar://problem/37761421>
2516 Reviewed by Antti Koivisto.
2518 All the willBeDestroyed() mutations have been moved over to RenderTreeBuilder.
2520 No change in functionality.
2522 * rendering/RenderBlock.cpp:
2523 (WebCore::RenderBlock::willBeDestroyed):
2524 * rendering/RenderBlock.h:
2525 * rendering/RenderBlockFlow.cpp:
2526 (WebCore::RenderBlockFlow::willBeDestroyed):
2527 * rendering/RenderBlockFlow.h:
2528 * rendering/RenderBox.cpp:
2529 (WebCore::RenderBox::willBeDestroyed):
2530 * rendering/RenderBox.h:
2531 * rendering/RenderBoxModelObject.cpp:
2532 (WebCore::RenderBoxModelObject::willBeDestroyed):
2533 * rendering/RenderBoxModelObject.h:
2534 * rendering/RenderCounter.cpp:
2535 (WebCore::RenderCounter::willBeDestroyed):
2536 * rendering/RenderCounter.h:
2537 * rendering/RenderElement.cpp:
2538 (WebCore::RenderElement::willBeDestroyed):
2539 * rendering/RenderElement.h:
2540 * rendering/RenderEmbeddedObject.cpp:
2541 (WebCore::RenderEmbeddedObject::willBeDestroyed):
2542 * rendering/RenderEmbeddedObject.h:
2543 * rendering/RenderFragmentedFlow.cpp:
2544 (WebCore::RenderFragmentedFlow::willBeDestroyed):
2545 * rendering/RenderFragmentedFlow.h:
2546 * rendering/RenderImage.cpp:
2547 (WebCore::RenderImage::willBeDestroyed):
2548 * rendering/RenderImage.h:
2549 * rendering/RenderInline.cpp:
2550 (WebCore::RenderInline::willBeDestroyed):
2551 * rendering/RenderInline.h:
2552 * rendering/RenderLayerModelObject.cpp:
2553 (WebCore::RenderLayerModelObject::willBeDestroyed):
2554 * rendering/RenderLayerModelObject.h:
2555 * rendering/RenderListBox.cpp:
2556 (WebCore::RenderListBox::willBeDestroyed):
2557 * rendering/RenderListBox.h:
2558 * rendering/RenderListMarker.cpp:
2559 (WebCore::RenderListMarker::willBeDestroyed):
2560 * rendering/RenderListMarker.h:
2561 * rendering/RenderMenuList.cpp:
2562 (WebCore::RenderMenuList::willBeDestroyed):
2563 * rendering/RenderMenuList.h:
2564 * rendering/RenderObject.cpp:
2565 (WebCore::RenderObject::willBeDestroyed):
2566 (WebCore::RenderObject::destroy):
2567 * rendering/RenderObject.h:
2568 * rendering/RenderReplaced.cpp:
2569 (WebCore::RenderReplaced::willBeDestroyed):
2570 * rendering/RenderReplaced.h:
2571 * rendering/RenderSearchField.cpp:
2572 (WebCore::RenderSearchField::willBeDestroyed):
2573 * rendering/RenderSearchField.h:
2574 * rendering/RenderSnapshottedPlugIn.cpp:
2575 (WebCore::RenderSnapshottedPlugIn::willBeDestroyed):
2576 * rendering/RenderSnapshottedPlugIn.h:
2577 * rendering/RenderText.cpp:
2578 (WebCore::RenderText::willBeDestroyed):
2579 * rendering/RenderText.h:
2580 * rendering/RenderTextControlMultiLine.cpp:
2581 (WebCore::RenderTextControlMultiLine::willBeDestroyed):
2582 * rendering/RenderTextControlMultiLine.h:
2583 * rendering/RenderVideo.cpp:
2584 (WebCore::RenderVideo::willBeDestroyed):
2585 * rendering/RenderVideo.h:
2586 * rendering/RenderWidget.cpp:
2587 (WebCore::RenderWidget::willBeDestroyed):
2588 * rendering/RenderWidget.h:
2589 * rendering/svg/RenderSVGBlock.cpp:
2590 (WebCore::RenderSVGBlock::willBeDestroyed):
2591 * rendering/svg/RenderSVGBlock.h:
2592 * rendering/svg/RenderSVGImage.cpp:
2593 (WebCore::RenderSVGImage::willBeDestroyed):
2594 * rendering/svg/RenderSVGImage.h:
2595 * rendering/svg/RenderSVGInline.cpp:
2596 (WebCore::RenderSVGInline::willBeDestroyed):
2597 * rendering/svg/RenderSVGInline.h:
2598 * rendering/svg/RenderSVGModelObject.cpp:
2599 (WebCore::RenderSVGModelObject::willBeDestroyed):
2600 * rendering/svg/RenderSVGModelObject.h:
2601 * rendering/svg/RenderSVGResourceContainer.cpp:
2602 (WebCore::RenderSVGResourceContainer::willBeDestroyed):
2603 * rendering/svg/RenderSVGResourceContainer.h:
2604 * rendering/svg/RenderSVGRoot.cpp:
2605 (WebCore::RenderSVGRoot::willBeDestroyed):
2606 * rendering/svg/RenderSVGRoot.h:
2607 * rendering/svg/RenderSVGText.cpp:
2608 (WebCore::RenderSVGText::willBeDestroyed):
2609 * rendering/svg/RenderSVGText.h:
2611 2018-02-21 Per Arne Vollan <pvollan@apple.com>
2613 The WebContent process should not use NSScreen in the screenAvailableRect/screenRect implementations.
2614 https://bugs.webkit.org/show_bug.cgi?id=182855
2616 Reviewed by Brent Fulgham.
2618 On macOS, the functions screenAvailableRect and screenRect is implemented using NSScreen, which is communicating
2619 with the WindowServer. To avoid this WindowServer communication from the WebContent process when calling
2620 screenAvailableRect and screenRect, it is possible to let the UIProcess send a message to the WebContent
2621 process whenever there is a change in the display properties, and have the WebContent process cache these
2622 display properties. This message should also be sent to a newly started WebContent process.
2624 No new tests, covered by existing tests.
2626 * WebCore.xcodeproj/project.pbxproj:
2627 * platform/PlatformScreen.h:
2628 * platform/mac/PlatformScreenMac.mm:
2629 (WebCore::getScreenProperties):
2630 (WebCore::screenProperties):
2631 (WebCore::setScreenProperties):
2632 (WebCore::screenRect):
2633 (WebCore::screenAvailableRect):
2634 * platform/ScreenProperties.h: Added.
2635 (WebCore::ScreenProperties::encode const):
2636 (WebCore::ScreenProperties::decode):
2638 2018-02-21 Christopher Reid <chris.reid@sony.com>
2640 [Curl] Curl Cookie Database File should be configurable using NetworkProcessCreationParameters
2641 https://bugs.webkit.org/show_bug.cgi?id=182751
2643 Reviewed by Youenn Fablet.
2645 No change in behavior.
2647 Adding support to set a custom CookieJar Database.
2648 Took CookieJarDB::open() out of its constructor because both the Network and Web process
2649 were trying to open the journal files but one process was failing due to a lack of permission.
2650 Now the database file is lazily opened and only the Network process will try to open the database.
2651 Some cleanup was done to CookieJarDB too.
2653 * platform/network/NetworkStorageSession.h:
2654 * platform/network/curl/CookieJarDB.cpp:
2655 * platform/network/curl/CookieJarDB.h:
2656 * platform/network/curl/NetworkStorageSessionCurl.cpp:
2658 2018-02-21 Chris Dumez <cdumez@apple.com>
2660 Regression(r228708): Crash under WebCore::MediaResource::responseReceived(WebCore::CachedResource&, WebCore::ResourceResponse const&)
2661 https://bugs.webkit.org/show_bug.cgi?id=183018
2662 <rdar://problem/37754154>
2664 Reviewed by Eric Carlson.
2666 The fix at r228708 was trying to address the fact that avplayer sometimes
2667 deallocates WebCoreNSURLSessionDataTask objects on a non-main thread, which
2668 was not safe because its _resource data member needs to be deallocated on
2671 The issue is that r228708 caused _resource to outlive its WebCoreNSURLSessionDataTask.
2672 This is an issue because _resource has a client data member (of type WebCoreNSURLSessionDataTaskClient)
2673 which has a raw pointer to the WebCoreNSURLSessionDataTask. This means that the main thread could
2674 call methods like responseReceived() on the resource, which would call responseReceived() on the
2675 client, which would try to call [WebCoreNSURLSessionDataTask receivedResponse:] with an invalid
2678 To address the issue, I introduced a clearTask() method on WebCoreNSURLSessionDataTaskClient, which
2679 gets called from a non-main thread to clear the client's m_task pointer when the task is destroyed
2680 on a non-main thread. So that this is safe, every time the client tries to use m_task, we now
2681 acquire a lock for thread-safety and do a null-check on m_task.
2683 No new tests, no known reproduction case.
2685 * platform/graphics/PlatformMediaResourceLoader.h:
2686 (WebCore::PlatformMediaResource::client):
2687 * platform/network/cocoa/WebCoreNSURLSession.mm:
2688 (WebCore::WebCoreNSURLSessionDataTaskClient::clearTask):
2689 (WebCore::WebCoreNSURLSessionDataTaskClient::dataSent):
2690 (WebCore::WebCoreNSURLSessionDataTaskClient::responseReceived):
2691 (WebCore::WebCoreNSURLSessionDataTaskClient::shouldCacheResponse):
2692 (WebCore::WebCoreNSURLSessionDataTaskClient::dataReceived):
2693 (WebCore::WebCoreNSURLSessionDataTaskClient::redirectReceived):
2694 (WebCore::WebCoreNSURLSessionDataTaskClient::accessControlCheckFailed):
2695 (WebCore::WebCoreNSURLSessionDataTaskClient::loadFailed):
2696 (WebCore::WebCoreNSURLSessionDataTaskClient::loadFinished):
2697 (-[WebCoreNSURLSessionDataTask dealloc]):
2699 2018-02-21 Youenn Fablet <youenn@apple.com>
2701 Move AppCache loading to the NetworkProcess
2702 https://bugs.webkit.org/show_bug.cgi?id=178540
2703 <rdar://problem/37119346>
2705 Reviewed by Alex Christensen.
2707 Covered by existing tests.
2709 Use ApplicationResourceLoader for cache entry loading.
2710 Remove all ResourceHandle use from ApplicationCacheGroup.
2711 Renamed m_loader in m_manifestLoader and added a new m_entryLoader to load cache entries.
2713 Updated ApplicationCacheResourceLoader to handle different types of CachedResource.
2714 This allows in particular to handle redirections based on the resource type and create the ApplicationCacheResource with the right type.
2715 Use Include as credentials mode as per specification.
2717 Add a new ApplicationCache ResourceResonse::Source.
2718 This allows fixing an assertion and should allow better inspector support if needs be.
2720 * inspector/agents/InspectorNetworkAgent.cpp:
2721 (WebCore::responseSource):
2722 * loader/ResourceLoader.cpp:
2723 (WebCore::logResourceResponseSource):
2724 * loader/SubstituteResource.h:
2725 (WebCore::SubstituteResource::resourceResponse):
2726 * loader/appcache/ApplicationCacheGroup.cpp:
2727 (WebCore::ApplicationCacheGroup::stopLoading):
2728 (WebCore::ApplicationCacheGroup::update):
2729 (WebCore::ApplicationCacheGroup::didFinishLoading):
2730 (WebCore::ApplicationCacheGroup::didFinishLoadingEntry):
2731 (WebCore::ApplicationCacheGroup::didFail):
2732 (WebCore::ApplicationCacheGroup::didFailLoadingEntry):
2733 (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
2734 (WebCore::ApplicationCacheGroup::startLoadingEntry):
2735 * loader/appcache/ApplicationCacheGroup.h:
2736 * loader/appcache/ApplicationCacheResource.cpp:
2737 (WebCore::ApplicationCacheResource::ApplicationCacheResource):
2738 * loader/appcache/ApplicationCacheResourceLoader.cpp:
2739 (WebCore::ApplicationCacheResourceLoader::create):
2740 (WebCore::ApplicationCacheResourceLoader::ApplicationCacheResourceLoader):
2741 (WebCore::ApplicationCacheResourceLoader::responseReceived):
2742 (WebCore::ApplicationCacheResourceLoader::redirectReceived):
2743 * loader/appcache/ApplicationCacheResourceLoader.h:
2744 * platform/network/ResourceResponseBase.h:
2745 * platform/network/cocoa/ResourceResponseCocoa.mm:
2746 (WebCore::ResourceResponse::platformCertificateInfo const):
2747 * testing/Internals.cpp:
2748 (WebCore::responseSourceToString):
2750 2018-02-21 Zalan Bujtas <zalan@apple.com>
2752 [RenderTreeBuilder] Move RenderBoxModelObject::willBeRemoved() mutation logic to RenderTreeBuilder
2753 https://bugs.webkit.org/show_bug.cgi?id=183014
2754 <rdar://problem/37757428>
2756 Reviewed by Antti Koivisto.
2758 No change in functionality.
2761 * WebCore.xcodeproj/project.pbxproj:
2762 * rendering/RenderBoxModelObject.cpp:
2763 (WebCore::RenderBoxModelObject::~RenderBoxModelObject):
2764 (WebCore::RenderBoxModelObject::willBeDestroyed):
2765 (WebCore::RenderBoxModelObject::continuationChainNode const):
2767 (WebCore::RenderBoxModelObject::removeAndDestroyAllContinuations): Deleted.
2768 * rendering/RenderBoxModelObject.h:
2769 * rendering/updating/RenderTreeBuilder.cpp:
2770 (WebCore::RenderTreeBuilder::RenderTreeBuilder):
2771 (WebCore::RenderTreeBuilder::removeAndDestroy):
2772 * rendering/updating/RenderTreeBuilder.h:
2773 (WebCore::RenderTreeBuilder::continuationBuilder):
2774 * rendering/updating/RenderTreeBuilderContinuation.cpp: Added.
2775 (WebCore::RenderTreeBuilder::Continuation::Continuation):
2776 (WebCore::RenderTreeBuilder::Continuation::cleanupOnDestroy):
2777 * rendering/updating/RenderTreeBuilderContinuation.h: Added.
2779 2018-02-21 Youenn Fablet <youenn@apple.com>
2781 ServiceWorkerJob::m_lastResponse is unneeded
2782 https://bugs.webkit.org/show_bug.cgi?id=183013
2784 Reviewed by Chris Dumez.
2786 Remove this field since not used anywhere.
2788 * workers/service/ServiceWorkerJob.cpp:
2789 (WebCore::ServiceWorkerJob::didReceiveResponse):
2790 * workers/service/ServiceWorkerJob.h:
2792 2018-02-21 Youenn Fablet <youenn@apple.com>
2794 Use ResourceLoader to load appcache manifest
2795 https://bugs.webkit.org/show_bug.cgi?id=182861
2797 Reviewed by Alex Christensen.
2799 Covered by updated tests.
2801 Add ApplicationCacheResourceLoader to load an ApplicationCacheResource from a ResourceLoader.
2802 Make use of it to load the app cache manifest.
2803 Future work should load entries using the same loader.
2805 Remove manifest handle.
2806 Ensure that DocumentLoader does not register the manifest resource loader as its lifetime
2807 is handled by its ApplicationCacheGroup.
2809 Add a ResourceLoader option to bypass the application cache.
2810 Use it for manifest loading.
2813 * WebCore.xcodeproj/project.pbxproj:
2814 * loader/DocumentLoader.cpp:
2815 (WebCore::DocumentLoader::addSubresourceLoader):
2816 * loader/ResourceLoaderOptions.h:
2817 * loader/appcache/ApplicationCacheGroup.cpp:
2818 (WebCore::ApplicationCacheGroup::stopLoading):
2819 (WebCore::ApplicationCacheGroup::update):
2820 (WebCore::ApplicationCacheGroup::createRequest):
2821 (WebCore::ApplicationCacheGroup::didReceiveResponseAsync):
2822 (WebCore::ApplicationCacheGroup::didReceiveData):
2823 (WebCore::ApplicationCacheGroup::didFinishLoading):
2824 (WebCore::ApplicationCacheGroup::didFail):
2825 (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
2826 (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
2827 * loader/appcache/ApplicationCacheGroup.h:
2828 * loader/appcache/ApplicationCacheHost.cpp:
2829 (WebCore::ApplicationCacheHost::maybeLoadResource):
2830 (WebCore::ApplicationCacheHost::maybeLoadFallbackForRedirect):
2831 (WebCore::ApplicationCacheHost::maybeLoadFallbackForResponse):
2832 (WebCore::ApplicationCacheHost::maybeLoadFallbackForError):
2833 * loader/appcache/ApplicationCacheResourceLoader.cpp: Added.
2834 * loader/appcache/ApplicationCacheResourceLoader.h: Added.
2836 2018-02-21 Don Olmstead <don.olmstead@sony.com>
2838 [CMake][Win] Use cmakeconfig.h rather than config.h and Platform.h
2839 https://bugs.webkit.org/show_bug.cgi?id=182883
2841 Reviewed by Per Arne Vollan.
2843 No new tests. No change in behavior.
2847 * testing/js/WebCoreTestSupportPrefix.h:
2849 2018-02-21 Zalan Bujtas <zalan@apple.com>
2851 [RenderTreeBuilder] Move RenderView::willBeRemoved() mutation logic to RenderTreeBuilder
2852 https://bugs.webkit.org/show_bug.cgi?id=183009
2854 Reviewed by Antti Koivisto.
2856 No change in functionality.
2859 (WebCore::Document::destroyRenderTree):
2860 * rendering/RenderView.cpp:
2861 (WebCore::RenderView::~RenderView):
2862 (WebCore::RenderView::willBeDestroyed): Deleted.
2863 * rendering/RenderView.h:
2865 2018-02-21 Michael Catanzaro <mcatanzaro@igalia.com>
2867 [GTK] USE_UPOWER causes crashes inside a chroot or on systems with broken dbus/upower
2868 https://bugs.webkit.org/show_bug.cgi?id=181825
2870 Reviewed by Carlos Garcia Campos.
2872 We could fix this crash, but that would not be good enough, because upower-glib is a
2873 synchronous API that wraps D-Bus calls. That's not acceptable for use in the web process.
2874 Rewrite LowPowerModeNotifierGLib to use upower's D-Bus API directly, instead.
2876 Note that this also enables LowPowerModeNotifier for WPE, since the USE(UPOWER) build
2877 flag is no longer needed.
2879 * platform/LowPowerModeNotifier.cpp:
2880 * platform/LowPowerModeNotifier.h:
2881 * platform/glib/LowPowerModeNotifierGLib.cpp:
2882 (WebCore::LowPowerModeNotifier::LowPowerModeNotifier):
2883 (WebCore::LowPowerModeNotifier::updateWarningLevel):
2884 (WebCore::LowPowerModeNotifier::warningLevelChanged):
2885 (WebCore::LowPowerModeNotifier::gPropertiesChangedCallback):
2886 (WebCore::LowPowerModeNotifier::~LowPowerModeNotifier):
2887 (WebCore::LowPowerModeNotifier::updateState): Deleted.
2888 (WebCore::LowPowerModeNotifier::warningLevelCallback): Deleted.
2890 2018-02-21 Chris Dumez <cdumez@apple.com>
2892 VTTCue constructor should use 'double' type for startTime / endTime
2893 https://bugs.webkit.org/show_bug.cgi?id=182988
2895 Reviewed by Eric Carlson.
2897 VTTCue constructor should use 'double' type for startTime / endTime, not
2898 'unrestricted double':
2899 - https://w3c.github.io/webvtt/#the-vttcue-interface
2901 Otherwise, we end up potentially returning NaN for TextTrackCue.startTime / endTime,
2902 even though those correctly use type 'double':
2903 - https://html.spec.whatwg.org/multipage/media.html#texttrackcue
2905 The new behavior is consistent with Firefox and Chrome.
2907 No new tests, updated existing test.
2909 * bindings/js/JSDOMConvertNumbers.h:
2910 (WebCore::JSConverter<IDLDouble>::convert):
2911 Add assertion to make sure our implementation never tries to return NaN
2912 for an IDL attribute of type 'double'. This would be invalid as per Web
2913 IDL spec and would crash if the NaN being returned was impure as JSValue
2914 could not store it as a double.
2916 * html/track/VTTCue.idl:
2917 Update constructor parameters to use 'double' type instead of 'unrestricted
2919 - https://w3c.github.io/webvtt/#the-vttcue-interface
2921 2018-02-21 Zalan Bujtas <zalan@apple.com>
2923 [RenderTreeBuilder] Move RenderTextFragment::willBeRemoved() mutation logic to RenderTreeBuilder
2924 https://bugs.webkit.org/show_bug.cgi?id=182946
2925 <rdar://problem/37690039>
2927 Reviewed by Antti Koivisto.
2929 No change in functionality.
2931 * rendering/RenderTextFragment.cpp:
2932 (WebCore::RenderTextFragment::willBeDestroyed):
2933 * rendering/updating/RenderTreeBuilder.cpp:
2934 (WebCore::RenderTreeBuilder::takeChild):
2935 * rendering/updating/RenderTreeBuilderFirstLetter.cpp:
2936 (WebCore::RenderTreeBuilder::FirstLetter::cleanupOnRemoval):
2937 * rendering/updating/RenderTreeBuilderFirstLetter.h:
2939 2018-02-21 Ms2ger <Ms2ger@igalia.com>
2941 [GCrypt] Remove unsound assertion from CryptoKeyRSA::exportData().
2942 https://bugs.webkit.org/show_bug.cgi?id=183001
2944 Reviewed by Philippe Normand.
2946 This function is called from structured cloning, in particular when storing
2947 a key in IndexedDB. This would trip the assertion if the key in question is
2950 The assertion was copied from the macOS implementation in r172389; it was
2951 subsequently removed there in r172898 to handle this case.
2953 Test: crypto/subtle/rsa-indexeddb-non-exportable.html
2955 * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
2956 (WebCore::CryptoKeyRSA::exportData const): remove assertion.
2958 2018-02-21 Myles C. Maxfield <mmaxfield@apple.com>
2960 [Cocoa] Make system-ui obey the user-installed-font policy
2961 https://bugs.webkit.org/show_bug.cgi?id=182860
2962 <rdar://problem/36158249>
2964 Reviewed by Antti Koivisto.
2966 We have a completely different codepath for system-ui which makes it follow the system's
2967 font cascade list. This codepath (along with all the other relevant places which create
2968 system fonts) needs to obey the AllowUserInstalledFonts enum. This patch is fairly
2969 mechanical; we simply are hooking up the flag across SystemFontDatabase.
2971 There are a few places which creates system fonts which this patch doesn't touch. This is
2972 not a problem because all the remaining places either:
2973 1) Simply pull out some attributes of the font (name, weight, size, etc.) and then throw
2974 away the font object itself, or
2975 2) Use the font in an environment where script cannot access the characters rendered (such
2976 as DragImages or the fullscreen placeholder view or the inside of the attachment element).
2978 Test: fast/text/user-installed-fonts/system-ui.html
2980 * platform/graphics/cocoa/FontCacheCoreText.cpp:
2981 (WebCore::FontDatabase::collectionForFamily):
2982 (WebCore::FontDatabase::fontForPostScriptName):
2983 (WebCore::fontWithFamily):
2984 (WebCore::installedFontMandatoryAttributes):
2985 (WebCore::createSpecificFontForInstalledFonts):
2986 * platform/graphics/cocoa/FontCacheCoreText.h:
2987 * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
2988 (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::operator== const):
2989 (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::hash const):
2990 (WebCore::SystemFontDatabase::systemFontCascadeList):
2991 (WebCore::SystemFontDatabase::removeCascadeList):
2992 (WebCore::SystemFontDatabase::computeCascadeList):
2993 (WebCore::systemFontParameters):
2994 (WebCore::systemFontCascadeList):
2995 (WebCore::FontCascadeDescription::effectiveFamilyCount const):
2996 (WebCore::FontCascadeDescription::effectiveFamilyAt const):
2997 * platform/graphics/ios/FontCacheIOS.mm:
2998 (WebCore::platformFontWithFamilySpecialCase):
2999 * platform/graphics/mac/FontCacheMac.mm:
3000 (WebCore::platformFontWithFamilySpecialCase):
3002 2018-02-21 Chris Dumez <cdumez@apple.com>
3004 Unreviewed attempt to fix build after r228867.
3006 * Modules/webvr/VRStageParameters.cpp:
3008 2018-02-21 Philippe Normand <pnormand@igalia.com>
3010 [GStreamer] Rewrite purgeInvalid*Tracks methods
3011 https://bugs.webkit.org/show_bug.cgi?id=183004
3013 Reviewed by Carlos Garcia Campos.
3015 Removing items from a hashmap while iterating is bad.
3017 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3018 (WebCore::MediaPlayerPrivateGStreamer::purgeInvalidAudioTracks):
3019 Safely remove items from the hashmap using removeIf().
3020 (WebCore::MediaPlayerPrivateGStreamer::purgeInvalidVideoTracks): Ditto.
3021 (WebCore::MediaPlayerPrivateGStreamer::purgeInvalidTextTracks): Ditto.
3023 2018-02-21 Chris Dumez <cdumez@apple.com>
3025 Unreviewed attempt to fix build after r228867.
3027 * Modules/webvr/VRStageParameters.cpp:
3029 2018-02-21 Philippe Normand <pnormand@igalia.com>
3031 [GStreamer] Crash in Debug build when purging invalid tracks
3032 https://bugs.webkit.org/show_bug.cgi?id=182997
3034 Reviewed by Xabier Rodriguez-Calvar.
3036 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3037 (WebCore::MediaPlayerPrivateGStreamer::purgeInvalidAudioTracks): Clear the hashmap when there is no valid track left.
3038 (WebCore::MediaPlayerPrivateGStreamer::purgeInvalidVideoTracks): Ditto.
3039 (WebCore::MediaPlayerPrivateGStreamer::purgeInvalidTextTracks): Ditto.
3040 * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
3041 (WebCore::TrackPrivateBaseGStreamer::getLanguageCode): Demote debugging, this appears too much at least with playbin2.
3042 (WebCore::TrackPrivateBaseGStreamer::getTag): Ditto.
3044 2018-02-21 Philippe Normand <pnormand@igalia.com>
3046 [GStreamer] We need to adopt GstGlDisplays after GStreamer 1.13.1
3047 https://bugs.webkit.org/show_bug.cgi?id=182996
3049 Reviewed by Xabier Rodriguez-Calvar.
3051 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3052 (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
3053 Adopt references when running with GStreamer 1.13.1 to avoid
3056 2018-02-20 Philippe Normand <pnormand@igalia.com>
3058 [GTK] Layout test media/track/track-in-band-duplicate-tracks-when-source-changes.html failing since r228617
3059 https://bugs.webkit.org/show_bug.cgi?id=160131
3060 <rdar://problem/35873985>
3062 Reviewed by Michael Catanzaro.
3064 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3065 (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText): We
3066 can't assume the pad has a sticky event here like implemented in
3067 InbandTextTrackPrivateGStreamer because it might be emitted after
3068 the track was created. So fallback to a dummy stream ID like in
3069 the Audio and Video tracks.
3071 2018-02-20 Sergio Villar Senin <svillar@igalia.com>
3073 [WebVR][OpenVR] Retrieve stage parameters
3074 https://bugs.webkit.org/show_bug.cgi?id=182976
3076 Reviewed by Žan Doberšek.
3078 Use OpenVR to retrieve stage parameters, i.e., play area size and
3079 the transformation from sitting to standing position. It includes
3080 the same fallback used by Firefox to provide sensible values in case
3081 we cannot get the required information from the VR SDK (it's quite
3082 common not to have defined a play area).
3084 * Modules/webvr/VRDisplay.cpp:
3085 (WebCore::VRDisplay::stageParameters const):
3086 * Modules/webvr/VRDisplay.h:
3087 * Modules/webvr/VRStageParameters.cpp:
3088 (WebCore::VRStageParameters::VRStageParameters):
3089 (WebCore::VRStageParameters::sittingToStandingTransform const):
3090 (WebCore::VRStageParameters::sizeX const):
3091 (WebCore::VRStageParameters::sizeZ const):
3092 * Modules/webvr/VRStageParameters.h:
3093 (WebCore::VRStageParameters::create):
3094 * platform/vr/VRPlatformDisplay.h:
3095 * platform/vr/openvr/VRPlatformDisplayOpenVR.cpp:
3096 (WebCore::VRPlatformDisplayOpenVR::VRPlatformDisplayOpenVR):
3097 (WebCore::VRPlatformDisplayOpenVR::updateStageParameters):
3098 * platform/vr/openvr/VRPlatformDisplayOpenVR.h:
3100 2018-02-21 Philippe Normand <pnormand@igalia.com>
3102 [GStreamer] Create a Wayland GL display instead of EGL
3103 https://bugs.webkit.org/show_bug.cgi?id=182968
3105 Reviewed by Xabier Rodriguez-Calvar.
3107 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3108 (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
3109 Add logging and instantiate a GstDisplayWayland display instead of
3110 an EGL display when running under a Wayland compositor.
3112 2018-02-21 Zalan Bujtas <zalan@apple.com>
3114 [RenderTreeBuilder] Move RenderFullScreen::willBeRemoved() mutation logic to RenderTreeBuilder
3115 https://bugs.webkit.org/show_bug.cgi?id=182947
3116 <rdar://problem/37690848>
3118 Reviewed by Antti Koivisto.
3120 No change in functionality.
3123 * WebCore.xcodeproj/project.pbxproj:
3124 * rendering/RenderFullScreen.cpp:
3125 (WebCore::RenderFullScreen::willBeDestroyed):
3126 * rendering/updating/RenderTreeBuilder.cpp:
3127 (WebCore::RenderTreeBuilder::takeChild):
3128 * rendering/updating/RenderTreeBuilder.h:
3129 (WebCore::RenderTreeBuilder::fullScreenBuilder):
3130 * rendering/updating/RenderTreeBuilderFullScreen.cpp: Added.
3131 (WebCore::RenderTreeBuilder::FullScreen::FullScreen):
3132 (WebCore::RenderTreeBuilder::FullScreen::cleanupOnRemoval):
3133 * rendering/updating/RenderTreeBuilderFullScreen.h: Added.
3134 * rendering/updating/RenderTreeBuilderMathML.cpp:
3136 2018-02-20 Zalan Bujtas <zalan@apple.com>
3138 [RenderTreeBuilder] Move RenderListItem::willBeRemoved() mutation logic to RenderTreeBuilder
3139 https://bugs.webkit.org/show_bug.cgi?id=182943
3140 <rdar://problem/37689029>
3142 Reviewed by Antti Koivisto.
3144 We don't need to destroy the marker in RenderListItem::willBeRemoved(), because it gets deleted
3145 in RenderTreeBuilder::removeAndDestroy() together with RenderListItem (as long as the marker is
3146 the RenderListItem's descendent).
3148 Covered by existing tests.
3150 * rendering/RenderListItem.cpp:
3151 (WebCore::RenderListItem::~RenderListItem):
3152 (WebCore::RenderListItem::willBeDestroyed): Deleted.
3153 * rendering/RenderListItem.h:
3155 2018-02-20 Nan Wang <n_wang@apple.com>
3157 AX: Keyboard focus not following VoiceOver cursor into web content or within web content.
3158 https://bugs.webkit.org/show_bug.cgi?id=182752
3159 <rdar://problem/37518233>
3161 Reviewed by Ryosuke Niwa.
3163 Call the assistive technology specific method for becoming first responder.
3165 Test: accessibility/mac/accessibility-make-first-responder.html
3167 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3168 (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
3169 * page/ChromeClient.h:
3171 2018-02-20 Tim Horton <timothy_horton@apple.com>
3173 Introduce HAVE(IOSURFACE_ACCELERATOR)
3174 https://bugs.webkit.org/show_bug.cgi?id=182955
3175 <rdar://problem/37699510>
3177 Reviewed by Sam Weinig.
3179 No new tests, no change in behavior.
3181 Introduce HAVE(IOSURFACE_ACCELERATOR) and guard all uses of
3182 IOSurfaceAccelerator behind it.
3184 Rename USE(IOSURFACE) to HAVE(IOSURFACE) for accuracy.
3186 * page/cocoa/MemoryReleaseCocoa.mm:
3187 * platform/graphics/ca/TileController.cpp:
3188 * platform/graphics/cg/IOSurfacePool.cpp:
3189 * platform/graphics/cg/IOSurfacePool.h:
3190 * platform/graphics/cg/ImageBufferCG.cpp:
3191 * platform/graphics/cocoa/IOSurface.h:
3192 * platform/graphics/cocoa/IOSurface.mm:
3193 * platform/graphics/cocoa/IOSurfacePoolCocoa.mm:
3194 * platform/graphics/cv/VideoTextureCopierCV.cpp:
3195 * platform/graphics/cv/VideoTextureCopierCV.h:
3197 2018-02-20 Chris Dumez <cdumez@apple.com>
3199 Provisional load may get committed before receiving the decidePolicyForNavigationResponse response
3200 https://bugs.webkit.org/show_bug.cgi?id=182720
3201 <rdar://problem/37515204>
3203 Reviewed by Alex Christensen.
3205 Wait for the policy response from the client after receiving a resource response,
3206 before sending the NetworkResourceLoader::ContinueDidReceiveResponse IPC back to
3207 the NetworkProcess. Otherwise, the network process may start sending us data and
3208 we may end up committing the provisional load before receiving the policy decision
3211 Change is covered by new API test.
3213 * loader/DocumentLoader.cpp:
3214 (WebCore::DocumentLoader::responseReceived):
3215 * loader/NetscapePlugInStreamLoader.cpp:
3216 (WebCore::NetscapePlugInStreamLoader::didReceiveResponse):
3217 * loader/NetscapePlugInStreamLoader.h:
3218 * loader/ResourceLoader.cpp:
3219 (WebCore::ResourceLoader::deliverResponseAndData):
3220 (WebCore::ResourceLoader::loadDataURL):
3221 (WebCore::ResourceLoader::didReceiveResponse):
3222 (WebCore::ResourceLoader::didReceiveResponseAsync):
3223 * loader/ResourceLoader.h:
3224 * loader/SubresourceLoader.cpp:
3225 (WebCore::SubresourceLoader::didReceiveResponse):
3226 (WebCore::SubresourceLoader::didReceiveResponsePolicy):
3227 (WebCore::SubresourceLoader::willCancel):
3228 * loader/SubresourceLoader.h:
3229 * loader/ios/PreviewLoader.mm:
3230 (-[WebPreviewLoader _sendDidReceiveResponseIfNecessary]):
3232 2018-02-20 Chris Dumez <cdumez@apple.com>
3234 Crash under JSC::JSCell::toNumber(JSC::ExecState*)
3235 https://bugs.webkit.org/show_bug.cgi?id=182984
3236 <rdar://problem/37694346>
3238 Reviewed by Mark Lam.
3240 The issue was caused by DOMMatrix attributes potentially returning "impure"
3241 NaN values. We would call JSC::jsNumber(double) to construct the JSValue
3242 but this is only safe for pure NaN values. Make sure we purify the double
3243 returned by the implementation for IDL attributes of type 'unrestricted double'
3244 before calling JSC::jsNumber(double).
3246 No new tests, extended existing test.
3248 * bindings/js/JSDOMConvertNumbers.h:
3249 (WebCore::JSConverter<IDLUnrestrictedDouble>::convert):
3250 * testing/TypeConversions.h:
3251 (WebCore::TypeConversions::testImpureNaNUnrestrictedDouble const):
3252 (WebCore::TypeConversions::testImpureNaN2UnrestrictedDouble const):
3253 (WebCore::TypeConversions::testQuietNaNUnrestrictedDouble const):
3254 * testing/TypeConversions.idl:
3256 2018-02-20 Tim Horton <timothy_horton@apple.com>
3258 Make more use of USE(OPENGL_ES) where it makes sense
3259 https://bugs.webkit.org/show_bug.cgi?id=182957
3260 <rdar://problem/37699443>
3262 Reviewed by Dan Bernstein.
3264 No new tests, no behavior change.
3266 Make use of USE(OPENGL_ES) for CoreVideo functions that differ based
3267 on GL availability. Also adjust GraphicsContext3D in the same way.
3269 * platform/cocoa/CoreVideoSoftLink.cpp:
3270 * platform/cocoa/CoreVideoSoftLink.h:
3271 * platform/graphics/GraphicsContext3D.h:
3272 * platform/graphics/cv/TextureCacheCV.mm:
3273 (WebCore::TextureCacheCV::create):
3274 (WebCore::TextureCacheCV::textureFromImage):
3275 * platform/graphics/cv/VideoTextureCopierCV.cpp:
3276 (WebCore::enumToStringMap):
3277 (WebCore::VideoTextureCopierCV::initializeContextObjects):
3278 (WebCore::VideoTextureCopierCV::initializeUVContextObjects):
3279 (WebCore::VideoTextureCopierCV::copyImageToPlatformTexture):
3280 (WebCore::VideoTextureCopierCV::copyVideoTextureToPlatformTexture):
3282 2018-02-20 Nan Wang <n_wang@apple.com>
3284 AX: AOM: Dispatch accessibleclick event
3285 https://bugs.webkit.org/show_bug.cgi?id=180898
3286 <rdar://problem/36086710>
3288 Reviewed by Ryosuke Niwa.
3290 Accessibility events.
3291 Spec: https://wicg.github.io/aom/spec/phase2.html
3293 This patch allows developers to register event handlers on Elements
3294 for custom accessibility events.
3296 Accessibility events go through a capturing and bubbling phase just
3297 like DOM events, but in the accessibility tree.
3299 Implemented "accessibleclick" event.
3301 Test: accessibility/mac/AOM-events.html
3303 * accessibility/AccessibilityObject.cpp:
3304 (WebCore::AccessibilityObject::press):
3305 (WebCore::AccessibilityObject::dispatchAccessibilityEvent):
3306 * accessibility/AccessibilityObject.h:
3307 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3308 (-[WebAccessibilityObjectWrapper accessibilityPerformAction:]):
3310 * dom/EventDispatcher.cpp:
3311 (WebCore::dispatchEventWithType):
3312 (WebCore::EventDispatcher::dispatchEvent):
3313 * dom/EventDispatcher.h:
3315 * dom/EventPath.cpp:
3316 (WebCore::EventPath::EventPath):
3319 2018-02-20 Wenson Hsieh <wenson_hsieh@apple.com>
3321 [iOS 11.3 Beta] Can't copy a URL from Safari and paste it into the Gmail app
3322 https://bugs.webkit.org/show_bug.cgi?id=182952
3323 <rdar://problem/37636190>
3325 Reviewed by Tim Horton.
3327 After r220865 refactored the iOS copy codepaths to use NSItemProviders, we stopped writing the URL as plain text
3328 to the pasteboard. However, this means clients that only check for "text/plain" (or one of its aliases) on the
3329 pasteboard won't read any data on paste.
3331 To fix this, we restore the pre-iOS 11.3 behavior of writing both the URL and plain text to the pasteboard.
3332 Since we're using item providers, we also ensure that the NSURL is at a higher fidelity than the string to make
3333 it clear that the data should be consumed as a URL.
3335 This patch also rebaselines an existing drag and drop test to cover this change, and adds a new API test,
3336 ActionSheetTests.CopyLinkWritesURLAndPlainText, which simulates copying a link using the share sheet and pasting
3337 into a DataTransfer-dumping test harness.
3339 * platform/ios/PlatformPasteboardIOS.mm:
3340 (WebCore::PlatformPasteboard::write):
3342 2018-02-20 Eric Carlson <eric.carlson@apple.com>
3344 [iOS] Returning from Auto-PiP causes Safari to be unresponsive
3345 https://bugs.webkit.org/show_bug.cgi?id=182977
3346 <rdar://problem/37685981>
3348 Reviewed by Jer Noble.
3350 Remove the error handling added in r228115, it breaks auto-pip.
3352 * platform/ios/VideoFullscreenInterfaceAVKit.mm:
3353 (VideoFullscreenInterfaceAVKit::applicationDidBecomeActive):
3354 (VideoFullscreenInterfaceAVKit::enterFullscreenStandard):
3355 (VideoFullscreenInterfaceAVKit::exitFullscreen):
3356 (VideoFullscreenInterfaceAVKit::cleanupFullscreen):
3357 (VideoFullscreenInterfaceAVKit::didStartPictureInPicture):
3358 (VideoFullscreenInterfaceAVKit::prepareForPictureInPictureStopWithCompletionHandler):
3359 (VideoFullscreenInterfaceAVKit::exitFullscreenHandler):
3360 (VideoFullscreenInterfaceAVKit::enterFullscreenHandler):
3362 2018-02-20 Jer Noble <jer.noble@apple.com>
3364 [EME] Adopt new AVContentKeySession success delegate callback
3365 https://bugs.webkit.org/show_bug.cgi?id=182974
3366 <rdar://problem/36079035>
3368 Reviewed by Eric Carlson.
3370 Store the updateLicenseCallback if the new protocol method is present and supported.
3372 * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:
3373 * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
3374 (-[WebCoreFPSContentKeySessionDelegate contentKeySession:contentKeyRequestDidSucceed:]):
3375 (WebCore::CDMInstanceFairPlayStreamingAVFObjC::updateLicense):
3376 (WebCore::CDMInstanceFairPlayStreamingAVFObjC::didFailToProvideRequest):
3377 (WebCore::CDMInstanceFairPlayStreamingAVFObjC::requestDidSucceed):
3379 2018-02-19 Dean Jackson <dino@apple.com>
3381 Handle all writing-modes in downcast
3382 https://bugs.webkit.org/show_bug.cgi?id=182949
3383 <rdar://problem/37710687>
3385 Reviewed by Myles Maxfield.
3387 It appears we forgot to handle the deprecated "lr"
3390 Test: fast/writing-mode/svg-writing-modes.html
3392 * css/CSSPrimitiveValueMappings.h:
3393 (WebCore::CSSPrimitiveValue::operator WritingMode const):
3395 2018-02-20 Zan Dobersek <zdobersek@igalia.com>
3397 [Cairo] Drop target GraphicsContext usage in Cairo operations
3398 https://bugs.webkit.org/show_bug.cgi?id=182964
3400 Reviewed by Carlos Garcia Campos.
3402 The GraphicsContext parameters in various Cairo operations are not used
3403 anymore, so they can be removed. Callsites are updated to reflect this.
3405 * platform/graphics/cairo/CairoOperations.cpp:
3406 (WebCore::Cairo::drawShadowLayerBuffer):
3407 (WebCore::Cairo::fillShadowBuffer):
3408 (WebCore::Cairo::drawPathShadow):
3409 (WebCore::Cairo::drawGlyphsShadow):
3410 (WebCore::Cairo::fillRect):
3411 (WebCore::Cairo::fillRoundedRect):
3412 (WebCore::Cairo::fillRectWithRoundedHole):
3413 (WebCore::Cairo::fillPath):
3414 (WebCore::Cairo::strokeRect):
3415 (WebCore::Cairo::strokePath):
3416 (WebCore::Cairo::drawGlyphs):
3417 (WebCore::Cairo::drawNativeImage):
3418 (WebCore::Cairo::drawSurface):
3419 * platform/graphics/cairo/CairoOperations.h:
3420 * platform/graphics/cairo/FontCairo.cpp:
3421 (WebCore::FontCascade::drawGlyphs):
3422 * platform/graphics/cairo/GraphicsContextCairo.cpp: