зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1487313 - stop using nsIDOMXULLabelElement and nsIDOMXULDescriptionElement in a11y, r=jamie
This commit is contained in:
Родитель
796d9f80d3
Коммит
ef0cc6d04c
|
@ -32,7 +32,6 @@
|
|||
#include "XULDocument.h"
|
||||
|
||||
#include "nsIDOMXULButtonElement.h"
|
||||
#include "nsIDOMXULLabelElement.h"
|
||||
#include "nsIDOMXULSelectCntrlEl.h"
|
||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||
#include "nsINodeList.h"
|
||||
|
@ -823,17 +822,15 @@ Accessible::XULElmName(DocAccessible* aDocument,
|
|||
|
||||
// CASES #2 and #3 ------ label as a child or <label control="id" ... > </label>
|
||||
if (aName.IsEmpty()) {
|
||||
Accessible* labelAcc = nullptr;
|
||||
Accessible* label = nullptr;
|
||||
XULLabelIterator iter(aDocument, aElm);
|
||||
while ((labelAcc = iter.Next())) {
|
||||
nsCOMPtr<nsIDOMXULLabelElement> xulLabel =
|
||||
do_QueryInterface(labelAcc->GetContent());
|
||||
while ((label = iter.Next())) {
|
||||
// Check if label's value attribute is used
|
||||
if (xulLabel && NS_SUCCEEDED(xulLabel->GetValue(aName)) && aName.IsEmpty()) {
|
||||
label->Elm()->GetAttr(kNameSpaceID_None, nsGkAtoms::value, aName);
|
||||
if (aName.IsEmpty()) {
|
||||
// If no value attribute, a non-empty label must contain
|
||||
// children that define its text -- possibly using HTML
|
||||
nsTextEquivUtils::
|
||||
AppendTextEquivFromContent(labelAcc, labelAcc->GetContent(), &aName);
|
||||
nsTextEquivUtils::AppendTextEquivFromContent(label, label->Elm(), &aName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include "Logging.h"
|
||||
#endif
|
||||
|
||||
#include "nsIDOMXULDescriptionElement.h"
|
||||
#include "nsNameSpaceManager.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsString.h"
|
||||
|
|
Загрузка…
Ссылка в новой задаче