Bug 773429 - Remove dom.disable_image_src_set. r=khuey

This commit is contained in:
Bobby Holley 2015-11-10 12:13:45 -08:00
parent e1b26e9539
commit a774ac30e8
9 changed files with 0 additions and 41 deletions

View File

@ -2116,14 +2116,6 @@ nsContentUtils::IsCallerContentXBL()
return xpc::IsContentXBLScope(c);
}
bool
nsContentUtils::IsImageSrcSetDisabled()
{
return Preferences::GetBool("dom.disable_image_src_set") &&
!IsCallerChrome();
}
// static
bool
nsContentUtils::LookupBindingMember(JSContext* aCx, nsIContent *aContent,

View File

@ -236,8 +236,6 @@ public:
return SubjectPrincipal();
}
static bool IsImageSrcSetDisabled();
static bool LookupBindingMember(JSContext* aCx, nsIContent *aContent,
JS::Handle<jsid> aId,
JS::MutableHandle<JSPropertyDescriptor> aDesc);

View File

@ -535,12 +535,6 @@ HTMLImageElement::SetAttr(int32_t aNameSpaceID, nsIAtom* aName,
if (aNameSpaceID == kNameSpaceID_None &&
aName == nsGkAtoms::src) {
// This is for dom.disable_image_src_set, which predates "srcset"
// as an attribute. See Bug 773429
if (nsContentUtils::IsImageSrcSetDisabled()) {
return NS_OK;
}
if (InResponsiveMode()) {
if (mResponsiveSelector &&
mResponsiveSelector->Content() == this) {

View File

@ -114,11 +114,6 @@ SVGFEImageElement::AfterSetAttr(int32_t aNamespaceID, nsIAtom* aName,
// If there is a frame then it should deal with loading as the image
// url may be animated.
if (!GetPrimaryFrame()) {
// Prevent setting image.src by exiting early
if (nsContentUtils::IsImageSrcSetDisabled()) {
return NS_OK;
}
if (aValue) {
LoadSVGImage(true, aNotify);
} else {

View File

@ -143,12 +143,6 @@ SVGImageElement::AfterSetAttr(int32_t aNamespaceID, nsIAtom* aName,
// If there is a frame then it should deal with loading as the image
// url may be animated
if (!GetPrimaryFrame()) {
// Prevent setting image.src by exiting early
if (nsContentUtils::IsImageSrcSetDisabled()) {
return NS_OK;
}
if (aValue) {
LoadSVGImage(true, aNotify);
} else {

View File

@ -68,8 +68,6 @@ public:
void MaybeLoadSVGImage();
bool IsImageSrcSetDisabled() const;
// WebIDL
already_AddRefed<SVGAnimatedLength> X();
already_AddRefed<SVGAnimatedLength> Y();

View File

@ -130,12 +130,6 @@ SVGFEImageFrame::AttributeChanged(int32_t aNameSpaceID,
}
if (aNameSpaceID == kNameSpaceID_XLink &&
aAttribute == nsGkAtoms::href) {
// Prevent setting image.src by exiting early
if (nsContentUtils::IsImageSrcSetDisabled()) {
return NS_OK;
}
if (element->mStringAttributes[SVGFEImageElement::HREF].IsExplicitlySet()) {
element->LoadSVGImage(true, true);
} else {

View File

@ -208,11 +208,6 @@ nsSVGImageFrame::AttributeChanged(int32_t aNameSpaceID,
}
if (aNameSpaceID == kNameSpaceID_XLink &&
aAttribute == nsGkAtoms::href) {
// Prevent setting image.src by exiting early
if (nsContentUtils::IsImageSrcSetDisabled()) {
return NS_OK;
}
SVGImageElement *element = static_cast<SVGImageElement*>(mContent);
if (element->mStringAttributes[SVGImageElement::HREF].IsExplicitlySet()) {

View File

@ -1036,7 +1036,6 @@ pref("editor.positioning.offset", 0);
// Scripts & Windows prefs
pref("dom.disable_beforeunload", false);
pref("dom.disable_image_src_set", false);
pref("dom.disable_window_flip", false);
pref("dom.disable_window_move_resize", false);
pref("dom.disable_window_status_change", false);