mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 22:38:41 +09:00
[DOM] Simplify <object> scheme check code and fix plugin handling.
Trying to do a positive check on nested URIs apparently doesn't work, but the handling could be simplified to just check for non-null mURI instead - this also fixes plugin loading (which broke with the previous check).
This commit is contained in:
parent
838be26145
commit
ace2c1c1ee
1 changed files with 6 additions and 10 deletions
|
|
@ -2328,17 +2328,13 @@ nsObjectLoadingContent::LoadObject(bool aNotify,
|
|||
// "about", "blob", "data", "file", "http", "https".
|
||||
//
|
||||
// Some accessibility tests use our internal "chrome" scheme.
|
||||
if (mType != eType_Null) {
|
||||
nsCOMPtr<nsIURI> tempURI = mURI;
|
||||
nsCOMPtr<nsINestedURI> nestedURI = do_QueryInterface(tempURI);
|
||||
if (mType != eType_Null && mURI) {
|
||||
bool isCandidate = false;
|
||||
if (nestedURI) {
|
||||
for (const auto& candidate :
|
||||
{"about", "blob", "chrome", "data", "file", "http", "https"}) {
|
||||
rv = tempURI->SchemeIs(candidate, &isCandidate);
|
||||
if (NS_SUCCEEDED(rv) && isCandidate) {
|
||||
break;
|
||||
}
|
||||
for (const auto& candidate :
|
||||
{"about", "blob", "chrome", "data", "file", "http", "https"}) {
|
||||
rv = mURI->SchemeIs(candidate, &isCandidate);
|
||||
if (NS_SUCCEEDED(rv) && isCandidate) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!isCandidate) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue