Bug 1332956 part 3. Implement the same behavior for <object>-inside-<object> and <object>-inside-mediaelement as we do for <embed> already. r=qdot
--- a/dom/base/nsObjectLoadingContent.cpp
+++ b/dom/base/nsObjectLoadingContent.cpp
@@ -83,32 +83,26 @@
#include "mozilla/dom/ScriptSettings.h"
#include "mozilla/dom/PluginCrashedEvent.h"
#include "mozilla/AsyncEventDispatcher.h"
#include "mozilla/EventDispatcher.h"
#include "mozilla/EventStates.h"
#include "mozilla/Telemetry.h"
#include "mozilla/dom/HTMLObjectElementBinding.h"
#include "mozilla/dom/HTMLSharedObjectElement.h"
+#include "mozilla/dom/HTMLObjectElement.h"
#include "nsChannelClassifier.h"
#ifdef XP_WIN
// Thanks so much, Microsoft! :(
#ifdef CreateEvent
#undef CreateEvent
#endif
#endif // XP_WIN
-#ifdef XP_MACOSX
-// HandlePluginCrashed() and HandlePluginInstantiated() needed from here to
-// fix bug 1147521. Should later be replaced by proper interface methods,
-// maybe on nsIObjectLoadingContext.
-#include "mozilla/dom/HTMLObjectElement.h"
-#endif
-
static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
static const char *kPrefJavaMIME = "plugin.java.mime";
static const char *kPrefYoutubeRewrite = "plugins.rewrite_youtube_embeds";
static const char *kPrefBlockURIs = "browser.safebrowsing.blockedURIs.enabled";
static const char *kPrefFavorFallbackMode = "plugins.favorfallback.mode";
static const char *kPrefFavorFallbackRules = "plugins.favorfallback.rules";
@@ -3013,50 +3007,53 @@ nsObjectLoadingContent::LoadFallback(Fal
NS_ASSERTION(!mInstanceOwner && !mFrameLoader && !mChannel,
"LoadFallback called with loaded content");
//
// Fixup mFallbackType
//
nsCOMPtr<nsIContent> thisContent =
- do_QueryInterface(static_cast<nsIImageLoadingContent*>(this));
+ do_QueryInterface(static_cast<nsIImageLoadingContent*>(this));
NS_ASSERTION(thisContent, "must be a content");
if (!thisContent->IsHTMLElement() || mContentType.IsEmpty()) {
// Don't let custom fallback handlers run outside HTML, tags without a
// determined type should always just be alternate content
aType = eFallbackAlternate;
}
// We'll set this to null no matter what now, doing it here means we'll load
// child embeds as we find them in the upcoming loop.
mType = eType_Null;
- // Do a breadth-first traverse of node tree with the current element as root,
- // looking for the first embed we can find.
+ bool thisIsObject = thisContent->IsHTMLElement(nsGkAtoms::object);
+
+ // Do a depth-first traverse of node tree with the current element as root,
+ // looking for <embed> or <object> elements that might now need to load.
nsTArray<nsINodeList*> childNodes;
if ((thisContent->IsHTMLElement(nsGkAtoms::object) ||
thisContent->IsHTMLElement(nsGkAtoms::applet)) &&
(aType == eFallbackUnsupported ||
aType == eFallbackDisabled ||
aType == eFallbackBlocklisted ||
aType == eFallbackAlternate))
{
for (nsIContent* child = thisContent->GetFirstChild(); child;
child = child->GetNextNode(thisContent)) {
if (aType != eFallbackAlternate &&
!child->IsHTMLElement(nsGkAtoms::param) &&
nsStyleUtil::IsSignificantChild(child, true, false)) {
aType = eFallbackAlternate;
}
- if (child->IsHTMLElement(nsGkAtoms::embed) &&
- thisContent->IsHTMLElement(nsGkAtoms::object)) {
- HTMLSharedObjectElement* object = static_cast<HTMLSharedObjectElement*>(child);
- if (object) {
+ if (thisIsObject) {
+ if (child->IsHTMLElement(nsGkAtoms::embed)) {
+ HTMLSharedObjectElement* embed = static_cast<HTMLSharedObjectElement*>(child);
+ embed->StartObjectLoad(true, true);
+ } else if (auto object = HTMLObjectElement::FromContent(child)) {
object->StartObjectLoad(true, true);
}
}
}
}
mFallbackType = aType;
@@ -3812,16 +3809,48 @@ nsObjectLoadingContent::MaybeFireErrorEv
RefPtr<AsyncEventDispatcher> loadBlockingAsyncDispatcher =
new LoadBlockingAsyncEventDispatcher(thisContent,
NS_LITERAL_STRING("error"),
false, false);
loadBlockingAsyncDispatcher->PostDOMEvent();
}
}
+bool
+nsObjectLoadingContent::BlockEmbedOrObjectContentLoading()
+{
+ nsCOMPtr<nsIContent> thisContent =
+ do_QueryInterface(static_cast<nsIImageLoadingContent*>(this));
+ if (!thisContent->IsHTMLElement(nsGkAtoms::embed) &&
+ !thisContent->IsHTMLElement(nsGkAtoms::object)) {
+ // Doesn't apply to other elements (i.e. <applet>)
+ return false;
+ }
+
+ // Traverse up the node tree to see if we have any ancestors that may block us
+ // from loading
+ for (nsIContent* parent = thisContent->GetParent();
+ parent;
+ parent = parent->GetParent()) {
+ if (parent->IsAnyOfHTMLElements(nsGkAtoms::video, nsGkAtoms::audio)) {
+ return true;
+ }
+ // If we have an ancestor that is an object with a source, it'll have an
+ // associated displayed type. If that type is not null, don't load content
+ // for the embed.
+ if (HTMLObjectElement* object = HTMLObjectElement::FromContent(parent)) {
+ uint32_t type = object->DisplayedType();
+ if (type != eType_Null) {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
// SetupProtoChainRunner implementation
nsObjectLoadingContent::SetupProtoChainRunner::SetupProtoChainRunner(
nsObjectLoadingContent* aContent)
: mContent(aContent)
{
}
NS_IMETHODIMP
--- a/dom/base/nsObjectLoadingContent.h
+++ b/dom/base/nsObjectLoadingContent.h
@@ -329,16 +329,31 @@ class nsObjectLoadingContent : public ns
void UnbindFromTree(bool aDeep = true,
bool aNullParent = true);
/**
* Return the content policy type used for loading the element.
*/
virtual nsContentPolicyType GetContentPolicyType() const = 0;
+ /**
+ * Decides whether we should load <embed>/<object> node content.
+ *
+ * If this is an <embed> or <object> node there are cases in which we should
+ * not try to load the content:
+ *
+ * - If the node is the child of a media element
+ * - If the node is the child of an <object> node that already has
+ * content being loaded.
+ *
+ * In these cases, this function will return false, which will cause
+ * us to skip calling LoadObject.
+ */
+ bool BlockEmbedOrObjectContentLoading();
+
private:
// Object parameter changes returned by UpdateObjectParameters
enum ParameterUpdateFlags {
eParamNoChange = 0,
// Parameters that potentially affect the channel changed
// - mOriginalURI, mOriginalContentType
eParamChannelChanged = 1u << 0,
--- a/dom/html/HTMLObjectElement.cpp
+++ b/dom/html/HTMLObjectElement.cpp
@@ -74,17 +74,17 @@ HTMLObjectElement::IsDoneAddingChildren(
void
HTMLObjectElement::DoneAddingChildren(bool aHaveNotified)
{
mIsDoneAddingChildren = true;
// If we're already in a document, we need to trigger the load
// Otherwise, BindToTree takes care of that.
if (IsInComposedDoc()) {
- StartObjectLoad(aHaveNotified);
+ StartObjectLoad(aHaveNotified, false);
}
}
NS_IMPL_CYCLE_COLLECTION_CLASS(HTMLObjectElement)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(HTMLObjectElement,
nsGenericHTMLFormElement)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mValidity)
@@ -305,34 +305,36 @@ HTMLObjectElement::SetAttr(int32_t aName
// if aNotify is false, we are coming from the parser or some such place;
// we'll get bound after all the attributes have been set, so we'll do the
// object load from BindToTree/DoneAddingChildren.
// Skip the LoadObject call in that case.
// We also don't want to start loading the object when we're not yet in
// a document, just in case that the caller wants to set additional
// attributes before inserting the node into the document.
if (aNotify && IsInComposedDoc() && mIsDoneAddingChildren &&
- aNameSpaceID == kNameSpaceID_None && aName == nsGkAtoms::data) {
+ aNameSpaceID == kNameSpaceID_None && aName == nsGkAtoms::data &&
+ !BlockEmbedOrObjectContentLoading()) {
return LoadObject(aNotify, true);
}
return NS_OK;
}
nsresult
HTMLObjectElement::UnsetAttr(int32_t aNameSpaceID, nsIAtom* aAttribute,
bool aNotify)
{
nsresult rv = nsGenericHTMLFormElement::UnsetAttr(aNameSpaceID,
aAttribute, aNotify);
NS_ENSURE_SUCCESS(rv, rv);
// See comment in SetAttr
if (aNotify && IsInComposedDoc() && mIsDoneAddingChildren &&
- aNameSpaceID == kNameSpaceID_None && aAttribute == nsGkAtoms::data) {
+ aNameSpaceID == kNameSpaceID_None && aAttribute == nsGkAtoms::data &&
+ !BlockEmbedOrObjectContentLoading()) {
return LoadObject(aNotify, true);
}
return NS_OK;
}
bool
HTMLObjectElement::IsFocusableForTabIndex()
@@ -530,25 +532,26 @@ HTMLObjectElement::IsAttributeMapped(con
nsMapRuleToAttributesFunc
HTMLObjectElement::GetAttributeMappingFunction() const
{
return &MapAttributesIntoRule;
}
void
-HTMLObjectElement::StartObjectLoad(bool aNotify)
+HTMLObjectElement::StartObjectLoad(bool aNotify, bool aForce)
{
// BindToTree can call us asynchronously, and we may be removed from the tree
// in the interim
- if (!IsInComposedDoc() || !OwnerDoc()->IsActive()) {
+ if (!IsInComposedDoc() || !OwnerDoc()->IsActive() ||
+ BlockEmbedOrObjectContentLoading()) {
return;
}
- LoadObject(aNotify);
+ LoadObject(aNotify, aForce);
SetIsNetworkCreated(false);
}
EventStates
HTMLObjectElement::IntrinsicState() const
{
return nsGenericHTMLFormElement::IntrinsicState() | ObjectState();
}
--- a/dom/html/HTMLObjectElement.h
+++ b/dom/html/HTMLObjectElement.h
@@ -93,17 +93,17 @@ public:
// nsObjectLoadingContent
virtual uint32_t GetCapabilities() const override;
virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override;
nsresult CopyInnerTo(Element* aDest);
- void StartObjectLoad() { StartObjectLoad(true); }
+ void StartObjectLoad() { StartObjectLoad(true, false); }
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(HTMLObjectElement,
nsGenericHTMLFormElement)
// Web IDL binding methods
// XPCOM GetData is ok; note that it's a URI attribute with a weird base URI
void SetData(const nsAString& aValue, ErrorResult& aRv)
{
@@ -242,22 +242,22 @@ public:
}
nsIDocument*
GetSVGDocument(nsIPrincipal& aSubjectPrincipal)
{
return GetContentDocument(aSubjectPrincipal);
}
-private:
/**
* Calls LoadObject with the correct arguments to start the plugin load.
*/
- void StartObjectLoad(bool aNotify);
+ void StartObjectLoad(bool aNotify, bool aForceLoad);
+private:
/**
* Returns if the element is currently focusable regardless of it's tabindex
* value. This is used to know the default tabindex value.
*/
bool IsFocusableForTabIndex();
nsContentPolicyType GetContentPolicyType() const override
{
--- a/dom/html/HTMLSharedObjectElement.cpp
+++ b/dom/html/HTMLSharedObjectElement.cpp
@@ -175,17 +175,17 @@ HTMLSharedObjectElement::SetAttr(int32_t
// we'll get bound after all the attributes have been set, so we'll do the
// object load from BindToTree/DoneAddingChildren.
// Skip the LoadObject call in that case.
// We also don't want to start loading the object when we're not yet in
// a document, just in case that the caller wants to set additional
// attributes before inserting the node into the document.
if (aNotify && IsInComposedDoc() && mIsDoneAddingChildren &&
aNameSpaceID == kNameSpaceID_None && aName == URIAttrName()
- && !BlockEmbedContentLoading()) {
+ && !BlockEmbedOrObjectContentLoading()) {
return LoadObject(aNotify, true);
}
return NS_OK;
}
bool
HTMLSharedObjectElement::IsHTMLFocusable(bool aWithMouse,
@@ -308,17 +308,17 @@ HTMLSharedObjectElement::GetAttributeMap
}
void
HTMLSharedObjectElement::StartObjectLoad(bool aNotify, bool aForceLoad)
{
// BindToTree can call us asynchronously, and we may be removed from the tree
// in the interim
if (!IsInComposedDoc() || !OwnerDoc()->IsActive() ||
- BlockEmbedContentLoading()) {
+ BlockEmbedOrObjectContentLoading()) {
return;
}
LoadObject(aNotify, aForceLoad);
SetIsNetworkCreated(false);
}
EventStates
@@ -384,36 +384,10 @@ HTMLSharedObjectElement::GetContentPolic
// through RequestContext yet.
return nsIContentPolicy::TYPE_INTERNAL_OBJECT;
} else {
MOZ_ASSERT(mNodeInfo->Equals(nsGkAtoms::embed));
return nsIContentPolicy::TYPE_INTERNAL_EMBED;
}
}
-bool
-HTMLSharedObjectElement::BlockEmbedContentLoading()
-{
- // Only check on embed elements
- if (!IsHTMLElement(nsGkAtoms::embed)) {
- return false;
- }
- // Traverse up the node tree to see if we have any ancestors that may block us
- // from loading
- for (nsIContent* parent = GetParent(); parent; parent = parent->GetParent()) {
- if (parent->IsAnyOfHTMLElements(nsGkAtoms::video, nsGkAtoms::audio)) {
- return true;
- }
- // If we have an ancestor that is an object with a source, it'll have an
- // associated displayed type. If that type is not null, don't load content
- // for the embed.
- if (HTMLObjectElement* object = HTMLObjectElement::FromContent(parent)) {
- uint32_t type = object->DisplayedType();
- if (type != eType_Null) {
- return true;
- }
- }
- }
- return false;
-}
-
} // namespace dom
} // namespace mozilla
--- a/dom/html/HTMLSharedObjectElement.h
+++ b/dom/html/HTMLSharedObjectElement.h
@@ -215,29 +215,14 @@ private:
// mIsDoneAddingChildren is only really used for <applet>. This boolean is
// always true for <embed>, per the documentation in nsIContent.h.
bool mIsDoneAddingChildren;
virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override;
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
GenericSpecifiedValues* aGenericData);
-
- /**
- * Decides whether we should load embed node content.
- *
- * If this is an embed node there are cases in which we should not try to load
- * the content:
- *
- * - If the embed node is the child of a media element
- * - If the embed node is the child of an object node that already has
- * content being loaded.
- *
- * In these cases, this function will return false, which will cause
- * us to skip calling LoadObject.
- */
- bool BlockEmbedContentLoading();
};
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_HTMLSharedObjectElement_h
--- a/dom/tests/mochitest/general/resource_timing_cross_origin.html
+++ b/dom/tests/mochitest/general/resource_timing_cross_origin.html
@@ -165,23 +165,23 @@ function finishTests() {
<body>
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=822480"
title="Add resource timing API.">
Bug #822480 - Add in the Resource Timing API
</a>
<p id="display"></p>
<div id="content">
- <object data="http://mochi.test:8888/tests/dom/tests/mochitest/general/res0.resource"> <!-- same origin, no header -->
- <object data="http://test1.example.com/tests/dom/tests/mochitest/general/res0.resource"> <!-- cross origin, no header -->
- <object data="http://test1.example.com/tests/dom/tests/mochitest/general/res1.resource"> <!-- cross origin, Timing-Allow-Origin: * header -->
- <object data="http://test1.example.com/tests/dom/tests/mochitest/general/res2.resource"> <!-- cross origin redirect to test2.example.com, no header -->
- <object data="http://test1.example.com/tests/dom/tests/mochitest/general/res3.resource"> <!-- cross origin, Timing-Allow-Origin: http://mochi.test:8888 header -->
- <object data="http://test1.example.com/tests/dom/tests/mochitest/general/res4.resource"> <!-- cross origin redirect to mochi.test:8888/.../res1.resource, Timing-Allow-Origin: * -->
- <object data="http://test1.example.com/tests/dom/tests/mochitest/general/res5.resource"> <!-- cross origin, Timing-Allow-Origin: http://mochi.test:8889 -->
- <object data="http://test1.example.com/tests/dom/tests/mochitest/general/res6.resource"> <!-- cross origin, Timing-Allow-Origin: "" (empty string) -->
- <object data="http://test1.example.com/tests/dom/tests/mochitest/general/res7.resource"> <!-- cross origin, Timing-Allow-Origin: http://mochi.test:8888 http://test1.com header -->
- <object data="http://test1.example.com/tests/dom/tests/mochitest/general/res8.resource"> <!-- double cross origin redirect -->
+ <object data="http://mochi.test:8888/tests/dom/tests/mochitest/general/res0.resource"></object> <!-- same origin, no header -->
+ <object data="http://test1.example.com/tests/dom/tests/mochitest/general/res0.resource"></object> <!-- cross origin, no header -->
+ <object data="http://test1.example.com/tests/dom/tests/mochitest/general/res1.resource"></object> <!-- cross origin, Timing-Allow-Origin: * header -->
+ <object data="http://test1.example.com/tests/dom/tests/mochitest/general/res2.resource"></object> <!-- cross origin redirect to test2.example.com, no header -->
+ <object data="http://test1.example.com/tests/dom/tests/mochitest/general/res3.resource"></object> <!-- cross origin, Timing-Allow-Origin: http://mochi.test:8888 header -->
+ <object data="http://test1.example.com/tests/dom/tests/mochitest/general/res4.resource"></object> <!-- cross origin redirect to mochi.test:8888/.../res1.resource, Timing-Allow-Origin: * -->
+ <object data="http://test1.example.com/tests/dom/tests/mochitest/general/res5.resource"></object> <!-- cross origin, Timing-Allow-Origin: http://mochi.test:8889 -->
+ <object data="http://test1.example.com/tests/dom/tests/mochitest/general/res6.resource"></object> <!-- cross origin, Timing-Allow-Origin: "" (empty string) -->
+ <object data="http://test1.example.com/tests/dom/tests/mochitest/general/res7.resource"></object> <!-- cross origin, Timing-Allow-Origin: http://mochi.test:8888 http://test1.com header -->
+ <object data="http://test1.example.com/tests/dom/tests/mochitest/general/res8.resource"></object> <!-- double cross origin redirect -->
<script type="text/javascript" src="http://mochi.test:8888/tests/dom/tests/mochitest/general/resource_timing.js"></script> <!-- same origin script -->
</div>
</body>
</html>
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -92462,16 +92462,28 @@
]
],
"html/semantics/embedded-content/the-object-element/object-handler.html": [
[
"/html/semantics/embedded-content/the-object-element/object-handler.html",
{}
]
],
+ "html/semantics/embedded-content/the-object-element/object-ignored-in-media-element.html": [
+ [
+ "/html/semantics/embedded-content/the-object-element/object-ignored-in-media-element.html",
+ {}
+ ]
+ ],
+ "html/semantics/embedded-content/the-object-element/object-in-object-fallback-2.html": [
+ [
+ "/html/semantics/embedded-content/the-object-element/object-in-object-fallback-2.html",
+ {}
+ ]
+ ],
"html/semantics/embedded-content/the-object-element/usemap-casing.html": [
[
"/html/semantics/embedded-content/the-object-element/usemap-casing.html",
{}
]
],
"html/semantics/embedded-content/the-video-element/video-tabindex.html": [
[
@@ -174544,17 +174556,17 @@
"e6611c20a50884639a51010836bb2b1bdfb9cab8",
"testharness"
],
"html/semantics/embedded-content/the-embed-element/embed-iframe.html": [
"96a043e993bccf1896f5a19960a1bff5dce0e79d",
"support"
],
"html/semantics/embedded-content/the-embed-element/embed-ignored-in-media-element.html": [
- "94a08a7a5b5ec5c26f1974d5e5d8b4381a60baf5",
+ "cb57cbe52e4f586006461b8eae6bc233b5ed5ad5",
"testharness"
],
"html/semantics/embedded-content/the-embed-element/embed-in-object-fallback-2.html": [
"a7da1fefb2403084205bf1ead77b422e69dc33b6",
"testharness"
],
"html/semantics/embedded-content/the-embed-element/embed-in-object-fallback-subdocument.html": [
"1b60c4e5c8868fe87553b78047e711d63702a673",
@@ -174867,16 +174879,24 @@
"html/semantics/embedded-content/the-object-element/object-fallback.html": [
"7bb46b36376a1afd004cf0537bdedd975088b2f2",
"testharness"
],
"html/semantics/embedded-content/the-object-element/object-handler.html": [
"bf051d12a045698b2f9c3870ad4236f65bb85f51",
"testharness"
],
+ "html/semantics/embedded-content/the-object-element/object-ignored-in-media-element.html": [
+ "62a6c079bc00ae6ebeca363fd42d8701c4791222",
+ "testharness"
+ ],
+ "html/semantics/embedded-content/the-object-element/object-in-object-fallback-2.html": [
+ "a5bb885111ac7ea02241957ee7233491c2277516",
+ "testharness"
+ ],
"html/semantics/embedded-content/the-object-element/test0.html": [
"04319dea2f1e0b00e8db1703f2072ec22f1a82ad",
"support"
],
"html/semantics/embedded-content/the-object-element/test1.html": [
"c083a73f9b0f3d2f4a3796f113144227e6567d0f",
"support"
],
copy from testing/web-platform/tests/html/semantics/embedded-content/the-embed-element/embed-ignored-in-media-element.html
copy to testing/web-platform/tests/html/semantics/embedded-content/the-object-element/object-ignored-in-media-element.html
--- a/testing/web-platform/tests/html/semantics/embedded-content/the-embed-element/embed-ignored-in-media-element.html
+++ b/testing/web-platform/tests/html/semantics/embedded-content/the-object-element/object-ignored-in-media-element.html
@@ -1,22 +1,22 @@
<!doctype html>
<meta charset="utf-8">
<title>HTML Test: The embed element represents a document</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<meta name="assert" content="Check if the embed element is ignored when used inside a media element">
+<meta name="assert" content="Check if the object element is ignored when used inside a media element">
<script type="application/javascript">
- var nestingTest = async_test("Test embed being ignored inside media element");
+ var nestingTest = async_test("Test <object> being ignored inside media element");
onload = nestingTest.step_func_done(function() {
assert_true(true, "We got to a load event without loading things we should not load");
});
</script>
<body>
<video>
- <embed type="text/html" src="../resources/should-not-load.html"
- test-description="<embed> in <video>">
+ <object type="text/html" data="../resources/should-not-load.html"
+ test-description="<object> in <video>"></object>
</video>
<audio>
- <embed type="text/html" src="../resources/should-not-load.html"
- test-description="<embed> in <audio>">
+ <object type="text/html" data="../resources/should-not-load.html"
+ test-description="<object> in <audio>"></object>
</audio>
</body>
copy from testing/web-platform/tests/html/semantics/embedded-content/the-embed-element/embed-in-object-fallback-2.html
copy to testing/web-platform/tests/html/semantics/embedded-content/the-object-element/object-in-object-fallback-2.html
--- a/testing/web-platform/tests/html/semantics/embedded-content/the-embed-element/embed-in-object-fallback-2.html
+++ b/testing/web-platform/tests/html/semantics/embedded-content/the-object-element/object-in-object-fallback-2.html
@@ -2,55 +2,55 @@
<html>
<head>
<meta charset=utf-8>
<title></title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
var loadedCount = 0;
- var nestingTest = async_test("Test <embed> nesting inside <object>");
+ var nestingTest = async_test("Test <object> nesting inside <object>");
onload = nestingTest.step_func_done(function() {
assert_equals(loadedCount, 12, "Should have loaded all should-load elements");
});
</script>
<style>
- object, embed { display: none }
+ object { display: none }
</style>
</head>
<body>
<object data="../resources/should-load.html" style="width: 100px; height: 100px">
- <embed type="text/html" src="../resources/should-not-load.html"
- test-description="<embed> inside <object>">
+ <object type="text/html" data="../resources/should-not-load.html"
+ test-description="<object> inside <object>"></object>
</object>
<object style="width: 100px; height: 100px" data="data:application/x-does-not-exist,test">
- <embed type="text/html" src="../resources/should-load.html" />
+ <object type="text/html" data="../resources/should-load.html"></object>
</object>
<object style="width: 100px; height: 100px" data="data:application/x-does-not-exist,test">
<div></div>
- <embed type="text/html" src="../resources/should-load.html" />
+ <object type="text/html" data="../resources/should-load.html"></object>
</object>
<object style="width: 100px; height: 100px" data="data:application/x-does-not-exist,test">
<div>
- <embed type="text/html" src="../resources/should-load.html" />
+ <object type="text/html" data="../resources/should-load.html"></object>
</div>
</object>
<object style="width: 100px; height: 100px" data="data:application/x-does-not-exist,test">
- <embed type="text/html" src="../resources/should-load.html" />
- <embed type="text/html" src="../resources/should-load.html" />
+ <object type="text/html" data="../resources/should-load.html"></object>
+ <object type="text/html" data="../resources/should-load.html"></object>
<object data="../resources/should-load.html">
- <embed type="text/html" src="../resources/should-not-load.html"
- test-description="<embed> inside loaded <object> inside non-loaded <object>">
+ <object type="text/html" data="../resources/should-not-load.html"
+ test-description="<object> inside loaded <object> inside non-loaded <object>"></object>
</object>
<object data="data:application/x-does-not-exist,test">
- <embed type="text/html" src="../resources/should-load.html" />
+ <object type="text/html" data="../resources/should-load.html"></object>
</object>
</object>
<div>
<object data="../resources/should-load.html" style="width: 100px; height: 100px"></object>
- <embed type="text/html" src="../resources/should-load.html" />
+ <object type="text/html" data="../resources/should-load.html"></object>
</div>
<div>
- <embed type="text/html" src="../resources/should-load.html" />
+ <object type="text/html" data="../resources/should-load.html"></object>
<object data="../resources/should-load.html" style="width: 100px; height: 100px"></object>
</div>
</body>
</html>