зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1460509 - part 57: Mark HTMLEditRules::AlignInnerBlocks() as MOZ_MUST_USE since it may cause destroying the editor r=m_kato
MozReview-Commit-ID: 8hBJPn1shZu --HG-- extra : rebase_source : 2df70cd07015fa0895a5d7540c1179107088a8e2
This commit is contained in:
Родитель
7fd1c21f25
Коммит
c97adaf670
|
@ -5872,10 +5872,15 @@ HTMLEditRules::WillAlign(const nsAString& aAlignType,
|
|||
continue;
|
||||
}
|
||||
if (HTMLEditUtils::IsList(atCurNode.GetContainer())) {
|
||||
// If we don't use CSS, add a contraint to list element: they have to
|
||||
// be inside another list, i.e., >= second level of nesting
|
||||
// If we don't use CSS, add a content to list element: they have to
|
||||
// be inside another list, i.e., >= second level of nesting.
|
||||
// XXX AlignInnerBlocks() handles list item elements and table cells.
|
||||
// Is it intentional to change alignment of nested other type
|
||||
// descendants too?
|
||||
rv = AlignInnerBlocks(*curNode, aAlignType);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
curDiv = nullptr;
|
||||
continue;
|
||||
}
|
||||
|
@ -5924,10 +5929,6 @@ HTMLEditRules::WillAlign(const nsAString& aAlignType,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* AlignInnerBlocks() aligns inside table cells or list items.
|
||||
*/
|
||||
nsresult
|
||||
HTMLEditRules::AlignInnerBlocks(nsINode& aNode,
|
||||
const nsAString& aAlignType)
|
||||
|
|
|
@ -401,7 +401,16 @@ protected:
|
|||
*/
|
||||
MOZ_MUST_USE nsresult DidAbsolutePosition();
|
||||
|
||||
nsresult AlignInnerBlocks(nsINode& aNode, const nsAString& aAlignType);
|
||||
/**
|
||||
* AlignInnerBlocks() calls AlignBlockContents() for every list item element
|
||||
* and table cell element in aNode.
|
||||
*
|
||||
* @param aNode The node whose descendants should be aligned
|
||||
* to aAlignType.
|
||||
* @param aAlignType New value of align attribute of <div>.
|
||||
*/
|
||||
MOZ_MUST_USE nsresult
|
||||
AlignInnerBlocks(nsINode& aNode, const nsAString& aAlignType);
|
||||
|
||||
/**
|
||||
* AlignBlockContents() sets align attribute of <div> element which is
|
||||
|
|
Загрузка…
Ссылка в новой задаче