зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1126230 part 6 - Add nsIDocument::GetFullscreenStack() method. r=smaug
--HG-- extra : source : fd0e6295736145ff6189b04d1ebc1948c3b5a3c3
This commit is contained in:
Родитель
3a11a2f307
Коммит
a030778467
|
@ -11441,6 +11441,19 @@ nsDocument::FullScreenStackTop()
|
|||
return element;
|
||||
}
|
||||
|
||||
/* virtual */ nsTArray<Element*>
|
||||
nsDocument::GetFullscreenStack() const
|
||||
{
|
||||
nsTArray<Element*> elements;
|
||||
for (const nsWeakPtr& ptr : mFullScreenStack) {
|
||||
if (nsCOMPtr<Element> elem = do_QueryReferent(ptr)) {
|
||||
MOZ_ASSERT(elem->State().HasState(NS_EVENT_STATE_FULL_SCREEN));
|
||||
elements.AppendElement(elem);
|
||||
}
|
||||
}
|
||||
return elements;
|
||||
}
|
||||
|
||||
// Returns true if aDoc is in the focused tab in the active window.
|
||||
static bool
|
||||
IsInActiveTab(nsIDocument* aDoc)
|
||||
|
|
|
@ -1207,6 +1207,7 @@ public:
|
|||
virtual Element* FindImageMap(const nsAString& aNormalizedMapName) override;
|
||||
|
||||
virtual Element* GetFullScreenElement() override;
|
||||
virtual nsTArray<Element*> GetFullscreenStack() const override;
|
||||
virtual void AsyncRequestFullScreen(
|
||||
mozilla::UniquePtr<FullscreenRequest>&& aRequest) override;
|
||||
virtual void RestorePreviousFullScreenState() override;
|
||||
|
|
|
@ -155,8 +155,8 @@ typedef CallbackObjectHolder<NodeFilter, nsIDOMNodeFilter> NodeFilterHolder;
|
|||
} // namespace mozilla
|
||||
|
||||
#define NS_IDOCUMENT_IID \
|
||||
{ 0x72391609, 0x673d, 0x4bec, \
|
||||
{ 0xbd, 0x75, 0x64, 0xbf, 0x1f, 0x6a, 0x6b, 0x5e } }
|
||||
{ 0x5f51e18c, 0x9e0e, 0x4dc0, \
|
||||
{ 0x9f, 0x08, 0x7a, 0x32, 0x65, 0x52, 0xea, 0x11 } }
|
||||
|
||||
// Enum for requesting a particular type of document when creating a doc
|
||||
enum DocumentFlavor {
|
||||
|
@ -1094,6 +1094,11 @@ public:
|
|||
*/
|
||||
virtual Element* GetFullScreenElement() = 0;
|
||||
|
||||
/**
|
||||
* Returns all elements in the fullscreen stack in the insertion order.
|
||||
*/
|
||||
virtual nsTArray<Element*> GetFullscreenStack() const = 0;
|
||||
|
||||
/**
|
||||
* Asynchronously requests that the document make aElement the fullscreen
|
||||
* element, and move into fullscreen mode. The current fullscreen element
|
||||
|
|
Загрузка…
Ссылка в новой задаче