mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Fix bug 212277. r=caillon, sr=darin
This commit is contained in:
parent
1174feec39
commit
e6f3eb1465
@ -3069,8 +3069,8 @@ nsGenericHTMLElement::AttrToURI(nsIAtom* aAttrName, nsAString& aAbsoluteURI)
|
||||
{
|
||||
nsAutoString attrValue;
|
||||
nsresult rv = GetAttr(kNameSpaceID_None, aAttrName, attrValue);
|
||||
if (rv == NS_CONTENT_ATTR_NOT_THERE) {
|
||||
aAbsoluteURI.Truncate();
|
||||
if (rv != NS_CONTENT_ATTR_HAS_VALUE) {
|
||||
SetDOMStringToNull(aAbsoluteURI);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -3087,10 +3087,6 @@ nsGenericHTMLElement::AttrToURI(nsIAtom* aAttrName, nsAString& aAbsoluteURI)
|
||||
attrValue, doc, baseURI);
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
if (rv != NS_ERROR_MALFORMED_URI) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
// Just use the attr value as the result...
|
||||
aAbsoluteURI = attrValue;
|
||||
return NS_OK;
|
||||
|
@ -50,6 +50,7 @@
|
||||
#include "nsIObjectInputStream.h"
|
||||
#include "nsIObjectOutputStream.h"
|
||||
#include "nsEscape.h"
|
||||
#include "nsNetError.h"
|
||||
|
||||
static NS_DEFINE_CID(kThisSimpleURIImplementationCID,
|
||||
NS_THIS_SIMPLEURI_IMPLEMENTATION_CID);
|
||||
@ -158,7 +159,7 @@ nsSimpleURI::SetSpec(const nsACString &aSpec)
|
||||
|
||||
PRInt32 pos = spec.FindChar(':');
|
||||
if (pos == -1)
|
||||
return NS_ERROR_FAILURE;
|
||||
return NS_ERROR_MALFORMED_URI;
|
||||
|
||||
mScheme.Truncate();
|
||||
mPath.Truncate();
|
||||
|
Loading…
Reference in New Issue
Block a user