зеркало из https://github.com/mozilla/gecko-dev.git
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
54a0194045
This patch does basically throttle animations on visibility:hidden element and unthrottle it once the animating element became visible or a child of the animating element became visible. But still there are some cases that we don't throttle such animations perfectly. For example; div.style.visibility = 'hidden'; // the 'div' has no children at this moment div.animate(..); // The animation is throttled div.appendChild(visibleChild); // The animation isn't throttled visibleChild.style.visibility = 'hidden'; // Now the animation should be throttled again, but actually it's not. To throttle this case properly, when the |visibleChild|'s visibility changed to hidden, we would need to do either 1) Check all siblings of the |visibleChild| have no visible children or 2) The parent element stores visible children count somewhere and decrease it and check whether the count is zero To achieve 1) we need to walk up ancestors and their siblings, actually it's inefficient. 2) is somewhat similar to what we already do for animating images but it's hard to reuse it for CSS animations since it does not take into account that descendants' visibilities. Another example that this patch does not optimize is the the case where animating element has children whose visibility is inherited and the element itself initially visible something like this; let child = document.createElement('div'); // child visibility is 'inherit' div.appendChild(child); div.animate(..); // the 'div' is visible // The animation isn't throttled since the animating element is visible div.style.visiblily = 'hidden'; // Now the animation should be throttled, but it's not since this patch does // not descend down all descendants to check they are invisible or not when the // animating element visibility changed to hidden. This patch adds a test case for this case introduced with todo_is(). Another test case added in this patch fails if we don't use nsPlaceholderFrame::GetRealFrameFor() in HasNoVisibleDescendants(). MozReview-Commit-ID: BJwzQvP9Yc4 --HG-- extra : rebase_source : e56505706bb2799b59bbfb3bbcce4a9ce86892f4 |
||
---|---|---|
.cargo | ||
.vscode | ||
accessible | ||
browser | ||
build | ||
caps | ||
chrome | ||
config | ||
db | ||
devtools | ||
docshell | ||
dom | ||
editor | ||
embedding | ||
extensions | ||
gfx | ||
gradle/wrapper | ||
hal | ||
image | ||
intl | ||
ipc | ||
js | ||
layout | ||
media | ||
memory | ||
mfbt | ||
mobile | ||
modules | ||
mozglue | ||
netwerk | ||
nsprpub | ||
other-licenses | ||
parser | ||
python | ||
rdf | ||
security | ||
services | ||
servo | ||
startupcache | ||
storage | ||
taskcluster | ||
testing | ||
third_party | ||
toolkit | ||
tools | ||
uriloader | ||
view | ||
widget | ||
xpcom | ||
xpfe | ||
.arcconfig | ||
.clang-format | ||
.clang-format-ignore | ||
.cron.yml | ||
.eslintignore | ||
.eslintrc.js | ||
.flake8 | ||
.gdbinit | ||
.gdbinit_python | ||
.gitignore | ||
.hgignore | ||
.hgtags | ||
.inferconfig | ||
.lldbinit | ||
.mailmap | ||
.taskcluster.yml | ||
.yamllint | ||
.ycm_extra_conf.py | ||
AUTHORS | ||
CLOBBER | ||
GNUmakefile | ||
LEGAL | ||
LICENSE | ||
Makefile.in | ||
README.txt | ||
aclocal.m4 | ||
build.gradle | ||
client.mk | ||
client.py | ||
configure.in | ||
configure.py | ||
gradle.properties | ||
gradlew | ||
mach | ||
moz.build | ||
moz.configure | ||
mozilla-config.h.in | ||
npm-shrinkwrap.json | ||
old-configure.in | ||
package.json | ||
settings.gradle | ||
test.mozbuild |
README.txt
An explanation of the Mozilla Source Code Directory Structure and links to project pages with documentation can be found at: https://developer.mozilla.org/en/Mozilla_Source_Code_Directory_Structure For information on how to build Mozilla from the source code, see: https://developer.mozilla.org/en/docs/Build_Documentation To have your bug fix / feature added to Mozilla, you should create a patch and submit it to Bugzilla (https://bugzilla.mozilla.org). Instructions are at: https://developer.mozilla.org/en/docs/Creating_a_patch https://developer.mozilla.org/en/docs/Getting_your_patch_in_the_tree If you have a question about developing Mozilla, and can't find the solution on https://developer.mozilla.org, you can try asking your question in a mozilla.* Usenet group, or on IRC at irc.mozilla.org. [The Mozilla news groups are accessible on Google Groups, or news.mozilla.org with a NNTP reader.] You can download nightly development builds from the Mozilla FTP server. Keep in mind that nightly builds, which are used by Mozilla developers for testing, may be buggy. Firefox nightlies, for example, can be found at: https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/ - or - https://nightly.mozilla.org/