summaryrefslogtreecommitdiffstats
path: root/dom/base/nsContentUtils.h
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/nsContentUtils.h')
-rw-r--r--dom/base/nsContentUtils.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h
index 4ccc1aa25..c34f7e102 100644
--- a/dom/base/nsContentUtils.h
+++ b/dom/base/nsContentUtils.h
@@ -339,6 +339,13 @@ public:
* NOTE! If the two nodes aren't in the same connected subtree,
* the result is 1, and the optional aDisconnected parameter
* is set to true.
+ *
+ * XXX aOffset1 and aOffset2 should be uint32_t since valid offset value is
+ * between 0 - UINT32_MAX. However, these methods work even with
+ * negative offset values! E.g., when aOffset1 is -1 and aOffset is 0,
+ * these methods return -1. Some root callers depend on this behavior.
+ * On the other hand, nsINode can have ATTRCHILD_ARRAY_MAX_CHILD_COUN
+ * (0x3FFFFF) at most. Therefore, they can be int32_t for now.
*/
static int32_t ComparePoints(nsINode* aParent1, int32_t aOffset1,
nsINode* aParent2, int32_t aOffset2,