gecko-dev/editor
Masayuki Nakano 2f92264fb7 Bug 1377978 - Make nsRange use uint32_t to offset r=smaug
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
2017-07-19 22:49:52 +09:00
..
composer Bug 1372405 - Provide names for all runnables in the tree (r=froydnj) 2017-06-26 14:19:58 -07:00
libeditor Bug 1377978 - Make nsRange use uint32_t to offset r=smaug 2017-07-19 22:49:52 +09:00
reftests Bug 1377861 - Update reftests to comply with new data: URI inheritance model. r=smaug 2017-07-07 11:27:36 +02:00
txmgr Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws. 2017-01-17 11:50:25 +01:00
txtsvc Bug 1377978 - Make nsRange use uint32_t to offset r=smaug 2017-07-19 22:49:52 +09:00
AsyncSpellCheckTestHelper.jsm Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
moz.build Bug 1325281 Get rid of nsIEditorIMESupport r=m_kato 2017-05-09 15:21:22 +09:00
nsEditorCID.h
nsIContentFilter.idl
nsIDocumentStateListener.idl
nsIEditActionListener.idl
nsIEditor.idl Bug 1349178 Make nsIEditor.transactionManager readonly r=m_kato 2017-03-21 20:57:15 +09:00
nsIEditorMailSupport.idl
nsIEditorObserver.idl
nsIEditorSpellCheck.idl
nsIEditorStyleSheets.idl
nsIEditorUtils.idl
nsIHTMLAbsPosEditor.idl
nsIHTMLEditor.idl Bug 1312991 Get rid of nsIHTMLEditor::SetDocumentTitle() and mozilla::SetDocumentTitleTransaction r=smaug 2016-12-26 17:46:23 +09:00
nsIHTMLInlineTableEditor.idl
nsIHTMLObjectResizer.idl Bug 1349426 - Remove nsIHTMLObjectResizeListener. r=masayuki 2017-03-27 15:16:40 +09:00
nsIPlaintextEditor.idl Bug 1358025 - Part 2. Add SetText Transaction API. r=masayuki 2017-05-25 14:30:50 +09:00
nsITableEditor.idl
nsIURIRefObject.idl
nsPIEditorTransaction.idl