/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=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 http://mozilla.org/MPL/2.0/. */
/** * Used to store state map rule data for ARIA attribute of enum type.
*/ struct EnumTypeData { // ARIA attribute name.
nsStaticAtom* const mAttrName;
// States if the attribute value is matched to the enum value. Used as // Element::AttrValuesArray, last item must be nullptr.
nsStaticAtom* const mValues[4];
// States applied if corresponding enum values are matched. const uint64_t mStates[3];
// States to clear in case of match. const uint64_t mClearState;
};
enum ETokenType {
eBoolType = 0,
eMixedType = 1, // can take 'mixed' value
eDefinedIfAbsent = 2 // permanent and false state are applied if absent
};
/** * Used to store state map rule data for ARIA attribute of token type (including * mixed value).
*/ struct TokenTypeData {
TokenTypeData(nsAtom* aAttrName, uint32_t aType, uint64_t aPermanentState,
uint64_t aTrueState, uint64_t aFalseState = 0)
: mAttrName(aAttrName),
mType(aType),
mPermanentState(aPermanentState),
mTrueState(aTrueState),
mFalseState(aFalseState) {}
// ARIA attribute name.
nsAtom* const mAttrName;
// Type. const uint32_t mType;
// State applied if the attribute is defined or mType doesn't have // eDefinedIfAbsent flag set. const uint64_t mPermanentState;
// States applied if the attribute value is true/false. const uint64_t mTrueState; const uint64_t mFalseState;
};
/** * Map enum type attribute value to accessible state.
*/ staticvoid MapEnumType(dom::Element* aElement, uint64_t* aState, const EnumTypeData& aData);
/** * Map token type attribute value to states.
*/ staticvoid MapTokenType(dom::Element* aContent, uint64_t* aState, const TokenTypeData& aData);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.