Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Go to file
Daniil Sakhapov 7e2c0ee756 Bug 1894886 [wpt PR 46054] - Rewrite counters implementation to no cache approach, a=testonly
Automatic update from web-platform-tests
Rewrite counters implementation to no cache approach

This CL removes the old counters implementation that was building
and maintaining a cache of counters (building counters tree).
The removal is due to the following reasons:
1) It didn't support Shadow DOM and there was no way to fix it;
2) It didn't work correctly with style containment and there was
no way to fix it;
3) It was slow and complicated;
4) It was wrong in many cases.

The new approach doesn't build any cache of counters, instead it
visits every element on the very first AttachLayoutTree for the
document and gathers on the fly all the information it needs to
correctly calculate the counters values. It means that we don't
have any overhead due to some additional traversals to build the
counters cache on the first go.
So, all the pages with static (created once and not changed) counters
would render faster.
If there are some counter changes after the first AttachLayoutTree,
we would remember it and then recalculate all counters by doing a full
tree traversal, calculating correct counters values and only update
LayoutCounters created with counter() and counters() functions.

Performance tests held on 300'000 elements with various layouts and
various style updates/element insertions/removals show that doing
such full tree traversal for counter updates doesn't introduce any
noticeable overhead with other browsers (should be noticed that old
implementation could also do full tree traversal in some cases).

For pages with static counters performance for initial document render
is improved around 10 times against the old implementation.

Bug: 990657
Change-Id: I292d3749ad0bf480e88d815e9dbecebe9edc7067
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5483870
Commit-Queue: Daniil Sakhapov <sakhapov@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1298057}

--

