54843b7bec1c9963d76911dd5596d39a27f6ae51: Bug 1460509 - part 21: Make HTMLEditRules::RemoveAlignment() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Sat, 12 May 2018 11:39:01 +0900 - rev 473699
Push 9374 by jlund@mozilla.com at Mon, 18 Jun 2018 21:43:20 +0000
Bug 1460509 - part 21: Make HTMLEditRules::RemoveAlignment() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato MozReview-Commit-ID: JV2vdZXoYIL
2f7af16c2b10a02832db498fed38394d4026719a: Bug 1460509 - part 20: Make HTMLEditRules::MakeSureElemStartsAndEndsOnCR() and HTMLEditRules::MakeSureElemStartsOrEndsOnCR() return NS_ERROR_EDITOR_DESTROYED if they cause destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Sat, 12 May 2018 11:25:23 +0900 - rev 473698
Push 9374 by jlund@mozilla.com at Mon, 18 Jun 2018 21:43:20 +0000
Bug 1460509 - part 20: Make HTMLEditRules::MakeSureElemStartsAndEndsOnCR() and HTMLEditRules::MakeSureElemStartsOrEndsOnCR() return NS_ERROR_EDITOR_DESTROYED if they cause destroying the editor r=m_kato MozReview-Commit-ID: I8HcvO9IB7x
ba7cf7a4465e1f1e5740d9da092e0aa8f6931692: Bug 1460509 - part 19: Make HTMLEditRules::AlignBlock() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Sat, 12 May 2018 10:58:57 +0900 - rev 473697
Push 9374 by jlund@mozilla.com at Mon, 18 Jun 2018 21:43:20 +0000
Bug 1460509 - part 19: Make HTMLEditRules::AlignBlock() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato Additionally, this patch renames its specific enum class from ContentsOnly to ResetAlignOf for making its target clearer. MozReview-Commit-ID: KD4ndAsMClN
a737ec81970747f3fcc2c40ae9d8b17fe1e9488e: Bug 1460509 - part 18: Make HTMLEditRules::ChangeIndentation() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Sat, 12 May 2018 10:29:41 +0900 - rev 473696
Push 9374 by jlund@mozilla.com at Mon, 18 Jun 2018 21:43:20 +0000
Bug 1460509 - part 18: Make HTMLEditRules::ChangeIndentation() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato Additionally, this patch renames it to ChangeMarginStart() for making its job clearer and add two inline wrapper methods. MozReview-Commit-ID: L2GfLKhT6sa
c2322ad44783a5e4d45432755ee1ed1677b1ddaf: Bug 1460509 - part 17: Make HTMLEditRules::WillAbsolutePosition() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the HTML editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Fri, 11 May 2018 20:25:01 +0900 - rev 473695
Push 9374 by jlund@mozilla.com at Mon, 18 Jun 2018 21:43:20 +0000
Bug 1460509 - part 17: Make HTMLEditRules::WillAbsolutePosition() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the HTML editor r=m_kato MozReview-Commit-ID: EGqb0hNpNnc
cf291a1b8c9cf85c4f12fa97a9501a095c33bc07: Bug 1460509 - part 16: Make HTMLEditRules::DidAbsolutePosition() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Fri, 11 May 2018 19:39:26 +0900 - rev 473694
Push 9374 by jlund@mozilla.com at Mon, 18 Jun 2018 21:43:20 +0000
Bug 1460509 - part 16: Make HTMLEditRules::DidAbsolutePosition() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato MozReview-Commit-ID: BBAvHn08og4
2026d755e6b7a22cf4daa681e3d00706fffedd3f: Bug 1460509 - part 15: Make HTMLEditRules::WillRemoveAbsolutePosition() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Fri, 11 May 2018 19:32:00 +0900 - rev 473693
Push 9374 by jlund@mozilla.com at Mon, 18 Jun 2018 21:43:20 +0000
Bug 1460509 - part 15: Make HTMLEditRules::WillRemoveAbsolutePosition() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato MozReview-Commit-ID: DXzdtPQ01lo
e9a4f9a25edc11e5d394706d1db2764a7cee0640: Bug 1460509 - part 14: Make HTMLEditRules::WillRelativeChangeZIndex() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Fri, 11 May 2018 19:24:35 +0900 - rev 473692
Push 9374 by jlund@mozilla.com at Mon, 18 Jun 2018 21:43:20 +0000
Bug 1460509 - part 14: Make HTMLEditRules::WillRelativeChangeZIndex() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato MozReview-Commit-ID: 8HEqK3DAPO4
67892070f7ccd6329825f005cfc84957424a7769: Bug 1460509 - part 13: Make TextEditRules::WillInsert() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Fri, 11 May 2018 19:06:07 +0900 - rev 473691
Push 9374 by jlund@mozilla.com at Mon, 18 Jun 2018 21:43:20 +0000
Bug 1460509 - part 13: Make TextEditRules::WillInsert() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato This patch also makes aCancel of TextEditRules::WillInsert() optional since a lot of callers need to ignore the result. MozReview-Commit-ID: JrvycxMQ9Mm
54e551b4a5cddd89cea388c5a506c8268bdb7b68: Bug 1460509 - part 12: Make TextEditRules::WillInsertBreak() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Fri, 11 May 2018 18:49:44 +0900 - rev 473690
Push 9374 by jlund@mozilla.com at Mon, 18 Jun 2018 21:43:20 +0000
Bug 1460509 - part 12: Make TextEditRules::WillInsertBreak() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato MozReview-Commit-ID: Ia5MJ465Hdf
ece3aca105432e5ef02d6ede0f44f906f45a08e3: Bug 1460509 - part 11: Make TextEditRules::CollapseSelectionToTrailingBRIfNeeded() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Fri, 11 May 2018 18:40:47 +0900 - rev 473689
Push 9374 by jlund@mozilla.com at Mon, 18 Jun 2018 21:43:20 +0000
Bug 1460509 - part 11: Make TextEditRules::CollapseSelectionToTrailingBRIfNeeded() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato MozReview-Commit-ID: 3ulGUfu1af1
565fadbff87ebb5200d68ae253f79296e38413cf: Bug 1460509 - part 10: Make TextEditRules::WillInsertText() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Fri, 11 May 2018 18:29:54 +0900 - rev 473688
Push 9374 by jlund@mozilla.com at Mon, 18 Jun 2018 21:43:20 +0000
Bug 1460509 - part 10: Make TextEditRules::WillInsertText() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato MozReview-Commit-ID: RT0Bi9TBwt
4ae685aae84c07d7d9a84caa9318f9868b944940: Bug 1460509 - part 9: Make TextEditRules::WillSetText() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Fri, 11 May 2018 17:33:55 +0900 - rev 473687
Push 9374 by jlund@mozilla.com at Mon, 18 Jun 2018 21:43:20 +0000
Bug 1460509 - part 9: Make TextEditRules::WillSetText() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato MozReview-Commit-ID: 9ksPugTVVqh
263d02ec8c980a4fc4d931f14a79ec049e55e6c1: Bug 1460509 - part 8: Make TextEditRules::WillDeleteSelection() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Fri, 11 May 2018 17:15:53 +0900 - rev 473686
Push 9374 by jlund@mozilla.com at Mon, 18 Jun 2018 21:43:20 +0000
Bug 1460509 - part 8: Make TextEditRules::WillDeleteSelection() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato This patch creates internal method for it as DeleteSelectionWithTransaction() because it needs to create SelectionBatcher and destruction of it may cause destroying the editor. Therefore, unfortunately, all callers of DeleteSelectionWithTransaction() needs to check CanHandleEditAction() manually. If we could use try-catch, we could make it safer, though. MozReview-Commit-ID: 13enOQjEzNn
a150cf6057a48028f10b5da269e319cb26a4cac1: Bug 1460509 - part 7: Make TextEditRules::DidDeleteSelection() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Fri, 11 May 2018 16:48:29 +0900 - rev 473685
Push 9374 by jlund@mozilla.com at Mon, 18 Jun 2018 21:43:20 +0000
Bug 1460509 - part 7: Make TextEditRules::DidDeleteSelection() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato And also this patch removes unnecessary arguments from the method. MozReview-Commit-ID: UKscK4vFVX
3dcc53c8a9faceedd2d991971a086adcf57319b8: Bug 1460509 - part 6: Make TextEditRules::RemoveRedundantTrailingBR() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Fri, 11 May 2018 16:36:07 +0900 - rev 473684
Push 9374 by jlund@mozilla.com at Mon, 18 Jun 2018 21:43:20 +0000
Bug 1460509 - part 6: Make TextEditRules::RemoveRedundantTrailingBR() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato MozReview-Commit-ID: HpFo0SiTBWJ
96c4dd5af3c5424c65fd9950b8c199535826acce: Bug 1460509 - part 5: Make TextEditRules::CreateTrailingBRIfNeeded() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Fri, 11 May 2018 16:31:53 +0900 - rev 473683
Push 9374 by jlund@mozilla.com at Mon, 18 Jun 2018 21:43:20 +0000
Bug 1460509 - part 5: Make TextEditRules::CreateTrailingBRIfNeeded() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato MozReview-Commit-ID: CNTgECam862
11bcaf374f3fd31a83f9829d8660370a132e91b8: Bug 1460509 - part 4: Make TextEditRules::CreateBogusNodeIfNeeded() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Fri, 11 May 2018 16:24:15 +0900 - rev 473682
Push 9374 by jlund@mozilla.com at Mon, 18 Jun 2018 21:43:20 +0000
Bug 1460509 - part 4: Make TextEditRules::CreateBogusNodeIfNeeded() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato Note that HTMLEditRules::DocumentModifiedWorker() is a runnable method. So, it cannot return nsresult. Therefore, it just checks the result only with NS_WARNING_ASSERTION(). MozReview-Commit-ID: KBSpv5H5KGU
74c8cf6f92babcf7c155f32777d4e3c2935db427: Bug 1460509 - part 3: Make TextEditRules::HideLastPWInput() return NS_ERROR_EDITOR_DESTROYED when it causes destroying the editor r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Fri, 11 May 2018 16:08:47 +0900 - rev 473681
Push 9374 by jlund@mozilla.com at Mon, 18 Jun 2018 21:43:20 +0000
Bug 1460509 - part 3: Make TextEditRules::HideLastPWInput() return NS_ERROR_EDITOR_DESTROYED when it causes destroying the editor r=m_kato And also this patch marks it as MOZ_MUST_USE. All callers have to check if the result is NS_ERROR_EDITOR_DESTROYED at least. MozReview-Commit-ID: H4DfU1asPpe
0899d038b7f35c5103e9b8f56347327734c78fcf: Bug 1460509 - part 2: Make TextEditRules::CreateBR() and TextEditRules::CreateMozBR() return both new <br> element node and error code since if they cause destroying the editor, each caller needs NS_ERROR_EDITOR_DESTROYED result r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Fri, 11 May 2018 15:52:24 +0900 - rev 473680
Push 9374 by jlund@mozilla.com at Mon, 18 Jun 2018 21:43:20 +0000
Bug 1460509 - part 2: Make TextEditRules::CreateBR() and TextEditRules::CreateMozBR() return both new <br> element node and error code since if they cause destroying the editor, each caller needs NS_ERROR_EDITOR_DESTROYED result r=m_kato First, this patch changes TextEditRules::CreateBRInternal() to a private method for making any callers use CreateBR() or CreateMozBR() instead. Then, this patch makes TextEditRules::CreateBRInternal() return both nsresult and created <br> element with CreateElementResult class. Finally, this patch makes all callers of them check if they don't return an error code including NS_ERROR_EDITOR_DESTROYED. MozReview-Commit-ID: 18OvPmbDVHK
(0) -300000 -100000 -30000 -10000 -3000 -1000 -300 -100 -50 -20 +20 +50 +100 +300 +1000 +3000 +10000 +30000 +100000 tip