зеркало из https://github.com/mozilla/gecko-dev.git
2f92264fb7
DOM Standard defines that offset of Range is unsigned long. However, nsRange uses int32_t to them. This patch makes nsRange use uint32_t instead. However, this patch does NOT allow to set over INT32_MAX as offset values since a lot of users of nsRange cannot treat the values as over INT32_MAX because a lot of internal APIs take int32_t as offsets. For easier to search such points, this patch adds static_cast<int32_t> to uint32_t variables when they are used for int32_t arguments. And note that nsContentUtils::ComparePoints() behaves odd. It accepts negative offset and compares such value with valid offset simply. This patch still uses int32_t offset variables in nsRange::CompareNodeToRange() even though it may be negative value if nsINode::IndexOf() returns -1 because the caller of it depends on this behavior. MozReview-Commit-ID: 8RbOgA86JuT --HG-- extra : rebase_source : 46d526c6d50dfa2f104439b19b8691477b17a4af |
||
---|---|---|
.. | ||
composer | ||
libeditor | ||
reftests | ||
txmgr | ||
txtsvc | ||
AsyncSpellCheckTestHelper.jsm | ||
moz.build | ||
nsEditorCID.h | ||
nsIContentFilter.idl | ||
nsIDocumentStateListener.idl | ||
nsIEditActionListener.idl | ||
nsIEditor.idl | ||
nsIEditorMailSupport.idl | ||
nsIEditorObserver.idl | ||
nsIEditorSpellCheck.idl | ||
nsIEditorStyleSheets.idl | ||
nsIEditorUtils.idl | ||
nsIHTMLAbsPosEditor.idl | ||
nsIHTMLEditor.idl | ||
nsIHTMLInlineTableEditor.idl | ||
nsIHTMLObjectResizer.idl | ||
nsIPlaintextEditor.idl | ||
nsITableEditor.idl | ||
nsIURIRefObject.idl | ||
nsPIEditorTransaction.idl |