Bug 1460509 - part 71: Mark HTMLEditRules::WillMakeDefListItem() as MOZ_MUST_USE since it may return NS_ERROR_EDITOR_DESTROYED r?m_kato draft
authorMasayuki Nakano <masayuki@d-toybox.com>
Thu, 17 May 2018 20:18:49 +0900
changeset 798789 bb20a0b9d5f005293116c9cb99277637c2127482
parent 798788 5a402d861d0ed429a59a136231ed7d24518d79e5
child 798790 84c52ed3b7c0c73944a053dcbe72e89fca525c6b
push id110840
push usermasayuki@d-toybox.com
push dateWed, 23 May 2018 13:41:58 +0000
reviewersm_kato
bugs1460509
milestone62.0a1
Bug 1460509 - part 71: Mark HTMLEditRules::WillMakeDefListItem() as MOZ_MUST_USE since it may return NS_ERROR_EDITOR_DESTROYED r?m_kato MozReview-Commit-ID: LrLmebLbwWm
editor/libeditor/HTMLEditRules.h
--- a/editor/libeditor/HTMLEditRules.h
+++ b/editor/libeditor/HTMLEditRules.h
@@ -396,18 +396,29 @@ protected:
    *
    * @param aChange             Amount to change z-index.
    * @param aCancel             Returns true if the operation is canceled.
    * @param aHandled            Returns true if the edit action is handled.
    */
   MOZ_MUST_USE nsresult
   WillRelativeChangeZIndex(int32_t aChange, bool* aCancel, bool* aHandled);
 
-  nsresult WillMakeDefListItem(const nsAString* aBlockType, bool aEntireList,
-                               bool* aCancel, bool* aHandled);
+  /**
+   * Called before creating aDefinitionListItemTag around Selection.  This
+   * method just calls WillMakeList() with "dl" as aListType and
+   * aDefinitionListItemTag as aItemType.
+   *
+   * @param aDefinitionListItemTag  Should be "dt" or "dd".
+   * @param aEntireList             XXX not sure
+   * @param aCancel                 Returns true if the operation is canceled.
+   * @param aHandled                Returns true if the edit action is handled.
+   */
+  MOZ_MUST_USE nsresult
+  WillMakeDefListItem(const nsAString* aBlockType, bool aEntireList,
+                      bool* aCancel, bool* aHandled);
 
   /**
    * WillMakeBasicBlock() called before changing block style around Selection.
    * This method actually does something with calling MakeBasicBlock().
    *
    * @param aBlockType          Necessary block style as string.
    * @param aCancel             Returns true if the operation is canceled.
    * @param aHandled            Returns true if the edit action is handled.