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
|
|
|
|
|
|
|
/**
|
|
|
|
* nsMappedAttributeElement is the base for elements supporting style mapped
|
|
|
|
* attributes via nsMappedAttributes (HTML and MathML).
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef NS_MAPPEDATTRIBUTEELEMENT_H_
|
|
|
|
#define NS_MAPPEDATTRIBUTEELEMENT_H_
|
|
|
|
|
2013-05-30 00:43:41 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2017-01-27 00:39:13 +03:00
|
|
|
#include "mozilla/GenericSpecifiedValues.h"
|
2008-01-09 01:36:46 +03:00
|
|
|
#include "nsStyledElement.h"
|
|
|
|
|
|
|
|
class nsMappedAttributes;
|
2008-01-09 13:43:57 +03:00
|
|
|
struct nsRuleData;
|
2008-01-09 01:36:46 +03:00
|
|
|
|
|
|
|
typedef void (*nsMapRuleToAttributesFunc)(const nsMappedAttributes* aAttributes,
|
2017-01-27 03:51:01 +03:00
|
|
|
mozilla::GenericSpecifiedValues* aData);
|
2008-01-09 01:36:46 +03:00
|
|
|
|
|
|
|
typedef nsStyledElement nsMappedAttributeElementBase;
|
|
|
|
|
|
|
|
class nsMappedAttributeElement : public nsMappedAttributeElementBase
|
|
|
|
{
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
2014-08-05 17:19:51 +04:00
|
|
|
explicit nsMappedAttributeElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
|
2008-01-09 01:36:46 +03:00
|
|
|
: nsMappedAttributeElementBase(aNodeInfo)
|
|
|
|
{}
|
|
|
|
|
|
|
|
public:
|
|
|
|
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
|
|
|
|
|
|
|
|
static void MapNoAttributesInto(const nsMappedAttributes* aAttributes,
|
2017-01-27 03:51:01 +03:00
|
|
|
mozilla::GenericSpecifiedValues* aGenericData);
|
2008-01-09 01:36:46 +03:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker) override;
|
2011-09-29 10:19:26 +04:00
|
|
|
virtual bool SetMappedAttribute(nsIDocument* aDocument,
|
2008-01-09 01:36:46 +03:00
|
|
|
nsIAtom* aName,
|
|
|
|
nsAttrValue& aValue,
|
2015-03-21 19:28:04 +03:00
|
|
|
nsresult* aRetval) override;
|
2008-01-09 01:36:46 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // NS_MAPPEDATTRIBUTEELEMENT_H_
|