diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 06:10:23 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 06:10:23 -0400 |
commit | 70c8ff8e5af7d2661b64fb92a158f2860af7766c (patch) | |
tree | e7fd37d81858a7dfa06fbf59880d837d9e7fa256 /dom/base/nsContentUtils.h | |
parent | 53428ad3f04ff1e01f0596ef0c592bdbe5fdd15b (diff) | |
download | UXP-70c8ff8e5af7d2661b64fb92a158f2860af7766c.tar UXP-70c8ff8e5af7d2661b64fb92a158f2860af7766c.tar.gz UXP-70c8ff8e5af7d2661b64fb92a158f2860af7766c.tar.lz UXP-70c8ff8e5af7d2661b64fb92a158f2860af7766c.tar.xz UXP-70c8ff8e5af7d2661b64fb92a158f2860af7766c.zip |
Bug 1377978 - Make nsRange use uint32_t to offset
Tag #1375
Diffstat (limited to 'dom/base/nsContentUtils.h')
-rw-r--r-- | dom/base/nsContentUtils.h | 7 |
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, |