зеркало из https://github.com/mozilla/pjs.git
Fix for bug #37165 (Unknown protocol handler in embed/object src attribute
kills plug-in.) r=av
This commit is contained in:
Родитель
cef3296759
Коммит
0ec55b8dbc
|
@ -721,11 +721,22 @@ nsObjectFrame::Reflow(nsIPresContext* aPresContext,
|
|||
{
|
||||
// Create an absolute URL
|
||||
rv = NS_NewURI(&fullURL, src, baseURL);
|
||||
if ( rv != NS_OK )
|
||||
// Failed to create URI, maybe because we didn't
|
||||
// reconize the protocol handler ==> treat like
|
||||
// no 'src' was specified in the embed tag
|
||||
fullURL = baseURL;
|
||||
}
|
||||
else if(NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttribute(kNameSpaceID_HTML, nsHTMLAtoms::data, src))
|
||||
{
|
||||
// Create an absolute URL
|
||||
rv = NS_NewURI(&fullURL, src, baseURL);
|
||||
if ( rv != NS_OK )
|
||||
// Failed to create URI, maybe because we didn't
|
||||
// reconize the protocol handler ==> treat like
|
||||
// no 'data' was specified in the object tag
|
||||
fullURL = baseURL;
|
||||
|
||||
} else {// we didn't find a src or data param, so just set the url to the base
|
||||
fullURL = baseURL;
|
||||
NS_IF_ADDREF(fullURL);
|
||||
|
|
|
@ -721,11 +721,22 @@ nsObjectFrame::Reflow(nsIPresContext* aPresContext,
|
|||
{
|
||||
// Create an absolute URL
|
||||
rv = NS_NewURI(&fullURL, src, baseURL);
|
||||
if ( rv != NS_OK )
|
||||
// Failed to create URI, maybe because we didn't
|
||||
// reconize the protocol handler ==> treat like
|
||||
// no 'src' was specified in the embed tag
|
||||
fullURL = baseURL;
|
||||
}
|
||||
else if(NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttribute(kNameSpaceID_HTML, nsHTMLAtoms::data, src))
|
||||
{
|
||||
// Create an absolute URL
|
||||
rv = NS_NewURI(&fullURL, src, baseURL);
|
||||
if ( rv != NS_OK )
|
||||
// Failed to create URI, maybe because we didn't
|
||||
// reconize the protocol handler ==> treat like
|
||||
// no 'data' was specified in the object tag
|
||||
fullURL = baseURL;
|
||||
|
||||
} else {// we didn't find a src or data param, so just set the url to the base
|
||||
fullURL = baseURL;
|
||||
NS_IF_ADDREF(fullURL);
|
||||
|
|
Загрузка…
Ссылка в новой задаче