mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1685303: part 20) const
-correct internals of `AccessibleCaretManager::DispatchCaretStateChangedEvent. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D102302
This commit is contained in:
parent
32745c95ff
commit
d7bf5cbe1f
@ -1406,7 +1406,7 @@ void AccessibleCaretManager::DispatchCaretStateChangedEvent(
|
||||
return;
|
||||
}
|
||||
|
||||
Selection* sel = GetSelection();
|
||||
const Selection* sel = GetSelection();
|
||||
if (!sel) {
|
||||
return;
|
||||
}
|
||||
|
@ -354,7 +354,7 @@ nsRect nsCaret::GetGeometryForFrame(nsIFrame* aFrame, int32_t aFrameOffset,
|
||||
return rect;
|
||||
}
|
||||
|
||||
nsIFrame* nsCaret::GetFrameAndOffset(Selection* aSelection,
|
||||
nsIFrame* nsCaret::GetFrameAndOffset(const Selection* aSelection,
|
||||
nsINode* aOverrideNode,
|
||||
int32_t aOverrideOffset,
|
||||
int32_t* aFrameOffset,
|
||||
@ -390,7 +390,7 @@ nsIFrame* nsCaret::GetFrameAndOffset(Selection* aSelection,
|
||||
}
|
||||
|
||||
/* static */
|
||||
nsIFrame* nsCaret::GetGeometry(Selection* aSelection, nsRect* aRect) {
|
||||
nsIFrame* nsCaret::GetGeometry(const Selection* aSelection, nsRect* aRect) {
|
||||
int32_t frameOffset;
|
||||
nsIFrame* frame = GetFrameAndOffset(aSelection, nullptr, 0, &frameOffset);
|
||||
if (frame) {
|
||||
|
@ -170,7 +170,7 @@ class nsCaret final : public nsISelectionListener {
|
||||
* This rect does not include any extra decorations for bidi.
|
||||
* @param aRect must be non-null
|
||||
*/
|
||||
static nsIFrame* GetGeometry(mozilla::dom::Selection* aSelection,
|
||||
static nsIFrame* GetGeometry(const mozilla::dom::Selection* aSelection,
|
||||
nsRect* aRect);
|
||||
static nsIFrame* GetCaretFrameForNodeOffset(
|
||||
nsFrameSelection* aFrameSelection, nsIContent* aContentNode,
|
||||
@ -186,7 +186,7 @@ class nsCaret final : public nsISelectionListener {
|
||||
// @param aUnadjustedFrame return the original frame that the selection is
|
||||
// targeting, without any adjustment for painting.
|
||||
// @return the frame of the focus node.
|
||||
static nsIFrame* GetFrameAndOffset(mozilla::dom::Selection* aSelection,
|
||||
static nsIFrame* GetFrameAndOffset(const mozilla::dom::Selection* aSelection,
|
||||
nsINode* aOverrideNode,
|
||||
int32_t aOverrideOffset,
|
||||
int32_t* aFrameOffset,
|
||||
|
@ -8797,7 +8797,7 @@ void nsLayoutUtils::AppendFrameTextContent(nsIFrame* aFrame,
|
||||
}
|
||||
|
||||
/* static */
|
||||
nsRect nsLayoutUtils::GetSelectionBoundingRect(Selection* aSel) {
|
||||
nsRect nsLayoutUtils::GetSelectionBoundingRect(const Selection* aSel) {
|
||||
nsRect res;
|
||||
// Bounding client rect may be empty after calling GetBoundingClientRect
|
||||
// when range is collapsed. So we get caret's rect when range is
|
||||
|
@ -2732,7 +2732,7 @@ class nsLayoutUtils {
|
||||
*
|
||||
* @param aSel Selection to check
|
||||
*/
|
||||
static nsRect GetSelectionBoundingRect(mozilla::dom::Selection* aSel);
|
||||
static nsRect GetSelectionBoundingRect(const mozilla::dom::Selection* aSel);
|
||||
|
||||
/**
|
||||
* Calculate the bounding rect of |aContent|, relative to the origin
|
||||
|
Loading…
Reference in New Issue
Block a user