Files
palemoon27/dom/html/nsGenericHTMLFrameElement.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

126 lines
4.5 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 nsGenericHTMLFrameElement_h
#define nsGenericHTMLFrameElement_h
#include "mozilla/Attributes.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/dom/nsBrowserElement.h"
#include "nsFrameLoader.h"
#include "nsGenericHTMLElement.h"
#include "nsIDOMEventListener.h"
#include "nsIFrameLoader.h"
#include "nsIMozBrowserFrame.h"
class nsXULElement;
/**
* A helper class for frame elements
*/
class nsGenericHTMLFrameElement : public nsGenericHTMLElement,
public nsIFrameLoaderOwner,
public mozilla::nsBrowserElement,
public nsIMozBrowserFrame
{
public:
nsGenericHTMLFrameElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
mozilla::dom::FromParser aFromParser)
: nsGenericHTMLElement(aNodeInfo)
, nsBrowserElement()
, mNetworkCreated(aFromParser == mozilla::dom::FROM_PARSER_NETWORK)
, mIsPrerendered(false)
, mBrowserFrameListenersRegistered(false)
, mFrameLoaderCreationDisallowed(false)
{
}
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIFRAMELOADEROWNER
NS_DECL_NSIDOMMOZBROWSERFRAME
NS_DECL_NSIMOZBROWSERFRAME
// nsIContent
virtual bool IsHTMLFocusable(bool aWithMouse, bool *aIsFocusable, int32_t *aTabIndex) override;
virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
nsIContent* aBindingParent,
bool aCompileEventHandlers) override;
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true) 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 UnsetAttr(int32_t aNameSpaceID, nsIAtom* aAttribute,
bool aNotify) override;
virtual nsresult AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
const nsAttrValue* aValue,
bool aNotify) override;
virtual void DestroyContent() override;
nsresult CopyInnerTo(mozilla::dom::Element* aDest);
virtual int32_t TabIndexDefault() override;
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsGenericHTMLFrameElement,
nsGenericHTMLElement)
void SwapFrameLoaders(nsXULElement& aOtherOwner, mozilla::ErrorResult& aError);
static bool BrowserFramesEnabled();
/**
* Helper method to map a HTML 'scrolling' attribute value to a nsIScrollable
* enum value. scrolling="no" (and its synonyms) maps to
* nsIScrollable::Scrollbar_Never, and anything else (including nullptr) maps
* to nsIScrollable::Scrollbar_Auto.
* @param aValue the attribute value to map or nullptr
* @return nsIScrollable::Scrollbar_Never or nsIScrollable::Scrollbar_Auto
*/
static int32_t MapScrollingAttribute(const nsAttrValue* aValue);
protected:
virtual ~nsGenericHTMLFrameElement();
// This doesn't really ensure a frame loader in all cases, only when
// it makes sense.
void EnsureFrameLoader();
nsresult LoadSrc();
nsIDocument* GetContentDocument();
nsresult GetContentDocument(nsIDOMDocument** aContentDocument);
already_AddRefed<nsPIDOMWindow> GetContentWindow();
nsresult GetContentWindow(nsIDOMWindow** aContentWindow);
RefPtr<nsFrameLoader> mFrameLoader;
/**
* 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;
bool mIsPrerendered;
bool mBrowserFrameListenersRegistered;
bool mFrameLoaderCreationDisallowed;
// 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;
private:
void GetManifestURLByType(nsIAtom *aAppType, nsAString& aOut);
};
#endif // nsGenericHTMLFrameElement_h