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
Emilio Cobos Álvarez 242f55927a Bug 1511138 - Improve performance of LightweightThemeConsumer when setting properties, and also avoid _sanitizeCSSColor from getting fooled. r=jaws
This probably deserves a comment as of why it belongs to this bug.

This patch series caused a single, reproducible timeout on
browser_ext_themes_toolbars.js, where the transitionend event it awaits for
stops triggering.

I got fascinated by it and I decided to poke around it in rr instead of just
removing the await line, and here's what's going on.

In the previous implementation of _sanitizeCSSColor, we were not flushing style
because of the optimization bug 1363805 introduced (which wasn't supposed to
deal with out-of-document elements, but it accidentally did so).

In any case, the fact that we were not flushing style in _sanitizeCSSColor
caused us to flush style sometime later when the lwtheme attribute was already
set up, and thus the selector in here matched:

  https://searchfox.org/mozilla-central/rev/cfaa5a1d48d6bc6552199e73004ecb05d0a9c921/browser/themes/shared/browser.inc.css#40

And thus caused the transition rule to apply at a time where the
background-color change happened.

Now we were flushing on getComputedStyle on every call, and in the most
inefficient way possible (changing a custom property on the root before each
property change, which causes us to restyle the whole document to propagate it
down to all descendants).

Furthermore, we were flushing style at a time where the lwtheme attribute
change had not yet happened, and thus when the background-color changed, there
was no transition rule applicable, and the transition didn't fire.

This patch changes LightweightThemeConsumer to avoid restyling the whole
document over and over.

Also, while at it I realized that you could fool the sanitizer with !important
in an experiment stylesheet or with other !important rule in the page really.
It's not clear why you'd do that, but it may be worth to just making that
function completely sound, so I did that and added a test for it.

