mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 16:28:38 +09:00
parent
84d3b44b86
commit
6ce9cc2a25
23 changed files with 425 additions and 287 deletions
|
|
@ -2457,7 +2457,7 @@ nsFocusManager::GetSelectionLocation(nsIDocument* aDocument,
|
|||
nsCOMPtr<nsIDOMNode> startNode, endNode;
|
||||
bool isCollapsed = false;
|
||||
nsCOMPtr<nsIContent> startContent, endContent;
|
||||
int32_t startOffset = 0;
|
||||
uint32_t startOffset = 0;
|
||||
if (domSelection) {
|
||||
domSelection->GetIsCollapsed(&isCollapsed);
|
||||
nsCOMPtr<nsIDOMRange> domRange;
|
||||
|
|
@ -2471,7 +2471,6 @@ nsFocusManager::GetSelectionLocation(nsIDocument* aDocument,
|
|||
|
||||
startContent = do_QueryInterface(startNode);
|
||||
if (startContent && startContent->IsElement()) {
|
||||
NS_ASSERTION(startOffset >= 0, "Start offset cannot be negative");
|
||||
childContent = startContent->GetChildAt(startOffset);
|
||||
if (childContent) {
|
||||
startContent = childContent;
|
||||
|
|
@ -2480,9 +2479,8 @@ nsFocusManager::GetSelectionLocation(nsIDocument* aDocument,
|
|||
|
||||
endContent = do_QueryInterface(endNode);
|
||||
if (endContent && endContent->IsElement()) {
|
||||
int32_t endOffset = 0;
|
||||
uint32_t endOffset = 0;
|
||||
domRange->GetEndOffset(&endOffset);
|
||||
NS_ASSERTION(endOffset >= 0, "End offset cannot be negative");
|
||||
childContent = endContent->GetChildAt(endOffset);
|
||||
if (childContent) {
|
||||
endContent = childContent;
|
||||
|
|
@ -2510,7 +2508,7 @@ nsFocusManager::GetSelectionLocation(nsIDocument* aDocument,
|
|||
bool isFormControl =
|
||||
startContent->IsNodeOfType(nsINode::eHTML_FORM_CONTROL);
|
||||
|
||||
if (nodeValue.Length() == (uint32_t)startOffset && !isFormControl &&
|
||||
if (nodeValue.Length() == startOffset && !isFormControl &&
|
||||
startContent != aDocument->GetRootElement()) {
|
||||
// Yes, indeed we were at the end of the last node
|
||||
nsCOMPtr<nsIFrameEnumerator> frameTraversal;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue