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
Перейти к файлу
Hiroyuki Ikezoe 54a0194045 Bug 1237454 - Throttle animations on visibility:hidden element. r=birtles,boris,emilio
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
2018-02-09 10:43:10 +09:00
.cargo Bug 1426116 - Update for changes in WR PR 2251. r=jrmuizel 2018-01-08 09:19:27 -05:00
.vscode Bug 1423565 - Update tasks.json as per documentation. r=rillian 2017-12-06 14:59:35 +01:00
accessible merge mozilla-central to autoland. CLOSED TREE 2018-02-10 00:34:30 +02:00
browser Merge inbound to mozilla-central. a=merge 2018-02-13 00:08:37 +02:00
build Backed out 2 changesets (bug 1437201) for Android build bustage on a CLOSED TREE 2018-02-10 02:40:11 +02:00
caps Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
chrome Bug 1230369 - Manually fix some remaining instances of Ci/Cc/Cu definitions and switch Components.* to using the shorthand in some places. r=florian 2018-02-07 09:24:15 +00:00
config Bug 1435424 - Remove doxygen support from the build system. r=gps 2018-02-02 14:24:18 -08:00
db Bug 1432269 - Upgrade to SQLite 3.22.0. r=mak 2018-01-31 09:41:50 -05:00
devtools Bug 1430919 - Enable grid highlighter writing mode support. r=gl 2018-02-12 12:49:22 -06:00
docshell Bug 1435296 Address test failures caused by bumping timer precision to 2 ms r=baku 2018-02-12 11:39:41 -06:00
dom Bug 1237454 - Throttle animations on visibility:hidden element. r=birtles,boris,emilio 2018-02-09 10:43:10 +09:00
editor Bug 1436663 - EditorBase::JoinNodeDeep() should set result after actually joining the nodes r=m_kato 2018-02-08 16:17:24 +09:00
embedding Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian 2018-01-29 15:20:18 -08:00
extensions Bug 1435924 - Part 1: Switch from nsSubstring.h to nsAString.h. r=dbaron 2018-02-05 17:36:32 -08:00
gfx Merge inbound to mozilla-central. a=merge 2018-02-13 00:08:37 +02:00
gradle/wrapper Backed out 20 changesets (bug 1411654) for incorrect android:debuggable. r=nalexander, a=RyanVM 2018-01-17 15:55:38 -05:00
hal Bug 1423552: Use BaseRect access methods instead of member variables in hal/ r=gsvelto 2018-01-10 11:17:58 -05:00
image Bug 1432375 - Part 2. Images decoded into an SourceSurfaceSharedData should be shared immediately. r=nical 2018-02-12 07:59:58 -05:00
intl Bug 1437427 - Workaround promise/microtask bug with a callback in Fluent runtime. r=Pike 2018-02-12 10:30:46 -08:00
ipc Backed out changeset e68169412c0b (bug 1431404) for failing mochitest browser chrome at browser/base/content/test/general/browser_datachoices_notification.js on a CLOSED TREE 2018-02-13 03:28:44 +02:00
js Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-02-13 00:12:21 +02:00
layout Bug 1237454 - Throttle animations on visibility:hidden element. r=birtles,boris,emilio 2018-02-09 10:43:10 +09:00
media Merge inbound to mozilla-central. a=merge 2018-02-10 11:57:47 +02:00
memory Bug 1436541 - Don't clobber the thread-local arenas when we happen to hit a large allocation. r=glandium 2018-02-07 18:17:48 -08:00
mfbt Bug 1435484 - Split the integer-overflow blacklist into two blacklists, one for signed integer overflow and one for unsigned integer overflow, and rename both configure flags to be clearer. r=decoder, r=froydnj 2018-02-02 21:25:31 -08:00
mobile Bug 1437388 - Don't set different session store write interval while in background. r=esawin 2018-02-11 19:43:16 +01:00
modules Merge inbound to mozilla-central. a=merge 2018-02-13 00:08:37 +02:00
mozglue Bug 1407693 - Part 2 - when a child process crashes, write extra annotation data to a pre-opened file descriptor instead of creating a new file; r=gsvelto,rbarker 2017-11-27 14:37:34 -06:00
netwerk Merge inbound to mozilla-central. a=merge 2018-02-13 00:08:37 +02:00
nsprpub Bug 1420407, uplift NSPR_4_18_RTM, no code change, only version number. Require version 4.18 for building. r=me 2018-01-18 14:02:42 +01:00
other-licenses Backed out 5 changesets (bug 1418425) requested per comment #83. on a CLOSED TREE 2018-01-15 15:30:30 +02:00
parser Bug 1436508 part 14. Remove nsIDOMMutationEvent. r=masayuki 2018-02-09 11:17:10 -05:00
python Backed out 2 changesets (bug 1437182) for gecko decision task failure 2018-02-13 03:55:56 +02:00
rdf Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
security Merge inbound to mozilla-central. a=merge 2018-02-13 00:08:37 +02:00
services Merge inbound to mozilla-central. a=merge 2018-02-13 00:08:37 +02:00
servo servo: Merge #20033 - Output unquoted family name as a series of identifiers (from upsuper:font-space); r=emilio 2018-02-12 18:21:47 -05:00
startupcache Bug 1431204 - Change calls to nsIURI.spec setter to use nsIURIMutator instead r=mayhemer 2018-01-19 15:19:42 +01:00
storage Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
taskcluster Bug 1437710: fix spelling of zstd; r=gps 2018-02-12 23:32:11 +00:00
testing Merge inbound to mozilla-central. a=merge 2018-02-13 00:08:37 +02:00
third_party Merge inbound to mozilla-central. a=merge 2018-02-13 00:08:37 +02:00
toolkit Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-02-13 00:12:21 +02:00
tools Bug 1434965 - Take 'streaming generation' into account when de-duplicating JIT frames. r=njn 2018-02-10 20:03:36 -05:00
uriloader Bug 1437114 - ExternalHelperAppChild should send data to the parent actor in chunks, r=froydnj 2018-02-12 17:41:34 +01:00
view Bug 1423551: Use BaseRect access methods instead of member variables in view/. r=jet 2018-01-10 11:16:22 -05:00
widget Bug 1407693 - Part 2 - when a child process crashes, write extra annotation data to a pre-opened file descriptor instead of creating a new file; r=gsvelto,rbarker 2017-11-27 14:37:34 -06:00
xpcom Merge inbound to mozilla-central. a=merge 2018-02-13 00:08:37 +02:00
xpfe Bug 1223303 - Fix nsChromeTreeOwner::OnLocationChanged to set nsXULWindow::mChromeLoaded to false when loading a different document, r=mystor. 2018-02-08 12:29:10 +01:00
.arcconfig
.clang-format
.clang-format-ignore
.cron.yml
.eslintignore Bug 1436076 - Part 1 - Fix eslint for hudservice.js;r=nchevobbe 2018-02-07 08:16:37 -08:00
.eslintrc.js Bug 1436389 - Switch xbl related files to a different method for determining their environment. r=mossop 2018-02-07 16:02:25 +00:00
.flake8 Bug 1434430 - [flake8] Fix blank 'except' statements r=rwood 2018-01-31 14:32:08 -05:00
.gdbinit
.gdbinit_python
.gitignore Bug 1429511 - Move Rust port of mozrunner to central. r=ahal 2018-01-12 15:31:20 +00:00
.hgignore Bug 1431177 - Update hgignore for talos webkit tests; r=jmaher 2018-01-17 13:59:55 -05:00
.hgtags Added tag FIREFOX_NIGHTLY_59_END for changeset 5faab9e61990 2018-01-22 11:14:37 +00:00
.inferconfig
.lldbinit
.mailmap Bug 1436182 - Add a .mailmap file to mozilla-central, r=ehsan 2018-02-07 16:01:06 -05:00
.taskcluster.yml Bug 1437562: only use ..:branch:default role, not :*; r=bstack 2018-02-12 18:58:05 +00:00
.yamllint
.ycm_extra_conf.py
AUTHORS
CLOBBER Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2018-01-22 11:19:18 +00:00
GNUmakefile
LEGAL
LICENSE
Makefile.in
README.txt
aclocal.m4
build.gradle Backed out 20 changesets (bug 1411654) for incorrect android:debuggable. r=nalexander, a=RyanVM 2018-01-17 15:55:38 -05:00
client.mk
client.py
configure.in
configure.py
gradle.properties Backed out 20 changesets (bug 1411654) for incorrect android:debuggable. r=nalexander, a=RyanVM 2018-01-17 15:55:38 -05:00
gradlew
mach
moz.build Backed out 2 changesets (bug 1403519) for bustage on \python\mozbuild\mozbuild\test\frontend\test_reader.py on a CLOSED TREE 2018-01-17 07:23:40 +02:00
moz.configure Bug 1435424 - Remove doxygen support from the build system. r=gps 2018-02-02 14:24:18 -08:00
mozilla-config.h.in Bug 1431803 Turn __try into if(true) and __except into else in the chromium sandbox code r=bobowen,glandium 2018-01-22 12:18:51 -06:00
npm-shrinkwrap.json Bug 1436389 - Upgrade ESLint to version 4.17.0. r=mossop 2018-02-07 16:01:29 +00:00
old-configure.in Bug 1433517 - Prevent illegal characters in MOZ_MACBUNDLE_ID r=glandium 2018-02-05 10:31:00 +02:00
package.json Bug 1436389 - Upgrade ESLint to version 4.17.0. r=mossop 2018-02-07 16:01:29 +00:00
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/