mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 05:45:37 +00:00
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
f09824aad6
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 |
||
---|---|---|
.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 | ||
security | ||
services | ||
servo | ||
startupcache | ||
storage | ||
taskcluster | ||
testing | ||
third_party | ||
toolkit | ||
tools | ||
uriloader | ||
view | ||
widget | ||
xpcom | ||
xpfe/appshell | ||
.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 | ||
aclocal.m4 | ||
AUTHORS | ||
build.gradle | ||
Cargo.lock | ||
Cargo.toml | ||
client.mk | ||
client.py | ||
CLOBBER | ||
configure.in | ||
configure.py | ||
GNUmakefile | ||
gradle.properties | ||
gradlew | ||
LEGAL | ||
LICENSE | ||
mach | ||
Makefile.in | ||
moz.build | ||
moz.configure | ||
mozilla-config.h.in | ||
old-configure.in | ||
package-lock.json | ||
package.json | ||
Pipfile | ||
Pipfile.lock | ||
README.txt | ||
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.] 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