зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1685303: part 8) Annotate `nsFrameSelection::SetDragState` with `MOZ_CAN_RUN_SCRIPT`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D101467
This commit is contained in:
Родитель
58ca09b6d6
Коммит
353996bf27
|
@ -231,7 +231,8 @@ class nsFocusManager final : public nsIFocusManager,
|
|||
/**
|
||||
* Called when a window has been lowered.
|
||||
*/
|
||||
void WindowLowered(mozIDOMWindowProxy* aWindow, uint64_t aActionId);
|
||||
MOZ_CAN_RUN_SCRIPT_BOUNDARY void WindowLowered(mozIDOMWindowProxy* aWindow,
|
||||
uint64_t aActionId);
|
||||
|
||||
/**
|
||||
* Called when a new document in a window is shown.
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "nsCOMArray.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsRefPtrHashtable.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/TimeStamp.h"
|
||||
#include "mozilla/layers/APZPublicUtils.h"
|
||||
#include "Units.h"
|
||||
|
@ -1216,7 +1217,7 @@ class EventStateManager : public nsSupportsWeakReference, public nsIObserver {
|
|||
void CreateClickHoldTimer(nsPresContext* aPresContext, nsIFrame* aDownFrame,
|
||||
WidgetGUIEvent* aMouseDownEvent);
|
||||
void KillClickHoldTimer();
|
||||
void FireContextClick();
|
||||
MOZ_CAN_RUN_SCRIPT_BOUNDARY void FireContextClick();
|
||||
|
||||
MOZ_CAN_RUN_SCRIPT static void SetPointerLock(nsIWidget* aWidget,
|
||||
nsIContent* aElement);
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include "AccessibleCaret.h"
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/dom/CaretStateChangedEvent.h"
|
||||
#include "mozilla/dom/MouseEventBinding.h"
|
||||
#include "mozilla/EnumSet.h"
|
||||
|
@ -191,7 +192,7 @@ class AccessibleCaretManager {
|
|||
|
||||
MOZ_CAN_RUN_SCRIPT
|
||||
nsresult SelectWord(nsIFrame* aFrame, const nsPoint& aPoint) const;
|
||||
void SetSelectionDragState(bool aState) const;
|
||||
MOZ_CAN_RUN_SCRIPT void SetSelectionDragState(bool aState) const;
|
||||
|
||||
// Return true if the candidate string is a phone number.
|
||||
bool IsPhoneNumber(nsAString& aCandidate) const;
|
||||
|
|
|
@ -1881,7 +1881,7 @@ class PresShell final : public nsStubDocumentObserver,
|
|||
// Utility method to restore the root scrollframe state
|
||||
void RestoreRootScrollPosition();
|
||||
|
||||
void MaybeReleaseCapturingContent();
|
||||
MOZ_CAN_RUN_SCRIPT_BOUNDARY void MaybeReleaseCapturingContent();
|
||||
|
||||
class DelayedEvent {
|
||||
public:
|
||||
|
|
|
@ -135,7 +135,7 @@ class nsTextControlFrame : public nsContainerFrame,
|
|||
const nsDisplayListSet& aLists) override;
|
||||
|
||||
//==== BEGIN NSIFORMCONTROLFRAME
|
||||
void SetFocus(bool aOn, bool aRepaint) override;
|
||||
MOZ_CAN_RUN_SCRIPT_BOUNDARY void SetFocus(bool aOn, bool aRepaint) override;
|
||||
MOZ_CAN_RUN_SCRIPT_BOUNDARY nsresult
|
||||
SetFormProperty(nsAtom* aName, const nsAString& aValue) override;
|
||||
|
||||
|
|
|
@ -371,7 +371,7 @@ class nsFrameSelection final {
|
|||
*
|
||||
* @param aState is the new state of drag
|
||||
*/
|
||||
MOZ_CAN_RUN_SCRIPT_BOUNDARY
|
||||
MOZ_CAN_RUN_SCRIPT
|
||||
void SetDragState(bool aState);
|
||||
|
||||
/**
|
||||
|
|
|
@ -5043,14 +5043,12 @@ NS_IMETHODIMP nsIFrame::HandleDrag(nsPresContext* aPresContext,
|
|||
* This static method handles part of the nsIFrame::HandleRelease in a way
|
||||
* which doesn't rely on the nsFrame object to stay alive.
|
||||
*/
|
||||
static nsresult HandleFrameSelection(nsFrameSelection* aFrameSelection,
|
||||
nsIFrame::ContentOffsets& aOffsets,
|
||||
bool aHandleTableSel,
|
||||
int32_t aContentOffsetForTableSel,
|
||||
TableSelectionMode aTargetForTableSel,
|
||||
nsIContent* aParentContentForTableSel,
|
||||
WidgetGUIEvent* aEvent,
|
||||
const nsEventStatus* aEventStatus) {
|
||||
MOZ_CAN_RUN_SCRIPT_BOUNDARY static nsresult HandleFrameSelection(
|
||||
nsFrameSelection* aFrameSelection, nsIFrame::ContentOffsets& aOffsets,
|
||||
bool aHandleTableSel, int32_t aContentOffsetForTableSel,
|
||||
TableSelectionMode aTargetForTableSel,
|
||||
nsIContent* aParentContentForTableSel, WidgetGUIEvent* aEvent,
|
||||
const nsEventStatus* aEventStatus) {
|
||||
if (!aFrameSelection) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
#include "LayoutConstants.h"
|
||||
#include "mozilla/layout/FrameChildList.h"
|
||||
#include "mozilla/AspectRatio.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/EventForwards.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/RelativeTo.h"
|
||||
|
@ -2164,9 +2165,9 @@ class nsIFrame : public nsQueryFrame {
|
|||
|
||||
// Selection Methods
|
||||
|
||||
NS_IMETHOD HandlePress(nsPresContext* aPresContext,
|
||||
mozilla::WidgetGUIEvent* aEvent,
|
||||
nsEventStatus* aEventStatus);
|
||||
MOZ_CAN_RUN_SCRIPT_BOUNDARY NS_IMETHOD
|
||||
HandlePress(nsPresContext* aPresContext, mozilla::WidgetGUIEvent* aEvent,
|
||||
nsEventStatus* aEventStatus);
|
||||
|
||||
NS_IMETHOD HandleMultiplePress(nsPresContext* aPresContext,
|
||||
mozilla::WidgetGUIEvent* aEvent,
|
||||
|
@ -2178,9 +2179,9 @@ class nsIFrame : public nsQueryFrame {
|
|||
mozilla::WidgetGUIEvent* aEvent,
|
||||
nsEventStatus* aEventStatus);
|
||||
|
||||
NS_IMETHOD HandleRelease(nsPresContext* aPresContext,
|
||||
mozilla::WidgetGUIEvent* aEvent,
|
||||
nsEventStatus* aEventStatus);
|
||||
MOZ_CAN_RUN_SCRIPT_BOUNDARY NS_IMETHOD
|
||||
HandleRelease(nsPresContext* aPresContext, mozilla::WidgetGUIEvent* aEvent,
|
||||
nsEventStatus* aEventStatus);
|
||||
|
||||
// Test if we are selecting a table object:
|
||||
// Most table/cell selection requires that Ctrl (Cmd on Mac) key is down
|
||||
|
|
Загрузка…
Ссылка в новой задаче