зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1387143 part 27. Remove some unused nsISelection methods. r=mats
This commit is contained in:
Родитель
63c4927445
Коммит
21aa32be26
|
@ -2614,19 +2614,6 @@ a 2 1 deselect from 2 to 1
|
|||
* Extend extends the selection away from the anchor.
|
||||
* We don't need to know the direction, because we always change the focus.
|
||||
*/
|
||||
NS_IMETHODIMP
|
||||
Selection::Extend(nsIDOMNode* aContainer, int32_t aOffset)
|
||||
{
|
||||
nsCOMPtr<nsINode> container = do_QueryInterface(aContainer);
|
||||
return Extend(container, aOffset);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Selection::ExtendNative(nsINode* aContainer, int32_t aOffset)
|
||||
{
|
||||
return Extend(aContainer, aOffset);
|
||||
}
|
||||
|
||||
void
|
||||
Selection::ExtendJS(nsINode& aContainer, uint32_t aOffset, ErrorResult& aRv)
|
||||
{
|
||||
|
@ -2934,16 +2921,6 @@ Selection::Extend(nsINode& aContainer, uint32_t aOffset, ErrorResult& aRv)
|
|||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Selection::SelectAllChildren(nsIDOMNode* aNode)
|
||||
{
|
||||
ErrorResult result;
|
||||
nsCOMPtr<nsINode> node = do_QueryInterface(aNode);
|
||||
NS_ENSURE_TRUE(node, NS_ERROR_INVALID_ARG);
|
||||
SelectAllChildren(*node, result);
|
||||
return result.StealNSResult();
|
||||
}
|
||||
|
||||
void
|
||||
Selection::SelectAllChildrenJS(nsINode& aNode, ErrorResult& aRv)
|
||||
{
|
||||
|
|
|
@ -394,8 +394,22 @@ public:
|
|||
* is focused and editable, the caret will blink there.
|
||||
*/
|
||||
void CollapseToEnd(mozilla::ErrorResult& aRv);
|
||||
|
||||
/**
|
||||
* Extends the selection by moving the selection end to the specified node and
|
||||
* offset, preserving the selection begin position. The new selection end
|
||||
* result will always be from the anchorNode to the new focusNode, regardless
|
||||
* of direction.
|
||||
*
|
||||
* @param aContainer The node where the selection will be extended to
|
||||
* @param aOffset Where in aContainer to place the offset of the new selection end.
|
||||
*/
|
||||
void Extend(nsINode& aContainer, uint32_t aOffset, ErrorResult& aRv);
|
||||
void AddRange(nsRange& aRange, mozilla::ErrorResult& aRv);
|
||||
/**
|
||||
* Adds all children of the specified node to the selection.
|
||||
* @param aNode the parent of the children to be added to the selection.
|
||||
*/
|
||||
void SelectAllChildren(nsINode& aNode, mozilla::ErrorResult& aRv);
|
||||
void SetBaseAndExtent(nsINode& aAnchorNode, uint32_t aAnchorOffset,
|
||||
nsINode& aFocusNode, uint32_t aFocusOffset,
|
||||
|
|
|
@ -29,22 +29,6 @@ class Selection;
|
|||
interface nsISelection : nsISupports
|
||||
{
|
||||
|
||||
/**
|
||||
* Extends the selection by moving the selection end to the specified node and offset,
|
||||
* preserving the selection begin position. The new selection end result will always
|
||||
* be from the anchorNode to the new focusNode, regardless of direction.
|
||||
* @param parentNode The node where the selection will be extended to
|
||||
* @param offset Where in node to place the offset in the new selection end
|
||||
*/
|
||||
void extend(in nsIDOMNode parentNode, in long offset);
|
||||
[noscript] void extendNative(in nsINode parentNode, in long offset);
|
||||
|
||||
/**
|
||||
* Adds all children of the specified node to the selection.
|
||||
* @param parentNode the parent of the children to be added to the selection.
|
||||
*/
|
||||
void selectAllChildren(in nsIDOMNode parentNode);
|
||||
|
||||
%{C++
|
||||
/**
|
||||
* AsSelection() returns a pointer to Selection class.
|
||||
|
|
Загрузка…
Ссылка в новой задаче