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
--- 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();