зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1465175 - Remove mozAutoDocConditionalContentUpdateBatch, r=dbaron
--HG-- extra : rebase_source : 4ef305d902e3610f5535d59afbbc170c669cff9c
This commit is contained in:
Родитель
cef592fcd7
Коммит
db8308dd10
|
@ -52,35 +52,4 @@ private:
|
|||
(doc,notify)
|
||||
|
||||
|
||||
/**
|
||||
* Creates an update batch only under certain conditions.
|
||||
* Use this rather than mozAutoDocUpdate when you expect inner updates
|
||||
* to notify but you don't always want to spec cycles creating a batch.
|
||||
* This is needed to avoid having this batch always create a blocker,
|
||||
* but then have inner mozAutoDocUpdate call the last EndUpdate before.
|
||||
* we remove that blocker. See bug 423269.
|
||||
*/
|
||||
class MOZ_STACK_CLASS mozAutoDocConditionalContentUpdateBatch
|
||||
{
|
||||
public:
|
||||
mozAutoDocConditionalContentUpdateBatch(nsIDocument* aDocument,
|
||||
bool aNotify) :
|
||||
mDocument(aNotify ? aDocument : nullptr)
|
||||
{
|
||||
if (mDocument) {
|
||||
mDocument->BeginUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
~mozAutoDocConditionalContentUpdateBatch()
|
||||
{
|
||||
if (mDocument) {
|
||||
mDocument->EndUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
nsCOMPtr<nsIDocument> mDocument;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -180,7 +180,7 @@ nsDOMCSSAttributeDeclaration::SetSMILValue(const nsCSSPropertyID aPropID,
|
|||
if (!olddecl) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
mozAutoDocConditionalContentUpdateBatch autoUpdate(DocToUpdate(), true);
|
||||
mozAutoDocUpdate autoUpdate(DocToUpdate(), true);
|
||||
RefPtr<DeclarationBlock> decl = olddecl->EnsureMutable();
|
||||
bool changed = nsSMILCSSValueType::SetPropertyValues(aValue, *decl);
|
||||
if (changed) {
|
||||
|
|
|
@ -116,7 +116,7 @@ nsDOMCSSDeclaration::SetCssText(const nsAString& aCssText,
|
|||
// need to start the update now so that the old rule doesn't get used
|
||||
// between when we mutate the declaration and when we set the new
|
||||
// rule (see stack in bug 209575).
|
||||
mozAutoDocConditionalContentUpdateBatch autoUpdate(DocToUpdate(), true);
|
||||
mozAutoDocUpdate autoUpdate(DocToUpdate(), true);
|
||||
|
||||
ParsingEnvironment servoEnv =
|
||||
GetParsingEnvironment(aSubjectPrincipal);
|
||||
|
@ -258,7 +258,7 @@ nsDOMCSSDeclaration::ModifyDeclaration(nsIPrincipal* aSubjectPrincipal,
|
|||
// need to start the update now so that the old rule doesn't get used
|
||||
// between when we mutate the declaration and when we set the new
|
||||
// rule (see stack in bug 209575).
|
||||
mozAutoDocConditionalContentUpdateBatch autoUpdate(DocToUpdate(), true);
|
||||
mozAutoDocUpdate autoUpdate(DocToUpdate(), true);
|
||||
RefPtr<DeclarationBlock> decl = olddecl->EnsureMutable();
|
||||
|
||||
bool changed;
|
||||
|
@ -325,7 +325,7 @@ nsDOMCSSDeclaration::RemovePropertyInternal(nsCSSPropertyID aPropID)
|
|||
// need to start the update now so that the old rule doesn't get used
|
||||
// between when we mutate the declaration and when we set the new
|
||||
// rule (see stack in bug 209575).
|
||||
mozAutoDocConditionalContentUpdateBatch autoUpdate(DocToUpdate(), true);
|
||||
mozAutoDocUpdate autoUpdate(DocToUpdate(), true);
|
||||
|
||||
RefPtr<DeclarationBlock> decl = olddecl->EnsureMutable();
|
||||
if (!decl->RemovePropertyByID(aPropID)) {
|
||||
|
@ -347,7 +347,7 @@ nsDOMCSSDeclaration::RemovePropertyInternal(const nsAString& aPropertyName)
|
|||
// need to start the update now so that the old rule doesn't get used
|
||||
// between when we mutate the declaration and when we set the new
|
||||
// rule (see stack in bug 209575).
|
||||
mozAutoDocConditionalContentUpdateBatch autoUpdate(DocToUpdate(), true);
|
||||
mozAutoDocUpdate autoUpdate(DocToUpdate(), true);
|
||||
|
||||
RefPtr<DeclarationBlock> decl = olddecl->EnsureMutable();
|
||||
if (!decl->RemoveProperty(aPropertyName)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче