Timeline
Apr 5, 2021:
- 9:49 PM Changeset in webkit [275492] by
-
- 2 edits in trunk/Source/WebKit
Allow the WebAuthn UI to inform users about BiometryLockout
https://bugs.webkit.org/show_bug.cgi?id=224124
<rdar://74815938>
Reviewed by Brent Fulgham.
- UIProcess/WebAuthentication/Cocoa/LocalService.mm:
(WebKit::LocalService::isAvailable):
The LocalService is still available within the BiometryLockout period.
- 9:31 PM Changeset in webkit [275491] by
-
- 8 edits in trunk/Source/WebKit
[macOS] Image preview context menu action should be shown conditionally
https://bugs.webkit.org/show_bug.cgi?id=224126
<rdar://problem/76162272>
Reviewed by Devin Rousso.
Add a page client hook to return whether or not the "reveal image" context menu item should be enabled, given
the image URL and decoded image bitmap; we then use this method to conditionally insert a context menu item for
revealing the image in context menu data.
- UIProcess/Cocoa/WebViewImpl.h:
- UIProcess/PageClient.h:
(WebKit::PageClient::computeCanRevealImage):
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::computeCanRevealImage):
- UIProcess/WebPageProxy.h:
- UIProcess/mac/PageClientImplMac.h:
- UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::computeCanRevealImage):
- UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::createMenuActionItem):
Pull logic for mapping a
WebContextMenuItemDataof typeActionTypeorCheckableActionTypeto a platform
NSMenuItemout into a separate helper function. Use this helper ingetContextMenuItem, as well as the
completion handler for the call tocomputeCanRevealImage. Note that this also requires moving the
menuItemIdentifierfunction up abovegetContextMenuFromItems.
(WebKit::WebContextMenuProxyMac::getContextMenuFromItems):
Special case the
ContextMenuItemTagRevealImageitem; instead of adding this item to the context menu right
away, we hide it by default, and only reinsert it if the page client indicates that we require the item (via
computeCanRevealImage).
(WebKit::WebContextMenuProxyMac::getContextMenuItem):
- 9:25 PM Changeset in webkit [275490] by
-
- 50 edits in trunk/Source
[JSC] Shrink some of Vectors in JSC
https://bugs.webkit.org/show_bug.cgi?id=224162
Reviewed by Simon Fraser.
Source/JavaScriptCore:
- Add XXXStatus::shrinkToFit to shrink underlying dynamic Vectors.
- Replace tierUpInLoopHierarchy's Vector with RefCountedArray since it is constructed-once-lookup-only data.
- Use MemoryCompactLookupOnlyRobinHoodHashSet for StringTables since this is constructed-once-lookup-only data. We also add MemoryCompactLookupOnlyRobinHoodHashSet support for CachedTypes.
- Use resizeToFit for StringSwitchJumpTables and SwitchJumpTables.
- JITStubRoutineSet's Vector should be shrunk.
- BlockDirectoryBits's Vector's initial size should be small.
- Make PolyProtoAccessChain RefCounted, and use RefCountedArray for its Vector<StructureID>. And remove PolyProtoAccessChain::clone. Just having Ref is enough since this is immutable data.
- Use RefCountedArray for UnlinkedFunctionExecutable's m_classFieldLocations.
- Use RefCountedArray for JSWebAssemblyInstance.
- bytecode/AccessCase.cpp:
(JSC::AccessCase::AccessCase):
(JSC::AccessCase::create):
(JSC::AccessCase::createTransition):
- bytecode/AccessCase.h:
(JSC::AccessCase::AccessCase): Deleted.
- bytecode/CallLinkInfo.cpp:
(JSC::CallLinkInfo::setFrameShuffleData):
- bytecode/CheckPrivateBrandStatus.cpp:
(JSC::CheckPrivateBrandStatus::shrinkToFit):
(JSC::CheckPrivateBrandStatus::computeForStubInfoWithoutExitSiteFeedback):
(JSC::CheckPrivateBrandStatus::merge):
- bytecode/CheckPrivateBrandStatus.h:
- bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finishCreation):
- bytecode/DeleteByStatus.cpp:
(JSC::DeleteByStatus::shrinkToFit):
(JSC::DeleteByStatus::computeForStubInfoWithoutExitSiteFeedback):
(JSC::DeleteByStatus::merge):
- bytecode/DeleteByStatus.h:
- bytecode/GetByStatus.cpp:
(JSC::GetByStatus::shrinkToFit):
(JSC::GetByStatus::computeForStubInfoWithoutExitSiteFeedback):
(JSC::GetByStatus::computeFor):
(JSC::GetByStatus::merge):
- bytecode/GetByStatus.h:
- bytecode/GetterSetterAccessCase.cpp:
(JSC::GetterSetterAccessCase::GetterSetterAccessCase):
(JSC::GetterSetterAccessCase::create):
- bytecode/GetterSetterAccessCase.h:
- bytecode/InByIdStatus.cpp:
(JSC::InByIdStatus::shrinkToFit):
(JSC::InByIdStatus::computeForStubInfoWithoutExitSiteFeedback):
(JSC::InByIdStatus::merge):
- bytecode/InByIdStatus.h:
- bytecode/InstanceOfStatus.cpp:
(JSC::InstanceOfStatus::shrinkToFit):
(JSC::InstanceOfStatus::computeForStubInfo):
- bytecode/InstanceOfStatus.h:
- bytecode/IntrinsicGetterAccessCase.cpp:
(JSC::IntrinsicGetterAccessCase::IntrinsicGetterAccessCase):
(JSC::IntrinsicGetterAccessCase::create):
- bytecode/IntrinsicGetterAccessCase.h:
- bytecode/JumpTable.h:
- bytecode/PolyProtoAccessChain.cpp:
(JSC::PolyProtoAccessChain::tryCreate):
(JSC::PolyProtoAccessChain::create): Deleted.
- bytecode/PolyProtoAccessChain.h:
(JSC::PolyProtoAccessChain::clone): Deleted.
(JSC::PolyProtoAccessChain::chain const): Deleted.
(JSC::PolyProtoAccessChain::operator!= const): Deleted.
(JSC::PolyProtoAccessChain::forEach const): Deleted.
(JSC::PolyProtoAccessChain::slotBaseStructure const): Deleted.
- bytecode/PolymorphicAccess.cpp:
(JSC::PolymorphicAccess::visitWeak const):
(JSC::PolymorphicAccess::regenerate):
- bytecode/PolymorphicAccess.h:
- bytecode/ProxyableAccessCase.cpp:
(JSC::ProxyableAccessCase::ProxyableAccessCase):
(JSC::ProxyableAccessCase::create):
- bytecode/ProxyableAccessCase.h:
- bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::shrinkToFit):
(JSC::PutByIdStatus::computeForStubInfo):
(JSC::PutByIdStatus::computeFor):
(JSC::PutByIdStatus::merge):
- bytecode/PutByIdStatus.h:
- bytecode/SetPrivateBrandStatus.cpp:
(JSC::SetPrivateBrandStatus::shrinkToFit):
(JSC::SetPrivateBrandStatus::computeForStubInfoWithoutExitSiteFeedback):
(JSC::SetPrivateBrandStatus::merge):
- bytecode/SetPrivateBrandStatus.h:
- bytecode/UnlinkedCodeBlock.h:
- bytecode/UnlinkedFunctionExecutable.cpp:
(JSC::generateUnlinkedFunctionCodeBlock):
- bytecode/UnlinkedFunctionExecutable.h:
- dfg/DFGJITCode.h:
- dfg/DFGPlan.h:
(JSC::DFG::Plan::tierUpInLoopHierarchy):
- dfg/DFGTierUpCheckInjectionPhase.cpp:
(JSC::DFG::TierUpCheckInjectionPhase::run):
- heap/BlockDirectoryBits.h:
- heap/JITStubRoutineSet.cpp:
(JSC::JITStubRoutineSet::deleteUnmarkedJettisonedStubRoutines):
- jit/CallFrameShuffleData.h:
(JSC::CallFrameShuffleData::shrinkToFit):
- jit/GCAwareJITStubRoutine.h:
- jit/PolymorphicCallStubRoutine.h:
- jit/Repatch.cpp:
(JSC::tryCacheGetBy):
(JSC::tryCachePutByID):
(JSC::tryCacheInByID):
- parser/Parser.cpp:
(JSC::Parser<LexerType>::parseInner):
(JSC::Parser<LexerType>::parseClassFieldInitializerSourceElements):
- parser/Parser.h:
(JSC::Parser<LexerType>::parse):
(JSC::parse):
- runtime/CachedTypes.cpp:
(JSC::CachedFunctionExecutableRareData::encode):
(JSC::CachedFunctionExecutableRareData::decode const):
- runtime/VM.cpp:
(JSC::VM::popAllCheckpointOSRSideStateUntil):
- wasm/js/JSWebAssemblyInstance.cpp:
(JSC::JSWebAssemblyInstance::visitChildrenImpl):
- wasm/js/JSWebAssemblyInstance.h:
Source/WTF:
Add rbegin and rend to make RefCountedArray usable for Vector clients who use these features.
- wtf/RefCountedArray.h:
(WTF::RefCountedArray::begin):
(WTF::RefCountedArray::end):
(WTF::RefCountedArray::begin const):
(WTF::RefCountedArray::end const):
(WTF::RefCountedArray::rbegin):
(WTF::RefCountedArray::rend):
(WTF::RefCountedArray::rbegin const):
(WTF::RefCountedArray::rend const):
- 9:20 PM Changeset in webkit [275489] by
-
- 7 edits in branches/safari-612.1.10-branch/Source/ThirdParty/ANGLE
Cherry-pick r275476. rdar://problem/76250256
[METAL ANGLE] Stencil only formats being used as the depth attachment.
https://bugs.webkit.org/show_bug.cgi?id=224183
Patch by John Cunningham <johncunnigham@apple.com> on 2021-04-05
Reviewed by Jon Lee.
- src/compiler/translator/TranslatorMetalDirect/ProgramPrelude.cpp:
- src/compiler/translator/TranslatorMetalDirect/RewriteOutArgs.cpp: (sh::Rewriter::argAlreadyProcessed):
- src/libANGLE/renderer/metal/ContextMtl.mm: (rx::ContextMtl::setupDraw):
- src/libANGLE/renderer/metal/mtl_command_buffer.h:
- src/libANGLE/renderer/metal/mtl_command_buffer.mm: (rx::mtl::RenderCommandEncoder::reset): (rx::mtl::RenderCommandEncoder::setRenderPipelineState): (rx::mtl::RenderCommandEncoder::draw): (rx::mtl::RenderCommandEncoder::drawInstanced): (rx::mtl::RenderCommandEncoder::drawIndexed): (rx::mtl::RenderCommandEncoder::drawIndexedInstanced): (rx::mtl::RenderCommandEncoder::drawIndexedInstancedBaseVertex):
- src/libANGLE/renderer/metal/mtl_utils.mm: (rx::mtl::InitializeDepthStencilTextureContentsGPU):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 9:18 PM Changeset in webkit [275488] by
-
- 3 edits in trunk/Source/WebCore
Wasted vector capacity in CSSSegmentedFontFace
https://bugs.webkit.org/show_bug.cgi?id=224167
Reviewed by Myles C. Maxfield.
Shrink FontRanges.m_ranges. This saves about 12KB on youtube.com.
- css/CSSSegmentedFontFace.cpp:
(WebCore::CSSSegmentedFontFace::fontRanges):
- platform/graphics/FontRanges.h:
(WebCore::FontRanges::shrinkToFit):
- 9:03 PM Changeset in webkit [275487] by
-
- 9 edits in trunk
REGRESSION(r267763) NetworkProcess never terminates
https://bugs.webkit.org/show_bug.cgi?id=224191
<rdar://problem/76124590>
Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-05
Reviewed by Chris Dumez.
Source/WebKit:
Before r267763, when a WebProcessPool was deallocated, the NetworkProcess it owned was terminated.
Since then, once you start using a NetworkProcess, it will be kept until your app closes or it crashes.
To reclaim these resources in a way similar to how we did before, we now terminate the network process in two situations:
- If all WebsiteDataStores associated with it are deallocated. This happens if you have never used the default WKWebsiteDataStore.
- If all WebProcessPools are deallocated. This can still happen if you do use the default WKWebsiteDataStore, which is never deallocated.
Covered by API tests.
- UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(+[WKWebsiteDataStore _defaultNetworkProcessExists]):
- UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
- UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::defaultNetworkProcessExists):
(WebKit::NetworkProcessProxy::removeSession):
- UIProcess/Network/NetworkProcessProxy.h:
- UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::~WebProcessPool):
Tools:
- TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:
(TEST):
- 9:02 PM Changeset in webkit [275486] by
-
- 6 edits in trunk/Source/WebKit
Reduce crash inside getAuditToken
https://bugs.webkit.org/show_bug.cgi?id=224196
<rdar://74536285>
Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-05
Reviewed by David Kilzer.
Something is crashing inside the call to getAuditToken, and I believe it is happening during teardown of the network process.
After many days of head scratching and many previous attempts at fixing this problem, it persists.
Since direct strategies at fixing this problem have failed, I now try something different.
Instead of calling getAuditToken at the beginning of every resource load to ask if the parent process has an entitlement,
I now call it only once per process. That should make things faster and less crashy. Otherwise no change in behavior.
- NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::activateSessionCleanup):
(WebKit::NetworkSessionCocoa::sessionWrapperForTask):
- Shared/Cocoa/DefaultWebBrowserChecks.h:
- Shared/Cocoa/DefaultWebBrowserChecks.mm:
(WebKit::doesParentProcessHaveITPEnabled):
(WebKit::isParentProcessAFullWebBrowser):
- WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp:
(WebKit::WebCore::isWebBrowser):
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::isParentProcessAWebBrowser const):
- 8:19 PM Changeset in webkit [275485] by
-
- 19 edits in trunk/Source
Make sure we no longer show the previous page when running a JS prompt
https://bugs.webkit.org/show_bug.cgi?id=215782
<rdar://problem/67698601>
Reviewed by Darin Adler.
Source/WebCore:
Add linked-on-after check for the behavior change to minimize the risk of
breakage.
- platform/cocoa/VersionChecks.h:
Source/WebKit:
Make sure we no longer show the previous page when running a JS prompt.
If we have not yet done a layer tree commit since the last load commit, then
we are likely still showing the previous page. If we are asked to run a JS
prompt / alert / confirm at this point, it would be confusing to still show
the previous page. In order to address the issue, we now make the view blank
in such scenario (ideally, we'd have painted the new page but this is
currently not a trivial thing to do).
To make the view blank, the approach chosen is the set the opacity of our
root layer to 0 when the JS prompt is requested (before the first paint) and
set the opacity back to 1 after the first paint.
To minimize the risks of breakage, the behavior change is behind a
linked-on-after check. Also, we only trigger this behavior if the WKWebView
client actually implements the corresponding JS prompt delegate.
- UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::runJavaScriptAlert):
(WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
(WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
- UIProcess/PageClient.h:
(WebKit::PageClient::makeViewBlank):
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::stopMakingViewBlankDueToLackOfRenderingUpdate):
(WebKit::WebPageProxy::makeViewBlankIfUnpaintedSinceLastLoadCommit):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::runJavaScriptAlert):
- UIProcess/WebPageProxy.h:
- UIProcess/WebPageProxy.messages.in:
- UIProcess/ios/PageClientImplIOS.h:
- UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::makeViewBlank):
- UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didCommitLayerTree):
- UIProcess/mac/PageClientImplMac.h:
- UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::makeViewBlank):
- UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::didUpdateRenderingAfterCommittingLoad):
- WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::runJavaScriptAlert):
(WebKit::WebChromeClient::runJavaScriptConfirm):
(WebKit::WebChromeClient::runJavaScriptPrompt):
Add flag to make sure pending async messages are processed *before* the JS prompt sync IPCs.
Without this, it was possible for the UIProcess to receive the JS prompt IPC *before* the
DidCommitLoadForFrame IPC, which would confuse our logic, since we would think this is a JS
prompt for the previous page.
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad):
- WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::sendSyncWithDelayedReply):
- WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updateRendering):
- WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::didUpdateRendering):
- 8:19 PM Changeset in webkit [275484] by
-
- 29 edits2 moves1 add in trunk
Resurrect Mac CMake build
https://bugs.webkit.org/show_bug.cgi?id=224084
Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-05
Reviewed by Tim Horton.
.:
- Source/cmake/OptionsMac.cmake:
Source/JavaScriptCore:
- PlatformMac.cmake:
Source/ThirdParty/ANGLE:
- PlatformMac.cmake: Added.
Source/ThirdParty/libwebrtc:
- CMakeLists.txt:
Source/WebCore:
- PlatformMac.cmake:
- SourcesCocoa.txt:
- WebCore.xcodeproj/project.pbxproj:
- platform/mac/WebGLBlocklist.mm:
- platform/text/cocoa/LocalizedDateCache.h: Renamed from Source/WebCore/platform/text/ios/LocalizedDateCache.h.
- platform/text/cocoa/LocalizedDateCache.mm: Renamed from Source/WebCore/platform/text/ios/LocalizedDateCache.mm.
(WebCore::localizedDateCache):
(WebCore::_localeChanged):
(WebCore::LocalizedDateCache::LocalizedDateCache):
(WebCore::LocalizedDateCache::~LocalizedDateCache):
(WebCore::LocalizedDateCache::localeChanged):
(WebCore::LocalizedDateCache::formatterForDateType):
(WebCore::LocalizedDateCache::maximumWidthForDateType):
(WebCore::LocalizedDateCache::createFormatterForType):
(WebCore::LocalizedDateCache::calculateMaximumWidth):
- testing/cocoa/WebViewVisualIdentificationOverlay.mm:
Source/WebCore/PAL:
- pal/PlatformMac.cmake:
Source/WebKit:
- NetworkProcess/PrivateClickMeasurementNetworkLoader.cpp:
(WebKit::PrivateClickMeasurementNetworkLoader::didReceiveBuffer):
- PlatformMac.cmake:
- Shared/Cocoa/SandboxExtensionCocoa.mm:
- SourcesCocoa.txt:
- UIProcess/Media/MediaSessionCoordinatorProxyPrivate.h:
Source/WebKitLegacy:
- PlatformMac.cmake:
Source/WTF:
- wtf/PlatformMac.cmake:
Tools:
- TestWebKitAPI/PlatformMac.cmake:
- WebKitTestRunner/PlatformMac.cmake:
- 8:08 PM Changeset in webkit [275483] by
-
- 3 edits in trunk/Source/WebCore
Wasted vector capacity in SVGPathByteStream
https://bugs.webkit.org/show_bug.cgi?id=224165
Reviewed by Said Abou-Hallawa.
On youtube.com, about 50KB of vector capacity is wasted in SVGPathByteStream,
so shrink them after parsing.
- svg/SVGPathByteStream.h:
(WebCore::SVGPathByteStream::shrinkToFit):
- svg/SVGPathParser.cpp:
(WebCore::SVGPathParser::parseToByteStream):
- 7:46 PM Changeset in webkit [275482] by
-
- 2 edits in trunk
Document how to use logging in WebKit
https://bugs.webkit.org/show_bug.cgi?id=224152
Patch by Tyler Wilcock <Tyler Wilcock> on 2021-04-05
Reviewed by Simon Fraser.
Add documentation about how to use logging in WebKit.
- Introduction.md:
- 7:46 PM Changeset in webkit [275481] by
-
- 2 edits in trunk/Source/WebCore
Wasted vector capacity in CSSVariableData
https://bugs.webkit.org/show_bug.cgi?id=224164
Reviewed by Anders Carlsson.
Shrink m_tokens. This saves 2.7MB on youtube.com.
- css/CSSVariableData.cpp:
(WebCore::CSSVariableData::CSSVariableData):
- 7:36 PM Changeset in webkit [275480] by
-
- 13 edits in trunk
REGRESSION: ASSERTION FAILED: settings().textAutosizingEnabled() && settings().textAutosizingUsesIdempotentMode() on various tests
https://bugs.webkit.org/show_bug.cgi?id=209450
<rdar://problem/60799255>
Reviewed by Tim Horton.
Source/WebCore:
When running layout tests without idempotent text autosizing after layout tests with idempotent text autosizing
enabled, it's possible to get into a state where the text size adjustment timer (which is used to schedule
idempotent text autosizing style adjustments) is scheduled, but idempotent text autosizing is disabled before
the timer fires. This causes the assertion inresetIdempotentTextAutosizingIfNeededto fail, leading to a
debug assertion.
To prevent this, we simply add a client method to call out to WebPage to stop its idempotent text autosizing
timer when the idempotent text autosizing WebCore setting changes to disabled.
This fixes assertions on these four tests, which are normally run after fast/text-autosizing:
- fast/text/control-characters/visible-control-characters-1.html
- fast/text/firstline/001.html
- fast/text-indicator/text-indicator-empty-link.html
- fast/text/basic/001.html
- page/ChromeClient.h:
(WebCore::ChromeClient::textAutosizingUsesIdempotentModeChanged):
Add the new chrome client hook (see WebKit2 change for more details).
- page/SettingsBase.cpp:
(WebCore::SettingsBase::textAutosizingUsesIdempotentModeChanged):
Replace the existing settings change handler (
setNeedsRecalcStyleInAllFrames) with a custom change handler
(textAutosizingUsesIdempotentModeChanged) that invokes the client hook above, in addition to flagging all
frames for a style recalc.
- page/SettingsBase.h:
Source/WebKit:
See WebCore for more details.
- WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::textAutosizingUsesIdempotentModeChanged):
- WebProcess/WebCoreSupport/WebChromeClient.h:
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::textAutosizingUsesIdempotentModeChanged):
Stop the idempotent text autosizing recomputation timer (
m_textAutoSizingAdjustmentTimer) when idempotent text
autosizing is disabled.
- WebProcess/WebPage/WebPage.h:
Source/WTF:
Replace the call to
setNeedsRecalcStyleInAllFrameswithtextAutosizingUsesIdempotentModeChangedwhen
changing whether idempotent text autosizing is enabled.
- Scripts/Preferences/WebPreferencesInternal.yaml:
LayoutTests:
Remove crashing expectations for several tests that previously hit this assertion, due to running immediately
after some layout tests infast/text-autosizingthat enable idempotent text autosizing.
- platform/ios-wk2/TestExpectations:
- 7:34 PM Changeset in webkit [275479] by
-
- 2 edits in trunk/Source/WebCore
Shrink the Vector<> of keyframe values
https://bugs.webkit.org/show_bug.cgi?id=224154
Reviewed by Sam Weinig.
The Vector<double> returned by CSSParserImpl::consumeKeyframeKeyList()
wasted 152KB of vector capacity on nytimes.com pages, so shrink it.
- css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::consumeKeyframeKeyList):
- 7:33 PM Changeset in webkit [275478] by
-
- 27 edits in trunk/Source/WebCore
No need to update the list marker number during internal move (e.g. result of anonymous collapsing)
https://bugs.webkit.org/show_bug.cgi?id=224142
<rdar://76101241>
Reviewed by Antti Koivisto.
Let's not update the marker numbers when the reason for re-parenting is "internal move"
which means the renderer's insertion point remains the same (e.g collapsing its anonymous parent).
- rendering/RenderElement.cpp:
(WebCore::RenderElement::insertedIntoTree):
(WebCore::RenderElement::willBeRemovedFromTree):
- rendering/RenderElement.h:
- rendering/RenderFragmentContainer.cpp:
(WebCore::RenderFragmentContainer::insertedIntoTree):
(WebCore::RenderFragmentContainer::willBeRemovedFromTree):
- rendering/RenderFragmentContainer.h:
- rendering/RenderListItem.cpp:
(WebCore::RenderListItem::insertedIntoTree):
(WebCore::RenderListItem::willBeRemovedFromTree):
- rendering/RenderListItem.h:
- rendering/RenderMultiColumnFlow.cpp:
(WebCore::RenderMultiColumnFlow::willBeRemovedFromTree):
- rendering/RenderMultiColumnFlow.h:
- rendering/RenderObject.cpp:
(WebCore::RenderObject::insertedIntoTree):
(WebCore::RenderObject::willBeRemovedFromTree):
- rendering/RenderObject.h:
- rendering/RenderQuote.cpp:
(WebCore::RenderQuote::insertedIntoTree):
(WebCore::RenderQuote::willBeRemovedFromTree):
- rendering/RenderQuote.h:
- rendering/RenderTableCaption.cpp:
(WebCore::RenderTableCaption::insertedIntoTree):
(WebCore::RenderTableCaption::willBeRemovedFromTree):
- rendering/RenderTableCaption.h:
- rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::willBeRemovedFromTree):
- rendering/RenderTableCell.h:
- rendering/RenderTableCol.cpp:
(WebCore::RenderTableCol::insertedIntoTree):
(WebCore::RenderTableCol::willBeRemovedFromTree):
- rendering/RenderTableCol.h:
- rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::willBeRemovedFromTree):
- rendering/RenderTableRow.h:
- rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::willBeRemovedFromTree):
- rendering/RenderTableSection.h:
- rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::insertedIntoTree):
(WebCore::RenderSVGRoot::willBeRemovedFromTree):
- rendering/svg/RenderSVGRoot.h:
- rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::attachToRenderElementInternal):
(WebCore::RenderTreeBuilder::move):
(WebCore::RenderTreeBuilder::detachFromRenderElement):
- rendering/updating/RenderTreeBuilder.h:
- 7:19 PM Changeset in webkit [275477] by
-
- 2 edits in trunk/Source/WebCore
WebSocketChannel buffers use memory after going idle (64K wasted on facebook.com
https://bugs.webkit.org/show_bug.cgi?id=224193
Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-05
Reviewed by Simon Fraser.
- Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::processFrame):
- 7:16 PM Changeset in webkit [275476] by
-
- 7 edits in trunk/Source/ThirdParty/ANGLE
[METAL ANGLE] Stencil only formats being used as the depth attachment.
https://bugs.webkit.org/show_bug.cgi?id=224183
Patch by John Cunningham <johncunnigham@apple.com> on 2021-04-05
Reviewed by Jon Lee.
- src/compiler/translator/TranslatorMetalDirect/ProgramPrelude.cpp:
- src/compiler/translator/TranslatorMetalDirect/RewriteOutArgs.cpp:
(sh::Rewriter::argAlreadyProcessed):
- src/libANGLE/renderer/metal/ContextMtl.mm:
(rx::ContextMtl::setupDraw):
- src/libANGLE/renderer/metal/mtl_command_buffer.h:
- src/libANGLE/renderer/metal/mtl_command_buffer.mm:
(rx::mtl::RenderCommandEncoder::reset):
(rx::mtl::RenderCommandEncoder::setRenderPipelineState):
(rx::mtl::RenderCommandEncoder::draw):
(rx::mtl::RenderCommandEncoder::drawInstanced):
(rx::mtl::RenderCommandEncoder::drawIndexed):
(rx::mtl::RenderCommandEncoder::drawIndexedInstanced):
(rx::mtl::RenderCommandEncoder::drawIndexedInstancedBaseVertex):
- src/libANGLE/renderer/metal/mtl_utils.mm:
(rx::mtl::InitializeDepthStencilTextureContentsGPU):
- 7:16 PM Changeset in webkit [275475] by
-
- 2 edits in trunk/Source/WebCore
Make sure the Frame always gets destroyed on the main thread
https://bugs.webkit.org/show_bug.cgi?id=224213
<rdar://75131946>
Reviewed by Alex Christensen.
Make sure the Frame always gets destroyed on the main thread.
Since http://trac.webkit.org/changeset/181791, Frame is ThreadSafeRefCounted and captured
on other threads. We should make sure the Frame is always destroyed on the main thread
though, since it is a main thread object and we hold WeakPtrs to it in many places.
- page/AbstractFrame.h:
- 7:12 PM Changeset in webkit [275474] by
-
- 2 edits in trunk/Source/WebKit
Protect frame in WebPage::runJavaScriptInFrameInScriptWorld()
https://bugs.webkit.org/show_bug.cgi?id=224210
Reviewed by Alex Christensen.
Between the time we were getting the raw pointer to the frame, and the time were were passing it to
WebPage::runJavaScript(), we were potentially calling WebFrameLoaderClient::dispatchGlobalObjectAvailable().
It is possible in theory for those synchronous injected bundle calls to mess with the frame tree and cause
our frame to go bad. As a result, it is best to protect the frame as soon as we get it.
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::runJavaScriptInFrameInScriptWorld):
- 7:08 PM Changeset in webkit [275473] by
-
- 2 edits in trunk/Source/WebKit
Add a missing bounds check when mapping display list items from a shared display list handle
https://bugs.webkit.org/show_bug.cgi?id=224156
<rdar://problem/71805209>
Reviewed by Tim Horton.
Add a check to ensure that we don't end up with out-of-bounds memory access when attempting to map an
offset
andcapacityin shared display list data into aWebCore::DisplayList. It's possible for this to happen if
either the sum ofoffsetandcapacity(i.e. the extent of the mapped segment) overflowssize_t, or the
extent exceeds the total length of the buffer in shared memory.
- GPUProcess/graphics/DisplayListReaderHandle.cpp:
(WebKit::DisplayListReaderHandle::displayListForReading const):
Note that returning
nullptrhere subsequently causes us to terminate the web process due to the message check
fordisplayListinsidenextDestinationImageBufferAfterApplyingDisplayLists.
- 6:52 PM Changeset in webkit [275472] by
-
- 3 edits1 add in trunk
DFG arity fixup nodes should exit to the caller's call opcode
https://bugs.webkit.org/show_bug.cgi?id=223278
Reviewed by Saam Barati.
JSTests:
- stress/dfg-arity-fixup-uses-callers-exit-origin.js: Added.
(main.v22):
(main.v30):
(main.try.v40):
(main.try.v47):
(main.try.v56):
(main.):
(main):
Source/JavaScriptCore:
Right now when we do arity fixup in the DFG we model it in the
same way that it executes, which means all the nodes are part of
the callee. Unfortunately, this causes PhantomInsertionPhase to
think those nodes could be replacing previously defined
VirtualRegisters as they are part of the callee's header (always
alive). When PhantomInsertionPhase then inserts a Phantom it will
put that node in the caller's frame as that's the first ExitOK
node. The caller however may have no knowledge of that
VirtualRegister though. For example:
--> foo: loc10 is a local in foo.
...
1: MovHint(loc10)
2: SetLocal(loc10)
<-- foo loc10 ten is now out of scope for the InlineCallFrame of the caller.
...
Phantom will be inserted here refering to loc10, which doesn't make sense.
--> bar loc10 is an argument to bar and needs arity fixup.
... All of these nodes are ExitInvalid
3: MovHint(loc10, ExitInvalid)
4: SetLocal(loc10, ExitInvalid)
...
- dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::currentNodeOrigin):
(JSC::DFG::ByteCodeParser::inlineCall):
- 6:45 PM Changeset in webkit [275471] by
-
- 16 edits in trunk/Source/WebCore
Wasted vector capacity in FEColorMatrix and filters
https://bugs.webkit.org/show_bug.cgi?id=224169
Reviewed by Said Abou-Hallawa.
When building filter effects, avoid the inputEffects() having a larger
capacity than needed.
Shrink the Vector<float> which is input to FEColorMatrix.
This saves around 40KB on facebook.com feed pages.
- platform/graphics/filters/FEColorMatrix.cpp:
(WebCore::FEColorMatrix::FEColorMatrix):
(WebCore::FEColorMatrix::create):
- platform/graphics/filters/FEColorMatrix.h:
- rendering/CSSFilter.cpp:
(WebCore::CSSFilter::build):
(WebCore::endMatrixRow): Deleted.
(WebCore::lastMatrixRow): Deleted.
- rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::buildPrimitives const):
- svg/SVGFEColorMatrixElement.cpp:
(WebCore::SVGFEColorMatrixElement::build const):
- svg/SVGFEComponentTransferElement.cpp:
(WebCore::SVGFEComponentTransferElement::build const):
- svg/SVGFEConvolveMatrixElement.cpp:
(WebCore::SVGFEConvolveMatrixElement::build const):
- svg/SVGFEDiffuseLightingElement.cpp:
(WebCore::SVGFEDiffuseLightingElement::build const):
- svg/SVGFEDropShadowElement.cpp:
(WebCore::SVGFEDropShadowElement::build const):
- svg/SVGFEGaussianBlurElement.cpp:
(WebCore::SVGFEGaussianBlurElement::build const):
- svg/SVGFEMergeElement.cpp:
(WebCore::SVGFEMergeElement::build const):
- svg/SVGFEMorphologyElement.cpp:
(WebCore::SVGFEMorphologyElement::build const):
- svg/SVGFEOffsetElement.cpp:
(WebCore::SVGFEOffsetElement::build const):
- svg/SVGFESpecularLightingElement.cpp:
(WebCore::SVGFESpecularLightingElement::build const):
- svg/SVGFETileElement.cpp:
(WebCore::SVGFETileElement::build const):
- 6:38 PM Changeset in webkit [275470] by
-
- 3 edits in trunk/LayoutTests
REGRESSION (r275332?): [ EWS macOS iOS wk2 ] http/tests/appcache/fail-on-update.html is a flakey timeout
https://bugs.webkit.org/show_bug.cgi?id=224120
<rdar://problem/76157112>
Reviewed by Jonathan Bedard.
- http/tests/appcache/fail-on-update-2.html:
- http/tests/appcache/fail-on-update.html:
- 6:36 PM Changeset in webkit [275469] by
-
- 2 edits in branches/safari-612.1.10-branch/Source/WebKit
Revert r275451. rdar://problem/76244988
This reverts commit d3893bd38276290b6e85a644f1496ca69c727e65.
- 6:13 PM Changeset in webkit [275468] by
-
- 2 edits in trunk/LayoutTests
[ macOS ] media/webaudio-background-playback.html is a flakey text failure
https://bugs.webkit.org/show_bug.cgi?id=221935
<rdar://problem/74370844>
Patch by Philippe Normand <pnormand@igalia.com> on 2021-04-05
Reviewed by Eric Carlson.
The test was flaky because it was checking if the destination had processed new buffers
immediately after an asynchronous state change. The proposed solution is to monitor the
statechange event and do the actual test after another additional 100 milli-seconds have
passed.
- media/webaudio-background-playback.html:
- 6:13 PM Changeset in webkit [275467] by
-
- 2 edits in branches/safari-612.1.10-branch/Source/WebKit
Cherry-pick r275451. rdar://problem/76244988
[GPUP][iPad] Audio only when airplaying a youtube video
https://bugs.webkit.org/show_bug.cgi?id=224132
Reviewed by Eric Carlson.
While
MediaPlayerPrivateAVFoundationObjConly implementssetWirelessPlaybackTarget()
on macOS,MediaPlayerPrivateMediaSourceAVFObjCimplements it on both macOS and iOS.
Therefore,RemoteMediaPlayerProxyhas to forward the calls ofsetWirelessPlaybackTarget()
from WebContent processes to "MediaPlayerPrivate*" on both macOS and iOS.
Manually tested.
- GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::setWirelessPlaybackTarget):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 6:06 PM Changeset in webkit [275466] by
-
- 4 edits in trunk
Enable QuotaExceededError on non GSTREAMER platforms
https://bugs.webkit.org/show_bug.cgi?id=224136
<rdar://71219720>
Reviewed by Jer Noble.
Source/WebCore:
This fixes a memory leak in Disney+ where we end up queuing up the entire
video because we never communicate to the page that they should stop queuing
more data.
- Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::appendBufferInternal):
LayoutTests:
- platform/mac/media/media-source/media-source-append-before-last-range-no-quota-exceeded-expected.txt:
- 6:05 PM Changeset in webkit [275465] by
-
- 28 edits1 add in trunk/Source
Make sure service workers use a ScriptSourceCode backed by file-mapped memory when possible
https://bugs.webkit.org/show_bug.cgi?id=224088
Reviewed by Yusuke Suzuki.
Source/WebCore:
To run a worker, we were constructing a ScriptSourceCode from the source String and calling
JSC::evaluate. ScriptSourceCode would construct a JSC::StringSourceProvider, which would
keep the source String alive for the lifetime of the provider. This is problematic since
those worker scripts may be big and keeping heap-allocated version of them in memory is
expensive.
To address the issue, this patch introduces a new JSC::SourceProvider subclass named
ScriptBufferSourceProvider, which uses a ScriptBuffer internally. ScriptBuffer has the
benefit of being able to hold file-mapped data. We only convert the ScriptBuffer to
a String whenever necessary (When the script contains non-ascii characters and JSC
requests a StringView to the script). If we do end up converting the ScriptBuffer to
a String, this String will get cleared on memory pressure. This is similar to what
CachedScriptSourceProvider / CachedScript do on the main thread.
In the warm case, where the service worker script is coming from disk, we create
the ScriptBufferSourceProvider right away from a file-mapped ScriptBuffer, thus
greatly reducing dirty memory use. In the cold case, we initially construct the
ScriptBufferSourceProvider using a ScriptBuffer that is not file-mapped. However,
once the script is saved to disk (via SWScriptStorage), we replace the
ScriptBufferSourceProvider's ScriptBuffer with the new file-mapped version in
order to reduce dirty memory use in this case too.
- WebCore.xcodeproj/project.pbxproj:
Add ScriptBufferSourceProvider.h to the project.
- bindings/js/ScriptBufferSourceProvider.h: Added.
- Add new ScriptBufferSourceProvider, which is a JSC::SourceProvider subclass that
uses a ScriptBuffer as backing instead of a String. This allows us to use file-mapped
memory whenever possible, thus reducing dirty memory use. This provider provides
similar functionality to CachedScriptSourceProvider / CachedScript but works with
a ScriptBuffer and can be used off the main thread.
- We only transform the SharedBuffer into a String when strictly necessary, meaning that the ScriptBuffer contains non-ascii characters and JSC is asking for a StringView to the script.
- The class supports clearing the String copy of the script (done on memory pressure) and replacing the ScriptBuffer (with a new file-mapped version).
- bindings/js/ScriptSourceCode.h:
(WebCore::ScriptSourceCode::ScriptSourceCode):
(WebCore::ScriptSourceCode::m_code):
(WebCore::ScriptSourceCode::provider):
Add new constructors taking a ScriptBuffer instead of a String for the source code.
We then use the new ScriptBufferSourceProvider internally instead of the
StringSourceProvider.
- workers/DedicatedWorkerThread.cpp:
(WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
- workers/DedicatedWorkerThread.h:
Use ScriptBuffer instead of String.
- workers/ScriptBuffer.cpp:
(WebCore::ScriptBuffer::empty):
(WebCore::ScriptBuffer::append):
(WebCore::operator!=):
- workers/ScriptBuffer.h:
(WebCore::ScriptBuffer::isEmpty const):
Add some functionality to SCriptBuffer to make it more convenient to use.
- workers/Worker.cpp:
(WebCore::Worker::notifyFinished):
Convert ScriptBuffer to a String since this is what WebInspector expects.
- workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::importScripts):
- When importing a new script, we now construct a ScriptSourceCode from a
ScriptBuffer instead of a String.
- We also store a weak pointer to the ScriptBufferSourceProvider used by the ScriptSourceCode on the WorkerGlobalScope. This is so that we can ask those ScriptBufferSourceProvider objects to clear their cached String representation of the script source on memory pressure. It is also needed so we can replace the ScriptBufferSourceProvider's ScriptBuffer with a file-mapped version when one becomes available.
(WebCore::WorkerGlobalScope::releaseMemory):
In addition to deleting JS code and doing garbage collection, we now also ask the
ScriptBufferSourceProvider objects to clear their cached String representation of the script
source.
(WebCore::WorkerGlobalScope::deleteJSCodeAndGC):
Moved the logic to delete JS code and doing GC from releaseMemory() to a new function, now
that releaseMemory() needs to do more things.
(WebCore::WorkerGlobalScope::setMainScriptSourceProvider):
(WebCore::WorkerGlobalScope::addImportedScriptSourceProvider):
Functions used to store the CachedScriptSourceProvider objects for the scripts used by the
worker on the WorkerGlobalScope. We keep weak pointers to those.
(WebCore::WorkerGlobalScope::clearDecodedScriptData):
Function used to ask the ScriptBufferSourceProvider objects to clear their cached String
representation of the script source on memory pressure.
(WebCore::WorkerGlobalScope::updateSourceProviderBuffers):
Function used to ask the ScriptBufferSourceProvider objects to replace their ScriptBuffers
with file-backed versions.
- workers/WorkerGlobalScope.h:
- workers/WorkerGlobalScopeProxy.h:
- workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
- workers/WorkerMessagingProxy.h:
Use ScriptBuffer instead of String.
- workers/WorkerScriptLoader.cpp:
(WebCore::WorkerScriptLoader::WorkerScriptLoader):
(WebCore::WorkerScriptLoader::loadSynchronously):
(WebCore::WorkerScriptLoader::didReceiveData):
- workers/WorkerScriptLoader.h:
(WebCore::WorkerScriptLoader::script):
Use ScriptBuffer instead of String to hold the script source. We eventually need a ScriptBuffer
since this is what the Worker now needs to launch. Also, in the service worker case, we may
get a ScriptBuffer right away from the scriptResourceMap, without going to the network at all.
- workers/WorkerThread.cpp:
(WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
(WebCore::WorkerThread::WorkerThread):
Use ScriptBuffer instead of String.
(WebCore::WorkerThread::evaluateScriptIfNecessary):
- When evaluating the main worker script, we now construct a ScriptSourceCode from a
ScriptBuffer instead of a String.
- We also store a weak pointer to the ScriptBufferSourceProvider used by the ScriptSourceCode on the WorkerGlobalScope. This is so that we can ask those ScriptBufferSourceProvider objects to clear their cached String representation of the script source on memory pressure. It is also needed so we can replace the ScriptBufferSourceProvider's ScriptBuffer with a file-mapped version when one becomes available.
- workers/WorkerThread.h:
- workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::jobFinishedLoadingScript):
- workers/service/ServiceWorkerContainer.h:
- workers/service/ServiceWorkerFetchResult.h:
- workers/service/ServiceWorkerGlobalScope.cpp:
(WebCore::ServiceWorkerGlobalScope::didSaveScriptsToDisk):
- workers/service/ServiceWorkerJobClient.h:
- workers/service/context/ServiceWorkerThread.cpp:
(WebCore::ServiceWorkerThread::ServiceWorkerThread):
- workers/service/server/SWServer.cpp:
(WebCore::SWServer::updateWorker):
- workers/service/server/SWServer.h:
- workers/service/server/SWServerJobQueue.cpp:
(WebCore::SWServerJobQueue::scriptFetchFinished):
Use ScriptBuffer instead of String.
Source/WebKit:
- NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp:
(WebKit::ServiceWorkerSoftUpdateLoader::didFinishLoading):
- 5:50 PM Changeset in webkit [275464] by
-
- 3 edits1 add in trunk/Tools/buildstream
[Flatpak SDK] Update dav1d and libavif
https://bugs.webkit.org/show_bug.cgi?id=224177
Patch by Philippe Normand <pnormand@igalia.com> on 2021-04-05
Reviewed by Adrian Perez de Castro.
- elements/freedesktop-sdk.bst: Update dav1d to version 0.8.2.
- elements/sdk/libavif.bst: Update to version 0.9.0.
- patches/fdo-0001-dav1d-Bump-to-version-0.8.2.patch: Added.
- 5:50 PM Changeset in webkit [275463] by
-
- 15 edits2 adds in trunk/Source
[Win][WK2] Implement IPC::Semaphore to run WebGL in GPU process
https://bugs.webkit.org/show_bug.cgi?id=224014
Reviewed by Don Olmstead.
Source/WebCore:
- platform/graphics/PlatformDisplay.cpp:
(WebCore::PlatformDisplay::sharedDisplay): GPU process calls this
function in IPC thread. Removed the assertion checking the main
thread.
- platform/graphics/opengl/GraphicsContextGLOpenGL.h:
- platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:
(WebCore::GraphicsContextGLOpenGL::createForGPUProcess): Added.
Source/WebKit:
- GPUProcess/graphics/RemoteGraphicsContextGL.cpp:
- GPUProcess/graphics/RemoteGraphicsContextGLWin.cpp: Added.
(WebKit::RemoteGraphicsContextGL::create):
(WebKit::RemoteGraphicsContextGLWin::RemoteGraphicsContextGLWin):
(WebKit::RemoteGraphicsContextGLWin::platformWorkQueueInitialize):
(WebKit::RemoteGraphicsContextGL::prepareForDisplay):
- Platform/IPC/IPCSemaphore.cpp:
- Platform/IPC/IPCSemaphore.h:
- Platform/IPC/StreamClientConnection.cpp:
(IPC::StreamClientConnection::setWakeUpSemaphore):
(IPC::StreamClientConnection::wakeUpServer):
- Platform/IPC/StreamClientConnection.h:
(IPC::StreamClientConnection::tryAcquire):
(IPC::StreamClientConnection::tryAcquireAll):
- Platform/IPC/StreamConnectionWorkQueue.cpp:
(IPC::StreamConnectionWorkQueue::StreamConnectionWorkQueue):
(IPC::StreamConnectionWorkQueue::removeStreamConnection):
(IPC::StreamConnectionWorkQueue::stop):
(IPC::StreamConnectionWorkQueue::wakeUp):
(IPC::StreamConnectionWorkQueue::wakeUpProcessingThread):
- Platform/IPC/StreamConnectionWorkQueue.h:
- Platform/IPC/StreamServerConnection.cpp:
(IPC::StreamServerConnectionBase::release):
(IPC::StreamServerConnectionBase::releaseAll):
- Platform/IPC/win/IPCSemaphoreWin.cpp: Added.
(IPC::Semaphore::Semaphore):
(IPC::Semaphore::~Semaphore):
(IPC::Semaphore::operator=):
(IPC::Semaphore::signal):
(IPC::Semaphore::wait):
(IPC::Semaphore::waitFor):
(IPC::Semaphore::encode const):
(IPC::Semaphore::decode):
(IPC::Semaphore::destroy):
- PlatformWin.cmake:
- WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createGraphicsContextGL const):
- 5:42 PM Changeset in webkit [275462] by
-
- 11 edits2 adds in trunk
Fix max-content on tables with percentage cell widths.
https://bugs.webkit.org/show_bug.cgi?id=221165
Reviewed by Zalan Bujtas.
Source/WebCore:
When
width: max-contentis specified on an element, any percentages
on content inside the element that are relative to the containing block
width should be treated as auto. Percentages on table cells and columns
in tables using auto table layout are not quite relative to the
containing block width, but do have a similar influence. So when
computing the intrinsic width of a table for the purpose of determining
the max-content value to use, ignore any percentages specified on table
cells and columns.
This change makes us match Firefox and Chrome on the test case.
Test: fast/table/percent-width-max-content.html
- rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
- rendering/AutoTableLayout.h:
- rendering/FixedTableLayout.cpp:
(WebCore::FixedTableLayout::computeIntrinsicLogicalWidths):
- rendering/FixedTableLayout.h:
- rendering/RenderBox.cpp:
(WebCore::RenderBox::computeIntrinsicLogicalWidthUsing const): Call
into the new computeIntrinsicKeywordLogicalWidths function so that
tables can return different values for layout and intrinsic keyword
calculation.
- rendering/RenderBox.h:
(WebCore::RenderBox::computeIntrinsicKeywordLogicalWidths const):
Added to support computing intrinsic keyword lengths that differ from
those returned by computeIntrinsicLogicalWidths.
- rendering/RenderTable.cpp:
(WebCore::RenderTable::computeIntrinsicLogicalWidths const): Factored
this out to allow specifying an argument for whether the intrinsics
being computed are for layout or for instrinsic keyword calculation,
like max-content.
(WebCore::RenderTable::computeIntrinsicKeywordLogicalWidths const):
Added. This is the only override of the default implementation in
RenderBox.
- rendering/RenderTable.h:
- rendering/TableLayout.h:
LayoutTests:
Fix max-content on tables with percentage cell widths.
- fast/table/percent-width-max-content-expected.html: Added.
- fast/table/percent-width-max-content.html: Added.
- 5:39 PM Changeset in webkit [275461] by
-
- 2 edits1 add in trunk/Tools/buildstream
[Flatpak SDK] Backport GStreamer fakeaudiosink
https://bugs.webkit.org/show_bug.cgi?id=224053
Patch by Philippe Normand <pnormand@igalia.com> on 2021-04-05
Reviewed by Adrian Perez de Castro.
This audio sink will be used for the media layout and API tests.
- elements/sdk/gst-plugins-bad.bst:
- patches/gst-plugins-bad-0001-debugutils-Add-fakeaudiosink-element.patch: Added.
- 5:27 PM Changeset in webkit [275460] by
-
- 8 edits in trunk/Source
Versioning.
WebKit-7
- 5:22 PM Changeset in webkit [275459] by
-
- 22 edits1 copy1 add in trunk
[GPU Process] Simplify DisplayList::Iterator part 1: Require encoding/decoding delegates for non-inline display list items
https://bugs.webkit.org/show_bug.cgi?id=223849
Reviewed by Wenson Hsieh.
Source/WebCore:
Requiring delegates for non-inline display list items has these advantages:
- DisplayList::Iterator::updateCurrentItem() only has 2 codepaths instead of 3.
- ItemBuffer::m_itemsToDestroyInAllocatedBuffers can be deleted entirely.
- The conditional inside ItemBuffer::append() can be simplified from
!T::isInlineItem && m_writingClient to just !T::isInlineItem, which I think makes the
function significantly more readable.
There are a few places where we were using non-inline display list items without a delegate:
This patch adds two new "null" delegates, and hooks them up to a subclass of DisplayList,
called InMemoryDisplayList. Clients who want to use in-memory display lists (like the
DrawGlyphs cache) can just use this class, and retain their calling pattern they were using
before. Also, this patch adds InMemoryDisplayList without adding any virtual functions to
DisplayList.
No new tests because there is no behavior change.
- Headers.cmake:
- Sources.txt:
- WebCore.xcodeproj/project.pbxproj:
- html/HTMLCanvasElement.cpp:
- platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::displayListForTextRun const):
- platform/graphics/FontCascade.h:
(WebCore::FontCascade::displayListForTextRun):
- platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::platformCALayerPaintContents):
- platform/graphics/ca/GraphicsLayerCA.h:
- platform/graphics/displaylists/DisplayList.cpp:
(WebCore::DisplayList::DisplayList::iterator::updateCurrentItem):
- platform/graphics/displaylists/DisplayListDrawingContext.h:
(WebCore::DisplayList::DrawingContext::replayedDisplayList const):
- platform/graphics/displaylists/DisplayListImageBuffer.h:
(WebCore::DisplayList::ImageBuffer::ImageBuffer):
- platform/graphics/displaylists/DisplayListItemBuffer.cpp:
(WebCore::DisplayList::copyInto):
(WebCore::DisplayList::ItemBuffer::ItemBuffer):
(WebCore::DisplayList::ItemBuffer::operator=):
(WebCore::DisplayList::ItemBuffer::clear):
(WebCore::DisplayList::ItemBuffer::append):
(WebCore::DisplayList::m_allocatedBuffers): Deleted.
- platform/graphics/displaylists/DisplayListItemBuffer.h:
(WebCore::DisplayList::ItemHandle::get const):
(WebCore::DisplayList::ItemBufferWritingClient::~ItemBufferWritingClient):
(WebCore::DisplayList::ItemBufferWritingClient::createItemBuffer):
(WebCore::DisplayList::ItemBufferWritingClient::requiredSizeForItem const):
(WebCore::DisplayList::ItemBufferWritingClient::encodeItemOutOfLine const):
(WebCore::DisplayList::ItemBufferWritingClient::encodeItemInline const):
(WebCore::DisplayList::ItemBufferWritingClient::didAppendData):
(WebCore::DisplayList::ItemBuffer::append):
- platform/graphics/displaylists/DisplayListReplayer.cpp:
(WebCore::DisplayList::Replayer::replay):
- platform/graphics/displaylists/DisplayListReplayer.h:
- platform/graphics/displaylists/InMemoryDisplayList.cpp: Added.
(WebCore::DisplayList::InMemoryDisplayList::WritingClient::requiredSizeForItem const):
(WebCore::DisplayList::InMemoryDisplayList::WritingClient::encodeItemInline const):
(WebCore::DisplayList::InMemoryDisplayList::ReadingClient::decodeItem):
(WebCore::DisplayList::InMemoryDisplayList::InMemoryDisplayList):
(WebCore::DisplayList::InMemoryDisplayList::~InMemoryDisplayList):
- platform/graphics/displaylists/InMemoryDisplayList.h: Copied from Source/WebCore/platform/graphics/displaylists/DisplayListDrawingContext.h.
- rendering/GlyphDisplayListCache.h:
Source/WebKit:
- WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
Tools:
- TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp:
(TestWebKitAPI::TEST):
- TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:
- 5:11 PM Changeset in webkit [275458] by
-
- 9 edits in trunk/Source
[MediaSession] Small refactoring of MediaSession implementation classes
https://bugs.webkit.org/show_bug.cgi?id=224141
Reviewed by Eric Carlson.
A smorgasboard of small refactoring changes:
Source/WebCore:
- Don't call action handlers by default in response to coordinator requests.
- Since we don't call the action handlers, we don't need the internal methods.
- Simplify the call site by defining the action details inline.
- Modules/mediasession/MediaSessionCoordinator.cpp:
(WebCore::MediaSessionCoordinator::seekSessionToTime):
(WebCore::MediaSessionCoordinator::playSession):
(WebCore::MediaSessionCoordinator::pauseSession):
(WebCore::MediaSessionCoordinator::setSessionTrack):
(WebCore::MediaSessionCoordinator::internalSeekTo): Deleted.
(WebCore::MediaSessionCoordinator::internalPlay): Deleted.
(WebCore::MediaSessionCoordinator::internalPause): Deleted.
(WebCore::MediaSessionCoordinator::internalSetTrack): Deleted.
- Modules/mediasession/MediaSessionCoordinator.h:
- Modules/mediasession/MediaSessionCoordinatorPrivate.h:
Source/WebKit:
- MediaSessionCoordinatorProxyPrivate should use an Optional<ExceptionData> rather than an actual ExceptionData, to handle the case where no exception was encoutered.
- RemoteMediaSessionCoordinatorProxy::create() should just return a Ref, not a RefPtr.
- Logging inside a completion handler requires access to this.
- Add RemoteMediaSessionCoordinatorProxy.cpp to the build.
- UIProcess/Media/MediaSessionCoordinatorProxyPrivate.h:
- UIProcess/Media/RemoteMediaSessionCoordinatorProxy.cpp:
(WebKit::RemoteMediaSessionCoordinatorProxy::create):
(WebKit::RemoteMediaSessionCoordinatorProxy::RemoteMediaSessionCoordinatorProxy):
(WebKit::RemoteMediaSessionCoordinatorProxy::join):
(WebKit::RemoteMediaSessionCoordinatorProxy::coordinateSeekTo):
(WebKit::RemoteMediaSessionCoordinatorProxy::coordinatePlay):
(WebKit::RemoteMediaSessionCoordinatorProxy::coordinatePause):
(WebKit::RemoteMediaSessionCoordinatorProxy::coordinateSetTrack):
(WebKit::RemoteMediaSessionCoordinatorProxy::pauseSession):
(WebKit::RemoteMediaSessionCoordinatorProxy::setSessionTrack):
(WebKit::RemoteMediaSessionCoordinatorProxy::logChannel const):
(WebKit::RemoteMediaSessionCoordinatorProxy::::coordinateSetTrack): Deleted.
- UIProcess/Media/RemoteMediaSessionCoordinatorProxy.h:
(WebKit::RemoteMediaSessionCoordinatorProxy::logger const):
(WebKit::RemoteMediaSessionCoordinatorProxy::logIdentifier const):
(WebKit::RemoteMediaSessionCoordinatorProxy::logClassName const):
- 5:09 PM Changeset in webkit [275457] by
-
- 15 edits in trunk/Source
Define AtomString(ASCIILiteral) and use ASCIILiteral more to avoid memory allocation
https://bugs.webkit.org/show_bug.cgi?id=224125
Reviewed by Saam Barati.
Source/WebCore:
We apply "..."_s more. This avoids allocating of string storage when creating StringImpl.
- accessibility/AccessibilityObject.cpp:
(WebCore::initializeRoleMap):
- dom/ScriptElement.cpp:
(WebCore::isLegacySupportedJavaScriptLanguage):
- editing/EditorCommand.cpp:
(WebCore::createCommandMap):
- html/Autofill.cpp:
(WebCore::fieldNameMap):
- platform/LegacySchemeRegistry.cpp:
(WebCore::builtinLocalURLSchemes):
(WebCore::builtinSecureSchemes):
(WebCore::builtinSchemesWithUniqueOrigins):
(WebCore::builtinEmptyDocumentSchemes):
(WebCore::builtinCanDisplayOnlyIfCanRequestSchemes):
(WebCore::builtinCORSEnabledSchemes):
- platform/MIMETypeRegistry.cpp:
(WebCore::MIMETypeRegistry::systemPreviewMIMETypes):
- platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::hasValidAverageCharWidth const):
- platform/graphics/HEVCUtilities.cpp:
(WebCore::codecStringForDoViCodecType):
(WebCore::profileIDForAlphabeticDoViProfile):
- platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::staticMIMETypeList):
- platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm:
(WebCore::AVAssetMIMETypeCache::staticContainerTypeList):
- platform/graphics/cg/ImageSourceCGWin.cpp:
(WebCore::preferredExtensionForImageType):
- svg/SVGTests.cpp:
(WebCore::supportedSVGFeatures):
Source/WTF:
Add AtomString(ASCIILiteral). ASCIILiteral ensures that storage is constant non-heap string by its type.
So we can just use it as a literal (not allocating a string storage).
- wtf/text/AtomString.h:
- 5:04 PM Changeset in webkit [275456] by
-
- 3 edits in trunk/LayoutTests
REGRESSION (r275358): [ iOS wk2 ] media/modern-media-controls/ios-inline-media-controls/ios-inline-media-dropping-controls.html is a constant text failure
https://bugs.webkit.org/show_bug.cgi?id=224130
<rdar://problem/76164289>
Unreviewed test fix.
- media/modern-media-controls/ios-inline-media-controls/ios-inline-media-dropping-controls.html:
- media/modern-media-controls/ios-inline-media-controls/ios-inline-media-dropping-controls-expected.txt:
Set a
maximumRightContainerButtonCountOverrideso that the collapsing behavior of the
overflow button doesn't affect the test (and force a layout to ensure it's picked up).
- 5:00 PM Changeset in webkit [275455] by
-
- 2 edits in trunk/Source/WebKit
[Cocoa] Calling AudioComponentFetchServerRegistrations on main thread causes launch time regression
https://bugs.webkit.org/show_bug.cgi?id=224137
<rdar://76137483>
Reviewed by Eric Carlson.
Run the command to fetch AudioComponent registration data on a generic background queue.
- UIProcess/Cocoa/WebProcessProxyCocoa.mm:
(WebKit::WebProcessProxy::sendAudioComponentRegistrations):
- 4:56 PM Changeset in webkit [275454] by
-
- 9 edits in trunk
[WinCairo] Enable Service Worker tests
https://bugs.webkit.org/show_bug.cgi?id=223591
Reviewed by Fujii Hironori.
Source/WebKit:
WPT HTTP tests were failing because SSL Connect errors weren't triggering authentication challenges.
Also Add a suggestedFilename implementation.
- NetworkProcess/curl/NetworkDataTaskCurl.cpp:
- NetworkProcess/curl/NetworkDataTaskCurl.h:
Tools:
Ignore cert errors with downloads and fix an issue with windows paths.
- WebKitTestRunner/TestController.cpp:
- WebKitTestRunner/TestController.h:
LayoutTests:
- platform/wincairo-wk1/TestExpectations:
- platform/wincairo/TestExpectations:
- 4:55 PM Changeset in webkit [275453] by
-
- 2 edits in trunk/Tools
[GLIB] Garden API test failure and flakiness after r275267
Unreviewed test gardening.
- TestWebKitAPI/glib/TestExpectations.json:
- 4:45 PM Changeset in webkit [275452] by
-
- 1 copy in branches/safari-612.1.10-branch
New branch.
- 4:43 PM Changeset in webkit [275451] by
-
- 2 edits in trunk/Source/WebKit
[GPUP][iPad] Audio only when airplaying a youtube video
https://bugs.webkit.org/show_bug.cgi?id=224132
Reviewed by Eric Carlson.
While
MediaPlayerPrivateAVFoundationObjConly implementssetWirelessPlaybackTarget()
on macOS,MediaPlayerPrivateMediaSourceAVFObjCimplements it on both macOS and iOS.
Therefore,RemoteMediaPlayerProxyhas to forward the calls ofsetWirelessPlaybackTarget()
from WebContent processes to "MediaPlayerPrivate*" on both macOS and iOS.
Manually tested.
- GPUProcess/media/RemoteMediaPlayerProxy.cpp:
(WebKit::RemoteMediaPlayerProxy::setWirelessPlaybackTarget):
- 9:48 AM WebKitGTK/2.32.x edited by
- (diff)
- 9:47 AM WebKitGTK/2.32.x edited by
- (diff)