Source code

Revision control

Copy as Markdown

Other Tools

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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 */
* nsMappedAttributeElement is the base for elements supporting style mapped
* attributes via nsMappedAttributes (HTML and MathML).
#include "mozilla/Attributes.h"
#include "nsStyledElement.h"
namespace mozilla {
class MappedDeclarations;
class nsMappedAttributes;
struct nsRuleData;
using nsMapRuleToAttributesFunc = void (*)(
const nsMappedAttributes* aAttributes, mozilla::MappedDeclarations&);
using nsMappedAttributeElementBase = nsStyledElement;
class nsMappedAttributeElement : public nsMappedAttributeElementBase {
explicit nsMappedAttributeElement(
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
: nsMappedAttributeElementBase(std::move(aNodeInfo)) {}
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
static void MapNoAttributesInto(const nsMappedAttributes* aAttributes,
virtual bool SetAndSwapMappedAttribute(nsAtom* aName, nsAttrValue& aValue,
bool* aValueWasSet,
nsresult* aRetval) override;
virtual void NodeInfoChanged(mozilla::dom::Document* aOldDoc) override;