2015-05-03 22:32:37 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2008-01-09 01:36:46 +03:00
|
|
|
|
|
|
|
#include "nsMappedAttributeElement.h"
|
|
|
|
#include "nsIDocument.h"
|
|
|
|
|
|
|
|
nsresult
|
|
|
|
nsMappedAttributeElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker)
|
|
|
|
{
|
|
|
|
mAttrsAndChildren.WalkMappedAttributeStyleRules(aRuleWalker);
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
bool
|
2017-05-19 00:09:01 +03:00
|
|
|
nsMappedAttributeElement::SetAndSwapMappedAttribute(nsIAtom* aName,
|
|
|
|
nsAttrValue& aValue,
|
|
|
|
bool* aValueWasSet,
|
|
|
|
nsresult* aRetval)
|
2008-01-09 01:36:46 +03:00
|
|
|
{
|
2017-04-07 19:21:48 +03:00
|
|
|
nsHTMLStyleSheet* sheet = OwnerDoc()->GetAttributeStyleSheet();
|
2017-05-19 00:09:01 +03:00
|
|
|
*aRetval = mAttrsAndChildren.SetAndSwapMappedAttr(aName, aValue,
|
|
|
|
this, sheet, aValueWasSet);
|
2011-10-17 18:59:28 +04:00
|
|
|
return true;
|
2008-01-09 01:36:46 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
nsMapRuleToAttributesFunc
|
|
|
|
nsMappedAttributeElement::GetAttributeMappingFunction() const
|
|
|
|
{
|
|
|
|
return &MapNoAttributesInto;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
nsMappedAttributeElement::MapNoAttributesInto(const nsMappedAttributes* aAttributes,
|
2017-01-27 03:51:01 +03:00
|
|
|
mozilla::GenericSpecifiedValues* aGenericData)
|
2008-01-09 01:36:46 +03:00
|
|
|
{
|
|
|
|
}
|
2017-04-07 19:21:48 +03:00
|
|
|
|
|
|
|
void
|
|
|
|
nsMappedAttributeElement::NodeInfoChanged(nsIDocument* aOldDoc)
|
|
|
|
{
|
|
|
|
nsHTMLStyleSheet* sheet = OwnerDoc()->GetAttributeStyleSheet();
|
|
|
|
mAttrsAndChildren.SetMappedAttrStyleSheet(sheet);
|
|
|
|
nsMappedAttributeElementBase::NodeInfoChanged(aOldDoc);
|
|
|
|
}
|