5ea7f397e23e4c53c80523d160bcba6ce7c61ae5: Bug 1460509 - part 46: Make HTMLEditRules::NormalizeSelection() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 15 May 2018 18:59:27 +0900 - rev 419506
Push 34038 by apavel@mozilla.com at Wed, 23 May 2018 21:59:47 +0000
Bug 1460509 - part 46: Make HTMLEditRules::NormalizeSelection() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato MozReview-Commit-ID: 5yf1ZJ5sQ1t
8ca686e6da6fc34c5b6142679a17cbc905840177: Bug 1460509 - part 45: Test if HTMLEditRules::PromoteRange() won't get range in Selection r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 15 May 2018 18:39:27 +0900 - rev 419505
Push 34038 by apavel@mozilla.com at Wed, 23 May 2018 21:59:47 +0000
Bug 1460509 - part 45: Test if HTMLEditRules::PromoteRange() won't get range in Selection r=m_kato PromoteRange() related methods do not change Selection nor the DOM tree. Therefore, they must be safe. However, only PromoteRange() takes an nsRange instance and modifies it. If it's in Selection, that causes selectionchange event. Therefore, we should check if given range is in Selection with MOZ_ASSERT(). MozReview-Commit-ID: AXkmHFB4P08
7c1f8f9fa414674da96bf8c37acec83bc6b5ce12: Bug 1460509 - part 44: Make HTMLEditRules::GetNodesForOperation() and related methods return NS_ERROR_EDITOR_DESTROYED if they cause destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 15 May 2018 18:07:34 +0900 - rev 419504
Push 34038 by apavel@mozilla.com at Wed, 23 May 2018 21:59:47 +0000
Bug 1460509 - part 44: Make HTMLEditRules::GetNodesForOperation() and related methods return NS_ERROR_EDITOR_DESTROYED if they cause destroying the editor r=m_kato Despite of the name of GetNodesForOperation() and related methods, it changes the DOM tree if their aTouchContent is TouchContent::yes (by default). Therefore, they should return NS_ERROR_EDITOR_DESTROYED if they cause destroying the editor and all callers should check the result. Therefore, this patch mark them as MOZ_MUST_USE. Additionally, because of importance of aTouchContent, this patch makes the arguments not optional. This change must make other developers being careful to use them. (Although TouchContent does not feel dangerous. We should rename it to make its risk clearer.) On the other hand, this patch removes aTouchContent from GetParagraphFormatNodes() since it's always called with TouchContent::no. Therefore, this method is always safe. Although I tried to document those methods, but I have not understood them completely yet. Perhaps, we should redesign them in another bug both to learn them and making them faster and simpler. MozReview-Commit-ID: 4vknJGUdwEe
02124d51cedd38ced16c526d80d1b21849204ce8: Bug 1460509 - part 43: Make HTMLEditRules::BustUpInlinesAtRangeEndpoints() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 15 May 2018 17:21:08 +0900 - rev 419503
Push 34038 by apavel@mozilla.com at Wed, 23 May 2018 21:59:47 +0000
Bug 1460509 - part 43: Make HTMLEditRules::BustUpInlinesAtRangeEndpoints() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato MozReview-Commit-ID: CSYCey8ugA8
58f4a99c292c33c7ae6db38c17b49a318a5c139f: Bug 1460509 - part 42: Make HTMLEditRules::BustUpInlinesAtBRs() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 15 May 2018 17:04:28 +0900 - rev 419502
Push 34038 by apavel@mozilla.com at Wed, 23 May 2018 21:59:47 +0000
Bug 1460509 - part 42: Make HTMLEditRules::BustUpInlinesAtBRs() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato MozReview-Commit-ID: 5KGPE8mPqge
5d6cf5da586505700d34a5cc91a7260144445716: Bug 1460509 - part 41: Make HTMLEditRules::ReturnInHeader() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 15 May 2018 16:36:53 +0900 - rev 419501
Push 34038 by apavel@mozilla.com at Wed, 23 May 2018 21:59:47 +0000
Bug 1460509 - part 41: Make HTMLEditRules::ReturnInHeader() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato MozReview-Commit-ID: r03QSPXsZ2
61a02140bb8bca4e18a18144814ba90299e8ec57: Bug 1460509 - part 40: Make HTMLEditRules::ReturnInParagraph() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 15 May 2018 16:22:59 +0900 - rev 419500
Push 34038 by apavel@mozilla.com at Wed, 23 May 2018 21:59:47 +0000
Bug 1460509 - part 40: Make HTMLEditRules::ReturnInParagraph() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato MozReview-Commit-ID: cnR8uXTfno
eeddbabe7d634bc8a17b0cf9d041dd1409f0661a: Bug 1460509 - part 39: Make HTMLEditRules::SplitParagraph() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 15 May 2018 16:15:35 +0900 - rev 419499
Push 34038 by apavel@mozilla.com at Wed, 23 May 2018 21:59:47 +0000
Bug 1460509 - part 39: Make HTMLEditRules::SplitParagraph() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato MozReview-Commit-ID: 38hfUl88xXI
8eb37e9acd9c4b7eb5cecc0295bdedc57c4b28ec: Bug 1460509 - part 38: Make HTMLEditRules::ReturnInListItem() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 15 May 2018 15:32:11 +0900 - rev 419498
Push 34038 by apavel@mozilla.com at Wed, 23 May 2018 21:59:47 +0000
Bug 1460509 - part 38: Make HTMLEditRules::ReturnInListItem() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato MozReview-Commit-ID: Jl0oiBCuYPb
f11b80ec5588a2e81ba4e636cc3e3fef03867ad3: Bug 1460509 - part 37: Make HTMLEditRules::MakeBlockquote() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 15 May 2018 15:09:13 +0900 - rev 419497
Push 34038 by apavel@mozilla.com at Wed, 23 May 2018 21:59:47 +0000
Bug 1460509 - part 37: Make HTMLEditRules::MakeBlockquote() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato MozReview-Commit-ID: 3pUx52d6EYd
4a0df770d2eb420cca1277490f5a4225b589fdcd: Bug 1460509 - part 36: Make HTMLEditRules::RemoveBlockStyle() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 15 May 2018 00:43:07 +0900 - rev 419496
Push 34038 by apavel@mozilla.com at Wed, 23 May 2018 21:59:47 +0000
Bug 1460509 - part 36: Make HTMLEditRules::RemoveBlockStyle() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato MozReview-Commit-ID: KDfxeD9k0UN
184edb194ab1a2af5ee0295d0a0c3257498f0f58: Bug 1460509 - part 35: Make HTMLEditRules::ApplyBlockStyle() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 15 May 2018 00:08:46 +0900 - rev 419495
Push 34038 by apavel@mozilla.com at Wed, 23 May 2018 21:59:47 +0000
Bug 1460509 - part 35: Make HTMLEditRules::ApplyBlockStyle() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato MozReview-Commit-ID: 1ddHNx7lF9P
ddefda4491bfeff8bf535264c3931f7a960c77cc: Bug 1460509 - part 34: Make HTMLEditRules::MaybeSplitAncestorsForInsertWithTransaction() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Mon, 14 May 2018 23:55:53 +0900 - rev 419494
Push 34038 by apavel@mozilla.com at Wed, 23 May 2018 21:59:47 +0000
Bug 1460509 - part 34: Make HTMLEditRules::MaybeSplitAncestorsForInsertWithTransaction() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato MozReview-Commit-ID: 7MqtKPNAOZ1
a14b5f8ba603ff5bed762733d556e72df345c41d: Bug 1460509 - part 33: Make HTMLEditRules::JoinNearestEditableNodesWithTransaction() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Mon, 14 May 2018 23:51:23 +0900 - rev 419493
Push 34038 by apavel@mozilla.com at Wed, 23 May 2018 21:59:47 +0000
Bug 1460509 - part 33: Make HTMLEditRules::JoinNearestEditableNodesWithTransaction() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato Unfortunately, we need to make it take out argument for returning new first child point of right node. If we can create JoinNodesResult which have nsresult and EditorDOMPoint, we can avoid that, but EditorBase::JoinNodes() does not want it. So, even if we create such class, only 2 callers of the methods are its users... MozReview-Commit-ID: 1zwVZ0FriwN
7d02aaf267cb74221eb13bac4a55df3c38b4281f: Bug 1460509 - part 32: Mark HTMLEditRules::CacheInlineStyles() as MOZ_MUST_USE since it may cause destroying the editor and returns NS_ERROR_EDITOR_DESTROYED in such case r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Mon, 14 May 2018 23:24:40 +0900 - rev 419492
Push 34038 by apavel@mozilla.com at Wed, 23 May 2018 21:59:47 +0000
Bug 1460509 - part 32: Mark HTMLEditRules::CacheInlineStyles() as MOZ_MUST_USE since it may cause destroying the editor and returns NS_ERROR_EDITOR_DESTROYED in such case r=m_kato MozReview-Commit-ID: FJHxJ1j02l1
4fd392df467ad5aa403d802892b7603e692694c7: Bug 1460509 - part 31: Make HTMLEditRules::GetInlineStyles() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Mon, 14 May 2018 23:20:28 +0900 - rev 419491
Push 34038 by apavel@mozilla.com at Wed, 23 May 2018 21:59:47 +0000
Bug 1460509 - part 31: Make HTMLEditRules::GetInlineStyles() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato MozReview-Commit-ID: 3Nk1gBttuwM
cf4b4e10743a3c8a599aba280ee6367e46341ee9: Bug 1460509 - part 30: Make HTMLEditRules::ReapplyCachedStyles() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Mon, 14 May 2018 23:14:50 +0900 - rev 419490
Push 34038 by apavel@mozilla.com at Wed, 23 May 2018 21:59:47 +0000
Bug 1460509 - part 30: Make HTMLEditRules::ReapplyCachedStyles() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato MozReview-Commit-ID: HSv2els7Lys
849fd2e02f490fe89284403433f15d3bbdc1972c: Bug 1460509 - part 29: Make HTMLEditRules::AdjustSpecialBreaks() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Mon, 14 May 2018 22:56:06 +0900 - rev 419489
Push 34038 by apavel@mozilla.com at Wed, 23 May 2018 21:59:47 +0000
Bug 1460509 - part 29: Make HTMLEditRules::AdjustSpecialBreaks() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato And this patch renames it to InsertBRElementToEmptyListItemsAndTableCellsInChangedRange(). MozReview-Commit-ID: 1DGhcI93YAk
c5795680e2e5e051acded1c5471875f37630fe9b: Bug 1460509 - part 28: Make HTMLEditRules::AdjustWhitespace() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Mon, 14 May 2018 22:42:08 +0900 - rev 419488
Push 34038 by apavel@mozilla.com at Wed, 23 May 2018 21:59:47 +0000
Bug 1460509 - part 28: Make HTMLEditRules::AdjustWhitespace() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato MozReview-Commit-ID: 6dFP6BYDXMg
e0d5244b2df060c5c384b2a7538454309a7bb5ee: Bug 1460509 - part 27: Make HTMLEditRules::PinSelectionToNewBlock() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Mon, 14 May 2018 22:37:33 +0900 - rev 419487
Push 34038 by apavel@mozilla.com at Wed, 23 May 2018 21:59:47 +0000
Bug 1460509 - part 27: Make HTMLEditRules::PinSelectionToNewBlock() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato MozReview-Commit-ID: GW0xI5BBxqU
(0) -300000 -100000 -30000 -10000 -3000 -1000 -300 -100 -50 -20 +20 +50 +100 +300 +1000 +3000 +10000 +30000 +100000 tip