Timeline
Apr 19, 2021:
- 11:33 PM Changeset in webkit [276287] by
-
- 16 edits in trunk
Render tree updates for Text node content mutations should happen during rendering update
https://bugs.webkit.org/show_bug.cgi?id=222406
<rdar://problem/74822830>
Reviewed by Simon Fraser.
Source/WebCore:
Calls to Text.insertData and similar should not mutate render tree synchronously.
Instead render tree should be updated during the next rendering update along with
any style changes.
These updates already go via RenderTreeUpdater. We just need to save the information
about which nodes need updating so the next rendering update can pick them up.
This seems to help with some performance benchmarks.
- dom/CharacterData.cpp:
(WebCore::CharacterData::parserAppendData):
(WebCore::CharacterData::setDataAndUpdate):
Move in-tree check to the updateRendererAfterContentChange and make it use isConnected().
- dom/Document.cpp:
(WebCore::Document::removedLastRef):
(WebCore::Document::resolveStyle):
Include the text update when updating the render tree.
(WebCore::Document::updateTextRenderer):
Create a text update that will get flushed during the next rendering update.
(WebCore::Document::needsStyleRecalc const):
We need to recalc if there are pending text updates.
- dom/Document.h:
- dom/Text.cpp:
(WebCore::Text::splitText):
Use updateRendererAfterContentChange instead of poking render tree directly.
(WebCore::Text::updateRendererAfterContentChange):
- rendering/updating/RenderTreeUpdater.cpp:
- style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::TreeResolver):
(WebCore::Style::TreeResolver::resolve):
- style/StyleTreeResolver.h:
(WebCore::Style::TreeResolver::TreeResolver):
- style/StyleUpdate.cpp:
(WebCore::Style::Update::addText):
Merge text updates.
(WebCore::Style::Update::addPossibleRoot):
- style/StyleUpdate.h:
(WebCore::Style::Update::roots const):
(WebCore::Style::Update:: const): Deleted.
Refcount the nodes since this now has longer lifetime.
- editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::deleteInsignificantText):
Ensure we leave deleteInsignificantText with updated render tree. Clients expect that.
Do layout (instead of just style update) for consistency, deleteInsignificantText does one anyway in beginning.
- editing/markup.cpp:
(WebCore::replaceChildrenWithFragment):
Pending text update may ref the node so this refcount assert is not correct.
- style/StyleUpdate.cpp:
(WebCore::Style::Update::addText):
LayoutTests:
These are progressions.
- fast/text/splitText-dirty-lines-expected.txt:
- fast/text/text-combine-surroundContents-crash-expected.txt:
- imported/blink/fast/css/first-letter-range-insert-expected.txt:
Here we were actually drawing text that didn't exist in DOM anymore.
- 10:19 PM Changeset in webkit [276286] by
-
- 2 edits in trunk/Source/ThirdParty/ANGLE
Build ANGLE dylib into WK_OVERRIDE_FRAMEWORKS_DIR in builds that use it
https://bugs.webkit.org/show_bug.cgi?id=224785
<rdar://76641662>
Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-19
Reviewed by Alexey Proskuryakov.
- Configurations/ANGLE-dynamic.xcconfig:
- 10:15 PM Changeset in webkit [276285] by
-
- 8 edits in trunk/JSTests
[JSC] Rebaseline test results for new ICU
https://bugs.webkit.org/show_bug.cgi?id=224792
Reviewed by Mark Lam.
This patch updates some intl- tests' expectation since it is changed because of ICU CLDR data change.
- stress/intl-datetimeformat-formatrange-relevant-extensions-ja.js:
(shouldBeOneOfThem):
(vm.icuVersion):
- stress/intl-datetimeformat-formatrange-relevant-extensions.js:
(shouldBeOneOfThem):
- stress/intl-datetimeformat-formatrange-should-not-handle-gregorian-change-date.js:
(shouldBe):
(vm.icuHeaderVersion):
- stress/intl-datetimeformat-formatrangetoparts-relevant-extensions-ja.js:
(normalize):
(shouldBe):
(compareParts):
(shouldBeOneOfParts):
(shouldBeParts):
(Intl.DateTimeFormat.prototype.formatRangeToParts.shouldBeOneOfParts.fmt5.formatRangeToParts):
(Intl.DateTimeFormat.prototype.formatRangeToParts.vm.icuVersion):
(Intl.DateTimeFormat.prototype.formatRangeToParts.shouldBeOneOfParts.fmt7.formatRangeToParts):
(Intl.DateTimeFormat.prototype.formatRangeToParts.shouldBeOneOfParts.fmt9.formatRangeToParts):
(Intl.DateTimeFormat.prototype.formatRangeToParts.shouldBeOneOfParts.fmt11.formatRangeToParts):
(Intl.DateTimeFormat.prototype.formatRangeToParts.shouldBeOneOfParts.fmt13.formatRangeToParts):
(Intl.DateTimeFormat.prototype.formatRangeToParts.shouldBeParts.fmt13.formatRangeToParts):
(Intl.DateTimeFormat.prototype.formatRangeToParts.shouldBeOneOfParts.fmt14.formatRangeToParts):
(Intl.DateTimeFormat.prototype.formatRangeToParts.shouldBeOneOfParts.fmt15.formatRangeToParts):
(Intl.DateTimeFormat.prototype.formatRangeToParts.shouldBeOneOfParts.fmt16.formatRangeToParts):
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt1.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt2.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt3.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt4.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt5.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt6.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt7.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt8.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt9.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt10.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt11.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt12.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt13.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt14.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt15.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt16.formatRangeToParts): Deleted.
- stress/intl-datetimeformat-formatrangetoparts-relevant-extensions.js:
(normalize):
(shouldBe):
(compareParts):
(shouldBeOneOfParts):
(shouldBeParts):
- stress/intl-datetimeformat-formatrangetoparts-should-not-handle-gregorian-change-date.js:
(shouldBe):
- stress/intl-datetimeformat.js:
(shouldBeOneOfThem):
- 9:49 PM Changeset in webkit [276284] by
-
- 5 edits in trunk
REGRESSION (r276189): GPUProcess.WebProcessTerminationAfterTooManyGPUProcessCrashes is crashing
https://bugs.webkit.org/show_bug.cgi?id=224790
<rdar://problem/76869318>
Reviewed by Darin Adler.
Source/WebKit:
GPUProcess.WebProcessTerminationAfterTooManyGPUProcessCrashes is intentionally repeatedly
killing the GPUProcess. As a result, the GPUProcess may get killed very shortly after
a relaunch and the RemoteAudioDestinationManager::StartAudioDestination synchronous IPC
may fail if it is ongoing at the time of the crash. This would cause m_destinationID to
not get initialized and then get sent as IPC parameter, thus crashing.
pre-r276189, we were not crashing because m_destinationID was not reset on crash and we
would thus send IPC for a destination that does not exist but at least the destinationID
would not be 0. This patch makes sure we don't try and send IPC at all when m_destinationID
is 0.
- WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp:
(WebKit::RemoteAudioDestinationProxy::connection):
(WebKit::RemoteAudioDestinationProxy::startRendering):
(WebKit::RemoteAudioDestinationProxy::stopRendering):
(WebKit::RemoteAudioDestinationProxy::storageChanged):
- WebProcess/GPU/media/RemoteAudioDestinationProxy.h:
Tools:
Re-enable API test now that it is no longer crashing.
- TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:
(TEST):
- 9:45 PM Changeset in webkit [276283] by
-
- 3 edits in trunk/Source/WebCore
cachedCGColor() and nsColor() are not thread-safe
https://bugs.webkit.org/show_bug.cgi?id=223033
Reviewed by Chris Dumez.
These functions will break if they are used by a worker thread.
- platform/graphics/cg/ColorCG.cpp:
(WebCore::cachedCGColor):
- platform/graphics/mac/ColorMac.mm:
(WebCore::nsColor):
- 8:26 PM Changeset in webkit [276282] by
-
- 2 edits in trunk/LayoutTests
[GLIB] Unreviewed test gardening. Gardened flaky failures after r224791.
- platform/glib/TestExpectations:
- 7:26 PM Changeset in webkit [276281] by
-
- 2 edits in trunk/Source/WebKit
[iOS] Media playback continues after backgrounding hosting application
https://bugs.webkit.org/show_bug.cgi?id=224776
<rdar://75707807>
Reviewed by Eric Carlson.
Tested by existing API test: WKWebViewPausePlayingAudioTests.OutOfWindow
When the MediaSessionHelperIOS was moved into the GPU process, no object remains listening for the
UIApplication{Will,Did}Enter{Foreground,Background}Notification rebroadcasted by WebPageIOS.
Rather than just rebroadcast the UIKit notification to all listeners within the WebContent process,
which may or may not be listening, just tell the current PlatformMediaSessionManager directly.
- WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::applicationWillResignActive):
(WebKit::WebPage::applicationDidEnterBackground):
(WebKit::WebPage::applicationWillEnterForeground):
(WebKit::WebPage::applicationDidBecomeActive):
- 6:02 PM Changeset in webkit [276280] by
-
- 2 edits in trunk/Tools
Unreviewed, temporarily disable GPUProcess.DISABLED_WebProcessTerminationAfterTooManyGPUProcessCrashes
https://bugs.webkit.org/show_bug.cgi?id=224790
It is crashing. I will renable it with the fix at Bug 224790.
- TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:
(TEST):
- 5:54 PM Changeset in webkit [276279] by
-
- 5 edits in trunk/LayoutTests
[GLIB] Unreviewed test gardening. Update baselines and test expectations after r224791.
- platform/glib/TestExpectations:
- platform/glib/http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-expected.txt:
- platform/glib/imported/w3c/web-platform-tests/xhr/send-entity-body-none-expected.txt:
- platform/glib/security/block-test-no-port-expected.txt:
- 5:18 PM Changeset in webkit [276278] by
-
- 3 edits in trunk/Source/WebInspectorUI
REGRESSION (r268691 && r270134): Web Inspector: Clicking on go-to arrow in Computed panel no longer works
https://bugs.webkit.org/show_bug.cgi?id=224774
Reviewed by Devin Rousso.
The Styles panel will not always be part of the same sidebar as the Computed panel as of r268691, so we should
look for the Styles panel in WI.detailsSidebar, which will report all of the panels it manages across multiple
sidebars. Additionally, as of r270134, there is no longer a private_visibleproperty for
WI.StyleDetailsPanel, so it can not be used byWI.SpreadsheetRulesStyleDetailsPanel. Instead, visibility
should be determined by checking if the panel is attached and not pending layout.
- UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:
(WI.ComputedStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty):
- UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.scrollToSectionAndHighlightProperty):
- 4:37 PM Changeset in webkit [276277] by
-
- 2 edits in trunk/Tools
[ews] Enabled detailed error log when unit-tests fails
https://bugs.webkit.org/show_bug.cgi?id=224789
Unreviewed minor unit-test fix.
- CISupport/ews-build/factories_unittest.py:
(TestCase): Set maxDiff to None.
- 4:03 PM Changeset in webkit [276276] by
-
- 3 edits1 add in trunk/Tools
Can't use Web Inspector on web views made by TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=147073
<rdar://problem/76708379>
Reviewed by Devin Rousso.
It is necessary to spin a nested run loop at the point in the test where you would
like to remote inspect a WebView. Messages from the remote connection are dispatched
through UIProcess, so if lldb has paused UIProcess, WebInspectorUI will not be able to
get any data from the inspected WebView.
- TestWebKitAPI/DebugUtilities.h: Added.
Add macros to wait for a remote inspector to attach or detach, then drop into
the debugger when it has done so.
- TestWebKitAPI/PlatformUtilities.h: Add missing
#pragma once. - TestWebKitAPI/WTFStringUtilities.h: Force the build to fail noisily if we have
attempted to redefine WTF_STRINGTYPEADAPTER_COPIED_WTF_STRING. Force the correct
ordering between "WTFStringUtilities.h" and <wtf/text/StringConcatenate.h>.
- 3:20 PM Changeset in webkit [276275] by
-
- 6 edits in trunk
Rename FloatQuad::isEmpty() to boundingBoxIsEmpty() and reimplement isEmpty()
https://bugs.webkit.org/show_bug.cgi?id=224769
Reviewed by Tim Horton.
Source/WebCore:
The existing
isEmpty()method onFloatQuadonly checks that the bounding box of the quad is empty (as
indicated by the comment above the method declaration). This meansisEmpty()returnsfalsein cases where
the quad consists of one or more non-rectilinear line segments, even though the quad contains no area.
To address this, we rename the existing
isEmpty()helper toboundingBoxIsEmpty()and reintroduce an
isEmpty()method that accounts for quads which are equivalent to non-rectilinear line segments.
No change in behavior.
- inspector/InspectorOverlay.cpp:
(WebCore::drawFragmentHighlight):
- platform/graphics/FloatQuad.cpp:
- platform/graphics/FloatQuad.h:
(WebCore::FloatQuad::isEmpty const): Deleted.
(WebCore::FloatQuad::boundingBoxIsEmpty const):
Tools:
Add an API test to exercise the new
FloatQuad::isEmpty()method.
- TestWebKitAPI/Tests/WebCore/FloatQuadTests.cpp:
(TestWebKitAPI::checkIsEmpty):
(TestWebKitAPI::TEST):
- 2:18 PM Changeset in webkit [276274] by
-
- 2 edits in trunk/Source/WebCore
Web Inspector: Grid overlay column line label placement copy/paste error
https://bugs.webkit.org/show_bug.cgi?id=224777
Reviewed by Devin Rousso.
In grid overlays, a typo meant for all column line labels after the initial line, only the start of the line was
used for placement, where it is more accurate to use the start and end points to match the behavior of the first
line. This had no visual impact because subsequent lines do not currently have their labels adjusted further into
the grid, only flipped into the grid but still referencing the same point. This patch corrects the value of
gapLabelLineto always be a line on which the label can be placed, instead of a single point.
- inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::buildGridOverlay):
- 2:10 PM Changeset in webkit [276273] by
-
- 3 edits in trunk/LayoutTests
[mac-wk2] LayoutTest fast/mediastream/getUserMedia-webaudio.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=170960
Reviewed by Eric Carlson.
Update test to check for noise for more iterations.
Remove timeout expectation since it is no longer timing out in bots.
- fast/mediastream/getUserMedia-webaudio.html:
- platform/mac-wk2/TestExpectations:
- 1:45 PM Changeset in webkit [276272] by
-
- 8 edits2 adds in trunk
Web Inspector: Graphics: add support for
steps()/spring()CSS timing functions
https://bugs.webkit.org/show_bug.cgi?id=224654
Reviewed by BJ Burg.
Source/WebInspectorUI:
- UserInterface/Models/Geometry.js:
(WI.StepsFunction): Added.
(WI.StepsFunction.fromString): Added.
(WI.StepsFunction.prototype.get type): Added.
(WI.StepsFunction.prototype.get count): Added.
(WI.StepsFunction.prototype.copy): Added.
(WI.StepsFunction.prototype.toString): Added.
Create a model object forsteps()CSS timing function.
- UserInterface/Models/Animation.js:
(WI.Animation.prototype._updateEffect):
Also supporteffect.timingFunction/keyframe.easingbeing asteps()/spring()CSS timing function.
- UserInterface/Views/AnimationContentView.js:
(WI.AnimationContentView.prototype._refreshPreview):
Create a UI forsteps()/spring()CSS timing functions.
LayoutTests:
- inspector/animation/lifecycle-web-animation.html:
- inspector/animation/lifecycle-web-animation-expected.txt:
- inspector/animation/resources/lifecycle-utilities.js:
- inspector/unit-tests/geometry.html: Added.
- inspector/unit-tests/geometry-expected.txt: Added.
- 1:35 PM Changeset in webkit [276271] by
-
- 5 edits in trunk/Source/WebKit
MotionMark's Canvas-Arcs subtest is broken if the GPUProcess is not yet running
https://bugs.webkit.org/show_bug.cgi?id=224778
Reviewed by Simon Fraser.
I recently made changes so that the GPUProcess is only launched when it is needed. This means
that until MotionMark's Canvas-Arcs subtest, the GPUProcess is usually not yet running. As a
result, RemoteRenderingBackendProxy::createImageBuffer() ends up launching the GPUProcess
and sending the GPUConnectionToWebProcess::CreateRenderingBackend and
RemoteRenderingBackend::CreateImageBuffer IPC right away. We seem to have a synchronization
issue because when this happens, the rendering for the Canvas-Arcs subtest is visibly broken
and its score is very low (< 6, instead of > 600).
Making the GPUConnectionToWebProcess::CreateRenderingBackend synchronous again (I made it
async recently) seems to address the synchronization issue and restores correct behavior on
MotionMark. I am therefore making this IPC synchronous again in this patch to get benchmark
coverage again while I investigate the root cause offline.
- GPUProcess/GPUConnectionToWebProcess.cpp:
(WebKit::GPUConnectionToWebProcess::createRenderingBackend):
- GPUProcess/GPUConnectionToWebProcess.h:
- GPUProcess/GPUConnectionToWebProcess.messages.in:
- WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
(WebKit::RemoteRenderingBackendProxy::ensureGPUProcessConnection):
- 1:16 PM Changeset in webkit [276270] by
-
- 2 edits in trunk/Tools
Fix the macCatalyst TestWebKitAPI build
https://bugs.webkit.org/show_bug.cgi?id=224780
- TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
Unreviewed build fix; link PDFKit since we now enable it.
- 1:09 PM Changeset in webkit [276269] by
-
- 3 edits2 adds in trunk
[LFC][IFC] LineCandidate.inlineContent should be ignored when reverting
https://bugs.webkit.org/show_bug.cgi?id=224771
<rdar://76760857>
Reviewed by Antti Koivisto.
Source/WebCore:
LineCandidate.inlineContent is a set of candidate runs for the line and when the line breaker says "please revert" (move back to an earlier position on the line)
these runs should all be ignored as they did not make it to the line.
(inlineContentIsFullyCommitted flag got confused when the number of candidate runs matched the number of runs we managed to put on the line as part of the revert. It did not take the "revert" bit into account.)
Test: fast/inline/crash-when-revert-has-trailing-line-break.html
- layout/inlineformatting/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::placeInlineContent):
LayoutTests:
- fast/inline/crash-when-revert-has-trailing-line-break-expected.txt: Added.
- fast/inline/crash-when-revert-has-trailing-line-break.html: Added.
- 12:42 PM Changeset in webkit [276268] by
-
- 2 edits in trunk/LayoutTests
[ wk2 ] http/tests/security/contentSecurityPolicy/report-only-connect-src-xmlhttprequest-redirect-to-blocked.py is a constant text failure
https://bugs.webkit.org/show_bug.cgi?id=224626
Unreviewed test gardening
- platform/wk2/TestExpectations: Updating expectations as a fix is being worked on.
- 11:55 AM Changeset in webkit [276267] by
-
- 4 edits in trunk
SVG Images launch the GPUProcess unnecessarily
https://bugs.webkit.org/show_bug.cgi?id=224770
Reviewed by Eric Carlson.
Source/WebCore:
Make sure MediaPlayer::supportsType() returns early for MIME types that can definitely
not be media, to avoid launch the GPUProcess unnecessarily.
- platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::supportsType):
Tools:
Add API test coverage.
- TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:
(TEST):
- 11:52 AM Changeset in webkit [276266] by
-
- 13 edits in trunk/Source/bmalloc
[bmalloc] Enable Adaptive Scavenger for Mac
https://bugs.webkit.org/show_bug.cgi?id=224706
Reviewed by Filip Pizlo.
Enabled the adaptive scavenger code paths for macOS.
The original reason that the partial scavenging paths were kept for macOS was due
to regression on power tests. To alleviate the power regression, this patch splits
out the adaptive scavenger parameters with macOS specific values.
The parameters are:
The multiplier used to compute the next scavenging wait time based on the
time needed for the prior scavenging.
Minimum wait time between scavenging.
Maximum wait time between scavenging.
The values in the current code are:
Wait time Multiplier: 150
Minimum wait time: 100ms
Maximum wait time: 10,000ms (10 seconds)
The proposed values for macOS, determined using empirical testing.
Wait time Multiplier: 300
Minimum wait time: 750ms
Maximum wait time: 20,000ms (20 seconds)
When tested on various mac variants, this change:
- Provides a 3-5% reduction in memory use on RAMification.
- It is neutral on JetStream2.
- It is neutral to a slight regression on Speedometer2, but there is some variability in those results.
Since macOS was the only platform still using the partial scavenging code path,
the partial scavenging code paths were deleted.
- bmalloc/BPlatform.h:
- bmalloc/Heap.cpp:
(bmalloc::Heap::scavenge):
(bmalloc::Heap::allocateSmallChunk):
(bmalloc::Heap::allocateSmallPage):
(bmalloc::Heap::allocateLarge):
(bmalloc::Heap::scavengeToHighWatermark): Deleted.
- bmalloc/Heap.h:
- bmalloc/IsoDirectory.h:
- bmalloc/IsoDirectoryInlines.h:
(bmalloc::passedNumPages>::takeFirstEligible):
(bmalloc::passedNumPages>::scavenge):
(bmalloc::passedNumPages>::scavengeToHighWatermark): Deleted.
- bmalloc/IsoHeapImpl.h:
- bmalloc/IsoHeapImplInlines.h:
(bmalloc::IsoHeapImpl<Config>::scavengeToHighWatermark): Deleted.
- bmalloc/LargeMap.cpp:
(bmalloc::LargeMap::add):
- bmalloc/LargeRange.h:
(bmalloc::LargeRange::LargeRange):
(bmalloc::LargeRange::setUsedSinceLastScavenge):
(bmalloc::merge):
(): Deleted.
- bmalloc/Scavenger.cpp:
(bmalloc::Scavenger::Scavenger):
(bmalloc::Scavenger::scavenge):
(bmalloc::Scavenger::threadRunLoop):
(bmalloc::Scavenger::timeSinceLastPartialScavenge): Deleted.
(bmalloc::Scavenger::partialScavenge): Deleted.
- bmalloc/Scavenger.h:
- bmalloc/SmallPage.h:
(bmalloc::SmallPage::setUsedSinceLastScavenge):
- 11:21 AM Changeset in webkit [276265] by
-
- 3 edits in trunk/Source/WebInspectorUI
Web Inspector: REGRESSION(?): Network: Request (Object Tree) is sometimes empty
https://bugs.webkit.org/show_bug.cgi?id=224768
<rdar://problem/76783636>
Reviewed by BJ Burg.
- UserInterface/Views/LocalJSONContentView.js:
(WI.LocalJSONContentView.prototype.renderRemoteObject):
If theWI.RemoteObjectis simple enough to be rendered inline,WI.ObjectTreeViewwon't
show aWI.TreeOutlineby default. We have to tell it to use aWI.TreeOutlineby passing
forceExpanding = trueinto the constructor.
- UserInterface/Views/ObjectTreeView.js:
(WI.ObjectTreeView.prototype.showOnlyJSON):
Add someconsole.assertto help prevent this from happening again.
- 10:59 AM Changeset in webkit [276264] by
-
- 27 edits1 delete in trunk
[selectors] Script focus and :focus-visible
https://bugs.webkit.org/show_bug.cgi?id=224598
Reviewed by Darin Adler.
LayoutTests/imported/w3c:
Update expectations as the tests pass now.
- web-platform-tests/css/selectors/focus-visible-008-expected.txt:
- web-platform-tests/css/selectors/focus-visible-009-expected.txt:
- web-platform-tests/css/selectors/focus-visible-010-expected.txt:
- web-platform-tests/css/selectors/focus-visible-014-expected.txt:
- web-platform-tests/css/selectors/focus-visible-script-focus-001-expected.txt:
- web-platform-tests/css/selectors/focus-visible-script-focus-002.tentative-expected.txt:
- web-platform-tests/css/selectors/focus-visible-script-focus-003.tentative-expected.txt:
- web-platform-tests/css/selectors/focus-visible-script-focus-004-expected.txt:
- web-platform-tests/css/selectors/focus-visible-script-focus-005-expected.txt:
- web-platform-tests/css/selectors/focus-visible-script-focus-006.tentative-expected.txt:
- web-platform-tests/css/selectors/focus-visible-script-focus-007.tentative-expected.txt:
- web-platform-tests/css/selectors/focus-visible-script-focus-012-expected.txt:
- web-platform-tests/css/selectors/focus-visible-script-focus-013-expected.txt:
- web-platform-tests/css/selectors/focus-visible-script-focus-014-expected.txt:
- web-platform-tests/css/selectors/focus-visible-script-focus-015-expected.txt:
- web-platform-tests/css/selectors/focus-visible-script-focus-016.tentative-expected.txt:
- web-platform-tests/css/selectors/focus-visible-script-focus-017.tentative-expected.txt:
Source/WebCore:
Implement :focus-visible behavior when a script moves focus.
An element will match :focus-visible when a script move focus if the last focused element was not focused via mouse click.
This patch makes WebKit behaves like Chromium and Firefox and pass all the related tests.
There's an ongoing discussion about 6 tests that are marked as ".tentative" in the following issue:
https://github.com/web-platform-tests/wpt/issues/28505
Test: web-platform-tests/css/selectors/focus-visible-script-focus-*
- dom/Document.cpp:
(WebCore::Document::adjustFocusedNodeOnNodeRemoval): Just update FocusOptions initializer.
(WebCore::Document::setFocusedElement): Store if the last element has been focused by mouse click or not.
- dom/Document.h: New member m_latestFocusTrigger.
(WebCore::Document::wasLastFocusByClick const): Method to check status of m_latestFocusTrigger.
- dom/Element.cpp:
(WebCore::Element::focus): When there's a script focus, this checks if the last element was focused
by mouse click in order to make it match :focus-visible.
- dom/FocusOptions.h: Add FocusTrigger enum to know if an element has been focused via mouse click or not.
This refers to the "focus trigger" concept on the HTML spec (see https://html.spec.whatwg.org/multipage/interaction.html).
- page/EventHandler.cpp:
(WebCore::EventHandler::dispatchMouseEvent): Pass FocusTrigger:Click in setFocusedElement() call.
LayoutTests:
Update expectations for tests, most of them are passing on Mac. On iOS a bunch timeout so they're skipped, as other :focus-visible tests.
- platform/ios/TestExpectations:
- platform/mac/imported/w3c/web-platform-tests/css/selectors/focus-visible-009-expected.txt: Removed as test passes now.
- platform/mac/TestExpectations:
- 10:53 AM Changeset in webkit [276263] by
-
- 3 edits in trunk/Source/WebKit
Fix races in LibWebRTCCodecs introduced in r276214
https://bugs.webkit.org/show_bug.cgi?id=224758
Reviewed by Youenn Fablet.
After r276214, LibWebRTCCodecs's createDecoder() / createEncoder() may hop to the main
thread to initialize the connection to the GPUProcess. If releaseDecoder() / releaseEncoder()
were to get called very shortly after, they may win the race and have no decoder / encoder
to release, since they are dispatched directly to the background thread. To address the issue,
we now call ensureGPUProcessConnectionAndDispatchToThread() in releaseDecoder(), releaseEncoder()
and initializeEncoder().
- WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:
(WebKit::LibWebRTCCodecs::releaseDecoder):
(WebKit::LibWebRTCCodecs::releaseEncoder):
(WebKit::LibWebRTCCodecs::initializeEncoder):
- 10:51 AM Changeset in webkit [276262] by
-
- 10 edits in trunk
Nullptr crash in CSSCalcValue::category() via HTMLConverterCaches::floatPropertyValueForNode
https://bugs.webkit.org/show_bug.cgi?id=221392
Reviewed by Simon Fraser.
LayoutTests/imported/w3c:
- web-platform-tests/css/css-values/minmax-length-percent-serialize-expected.txt:
Updated to reflect 8 tests passing that were failing before.
Source/WebCore:
- css/CSSCalculationValue.cpp:
(WebCore::CSSCalcOperationNode::createCalcExpression const): Pass in a destination category
when creating a CalcExpressionOperation.
(WebCore::createCSS): Pass the destination category from the CalcExpressionOperation when
creating a CSSCalcOperationNode.
- css/CSSCalculationValue.h: Moved the CalculationCategory enumeration from here to
CalculationValue.h.
- platform/CalculationValue.cpp:
(WebCore::operator==): Include destination category when comparing.
- platform/CalculationValue.h: Moved CalculationCategory here. Added a destination
category constructor argument, data members, and getter function to the
CalcExpressionOperation class.
LayoutTests:
- fast/css/calc-parsing-expected.txt: Updated for change below.
- fast/css/calc-parsing.html: Added more test cases so this covers the affected cases of computed
style for calc expressions that mix percentages and numbers. Alternatively, we could remove this
entire test case because the web platform tests also cover this pretty well.
- 10:20 AM WebKitGTK/2.32.x edited by
- (diff)
- 10:17 AM Changeset in webkit [276261] by
-
- 12 edits2 adds2 deletes in trunk/LayoutTests
[LayoutTests] Convert http/tests/blink convert PHP to Python
https://bugs.webkit.org/show_bug.cgi?id=224702
<rdar://problem/76783504>
Reviewed by Darin Adler.
- http/tests/blink/sendbeacon/beacon-cookie-expected.txt:
- http/tests/blink/sendbeacon/beacon-cookie.html:
- http/tests/blink/sendbeacon/beacon-cross-origin-expected.txt:
- http/tests/blink/sendbeacon/beacon-cross-origin.html:
- http/tests/blink/sendbeacon/beacon-cross-origin.https-expected.txt:
- http/tests/blink/sendbeacon/beacon-cross-origin.https.html:
- http/tests/blink/sendbeacon/beacon-same-origin-expected.txt:
- http/tests/blink/sendbeacon/beacon-same-origin.html:
- http/tests/blink/sendbeacon/resources/check-beacon.php: Removed.
- http/tests/blink/sendbeacon/resources/check-beacon.py: Added.
(extensive_strip):
- http/tests/blink/sendbeacon/resources/save-beacon.php: Removed.
- http/tests/blink/sendbeacon/resources/save-beacon.py: Added.
(prettify):
(decode_multipart):
- http/tests/resources/portabilityLayer.py:
(get_post_data):
(get_request):
- platform/ios/http/tests/blink/sendbeacon/beacon-same-origin-expected.txt:
- platform/mac/http/tests/blink/sendbeacon/beacon-same-origin-expected.txt:
- 10:08 AM Changeset in webkit [276260] by
-
- 2 edits in trunk/Source/WebCore
CSSValuePool should be non-copyable
https://bugs.webkit.org/show_bug.cgi?id=224764
Reviewed by Alan Bujtas.
- css/CSSValuePool.h:
- 9:59 AM Changeset in webkit [276259] by
-
- 2 edits in trunk/Source/JavaScriptCore
Build fix for Debug -O3 after r276162.
https://bugs.webkit.org/show_bug.cgi?id=224681
rdar://76698113
Not reviewed.
- runtime/JSObject.cpp:
- 9:53 AM Changeset in webkit [276258] by
-
- 2 edits in trunk/LayoutTests
Unreviewed, GLIB gardening
- platform/glib/TestExpectations: Flag a few more media tests to skip or as flaky crash.
- 9:46 AM Changeset in webkit [276257] by
-
- 2 edits in trunk/Source/WebKit
Add more GPUProcess release logging to facilitate debugging
https://bugs.webkit.org/show_bug.cgi?id=224761
Reviewed by Darin Adler.
- GPUProcess/GPUProcess.cpp:
(WebKit::GPUProcess::GPUProcess):
(WebKit::GPUProcess::createGPUConnectionToWebProcess):
(WebKit::GPUProcess::removeGPUConnectionToWebProcess):
(WebKit::GPUProcess::initializeGPUProcess):
- 9:45 AM Changeset in webkit [276256] by
-
- 2 edits in trunk/LayoutTests
Unreviewed, GLIB gardening
- platform/glib/TestExpectations: Flag imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-implicit.html as flaky crash.
- 8:41 AM Changeset in webkit [276255] by
-
- 2 edits in trunk/Source/WebCore
[LFC] The layout containment box establishes an absolute positioning containing block and a fixed positioning containing block
https://bugs.webkit.org/show_bug.cgi?id=224754
Reviewed by Antti Koivisto.
https://www.w3.org/TR/css-contain-2/#containment-layout.
"The layout containment box establishes an absolute positioning containing block and a fixed positioning containing block."
- layout/layouttree/LayoutBox.h:
(WebCore::Layout::Box::isContainingBlockForFixedPosition const):
(WebCore::Layout::Box::isContainingBlockForOutOfFlowPosition const):
- 8:21 AM Changeset in webkit [276254] by
-
- 2 edits in trunk/Source/WebCore
[LFC] Layout containment box establishes an independent formatting context
https://bugs.webkit.org/show_bug.cgi?id=224753
Reviewed by Antti Koivisto.
https://www.w3.org/TR/css-contain-2/#containment-layout.
"The layout containment box establishes an independent formatting context."
- layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::establishesIndependentFormattingContext const):
- 8:18 AM Changeset in webkit [276253] by
-
- 4 edits in trunk/Source/WebCore
Silence various -Wreturn-type warnings
https://bugs.webkit.org/show_bug.cgi?id=224756
Patch by Michael Catanzaro <Michael Catanzaro> on 2021-04-19
Reviewed by Don Olmstead.
- css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::mixColorComponents):
- inspector/InspectorOverlay.cpp:
(WebCore::expectedSizeForLayoutLabel):
- rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::usedClear):
(WebCore::RenderStyle::usedFloat):
- 7:16 AM Changeset in webkit [276252] by
-
- 2 edits in trunk/Source/WebCore
Unreviewed, fix the build after r276181
<rdar://problem/76832595>
Add a couple of missing forward declarations for
IntRectandIntPoint.
- page/ContextMenuClient.h:
- 6:54 AM Changeset in webkit [276251] by
-
- 3 edits in trunk/Source/WebCore
Add assertions to check for no memory allocation in AudioMediaStreamTrackRendererUnit rendering thread
https://bugs.webkit.org/show_bug.cgi?id=224674
Reviewed by Eric Carlson.
Add ForbidMallocUseForCurrentThreadScope in audio rendering code path to prevent memory allocation.
Rename inputProc to renderingCallback.
Remove use of AudioMediaStreamTrackRendererUnit::singleton and instead use the pointer given to renderingCallback.
This is safe as AudioMediaStreamTrackRendererUnit destructor stops the audio unit.
- platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.cpp:
(WebCore::AudioMediaStreamTrackRendererUnit::createAudioUnitIfNeeded):
(WebCore::AudioMediaStreamTrackRendererUnit::render):
(WebCore::AudioMediaStreamTrackRendererUnit::renderingCallback):
(WebCore::AudioMediaStreamTrackRendererUnit::inputProc): Deleted.
- platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.h:
- 6:43 AM Changeset in webkit [276250] by
-
- 2 edits in trunk/Tools
Unreviewed, WPE Minibrowser build warning fix.
- MiniBrowser/wpe/main.cpp: No need to use typedef for this struct declaration.
- 6:28 AM Changeset in webkit [276249] by
-
- 3 edits in trunk/Source/WebCore
[LFC] Implement Box::isLayoutContainmentBox
https://bugs.webkit.org/show_bug.cgi?id=224740
Reviewed by Antti Koivisto.
This is part of https://www.w3.org/TR/css-contain-2/#containment-layout
- layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::isLayoutContainmentBox const):
(WebCore::Layout::Box::isInternalTableBox const):
- layout/layouttree/LayoutBox.h:
(WebCore::Layout::Box::isInternalRubyBox const):
- 6:22 AM Changeset in webkit [276248] by
-
- 4 edits39 moves15 adds in trunk/LayoutTests
Unreviewed, WPE gardening
Share more media tests baselines between the GTK and WPE ports.
- platform/glib/TestExpectations:
- platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-implicit-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-implicit-expected.txt.
- platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-negative-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-negative-expected.txt.
- platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-without-codecs-parameter-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-without-codecs-parameter-expected.txt.
- platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-duration-boundaryconditions-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/media-source/mediasource-duration-boundaryconditions-expected.txt.
- platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-getvideoplaybackquality-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/media-source/mediasource-getvideoplaybackquality-expected.txt.
- platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-is-type-supported-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/media-source/mediasource-is-type-supported-expected.txt.
- platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-remove-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/media-source/mediasource-remove-expected.txt.
- platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-removesourcebuffer-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/media-source/mediasource-removesourcebuffer-expected.txt.
- platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-sourcebuffer-mode-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/media-source/mediasource-sourcebuffer-mode-expected.txt.
- platform/glib/media/W3C/video/canPlayType/canPlayType_codecs_order_1-expected.txt: Renamed from LayoutTests/platform/gtk/media/W3C/video/canPlayType/canPlayType_codecs_order_1-expected.txt.
- platform/glib/media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_1-expected.txt: Renamed from LayoutTests/platform/gtk/media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_1-expected.txt.
- platform/glib/media/W3C/video/canPlayType/canPlayType_two_implies_one_1-expected.txt: Renamed from LayoutTests/platform/gtk/media/W3C/video/canPlayType/canPlayType_two_implies_one_1-expected.txt.
- platform/glib/media/W3C/video/canPlayType/canPlayType_two_implies_one_2-expected.txt: Renamed from LayoutTests/platform/gtk/media/W3C/video/canPlayType/canPlayType_two_implies_one_2-expected.txt.
- platform/glib/media/audio-controls-rendering-expected.png: Renamed from LayoutTests/platform/gtk/media/audio-controls-rendering-expected.png.
- platform/glib/media/audio-repaint-expected.png: Renamed from LayoutTests/platform/gtk/media/audio-repaint-expected.png.
- platform/glib/media/context-menu-actions-expected.txt: Renamed from LayoutTests/platform/gtk/media/context-menu-actions-expected.txt.
- platform/glib/media/controls-after-reload-expected.png: Renamed from LayoutTests/platform/gtk/media/controls-after-reload-expected.png.
- platform/glib/media/controls-layout-direction-expected.png: Renamed from LayoutTests/platform/gtk/media/controls-layout-direction-expected.png.
- platform/glib/media/controls-strict-expected.png: Renamed from LayoutTests/platform/gtk/media/controls-strict-expected.png.
- platform/glib/media/controls-styling-expected.png: Renamed from LayoutTests/platform/gtk/media/controls-styling-expected.png.
- platform/glib/media/controls-styling-strict-expected.png: Renamed from LayoutTests/platform/gtk/media/controls-styling-strict-expected.png.
- platform/glib/media/controls-without-preload-expected.png: Renamed from LayoutTests/platform/gtk/media/controls-without-preload-expected.png.
- platform/glib/media/media-can-play-ogg-expected.txt: Renamed from LayoutTests/platform/gtk/media/media-can-play-ogg-expected.txt.
- platform/glib/media/media-controls-clone-expected.png: Renamed from LayoutTests/platform/gtk/media/media-controls-clone-expected.png.
- platform/glib/media/media-document-audio-repaint-expected.png: Renamed from LayoutTests/platform/gtk/media/media-document-audio-repaint-expected.png.
- platform/glib/media/media-fullscreen-inline-expected.txt: Renamed from LayoutTests/platform/gtk/media/media-fullscreen-inline-expected.txt.
- platform/glib/media/media-fullscreen-not-in-document-expected.txt: Renamed from LayoutTests/platform/gtk/media/media-fullscreen-not-in-document-expected.txt.
- platform/glib/media/media-source/media-source-resize-expected.txt: Renamed from LayoutTests/platform/gtk/media/media-source/media-source-resize-expected.txt.
- platform/glib/media/video-canvas-alpha-expected.png: Renamed from LayoutTests/platform/gtk/media/video-canvas-alpha-expected.png.
- platform/glib/media/video-controls-rendering-expected.png: Renamed from LayoutTests/platform/gtk/media/video-controls-rendering-expected.png.
- platform/glib/media/video-display-toggle-expected.png: Renamed from LayoutTests/platform/gtk/media/video-display-toggle-expected.png.
- platform/glib/media/video-empty-source-expected.png: Renamed from LayoutTests/platform/gtk/media/video-empty-source-expected.png.
- platform/glib/media/video-no-audio-expected.png: Renamed from LayoutTests/platform/gtk/media/video-no-audio-expected.png.
- platform/glib/media/video-playing-and-pause-expected.png: Renamed from LayoutTests/platform/gtk/media/video-playing-and-pause-expected.png.
- platform/glib/media/video-playing-and-pause-expected.txt: Renamed from LayoutTests/platform/gtk/media/video-playing-and-pause-expected.txt.
- platform/glib/media/video-volume-slider-expected.png: Renamed from LayoutTests/platform/gtk/media/video-volume-slider-expected.png.
- platform/glib/media/video-zoom-controls-expected.png: Renamed from LayoutTests/platform/gtk/media/video-zoom-controls-expected.png.
- platform/glib/media/video-zoom-expected.png: Renamed from LayoutTests/platform/gtk/media/video-zoom-expected.png.
- platform/glib/media/video-zoom-expected.txt: Renamed from LayoutTests/platform/gtk/media/video-zoom-expected.txt.
- platform/gtk/TestExpectations:
- platform/wpe/TestExpectations:
- platform/wpe/media/video-aspect-ratio-expected.txt: Added.
- platform/wpe/media/video-canvas-createPattern-expected.png: Added.
- platform/wpe/media/video-colorspace-yuv420-expected.png: Added.
- platform/wpe/media/video-colorspace-yuv420-expected.txt: Added.
- platform/wpe/media/video-colorspace-yuv422-expected.png: Added.
- platform/wpe/media/video-colorspace-yuv422-expected.txt: Added.
- platform/wpe/media/video-frame-accurate-seek-expected.png: Added.
- platform/wpe/media/video-frame-accurate-seek-expected.txt: Added.
- platform/wpe/media/video-layer-crash-expected.txt: Added.
- platform/wpe/media/video-transformed-expected.txt: Added.
- 6:12 AM Changeset in webkit [276247] by
-
- 24 edits3 adds in trunk
Enable -Wthread-safety, add attributes to custom lock classes, and provide macros to declare guards
https://bugs.webkit.org/show_bug.cgi?id=221614
<rdar://problem/74396781>
Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-04-19
Reviewed by David Kilzer.
PerformanceTests:
Add -Wthread-safety to compile flags.
- DecoderTest/Configurations/Base.xcconfig:
Source/bmalloc:
Add -Wthread-safety to compile flags.
- Configurations/Base.xcconfig:
Source/JavaScriptCore:
Add -Wthread-safety to compile flags.
- Configurations/Base.xcconfig:
Source/WebCore:
Add -Wthread-safety to compile flags.
- Configurations/Base.xcconfig:
Source/WebCore/PAL:
Add -Wthread-safety to compile flags.
- Configurations/Base.xcconfig:
Source/WebInspectorUI:
Add -Wthread-safety to compile flags.
- Configurations/Base.xcconfig:
Source/WebKit:
Add -Wthread-safety to compile flags.
- Configurations/Base.xcconfig:
Source/WebKitLegacy/mac:
Add -Wthread-safety to compile flags.
- Configurations/Base.xcconfig:
Source/WTF:
Implement rudimentary support for clang thread safety analysis.
The added macros can be used to declare which member variables or
global variables are locked by which mutexes. The compiler will
check statically that the mutexes are held correctly. The checking
is intra procedural, not global.
- Configurations/Base.xcconfig:
Add -Wthread-safety to compile flags.
- wtf/CheckedLock.h: Added.
Add CheckedLock, a Lock variant that is amenable to static
analysis.
Add a Locker specialization for CheckedLock that is amenable to
static analysis.
Locker<CheckedLock> is a std::scoped_lock. The scoped_lock cannot be aliased,
since it appears that (Apple's) libcxx is not compiled with thread safety
analysis support enabled by default.
New types are needed due Locker move constructor and conditional locking.
The Locker has default usage pattern of:
auto locker = holdLock(m_lock);
This forces dynamism that removes the possibility of simple statical
analysis that thread safety analysis capabilities "mutex" and "scoped_lock"
currently implement. Most likely large fraction of call sites is due to historical
lack of CTAD and as such can be converted to less general form.
Once the pattern is not used by default, CheckedLock can be deleted
and the move dynamism bits of Locker can be moved to some more specific type
("UncheckedLocker").
- wtf/ThreadSafetyAnalysis.h: Added.
Add macro wrappers around clang "mutex" and "scoped_lock" capability attributes.
Tools:
- TestWebKitAPI/Configurations/Base.xcconfig:
Add -Wthread-safety to compile flags.
- TestWebKitAPI/CMakeLists.txt:
- TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
- TestWebKitAPI/Tests/WTF/CheckedLock.cpp: Added.
(TestWebKitAPI::TEST):
Implement a test for testing that CheckedLock compiles.
- 4:55 AM Changeset in webkit [276246] by
-
- 2 edits in trunk
[GTK] Switch to libsoup3 by default
https://bugs.webkit.org/show_bug.cgi?id=224741
Reviewed by Sergio Villar Senin.
- Source/cmake/OptionsGTK.cmake:
- 3:28 AM Changeset in webkit [276245] by
-
- 2 edits in trunk/Source/WebCore
Make RealtimeIncomingAudioSourceCocoa preallocate audio buffer
https://bugs.webkit.org/show_bug.cgi?id=224672
Reviewed by Eric Carlson.
Instead of allocating the buffer on valid data, we wait for data to be of the correct sample rate.
We preallocate the buffer accordingly in constructor to avoid allocation in the webrtc audio thread.
Default is 1 channel since mono is what webrtc encoders mostly do these days.
Covered by existing tests.
- platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:
(WebCore::RealtimeIncomingAudioSourceCocoa::RealtimeIncomingAudioSourceCocoa):
(WebCore::RealtimeIncomingAudioSourceCocoa::OnData):
- 2:56 AM Changeset in webkit [276244] by
-
- 4 edits in trunk/Source/WebCore
Move from RecursiveLock to Lock in RealtimeMediaSource
https://bugs.webkit.org/show_bug.cgi?id=224671
Reviewed by Eric Carlson.
RecursiveLock is more expensive as it allocates memory and not useful here.
Covered by existing tests.
- platform/mediastream/RealtimeMediaSource.h:
- platform/mediastream/RealtimeOutgoingAudioSource.h:
- platform/mediastream/RealtimeOutgoingVideoSource.h:
- 2:53 AM Changeset in webkit [276243] by
-
- 9 edits in trunk/Source/WebCore
Reduce crackling at start of playing a live audio track
https://bugs.webkit.org/show_bug.cgi?id=218898
<rdar://problem/71625010>
Reviewed by Eric Carlson.
We often hear crackles at the beginning of playing a MediaStreamTrack.
This is due to starting at a point where there is not enough data, so we start rendering and quickly run short of data.
Our heuristic to start was not good since we were not accounting to LibWebRTC audio module which sends audio samples by batch of 5 samples.
So we would have needed to at least have 6 samples to be sure to not run out of data.
What this patch does:
- Add an extra parameter to AudioSampleDataSource so that we do not start until we have at least been pushed a given number of sample count.
- Change LibWebRTAudioModule to send audio samples by batch of 3 (hence 30 ms) instead of 5
- Set this new parameter to 2 for local tracks and 4 for remote tracks
- Add a new boolean to AudioSampleDataSource to know whether we start the track for the first time or not. If we start it, use the new parameter to buffer enough data. Otherwise, use current heuristic.
We also reduce the AudioSampleDataSource buffer to 0.5 seconds instead of 2 seconds, since 2 seconds is too much for real time audio.
Manually tested.
- platform/audio/cocoa/AudioSampleDataSource.h:
- platform/audio/cocoa/AudioSampleDataSource.mm:
(WebCore::AudioSampleDataSource::create):
(WebCore::AudioSampleDataSource::AudioSampleDataSource):
(WebCore::AudioSampleDataSource::pullSamplesInternal):
- platform/mediastream/libwebrtc/LibWebRTCAudioModule.cpp:
(WebCore::LibWebRTCAudioModule::pollFromSource):
- platform/mediastream/libwebrtc/LibWebRTCAudioModule.h:
- platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp:
(WebCore::pollSamplesCount):
(WebCore::AudioMediaStreamTrackRendererCocoa::pushSamples):
- platform/mediastream/mac/MediaStreamTrackAudioSourceProviderCocoa.cpp:
(WebCore::MediaStreamTrackAudioSourceProviderCocoa::MediaStreamTrackAudioSourceProviderCocoa):
- platform/mediastream/mac/WebAudioSourceProviderCocoa.h:
- platform/mediastream/mac/WebAudioSourceProviderCocoa.mm:
(WebCore::WebAudioSourceProviderCocoa::prepare):
- 2:49 AM Changeset in webkit [276242] by
-
- 5 edits13 moves17 adds2 deletes in trunk/LayoutTests
Migrate some WebRTC encoded transform tests to WPT
https://bugs.webkit.org/show_bug.cgi?id=224604
Reviewed by Eric Carlson.
LayoutTests/imported/w3c:
- web-platform-tests/webrtc-encoded-transform/routines.js: Added.
(async createConnections):
(waitFor):
- web-platform-tests/webrtc-encoded-transform/script-audio-transform-worker.js: Added.
(MockRTCRtpTransformer):
(MockRTCRtpTransformer.prototype.start):
(MockRTCRtpTransformer.prototype.process):
(onrtctransform):
- web-platform-tests/webrtc-encoded-transform/script-audio-transform.https-expected.txt: Added.
- web-platform-tests/webrtc-encoded-transform/script-audio-transform.https.html: Renamed from LayoutTests/http/wpt/webrtc/audio-script-transform.html.
- web-platform-tests/webrtc-encoded-transform/script-change-transform-worker.js: Renamed from LayoutTests/http/wpt/webrtc/change-encoded-transform.js.
- web-platform-tests/webrtc-encoded-transform/script-change-transform.https-expected.txt: Added.
- web-platform-tests/webrtc-encoded-transform/script-change-transform.https.html: Renamed from LayoutTests/http/wpt/webrtc/change-encoded-transform.html.
- web-platform-tests/webrtc-encoded-transform/script-late-transform.https-expected.txt: Added.
- web-platform-tests/webrtc-encoded-transform/script-late-transform.https.html: Renamed from LayoutTests/http/wpt/webrtc/webrtc-late-transform.html.
- web-platform-tests/webrtc-encoded-transform/script-metadata-transform-worker.js: Renamed from LayoutTests/http/wpt/webrtc/metadata-transform-worker.js.
- web-platform-tests/webrtc-encoded-transform/script-metadata-transform.https-expected.txt: Added.
- web-platform-tests/webrtc-encoded-transform/script-metadata-transform.https.html: Renamed from LayoutTests/http/wpt/webrtc/metadata-transform.html.
- web-platform-tests/webrtc-encoded-transform/script-transform-worker.js: Renamed from LayoutTests/http/wpt/webrtc/script-transform.js.
- web-platform-tests/webrtc-encoded-transform/script-transform.https-expected.txt: Added.
- web-platform-tests/webrtc-encoded-transform/script-transform.https.html: Renamed from LayoutTests/http/wpt/webrtc/webrtc-transform.html.
- web-platform-tests/webrtc-encoded-transform/script-write-twice-transform-worker.js: Renamed from LayoutTests/http/wpt/webrtc/write-twice-transform.js.
- web-platform-tests/webrtc-encoded-transform/script-write-twice-transform.https-expected.txt: Added.
- web-platform-tests/webrtc-encoded-transform/script-write-twice-transform.https.html: Renamed from LayoutTests/http/wpt/webrtc/write-twice-transform.html.
- web-platform-tests/webrtc-encoded-transform/sframe-keys.https-expected.txt: Added.
- web-platform-tests/webrtc-encoded-transform/sframe-keys.https.html: Added.
- web-platform-tests/webrtc-encoded-transform/sframe-transform-buffer-source-expected.txt: Added.
- web-platform-tests/webrtc-encoded-transform/sframe-transform-buffer-source.html: Added.
- web-platform-tests/webrtc-encoded-transform/sframe-transform-expected.txt: Added.
- web-platform-tests/webrtc-encoded-transform/sframe-transform-in-worker.https-expected.txt: Added.
- web-platform-tests/webrtc-encoded-transform/sframe-transform-in-worker.https.html: Renamed from LayoutTests/http/wpt/webrtc/sframe-transform-in-worker.html.
- web-platform-tests/webrtc-encoded-transform/sframe-transform-readable-expected.txt: Added.
- web-platform-tests/webrtc-encoded-transform/sframe-transform-readable.html: Added.
- web-platform-tests/webrtc-encoded-transform/sframe-transform-worker.js: Renamed from LayoutTests/http/wpt/webrtc/sframe-transform.js.
- web-platform-tests/webrtc-encoded-transform/sframe-transform.html: Renamed from LayoutTests/http/wpt/webrtc/sframe-transform.html.
LayoutTests:
- http/wpt/webrtc/sframe-transform-readable-crash.html: Removed.
- platform/glib/TestExpectations:
- platform/ios-wk1/TestExpectations:
- platform/mac-wk1/TestExpectations:
- webrtc/script-transform.js: Removed.
- 2:03 AM Changeset in webkit [276241] by
-
- 3 edits in trunk/Source/WebCore
Enable GL_ANGLE_instanced_arrays WebGL extension in WPE
https://bugs.webkit.org/show_bug.cgi?id=224438
Reviewed by Darin Adler.
Tested by WebGL WPT.
- html/canvas/ANGLEInstancedArrays.cpp:
(WebCore::ANGLEInstancedArrays::supported):
- platform/graphics/opengl/ExtensionsGLOpenGLES.cpp:
(WebCore::ExtensionsGLOpenGLES::supportsExtension):
- 1:58 AM CSSContainment edited by
- (diff)
- 1:39 AM Changeset in webkit [276240] by
-
- 4 edits in trunk
[css-flexbox] Table layout disregards overriding height
https://bugs.webkit.org/show_bug.cgi?id=224665
Patch by Felipe Erias <Felipe Erias> on 2021-04-19
Reviewed by Sergio Villar Senin.
Source/WebCore:
Update table layout to take into account the overriding height set by the element's parent.
This was causing several WPT tests to fail.
- rendering/RenderTable.cpp:
(WebCore::RenderTable::layout):
During layout, set the computed height so that it is at least as large as the overriding height
provided by the element's parent (if any) minus the height that will be taken up by captions.
This additional height will be distributed among the table's sections so its total height matches
the overriding value.
LayoutTests:
- TestExpectations: Removed four WPT tests that now pass.
- 1:23 AM Changeset in webkit [276239] by
-
- 4 edits in trunk/Source/WebCore
[css-scroll-snap] Properly support fractional scroll steps in WebCore::ScrollAnimator::scroll
https://bugs.webkit.org/show_bug.cgi?id=224176
Reviewed by Simon Fraser.
Stop using the ScrollableArea's position to calculate scroll snap positions in ScrollAnimator::snap.
The position stored in ScrollAnimator is a floating point position, while the one stored in ScrollableArea
is an integer position. This currently isn't an issue, because all callers of ScrollAnimator::scroll
use integer scroll offsets, but this will allow this function to be used in the future for precise
scrolling delta.
No new tests. This doesn't change any behavior, since all callers currently use
integer scroll offsets, but a future change will make use of this fix.
- platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::scroll): Get the current scroll position from the ScrollAnimator,
which stores it in floating point. Also, only call into the scroll snap code if we actually
have scroll offsets.
(WebCore::ScrollAnimator::offsetFromPosition): Added this helper.
(WebCore::ScrollAnimator::positionFromOffset): Ditto.
(WebCore::ScrollAnimator::deltaFromStep): Return a delta instead of a position so this helper
can be used with offsets or positions.
(WebCore::ScrollAnimator::positionFromStep): Deleted.
- platform/ScrollAnimator.h:
- platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::scroll): Use the new helper.j
- 1:16 AM Changeset in webkit [276238] by
-
- 11 edits in trunk
[WPE][GTK] Enable AVIF decoder as experimental feature and unskip tests
https://bugs.webkit.org/show_bug.cgi?id=224663
Reviewed by Xabier Rodriguez-Calvar.
.:
Make the USE_AVIF option public and enable it as experimental feature.
- Source/cmake/OptionsGTK.cmake:
- Source/cmake/OptionsWPE.cmake:
Source/WebCore:
Refactor the AVIF build options out of the GTK port so they can be reused by other CMake ports.
- PlatformGTK.cmake:
- platform/ImageDecoders.cmake:
- platform/image-decoders/avif/AVIFImageDecoder.cpp:
- platform/image-decoders/avif/AVIFImageReader.cpp:
- platform/image-decoders/avif/AVIFUniquePtr.h:
LayoutTests:
- platform/gtk/TestExpectations: Unskip avif tests.
- 12:46 AM BuildingCairoOnWindows edited by
- (diff)
Apr 18, 2021:
- 11:57 PM Changeset in webkit [276237] by
-
- 5 edits1 delete in trunk/LayoutTests
[selectors] Update :focus-visible tests from WPT
https://bugs.webkit.org/show_bug.cgi?id=224601
<rdar://problem/76827947>
Reviewed by Darin Adler.
LayoutTests/imported/w3c:
Fix expectations that were broken due to a mistake in the previous commit.
The tests had some extra changes due to webkit.org/224658, the tests were modified but not the expectations.
- web-platform-tests/css/selectors/focus-visible-002-expected.txt:
- web-platform-tests/css/selectors/focus-visible-003-expected.txt:
- web-platform-tests/css/selectors/focus-visible-004-expected.txt:
LayoutTests:
Remove glib expectations as they match the main ones.
- platform/glib/imported/w3c/web-platform-tests/css/selectors/focus-visible-002-expected.txt: Removed.
- platform/glib/imported/w3c/web-platform-tests/css/selectors/focus-visible-003-expected.txt: Removed.
- platform/glib/imported/w3c/web-platform-tests/css/selectors/focus-visible-004-expected.txt: Removed.
- 11:32 PM Changeset in webkit [276236] by
-
- 4 edits2 adds in trunk
Selected image overlay text should never be visible
https://bugs.webkit.org/show_bug.cgi?id=224734
<rdar://problem/76806399>
Reviewed by Darin Adler.
Source/WebCore:
Make a slight adjustment to the UA stylesheet to ensure that image overlay text is never visible. See below for
more details.
Test: fast/images/image-extraction/image-overlay-with-selection-styles.html
- html/shadow/imageOverlay.css:
(div.image-overlay-text::selection):
Enforce selected text styles for image overlay text.
- rendering/RenderElement.cpp:
(WebCore::RenderElement::selectionPseudoStyle const):
Make an additional adjustment when computing selection pseudo styles for UA shadow root content. Currently, for
elements inside a UA shadow root, we always immediately ascend to the shadow host; this means that::selection
pseudo selectors currently don't work in UA stylesheets, since they're skipped when resolving styles, upon
painting selected text.
To fix this, we can let the element's own pseudo styles take precedence over the shadow host's renderer in the
case where we have a selection pseudo style. While we're here, also replace a few raw pointers withRefPtr.
LayoutTests:
Add a new layout test.
- fast/images/image-extraction/image-overlay-with-selection-styles-expected.html: Added.
- fast/images/image-extraction/image-overlay-with-selection-styles.html: Added.
- 11:13 PM Changeset in webkit [276235] by
-
- 17 edits in trunk
Support contain: layout
https://bugs.webkit.org/show_bug.cgi?id=223569
Patch by Rob Buis <rbuis@igalia.com> on 2021-04-18
Reviewed by Darin Adler.
Source/WebCore:
This patch implements layout containment as specified[1].
It adds shouldApplyLayoutContainment to check whether the
element applies for layout containment. Is so, then:
- an independent formatting context is established.
- any overflow is treated as ink overflow.
- an absolute positioning and fixed positioning
containing block is established.
- a stacking context is created.
- for baseline handling, the box is treated as having no
baseline. For grid/flexible box containers/items, this needs
a baseline synthesized from the border edges [2], for buttons it
requires a baseline synthesized from the margin edges [2, 3].
[1] https://drafts.csswg.org/css-contain-2/#layout-containment
[2] https://drafts.csswg.org/css-align-3/#synthesize-baseline
[3] https://www.w3.org/TR/CSS2/visudet.html#propdef-vertical-align
- rendering/RenderBlock.cpp:
(WebCore::RenderBlock::firstLineBaseline const):
(WebCore::RenderBlock::inlineBlockBaseline const):
- rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::firstLineBaseline const):
(WebCore::RenderBlockFlow::inlineBlockBaseline const):
- rendering/RenderBox.cpp:
(WebCore::RenderBox::createsNewFormattingContext const):
(WebCore::RenderBox::layoutOverflowRectForPropagation const):
- rendering/RenderBox.h:
- rendering/RenderButton.cpp:
(WebCore::RenderButton::baselinePosition const):
- rendering/RenderElement.h:
(WebCore::RenderElement::canContainFixedPositionObjects const):
(WebCore::RenderElement::canContainAbsolutelyPositionedObjects const):
- rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::firstLineBaseline const):
- rendering/RenderGrid.cpp:
(WebCore::RenderGrid::firstLineBaseline const):
- rendering/RenderListBox.cpp:
(WebCore::RenderListBox::baselinePosition const):
- rendering/RenderObject.cpp:
(WebCore::objectIsRelayoutBoundary):
(WebCore::shouldApplyLayoutContainment):
- rendering/RenderObject.h:
(WebCore::RenderObject::isAtomicInlineLevelBox const):
- rendering/RenderTable.cpp:
(WebCore::RenderTable::firstLineBaseline const):
- rendering/style/RenderStyle.h:
(WebCore::RenderStyle::containsLayout const):
- style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::adjust const):
LayoutTests:
Unskip tests that pass now.
- 7:43 PM Changeset in webkit [276234] by
-
- 2 edits in trunk/LayoutTests
[GLIB] Unreviewed test gardening. Marked css-transforms/animation/rotate-composition.html as failure after r276231.
- platform/glib/TestExpectations:
- 6:56 PM Changeset in webkit [276233] by
-
- 2 edits3 adds in trunk/LayoutTests
[WinCairo] Unreviewed test gardening
- platform/wincairo-wk1/http/tests/xmlhttprequest/redirect-cross-origin-post-expected.txt: Added.
- platform/wincairo-wk1/http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-expected.txt: Added.
- platform/wincairo/TestExpectations:
- 2:14 PM Changeset in webkit [276232] by
-
- 5 edits in trunk/Source/WebCore
GraphicsLayer::distributeOpacity, GraphicsLayer::setOpacityInternal and GraphicsLayer::accumulatedOpacity are never used
https://bugs.webkit.org/show_bug.cgi?id=224732
Reviewed by Darin Adler.
Remove dead code.
- platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::accumulatedOpacity const): Deleted.
(WebCore::GraphicsLayer::distributeOpacity): Deleted.
- platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::setOpacityInternal): Deleted.
- platform/graphics/ca/GraphicsLayerCA.cpp:
- platform/graphics/ca/GraphicsLayerCA.h:
- 11:12 AM Changeset in webkit [276231] by
-
- 9 edits in trunk
Fix interpolation of the rotate CSS property
https://bugs.webkit.org/show_bug.cgi?id=224730
Reviewed by Dean Jackson.
LayoutTests/imported/w3c:
Mark 123 WPT progressions.
- web-platform-tests/css/css-transforms/animation/rotate-composition-expected.txt:
- web-platform-tests/css/css-transforms/animation/rotate-interpolation-expected.txt:
- web-platform-tests/css/css-transforms/animation/transform-interpolation-001-expected.txt:
- web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt:
- web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt:
- web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:
Source/WebCore:
Implement the CSS Transforms spec about animating the rotateZ() function
for the simplified case where only the angle is interpolated.
- platform/graphics/transforms/RotateTransformOperation.cpp:
(WebCore::RotateTransformOperation::blend):
- 9:42 AM Changeset in webkit [276230] by
-
- 12 edits in trunk
Blob URLs should use for their owner origin for CSP checks
https://bugs.webkit.org/show_bug.cgi?id=224535
<rdar://76458106>
Reviewed by Alex Christensen.
Source/WebCore:
Before the patch, we were checking blob origin directly with ancestors.
As per https://w3c.github.io/webappsec-csp/#match-url-to-source-expression step 4.1,
we need to get the URL origin, which by spec is the origin of the blob creator.
We only do this for navigation loads as script loads should be kept the current way, as a cross-site scripting protection,
and to remain compatible with other browsers.
Make some refactoring to add helper routines to get origin and secure context state of blob URLs in BlobURL.
Make use of it in MixedContentChecker as a refactoring.
Make use of the helper routine in ContentSecurityPolicySource::matches to fix the bug.
Test: http/tests/security/frame-src-and-blob-download.https.html
- fileapi/BlobURL.cpp:
(WebCore::blobOwner):
(WebCore::BlobURL::getOriginURL):
(WebCore::BlobURL::isSecureBlobURL):
- fileapi/BlobURL.h:
- fileapi/ThreadableBlobRegistry.cpp:
(WebCore::isBlobURLContainsNullOrigin):
- loader/MixedContentChecker.cpp:
(WebCore::MixedContentChecker::isMixedContent):
- page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::isSecure):
- page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::urlMatchesSelf const):
- page/csp/ContentSecurityPolicy.h:
- page/csp/ContentSecurityPolicySourceList.cpp:
(WebCore::ContentSecurityPolicySourceList::matches const):
LayoutTests:
- http/tests/security/frame-src-and-blob-download.https-expected.txt: Added.
- http/tests/security/frame-src-and-blob-download.https.html:
- http/tests/security/resources/frame-src-and-blob-download-frame.html: Added.
- platform/mac-wk1/TestExpectations:
- platform/win/TestExpectations:
- 6:40 AM Changeset in webkit [276229] by
-
- 2 edits in trunk/Tools
Update name in contributors.json
https://bugs.webkit.org/show_bug.cgi?id=224731
Unreviewed.
- Scripts/webkitpy/common/config/contributors.json:
- 5:45 AM Changeset in webkit [276228] by
-
- 4 edits in trunk
The implicit aspect-ratio from width and height attributes with float value is not accurate enough
https://bugs.webkit.org/show_bug.cgi?id=224664
Reviewed by Darin Adler.
LayoutTests/imported/w3c:
The aspect ratio test case with width "0.8" and height "0.2" in img-aspect-ratio.html has passed. This patch doesn't change the behavior of
the original aspect ratio test case(assert_ratio(images[5], 133/106)) which is related to bug 206161.
- web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio-expected.txt:
Source/WebCore:
The width and height attributes should impact the aspect ratio only not the intrinsic size which should be from the content.
Since computeAspectRatioInformationForRenderBox doesn't change the intrinsic size now, so we can remove it from computePreferredLogicalWidths.
- rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computeIntrinsicRatioInformation const): Width and height attributes change intrinsicRatio only, not intrinsicSize.
(WebCore::RenderReplaced::computePreferredLogicalWidths): computeAspectRatioInformationForRenderBox doesn't change intrinsicSize now, so we can remove this.
- 1:35 AM Changeset in webkit [276227] by
-
- 2 edits in trunk/Source/JavaScriptCore
Unreviewed, build fix
https://bugs.webkit.org/show_bug.cgi?id=224715
- dfg/DFGDesiredWatchpoints.h:
- 1:06 AM Changeset in webkit [276226] by
-
- 18 edits in trunk/Source/JavaScriptCore
[JSC] Do not use Bag<> for DFG / FTL watchpoints
https://bugs.webkit.org/show_bug.cgi?id=224715
Reviewed by Darin Adler.
While Bag<> is useful since its allocated memory will not be moved,
this is really memory-inefficient data structure. Each entry gets a
tail pointer (so adding 8 bytes) and we allocate each entry separately.
In DFG and FTL, we are using Bag<> for watchpoints. But this is not necessary actually: thanks to
concurrent compilers, our watchpoint registration is batched at the end of compilation. This means
that we have a way to know how many watchpoints we should register at that point.
In this patch, we introduce WatchpointCollector. In DesiredGlobalProperties, we run reallyAdd twice
with WatchpointCollector. First time, we just count # of watchpoints. Then we allocate FixedVector<XXXWatchpoint>
and install them. Since we do not (cannot) grow this fixed vector, watchpoint's address will not be changed as required.
We also move DesiredGlobalProperties under DesiredWatchpoints since this basically registers watchpoints.
- bytecode/AdaptiveInferredPropertyValueWatchpointBase.cpp:
(JSC::AdaptiveInferredPropertyValueWatchpointBase::AdaptiveInferredPropertyValueWatchpointBase):
(JSC::AdaptiveInferredPropertyValueWatchpointBase::initialize):
- bytecode/AdaptiveInferredPropertyValueWatchpointBase.h:
- bytecode/CodeBlockJettisoningWatchpoint.h:
- dfg/DFGAdaptiveInferredPropertyValueWatchpoint.cpp:
(JSC::DFG::AdaptiveInferredPropertyValueWatchpoint::AdaptiveInferredPropertyValueWatchpoint):
(JSC::DFG::AdaptiveInferredPropertyValueWatchpoint::initialize):
- dfg/DFGAdaptiveInferredPropertyValueWatchpoint.h:
- dfg/DFGAdaptiveStructureWatchpoint.cpp:
(JSC::DFG::AdaptiveStructureWatchpoint::AdaptiveStructureWatchpoint):
(JSC::DFG::AdaptiveStructureWatchpoint::initialize):
- dfg/DFGAdaptiveStructureWatchpoint.h:
- dfg/DFGCommonData.cpp:
(JSC::DFG::CommonData::validateReferences):
(JSC::DFG::CommonData::clearWatchpoints):
- dfg/DFGCommonData.h:
- dfg/DFGDesiredGlobalProperties.cpp:
(JSC::DFG::DesiredGlobalProperties::reallyAdd):
- dfg/DFGDesiredGlobalProperties.h:
- dfg/DFGDesiredWatchpoints.cpp:
(JSC::DFG::ArrayBufferViewWatchpointAdaptor::add):
(JSC::DFG::SymbolTableAdaptor::add):
(JSC::DFG::FunctionExecutableAdaptor::add):
(JSC::DFG::AdaptiveStructureWatchpointAdaptor::add):
(JSC::DFG::DesiredWatchpoints::addLazily):
(JSC::DFG::DesiredWatchpoints::reallyAdd):
(JSC::DFG::DesiredWatchpoints::areStillValidOnMainThread):
(JSC::DFG::WatchpointCollector::finalize):
- dfg/DFGDesiredWatchpoints.h:
(JSC::DFG::SetPointerAdaptor::add):
(JSC::DFG::GenericDesiredWatchpoints::reallyAdd):
- dfg/DFGGraph.cpp:
(JSC::DFG::Graph::watchGlobalProperty):
- dfg/DFGGraph.h:
- dfg/DFGPlan.cpp:
(JSC::DFG::Plan::reallyAdd):
(JSC::DFG::Plan::isStillValidOnMainThread):
(JSC::DFG::Plan::cancel):
- dfg/DFGPlan.h:
(JSC::DFG::Plan::transitions):
(JSC::DFG::Plan::globalProperties): Deleted.
- 12:43 AM Changeset in webkit [276225] by
-
- 2 edits in trunk/Source/WebCore
Use binary-search in LocaleToScriptMapping
https://bugs.webkit.org/show_bug.cgi?id=224727
Reviewed by Darin Adler.
This patch removes HashMaps in LocaleToScriptMapping, and binary-search onto the constant data arrays.
These maps are not frequently used. Keys of the maps can be encoded into uint32_t or uint64_t so that
comparison becomes super cheap and we can initialize this array at compile-time.
We introduce ScriptName(uint32_t) and LocaleName(uint64_t) instead of String. And ues it and generate
sorted constant data array for mappings. We use binary-search to look entry up. Since # of entries are
not huge (~200), comparisons are extremely cheap (uint32_t / uint64_t comparison), and this is not a
hot code, we can just use binary-search here and eliminate HashMaps' memory allocation.
- platform/text/LocaleToScriptMapping.cpp:
(WebCore::PackedASCIILowerCodes::PackedASCIILowerCodes):
(WebCore::PackedASCIILowerCodes::parse):
(WebCore::PackedASCIILowerCodes::operator==):
(WebCore::PackedASCIILowerCodes::operator!=):
(WebCore::PackedASCIILowerCodes::operator<):
(WebCore::PackedASCIILowerCodes::operator<=):
(WebCore::PackedASCIILowerCodes::operator>):
(WebCore::PackedASCIILowerCodes::operator>=):
(WebCore::PackedASCIILowerCodes::value const):
(WebCore::scriptNameToCode):
(WebCore::localeToScriptCodeForFontSelection):
- 12:14 AM Changeset in webkit [276224] by
-
- 18 edits in trunk/Source/JavaScriptCore
[JSC] Make more DFG/FTL data FixedVector/Vector
https://bugs.webkit.org/show_bug.cgi?id=224713
Reviewed by Darin Adler.
- DFG::JITCode::m_osrEntry / DFG::JITCode::m_osrExit / DFG::JITCode::m_speculationRecovery are changed to FixedVector. They are added at compiling time, and after that, these vectors are not modified. So when finalizing, we can easily make it FixedVector. We also change OSREntry::{m_reshufflings,m_expectedValues} to FixedVector and FixedOperands.
- FTL::JITCode::m_osrExit is changed from SegmentedVector to Vector. We are still using Vector since it also involves osrExitDescriptor. But later, we should merge m_osrExit to osrExitDescriptor. Vector is still better than SegmentedVector since it wastes several entries per segment. SegmentedVector was used to use a direct pointer of OSRExit (this is not possible in Vector since this pointer can be invalidated after growing), but usage of that is fairly limited so that we can just replace them with m_index + osrExit vector.
- bytecode/CodeBlock.cpp:
(JSC::CodeBlock::tallyFrequentExitSites):
- bytecode/Operands.h:
(JSC::Operands::Operands):
- dfg/DFGJITCode.cpp:
(JSC::DFG::JITCode::shrinkToFit):
(JSC::DFG::JITCode::liveRegistersToPreserveAtExceptionHandlingCallSite):
(JSC::DFG::JITCode::validateReferences):
(JSC::DFG::JITCode::findPC):
(JSC::DFG::JITCode::finalizeOSREntrypoints):
- dfg/DFGJITCode.h:
- dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::linkOSRExits):
(JSC::DFG::JITCompiler::link):
(JSC::DFG::JITCompiler::noticeOSREntry):
(JSC::DFG::JITCompiler::appendExceptionHandlingOSRExit):
- dfg/DFGJITCompiler.h:
(JSC::DFG::JITCompiler::appendOSRExit):
(JSC::DFG::JITCompiler::appendSpeculationRecovery):
- dfg/DFGOSREntry.h:
- dfg/DFGOSRExit.cpp:
(JSC::DFG::JSC_DEFINE_JIT_OPERATION):
- dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::speculationCheck):
(JSC::DFG::SpeculativeJIT::emitInvalidationPoint):
(JSC::DFG::SpeculativeJIT::linkOSREntries):
- ftl/FTLJITCode.cpp:
(JSC::FTL::JITCode::shrinkToFit):
(JSC::FTL::JITCode::validateReferences):
(JSC::FTL::JITCode::liveRegistersToPreserveAtExceptionHandlingCallSite):
(JSC::FTL::JITCode::findPC):
- ftl/FTLJITCode.h:
- ftl/FTLOSRExit.cpp:
(JSC::FTL::OSRExitDescriptor::prepareOSRExitHandle):
(JSC::FTL::OSRExit::OSRExit):
- ftl/FTLOSRExit.h:
- ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::JSC_DEFINE_JIT_OPERATION):
- ftl/FTLOSRExitHandle.cpp:
(JSC::FTL::OSRExitHandle::emitExitThunk):
- ftl/FTLOSRExitHandle.h:
(JSC::FTL::OSRExitHandle::OSRExitHandle):
- ftl/FTLPatchpointExceptionHandle.cpp:
(JSC::FTL::PatchpointExceptionHandle::scheduleExitCreationForUnwind):
- 12:10 AM Changeset in webkit [276223] by
-
- 3 edits in trunk/Source/WebKit
Update LibWebRTCCodecsProxy to use a Lock
https://bugs.webkit.org/show_bug.cgi?id=224728
Reviewed by Darin Adler.
Update LibWebRTCCodecsProxy to use a Lock, instead of a std::atomic<bool> that
has to be kept up to date. I think this simplifies the code a bit. Adding / Removing
encoder / decoder is not very hot code as far as I know and there will very rarely
be contention since allowsExitUnderMemoryPressure() is only called on memory pressure.
m_encoder / m_decoder are still always modified from the background thread. However, we
now check from the main thread if they are empty by locking.
- GPUProcess/webrtc/LibWebRTCCodecsProxy.h:
- GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:
(WebKit::LibWebRTCCodecsProxy::close):
(WebKit::LibWebRTCCodecsProxy::createH264Decoder):
(WebKit::LibWebRTCCodecsProxy::createH265Decoder):
(WebKit::LibWebRTCCodecsProxy::createVP9Decoder):
(WebKit::LibWebRTCCodecsProxy::releaseDecoder):
(WebKit::LibWebRTCCodecsProxy::decodeFrame):
(WebKit::LibWebRTCCodecsProxy::setFrameSize):
(WebKit::LibWebRTCCodecsProxy::createEncoder):
(WebKit::LibWebRTCCodecsProxy::releaseEncoder):
(WebKit::LibWebRTCCodecsProxy::initializeEncoder):
(WebKit::LibWebRTCCodecsProxy::encodeFrame):
(WebKit::LibWebRTCCodecsProxy::setEncodeRates):
(WebKit::LibWebRTCCodecsProxy::allowsExitUnderMemoryPressure const):
(WebKit::LibWebRTCCodecsProxy::updateHasEncodersOrDecoders): Deleted.