Bug 1364505 - Add a rule to favor plugin fallback content when no srcURI has been specified. r=qDot
authorFelipe Gomes <felipc@gmail.com>
Tue, 16 May 2017 22:56:22 -0300
changeset 358615 f35b966ff0247b8adccde22222aee3814ad38919
parent 358614 8aae91ffd0749753651c88419f869a6749ffa591
child 358616 e30e7ee30b7c7672ae4bf6265e63db5ae8829d53
push id90357
push userfelipc@gmail.com
push dateWed, 17 May 2017 01:56:55 +0000
treeherdermozilla-inbound@12a7b0378709 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersqDot
bugs1364505
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1364505 - Add a rule to favor plugin fallback content when no srcURI has been specified. r=qDot MozReview-Commit-ID: 18VcbxHmi0c
dom/base/nsObjectLoadingContent.cpp
--- a/dom/base/nsObjectLoadingContent.cpp
+++ b/dom/base/nsObjectLoadingContent.cpp
@@ -3428,16 +3428,24 @@ nsObjectLoadingContent::HasGoodFallback(
            child;
            child = child->GetNextNode(thisContent)) {
         if (child->IsHTMLElement(nsGkAtoms::video)) {
           return true;
         }
       }
     }
 
+    // RULE "nosrc":
+    // Use fallback content if the object has not specified an URI.
+    if (rulesList[i].EqualsLiteral("nosrc")) {
+      if (!mOriginalURI) {
+        return true;
+      }
+    }
+
     // RULE "adobelink":
     // Don't use fallback content when it has a link to adobe's website.
     if (rulesList[i].EqualsLiteral("adobelink")) {
       nsTArray<nsINodeList*> childNodes;
       for (nsIContent* child = thisContent->GetFirstChild();
            child;
            child = child->GetNextNode(thisContent)) {
         if (child->IsHTMLElement(nsGkAtoms::a)) {