/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
void HTMLEmbedElement::AfterMaybeChangeAttr(int32_t aNamespaceID, nsAtom* aName, bool aNotify) { if (aNamespaceID != kNameSpaceID_None || aName != nsGkAtoms::src) { return;
} // 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. // 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() || BlockEmbedOrObjectContentLoading()) { return;
}
nsContentUtils::AddScriptRunner(NS_NewRunnableFunction( "HTMLEmbedElement::LoadObject",
[self = RefPtr<HTMLEmbedElement>(this), aNotify]() { if (self->IsInComposedDoc()) {
self->LoadObject(aNotify, true);
}
}));
}
bool HTMLEmbedElement::IsHTMLFocusable(IsFocusableFlags aFlags, bool* aIsFocusable, int32_t* aTabIndex) { // Has non-plugin content: let the plugin decide what to do in terms of // internal focus from mouse clicks if (aTabIndex) {
*aTabIndex = TabIndex();
}
*aIsFocusable = true;
// Let the plugin decide, so override. returntrue;
}
void HTMLEmbedElement::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() ||
BlockEmbedOrObjectContentLoading()) { return;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.