Differential Revision: https://phabricator.services.mozilla.com/D13716
2018-12-06 10:33:32 -05:00
.cargo Bug 1504507 - Update serde branch for changes in WR PR #3264. r=kats 2018-11-05 13:14:07 +00:00
.vscode Bug 1493017 - Tweak vscode tasks.json problemMatcher regexes to handle clang/Windows output - r=jya 2018-09-21 10:00:59 +00:00
accessible Bug 1510794 - Implement AccessibilityNodeInfo.ACTION_CLICK natively. r=yzen 2018-12-05 16:08:01 +00:00
browser Bug 1511138 - Fix / update tests. r=smaug 2018-12-06 10:33:29 -05:00
build Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-12-05 23:38:42 +02:00
caps Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
chrome Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
config Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
db Bug 1495238 - Upgrade to SQLite 3.25.3. r=mak 2018-11-06 16:59:19 +00:00
devtools Bug 1512086 - fix console highlighting and update test to fail if it doesnt; r=nchevobbe 2018-12-05 22:02:36 +00:00
docshell Bug 1511237 - Store a TabChild reference in cached docshells, r=bzbarsky, r=smaug 2018-12-05 10:18:44 -05:00
dom Bug 1511138 - Fix / update tests. r=smaug 2018-12-06 10:33:29 -05:00
editor Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2018-12-03 23:53:09 +02:00
embedding Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
extensions Backed out 2 changesets (bug 1512052)for causing build bustages CLOSED TREE 2018-12-05 05:47:39 +02:00
gfx Bug 1512157 - Update webrender to commit 7c4162c581978d1a72ed2271a94382290855e227 (WR PR #3384). r=kats 2018-12-05 12:18:24 +00:00
gradle/wrapper Bug 1509572 - Part 1: Bump Gradle wrapper to 4.10.2; decouple script from Gradle version. r=snorp 2018-11-26 21:42:27 +00:00
hal Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
image Bug 1510601 - Part 2. Improve recycling of frames when an animation is reset. r=tnikkel 2018-12-05 12:04:20 -05:00
intl Backed out 2 changesets (bug 1512052)for causing build bustages CLOSED TREE 2018-12-05 05:47:39 +02:00
ipc Bug 1512085 - Don't overlap IDs between content and middleman process, r=bhackett 2018-12-05 10:18:46 -05:00
js Bug 1510607 - Implement JS::IsCCTraceKind using the JS_FOR_EACH_TRACEKIND data. r=jonco 2018-12-06 10:04:03 -05:00
layout Bug 1511138 - Fix / update tests. r=smaug 2018-12-06 10:33:29 -05:00
media Bug 1509875 - P1. Retrieve extended profile from mp4parse. r=kinetik 2018-12-05 16:54:21 +00:00
memory Bug 1511251 - Remove redundant and costly assert. r=njn 2018-12-05 14:45:52 +00:00
mfbt Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
mobile Bug 1511454 - Migrate about:plugins to use Fluent for localization r=flod,Gijs,zbraniecki 2018-12-05 16:06:15 +00:00
modules Merge mozilla-inbound to mozilla-central. a=merge 2018-12-05 12:19:43 +02:00
mozglue Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
netwerk Bug 1506965 - Add assertions that members in bitfields are only used on the main thread r=mayhemer 2018-12-05 15:58:46 +00:00
nsprpub Bug 1477680, NSPR 4.20 RTM, no code change, only version number, r=me 2018-08-28 16:21:01 +02:00
other-licenses Bug 1468544 - Replace mar_hash_name with CityHash algorithm. r=rstrong 2018-11-06 13:34:21 -05:00
parser Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
python Bug 1511454 - Migrate about:plugins to use Fluent for localization r=flod,Gijs,zbraniecki 2018-12-05 16:06:15 +00:00
security Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2018-12-03 23:53:09 +02:00
services Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
servo Bug 1512256 - Move FragmentOrElement::mAttrs to Element, r=ehsan 2018-12-06 15:58:40 +02:00
startupcache Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
storage Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
taskcluster Bug 1511924 - Fix bouncer submission for beta/releases by using the proper location. r=mtabara 2018-12-05 15:29:08 +00:00
testing Bug 1511138 - Fix / update tests. r=smaug 2018-12-06 10:33:29 -05:00
third_party Bug 1492070, update l10n python libraries, r=stas 2018-12-03 12:03:59 +00:00
toolkit Bug 1511138 - Improve performance of LightweightThemeConsumer when setting properties, and also avoid _sanitizeCSSColor from getting fooled. r=jaws 2018-12-06 10:33:32 -05:00
tools Bug 1512146 - Update expected results for some tests using mach try fuzzy. r=ahal 2018-12-04 22:54:36 -05:00
uriloader Bug 1510911 - Part 3: Backout changeset d0997972e4d4 (bug 1493563 - Part 4) for regressing performance 2018-12-03 14:27:53 -05:00
view Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
widget Bug 1511973 - [Wayland] Listen for keyboard layout changes on wl_seat again, r=jhorak 2018-12-05 19:57:04 +00:00
xpcom Merge mozilla-inbound to mozilla-central a=merge 2018-12-04 23:53:17 +02:00
xpfe/appshell Backed out 2 changesets (bug 1512052)for causing build bustages CLOSED TREE 2018-12-05 05:47:39 +02:00
.arcconfig
.clang-format Bug 1508818, part 1 - Add some missing things to the clang-format macro list. r=Ehsan 2018-11-28 07:38:12 +00:00
.clang-format-ignore Bug 1511319 - Ensure that tools/clang-tidy/test doesn't get reformatted using clang-format; r=sylvestre a=Aryx 2018-11-30 06:36:07 -05:00
.cron.yml Bug 1503547 - Move searchfox indexing jobs a half hour earlier to match nightly build times. r=mccr8 2018-11-01 15:37:07 +00:00
.eslintignore Backed out 2 changesets (bug 1512052)for causing build bustages CLOSED TREE 2018-12-05 05:47:39 +02:00
.eslintrc.js Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (setup ESLint). r=mossop 2018-10-19 08:46:31 +00:00
.flake8 Bug 1508889 - Remove ipc/chromium from the lists of third-party code. r=Ehsan 2018-11-21 03:11:37 +00:00
.gdbinit Bug 1486903 - Add "ftl" command to dump frame subtree to .gdbinit. r=Ehsan 2018-08-28 20:20:21 +00:00
.gdbinit_python
.git-blame-ignore-revs Bug 1511501 - Add information about the tree-wide clang-format to .git-blame-ignore-revs r=kats 2018-12-04 05:01:02 +00:00
.gitignore Bug 1510363 - backout accidentally checked in file. r=jya 2018-11-28 17:50:32 +00:00
.hg-annotate-ignore-revs Bug 1508324 - Create the .hg-annotate-ignore-revs file to be used with hg smart-annotate. r=ehsan DONTBUILD NPOTB 2018-11-30 01:16:10 -02:00
.hg-format-source Bug 1511181 - Quick fix for .hg-format-source that has an empty line. r=ehsan, a=aryx 2018-11-30 13:25:44 +02:00
.hgignore Bug 1479503: Check infer in ./mach static-analysis autotest. r=nalexander 2018-10-24 21:54:34 +00:00
.hgtags No bug - Tagging mozilla-central 9ad82455dcee2bc1d438e46016b8db00e88758a8 with FIREFOX_BETA_65_BASE a=release DONTBUILD CLOSED TREE 2018-12-03 07:59:35 -08:00
.lldbinit Bug 1481555: Use lldb's python API to summarise nsAtoms. r=froydnj 2018-08-08 15:11:22 +00:00
.mailmap
.taskcluster.yml Bug 1486970 - Create revision and pushlog-id index routes for cron decision tasks. r=dustin,aki 2018-11-27 22:33:09 +00:00
.trackerignore Bug 1486468 - Add .trackerignore file to avoid GNOME Tracker indexing mozilla-central files. r=ahal 2018-08-27 16:45:03 +02:00
.yamllint
.ycm_extra_conf.py
aclocal.m4
AUTHORS Bug 1481409 - Use HTTPS protocol for Mozilla's Credits link in AUTHORS file r=mossop 2018-08-13 16:39:30 +00:00
build.gradle Backed out 4 changesets (bug 1509573) for unexpected bustages a=backout. 2018-11-30 01:40:06 +02:00
Cargo.lock Bug 1505719 - Try harder when computing breakpad IDs for Android system libraries. r=ted 2018-12-03 19:21:44 +00:00
Cargo.toml Bug 1507524 - Move webrender to gfx/wr. r=jrmuizel 2018-11-22 21:47:48 +00:00
client.mk Bug 1498031 - Merge code paths for running configure between Tup and Make based backends. r=firefox-build-system-reviewers,mshal 2018-10-16 22:21:36 +00:00
client.py
CLOBBER Bug 1499026 - Part 3: Updating ICU requires a clobber. r=clobber 2018-11-01 06:32:49 -07:00
configure.in
configure.py
GNUmakefile
gradle.properties
gradlew
LEGAL
LICENSE
mach
Makefile.in Bug 1498031 - Merge code paths for running configure between Tup and Make based backends. r=firefox-build-system-reviewers,mshal 2018-10-16 22:21:36 +00:00
moz.build Bug 1508248 - Update in-tree bugzilla metadata to use 'Firefox Build System :: Mach Core' for mach files r=froydnj 2018-11-19 13:35:14 +00:00
moz.configure Bug 1502457 - Move MOZILLA_OFFICIAL to init.configure. r=nalexander 2018-11-16 01:16:31 +00:00
mozilla-config.h.in Bug 1504022 - Map GetExceptionCode to a nop to avoid an error r=bobowen 2018-11-02 13:28:01 -05:00
old-configure.in Merge mozilla-central to autoland a=merge on a CLOSED TREE 2018-11-27 01:03:16 +02:00
package-lock.json Bug 1495397 - Update mozilla-central's package.json for being more generic, and move existing ESLint modules to dev dependencies. r=firefox-build-system-reviewers,nalexander 2018-10-01 17:28:45 +00:00
package.json Bug 1495397 - Update mozilla-central's package.json for being more generic, and move existing ESLint modules to dev dependencies. r=firefox-build-system-reviewers,nalexander 2018-10-01 17:28:45 +00:00
README.txt Bug 1480997 - Remove "Mozilla FTP server" link in README.txt r=mossop 2018-10-23 10:06:29 +00:00
settings.gradle
test.mozbuild

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.]

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 Mozilla developers for
testing, may be buggy.