mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1842984 Remove dom.image-lazy-loading.enabled r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D184883
This commit is contained in:
parent
e115104963
commit
2a0eb51c7e
@ -1296,10 +1296,6 @@ void HTMLImageElement::SetLazyLoading() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!StaticPrefs::dom_image_lazy_loading_enabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If scripting is disabled don't do lazy load.
|
||||
// https://whatpr.org/html/3752/images.html#updating-the-image-data
|
||||
//
|
||||
|
@ -41,7 +41,7 @@ interface HTMLImageElement : HTMLElement {
|
||||
attribute unsigned long height;
|
||||
[CEReactions, SetterThrows]
|
||||
attribute DOMString decoding;
|
||||
[CEReactions, SetterThrows, Pref="dom.image-lazy-loading.enabled"]
|
||||
[CEReactions, SetterThrows]
|
||||
attribute DOMString loading;
|
||||
readonly attribute unsigned long naturalWidth;
|
||||
readonly attribute unsigned long naturalHeight;
|
||||
|
@ -15,7 +15,6 @@ SpecialPowers.pushPrefEnv(
|
||||
// the `alt` change.
|
||||
{
|
||||
set: [
|
||||
["dom.image-lazy-loading.enabled", true],
|
||||
["dom.image-lazy-loading.root-margin.top", 0],
|
||||
["dom.image-lazy-loading.root-margin.bottom", 0],
|
||||
["dom.image-lazy-loading.root-margin.left", 0],
|
||||
|
@ -67,7 +67,7 @@ fails-if(useDrawSnapshot) == image-srcset-svg-default-2x.html image-srcset-svg-d
|
||||
== image-resize-percent-width.html image-resize-ref.html
|
||||
|
||||
== moz-broken-matching-1.html moz-broken-matching-1-ref.html
|
||||
pref(dom.image-lazy-loading.enabled,true) == moz-broken-matching-lazy-load.html moz-broken-matching-1-ref.html
|
||||
== moz-broken-matching-lazy-load.html moz-broken-matching-1-ref.html
|
||||
|
||||
== img-invalidation-local-transform-1.html img-invalidation-local-transform-1-ref.html
|
||||
== unknown-protocol.html unknown-protocol-ref.html
|
||||
|
@ -2706,14 +2706,6 @@
|
||||
value: false
|
||||
mirror: always
|
||||
|
||||
# <img loading="lazy">
|
||||
#
|
||||
# See https://github.com/whatwg/html/pull/3752
|
||||
- name: dom.image-lazy-loading.enabled
|
||||
type: RelaxedAtomicBool
|
||||
value: true
|
||||
mirror: always
|
||||
|
||||
# The root margin for image lazy loading, defined as four (value, percentage)
|
||||
# pairs.
|
||||
- name: dom.image-lazy-loading.root-margin.top
|
||||
|
@ -183,8 +183,7 @@ nsIContentHandle* nsHtml5TreeBuilder::createElement(
|
||||
if (nsGkAtoms::img == aName) {
|
||||
nsHtml5String loading =
|
||||
aAttributes->getValue(nsHtml5AttributeName::ATTR_LOADING);
|
||||
if (!mozilla::StaticPrefs::dom_image_lazy_loading_enabled() ||
|
||||
!loading.LowerCaseEqualsASCII("lazy")) {
|
||||
if (!loading.LowerCaseEqualsASCII("lazy")) {
|
||||
nsHtml5String url =
|
||||
aAttributes->getValue(nsHtml5AttributeName::ATTR_SRC);
|
||||
nsHtml5String srcset =
|
||||
|
@ -1 +0,0 @@
|
||||
prefs: [dom.image-lazy-loading.enabled:true]
|
Loading…
Reference in New Issue
Block a user