Bug 1688832: part 7) Declare AccessibleCaretManager::GetAllChildFrameRectsUnion static. r=TYLin

Differential Revision: https://phabricator.services.mozilla.com/D103471
This commit is contained in:
Mirko Brodesser 2021-01-29 18:57:30 +00:00
parent e22404c3c8
commit 36372ab216
2 changed files with 5 additions and 4 deletions

View File

@ -1291,8 +1291,8 @@ nsresult AccessibleCaretManager::DragCaretInternal(const nsPoint& aPoint) {
return NS_OK;
}
nsRect AccessibleCaretManager::GetAllChildFrameRectsUnion(
nsIFrame* aFrame) const {
// static
nsRect AccessibleCaretManager::GetAllChildFrameRectsUnion(nsIFrame* aFrame) {
nsRect unionRect;
// Drill through scroll frames, we don't want to include scrollbar child
@ -1342,7 +1342,8 @@ nsPoint AccessibleCaretManager::AdjustDragBoundary(
if (editingHost) {
nsIFrame* editingHostFrame = editingHost->GetPrimaryFrame();
if (editingHostFrame) {
nsRect boundary = GetAllChildFrameRectsUnion(editingHostFrame);
nsRect boundary =
AccessibleCaretManager::GetAllChildFrameRectsUnion(editingHostFrame);
nsLayoutUtils::TransformRect(editingHostFrame, mPresShell->GetRootFrame(),
boundary);

View File

@ -256,7 +256,7 @@ class AccessibleCaretManager {
// Get the union of all the child frame scrollable overflow rects for aFrame,
// which is used as a helper function to restrict the area where the caret can
// be dragged. Returns the rect relative to aFrame.
nsRect GetAllChildFrameRectsUnion(nsIFrame* aFrame) const;
static nsRect GetAllChildFrameRectsUnion(nsIFrame* aFrame);
// Restrict the active caret's dragging position based on
// sCaretsAllowDraggingAcrossOtherCaret. If the active caret is the first