mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 17:55:50 +00:00
Bug 1606528 - part 1: Implement BrowsingContext::IsTop(). r=kmag
This is a frequent pattern. Differential Revision: https://phabricator.services.mozilla.com/D58480 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
b380a4a808
commit
02e6ecc1ca
@ -221,6 +221,8 @@ class BrowsingContext : public nsISupports,
|
||||
bool IsContent() const { return mType == Type::Content; }
|
||||
bool IsChrome() const { return !IsContent(); }
|
||||
|
||||
bool IsTop() const { return !GetParent(); }
|
||||
|
||||
bool IsTopContent() const { return IsContent() && !GetParent(); }
|
||||
|
||||
bool IsContentSubframe() const { return IsContent() && GetParent(); }
|
||||
|
Loading…
Reference in New Issue
Block a user