wpt-commits: 90cf6d3b851589dea99c460f0aa5e3e9b58f3bbe
wpt-pr: 46054
2024-05-14 07:22:30 +00:00
.cargo Bug 1895888 - Vendor fully-implemented Rust relevancy component r=bdk 2024-05-09 19:56:58 +00:00
.github/workflows
.vscode
accessible Bug 1892372: Make HTML progress elements expose the readonly a11y state. r=eeejay 2024-05-13 09:17:24 +00:00
browser no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE 2024-05-14 07:02:22 +00:00
build Bug 1878764 - Update builders to rustc 1.78. r=firefox-build-system-reviewers,sergesanspaille 2024-05-14 07:10:44 +00:00
caps Bug 1892481 - More consistently enforce noscript and builtinclass in xpidl, r=xpcom-reviewers,necko-reviewers,valentin,media-playback-reviewers,mccr8,padenot 2024-04-22 18:19:58 +00:00
chrome Bug 1864896: Autofix unused function arguments (general). r=nika,jfkthame,ckerschb 2024-03-19 14:59:22 +00:00
config Bug 1894110 - Graceful failure path for soundtouch sandbox creation failure r=glandium,media-playback-reviewers,padenot 2024-05-13 20:40:24 +00:00
devtools Bug 1844446 - [devtools] Don't use desugared selectors for selector highlighter. r=devtools-reviewers,bomsy. 2024-05-14 06:19:43 +00:00
docs Bug 1893269 - Build out basic infrastructure for backup management UI. r=backup-reviewers,settings-reviewers,firefox-desktop-core-reviewers ,Gijs,fluent-reviewers,kpatenio 2024-05-09 21:34:35 +00:00
docshell Bug 1895229 - Remove nsIWebBrowserChromeFocus. r=hsivonen,dom-core 2024-05-06 11:30:34 +00:00
dom Backed out changeset afa417babef9 (bug 1842478) for causing mochitests failures in test_transitions_per_property.html. CLOSED TREE 2024-05-14 08:00:39 +03:00
editor Bug 1877513 - Make HTMLEditor deletes only preceding lines of right child block if the range starts from start of a line r=m_kato 2024-04-27 00:36:26 +00:00
extensions Bug 1851535 - Remove dead arguments for switching LDAP versions. r=mkaply 2024-05-08 22:48:53 +00:00
gfx Backed out changeset afa417babef9 (bug 1842478) for causing mochitests failures in test_transitions_per_property.html. CLOSED TREE 2024-05-14 08:00:39 +03:00
gradle/wrapper Bug 1881094 - 7. cleanup firefox-android exclusions in license.yml r=gl,android-reviewers 2024-05-09 16:28:42 +00:00
hal
image Backed out 4 changesets (bug 1890216) for causing multiple new permafailures. CLOSED TREE 2024-05-10 19:01:50 +03:00
intl Bug 1894551 - remove old win/aarch64 references in gtest moz.build files. r=RyanVM,necko-reviewers 2024-05-02 12:17:06 +00:00
ipc Backed out 3 changesets (bug 1880503) for causing build bustages in nsCOMPtr.h. CLOSED TREE 2024-05-13 21:08:49 +03:00
js Bug 1891422 - Check if debugEnabled for top frame when unwinding. r=jseward 2024-05-13 23:12:59 +00:00
layout Backed out changeset afa417babef9 (bug 1842478) for causing mochitests failures in test_transitions_per_property.html. CLOSED TREE 2024-05-14 08:00:39 +03:00
media Bug 1895635 - Import mac/arm64 sources for libaom r=media-playback-reviewers,padenot 2024-05-14 00:56:41 +00:00
memory Bug 1894551 - remove old win/aarch64 references in gtest moz.build files. r=RyanVM,necko-reviewers 2024-05-02 12:17:06 +00:00
mfbt Bug 1404972 - To Result add operator==. r=glandium 2024-05-06 19:54:00 +00:00
mobile Bug 1885410 - Update inputConnection_multiple_commitText_into_batchEdit to fix failure. r=geckoview-reviewers,owlish 2024-05-14 06:03:05 +00:00
modules Backed out changeset afa417babef9 (bug 1842478) for causing mochitests failures in test_transitions_per_property.html. CLOSED TREE 2024-05-14 08:00:39 +03:00
mozglue Bug 1878764 - Update builders to rustc 1.78. r=firefox-build-system-reviewers,sergesanspaille 2024-05-14 07:10:44 +00:00
netwerk Backed out changeset 10479ec2f64e (bug 1853497) for causing process crashes in libresolv.so. 2024-05-13 20:41:21 +03:00
nsprpub Bug 1879120 - Remove all python deprecation warning: invalid escape sequence r=ahochheiden,webdriver-reviewers,perftest-reviewers,afinder UPGRADE_NSPR_RELEASE 2024-02-26 08:26:38 +00:00
other-licenses Bug 1895492: update InetBgDL.dll nsis plugin r=nalexander,jcristau 2024-05-13 15:14:35 +00:00
parser Bug 1893683 - Remove ns{A,C}String and other xpcom dependencies from nsStringBuffer. r=smaug,media-playback-reviewers,karlt 2024-05-09 08:34:35 +00:00
python Bug 1895621 - Update Android bundletool to version 1.16.0. r=geckoview-reviewers,owlish 2024-05-13 20:37:00 +00:00
remote Bug 1875065 - [bidi] Implement "permissions.setPermission" command. r=webdriver-reviewers,jdescottes,whimboo 2024-05-08 16:50:30 +00:00
security Bug 1895429 - Allow getcwd (making it fail) in all sandboxed processes. r=jld 2024-05-14 05:34:19 +00:00
services Merge mozilla-central to autoland a=merge CLOSED TREE 2024-05-13 19:17:57 +03:00
servo Backed out changeset afa417babef9 (bug 1842478) for causing mochitests failures in test_transitions_per_property.html. CLOSED TREE 2024-05-14 08:00:39 +03:00
startupcache Bug 1882581: Implement @scope parsing. r=firefox-style-system-reviewers,saschanaz,emilio 2024-03-19 13:36:48 +00:00
storage Bug 1893683 - Remove ns{A,C}String and other xpcom dependencies from nsStringBuffer. r=smaug,media-playback-reviewers,karlt 2024-05-09 08:34:35 +00:00
supply-chain Bug 1869512 - Update unic-langid and unic-langid-impl to 0.9.5. r=nordzilla,supply-chain-reviewers 2024-05-13 19:05:04 +00:00
taskcluster Bug 1878764 - Update builders to rustc 1.78. r=firefox-build-system-reviewers,sergesanspaille 2024-05-14 07:10:44 +00:00
testing Bug 1894886 [wpt PR 46054] - Rewrite counters implementation to no cache approach, a=testonly 2024-05-14 07:22:30 +00:00
third_party Bug 1869512 - Update unic-langid and unic-langid-impl to 0.9.5. r=nordzilla,supply-chain-reviewers 2024-05-13 19:05:04 +00:00
toolkit Bug 1895415 - Remove TestBCryptFallback. r=yjuglaret 2024-05-14 06:56:25 +00:00
tools Bug 1849075 - Update builders to clang 18. r=firefox-build-system-reviewers,sergesanspaille 2024-05-14 07:10:43 +00:00
uriloader Backed out changeset 4b7fe66103e5 (bug 1891234) for causing multiple failures CLOSED TREE 2024-05-06 22:28:08 +03:00
view Bug 1895928 - PresShell::ScheduleViewManagerFlush shouldn't set the layout flush bit. r=smaug 2024-05-10 08:08:42 +00:00
widget Backed out changeset 1c48635919fb (bug 1879425) for causing build bustages. CLOSED TREE 2024-05-14 04:55:08 +03:00
xpcom Bug 1678386, part 2 - Inline nsXPTMethodInfo::GetParam(). r=xpcom-reviewers,emilio 2024-05-13 19:37:18 +00:00
xpfe/appshell Bug 1787382 - Remove resolutionchange events firing r=win-reviewers,cmartin 2024-05-09 14:37:04 +00:00
.arcconfig
.babel-eslint.rc.js
.clang-format
.clang-format-ignore Bug 1889978 - Vendor ffmpeg 7.0 headers. r=media-playback-reviewers,frontend-codestyle-reviewers,alwu 2024-04-30 14:21:45 +00:00
.cron.yml Bug 1890373 - Enable android-l10n-sync via cron on mozilla-beta r=hneiva,gabriel 2024-04-15 18:07:57 +00:00
.eslintignore Bug 1864255. Move crashtests that leave window(s) open to the very end. r=dholbert,frontend-codestyle-reviewers 2024-04-21 21:37:49 +00:00
.eslintrc-test-paths.js Bug 1876432 - Added support for custom themes as its own menu in Reader View. r=reader-mode-reviewers,fluent-reviewers,desktop-theme-reviewers,hjones,accessibility-frontend-reviewers,bolsson,devtools-reviewers,sfoster,cmkm,jules,ayeddi 2024-04-02 00:08:46 +00:00
.eslintrc.js Bug 1891982 - Part 1: Copy Top Sites Feed into the Top Sites component - r=dao,frontend-codestyle-reviewers,Standard8 2024-04-23 18:32:30 +00:00
.git-blame-ignore-revs Bug 1882465 - Update .hg-annotate-ignore-revs and .git-blame-ignore-revs to reflect firefox-android monorepo migration r=glandium,geckoview-reviewers,tthibaud 2024-04-04 14:55:00 +00:00
.gitattributes
.gitignore Bug 1894617: ignore the root .vscode directory too; r=sheehan 2024-05-02 18:26:11 +00:00
.hg-annotate-ignore-revs Bug 1882465 - Update .hg-annotate-ignore-revs and .git-blame-ignore-revs to reflect firefox-android monorepo migration r=glandium,geckoview-reviewers,tthibaud 2024-04-04 14:55:00 +00:00
.hg-format-source
.hgignore Bug 1894619 - Remove the invalid regex escape sequences in .hgignore. r=sheehan 2024-05-02 18:28:22 +00:00
.hgtags No bug - tagging 41e8bcefc0ec9c22e3dfe0dbc8dd122cfe6316f8 with FIREFOX_NIGHTLY_127_END a=release DONTBUILD CLOSED TREE 2024-05-13 15:05:44 +00:00
.lando.ini Bug 1871425: re-enable autoformatting after disabling WPT linter r=zeid DONTBUILD 2024-02-29 21:22:27 +00:00
.lldbinit
.mailmap Bug 1892339 - Add my name to .mailmap r=nika 2024-04-19 13:42:34 +00:00
.prettierignore Bug 1881094 - 4. remove and revise prettier exclusions for firefox-android r=android-reviewers,frontend-codestyle-reviewers,gl,webcompat-reviewers,twisniewski 2024-05-07 20:24:38 +00:00
.prettierrc.js
.stylelintignore Bug 1881094 - 5. remove stylelint exclusions for firefox-android r=android-reviewers,frontend-codestyle-reviewers,gl 2024-05-02 18:38:36 +00:00
.stylelintrc.js
.taskcluster.yml
.trackerignore
.yamllint
.ycm_extra_conf.py
aclocal.m4 Bug 1881545 - Move nl_langinfo and CODESET check from js/src/old-configure.in to js/moz.configure r=glandium 2024-02-28 11:11:18 +00:00
AUTHORS
build.gradle Bug 1892641 - include timestamps in BUILDSTATUS lines from gradle, r=glandium. 2024-04-30 08:17:13 +00:00
Cargo.lock Bug 1895415 - Remove TestBCryptFallback. r=yjuglaret 2024-05-14 06:56:25 +00:00
Cargo.toml Bug 1895888 - Vendor fully-implemented Rust relevancy component r=bdk 2024-05-09 19:56:58 +00:00
client.mk
client.py
CLOBBER Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2024-05-13 15:05:55 +00:00
configure
configure.py
GNUmakefile
gradle.properties Bug 1881094 - 7. cleanup firefox-android exclusions in license.yml r=gl,android-reviewers 2024-05-09 16:28:42 +00:00
gradlew
gradlew.bat
LICENSE
mach
mach.cmd
mach.ps1
Makefile.in
mots.yaml no bug: update timestamp in mots.yaml r=sheehan DONTBUILD 2024-05-10 17:07:02 +00:00
moz.build Bug 1888321 - Rename .cargo/config.in to .cargo/config.toml.in. r=firefox-build-system-reviewers,webdriver-reviewers,ahochheiden 2024-04-01 21:26:49 +00:00
moz.configure Bug 1880424 - Move clock_monotonic check to moz.configure r=glandium 2024-02-28 11:11:17 +00:00
mozilla-config.h.in
old-configure.in Bug 1892005 - Move MOZ_LINUX_32_SSE2_STARTUP_ERROR env check to moz.configure r=glandium 2024-05-03 05:57:52 +00:00
package-lock.json Bug 1557040 - Remove eslint-plugin-fetch-options from the tree. r=Gijs,omc-reviewers,aminomancer,home-newtab-reviewers,frontend-codestyle-reviewers,thecount 2024-04-09 08:11:10 +00:00
package.json Bug 1557040 - Remove eslint-plugin-fetch-options from the tree. r=Gijs,omc-reviewers,aminomancer,home-newtab-reviewers,frontend-codestyle-reviewers,thecount 2024-04-09 08:11:10 +00:00
pyproject.toml Bug 1879558 - Reactivate invalid escape sequence warning in ruff r=ahochheiden 2024-02-28 08:16:06 +00:00
README.txt
settings.gradle Bug 1895781 - Move the App Services and Glean auto-publish logic to its own settings file. r=nalexander 2024-05-10 06:21:28 +00:00
substitute-local-geckoview.gradle
test.mozbuild

An explanation of the Firefox Source Code Directory Structure and links to
project pages with documentation can be found at:

    https://firefox-source-docs.mozilla.org/contributing/directory_structure.html

For information on how to build Firefox from the source code and create the patch see:

    https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html

If you have a question about developing Firefox, and can't find the solution
on https://firefox-source-docs.mozilla.org/, you can try asking your question on Matrix at chat.mozilla.org in `Introduction` (https://chat.mozilla.org/#/room/#introduction:mozilla.org) channel.


Nightly development builds can be downloaded from:

    https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/
            - or -
    https://www.mozilla.org/firefox/channel/desktop/#nightly

Keep in mind that nightly builds, which are used by Firefox developers for
testing, may be buggy.