зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1609662: part 13) Declare some methods in `Selection` const. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D60254 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
99856824e5
Коммит
37eb82cb25
|
@ -1361,7 +1361,8 @@ nsresult Selection::GetPrimaryOrCaretFrameForNodeOffset(nsIContent* aContent,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
void Selection::SelectFramesForContent(nsIContent* aContent, bool aSelected) {
|
||||
void Selection::SelectFramesForContent(nsIContent* aContent,
|
||||
bool aSelected) const {
|
||||
nsIFrame* frame = aContent->GetPrimaryFrame();
|
||||
if (!frame) {
|
||||
return;
|
||||
|
@ -1379,7 +1380,8 @@ void Selection::SelectFramesForContent(nsIContent* aContent, bool aSelected) {
|
|||
|
||||
// select all content children of aContent
|
||||
nsresult Selection::SelectAllFramesForContent(
|
||||
PostContentIterator& aPostOrderIter, nsIContent* aContent, bool aSelected) {
|
||||
PostContentIterator& aPostOrderIter, nsIContent* aContent,
|
||||
bool aSelected) const {
|
||||
// If aContent doesn't have children, we should avoid to use the content
|
||||
// iterator for performance reason.
|
||||
if (!aContent->HasChildren()) {
|
||||
|
|
|
@ -707,9 +707,10 @@ class Selection final : public nsSupportsWeakReference,
|
|||
* nothing.
|
||||
*/
|
||||
void SetAnchorFocusRange(int32_t aIndex);
|
||||
void SelectFramesForContent(nsIContent* aContent, bool aSelected);
|
||||
void SelectFramesForContent(nsIContent* aContent, bool aSelected) const;
|
||||
nsresult SelectAllFramesForContent(PostContentIterator& aPostOrderIter,
|
||||
nsIContent* aContent, bool aSelected);
|
||||
nsIContent* aContent,
|
||||
bool aSelected) const;
|
||||
nsresult SelectFrames(nsPresContext* aPresContext, nsRange* aRange,
|
||||
bool aSelect);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче