/* -*- 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/. */
namespace dom { class BrowserParent; template <typename> struct Nullable; class WindowProxyHolder; class XULFrameElement;
} // namespace dom
} // namespace mozilla
/** * A helper class for frame elements
*/ class nsGenericHTMLFrameElement : public nsGenericHTMLElement, public nsFrameLoaderOwner { public:
nsGenericHTMLFrameElement(
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
mozilla::dom::FromParser aFromParser)
: nsGenericHTMLElement(std::move(aNodeInfo)),
mSrcLoadHappened(false),
mNetworkCreated(aFromParser == mozilla::dom::FROM_PARSER_NETWORK) {}
/** * Helper method to map a HTML 'scrolling' attribute value (which can be null) * to a ScrollbarPreference value value. scrolling="no" (and its synonyms) * map to Never, and anything else to Auto.
*/ static mozilla::ScrollbarPreference MapScrollingAttribute(const nsAttrValue*);
// This doesn't really ensure a frame loader in all cases, only when // it makes sense. void EnsureFrameLoader(); void LoadSrc();
Document* GetContentDocument(nsIPrincipal& aSubjectPrincipal);
mozilla::dom::Nullable<mozilla::dom::WindowProxyHolder> GetContentWindow();
/** * True if we have already loaded the frame's original src
*/ bool mSrcLoadHappened;
/** * True when the element is created by the parser using the * NS_FROM_PARSER_NETWORK flag. * If the element is modified, it may lose the flag.
*/ bool mNetworkCreated;
// This flag is only used by <iframe>. See HTMLIFrameElement:: // FullscreenFlag() for details. It is placed here so that we // do not bloat any struct. bool mFullscreenFlag = false;
/** * Represents the iframe is deferred loading until this element gets visible. * We just do not load if set and leave specific elements to set it (see * HTMLIFrameElement).
*/ bool mLazyLoading = false;
private: void GetManifestURL(nsAString& aOut);
/** * This function is called by AfterSetAttr and OnAttrSetButNotChanged. * It will be called whether the value is being set or unset. * * @param aNamespaceID the namespace of the attr being set * @param aName the localname of the attribute being set * @param aValue the value being set or null if the value is being unset * @param aNotify Whether we plan to notify document observers.
*/ void AfterMaybeChangeAttr(int32_t aNamespaceID, nsAtom* aName, const nsAttrValueOrString* aValue,
nsIPrincipal* aMaybeScriptedPrincipal, bool aNotify);
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.