author | Boris Zbarsky <bzbarsky@mit.edu> |
Tue, 08 May 2018 13:52:37 -0400 | |
changeset 471660 | 8bd354b5a5915bf0680ef62a866b1ae96e31a004 |
parent 471659 | 0cc853cc9de3e34e590cb8f58faeb44578a8084e |
child 471661 | 4d6054f4b7e9494ce6a57c365a4565bd69ab1ad4 |
push id | 9374 |
push user | jlund@mozilla.com |
push date | Mon, 18 Jun 2018 21:43:20 +0000 |
treeherder | mozilla-beta@160e085dfb0b [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mats |
bugs | 1387143 |
milestone | 62.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/dom/base/Selection.cpp +++ b/dom/base/Selection.cpp @@ -1986,17 +1986,17 @@ Selection::SetCanCacheFrameOffset(bool a // clean up cached frame when turn off cache // fix bug 207936 if (!aCanCacheFrameOffset) { mCachedOffsetForFrame->mLastCaretFrame = nullptr; } } -NS_IMETHODIMP +nsresult Selection::GetCachedFrameOffset(nsIFrame* aFrame, int32_t inOffset, nsPoint& aPoint) { if (!mCachedOffsetForFrame) { mCachedOffsetForFrame = new CachedOffsetForFrame; } nsresult rv = NS_OK;
--- a/dom/base/Selection.h +++ b/dom/base/Selection.h @@ -395,16 +395,20 @@ private: // If aVisual is true, this returns caret frame. // If false, this returns primary frame. nsresult GetPrimaryOrCaretFrameForNodeOffset(nsIContent* aContent, uint32_t aOffset, nsIFrame** aReturnFrame, int32_t* aOffsetUsed, bool aVisual) const; + // Get the cached value for nsTextFrame::GetPointFromOffset. + nsresult GetCachedFrameOffset(nsIFrame* aFrame, int32_t inOffset, + nsPoint& aPoint); + public: SelectionType GetType() const { return mSelectionType; } void SetType(SelectionType aSelectionType) { mSelectionType = aSelectionType; } SelectionCustomColors* GetCustomColors() const { return mCustomColors.get(); }
--- a/dom/base/nsISelectionPrivate.idl +++ b/dom/base/nsISelectionPrivate.idl @@ -26,21 +26,16 @@ struct ScrollAxis; [ptr] native RangeArray(nsTArray<nsRange*>); [ref] native nsPointRef(nsPoint); native nsDirection(nsDirection); native ScrollAxis(nsIPresShell::ScrollAxis); [uuid(0c9f4f74-ee7e-4fe9-be6b-0ba856368178)] interface nsISelectionPrivate : nsISupports { - /* GetCachedOffsetForFrame - * Returns cached value for nsTextFrame::GetPointFromOffset. - */ - [noscript] void getCachedFrameOffset(in nsIFrame aFrame, in int32_t inOffset, in nsPointRef aPoint); - /** * Get the direction of the selection. */ [noscript, notxpcom] nsDirection getSelectionDirection(); [noscript, notxpcom] void setSelectionDirection(in nsDirection aDirection); /** * Returns the type of the selection (see nsISelectionController for