/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* 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/. */
uint64_t HTMLLinkAccessible::NativeLinkState() const {
dom::ElementState state = mContent->AsElement()->State(); if (state.HasState(dom::ElementState::UNVISITED)) { return states::LINKED;
}
if (state.HasState(dom::ElementState::VISITED)) { return states::LINKED | states::TRAVERSED;
}
// This is a either named anchor (a link with also a name attribute) or // it doesn't have any attributes. Check if 'click' event handler is // registered, otherwise bail out. return nsCoreUtils::HasClickListener(mContent) ? states::LINKED : 0;
}
uint64_t HTMLLinkAccessible::NativeInteractiveState() const {
uint64_t state = HyperTextAccessible::NativeInteractiveState();
// This is how we indicate it is a named anchor. In other words, this anchor // can be selected as a location :) There is no other better state to use to // indicate this. if (mContent->AsElement()->HasAttr(nsGkAtoms::name)) {
state |= states::SELECTABLE;
}
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.