mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 773429 - Remove dom.disable_image_src_set. r=khuey
This commit is contained in:
parent
e1b26e9539
commit
a774ac30e8
@ -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,
|
||||
|
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -68,8 +68,6 @@ public:
|
||||
|
||||
void MaybeLoadSVGImage();
|
||||
|
||||
bool IsImageSrcSetDisabled() const;
|
||||
|
||||
// WebIDL
|
||||
already_AddRefed<SVGAnimatedLength> X();
|
||||
already_AddRefed<SVGAnimatedLength> Y();
|
||||
|
@ -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 {
|
||||
|
@ -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()) {
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user