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