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 f09824aad6 Bug 1149357: Properly update responsive images for density changes. r=dholbert
Before that we were not notifying the image frame in any way if we ended up not
doing a load, and we were instead relying on the reflow the viewport resize
caused to get the new density in ComputeSize from the content node (but nowhere
else, since that's the bug part 1 fixes).

This was generally unsound, since you can stash random media in a sizes=
attribute, which don't necessarily needs to cause a reflow.

Now we need to notify necessarily because nsImageFrame stores the adjusted
intrinsic size.

mCurrentDensity could also get out of sync as well, when the selected image
density changed, but we ended up returning early because our source hadn't
change in the first early exit.

This patch moves us to a model where we don't re-trigger loads for density
changes if the source doesn't change (unless we pass aAlwaysLoad when we need
to, per spec).

This matches our previous behavior (without the bugginess of not updating the
intrinsic size), and also Chromium, at least.

This changes behavior in one case, which is when we don't load the same source
node, but we have the same source URL, and the density does change. This could
happen with <picture> and two <source>s with same source and different media and
sizes. This makes our behavior consistent with the behavior we have when both
the source and the density doesn't change.

Blink and WebKit do trigger a second image load both when the source changes
without changing density and when density changes. I'll file a spec issue, since
per:

  https://html.spec.whatwg.org/#reacting-to-environment-changes

We should be triggering the load when the density changes but the source
doesn't as well, but no UA does that.

I filed https://github.com/whatwg/html/issues/3709 with a little summary of the
situation and what I think the behavior should be (which is what this patch
implements). That being said, I'll update the impl if the spec people think
otherwise :).

