Files
roytam1 78b33706e4 import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1170039: Fix printf format specifiers in GC stats. r=terrence (739a9203f)
- Bug 1169222 - Add --debugger option to jittests to run tests under the specified debugger r=terrence (7d7d6f93b)
- Bug 1170596 - JitSpewer: Always flush after dumping the graph to the files. r=bbouvier (cabece9da)
- Bug 1018628 - Part 3: Add test for default parameter with destructuring default value. r=jorendorff (923a193ea)
- Bug 1142816 - js/src/jsapi-tests/testGCHeapPostBarriers.cpp has leaks. r=erahm (cc543a475)
- Bug 1252075 - use UniquePtr instead of ScopedDeletePtr in testGCHeapPostBarriers; r=terrence (f58ddfed2)
- Bug 1168293 - Remove MOZ_GLUE_IN_PROGRAM from config/config.mk. r=mshal (93877bb3a)
- Bug 1179695 - Remove mWasAsync from WidgetQueryContentEvent. r=masayuki,nchen (734c1a93f)
- Bug 1185316 TabParent should flush pending IME notifications after child process handles all sending events r=smaug (d2eb7c359)
- Bug 1153586 - Prevent the same BUTTON_DOWN event from opening the dropdown menu again on platforms that don't consume the event. r=enndeakin (5b8bf9156)
- No bug - Add a bug number to the historical.html expectations. (9377c1ff6)
- Bug 1161950 - Remove support for createEvent("CloseEvent") / initCloseEvent, r=smaug (9f2e5b970)
- Bug 1161950 - patch 2 - fix the webplatform test, r=Ms2ger (04046e15a)
- Bug 1171294 - Stop warning if piTarget is null. r=smaug (5ab612a71)
- Bug 873923, add a method to allow popups to be anchored at a rectangle, r=tn,mark,khuey (08b7902c9)
- Bug 873923, anchored at popup test, r=test (36bb7091a)
- Bug 250091, support page up and page down in menulists, r=neil (6e455d5c6)
2021-11-22 10:15:34 +08:00

114 lines
3.2 KiB
C++

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et cindent: */
/* 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_PopupBoxObject_h
#define mozilla_dom_PopupBoxObject_h
#include "mozilla/Attributes.h"
#include "mozilla/ErrorResult.h"
#include "nsCycleCollectionParticipant.h"
#include "nsWrapperCache.h"
#include "mozilla/dom/BoxObject.h"
#include "nsString.h"
struct JSContext;
class nsPopupSetFrame;
namespace mozilla {
namespace dom {
class DOMRect;
class Element;
class Event;
class PopupBoxObject final : public BoxObject
{
public:
NS_DECL_ISUPPORTS_INHERITED
// also in PopupBoxObject.webidl
static const uint32_t ROLLUP_DEFAULT = 0; /* widget/platform default */
static const uint32_t ROLLUP_CONSUME = 1; /* consume the rollup event */
static const uint32_t ROLLUP_NO_CONSUME = 2; /* don't consume the rollup event */
PopupBoxObject();
nsIContent* GetParentObject() const;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
void ShowPopup(Element* aAnchorElement,
Element& aPopupElement,
int32_t aXPos,
int32_t aYPos,
const nsAString& aPopupType,
const nsAString& aAnchorAlignment,
const nsAString& aPopupAlignment);
void HidePopup(bool aCancel);
bool AutoPosition();
void SetAutoPosition(bool aShouldAutoPosition);
void EnableKeyboardNavigator(bool aEnableKeyboardNavigator);
void EnableRollup(bool aShouldRollup);
void SetConsumeRollupEvent(uint32_t aConsume);
void SizeTo(int32_t aWidth, int32_t aHeight);
void MoveTo(int32_t aLeft, int32_t aTop);
void OpenPopup(Element* aAnchorElement,
const nsAString& aPosition,
int32_t aXPos,
int32_t aYPos,
bool aIsContextMenu, bool aAttributesOverride,
Event* aTriggerEvent);
void OpenPopupAtScreen(int32_t aXPos,
int32_t aYPos,
bool aIsContextMenu,
Event* aTriggerEvent);
void OpenPopupAtScreenRect(const nsAString& aPosition,
int32_t aXPos, int32_t aYPos,
int32_t aWidth, int32_t aHeight,
bool aIsContextMenu,
bool aAttributesOverride,
Event* aTriggerEvent);
void GetPopupState(nsString& aState);
nsINode* GetTriggerNode() const;
Element* GetAnchorNode() const;
already_AddRefed<DOMRect> GetOuterScreenRect();
void MoveToAnchor(Element* aAnchorElement,
const nsAString& aPosition,
int32_t aXPos,
int32_t aYPos,
bool aAttributesOverride);
void GetAlignmentPosition(nsString& positionStr);
int32_t AlignmentOffset();
private:
~PopupBoxObject();
protected:
nsPopupSetFrame* GetPopupSetFrame();
};
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_PopupBoxObject_h