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 draft
authorMasayuki Nakano <masayuki@d-toybox.com>
Mon, 14 May 2018 23:24:40 +0900
changeset 798750 4e5baa212eb0faf7e14d1e5bbd7bdb556065cebb
parent 798749 2883b6d37cc69778dd9ba3190fd28bebb1048766
child 798751 ab036ff607ee93a005f7d9e0ca8421a7a76c1dc3
push id110840
push usermasayuki@d-toybox.com
push dateWed, 23 May 2018 13:41:58 +0000
reviewersm_kato
bugs1460509
milestone62.0a1
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
editor/libeditor/HTMLEditRules.h
--- a/editor/libeditor/HTMLEditRules.h
+++ b/editor/libeditor/HTMLEditRules.h
@@ -585,17 +585,22 @@ protected:
    * If aListElement has other nodes as its child, they are just removed.
    * Finally, aListElement is removed. and its all children are moved to
    * where the aListElement was.
    *
    * @param aListElement        A <ul>, <ol> or <dl> element.
    */
   MOZ_MUST_USE nsresult RemoveListStructure(Element& aListElement);
 
-  nsresult CacheInlineStyles(nsINode* aNode);
+  /**
+   * CacheInlineStyles() caches style of aNode into mCachedStyles.
+   * This may cause flushing layout at retrieving computed value of CSS
+   * properties.
+   */
+  MOZ_MUST_USE nsresult CacheInlineStyles(nsINode* aNode);
 
   /**
    * ReapplyCachedStyles() restores some styles which are disappeared during
    * handling edit action and it should be restored.  This may cause flushing
    * layout at retrieving computed value of CSS properties.
    */
   MOZ_MUST_USE nsresult ReapplyCachedStyles();