Files
palemoon27/dom/html/HTMLIFrameElement.h
T
roytam1 29e855d998 import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1176782 part 2 - [css-align] Implement the 'justify-self' property in the style system. r=SimonSapin (273ee9a0a1)
- Bug 1194480: Only update overflow region (& trigger DLBI) for changes to CSS 'box-shadow' or 'text-shadow', instead of triggering a reflow. r=heycam (0af1ee160b)
- Bug 1137889 part 1 - Update predefined counter style name table to match the spec. r=jfkthame (ff678af4a9)
- Bug 1137889 part 2 - Move around definitions in counterstyles.css to match the order in spec for clarity. r=jfkthame (c1a95688d9)
- Bug 1187649 - Free constructed widget path in nsLookAndFeel on GTK. r=karlt (fe80b73514)
- Bug 1165513 - Translate GTK3 widgets with snapped pixel coordinates into identity space. r=jrmuizel (563c252255)
- Bug 1113206 patch 2: Disable use of Cocoa and Gtk native-theme dropdown rendering that doesn't play well with vertical writing mode. r=roc (3b8134aced)
- Bug 1187203 - Implement GtkInfoBar appearance style on GTK3. r=karlt (0500e6297a)
- Bug 1168527 - Replay clips into the system cairo on GTK3. r=lsalzman (9f739f58cc)
- Bug 1168527 - Variable was re-declared causing a bustage on gcc 5. r=lsalzman (4e7f5453f2)
- Bug 1167239 - Make GTK button activity require hover. r=karlt (34cb428ed3)
- Bug 1177024 - Fix clang warnings-as-errors in GTK3 build. r=karlt (d45119470b)
- Bug 1179780 - Render opaque scrollbar troughs in the root viewport on GTK3. r=karlt (8f04f119b0)
- Bug 1210560 - Part 1: Add an API specifically intended for users that just Push and Pop-Mask/Pop-Paint. r=jrmuizel (e08db740f9)
- Bug 991249 - Ensure that we can check for OOMs when we run out of ballast space. r=jandem (0742c71158)
- Bug 1219419 - Keep DefaultTracer simple for now; r=fitzgen (bb621675d5)
- Bug 1220310 - Generalize GC container trace function dispatch as GCPolicy; r=sfink (314b3aa009)
- Bug 1187782 (part 10) - Replace nsBaseHashtable::EnumerateRead() calls in dom/base/ with iterators. r=khuey. (1def283d70)
- Bug 1187782 (part 11) - Replace nsBaseHashtable::EnumerateRead() calls in dom/base/ with iterators. r=khuey. (e9a71fae11)
- Bug 1187782 (part 12) - Replace nsBaseHashtable::EnumerateRead() calls in dom/base/ with iterators. r=khuey. (44afb0d6f6)
- Bug 1187782 (part 13) - Replace nsBaseHashtable::EnumerateRead() calls in dom/base/ with iterators. r=khuey. (4e253c8d18)
- Bug 1187782 (part 14) - Replace nsBaseHashtable::EnumerateRead() calls in dom/base/ with iterators. r=khuey. (cf8ecf213a)
- Bug 859042 - Show onload and DOMContentLoaded markers in the timeline, r=smaug, jsantell (8ff8c43a36)
- Bug 1187801 part 2 - Put clearing fullscreen state on element into an independent function. r=smaug (c8a135fbc9)
- Bug 1187801 part 3 - Add iframe fullscreen flag and stop auto-rollback when this flag presents. r=smaug (f0c928090a)
- Bug 1187801 part 4 - Add test for iframe fullscreen flag. r=smaug (851d97d772)
- Bug 1188028 - Use channel->ascynOpen2 in dom/security/nsCSPContext.cpp (r=sicking) (54c9e0017e)
- Bug 1218315 - Replace NS_LITERAL_STRING(...).get() with MOZ_UTF16(...) on dom. r=nfroyd (4439f10159)
- Bug 1188028 - Queue up CSP console messages till windowID is available (r=sicking) (b060ba7ea3)
- Bug 1085293 - File renames for WebIDL Iterable Implementation; r=bz (5d61d3ae34)
- Bug 1085293 - WebIDL Iterable Implementation and Tests; r=bz (720efc275f)
- Bug 1215559. Create separate iterator native types for one-type and two-type iterators, so we don't force the one-type case to implement GetKeyAtIndex. r=qdot (649284e6fc)
- Bug 1174915 - Allow changing meta referrer policy on the fly, tests (r=sstamm) (02b8482802)
- Bug 1211624. document.all should be iterable, and so should be various other things that have an anonymous indexed getter. r=qdot (6620287943)
- Bug 1052139 - Reorder CGCreateInterfaceObjectsMethod a bit to correspond to the ordering of generated code. r=bz (cc16b9c3b2)
- Bug 1052139 - Perform proper failure handling in interfaces' CreateInterfaceObjects method, after dom::CreateInterfaceObjects has been called and possibly created the interface's constructor and prototype. r=bz (6690e2a9de)
- Bug 1052139 - Make more parts of the global object's prototype chain immutable, when we flip that switch. r=bz (6f1878822b)
- Bug 1210570 - Ensure that ToPrimitive(location) is not spoofable. r=bz. (48ac711b2e)
- Bug 1220900 - Remove unused JSBindingFinalized, r=peterv (7f6cbd6483)
- missing bit of Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T> (48a0a7b75a)
- Bug 1052139 - Make the [[Prototype]] of various (but not all) objects on the window object's [[Prototype]] chain immutable. BUT, also disable the code that actually respects immutable-prototype handling -- it'll be a one-liner to revert this when we're ready to do so. Making the rest of the chain immutable will happen in separate patches. r=bz (091e4f4ad0)
- Bug 1174915 - Allow changing meta referrer policy on the fly (r=baku,sstamm) (e8b6f30f88)
- Bug 1211607, part 1 - Document JSAPI functions that call object internal methods: JS_GetPrototype through JS_PreventExtensions. r=jandem. (4ebe70f5ea)
- Bug 1211607, part 2 - JS_GetOwnPropertyDescriptor and friends. r=jandem. (73de8f3e51)
- Bug 1211607, part 3 - JS_DefineProperty and friends. r=jandem. (29da979627)
- Bug 1211607, part 4 - JS_HasProperty and friends. r=jandem. (130aa265c8)
- Bug 1211607, part 5 - JS_GetProperty and friends. r=jandem. (a19f9d5d1c)
- Bug 1211607, part 6 - JS_SetProperty and friends. r=jandem. (75de9a5774)
- Bug 1211607, part 7 - JS_DeleteProperty and friends. r=jandem. (fe88179d48)
- Bug 1211607, part 8 - JS_Enumerate. r=jandem. (332a0cf1a9)
- Bug 1211607, part 9 - JS::Call, JS::Construct, and friends. r=jandem. (a68585dfdb)
- Bug 663570 - MetaCSP Part 1: CSP parser changes (r=sicking) (b6c5e80c44)
- Bug 1220602 - Make the documentation for nsIPrincipal.domain useful. r=bholley IGNORE IDL (afa28df415)
- Bug 1218039 - Add a nice interface for both C++ and JS to access the principal kind. r=gabor (4449599c4b)
- Bug 663570 - MetaCSP Part 2: Principal changes (r=bz) (84fe26e407)
- Bug 1201783 - Throw range error for too long array spread before updating length. r=Waldo, a=abillings (633b55a5f8)
- Bug 1194052 - Update Clone() functionality of LoadInfo (r=sicking) (f3bb041849)
- Bug 663570 - MetaCSP Part 3: Upgrade insecure requests changes (r=bz) (0c8e3f49e5)
- fix misspatch of 1194052 (743dd0269b)
- Bug 663570 - MetaCSP Part 4: Speculative parser changes (r=bz) (c94c58b160)
- Bug 663570 - MetaCSP Part 5: HTMLMetaElement changes (r=bz) (f4b8bd8af1)
- Bug 1215140 P3 Flush pending console reports on http channels. r=bz (32d2767b68)
- Bug 1188545 - respondWith promise should extend the service worker's lifetime. r=nsm (5a8e02a500)
- Bug 1179401 - Call stopImmediatePropagation() on the Event object in respondWith(); r=jdm (0e33f8d8fb)
- Bug 1188545 - ServiceWorkerRegistrationInfo::Clear() should terminated workers. r=nsm (a35c5df80a)
- Bug 1188545 - Cosmetic changes regarding workerPrivate properties shared between shared workers and service workers. r=nsm (516c70e34e)
- Bug 1188545 - Terminate service workers that have been idle for some time. r=nsm (d7582cb1bb)
- Bug 1182113 - Test XSLT serviceworker load. r=bkelly (797ca864a6)
- Bug 1188545 - Cancel network interceptions when the service worker is being terminated with unresolved respondWith promises. r=nsm (6df3a8eda6)
- Bug 1221308 Fix some service worker related warnings. r=baku (dd6f62379e)
- Bug 1208559 - Do a CSP Check in ServiceWorkerManager::Register (r=ckerschb) (5cc2df68ab)
- Bug 1221365 - Move "Is origin potentially trustworthy?" logic outside ServiceWorkerManager.cpp. r=ckerschb,bkelly (91c6f8e2b5)
- Bug 1208559 - Hook up ServicerWorkers with CSP (r=sicking,bkelly,dveditz) (6a6f92e8c7)
- Bug 1185558 - Send a "Service-Worker: script" header when downloading service worker scripts; r=bkelly (22162634a4)
- Bug 1207727 - Rework updating service workers according to the latest spec. r=bkelly (475c185ee4)
2022-11-17 11:29:02 +08:00

