summaryrefslogtreecommitdiffstats
path: root/toolkit
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-04-17 16:02:56 +0200
committerGitHub <noreply@github.com>2020-04-17 16:02:56 +0200
commitd5102d6beafc2a2a0cec3cc3ee5f7ebde31ae7bf (patch)
tree2bfef192cbb748b675ce8308c242a376798e265d /toolkit
parent5caf99795aa81e1fc145b8e937b1ee8197ed2486 (diff)
parentf35aa3e15fedf3cd4ad163d60ab74a9537ca5c82 (diff)
downloadUXP-d5102d6beafc2a2a0cec3cc3ee5f7ebde31ae7bf.tar
UXP-d5102d6beafc2a2a0cec3cc3ee5f7ebde31ae7bf.tar.gz
UXP-d5102d6beafc2a2a0cec3cc3ee5f7ebde31ae7bf.tar.lz
UXP-d5102d6beafc2a2a0cec3cc3ee5f7ebde31ae7bf.tar.xz
UXP-d5102d6beafc2a2a0cec3cc3ee5f7ebde31ae7bf.zip
Merge pull request #1518 from MoonchildProductions/shadowdom-merge
Incremental shadowdom-merge
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/components/typeaheadfind/nsTypeAheadFind.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp b/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
index 53b1ef66d..4690383ab 100644
--- a/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
+++ b/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
@@ -822,7 +822,7 @@ nsTypeAheadFind::GetSearchContainers(nsISupports *aContainer,
getter_AddRefs(mStartPointRange), nullptr);
}
else {
- int32_t startOffset;
+ uint32_t startOffset;
nsCOMPtr<nsIDOMNode> startNode;
if (aFindPrev) {
currentSelectionRange->GetStartContainer(getter_AddRefs(startNode));
@@ -860,7 +860,7 @@ nsTypeAheadFind::RangeStartsInsideLink(nsIDOMRange *aRange,
nsCOMPtr<nsIDOMNode> startNode;
nsCOMPtr<nsIContent> startContent, origContent;
aRange->GetStartContainer(getter_AddRefs(startNode));
- int32_t startOffset;
+ uint32_t startOffset;
aRange->GetStartOffset(&startOffset);
startContent = do_QueryInterface(startNode);
@@ -880,9 +880,10 @@ nsTypeAheadFind::RangeStartsInsideLink(nsIDOMRange *aRange,
const nsTextFragment *textFrag = startContent->GetText();
if (textFrag) {
// look for non whitespace character before start offset
- for (int32_t index = 0; index < startOffset; index++) {
+ for (uint32_t index = 0; index < startOffset; index++) {
// FIXME: take content language into account when deciding whitespace.
- if (!mozilla::dom::IsSpaceCharacter(textFrag->CharAt(index))) {
+ if (!mozilla::dom::IsSpaceCharacter(
+ textFrag->CharAt(static_cast<int32_t>(index)))) {
*aIsStartingLink = false; // not at start of a node
break;
@@ -1227,12 +1228,14 @@ nsTypeAheadFind::IsRangeVisible(nsIPresShell *aPresShell,
return true; // Don't need it to be on screen, just in rendering tree
// Get the next in flow frame that contains the range start
- int32_t startRangeOffset, startFrameOffset, endFrameOffset;
+ int32_t startFrameOffset, endFrameOffset;
+ uint32_t startRangeOffset;
aRange->GetStartOffset(&startRangeOffset);
while (true) {
frame->GetOffsets(startFrameOffset, endFrameOffset);
- if (startRangeOffset < endFrameOffset)
+ if (static_cast<int32_t>(startRangeOffset) < endFrameOffset) {
break;
+ }
nsIFrame *nextContinuationFrame = frame->GetNextContinuation();
if (nextContinuationFrame)