MozReview-Commit-ID: Eqy16ygHRLo
2018-05-25 12:09:30 +02:00
.cargo Bug 1452603 - Update Cargo stuff for the serde bump. r=jrmuizel 2018-04-12 11:05:18 -04:00
.vscode Bug 1423565 - Update tasks.json as per documentation. r=rillian 2017-12-06 14:59:35 +01:00
accessible Bug 1461959 - Removed OSX 10.6 reference. r=gbrown 2018-05-17 14:53:00 +03:00
browser Merge inbound to mozilla-central. a=merge 2018-05-25 13:01:23 +03:00
build Bug 1463921 - Re-run js configure when js/src/old-configure changes. r=gps 2018-05-23 17:22:09 -07:00
caps Bug 1452666. Implement nsISerializable on expanded principals. r=kmag 2018-05-24 02:43:14 -04:00
chrome Bug 1463889 part 1. Switch nsPIDOMWindowOuter::GetFrames to returning an nsDOMWindowList. r=qdot 2018-05-24 23:32:19 -04:00
config Merge inbound to mozilla-central. a=merge 2018-05-25 13:01:23 +03:00
db Bug 1453193 - Upgrade to SQLite 3.23.1. r=mak 2018-04-11 09:04:00 -04:00
devtools Merge inbound to mozilla-central. a=merge 2018-05-25 13:01:23 +03:00
docshell Bug 1463889 part 3. Get rid of nsIDOMWindowCollection. r=qdot 2018-05-24 23:32:19 -04:00
dom Bug 1149357: Properly update responsive images for density changes. r=dholbert 2018-05-25 12:09:30 +02:00
editor Bug 1463981 part 3. Remove nsIDOMNode usage in editor. r=masayuki 2018-05-24 13:18:34 -04: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 1463981 part 1. Remove use of nsIDOMNode in spellchecker xpidl. r=masayuki 2018-05-24 13:18:34 -04:00
gfx Bug 1463244 - cleanup of swizzle stride calculations. r=rhunt 2018-05-25 00:56:22 -04:00
gradle/wrapper Bug 1411654 - Part 1: Upgrade to Android-Gradle 3.0+ and build-tools;26.0.2. r=maliu 2017-10-26 11:00:36 -07:00
hal Bug 1460940 - Clean up most remaining C++-side uses of nsIDOMDocument. r=bz 2018-05-11 19:46:15 +02:00
image Bug 1460940 - Remove nsIDOMDocument uses in image/. r=bz 2018-05-11 19:46:15 +02:00
intl Bug 1462138 - Part 1: Add a memory reporter for nsStringBundleService. r=erahm 2018-05-18 13:16:31 -07:00
ipc Bug 1459144 - Fix CountHistogram deserialization for GeckoView. r=chutten,janerik 2018-05-22 17:15:26 +02:00
js Bug 1464092 - Speed up some more oomTests that may be taking a long time r=jandem 2018-05-25 10:40:32 +01:00
layout Bug 1149357: Properly update responsive images for density changes. r=dholbert 2018-05-25 12:09:30 +02:00
media Backed out changeset c13ca75c9bcb (bug 1450658) for Browser-Chrome failures on browser/base/content/test/webrtc/browser_devices_get_user_media_screen.js 2018-05-23 17:07:33 +03:00
memory Merge inbound to mozilla-central. a=merge 2018-05-24 12:37:58 +03:00
mfbt Bug 1462912 - fixed BufferList::Extract to handle the case where the call consumes the entirety of the BufferList; r=froydnj 2018-05-22 13:04:59 -04:00
mobile Merge inbound to mozilla-central. a=merge 2018-05-24 01:00:23 +03:00
modules Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-05-25 13:05:16 +03:00
mozglue Bug 1462727 - Make WindowsMapRemoteView.cpp work with April 2018 Update SDK. r=aklotz 2018-05-19 02:12:14 +09:00
netwerk Merge inbound to mozilla-central. a=merge 2018-05-24 12:37:58 +03:00
nsprpub Bug 1432480, land NSPR_4_19_RTM, no code changes, only version numbers. Require version 4.19 for building. r=me 2018-03-05 17:05:18 +01:00
other-licenses Merge inbound to mozilla-central. a=merge 2018-05-09 01:58:44 +03:00
parser Bug 1461701: Remove nsUpdateType and UPDATE_CONTENT_MODEL. r=smaug 2018-05-15 18:47:16 +02:00
python Bug 1464128 - Migrate bookmarks.html.in to LOCALIZED_GENERATED_FILES. r=ted.mielczarek 2018-05-24 11:28:47 -07:00
security Bug 1462640 - Allow content processes to mincore() individual pages. r=gcp 2018-05-18 17:36:47 -06:00
services Backed out changeset 240237473d9e (bug 1463624) for failing eslint at builds/worker/checkouts/gecko/services/sync/tests/unit/test_browserid_identity.js:279:9 on a CLOSED TREE 2018-05-24 03:04:36 +03:00
servo No bug - Remove dead and unsafe code. r=me 2018-05-25 00:53:35 +02:00
startupcache Bug 1439047 - Part 2: Cleanup StartupCache::PutBuffer hashtable usage. r=froydnj 2018-02-16 15:58:30 -08:00
storage Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj 2018-04-28 12:50:58 -07:00
taskcluster Merge inbound to mozilla-central. a=merge 2018-05-25 13:01:23 +03:00
testing Bug 1149357: Properly update responsive images for density changes. r=dholbert 2018-05-25 12:09:30 +02:00
third_party Backed out changeset fdf92ddfbf86 (bug 1464038) for causing nightly bustages after virtualenv upgrade to 16.0.0 a=backout 2018-05-25 07:12:18 +03:00
toolkit Merge inbound to mozilla-central. a=merge 2018-05-25 03:04:03 +03:00
tools Bug 1463408 part 2 - Add profiler feature seqstyle for forcing sequential styling when profiling. r=emilio,mstange 2018-05-23 19:35:03 +10:00
uriloader Bug 1463287: Add QueryInterface helper macro for concrete class types. r=bz 2018-05-21 16:33:18 -07:00
view Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj 2018-04-28 12:50:58 -07:00
widget Bug 1463687 - Apply scrollbar style of root element to scrollbars of viewport. r=heycam 2018-05-24 16:34:58 +10:00
xpcom Merge inbound to mozilla-central. a=merge 2018-05-25 13:01:23 +03:00
xpfe/appshell Bug 1460639 - Apply persisted window settings before layout. r=smaug 2018-05-16 18:13:59 -07:00
.arcconfig Bug 1460463 - Update .arcconfig to make history mutable; r=gps 2018-05-09 23:49:52 +00:00
.clang-format
.clang-format-ignore Bug 1444546 - Part 4: Use GENERATED_FILES for Android JNI wrapper generation. r=froydnj,jchen 2018-03-06 20:09:37 -08:00
.cron.yml Bug 1462294 - remove unused date branch; r=Pike 2018-05-17 13:30:19 +00:00
.eslintignore Bug 1461785 - Update eslint ignore file to no longer ignore dom/media/mediasource. r=standard8 2018-05-14 16:49:39 -04:00
.eslintrc.js Bug 1463499 - Enable ESLint rule require-expected-throws-or-rejects for services/. r=markh 2018-05-16 19:06:24 +01:00
.flake8 bug 1463425 - Add more directories to the flake8 list r=ahal 2018-05-22 06:26:22 -07:00
.gdbinit
.gdbinit_python
.gitignore Bug 1439727 - Ignore third_party/python/psutil/tmp/ in VCS; r=nalexander 2018-03-07 08:59:48 -08:00
.hgignore Bug 1454466 - Move raptor in-tree; r=ahal 2018-04-16 17:15:38 -04:00
.hgtags No bug - Tagging mozilla-central ccfd7b716a91241ddbc084cb7116ec561e56d5d1 with FIREFOX_BETA_61_BASE a=release DONTBUILD CLOSED TREE 2018-04-26 20:27:10 +00:00
.inferconfig
.lldbinit
.mailmap NO BUG - Use ato's new address. r=me 2018-02-26 15:59:29 +00:00
.taskcluster.yml Bug 1415868 - change ACTION_TASK_GROUP_ID to be the taskGroupId of the target task; r=aki 2018-05-18 22:16:43 +00:00
.yamllint
.ycm_extra_conf.py
aclocal.m4
AUTHORS Bug 1459852 - Get rid of the AUTHORS list r=mossop 2018-05-08 10:37:41 +02:00
build.gradle Bug 1457863 - 1. Update kotlin to 1.2.41; r=nalexander 2018-05-02 13:49:57 -04:00
Cargo.lock Bug 1463251 - Part 1. Update regex in both webdriver and geckodriver. r=ato,jgraham 2018-05-21 22:24:30 +02:00
Cargo.toml Bug 1452603 - Update Cargo stuff for the serde bump. r=jrmuizel 2018-04-12 11:05:18 -04:00
client.mk Bug 1461836 - Write out complete configure dependencies from configure for consumption by make and non-make backends. r=mshal 2018-05-21 14:01:50 -07:00
client.py
CLOBBER Bug 1454912 - Use a .stub file as the target for all GENERATED_FILES rules; r=nalexander 2018-05-09 08:24:31 -04:00
configure.in
configure.py Bug 1461836 - Write out complete configure dependencies from configure for consumption by make and non-make backends. r=mshal 2018-05-21 14:01:50 -07:00
GNUmakefile
gradle.properties Bug 1453413 - Use aapt2 to build Firefox for Android. r=mcomella 2018-04-11 09:59:22 -07:00
gradlew
LEGAL
LICENSE
mach
Makefile.in Bug 1461836 - Write out complete configure dependencies from configure for consumption by make and non-make backends. r=mshal 2018-05-21 14:01:50 -07:00
moz.build Bug 1346026 - Vendor pipenv 2018.5.18 and transient dependencies; r=ahal 2018-05-17 19:06:20 +01:00
moz.configure Bug 1461836 - Write out complete configure dependencies from configure for consumption by make and non-make backends. r=mshal 2018-05-21 14:01:50 -07:00
mozilla-config.h.in Bug 1460600: Remove unsupported --enable-system-hunspell flag. r=glandium 2018-05-10 10:36:53 -07:00
old-configure.in Bug 1456552 Make Optimized MinGW builds use -O# instead of falling through and collecting a -O r=ted 2018-05-16 16:32:47 -05:00
package-lock.json Bug 1464100 - Update eslint-plugin-no-unsanitized to v3.0.2. r=ahal 2018-05-24 16:54:54 +01:00
package.json Bug 1464100 - Update eslint-plugin-no-unsanitized to v3.0.2. r=ahal 2018-05-24 16:54:54 +01:00
Pipfile Backed out changeset fdf92ddfbf86 (bug 1464038) for causing nightly bustages after virtualenv upgrade to 16.0.0 a=backout 2018-05-25 07:12:18 +03:00
Pipfile.lock Backed out changeset fdf92ddfbf86 (bug 1464038) for causing nightly bustages after virtualenv upgrade to 16.0.0 a=backout 2018-05-25 07:12:18 +03:00
README.txt Bug 1460030 - Update the nightly URL in the README.txt file r=kohei 2018-05-08 21:22:10 +02:00
settings.gradle Bug 1444546 - Part 2: Build annotationProcessors with Gradle. r=jchen 2018-02-22 16:11:14 -08:00
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.]

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://www.mozilla.org/firefox/channel/desktop/#nightly