211 lines
6.6 KiB
C++

/* -*- 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/. */
#ifndef mozilla_dom_HTMLIFrameElement_h
#define mozilla_dom_HTMLIFrameElement_h
#include "mozilla/Attributes.h"
#include "nsGenericHTMLFrameElement.h"
#include "nsIDOMHTMLIFrameElement.h"
#include "nsDOMSettableTokenList.h"
namespace mozilla {
namespace dom {
class HTMLIFrameElement final : public nsGenericHTMLFrameElement
, public nsIDOMHTMLIFrameElement
{
public:
explicit HTMLIFrameElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
FromParser aFromParser = NOT_FROM_PARSER);
NS_IMPL_FROMCONTENT_HTML_WITH_TAG(HTMLIFrameElement, iframe)
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// Element
virtual bool IsInteractiveHTMLContent(bool aIgnoreTabindex) const override
{
return true;
}
// nsIDOMHTMLIFrameElement
NS_DECL_NSIDOMHTMLIFRAMEELEMENT
// nsIContent
virtual bool ParseAttribute(int32_t aNamespaceID,
nsIAtom* aAttribute,
const nsAString& aValue,
nsAttrValue& aResult) override;
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const override;
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const override;
virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override;
nsresult SetAttr(int32_t aNameSpaceID, nsIAtom* aName,
const nsAString& aValue, bool aNotify)
{
return SetAttr(aNameSpaceID, aName, nullptr, aValue, aNotify);
}
virtual nsresult SetAttr(int32_t aNameSpaceID, nsIAtom* aName,
nsIAtom* aPrefix, const nsAString& aValue,
bool aNotify) override;
virtual nsresult AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
const nsAttrValue* aValue,
bool aNotify) override;
virtual nsresult UnsetAttr(int32_t aNameSpaceID, nsIAtom* aAttribute,
bool aNotify) override;
uint32_t GetSandboxFlags();
// Web IDL binding methods
// The XPCOM GetSrc is fine for our purposes
void SetSrc(const nsAString& aSrc, ErrorResult& aError)
{
SetHTMLAttr(nsGkAtoms::src, aSrc, aError);
}
void GetSrcdoc(DOMString& aSrcdoc)
{
GetHTMLAttr(nsGkAtoms::srcdoc, aSrcdoc);
}
void SetSrcdoc(const nsAString& aSrcdoc, ErrorResult& aError)
{
SetHTMLAttr(nsGkAtoms::srcdoc, aSrcdoc, aError);
}
void GetName(DOMString& aName)
{
GetHTMLAttr(nsGkAtoms::name, aName);
}
void SetName(const nsAString& aName, ErrorResult& aError)
{
SetHTMLAttr(nsGkAtoms::name, aName, aError);
}
nsDOMSettableTokenList* Sandbox()
{
return GetTokenList(nsGkAtoms::sandbox);
}
bool AllowFullscreen() const
{
return GetBoolAttr(nsGkAtoms::allowfullscreen);
}
void SetAllowFullscreen(bool aAllow, ErrorResult& aError)
{
SetHTMLBoolAttr(nsGkAtoms::allowfullscreen, aAllow, aError);
}
void GetWidth(DOMString& aWidth)
{
GetHTMLAttr(nsGkAtoms::width, aWidth);
}
void SetWidth(const nsAString& aWidth, ErrorResult& aError)
{
SetHTMLAttr(nsGkAtoms::width, aWidth, aError);
}
void GetHeight(DOMString& aHeight)
{
GetHTMLAttr(nsGkAtoms::height, aHeight);
}
void SetHeight(const nsAString& aHeight, ErrorResult& aError)
{
SetHTMLAttr(nsGkAtoms::height, aHeight, aError);
}
using nsGenericHTMLFrameElement::GetContentDocument;
using nsGenericHTMLFrameElement::GetContentWindow;
void GetAlign(DOMString& aAlign)
{
GetHTMLAttr(nsGkAtoms::align, aAlign);
}
void SetAlign(const nsAString& aAlign, ErrorResult& aError)
{
SetHTMLAttr(nsGkAtoms::align, aAlign, aError);
}
void GetScrolling(DOMString& aScrolling)
{
GetHTMLAttr(nsGkAtoms::scrolling, aScrolling);
}
void SetScrolling(const nsAString& aScrolling, ErrorResult& aError)
{
SetHTMLAttr(nsGkAtoms::scrolling, aScrolling, aError);
}
void GetFrameBorder(DOMString& aFrameBorder)
{
GetHTMLAttr(nsGkAtoms::frameborder, aFrameBorder);
}
void SetFrameBorder(const nsAString& aFrameBorder, ErrorResult& aError)
{
SetHTMLAttr(nsGkAtoms::frameborder, aFrameBorder, aError);
}
// The XPCOM GetLongDesc is fine
void SetLongDesc(const nsAString& aLongDesc, ErrorResult& aError)
{
SetHTMLAttr(nsGkAtoms::longdesc, aLongDesc, aError);
}
void GetMarginWidth(DOMString& aMarginWidth)
{
GetHTMLAttr(nsGkAtoms::marginwidth, aMarginWidth);
}
void SetMarginWidth(const nsAString& aMarginWidth, ErrorResult& aError)
{
SetHTMLAttr(nsGkAtoms::marginwidth, aMarginWidth, aError);
}
void GetMarginHeight(DOMString& aMarginHeight)
{
GetHTMLAttr(nsGkAtoms::marginheight, aMarginHeight);
}
void SetMarginHeight(const nsAString& aMarginHeight, ErrorResult& aError)
{
SetHTMLAttr(nsGkAtoms::marginheight, aMarginHeight, aError);
}
void SetReferrer(const nsAString& aReferrer, ErrorResult& aError)
{
SetHTMLAttr(nsGkAtoms::referrer, aReferrer, aError);
}
void GetReferrer(nsAString& aReferrer)
{
GetHTMLAttr(nsGkAtoms::referrer, aReferrer);
}
nsIDocument* GetSVGDocument()
{
return GetContentDocument();
}
bool Mozbrowser() const
{
return GetBoolAttr(nsGkAtoms::mozbrowser);
}
void SetMozbrowser(bool aAllow, ErrorResult& aError)
{
SetHTMLBoolAttr(nsGkAtoms::mozbrowser, aAllow, aError);
}
using nsGenericHTMLFrameElement::SetMozbrowser;
// nsGenericHTMLFrameElement::GetFrameLoader is fine
// nsGenericHTMLFrameElement::GetAppManifestURL is fine
// The fullscreen flag is set to true only when requestFullscreen is
// explicitly called on this <iframe> element. In case this flag is
// set, the fullscreen state of this element will not be reverted
// automatically when its subdocument exits fullscreen.
bool FullscreenFlag() const { return mFullscreenFlag; }
void SetFullscreenFlag(bool aValue) { mFullscreenFlag = aValue; }
protected:
virtual ~HTMLIFrameElement();
virtual void GetItemValueText(DOMString& text) override;
virtual void SetItemValueText(const nsAString& text) override;
virtual JSObject* WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
private:
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
};
} // namespace dom
} // namespace mozilla
#endif