Bug 1320815 - Make nsIFrame::IsSelectable non-virtual, and move implementation from nsFrame to nsIFrame. r=xidorn

MozReview-Commit-ID: HphEFug7EbQ

--HG--
extra : rebase_source : 86fe78f54940b1866ab737013658082799e09ef9
This commit is contained in:
L. David Baron 2016-11-28 15:31:29 -08:00
parent 8e17410821
commit 813fb8c039
3 changed files with 5 additions and 8 deletions

View File

@ -3164,7 +3164,7 @@ nsFrame::GetDataForTableSelection(const nsFrameSelection* aFrameSelection,
}
nsresult
nsFrame::IsSelectable(bool* aSelectable, StyleUserSelect* aSelectStyle) const
nsIFrame::IsSelectable(bool* aSelectable, StyleUserSelect* aSelectStyle) const
{
if (!aSelectable) //it's ok if aSelectStyle is null
return NS_ERROR_NULL_POINTER;
@ -3191,7 +3191,7 @@ nsFrame::IsSelectable(bool* aSelectable, StyleUserSelect* aSelectStyle) const
// AUTO -> CELL -> TEXT -> AUTO, the returned value is TEXT
//
StyleUserSelect selectStyle = StyleUserSelect::Auto;
nsIFrame* frame = const_cast<nsFrame*>(this);
nsIFrame* frame = const_cast<nsIFrame*>(this);
bool containsEditable = false;
while (frame) {

View File

@ -200,9 +200,6 @@ public:
virtual void SetNextInFlow(nsIFrame*) override;
virtual nsIAtom* GetType() const override;
virtual nsresult IsSelectable(bool* aIsSelectable,
mozilla::StyleUserSelect* aSelectStyle) const override;
virtual nsresult GetSelectionController(nsPresContext *aPresContext, nsISelectionController **aSelCon) override;
virtual FrameSearchResult PeekOffsetNoAmount(bool aForward, int32_t* aOffset) override;

View File

@ -2781,14 +2781,14 @@ public:
/**
* called to discover where this frame, or a parent frame has user-select style
* applied, which affects that way that it is selected.
*
*
* @param aIsSelectable out param. Set to true if the frame can be selected
* (i.e. is not affected by user-select: none)
* @param aSelectStyle out param. Returns the type of selection style found
* (using values defined in nsStyleConsts.h).
*/
virtual nsresult IsSelectable(bool* aIsSelectable,
mozilla::StyleUserSelect* aSelectStyle) const = 0;
nsresult IsSelectable(bool* aIsSelectable,
mozilla::StyleUserSelect* aSelectStyle) const;
/**
* Called to retrieve the SelectionController associated with the frame.