This commit is contained in:
Brian Hackett 2011-09-16 08:51:41 -07:00
Родитель cbf706e058 8024c114f3
Коммит a6771d2cc9
392 изменённых файлов: 6856 добавлений и 5194 удалений

Просмотреть файл

@ -7,6 +7,10 @@
(^|/)ID$
(^|/)\.DS_Store$
# Vim swap files.
^\.sw.$
.[^/]*\.sw.$
# User files that may appear at the root
^\.mozconfig
^mozconfig$

Просмотреть файл

@ -65,15 +65,11 @@ tier_base_dirs = \
$(NULL)
ifndef LIBXUL_SDK
ifdef MOZ_MEMORY
tier_base_dirs += memory/jemalloc
endif
ifeq ($(OS_TARGET),Android)
tier_base_dirs += other-licenses/android
endif
tier_base_dirs += memory/mozalloc
tier_base_dirs += memory
endif
ifdef COMPILE_ENVIRONMENT

Просмотреть файл

@ -39,7 +39,6 @@
#include "nsAccessibleWrap.h"
#include "nsMaiInterfaceDocument.h"
#include "nsAccessibilityAtoms.h"
const char *const kDocTypeName = "W3C-doctype";
const char *const kDocUrlName = "DocURL";

Просмотреть файл

@ -111,7 +111,7 @@ RelatedAccIterator::
{
mBindingParent = aDependentContent->GetBindingParent();
nsIAtom* IDAttr = mBindingParent ?
nsAccessibilityAtoms::anonid : aDependentContent->GetIDAttributeName();
nsGkAtoms::anonid : aDependentContent->GetIDAttributeName();
nsAutoString id;
if (aDependentContent->GetAttr(kNameSpaceID_None, IDAttr, id))
@ -154,7 +154,7 @@ RelatedAccIterator::Next()
HTMLLabelIterator::
HTMLLabelIterator(nsDocAccessible* aDocument, nsIContent* aElement,
LabelFilter aFilter) :
mRelIter(aDocument, aElement, nsAccessibilityAtoms::_for),
mRelIter(aDocument, aElement, nsGkAtoms::_for),
mElement(aElement), mLabelFilter(aFilter)
{
}
@ -166,7 +166,7 @@ HTMLLabelIterator::Next()
// element, or <label> ancestor which implicitly point to it.
nsAccessible* label = nsnull;
while ((label = mRelIter.Next())) {
if (label->GetContent()->Tag() == nsAccessibilityAtoms::label)
if (label->GetContent()->Tag() == nsGkAtoms::label)
return label;
}
@ -177,9 +177,9 @@ HTMLLabelIterator::Next()
// implicitly points to us). Don't go up farther than form or body element.
nsIContent* walkUpContent = mElement;
while ((walkUpContent = walkUpContent->GetParent()) &&
walkUpContent->Tag() != nsAccessibilityAtoms::form &&
walkUpContent->Tag() != nsAccessibilityAtoms::body) {
if (walkUpContent->Tag() == nsAccessibilityAtoms::label) {
walkUpContent->Tag() != nsGkAtoms::form &&
walkUpContent->Tag() != nsGkAtoms::body) {
if (walkUpContent->Tag() == nsGkAtoms::label) {
// Prevent infinite loop.
mLabelFilter = eSkipAncestorLabel;
return GetAccService()->GetAccessible(walkUpContent);
@ -196,7 +196,7 @@ HTMLLabelIterator::Next()
HTMLOutputIterator::
HTMLOutputIterator(nsDocAccessible* aDocument, nsIContent* aElement) :
mRelIter(aDocument, aElement, nsAccessibilityAtoms::_for)
mRelIter(aDocument, aElement, nsGkAtoms::_for)
{
}
@ -205,7 +205,7 @@ HTMLOutputIterator::Next()
{
nsAccessible* output = nsnull;
while ((output = mRelIter.Next())) {
if (output->GetContent()->Tag() == nsAccessibilityAtoms::output)
if (output->GetContent()->Tag() == nsGkAtoms::output)
return output;
}
@ -219,7 +219,7 @@ HTMLOutputIterator::Next()
XULLabelIterator::
XULLabelIterator(nsDocAccessible* aDocument, nsIContent* aElement) :
mRelIter(aDocument, aElement, nsAccessibilityAtoms::control)
mRelIter(aDocument, aElement, nsGkAtoms::control)
{
}
@ -228,7 +228,7 @@ XULLabelIterator::Next()
{
nsAccessible* label = nsnull;
while ((label = mRelIter.Next())) {
if (label->GetContent()->Tag() == nsAccessibilityAtoms::label)
if (label->GetContent()->Tag() == nsGkAtoms::label)
return label;
}
@ -242,7 +242,7 @@ XULLabelIterator::Next()
XULDescriptionIterator::
XULDescriptionIterator(nsDocAccessible* aDocument, nsIContent* aElement) :
mRelIter(aDocument, aElement, nsAccessibilityAtoms::control)
mRelIter(aDocument, aElement, nsGkAtoms::control)
{
}
@ -251,7 +251,7 @@ XULDescriptionIterator::Next()
{
nsAccessible* descr = nsnull;
while ((descr = mRelIter.Next())) {
if (descr->GetContent()->Tag() == nsAccessibilityAtoms::description)
if (descr->GetContent()->Tag() == nsGkAtoms::description)
return descr;
}

Просмотреть файл

@ -60,7 +60,6 @@ CPPSRCS = \
nsARIAMap.cpp \
nsDocAccessible.cpp \
nsOuterDocAccessible.cpp \
nsAccessibilityAtoms.cpp \
nsCoreUtils.cpp \
nsAccUtils.cpp \
nsAccessibilityService.cpp \

Просмотреть файл

@ -41,6 +41,7 @@
#include "AccEvent.h"
#include "nsCycleCollectionParticipant.h"
#include "nsRefreshDriver.h"
class nsAccessible;
class nsDocAccessible;

Просмотреть файл

@ -795,11 +795,11 @@ nsARIAGridAccessible::SetARIASelected(nsAccessible *aAccessible,
nsresult rv = NS_OK;
if (aIsSelected)
rv = content->SetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_selected,
rv = content->SetAttr(kNameSpaceID_None, nsGkAtoms::aria_selected,
NS_LITERAL_STRING("true"), aNotify);
else
rv = content->UnsetAttr(kNameSpaceID_None,
nsAccessibilityAtoms::aria_selected, aNotify);
nsGkAtoms::aria_selected, aNotify);
NS_ENSURE_SUCCESS(rv, rv);
@ -1130,10 +1130,10 @@ nsARIAGridCellAccessible::ApplyARIAState(PRUint64* aState)
nsIContent *rowContent = row->GetContent();
if (nsAccUtils::HasDefinedARIAToken(rowContent,
nsAccessibilityAtoms::aria_selected) &&
nsGkAtoms::aria_selected) &&
!rowContent->AttrValueIs(kNameSpaceID_None,
nsAccessibilityAtoms::aria_selected,
nsAccessibilityAtoms::_false, eCaseMatters))
nsGkAtoms::aria_selected,
nsGkAtoms::_false, eCaseMatters))
*aState |= states::SELECTABLE | states::SELECTED;
}
@ -1190,7 +1190,7 @@ nsARIAGridCellAccessible::GetAttributesInternal(nsIPersistentProperties *aAttrib
nsAutoString stringIdx;
stringIdx.AppendInt(idx);
nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::tableCellIndex,
nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::tableCellIndex,
stringIdx);
return NS_OK;

Просмотреть файл

@ -42,7 +42,6 @@
#include "nsIAccessibleRole.h"
#include "States.h"
#include "nsAccessibilityAtoms.h"
#include "nsIContent.h"
using namespace mozilla::a11y;
@ -602,75 +601,75 @@ nsStateMapEntry nsARIAMap::gWAIStateMap[] = {
nsStateMapEntry(),
// eARIAAutoComplete
nsStateMapEntry(&nsAccessibilityAtoms::aria_autocomplete,
nsStateMapEntry(&nsGkAtoms::aria_autocomplete,
"inline", states::SUPPORTS_AUTOCOMPLETION,
"list", states::HASPOPUP | states::SUPPORTS_AUTOCOMPLETION,
"both", states::HASPOPUP | states::SUPPORTS_AUTOCOMPLETION),
// eARIABusy
nsStateMapEntry(&nsAccessibilityAtoms::aria_busy,
nsStateMapEntry(&nsGkAtoms::aria_busy,
"true", states::BUSY,
"error", states::INVALID),
// eARIACheckableBool
nsStateMapEntry(&nsAccessibilityAtoms::aria_checked, kBoolType,
nsStateMapEntry(&nsGkAtoms::aria_checked, kBoolType,
states::CHECKABLE, states::CHECKED, 0, PR_TRUE),
// eARIACheckableMixed
nsStateMapEntry(&nsAccessibilityAtoms::aria_checked, kMixedType,
nsStateMapEntry(&nsGkAtoms::aria_checked, kMixedType,
states::CHECKABLE, states::CHECKED, 0, PR_TRUE),
// eARIACheckedMixed
nsStateMapEntry(&nsAccessibilityAtoms::aria_checked, kMixedType,
nsStateMapEntry(&nsGkAtoms::aria_checked, kMixedType,
states::CHECKABLE, states::CHECKED, 0),
// eARIADisabled
nsStateMapEntry(&nsAccessibilityAtoms::aria_disabled, kBoolType,
nsStateMapEntry(&nsGkAtoms::aria_disabled, kBoolType,
0, states::UNAVAILABLE),
// eARIAExpanded
nsStateMapEntry(&nsAccessibilityAtoms::aria_expanded, kBoolType,
nsStateMapEntry(&nsGkAtoms::aria_expanded, kBoolType,
0, states::EXPANDED, states::COLLAPSED),
// eARIAHasPopup
nsStateMapEntry(&nsAccessibilityAtoms::aria_haspopup, kBoolType,
nsStateMapEntry(&nsGkAtoms::aria_haspopup, kBoolType,
0, states::HASPOPUP),
// eARIAInvalid
nsStateMapEntry(&nsAccessibilityAtoms::aria_invalid, kBoolType,
nsStateMapEntry(&nsGkAtoms::aria_invalid, kBoolType,
0, states::INVALID),
// eARIAMultiline
nsStateMapEntry(&nsAccessibilityAtoms::aria_multiline, kBoolType,
nsStateMapEntry(&nsGkAtoms::aria_multiline, kBoolType,
0, states::MULTI_LINE, states::SINGLE_LINE, PR_TRUE),
// eARIAMultiSelectable
nsStateMapEntry(&nsAccessibilityAtoms::aria_multiselectable, kBoolType,
nsStateMapEntry(&nsGkAtoms::aria_multiselectable, kBoolType,
0, states::MULTISELECTABLE | states::EXTSELECTABLE),
// eARIAOrientation
nsStateMapEntry(&nsAccessibilityAtoms::aria_orientation, eUseFirstState,
nsStateMapEntry(&nsGkAtoms::aria_orientation, eUseFirstState,
"vertical", states::VERTICAL,
"horizontal", states::HORIZONTAL),
// eARIAPressed
nsStateMapEntry(&nsAccessibilityAtoms::aria_pressed, kMixedType,
nsStateMapEntry(&nsGkAtoms::aria_pressed, kMixedType,
states::CHECKABLE, states::PRESSED),
// eARIAReadonly
nsStateMapEntry(&nsAccessibilityAtoms::aria_readonly, kBoolType,
nsStateMapEntry(&nsGkAtoms::aria_readonly, kBoolType,
0, states::READONLY),
// eARIAReadonlyOrEditable
nsStateMapEntry(&nsAccessibilityAtoms::aria_readonly, kBoolType,
nsStateMapEntry(&nsGkAtoms::aria_readonly, kBoolType,
0, states::READONLY, states::EDITABLE, PR_TRUE),
// eARIARequired
nsStateMapEntry(&nsAccessibilityAtoms::aria_required, kBoolType,
nsStateMapEntry(&nsGkAtoms::aria_required, kBoolType,
0, states::REQUIRED),
// eARIASelectable
nsStateMapEntry(&nsAccessibilityAtoms::aria_selected, kBoolType,
nsStateMapEntry(&nsGkAtoms::aria_selected, kBoolType,
states::SELECTABLE, states::SELECTED, 0, PR_TRUE)
};
@ -696,40 +695,40 @@ eStateMapEntryID nsARIAMap::gWAIUnivStateMap[] = {
* @note ARIA attributes that don't have any flags are not included here
*/
nsAttributeCharacteristics nsARIAMap::gWAIUnivAttrMap[] = {
{&nsAccessibilityAtoms::aria_activedescendant, ATTR_BYPASSOBJ },
{&nsAccessibilityAtoms::aria_atomic, ATTR_VALTOKEN },
{&nsAccessibilityAtoms::aria_busy, ATTR_VALTOKEN },
{&nsAccessibilityAtoms::aria_checked, ATTR_BYPASSOBJ | ATTR_VALTOKEN }, /* exposes checkable obj attr */
{&nsAccessibilityAtoms::aria_controls, ATTR_BYPASSOBJ },
{&nsAccessibilityAtoms::aria_describedby, ATTR_BYPASSOBJ },
{&nsAccessibilityAtoms::aria_disabled, ATTR_BYPASSOBJ | ATTR_VALTOKEN },
{&nsAccessibilityAtoms::aria_dropeffect, ATTR_VALTOKEN },
{&nsAccessibilityAtoms::aria_expanded, ATTR_BYPASSOBJ | ATTR_VALTOKEN },
{&nsAccessibilityAtoms::aria_flowto, ATTR_BYPASSOBJ },
{&nsAccessibilityAtoms::aria_grabbed, ATTR_VALTOKEN },
{&nsAccessibilityAtoms::aria_haspopup, ATTR_BYPASSOBJ | ATTR_VALTOKEN },
{&nsAccessibilityAtoms::aria_hidden, ATTR_VALTOKEN },/* always expose obj attr */
{&nsAccessibilityAtoms::aria_invalid, ATTR_BYPASSOBJ | ATTR_VALTOKEN },
{&nsAccessibilityAtoms::aria_label, ATTR_BYPASSOBJ },
{&nsAccessibilityAtoms::aria_labelledby, ATTR_BYPASSOBJ },
{&nsAccessibilityAtoms::aria_level, ATTR_BYPASSOBJ }, /* handled via groupPosition */
{&nsAccessibilityAtoms::aria_live, ATTR_VALTOKEN },
{&nsAccessibilityAtoms::aria_multiline, ATTR_BYPASSOBJ | ATTR_VALTOKEN },
{&nsAccessibilityAtoms::aria_multiselectable, ATTR_BYPASSOBJ | ATTR_VALTOKEN },
{&nsAccessibilityAtoms::aria_owns, ATTR_BYPASSOBJ },
{&nsAccessibilityAtoms::aria_orientation, ATTR_VALTOKEN },
{&nsAccessibilityAtoms::aria_posinset, ATTR_BYPASSOBJ }, /* handled via groupPosition */
{&nsAccessibilityAtoms::aria_pressed, ATTR_BYPASSOBJ | ATTR_VALTOKEN },
{&nsAccessibilityAtoms::aria_readonly, ATTR_BYPASSOBJ | ATTR_VALTOKEN },
{&nsAccessibilityAtoms::aria_relevant, ATTR_BYPASSOBJ },
{&nsAccessibilityAtoms::aria_required, ATTR_BYPASSOBJ | ATTR_VALTOKEN },
{&nsAccessibilityAtoms::aria_selected, ATTR_BYPASSOBJ | ATTR_VALTOKEN },
{&nsAccessibilityAtoms::aria_setsize, ATTR_BYPASSOBJ }, /* handled via groupPosition */
{&nsAccessibilityAtoms::aria_sort, ATTR_VALTOKEN },
{&nsAccessibilityAtoms::aria_valuenow, ATTR_BYPASSOBJ },
{&nsAccessibilityAtoms::aria_valuemin, ATTR_BYPASSOBJ },
{&nsAccessibilityAtoms::aria_valuemax, ATTR_BYPASSOBJ },
{&nsAccessibilityAtoms::aria_valuetext, ATTR_BYPASSOBJ }
{&nsGkAtoms::aria_activedescendant, ATTR_BYPASSOBJ },
{&nsGkAtoms::aria_atomic, ATTR_VALTOKEN },
{&nsGkAtoms::aria_busy, ATTR_VALTOKEN },
{&nsGkAtoms::aria_checked, ATTR_BYPASSOBJ | ATTR_VALTOKEN }, /* exposes checkable obj attr */
{&nsGkAtoms::aria_controls, ATTR_BYPASSOBJ },
{&nsGkAtoms::aria_describedby, ATTR_BYPASSOBJ },
{&nsGkAtoms::aria_disabled, ATTR_BYPASSOBJ | ATTR_VALTOKEN },
{&nsGkAtoms::aria_dropeffect, ATTR_VALTOKEN },
{&nsGkAtoms::aria_expanded, ATTR_BYPASSOBJ | ATTR_VALTOKEN },
{&nsGkAtoms::aria_flowto, ATTR_BYPASSOBJ },
{&nsGkAtoms::aria_grabbed, ATTR_VALTOKEN },
{&nsGkAtoms::aria_haspopup, ATTR_BYPASSOBJ | ATTR_VALTOKEN },
{&nsGkAtoms::aria_hidden, ATTR_VALTOKEN },/* always expose obj attr */
{&nsGkAtoms::aria_invalid, ATTR_BYPASSOBJ | ATTR_VALTOKEN },
{&nsGkAtoms::aria_label, ATTR_BYPASSOBJ },
{&nsGkAtoms::aria_labelledby, ATTR_BYPASSOBJ },
{&nsGkAtoms::aria_level, ATTR_BYPASSOBJ }, /* handled via groupPosition */
{&nsGkAtoms::aria_live, ATTR_VALTOKEN },
{&nsGkAtoms::aria_multiline, ATTR_BYPASSOBJ | ATTR_VALTOKEN },
{&nsGkAtoms::aria_multiselectable, ATTR_BYPASSOBJ | ATTR_VALTOKEN },
{&nsGkAtoms::aria_owns, ATTR_BYPASSOBJ },
{&nsGkAtoms::aria_orientation, ATTR_VALTOKEN },
{&nsGkAtoms::aria_posinset, ATTR_BYPASSOBJ }, /* handled via groupPosition */
{&nsGkAtoms::aria_pressed, ATTR_BYPASSOBJ | ATTR_VALTOKEN },
{&nsGkAtoms::aria_readonly, ATTR_BYPASSOBJ | ATTR_VALTOKEN },
{&nsGkAtoms::aria_relevant, ATTR_BYPASSOBJ },
{&nsGkAtoms::aria_required, ATTR_BYPASSOBJ | ATTR_VALTOKEN },
{&nsGkAtoms::aria_selected, ATTR_BYPASSOBJ | ATTR_VALTOKEN },
{&nsGkAtoms::aria_setsize, ATTR_BYPASSOBJ }, /* handled via groupPosition */
{&nsGkAtoms::aria_sort, ATTR_VALTOKEN },
{&nsGkAtoms::aria_valuenow, ATTR_BYPASSOBJ },
{&nsGkAtoms::aria_valuemin, ATTR_BYPASSOBJ },
{&nsGkAtoms::aria_valuemax, ATTR_BYPASSOBJ },
{&nsGkAtoms::aria_valuetext, ATTR_BYPASSOBJ }
};
PRUint32 nsARIAMap::gWAIUnivAttrMapLength = NS_ARRAY_LENGTH(nsARIAMap::gWAIUnivAttrMap);
@ -833,9 +832,9 @@ nsStateMapEntry::MapToStates(nsIContent* aContent, PRUint64* aState,
// bail out and not explore a state mapping, which is safe.
if (!hasAttr ||
aContent->AttrValueIs(kNameSpaceID_None, *entry.mAttributeName,
nsAccessibilityAtoms::_empty, eCaseMatters) ||
nsGkAtoms::_empty, eCaseMatters) ||
aContent->AttrValueIs(kNameSpaceID_None, *entry.mAttributeName,
nsAccessibilityAtoms::_undefined, eCaseMatters)) {
nsGkAtoms::_undefined, eCaseMatters)) {
if (entry.mPermanentState)
*aState &= ~entry.mPermanentState;

Просмотреть файл

@ -43,7 +43,6 @@
#include "nsIAccessibleTypes.h"
#include "nsAccessibilityService.h"
#include "nsAccessibilityAtoms.h"
#include "nsARIAMap.h"
#include "nsDocAccessible.h"
#include "nsHyperTextAccessible.h"
@ -88,17 +87,17 @@ nsAccUtils::SetAccGroupAttrs(nsIPersistentProperties *aAttributes,
if (aLevel) {
value.AppendInt(aLevel);
SetAccAttr(aAttributes, nsAccessibilityAtoms::level, value);
SetAccAttr(aAttributes, nsGkAtoms::level, value);
}
if (aSetSize && aPosInSet) {
value.Truncate();
value.AppendInt(aPosInSet);
SetAccAttr(aAttributes, nsAccessibilityAtoms::posinset, value);
SetAccAttr(aAttributes, nsGkAtoms::posinset, value);
value.Truncate();
value.AppendInt(aSetSize);
SetAccAttr(aAttributes, nsAccessibilityAtoms::setsize, value);
SetAccAttr(aAttributes, nsGkAtoms::setsize, value);
}
}
@ -127,7 +126,7 @@ nsAccUtils::GetARIAOrDefaultLevel(nsAccessible *aAccessible)
{
PRInt32 level = 0;
nsCoreUtils::GetUIntAttr(aAccessible->GetContent(),
nsAccessibilityAtoms::aria_level, &level);
nsGkAtoms::aria_level, &level);
if (level != 0)
return level;
@ -276,25 +275,25 @@ nsAccUtils::SetLiveContainerAttributes(nsIPersistentProperties *aAttributes,
// container-relevant attribute
if (relevant.IsEmpty() &&
nsAccUtils::HasDefinedARIAToken(ancestor, nsAccessibilityAtoms::aria_relevant) &&
ancestor->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_relevant, relevant))
SetAccAttr(aAttributes, nsAccessibilityAtoms::containerRelevant, relevant);
nsAccUtils::HasDefinedARIAToken(ancestor, nsGkAtoms::aria_relevant) &&
ancestor->GetAttr(kNameSpaceID_None, nsGkAtoms::aria_relevant, relevant))
SetAccAttr(aAttributes, nsGkAtoms::containerRelevant, relevant);
// container-live, and container-live-role attributes
if (live.IsEmpty()) {
nsRoleMapEntry *role = GetRoleMapEntry(ancestor);
if (nsAccUtils::HasDefinedARIAToken(ancestor,
nsAccessibilityAtoms::aria_live)) {
ancestor->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_live,
nsGkAtoms::aria_live)) {
ancestor->GetAttr(kNameSpaceID_None, nsGkAtoms::aria_live,
live);
} else if (role) {
GetLiveAttrValue(role->liveAttRule, live);
}
if (!live.IsEmpty()) {
SetAccAttr(aAttributes, nsAccessibilityAtoms::containerLive, live);
SetAccAttr(aAttributes, nsGkAtoms::containerLive, live);
if (role) {
nsAccUtils::SetAccAttr(aAttributes,
nsAccessibilityAtoms::containerLiveRole,
nsGkAtoms::containerLiveRole,
NS_ConvertASCIItoUTF16(role->roleString));
}
}
@ -302,15 +301,15 @@ nsAccUtils::SetLiveContainerAttributes(nsIPersistentProperties *aAttributes,
// container-atomic attribute
if (atomic.IsEmpty() &&
nsAccUtils::HasDefinedARIAToken(ancestor, nsAccessibilityAtoms::aria_atomic) &&
ancestor->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_atomic, atomic))
SetAccAttr(aAttributes, nsAccessibilityAtoms::containerAtomic, atomic);
nsAccUtils::HasDefinedARIAToken(ancestor, nsGkAtoms::aria_atomic) &&
ancestor->GetAttr(kNameSpaceID_None, nsGkAtoms::aria_atomic, atomic))
SetAccAttr(aAttributes, nsGkAtoms::containerAtomic, atomic);
// container-busy attribute
if (busy.IsEmpty() &&
nsAccUtils::HasDefinedARIAToken(ancestor, nsAccessibilityAtoms::aria_busy) &&
ancestor->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_busy, busy))
SetAccAttr(aAttributes, nsAccessibilityAtoms::containerBusy, busy);
nsAccUtils::HasDefinedARIAToken(ancestor, nsGkAtoms::aria_busy) &&
ancestor->GetAttr(kNameSpaceID_None, nsGkAtoms::aria_busy, busy))
SetAccAttr(aAttributes, nsGkAtoms::containerBusy, busy);
if (ancestor == aTopContent)
break;
@ -328,9 +327,9 @@ nsAccUtils::HasDefinedARIAToken(nsIContent *aContent, nsIAtom *aAtom)
if (!aContent->HasAttr(kNameSpaceID_None, aAtom) ||
aContent->AttrValueIs(kNameSpaceID_None, aAtom,
nsAccessibilityAtoms::_empty, eCaseMatters) ||
nsGkAtoms::_empty, eCaseMatters) ||
aContent->AttrValueIs(kNameSpaceID_None, aAtom,
nsAccessibilityAtoms::_undefined, eCaseMatters)) {
nsGkAtoms::_undefined, eCaseMatters)) {
return PR_FALSE;
}
return PR_TRUE;
@ -340,11 +339,11 @@ nsIAtom*
nsAccUtils::GetARIAToken(dom::Element* aElement, nsIAtom* aAttr)
{
if (!nsAccUtils::HasDefinedARIAToken(aElement, aAttr))
return nsAccessibilityAtoms::_empty;
return nsGkAtoms::_empty;
static nsIContent::AttrValuesArray tokens[] =
{ &nsAccessibilityAtoms::_false, &nsAccessibilityAtoms::_true,
&nsAccessibilityAtoms::mixed, nsnull};
{ &nsGkAtoms::_false, &nsGkAtoms::_true,
&nsGkAtoms::mixed, nsnull};
PRInt32 idx = aElement->FindAttrValueIn(kNameSpaceID_None,
aAttr, tokens, eCaseMatters);
@ -405,8 +404,8 @@ PRBool
nsAccUtils::IsARIASelected(nsAccessible *aAccessible)
{
return aAccessible->GetContent()->
AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::aria_selected,
nsAccessibilityAtoms::_true, eCaseMatters);
AttrValueIs(kNameSpaceID_None, nsGkAtoms::aria_selected,
nsGkAtoms::_true, eCaseMatters);
}
nsHyperTextAccessible*
@ -545,7 +544,7 @@ nsAccUtils::GetRoleMapEntry(nsINode *aNode)
nsIContent *content = nsCoreUtils::GetRoleContent(aNode);
nsAutoString roleString;
if (!content ||
!content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::role, roleString) ||
!content->GetAttr(kNameSpaceID_None, nsGkAtoms::role, roleString) ||
roleString.IsEmpty()) {
// We treat role="" as if the role attribute is absent (per aria spec:8.1.1)
return nsnull;

Просмотреть файл

@ -41,7 +41,6 @@
#include "nsIAccessible.h"
#include "nsAccCache.h"
#include "nsAccessibilityAtoms.h"
#include "nsAccUtils.h"
#include "nsCoreUtils.h"
@ -198,8 +197,6 @@ void nsAccessNode::InitXPAccessibility()
&gStringBundle);
}
nsAccessibilityAtoms::AddRefAtoms();
nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));
if (prefBranch) {
prefBranch->GetBoolPref("browser.formfill.enable", &gIsFormFillEnabled);
@ -472,7 +469,7 @@ nsAccessNode::GetLanguage(nsAString& aLanguage)
if (aLanguage.IsEmpty()) { // Nothing found, so use document's language
nsIDocument *doc = mContent->GetOwnerDoc();
if (doc) {
doc->GetHeaderData(nsAccessibilityAtoms::headerContentLanguage, aLanguage);
doc->GetHeaderData(nsGkAtoms::headerContentLanguage, aLanguage);
}
}

Просмотреть файл

@ -1,300 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2003
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Original Author: Aaron Leventhal (aaronl@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/******
This file contains the list of all accessibility nsIAtoms and their values
It is designed to be used as inline input to nsAccessibilityAtoms.cpp *only*
through the magic of C preprocessing.
All entries must be enclosed in the macro ACCESSIBILITY_ATOM which will have cruel
and unusual things done to it
It is recommended (but not strictly necessary) to keep all entries
in alphabetical order
The first argument to ACCESSIBILITY_ATOM is the C++ identifier of the atom
The second argument is the string value of the atom
******/
// Alphabetical list of generic atoms
ACCESSIBILITY_ATOM(button, "button")
ACCESSIBILITY_ATOM(checkbox, "checkbox")
ACCESSIBILITY_ATOM(col, "col")
ACCESSIBILITY_ATOM(_empty, "")
ACCESSIBILITY_ATOM(_false, "false")
ACCESSIBILITY_ATOM(image, "image")
ACCESSIBILITY_ATOM(menu, "menu")
ACCESSIBILITY_ATOM(menuButton, "menu-button")
ACCESSIBILITY_ATOM(multiple, "multiple")
ACCESSIBILITY_ATOM(mixed, "mixed")
ACCESSIBILITY_ATOM(open, "open")
ACCESSIBILITY_ATOM(password, "password")
ACCESSIBILITY_ATOM(radio, "radio")
ACCESSIBILITY_ATOM(reset, "reset")
ACCESSIBILITY_ATOM(row, "row")
ACCESSIBILITY_ATOM(submit, "submit")
ACCESSIBILITY_ATOM(_true, "true")
ACCESSIBILITY_ATOM(_undefined, "undefined")
// Header info
ACCESSIBILITY_ATOM(headerContentLanguage, "content-language")
// Alphabetical list of frame types
ACCESSIBILITY_ATOM(areaFrame, "AreaFrame")
ACCESSIBILITY_ATOM(blockFrame, "BlockFrame")
ACCESSIBILITY_ATOM(boxFrame, "BoxFrame")
ACCESSIBILITY_ATOM(brFrame, "BRFrame")
ACCESSIBILITY_ATOM(deckFrame, "DeckFrame")
ACCESSIBILITY_ATOM(inlineBlockFrame, "InlineBlockFrame")
ACCESSIBILITY_ATOM(inlineFrame, "InlineFrame")
ACCESSIBILITY_ATOM(objectFrame, "ObjectFrame")
ACCESSIBILITY_ATOM(scrollFrame, "ScrollFrame")
ACCESSIBILITY_ATOM(textFrame, "TextFrame")
ACCESSIBILITY_ATOM(tableCaptionFrame, "TableCaptionFrame")
ACCESSIBILITY_ATOM(tableCellFrame, "TableCellFrame")
ACCESSIBILITY_ATOM(tableOuterFrame, "TableOuterFrame")
ACCESSIBILITY_ATOM(tableRowGroupFrame, "TableRowGroupFrame")
ACCESSIBILITY_ATOM(tableRowFrame, "TableRowFrame")
// Alphabetical list of tag names
ACCESSIBILITY_ATOM(a, "a")
ACCESSIBILITY_ATOM(abbr, "abbr")
ACCESSIBILITY_ATOM(acronym, "acronym")
ACCESSIBILITY_ATOM(area, "area")
ACCESSIBILITY_ATOM(article, "article") // HTML landmark
ACCESSIBILITY_ATOM(aside, "aside") // HTML landmark
ACCESSIBILITY_ATOM(autocomplete, "autocomplete")
ACCESSIBILITY_ATOM(blockquote, "blockquote")
ACCESSIBILITY_ATOM(br, "br")
ACCESSIBILITY_ATOM(body, "body")
ACCESSIBILITY_ATOM(caption, "caption") // XUL
ACCESSIBILITY_ATOM(choices, "choices") // XForms
ACCESSIBILITY_ATOM(description, "description") // XUL
ACCESSIBILITY_ATOM(dd, "dd")
ACCESSIBILITY_ATOM(div, "div")
ACCESSIBILITY_ATOM(dl, "dl")
ACCESSIBILITY_ATOM(dt, "dt")
ACCESSIBILITY_ATOM(footer, "footer") // HTML landmark
ACCESSIBILITY_ATOM(form, "form")
ACCESSIBILITY_ATOM(header, "header") // HTML landmark
ACCESSIBILITY_ATOM(h1, "h1")
ACCESSIBILITY_ATOM(h2, "h2")
ACCESSIBILITY_ATOM(h3, "h3")
ACCESSIBILITY_ATOM(h4, "h4")
ACCESSIBILITY_ATOM(h5, "h5")
ACCESSIBILITY_ATOM(h6, "h6")
ACCESSIBILITY_ATOM(item, "item") // XForms
ACCESSIBILITY_ATOM(itemset, "itemset") // XForms
ACCESSIBILITY_ATOM(img, "img")
ACCESSIBILITY_ATOM(input, "input")
ACCESSIBILITY_ATOM(label, "label")
ACCESSIBILITY_ATOM(legend, "legend")
ACCESSIBILITY_ATOM(li, "li")
ACCESSIBILITY_ATOM(link, "link")
ACCESSIBILITY_ATOM(listcell, "listcell") // XUL
ACCESSIBILITY_ATOM(listcols, "listcols") // XUL
ACCESSIBILITY_ATOM(listcol, "listcol") // XUL
ACCESSIBILITY_ATOM(listhead, "listhead") // XUL
ACCESSIBILITY_ATOM(listheader, "listheader") // XUL
ACCESSIBILITY_ATOM(map, "map")
ACCESSIBILITY_ATOM(math, "math")
ACCESSIBILITY_ATOM(menupopup, "menupopup") // XUL
ACCESSIBILITY_ATOM(object, "object")
ACCESSIBILITY_ATOM(nav, "nav") // HTML landmark
ACCESSIBILITY_ATOM(ol, "ol")
ACCESSIBILITY_ATOM(optgroup, "optgroup")
ACCESSIBILITY_ATOM(option, "option")
ACCESSIBILITY_ATOM(output, "output")
ACCESSIBILITY_ATOM(panel, "panel") // XUL
ACCESSIBILITY_ATOM(progress, "progress")
ACCESSIBILITY_ATOM(q, "q")
ACCESSIBILITY_ATOM(select, "select")
ACCESSIBILITY_ATOM(select1, "select1") // XForms
ACCESSIBILITY_ATOM(svg, "svg")
ACCESSIBILITY_ATOM(table, "table")
ACCESSIBILITY_ATOM(tabpanels, "tabpanels") // XUL
ACCESSIBILITY_ATOM(tbody, "tbody")
ACCESSIBILITY_ATOM(td, "td")
ACCESSIBILITY_ATOM(th, "th")
ACCESSIBILITY_ATOM(tfoot, "tfoot")
ACCESSIBILITY_ATOM(thead, "thead")
ACCESSIBILITY_ATOM(textarea, "textarea") // XForms
ACCESSIBILITY_ATOM(textbox, "textbox") // XUL
ACCESSIBILITY_ATOM(toolbaritem, "toolbaritem") // XUL
ACCESSIBILITY_ATOM(toolbarseparator, "toolbarseparator") // XUL
ACCESSIBILITY_ATOM(toolbarspring, "toolbarspring") // XUL
ACCESSIBILITY_ATOM(toolbarspacer, "toolbarspacer") // XUL
ACCESSIBILITY_ATOM(tooltip, "tooltip") // XUL
ACCESSIBILITY_ATOM(tr, "tr")
ACCESSIBILITY_ATOM(tree, "tree")
ACCESSIBILITY_ATOM(ul, "ul")
// Alphabetical list of attributes (DOM)
ACCESSIBILITY_ATOM(acceltext, "acceltext")
ACCESSIBILITY_ATOM(accesskey, "accesskey")
ACCESSIBILITY_ATOM(alt, "alt")
ACCESSIBILITY_ATOM(anonid, "anonid") // Used for ID's in XBL
ACCESSIBILITY_ATOM(checked, "checked")
ACCESSIBILITY_ATOM(contenteditable, "contenteditable")
ACCESSIBILITY_ATOM(control, "control")
ACCESSIBILITY_ATOM(disabled, "disabled")
ACCESSIBILITY_ATOM(_class, "class")
ACCESSIBILITY_ATOM(cycles, "cycles") // used for XUL cycler attribute
ACCESSIBILITY_ATOM(curpos, "curpos") // XUL
ACCESSIBILITY_ATOM(data, "data")
ACCESSIBILITY_ATOM(_default, "default") // XUL button
ACCESSIBILITY_ATOM(draggable, "draggable")
ACCESSIBILITY_ATOM(droppable, "droppable") // XUL combo box
ACCESSIBILITY_ATOM(editable, "editable")
ACCESSIBILITY_ATOM(_for, "for")
ACCESSIBILITY_ATOM(headers, "headers") // HTML table
ACCESSIBILITY_ATOM(hidden, "hidden") // XUL tree columns
ACCESSIBILITY_ATOM(hover, "hover") // XUL color picker
ACCESSIBILITY_ATOM(href, "href") // XUL, XLink
ACCESSIBILITY_ATOM(increment, "increment") // XUL
ACCESSIBILITY_ATOM(lang, "lang")
ACCESSIBILITY_ATOM(linkedPanel, "linkedpanel") // XUL
ACCESSIBILITY_ATOM(longDesc, "longdesc")
ACCESSIBILITY_ATOM(max, "max") // XUL
ACCESSIBILITY_ATOM(maxpos, "maxpos") // XUL
ACCESSIBILITY_ATOM(minpos, "minpos") // XUL
ACCESSIBILITY_ATOM(_moz_menuactive, "_moz-menuactive") // XUL
ACCESSIBILITY_ATOM(multiline, "multiline") // XUL
ACCESSIBILITY_ATOM(name, "name")
ACCESSIBILITY_ATOM(onclick, "onclick")
ACCESSIBILITY_ATOM(popup, "popup")
ACCESSIBILITY_ATOM(placeholder, "placeholder")
ACCESSIBILITY_ATOM(readonly, "readonly")
ACCESSIBILITY_ATOM(scope, "scope") // HTML table
ACCESSIBILITY_ATOM(seltype, "seltype") // XUL listbox
ACCESSIBILITY_ATOM(simple, "simple") // XLink
ACCESSIBILITY_ATOM(src, "src")
ACCESSIBILITY_ATOM(selected, "selected")
ACCESSIBILITY_ATOM(summary, "summary")
ACCESSIBILITY_ATOM(tabindex, "tabindex")
ACCESSIBILITY_ATOM(title, "title")
ACCESSIBILITY_ATOM(toolbarname, "toolbarname")
ACCESSIBILITY_ATOM(tooltiptext, "tooltiptext")
ACCESSIBILITY_ATOM(type, "type")
ACCESSIBILITY_ATOM(usemap, "usemap")
ACCESSIBILITY_ATOM(value, "value")
// Alphabetical list of object attributes
ACCESSIBILITY_ATOM(checkable, "checkable")
ACCESSIBILITY_ATOM(display, "display")
ACCESSIBILITY_ATOM(eventFromInput, "event-from-input")
ACCESSIBILITY_ATOM(textAlign, "text-align")
ACCESSIBILITY_ATOM(textIndent, "text-indent")
// Alphabetical list of text attributes (AT API)
ACCESSIBILITY_ATOM(color, "color")
ACCESSIBILITY_ATOM(backgroundColor, "background-color")
ACCESSIBILITY_ATOM(fontFamily, "font-family")
ACCESSIBILITY_ATOM(fontStyle, "font-style")
ACCESSIBILITY_ATOM(fontWeight, "font-weight")
ACCESSIBILITY_ATOM(fontSize, "font-size")
ACCESSIBILITY_ATOM(invalid, "invalid")
ACCESSIBILITY_ATOM(language, "language")
ACCESSIBILITY_ATOM(textLineThroughStyle, "text-line-through-style")
ACCESSIBILITY_ATOM(textUnderlineStyle, "text-underline-style")
ACCESSIBILITY_ATOM(textPosition, "text-position")
// ARIA (DHTML accessibility) attributes
// Also add to nsARIAMap.cpp and nsARIAMap.h
// ARIA role attribute
ACCESSIBILITY_ATOM(role, "role")
ACCESSIBILITY_ATOM(aria_activedescendant, "aria-activedescendant")
ACCESSIBILITY_ATOM(aria_atomic, "aria-atomic")
ACCESSIBILITY_ATOM(aria_autocomplete, "aria-autocomplete")
ACCESSIBILITY_ATOM(aria_busy, "aria-busy")
ACCESSIBILITY_ATOM(aria_checked, "aria-checked")
ACCESSIBILITY_ATOM(aria_controls, "aria-controls")
ACCESSIBILITY_ATOM(aria_describedby, "aria-describedby")
ACCESSIBILITY_ATOM(aria_disabled, "aria-disabled")
ACCESSIBILITY_ATOM(aria_dropeffect, "aria-dropeffect")
ACCESSIBILITY_ATOM(aria_expanded, "aria-expanded")
ACCESSIBILITY_ATOM(aria_flowto, "aria-flowto")
ACCESSIBILITY_ATOM(aria_grabbed, "aria-grabbed")
ACCESSIBILITY_ATOM(aria_haspopup, "aria-haspopup")
ACCESSIBILITY_ATOM(aria_hidden, "aria-hidden")
ACCESSIBILITY_ATOM(aria_invalid, "aria-invalid")
ACCESSIBILITY_ATOM(aria_label, "aria-label")
ACCESSIBILITY_ATOM(aria_labelledby, "aria-labelledby")
ACCESSIBILITY_ATOM(aria_level, "aria-level")
ACCESSIBILITY_ATOM(aria_live, "aria-live")
ACCESSIBILITY_ATOM(aria_multiline, "aria-multiline")
ACCESSIBILITY_ATOM(aria_multiselectable, "aria-multiselectable")
ACCESSIBILITY_ATOM(aria_orientation, "aria-orientation")
ACCESSIBILITY_ATOM(aria_owns, "aria-owns")
ACCESSIBILITY_ATOM(aria_posinset, "aria-posinset")
ACCESSIBILITY_ATOM(aria_pressed, "aria-pressed")
ACCESSIBILITY_ATOM(aria_readonly, "aria-readonly")
ACCESSIBILITY_ATOM(aria_relevant, "aria-relevant")
ACCESSIBILITY_ATOM(aria_required, "aria-required")
ACCESSIBILITY_ATOM(aria_selected, "aria-selected")
ACCESSIBILITY_ATOM(aria_setsize, "aria-setsize")
ACCESSIBILITY_ATOM(aria_sort, "aria-sort")
ACCESSIBILITY_ATOM(aria_valuenow, "aria-valuenow")
ACCESSIBILITY_ATOM(aria_valuemin, "aria-valuemin")
ACCESSIBILITY_ATOM(aria_valuemax, "aria-valuemax")
ACCESSIBILITY_ATOM(aria_valuetext, "aria-valuetext")
// misc atoms
// a form property used to obtain the default label
// of an HTML button from the button frame
ACCESSIBILITY_ATOM(defaultLabel, "defaultLabel")
// the attribute specifying the editor's bogus br node
ACCESSIBILITY_ATOM(mozeditorbogusnode, "_moz_editor_bogus_node")
// Object attributes
ACCESSIBILITY_ATOM(tableCellIndex, "table-cell-index")
ACCESSIBILITY_ATOM(containerAtomic, "container-atomic")
ACCESSIBILITY_ATOM(containerBusy, "container-busy")
ACCESSIBILITY_ATOM(containerLive, "container-live")
ACCESSIBILITY_ATOM(containerLiveRole, "container-live-role")
ACCESSIBILITY_ATOM(containerRelevant, "container-relevant")
ACCESSIBILITY_ATOM(level, "level")
ACCESSIBILITY_ATOM(live, "live")
ACCESSIBILITY_ATOM(lineNumber, "line-number")
ACCESSIBILITY_ATOM(posinset, "posinset")
ACCESSIBILITY_ATOM(setsize, "setsize")
ACCESSIBILITY_ATOM(xmlroles, "xml-roles")

Просмотреть файл

@ -1,62 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2003
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Original Author: Aaron Leventhal (aaronl@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsAccessibilityAtoms.h"
#include "nsStaticAtom.h"
#include "nsMemory.h"
// define storage for all accessibility atoms
#define ACCESSIBILITY_ATOM(_name, _value) nsIAtom* nsAccessibilityAtoms::_name;
#include "nsAccessibilityAtomList.h"
#undef ACCESSIBILITY_ATOM
#define ACCESSIBILITY_ATOM(name_, value_) NS_STATIC_ATOM_BUFFER(name_##_buffer, value_)
#include "nsAccessibilityAtomList.h"
#undef ACCESSIBILITY_ATOM
static const nsStaticAtom atomInfo[] = {
#define ACCESSIBILITY_ATOM(name_, value_) NS_STATIC_ATOM(name_##_buffer, &nsAccessibilityAtoms::name_),
#include "nsAccessibilityAtomList.h"
#undef ACCESSIBILITY_ATOM
};
void nsAccessibilityAtoms::AddRefAtoms()
{
NS_RegisterStaticAtoms(atomInfo, NS_ARRAY_LENGTH(atomInfo));
}

Просмотреть файл

@ -1,67 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsAccessibilityAtoms_h___
#define nsAccessibilityAtoms_h___
#include "nsIAtom.h"
/**
* This class wraps up the creation (and destruction) of the standard
* set of atoms used in the accessibility module. These objects
* are created when the are needed by accessibility is being used and they
* are destroyed when the last nsRootAccessible is destroyed.
*/
class nsAccessibilityAtoms {
public:
static void AddRefAtoms();
static void ReleaseAtoms();
/* Declare all atoms
The atom names and values are stored in nsAccessibilityAtomList.h and
are brought to you by the magic of C preprocessing
Add new atoms to nsAccessibilityAtomList and all support logic will be auto-generated
*/
#define ACCESSIBILITY_ATOM(_name, _value) static nsIAtom* _name;
#include "nsAccessibilityAtomList.h"
#undef ACCESSIBILITY_ATOM
};
#endif /* nsAccessibilityAtoms_h___ */

Просмотреть файл

@ -37,7 +37,6 @@
* ***** END LICENSE BLOCK ***** */
// NOTE: alphabetically ordered
#include "nsAccessibilityAtoms.h"
#include "nsAccessibilityService.h"
#include "nsCoreUtils.h"
#include "nsAccUtils.h"
@ -274,9 +273,7 @@ nsAccessibilityService::CreateHTMLImageAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAutoString mapElmName;
aContent->GetAttr(kNameSpaceID_None,
nsAccessibilityAtoms::usemap,
mapElmName);
aContent->GetAttr(kNameSpaceID_None, nsGkAtoms::usemap, mapElmName);
nsCOMPtr<nsIDOMHTMLMapElement> mapElm;
if (nsIDocument* document = aContent->GetCurrentDoc()) {
mapElm = do_QueryInterface(document->FindImageMap(mapElmName));
@ -891,7 +888,7 @@ static PRBool HasRelatedContent(nsIContent *aContent)
nsIContent *ancestorContent = aContent;
while ((ancestorContent = ancestorContent->GetParent()) != nsnull) {
if (ancestorContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_activedescendant)) {
if (ancestorContent->HasAttr(kNameSpaceID_None, nsGkAtoms::aria_activedescendant)) {
// ancestor has activedescendant property, this content could be active
return PR_TRUE;
}
@ -996,7 +993,7 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
}
PRBool isHTML = content->IsHTML();
if (isHTML && content->Tag() == nsAccessibilityAtoms::map) {
if (isHTML && content->Tag() == nsGkAtoms::map) {
// Create hyper text accessible for HTML map if it is used to group links
// (see http://www.w3.org/TR/WCAG10-HTML-TECHS/#group-bypass). If the HTML
// map doesn't have 'name' attribute (or has empty name attribute) then we
@ -1006,7 +1003,7 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
// (nsHTMLAreaAccessible) the map contains are attached as children of the
// appropriate accessible for HTML image (nsHTMLImageAccessible).
nsAutoString name;
content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::name, name);
content->GetAttr(kNameSpaceID_None, nsGkAtoms::name, name);
if (!name.IsEmpty()) {
if (aIsSubtreeHidden)
*aIsSubtreeHidden = true;
@ -1036,10 +1033,10 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
nsIAtom *frameType = weakFrame.GetFrame()->GetType();
PRBool partOfHTMLTable =
frameType == nsAccessibilityAtoms::tableCaptionFrame ||
frameType == nsAccessibilityAtoms::tableCellFrame ||
frameType == nsAccessibilityAtoms::tableRowGroupFrame ||
frameType == nsAccessibilityAtoms::tableRowFrame;
frameType == nsGkAtoms::tableCaptionFrame ||
frameType == nsGkAtoms::tableCellFrame ||
frameType == nsGkAtoms::tableRowGroupFrame ||
frameType == nsGkAtoms::tableRowFrame;
if (partOfHTMLTable) {
// Table-related frames don't get table-related roles
@ -1051,7 +1048,7 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
if (!tableFrame)
continue;
if (tableFrame->GetType() == nsAccessibilityAtoms::tableOuterFrame) {
if (tableFrame->GetType() == nsGkAtoms::tableOuterFrame) {
nsAccessible *tableAccessible =
GetAccessibleInWeakShell(tableContent, aWeakShell);
@ -1090,7 +1087,7 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
break;
}
if (tableContent->Tag() == nsAccessibilityAtoms::table) {
if (tableContent->Tag() == nsGkAtoms::table) {
// Stop before we are fooled by any additional table ancestors
// This table cell frameis part of a separate ancestor table.
tryTagNameOrFrame = PR_FALSE;
@ -1106,7 +1103,7 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
// Create ARIA grid/treegrid accessibles if node is not of a child or
// valid child of HTML table and is not a HTML table.
if ((!partOfHTMLTable || !tryTagNameOrFrame) &&
frameType != nsAccessibilityAtoms::tableOuterFrame) {
frameType != nsGkAtoms::tableOuterFrame) {
if (roleMapEntry->role == nsIAccessibleRole::ROLE_TABLE ||
roleMapEntry->role == nsIAccessibleRole::ROLE_TREE_TABLE) {
@ -1140,7 +1137,7 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
if (!f) {
f = aPresShell->GetRealPrimaryFrameFor(content);
}
if (f->GetType() == nsAccessibilityAtoms::tableCaptionFrame &&
if (f->GetType() == nsGkAtoms::tableCaptionFrame &&
f->GetRect().IsEmpty()) {
// XXX This is not the ideal place for this code, but right now there
// is no better place:
@ -1165,12 +1162,12 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
if (!newAcc) {
// Create generic accessibles for SVG and MathML nodes.
if (content->GetNameSpaceID() == kNameSpaceID_SVG &&
content->Tag() == nsAccessibilityAtoms::svg) {
content->Tag() == nsGkAtoms::svg) {
newAcc = new nsEnumRoleAccessible(content, aWeakShell,
nsIAccessibleRole::ROLE_DIAGRAM);
}
else if (content->GetNameSpaceID() == kNameSpaceID_MathML &&
content->Tag() == nsAccessibilityAtoms::math) {
content->Tag() == nsGkAtoms::math) {
newAcc = new nsEnumRoleAccessible(content, aWeakShell,
nsIAccessibleRole::ROLE_EQUATION);
}
@ -1185,7 +1182,7 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
// of some property that makes this object interesting
// We don't do this for <body>, <html>, <window>, <dialog> etc. which
// correspond to the doc accessible and will be created in any case
if (!newAcc && content->Tag() != nsAccessibilityAtoms::body && content->GetParent() &&
if (!newAcc && content->Tag() != nsGkAtoms::body && content->GetParent() &&
((weakFrame.GetFrame() && weakFrame.GetFrame()->IsFocusable()) ||
(isHTML && nsCoreUtils::HasClickListener(content)) ||
HasUniversalAriaProperty(content) || roleMapEntry ||
@ -1260,22 +1257,22 @@ nsAccessibilityService::HasUniversalAriaProperty(nsIContent *aContent)
{
// ARIA attributes that take token values (NMTOKEN, bool) are special cased
// because of special value "undefined" (see HasDefinedARIAToken).
return nsAccUtils::HasDefinedARIAToken(aContent, nsAccessibilityAtoms::aria_atomic) ||
nsAccUtils::HasDefinedARIAToken(aContent, nsAccessibilityAtoms::aria_busy) ||
aContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_controls) ||
aContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_describedby) ||
aContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_disabled) ||
nsAccUtils::HasDefinedARIAToken(aContent, nsAccessibilityAtoms::aria_dropeffect) ||
aContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_flowto) ||
nsAccUtils::HasDefinedARIAToken(aContent, nsAccessibilityAtoms::aria_grabbed) ||
nsAccUtils::HasDefinedARIAToken(aContent, nsAccessibilityAtoms::aria_haspopup) ||
aContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_hidden) ||
nsAccUtils::HasDefinedARIAToken(aContent, nsAccessibilityAtoms::aria_invalid) ||
aContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_label) ||
aContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_labelledby) ||
nsAccUtils::HasDefinedARIAToken(aContent, nsAccessibilityAtoms::aria_live) ||
nsAccUtils::HasDefinedARIAToken(aContent, nsAccessibilityAtoms::aria_owns) ||
nsAccUtils::HasDefinedARIAToken(aContent, nsAccessibilityAtoms::aria_relevant);
return nsAccUtils::HasDefinedARIAToken(aContent, nsGkAtoms::aria_atomic) ||
nsAccUtils::HasDefinedARIAToken(aContent, nsGkAtoms::aria_busy) ||
aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::aria_controls) ||
aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::aria_describedby) ||
aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::aria_disabled) ||
nsAccUtils::HasDefinedARIAToken(aContent, nsGkAtoms::aria_dropeffect) ||
aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::aria_flowto) ||
nsAccUtils::HasDefinedARIAToken(aContent, nsGkAtoms::aria_grabbed) ||
nsAccUtils::HasDefinedARIAToken(aContent, nsGkAtoms::aria_haspopup) ||
aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::aria_hidden) ||
nsAccUtils::HasDefinedARIAToken(aContent, nsGkAtoms::aria_invalid) ||
aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::aria_label) ||
aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::aria_labelledby) ||
nsAccUtils::HasDefinedARIAToken(aContent, nsGkAtoms::aria_live) ||
nsAccUtils::HasDefinedARIAToken(aContent, nsGkAtoms::aria_owns) ||
nsAccUtils::HasDefinedARIAToken(aContent, nsGkAtoms::aria_relevant);
}
nsAccessible*
@ -1385,7 +1382,7 @@ nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
{
// Don't include nameless images in accessible tree.
if (!aContent->HasAttr(kNameSpaceID_None,
nsAccessibilityAtoms::tooltiptext))
nsGkAtoms::tooltiptext))
return nsnull;
accessible = new nsHTMLImageAccessibleWrap(aContent, aWeakShell);
@ -1433,7 +1430,7 @@ nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
// implementations on each platform for a consistent scripting environment, but
// then strip out redundant accessibles in the nsAccessibleWrap class for each platform.
nsIContent *parent = aContent->GetParent();
if (parent && parent->NodeInfo()->Equals(nsAccessibilityAtoms::menu,
if (parent && parent->NodeInfo()->Equals(nsGkAtoms::menu,
kNameSpaceID_XUL))
return nsnull;
#endif
@ -1618,34 +1615,34 @@ nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame* aFrame,
{
// This method assumes we're in an HTML namespace.
nsIAtom *tag = aContent->Tag();
if (tag == nsAccessibilityAtoms::legend) {
if (tag == nsGkAtoms::legend) {
nsAccessible* accessible = new nsHTMLLegendAccessible(aContent, aWeakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
if (tag == nsAccessibilityAtoms::option) {
if (tag == nsGkAtoms::option) {
nsAccessible* accessible = new nsHTMLSelectOptionAccessible(aContent,
aWeakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
if (tag == nsAccessibilityAtoms::optgroup) {
if (tag == nsGkAtoms::optgroup) {
nsAccessible* accessible = new nsHTMLSelectOptGroupAccessible(aContent,
aWeakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
if (tag == nsAccessibilityAtoms::ul || tag == nsAccessibilityAtoms::ol ||
tag == nsAccessibilityAtoms::dl) {
if (tag == nsGkAtoms::ul || tag == nsGkAtoms::ol ||
tag == nsGkAtoms::dl) {
nsAccessible* accessible = new nsHTMLListAccessible(aContent, aWeakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
if (tag == nsAccessibilityAtoms::a) {
if (tag == nsGkAtoms::a) {
// Only some roles truly enjoy life as nsHTMLLinkAccessibles, for details
// see closed bug 494807.
nsRoleMapEntry *roleMapEntry = nsAccUtils::GetRoleMapEntry(aContent);
@ -1662,9 +1659,9 @@ nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame* aFrame,
return accessible;
}
if (tag == nsAccessibilityAtoms::dt ||
(tag == nsAccessibilityAtoms::li &&
aFrame->GetType() != nsAccessibilityAtoms::blockFrame)) {
if (tag == nsGkAtoms::dt ||
(tag == nsGkAtoms::li &&
aFrame->GetType() != nsGkAtoms::blockFrame)) {
// Normally for li, it is created by the list item frame (in nsBlockFrame)
// which knows about the bullet frame; however, in this case the list item
// must have been styled using display: foo
@ -1673,24 +1670,24 @@ nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame* aFrame,
return accessible;
}
if (tag == nsAccessibilityAtoms::abbr ||
tag == nsAccessibilityAtoms::acronym ||
tag == nsAccessibilityAtoms::blockquote ||
tag == nsAccessibilityAtoms::dd ||
tag == nsAccessibilityAtoms::form ||
tag == nsAccessibilityAtoms::h1 ||
tag == nsAccessibilityAtoms::h2 ||
tag == nsAccessibilityAtoms::h3 ||
tag == nsAccessibilityAtoms::h4 ||
tag == nsAccessibilityAtoms::h5 ||
tag == nsAccessibilityAtoms::h6 ||
tag == nsAccessibilityAtoms::q) {
if (tag == nsGkAtoms::abbr ||
tag == nsGkAtoms::acronym ||
tag == nsGkAtoms::blockquote ||
tag == nsGkAtoms::dd ||
tag == nsGkAtoms::form ||
tag == nsGkAtoms::h1 ||
tag == nsGkAtoms::h2 ||
tag == nsGkAtoms::h3 ||
tag == nsGkAtoms::h4 ||
tag == nsGkAtoms::h5 ||
tag == nsGkAtoms::h6 ||
tag == nsGkAtoms::q) {
nsAccessible* accessible = new nsHyperTextAccessibleWrap(aContent, aWeakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
if (tag == nsAccessibilityAtoms::tr) {
if (tag == nsGkAtoms::tr) {
nsAccessible* accessible = new nsEnumRoleAccessible(aContent, aWeakShell,
nsIAccessibleRole::ROLE_ROW);
NS_IF_ADDREF(accessible);
@ -1704,13 +1701,13 @@ nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame* aFrame,
return accessible;
}
if (tag == nsAccessibilityAtoms::output) {
if (tag == nsGkAtoms::output) {
nsAccessible* accessible = new nsHTMLOutputAccessible(aContent, aWeakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
if (tag == nsAccessibilityAtoms::progress) {
if (tag == nsGkAtoms::progress) {
nsAccessible* accessible =
new HTMLProgressMeterAccessible(aContent, aWeakShell);
NS_IF_ADDREF(accessible);
@ -1798,16 +1795,16 @@ nsAccessibilityService::CreateAccessibleForDeckChild(nsIFrame* aFrame,
nsIContent* aContent,
nsIWeakReference* aWeakShell)
{
if (aFrame->GetType() == nsAccessibilityAtoms::boxFrame ||
aFrame->GetType() == nsAccessibilityAtoms::scrollFrame) {
if (aFrame->GetType() == nsGkAtoms::boxFrame ||
aFrame->GetType() == nsGkAtoms::scrollFrame) {
nsIFrame* parentFrame = aFrame->GetParent();
if (parentFrame && parentFrame->GetType() == nsAccessibilityAtoms::deckFrame) {
if (parentFrame && parentFrame->GetType() == nsGkAtoms::deckFrame) {
// If deck frame is for xul:tabpanels element then the given node has
// tabpanel accessible.
nsCOMPtr<nsIContent> parentContent = parentFrame->GetContent();
#ifdef MOZ_XUL
if (parentContent->NodeInfo()->Equals(nsAccessibilityAtoms::tabpanels,
if (parentContent->NodeInfo()->Equals(nsGkAtoms::tabpanels,
kNameSpaceID_XUL)) {
nsAccessible* accessible = new nsXULTabpanelAccessible(aContent,
aWeakShell);

Просмотреть файл

@ -257,9 +257,9 @@ nsAccessible::GetName(nsAString& aName)
nsIAtom *tooltipAttr = nsnull;
if (mContent->IsHTML())
tooltipAttr = nsAccessibilityAtoms::title;
tooltipAttr = nsGkAtoms::title;
else if (mContent->IsXUL())
tooltipAttr = nsAccessibilityAtoms::tooltiptext;
tooltipAttr = nsGkAtoms::tooltiptext;
else
return NS_OK;
@ -303,7 +303,7 @@ nsAccessible::Description(nsString& aDescription)
return;
nsTextEquivUtils::
GetTextEquivFromIDRefs(this, nsAccessibilityAtoms::aria_describedby,
GetTextEquivFromIDRefs(this, nsGkAtoms::aria_describedby,
aDescription);
if (aDescription.IsEmpty()) {
@ -318,8 +318,8 @@ nsAccessible::Description(nsString& aDescription)
}
if (aDescription.IsEmpty()) {
nsIAtom *descAtom = isXUL ? nsAccessibilityAtoms::tooltiptext :
nsAccessibilityAtoms::title;
nsIAtom *descAtom = isXUL ? nsGkAtoms::tooltiptext :
nsGkAtoms::title;
if (mContent->GetAttr(kNameSpaceID_None, descAtom, aDescription)) {
nsAutoString name;
GetName(name);
@ -630,14 +630,14 @@ nsAccessible::IsVisible(PRBool* aIsOffscreen)
PRBool isEmpty = PR_TRUE;
nsIAtom *frameType = frame->GetType();
if (frameType == nsAccessibilityAtoms::textFrame) {
if (frameType == nsGkAtoms::textFrame) {
// Zero area rects can occur in the first frame of a multi-frame text flow,
// in which case the rendered text is not empty and the frame should not be marked invisible
nsAutoString renderedText;
frame->GetRenderedText (&renderedText, nsnull, nsnull, 0, 1);
isEmpty = renderedText.IsEmpty();
}
else if (frameType == nsAccessibilityAtoms::inlineFrame) {
else if (frameType == nsGkAtoms::inlineFrame) {
// Yuck. Unfortunately inline frames can contain larger frames inside of them,
// so we can't really believe this is a zero area rect without checking more deeply.
// GetBounds() will do that for us.
@ -683,8 +683,8 @@ nsAccessible::NativeState()
disabled = mContent->IsHTML() ?
(elementState.HasState(NS_EVENT_STATE_DISABLED)) :
(mContent->AttrValueIs(kNameSpaceID_None,
nsAccessibilityAtoms::disabled,
nsAccessibilityAtoms::_true,
nsGkAtoms::disabled,
nsGkAtoms::_true,
eCaseMatters));
}
@ -719,7 +719,7 @@ nsAccessible::NativeState()
// Check if a XUL element has the popup attribute (an attached popup menu).
if (mContent->IsXUL())
if (mContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::popup))
if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::popup))
state |= states::HASPOPUP;
// Add 'linked' state for simple xlink.
@ -915,9 +915,9 @@ void nsAccessible::GetBoundsRect(nsRect& aTotalBounds, nsIFrame** aBoundingFrame
// If any other frame type, we only need to deal with the primary frame
// Otherwise, there may be more frames attached to the same content node
if (!nsCoreUtils::IsCorrectFrameType(ancestorFrame,
nsAccessibilityAtoms::inlineFrame) &&
nsGkAtoms::inlineFrame) &&
!nsCoreUtils::IsCorrectFrameType(ancestorFrame,
nsAccessibilityAtoms::textFrame))
nsGkAtoms::textFrame))
break;
ancestorFrame = ancestorFrame->GetParent();
}
@ -942,7 +942,7 @@ void nsAccessible::GetBoundsRect(nsRect& aTotalBounds, nsIFrame** aBoundingFrame
nsIFrame *iterNextFrame = nsnull;
if (nsCoreUtils::IsCorrectFrameType(iterFrame,
nsAccessibilityAtoms::inlineFrame)) {
nsGkAtoms::inlineFrame)) {
// Only do deeper bounds search if we're on an inline frame
// Inline frames can contain larger frames inside of them
iterNextFrame = iterFrame->GetFirstPrincipalChild();
@ -1042,11 +1042,11 @@ NS_IMETHODIMP nsAccessible::SetSelected(PRBool aSelect)
if (mRoleMapEntry) {
if (aSelect) {
return mContent->SetAttr(kNameSpaceID_None,
nsAccessibilityAtoms::aria_selected,
nsGkAtoms::aria_selected,
NS_LITERAL_STRING("true"), PR_TRUE);
}
return mContent->UnsetAttr(kNameSpaceID_None,
nsAccessibilityAtoms::aria_selected, PR_TRUE);
nsGkAtoms::aria_selected, PR_TRUE);
}
}
@ -1096,7 +1096,7 @@ nsAccessible::TakeFocus()
nsIContent* ancestorContent = mContent;
while ((ancestorContent = ancestorContent->GetParent()) &&
!ancestorContent->HasAttr(kNameSpaceID_None,
nsAccessibilityAtoms::aria_activedescendant));
nsGkAtoms::aria_activedescendant));
if (ancestorContent) {
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mWeakShell));
@ -1105,7 +1105,7 @@ nsAccessible::TakeFocus()
if (frame && frame->IsFocusable()) {
focusContent = ancestorContent;
focusContent->SetAttr(kNameSpaceID_None,
nsAccessibilityAtoms::aria_activedescendant,
nsGkAtoms::aria_activedescendant,
id, PR_TRUE);
}
}
@ -1215,8 +1215,8 @@ nsAccessible::GetXULName(nsAString& aLabel)
nsIContent *parent = bindingParent? bindingParent->GetParent() :
mContent->GetParent();
while (parent) {
if (parent->Tag() == nsAccessibilityAtoms::toolbaritem &&
parent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::title, label)) {
if (parent->Tag() == nsGkAtoms::toolbaritem &&
parent->GetAttr(kNameSpaceID_None, nsGkAtoms::title, label)) {
label.CompressWhitespace();
aLabel = label;
return NS_OK;
@ -1293,7 +1293,7 @@ nsAccessible::GetAttributes(nsIPersistentProperties **aAttributes)
}
nsAutoString xmlRoles;
if (mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::role, xmlRoles)) {
if (mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::role, xmlRoles)) {
attributes->SetStringProperty(NS_LITERAL_CSTRING("xml-roles"), xmlRoles, oldValueUnused);
}
@ -1309,7 +1309,7 @@ nsAccessible::GetAttributes(nsIPersistentProperties **aAttributes)
// Expose checkable object attribute if the accessible has checkable state
if (State() & states::CHECKABLE)
nsAccUtils::SetAccAttr(attributes, nsAccessibilityAtoms::checkable, NS_LITERAL_STRING("true"));
nsAccUtils::SetAccAttr(attributes, nsGkAtoms::checkable, NS_LITERAL_STRING("true"));
// Group attributes (level/setsize/posinset)
PRInt32 level = 0, posInSet = 0, setSize = 0;
@ -1343,10 +1343,10 @@ nsAccessible::GetAttributes(nsIPersistentProperties **aAttributes)
// object attribute used for ARIA role of this accessible.
if (mRoleMapEntry) {
nsAutoString live;
nsAccUtils::GetAccAttr(attributes, nsAccessibilityAtoms::live, live);
nsAccUtils::GetAccAttr(attributes, nsGkAtoms::live, live);
if (live.IsEmpty()) {
if (nsAccUtils::GetLiveAttrValue(mRoleMapEntry->liveAttRule, live))
nsAccUtils::SetAccAttr(attributes, nsAccessibilityAtoms::live, live);
nsAccUtils::SetAccAttr(attributes, nsGkAtoms::live, live);
}
}
@ -1373,8 +1373,8 @@ nsAccessible::GetAttributesInternal(nsIPersistentProperties *aAttributes)
// Expose class because it may have useful microformat information
// Let the class from an iframe's document be exposed, don't override from <iframe class>
nsAutoString _class;
if (mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::_class, _class))
nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::_class, _class);
if (mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::_class, _class))
nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::_class, _class);
// Get container-foo computed live region properties based on the closest container with
// the live region attribute.
@ -1416,22 +1416,19 @@ nsAccessible::GetAttributesInternal(nsIPersistentProperties *aAttributes)
NS_LITERAL_STRING("display"),
value);
if (NS_SUCCEEDED(rv))
nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::display,
value);
nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::display, value);
// Expose 'text-align' attribute.
rv = GetComputedStyleValue(EmptyString(), NS_LITERAL_STRING("text-align"),
value);
if (NS_SUCCEEDED(rv))
nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::textAlign,
value);
nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::textAlign, value);
// Expose 'text-indent' attribute.
rv = GetComputedStyleValue(EmptyString(), NS_LITERAL_STRING("text-indent"),
value);
if (NS_SUCCEEDED(rv))
nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::textIndent,
value);
nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::textIndent, value);
// Expose draggable object attribute?
nsCOMPtr<nsIDOMNSHTMLElement> htmlElement = do_QueryInterface(mContent);
@ -1439,7 +1436,7 @@ nsAccessible::GetAttributesInternal(nsIPersistentProperties *aAttributes)
PRBool draggable = PR_FALSE;
htmlElement->GetDraggable(&draggable);
if (draggable) {
nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::draggable,
nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::draggable,
NS_LITERAL_STRING("true"));
}
}
@ -1465,11 +1462,11 @@ nsAccessible::GroupPosition(PRInt32 *aGroupLevel,
return NS_ERROR_FAILURE;
// Get group position from ARIA attributes.
nsCoreUtils::GetUIntAttr(mContent, nsAccessibilityAtoms::aria_level,
nsCoreUtils::GetUIntAttr(mContent, nsGkAtoms::aria_level,
aGroupLevel);
nsCoreUtils::GetUIntAttr(mContent, nsAccessibilityAtoms::aria_posinset,
nsCoreUtils::GetUIntAttr(mContent, nsGkAtoms::aria_posinset,
aPositionInGroup);
nsCoreUtils::GetUIntAttr(mContent, nsAccessibilityAtoms::aria_setsize,
nsCoreUtils::GetUIntAttr(mContent, nsGkAtoms::aria_setsize,
aSimilarItemsInGroup);
// If ARIA is missed and the accessible is visible then calculate group
@ -1522,8 +1519,8 @@ nsAccessible::State()
if (mRoleMapEntry && mRoleMapEntry->role == nsIAccessibleRole::ROLE_PAGETAB &&
!(state & states::SELECTED) &&
!mContent->AttrValueIs(kNameSpaceID_None,
nsAccessibilityAtoms::aria_selected,
nsAccessibilityAtoms::_false, eCaseMatters)) {
nsGkAtoms::aria_selected,
nsGkAtoms::_false, eCaseMatters)) {
// Special case: for tabs, focused implies selected, unless explicitly
// false, i.e. aria-selected="false".
if (state & states::FOCUSED) {
@ -1567,7 +1564,7 @@ nsAccessible::State()
nsIContent *ancestorContent = mContent;
nsAutoString activeID;
while ((ancestorContent = ancestorContent->GetParent()) != nsnull) {
if (ancestorContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_activedescendant, activeID)) {
if (ancestorContent->GetAttr(kNameSpaceID_None, nsGkAtoms::aria_activedescendant, activeID)) {
if (id == activeID) {
state |= states::ACTIVE;
}
@ -1629,7 +1626,7 @@ nsAccessible::ApplyARIAState(PRUint64* aState)
// If has a role & ID and aria-activedescendant on the container, assume focusable
nsIContent *ancestorContent = mContent;
while ((ancestorContent = ancestorContent->GetParent()) != nsnull) {
if (ancestorContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_activedescendant)) {
if (ancestorContent->HasAttr(kNameSpaceID_None, nsGkAtoms::aria_activedescendant)) {
// ancestor has activedescendant property, this content could be active
*aState |= states::FOCUSABLE;
break;
@ -1642,8 +1639,8 @@ nsAccessible::ApplyARIAState(PRUint64* aState)
// Special case: aria-disabled propagates from ancestors down to any focusable descendant
nsIContent *ancestorContent = mContent;
while ((ancestorContent = ancestorContent->GetParent()) != nsnull) {
if (ancestorContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::aria_disabled,
nsAccessibilityAtoms::_true, eCaseMatters)) {
if (ancestorContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::aria_disabled,
nsGkAtoms::_true, eCaseMatters)) {
// ancestor has aria-disabled property, this is disabled
*aState |= states::UNAVAILABLE;
break;
@ -1683,8 +1680,8 @@ nsAccessible::GetValue(nsAString& aValue)
// aria-valuenow is a number, and aria-valuetext is the optional text equivalent
// For the string value, we will try the optional text equivalent first
if (!mContent->GetAttr(kNameSpaceID_None,
nsAccessibilityAtoms::aria_valuetext, aValue)) {
mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_valuenow,
nsGkAtoms::aria_valuetext, aValue)) {
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::aria_valuenow,
aValue);
}
}
@ -1708,13 +1705,13 @@ nsAccessible::GetValue(nsAString& aValue)
NS_IMETHODIMP
nsAccessible::GetMaximumValue(double *aMaximumValue)
{
return GetAttrValue(nsAccessibilityAtoms::aria_valuemax, aMaximumValue);
return GetAttrValue(nsGkAtoms::aria_valuemax, aMaximumValue);
}
NS_IMETHODIMP
nsAccessible::GetMinimumValue(double *aMinimumValue)
{
return GetAttrValue(nsAccessibilityAtoms::aria_valuemin, aMinimumValue);
return GetAttrValue(nsGkAtoms::aria_valuemin, aMinimumValue);
}
NS_IMETHODIMP
@ -1730,7 +1727,7 @@ nsAccessible::GetMinimumIncrement(double *aMinIncrement)
NS_IMETHODIMP
nsAccessible::GetCurrentValue(double *aValue)
{
return GetAttrValue(nsAccessibilityAtoms::aria_valuenow, aValue);
return GetAttrValue(nsGkAtoms::aria_valuenow, aValue);
}
NS_IMETHODIMP
@ -1758,8 +1755,7 @@ nsAccessible::SetCurrentValue(double aValue)
nsAutoString newValue;
newValue.AppendFloat(aValue);
return mContent->SetAttr(kNameSpaceID_None,
nsAccessibilityAtoms::aria_valuenow, newValue,
PR_TRUE);
nsGkAtoms::aria_valuenow, newValue, PR_TRUE);
}
/* void setName (in DOMString name); */
@ -1809,16 +1805,15 @@ nsAccessible::ARIARoleInternal()
// XXX: these unfortunate exceptions don't fit into the ARIA table. This is
// where the accessible role depends on both the role and ARIA state.
if (mRoleMapEntry->role == nsIAccessibleRole::ROLE_PUSHBUTTON) {
if (nsAccUtils::HasDefinedARIAToken(mContent,
nsAccessibilityAtoms::aria_pressed)) {
if (nsAccUtils::HasDefinedARIAToken(mContent, nsGkAtoms::aria_pressed)) {
// For simplicity, any existing pressed attribute except "" or "undefined"
// indicates a toggle.
return nsIAccessibleRole::ROLE_TOGGLE_BUTTON;
}
if (mContent->AttrValueIs(kNameSpaceID_None,
nsAccessibilityAtoms::aria_haspopup,
nsAccessibilityAtoms::_true,
nsGkAtoms::aria_haspopup,
nsGkAtoms::_true,
eCaseMatters)) {
// For button with aria-haspopup="true".
return nsIAccessibleRole::ROLE_BUTTONMENU;
@ -1979,7 +1974,7 @@ nsAccessible::GetAtomicRegion() const
{
nsIContent *loopContent = mContent;
nsAutoString atomic;
while (loopContent && !loopContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_atomic, atomic))
while (loopContent && !loopContent->GetAttr(kNameSpaceID_None, nsGkAtoms::aria_atomic, atomic))
loopContent = loopContent->GetParent();
return atomic.EqualsLiteral("true") ? loopContent : nsnull;
@ -2008,17 +2003,17 @@ nsAccessible::RelationByType(PRUint32 aType)
switch (aType) {
case nsIAccessibleRelation::RELATION_LABEL_FOR: {
Relation rel(new RelatedAccIterator(GetDocAccessible(), mContent,
nsAccessibilityAtoms::aria_labelledby));
if (mContent->Tag() == nsAccessibilityAtoms::label)
nsGkAtoms::aria_labelledby));
if (mContent->Tag() == nsGkAtoms::label)
rel.AppendIter(new IDRefsIterator(mContent, mContent->IsHTML() ?
nsAccessibilityAtoms::_for :
nsAccessibilityAtoms::control));
nsGkAtoms::_for :
nsGkAtoms::control));
return rel;
}
case nsIAccessibleRelation::RELATION_LABELLED_BY: {
Relation rel(new IDRefsIterator(mContent,
nsAccessibilityAtoms::aria_labelledby));
nsGkAtoms::aria_labelledby));
if (mContent->IsHTML()) {
rel.AppendIter(new HTMLLabelIterator(GetDocAccessible(), mContent));
} else if (mContent->IsXUL()) {
@ -2029,7 +2024,7 @@ nsAccessible::RelationByType(PRUint32 aType)
}
case nsIAccessibleRelation::RELATION_DESCRIBED_BY: {
Relation rel(new IDRefsIterator(mContent,
nsAccessibilityAtoms::aria_describedby));
nsGkAtoms::aria_describedby));
if (mContent->IsXUL())
rel.AppendIter(new XULDescriptionIterator(GetDocAccessible(), mContent));
@ -2037,21 +2032,21 @@ nsAccessible::RelationByType(PRUint32 aType)
}
case nsIAccessibleRelation::RELATION_DESCRIPTION_FOR: {
Relation rel(new RelatedAccIterator(GetDocAccessible(), mContent,
nsAccessibilityAtoms::aria_describedby));
nsGkAtoms::aria_describedby));
// This affectively adds an optional control attribute to xul:description,
// which only affects accessibility, by allowing the description to be
// tied to a control.
if (mContent->Tag() == nsAccessibilityAtoms::description &&
if (mContent->Tag() == nsGkAtoms::description &&
mContent->IsXUL())
rel.AppendIter(new IDRefsIterator(mContent,
nsAccessibilityAtoms::control));
nsGkAtoms::control));
return rel;
}
case nsIAccessibleRelation::RELATION_NODE_CHILD_OF: {
Relation rel(new RelatedAccIterator(GetDocAccessible(), mContent,
nsAccessibilityAtoms::aria_owns));
nsGkAtoms::aria_owns));
// This is an ARIA tree or treegrid that doesn't use owns, so we need to
// get the parent the hard way.
@ -2085,19 +2080,19 @@ nsAccessible::RelationByType(PRUint32 aType)
}
case nsIAccessibleRelation::RELATION_CONTROLLED_BY:
return Relation(new RelatedAccIterator(GetDocAccessible(), mContent,
nsAccessibilityAtoms::aria_controls));
nsGkAtoms::aria_controls));
case nsIAccessibleRelation::RELATION_CONTROLLER_FOR: {
Relation rel(new IDRefsIterator(mContent,
nsAccessibilityAtoms::aria_controls));
nsGkAtoms::aria_controls));
rel.AppendIter(new HTMLOutputIterator(GetDocAccessible(), mContent));
return rel;
}
case nsIAccessibleRelation::RELATION_FLOWS_TO:
return Relation(new IDRefsIterator(mContent,
nsAccessibilityAtoms::aria_flowto));
nsGkAtoms::aria_flowto));
case nsIAccessibleRelation::RELATION_FLOWS_FROM:
return Relation(new RelatedAccIterator(GetDocAccessible(), mContent,
nsAccessibilityAtoms::aria_flowto));
nsGkAtoms::aria_flowto));
case nsIAccessibleRelation::RELATION_DEFAULT_BUTTON: {
if (mContent->IsHTML()) {
// HTML form controls implements nsIFormControl interface.
@ -2469,7 +2464,7 @@ nsAccessible::AppendTextTo(nsAString& aText, PRUint32 aStartOffset,
if (!frame)
return;
if (frame->GetType() == nsAccessibilityAtoms::brFrame) {
if (frame->GetType() == nsGkAtoms::brFrame) {
aText += kForcedNewLineChar;
} else if (nsAccUtils::MustPrune(Parent())) {
// Expose the embedded object accessible as imaginary embedded object
@ -2506,14 +2501,14 @@ nsAccessible::GetARIAName(nsAString& aName)
// aria-labelledby now takes precedence over aria-label
nsresult rv = nsTextEquivUtils::
GetTextEquivFromIDRefs(this, nsAccessibilityAtoms::aria_labelledby, label);
GetTextEquivFromIDRefs(this, nsGkAtoms::aria_labelledby, label);
if (NS_SUCCEEDED(rv)) {
label.CompressWhitespace();
aName = label;
}
if (label.IsEmpty() &&
mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_label,
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::aria_label,
label)) {
label.CompressWhitespace();
aName = label;
@ -2770,7 +2765,7 @@ nsAccessible::AnchorURIAt(PRUint32 aAnchorIndex)
// Check if it's a simple xlink.
if (nsCoreUtils::IsXLink(mContent)) {
nsAutoString href;
mContent->GetAttr(kNameSpaceID_XLink, nsAccessibilityAtoms::href, href);
mContent->GetAttr(kNameSpaceID_XLink, nsGkAtoms::href, href);
nsCOMPtr<nsIURI> baseURI = mContent->GetBaseURI();
nsCOMPtr<nsIDocument> document = mContent->GetOwnerDoc();
@ -3066,7 +3061,7 @@ nsAccessible::GetActionRule(PRUint64 aStates)
// Return "click" action on elements that have an attached popup menu.
if (mContent->IsXUL())
if (mContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::popup))
if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::popup))
return eClickAction;
// Has registered 'click' event handler.
@ -3082,7 +3077,7 @@ nsAccessible::GetActionRule(PRUint64 aStates)
// Get an action based on ARIA attribute.
if (nsAccUtils::HasDefinedARIAToken(mContent,
nsAccessibilityAtoms::aria_expanded))
nsGkAtoms::aria_expanded))
return eExpandAction;
return eNoAction;

Просмотреть файл

@ -40,7 +40,6 @@
#include "nsBaseWidgetAccessible.h"
#include "States.h"
#include "nsAccessibilityAtoms.h"
#include "nsAccessibilityService.h"
#include "nsAccUtils.h"
#include "nsCoreUtils.h"

Просмотреть файл

@ -204,7 +204,7 @@ nsCoreUtils::GetAccessKeyFor(nsIContent *aContent)
// Accesskeys are registered by @accesskey attribute only. At first check
// whether it is presented on the given element to avoid the slow
// nsEventStateManager::GetRegisteredAccessKey() method.
if (!aContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::accesskey))
if (!aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::accesskey))
return 0;
nsCOMPtr<nsIDocument> doc = aContent->GetOwnerDoc();
@ -577,9 +577,9 @@ nsCoreUtils::IsXLink(nsIContent *aContent)
if (!aContent)
return PR_FALSE;
return aContent->AttrValueIs(kNameSpaceID_XLink, nsAccessibilityAtoms::type,
nsAccessibilityAtoms::simple, eCaseMatters) &&
aContent->HasAttr(kNameSpaceID_XLink, nsAccessibilityAtoms::href);
return aContent->AttrValueIs(kNameSpaceID_XLink, nsGkAtoms::type,
nsGkAtoms::simple, eCaseMatters) &&
aContent->HasAttr(kNameSpaceID_XLink, nsGkAtoms::href);
}
void
@ -590,8 +590,7 @@ nsCoreUtils::GetLanguageFor(nsIContent *aContent, nsIContent *aRootContent,
nsIContent *walkUp = aContent;
while (walkUp && walkUp != aRootContent &&
!walkUp->GetAttr(kNameSpaceID_None,
nsAccessibilityAtoms::lang, aLanguage))
!walkUp->GetAttr(kNameSpaceID_None, nsGkAtoms::lang, aLanguage))
walkUp = walkUp->GetParent();
}
@ -638,7 +637,7 @@ nsCoreUtils::GetTreeBoxObject(nsIContent *aContent)
// Find DOMNode's parents recursively until reach the <tree> tag
nsIContent* currentContent = aContent;
while (currentContent) {
if (currentContent->NodeInfo()->Equals(nsAccessibilityAtoms::tree,
if (currentContent->NodeInfo()->Equals(nsGkAtoms::tree,
kNameSpaceID_XUL)) {
// We will get the nsITreeBoxObject from the tree node
nsCOMPtr<nsIDOMXULElement> xulElement(do_QueryInterface(currentContent));
@ -766,8 +765,8 @@ nsCoreUtils::IsColumnHidden(nsITreeColumn *aColumn)
nsCOMPtr<nsIDOMElement> element;
aColumn->GetElement(getter_AddRefs(element));
nsCOMPtr<nsIContent> content = do_QueryInterface(element);
return content->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::hidden,
nsAccessibilityAtoms::_true, eCaseMatters);
return content->AttrValueIs(kNameSpaceID_None, nsGkAtoms::hidden,
nsGkAtoms::_true, eCaseMatters);
}
bool

Просмотреть файл

@ -39,7 +39,6 @@
#ifndef nsCoreUtils_h_
#define nsCoreUtils_h_
#include "nsAccessibilityAtoms.h"
#include "nsIDOMNode.h"
#include "nsIContent.h"
@ -368,8 +367,8 @@ public:
*/
static PRBool IsHTMLTableHeader(nsIContent *aContent)
{
return aContent->NodeInfo()->Equals(nsAccessibilityAtoms::th) ||
aContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::scope);
return aContent->NodeInfo()->Equals(nsGkAtoms::th) ||
aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::scope);
}
/**

Просмотреть файл

@ -39,7 +39,6 @@
#include "AccIterator.h"
#include "States.h"
#include "nsAccCache.h"
#include "nsAccessibilityAtoms.h"
#include "nsAccessibilityService.h"
#include "nsAccTreeWalker.h"
#include "nsAccUtils.h"
@ -86,13 +85,13 @@ using namespace mozilla::a11y;
static nsIAtom** kRelationAttrs[] =
{
&nsAccessibilityAtoms::aria_labelledby,
&nsAccessibilityAtoms::aria_describedby,
&nsAccessibilityAtoms::aria_owns,
&nsAccessibilityAtoms::aria_controls,
&nsAccessibilityAtoms::aria_flowto,
&nsAccessibilityAtoms::_for,
&nsAccessibilityAtoms::control
&nsGkAtoms::aria_labelledby,
&nsGkAtoms::aria_describedby,
&nsGkAtoms::aria_owns,
&nsGkAtoms::aria_controls,
&nsGkAtoms::aria_flowto,
&nsGkAtoms::_for,
&nsGkAtoms::control
};
static const PRUint32 kRelationAttrsLen = NS_ARRAY_LENGTH(kRelationAttrs);
@ -283,7 +282,7 @@ nsDocAccessible::Description(nsString& aDescription)
if (aDescription.IsEmpty())
nsTextEquivUtils::
GetTextEquivFromIDRefs(this, nsAccessibilityAtoms::aria_describedby,
GetTextEquivFromIDRefs(this, nsGkAtoms::aria_describedby,
aDescription);
}
@ -939,8 +938,8 @@ nsDocAccessible::AttributeWillChange(nsIDocument *aDocument,
// Here we will want to cache whatever attribute values we are interested
// in, such as the existence of aria-pressed for button (so we know if we
// need to newly expose it as a toggle button) etc.
if (aAttribute == nsAccessibilityAtoms::aria_checked ||
aAttribute == nsAccessibilityAtoms::aria_pressed) {
if (aAttribute == nsGkAtoms::aria_checked ||
aAttribute == nsGkAtoms::aria_pressed) {
mARIAAttrOldValue = (aModType != nsIDOMMutationEvent::ADDITION) ?
nsAccUtils::GetARIAToken(aElement, aAttribute) : nsnull;
}
@ -1010,8 +1009,8 @@ nsDocAccessible::AttributeChangedImpl(nsIContent* aContent, PRInt32 aNameSpaceID
// Universal boolean properties that don't require a role. Fire the state
// change when disabled or aria-disabled attribute is set.
if (aAttribute == nsAccessibilityAtoms::disabled ||
aAttribute == nsAccessibilityAtoms::aria_disabled) {
if (aAttribute == nsGkAtoms::disabled ||
aAttribute == nsGkAtoms::aria_disabled) {
// Note. Checking the XUL or HTML namespace would not seem to gain us
// anything, because disabled attribute really is going to mean the same
@ -1041,25 +1040,25 @@ nsDocAccessible::AttributeChangedImpl(nsIContent* aContent, PRInt32 aNameSpaceID
}
}
if (aAttribute == nsAccessibilityAtoms::alt ||
aAttribute == nsAccessibilityAtoms::title ||
aAttribute == nsAccessibilityAtoms::aria_label ||
aAttribute == nsAccessibilityAtoms::aria_labelledby) {
if (aAttribute == nsGkAtoms::alt ||
aAttribute == nsGkAtoms::title ||
aAttribute == nsGkAtoms::aria_label ||
aAttribute == nsGkAtoms::aria_labelledby) {
FireDelayedAccessibleEvent(nsIAccessibleEvent::EVENT_NAME_CHANGE,
aContent);
return;
}
if (aAttribute == nsAccessibilityAtoms::aria_busy) {
if (aAttribute == nsGkAtoms::aria_busy) {
PRBool isOn = aContent->AttrValueIs(aNameSpaceID, aAttribute,
nsAccessibilityAtoms::_true, eCaseMatters);
nsGkAtoms::_true, eCaseMatters);
nsRefPtr<AccEvent> event = new AccStateChangeEvent(aContent, states::BUSY, isOn);
FireDelayedAccessibleEvent(event);
return;
}
if (aAttribute == nsAccessibilityAtoms::selected ||
aAttribute == nsAccessibilityAtoms::aria_selected) {
if (aAttribute == nsGkAtoms::selected ||
aAttribute == nsGkAtoms::aria_selected) {
// ARIA or XUL selection
nsAccessible *multiSelect =
@ -1077,7 +1076,7 @@ nsDocAccessible::AttributeChangedImpl(nsIContent* aContent, PRInt32 aNameSpaceID
AccEvent::eAllowDupes);
static nsIContent::AttrValuesArray strings[] =
{&nsAccessibilityAtoms::_empty, &nsAccessibilityAtoms::_false, nsnull};
{&nsGkAtoms::_empty, &nsGkAtoms::_false, nsnull};
if (aContent->FindAttrValueIn(kNameSpaceID_None, aAttribute,
strings, eCaseMatters) >= 0) {
FireDelayedAccessibleEvent(nsIAccessibleEvent::EVENT_SELECTION_REMOVE,
@ -1090,7 +1089,7 @@ nsDocAccessible::AttributeChangedImpl(nsIContent* aContent, PRInt32 aNameSpaceID
}
}
if (aAttribute == nsAccessibilityAtoms::contenteditable) {
if (aAttribute == nsGkAtoms::contenteditable) {
nsRefPtr<AccEvent> editableChangeEvent =
new AccStateChangeEvent(aContent, states::EDITABLE);
FireDelayedAccessibleEvent(editableChangeEvent);
@ -1105,21 +1104,21 @@ nsDocAccessible::ARIAAttributeChanged(nsIContent* aContent, nsIAtom* aAttribute)
// Note: For universal/global ARIA states and properties we don't care if
// there is an ARIA role present or not.
if (aAttribute == nsAccessibilityAtoms::aria_required) {
if (aAttribute == nsGkAtoms::aria_required) {
nsRefPtr<AccEvent> event =
new AccStateChangeEvent(aContent, states::REQUIRED);
FireDelayedAccessibleEvent(event);
return;
}
if (aAttribute == nsAccessibilityAtoms::aria_invalid) {
if (aAttribute == nsGkAtoms::aria_invalid) {
nsRefPtr<AccEvent> event =
new AccStateChangeEvent(aContent, states::INVALID);
FireDelayedAccessibleEvent(event);
return;
}
if (aAttribute == nsAccessibilityAtoms::aria_activedescendant) {
if (aAttribute == nsGkAtoms::aria_activedescendant) {
// The activedescendant universal property redirects accessible focus events
// to the element with the id that activedescendant points to
nsCOMPtr<nsINode> focusedNode = GetCurrentFocus();
@ -1135,23 +1134,23 @@ nsDocAccessible::ARIAAttributeChanged(nsIContent* aContent, nsIAtom* aAttribute)
// For aria drag and drop changes we fire a generic attribute change event;
// at least until native API comes up with a more meaningful event.
if (aAttribute == nsAccessibilityAtoms::aria_grabbed ||
aAttribute == nsAccessibilityAtoms::aria_dropeffect ||
aAttribute == nsAccessibilityAtoms::aria_hidden ||
aAttribute == nsAccessibilityAtoms::aria_sort) {
if (aAttribute == nsGkAtoms::aria_grabbed ||
aAttribute == nsGkAtoms::aria_dropeffect ||
aAttribute == nsGkAtoms::aria_hidden ||
aAttribute == nsGkAtoms::aria_sort) {
FireDelayedAccessibleEvent(nsIAccessibleEvent::EVENT_OBJECT_ATTRIBUTE_CHANGED,
aContent);
}
// We treat aria-expanded as a global ARIA state for historical reasons
if (aAttribute == nsAccessibilityAtoms::aria_expanded) {
if (aAttribute == nsGkAtoms::aria_expanded) {
nsRefPtr<AccEvent> event =
new AccStateChangeEvent(aContent, states::EXPANDED);
FireDelayedAccessibleEvent(event);
return;
}
if (!aContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::role)) {
if (!aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::role)) {
// We don't care about these other ARIA attribute changes unless there is
// an ARIA role set for the element
// XXX: we should check the role map to see if the changed property is
@ -1160,18 +1159,18 @@ nsDocAccessible::ARIAAttributeChanged(nsIContent* aContent, nsIAtom* aAttribute)
}
// The following ARIA attributes only take affect when dynamic content role is present
if (aAttribute == nsAccessibilityAtoms::aria_checked ||
aAttribute == nsAccessibilityAtoms::aria_pressed) {
const PRUint32 kState = (aAttribute == nsAccessibilityAtoms::aria_checked) ?
if (aAttribute == nsGkAtoms::aria_checked ||
aAttribute == nsGkAtoms::aria_pressed) {
const PRUint32 kState = (aAttribute == nsGkAtoms::aria_checked) ?
states::CHECKED : states::PRESSED;
nsRefPtr<AccEvent> event = new AccStateChangeEvent(aContent, kState);
FireDelayedAccessibleEvent(event);
nsAccessible* accessible = event->GetAccessible();
if (accessible) {
bool wasMixed = (mARIAAttrOldValue == nsAccessibilityAtoms::mixed);
bool wasMixed = (mARIAAttrOldValue == nsGkAtoms::mixed);
bool isMixed = aContent->AttrValueIs(kNameSpaceID_None, aAttribute,
nsAccessibilityAtoms::mixed, eCaseMatters);
nsGkAtoms::mixed, eCaseMatters);
if (isMixed != wasMixed) {
nsRefPtr<AccEvent> event =
new AccStateChangeEvent(aContent, states::MIXED, isMixed);
@ -1181,7 +1180,7 @@ nsDocAccessible::ARIAAttributeChanged(nsIContent* aContent, nsIAtom* aAttribute)
return;
}
if (aAttribute == nsAccessibilityAtoms::aria_readonly) {
if (aAttribute == nsGkAtoms::aria_readonly) {
nsRefPtr<AccEvent> event =
new AccStateChangeEvent(aContent, states::READONLY);
FireDelayedAccessibleEvent(event);
@ -1190,13 +1189,11 @@ nsDocAccessible::ARIAAttributeChanged(nsIContent* aContent, nsIAtom* aAttribute)
// Fire value change event whenever aria-valuetext is changed, or
// when aria-valuenow is changed and aria-valuetext is empty
if (aAttribute == nsAccessibilityAtoms::aria_valuetext ||
(aAttribute == nsAccessibilityAtoms::aria_valuenow &&
(!aContent->HasAttr(kNameSpaceID_None,
nsAccessibilityAtoms::aria_valuetext) ||
aContent->AttrValueIs(kNameSpaceID_None,
nsAccessibilityAtoms::aria_valuetext, nsAccessibilityAtoms::_empty,
eCaseMatters)))) {
if (aAttribute == nsGkAtoms::aria_valuetext ||
(aAttribute == nsGkAtoms::aria_valuenow &&
(!aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::aria_valuetext) ||
aContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::aria_valuetext,
nsGkAtoms::_empty, eCaseMatters)))) {
FireDelayedAccessibleEvent(nsIAccessibleEvent::EVENT_VALUE_CHANGE,
aContent);
return;
@ -1560,16 +1557,16 @@ nsDocAccessible::AddDependentIDsFor(nsAccessible* aRelProvider,
if (aRelAttr && aRelAttr != relAttr)
continue;
if (relAttr == nsAccessibilityAtoms::_for) {
if (relAttr == nsGkAtoms::_for) {
if (!aRelProvider->GetContent()->IsHTML() ||
aRelProvider->GetContent()->Tag() != nsAccessibilityAtoms::label &&
aRelProvider->GetContent()->Tag() != nsAccessibilityAtoms::output)
aRelProvider->GetContent()->Tag() != nsGkAtoms::label &&
aRelProvider->GetContent()->Tag() != nsGkAtoms::output)
continue;
} else if (relAttr == nsAccessibilityAtoms::control) {
} else if (relAttr == nsGkAtoms::control) {
if (!aRelProvider->GetContent()->IsXUL() ||
aRelProvider->GetContent()->Tag() != nsAccessibilityAtoms::label &&
aRelProvider->GetContent()->Tag() != nsAccessibilityAtoms::description)
aRelProvider->GetContent()->Tag() != nsGkAtoms::label &&
aRelProvider->GetContent()->Tag() != nsGkAtoms::description)
continue;
}
@ -1656,7 +1653,7 @@ bool
nsDocAccessible::UpdateAccessibleOnAttrChange(dom::Element* aElement,
nsIAtom* aAttribute)
{
if (aAttribute == nsAccessibilityAtoms::role) {
if (aAttribute == nsGkAtoms::role) {
// It is common for js libraries to set the role on the body element after
// the document has loaded. In this case we just update the role map entry.
if (mContent == aElement) {
@ -1673,8 +1670,8 @@ nsDocAccessible::UpdateAccessibleOnAttrChange(dom::Element* aElement,
return true;
}
if (aAttribute == nsAccessibilityAtoms::href ||
aAttribute == nsAccessibilityAtoms::onclick) {
if (aAttribute == nsGkAtoms::href ||
aAttribute == nsGkAtoms::onclick) {
// Not worth the expense to ensure which namespace these are in. It doesn't
// kill use to recreate the accessible even if the attribute was used in
// the wrong namespace or an element that doesn't support it.
@ -1687,8 +1684,8 @@ nsDocAccessible::UpdateAccessibleOnAttrChange(dom::Element* aElement,
return true;
}
if (aAttribute == nsAccessibilityAtoms::aria_multiselectable &&
aElement->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::role)) {
if (aAttribute == nsGkAtoms::aria_multiselectable &&
aElement->HasAttr(kNameSpaceID_None, nsGkAtoms::role)) {
// This affects whether the accessible supports SelectAccessible.
// COM says we cannot change what interfaces are supported on-the-fly,
// so invalidate this object. A new one will be created on demand.

Просмотреть файл

@ -84,7 +84,7 @@ nsEventShell::GetEventAttributes(nsINode *aNode,
if (aNode != sEventTargetNode)
return;
nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::eventFromInput,
nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::eventFromInput,
sEventFromUserInput ? NS_LITERAL_STRING("true") :
NS_LITERAL_STRING("false"));
}

Просмотреть файл

@ -116,7 +116,7 @@ ProgressMeterAccessible<Max>::GetMaximumValue(double* aMaximumValue)
return rv;
nsAutoString value;
if (mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::max, value)) {
if (mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::max, value)) {
PRInt32 result = NS_OK;
*aMaximumValue = value.ToDouble(&result);
return result;
@ -159,7 +159,7 @@ ProgressMeterAccessible<Max>::GetCurrentValue(double* aCurrentValue)
return rv;
nsAutoString attrValue;
mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::value, attrValue);
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::value, attrValue);
// Return zero value if there is no attribute or its value is empty.
if (attrValue.IsEmpty())

Просмотреть файл

@ -330,7 +330,7 @@ nsRootAccessible::FireAccessibleFocusEvent(nsAccessible* aFocusAccessible,
if (content) {
nsAutoString id;
if (content->GetAttr(kNameSpaceID_None,
nsAccessibilityAtoms::aria_activedescendant, id)) {
nsGkAtoms::aria_activedescendant, id)) {
nsIDocument* DOMDoc = content->GetOwnerDoc();
nsIContent* activeDescendantContent = DOMDoc->GetElementById(id);
@ -519,8 +519,8 @@ nsRootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
#ifdef MOZ_XUL
PRBool isTree = targetContent ?
targetContent->NodeInfo()->Equals(nsAccessibilityAtoms::tree,
kNameSpaceID_XUL) : PR_FALSE;
targetContent->NodeInfo()->Equals(nsGkAtoms::tree, kNameSpaceID_XUL) :
PR_FALSE;
if (isTree) {
nsRefPtr<nsXULTreeAccessible> treeAcc = do_QueryObject(accessible);

Просмотреть файл

@ -70,12 +70,12 @@ const char* const kCopyValue = nsnull;
static nsCSSTextAttrMapItem gCSSTextAttrsMap[] =
{
// CSS name CSS value Attribute name Attribute value
{ "color", kAnyValue, &nsAccessibilityAtoms::color, kCopyValue },
{ "font-family", kAnyValue, &nsAccessibilityAtoms::fontFamily, kCopyValue },
{ "font-style", kAnyValue, &nsAccessibilityAtoms::fontStyle, kCopyValue },
{ "text-decoration", "line-through", &nsAccessibilityAtoms::textLineThroughStyle, "solid" },
{ "text-decoration", "underline", &nsAccessibilityAtoms::textUnderlineStyle, "solid" },
{ "vertical-align", kAnyValue, &nsAccessibilityAtoms::textPosition, kCopyValue }
{ "color", kAnyValue, &nsGkAtoms::color, kCopyValue },
{ "font-family", kAnyValue, &nsGkAtoms::font_family, kCopyValue },
{ "font-style", kAnyValue, &nsGkAtoms::font_style, kCopyValue },
{ "text-decoration", "line-through", &nsGkAtoms::textLineThroughStyle, "solid" },
{ "text-decoration", "underline", &nsGkAtoms::textUnderlineStyle, "solid" },
{ "vertical-align", kAnyValue, &nsGkAtoms::textPosition, kCopyValue }
};
////////////////////////////////////////////////////////////////////////////////
@ -325,7 +325,7 @@ nsCSSTextAttr::nsCSSTextAttr(PRUint32 aIndex, nsIContent *aRootContent,
}
nsIAtom*
nsCSSTextAttr::GetName()
nsCSSTextAttr::GetName() const
{
return *gCSSTextAttrsMap[mIndex].mAttrName;
}

Просмотреть файл

@ -41,7 +41,6 @@
class nsHyperTextAccessible;
#include "nsAccessibilityAtoms.h"
#include "nsIDOMNode.h"
#include "nsIDOMElement.h"
@ -136,7 +135,7 @@ public:
/**
* Return the name of text attribute.
*/
virtual nsIAtom* GetName() = 0;
virtual nsIAtom* GetName() const = 0;
/**
* Retrieve the value of text attribute in out param, return true if differs
@ -247,7 +246,7 @@ public:
nsIContent *aContent);
// nsITextAttr
virtual nsIAtom *GetName() { return nsAccessibilityAtoms::language; }
virtual nsIAtom *GetName() const { return nsGkAtoms::language; }
protected:
@ -272,7 +271,7 @@ public:
nsIContent *aContent);
// nsITextAttr
virtual nsIAtom *GetName();
virtual nsIAtom *GetName() const;
protected:
@ -295,7 +294,7 @@ public:
nsBGColorTextAttr(nsIFrame *aRootFrame, nsIFrame *aFrame);
// nsITextAttr
virtual nsIAtom *GetName() { return nsAccessibilityAtoms::backgroundColor; }
virtual nsIAtom *GetName() const { return nsGkAtoms::backgroundColor; }
protected:
// nsTextAttr
@ -318,7 +317,7 @@ public:
nsFontSizeTextAttr(nsIFrame *aRootFrame, nsIFrame *aFrame);
// nsITextAttr
virtual nsIAtom *GetName() { return nsAccessibilityAtoms::fontSize; }
virtual nsIAtom *GetName() const { return nsGkAtoms::font_size; }
protected:
@ -350,7 +349,7 @@ public:
nsFontWeightTextAttr(nsIFrame *aRootFrame, nsIFrame *aFrame);
// nsITextAttr
virtual nsIAtom *GetName() { return nsAccessibilityAtoms::fontWeight; }
virtual nsIAtom *GetName() const { return nsGkAtoms::fontWeight; }
protected:

Просмотреть файл

@ -193,7 +193,7 @@ nsTextEquivUtils::AppendTextEquivFromTextContent(nsIContent *aContent,
}
if (aContent->IsHTML() &&
aContent->NodeInfo()->Equals(nsAccessibilityAtoms::br)) {
aContent->NodeInfo()->Equals(nsGkAtoms::br)) {
aString->AppendLiteral("\r\n");
return NS_OK;
}
@ -360,14 +360,14 @@ nsTextEquivUtils::AppendFromDOMNode(nsIContent *aContent, nsAString *aString)
if (labeledEl) {
labeledEl->GetLabel(textEquivalent);
} else {
if (aContent->NodeInfo()->Equals(nsAccessibilityAtoms::label,
if (aContent->NodeInfo()->Equals(nsGkAtoms::label,
kNameSpaceID_XUL))
aContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::value,
aContent->GetAttr(kNameSpaceID_None, nsGkAtoms::value,
textEquivalent);
if (textEquivalent.IsEmpty())
aContent->GetAttr(kNameSpaceID_None,
nsAccessibilityAtoms::tooltiptext, textEquivalent);
nsGkAtoms::tooltiptext, textEquivalent);
}
AppendString(aString, textEquivalent);

Просмотреть файл

@ -40,7 +40,6 @@
#include "Relation.h"
#include "States.h"
#include "nsAccessibilityAtoms.h"
#include "nsAccUtils.h"
#include "nsTextEquivUtils.h"
@ -180,9 +179,9 @@ nsHTMLRadioButtonAccessible::GetPositionAndSizeInternal(PRInt32 *aPosInSet,
mContent->NodeInfo()->GetName(tagName);
nsAutoString type;
mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::type, type);
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::type, type);
nsAutoString name;
mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::name, name);
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::name, name);
nsCOMPtr<nsIDOMNodeList> inputs;
@ -213,9 +212,9 @@ nsHTMLRadioButtonAccessible::GetPositionAndSizeInternal(PRInt32 *aPosInSet,
nsCOMPtr<nsIContent> item(do_QueryInterface(itemNode));
if (item &&
item->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
item->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
type, eCaseMatters) &&
item->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::name,
item->AttrValueIs(kNameSpaceID_None, nsGkAtoms::name,
name, eCaseMatters)) {
count++;
@ -269,8 +268,8 @@ nsHTMLButtonAccessible::NativeState()
{
PRUint64 state = nsHyperTextAccessibleWrap::NativeState();
if (mContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
nsAccessibilityAtoms::submit, eIgnoreCase))
if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
nsGkAtoms::submit, eIgnoreCase))
state |= states::DEFAULT;
return state;
@ -291,23 +290,22 @@ nsHTMLButtonAccessible::GetNameInternal(nsAString& aName)
// No name from HTML or ARIA
nsAutoString name;
if (!mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::value,
if (!mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::value,
name) &&
!mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::alt,
!mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::alt,
name)) {
// Use the button's (default) label if nothing else works
nsIFrame* frame = GetFrame();
if (frame) {
nsIFormControlFrame* fcFrame = do_QueryFrame(frame);
if (fcFrame)
fcFrame->GetFormProperty(nsAccessibilityAtoms::defaultLabel, name);
fcFrame->GetFormProperty(nsGkAtoms::defaultLabel, name);
}
}
if (name.IsEmpty() &&
!mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::src,
name)) {
mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::data, name);
!mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::src, name)) {
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::data, name);
}
name.CompressWhitespace();
@ -365,8 +363,8 @@ nsHTML4ButtonAccessible::NativeState()
state |= states::FOCUSABLE;
if (mContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
nsAccessibilityAtoms::submit, eIgnoreCase))
if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
nsGkAtoms::submit, eIgnoreCase))
state |= states::DEFAULT;
return state;
@ -388,8 +386,8 @@ NS_IMPL_ISUPPORTS_INHERITED3(nsHTMLTextFieldAccessible, nsAccessible, nsHyperTex
PRUint32
nsHTMLTextFieldAccessible::NativeRole()
{
if (mContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
nsAccessibilityAtoms::password, eIgnoreCase)) {
if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
nsGkAtoms::password, eIgnoreCase)) {
return nsIAccessibleRole::ROLE_PASSWORD_TEXT;
}
return nsIAccessibleRole::ROLE_ENTRY;
@ -420,7 +418,7 @@ nsHTMLTextFieldAccessible::GetNameInternal(nsAString& aName)
return NS_OK;
// text inputs and textareas might have useful placeholder text
mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::placeholder, aName);
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::placeholder, aName);
return NS_OK;
}
@ -461,8 +459,8 @@ nsHTMLTextFieldAccessible::NativeState()
PRUint64 state = nsHyperTextAccessibleWrap::NativeState();
// can be focusable, focused, protected. readonly, unavailable, selected
if (mContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
nsAccessibilityAtoms::password, eIgnoreCase)) {
if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
nsGkAtoms::password, eIgnoreCase)) {
state |= states::PROTECTED;
}
else {
@ -471,7 +469,7 @@ nsHTMLTextFieldAccessible::NativeState()
state |= states::HASPOPUP;
}
if (mContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::readonly)) {
if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::readonly)) {
state |= states::READONLY;
}
@ -489,10 +487,10 @@ nsHTMLTextFieldAccessible::NativeState()
nsCOMPtr<nsIContent> bindingContent = mContent->GetBindingParent();
if (bindingContent &&
bindingContent->NodeInfo()->Equals(nsAccessibilityAtoms::textbox,
bindingContent->NodeInfo()->Equals(nsGkAtoms::textbox,
kNameSpaceID_XUL)) {
if (bindingContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
nsAccessibilityAtoms::autocomplete,
if (bindingContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
nsGkAtoms::autocomplete,
eIgnoreCase)) {
// If parent is XUL textbox and value of @type attribute is "autocomplete",
// then this accessible supports autocompletion.
@ -505,7 +503,7 @@ nsHTMLTextFieldAccessible::NativeState()
// we're talking here is based on what the user types, where a popup of
// possible choices comes up.
nsAutoString autocomplete;
mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::autocomplete,
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::autocomplete,
autocomplete);
if (!autocomplete.LowerCaseEqualsLiteral("off")) {
@ -514,7 +512,7 @@ nsHTMLTextFieldAccessible::NativeState()
nsCOMPtr<nsIContent> formContent(do_QueryInterface(form));
if (formContent) {
formContent->GetAttr(kNameSpaceID_None,
nsAccessibilityAtoms::autocomplete, autocomplete);
nsGkAtoms::autocomplete, autocomplete);
}
if (!formContent || !autocomplete.LowerCaseEqualsLiteral("off"))
@ -598,7 +596,7 @@ nsIContent* nsHTMLGroupboxAccessible::GetLegend()
nsresult count = 0;
nsIContent *legendContent = nsnull;
while ((legendContent = mContent->GetChildAt(count++)) != nsnull) {
if (legendContent->NodeInfo()->Equals(nsAccessibilityAtoms::legend,
if (legendContent->NodeInfo()->Equals(nsGkAtoms::legend,
mContent->GetNameSpaceID())) {
// Either XHTML namespace or no namespace
return legendContent;

Просмотреть файл

@ -39,7 +39,6 @@
#include "nsHTMLImageAccessible.h"
#include "States.h"
#include "nsAccessibilityAtoms.h"
#include "nsAccUtils.h"
#include "imgIContainer.h"
@ -104,7 +103,7 @@ nsresult
nsHTMLImageAccessible::GetNameInternal(nsAString& aName)
{
PRBool hasAltAttrib =
mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::alt, aName);
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::alt, aName);
if (!aName.IsEmpty())
return NS_OK;
@ -212,9 +211,9 @@ nsHTMLImageAccessible::GetAttributesInternal(nsIPersistentProperties *aAttribute
NS_ENSURE_SUCCESS(rv, rv);
nsAutoString src;
mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::src, src);
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::src, src);
if (!src.IsEmpty())
nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::src, src);
nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::src, src);
return NS_OK;
}
@ -228,7 +227,7 @@ nsHTMLImageAccessible::HasLongDesc()
if (IsDefunct())
return PR_FALSE;
return mContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::longDesc);
return mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::longdesc);
}
PRBool

Просмотреть файл

@ -160,10 +160,8 @@ nsHTMLAreaAccessible::GetNameInternal(nsAString & aName)
if (!aName.IsEmpty())
return NS_OK;
if (!mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::alt,
aName)) {
if (!mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::alt, aName))
return GetValue(aName);
}
return NS_OK;
}

Просмотреть файл

@ -77,7 +77,7 @@ nsHTMLLinkAccessible::NativeState()
states &= ~states::READONLY;
if (mContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::name)) {
if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::name)) {
// 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.

Просмотреть файл

@ -89,7 +89,7 @@ nsHTMLSelectListAccessible::NativeState()
state &= ~states::FOCUSED;
}
}
if (mContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::multiple))
if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::multiple))
state |= states::MULTISELECTABLE | states::EXTSELECTABLE;
return state;
@ -116,14 +116,14 @@ nsHTMLSelectListAccessible::IsSelect()
bool
nsHTMLSelectListAccessible::SelectAll()
{
return mContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::multiple) ?
return mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::multiple) ?
nsAccessibleWrap::SelectAll() : false;
}
bool
nsHTMLSelectListAccessible::UnselectAll()
{
return mContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::multiple) ?
return mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::multiple) ?
nsAccessibleWrap::UnselectAll() : false;
}
@ -155,8 +155,8 @@ nsHTMLSelectListAccessible::CacheOptSiblings(nsIContent *aParentContent)
}
nsCOMPtr<nsIAtom> tag = childContent->Tag();
if (tag == nsAccessibilityAtoms::option ||
tag == nsAccessibilityAtoms::optgroup) {
if (tag == nsGkAtoms::option ||
tag == nsGkAtoms::optgroup) {
// Get an accessible for option or optgroup and cache it.
nsRefPtr<nsAccessible> accessible =
@ -166,7 +166,7 @@ nsHTMLSelectListAccessible::CacheOptSiblings(nsIContent *aParentContent)
AppendChild(accessible);
// Deep down into optgroup element.
if (tag == nsAccessibilityAtoms::optgroup)
if (tag == nsGkAtoms::optgroup)
CacheOptSiblings(childContent);
}
}
@ -200,7 +200,7 @@ nsHTMLSelectOptionAccessible::GetNameInternal(nsAString& aName)
{
// CASE #1 -- great majority of the cases
// find the label attribute - this is what the W3C says we should use
mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::label, aName);
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::label, aName);
if (!aName.IsEmpty())
return NS_OK;
@ -323,7 +323,7 @@ nsHTMLSelectOptionAccessible::GetLevelInternal()
nsIContent *parentContent = mContent->GetParent();
PRInt32 level =
parentContent->NodeInfo()->Equals(nsAccessibilityAtoms::optgroup) ? 2 : 1;
parentContent->NodeInfo()->Equals(nsGkAtoms::optgroup) ? 2 : 1;
if (level == 1 && Role() != nsIAccessibleRole::ROLE_HEADING)
level = 0; // In a single level list, the level is irrelevant
@ -517,7 +517,7 @@ void
nsHTMLSelectOptionAccessible::SelectionChangedIfOption(nsIContent *aPossibleOptionNode)
{
if (!aPossibleOptionNode ||
aPossibleOptionNode->Tag() != nsAccessibilityAtoms::option ||
aPossibleOptionNode->Tag() != nsGkAtoms::option ||
!aPossibleOptionNode->IsHTML()) {
return;
}
@ -564,7 +564,7 @@ nsHTMLSelectOptionAccessible::GetSelectState(PRUint64* aState)
*aState = 0;
nsIContent *content = mContent;
while (content && content->Tag() != nsAccessibilityAtoms::select) {
while (content && content->Tag() != nsGkAtoms::select) {
content = content->GetParent();
}

Просмотреть файл

@ -39,7 +39,6 @@
#ifndef __nsHTMLSelectAccessible_h__
#define __nsHTMLSelectAccessible_h__
#include "nsAccessibilityAtoms.h"
#include "nsHTMLFormControlAccessible.h"
#include "nsIDOMHTMLOptionsCollection.h"
#include "nsIDOMHTMLOptionElement.h"

Просмотреть файл

@ -138,8 +138,7 @@ nsHTMLTableCellAccessible::GetAttributesInternal(nsIPersistentProperties *aAttri
nsAutoString stringIdx;
stringIdx.AppendInt(idx);
nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::tableCellIndex,
stringIdx);
nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::tableCellIndex, stringIdx);
return NS_OK;
}
@ -310,7 +309,7 @@ nsHTMLTableCellAccessible::GetHeaderCells(PRInt32 aRowOrColumnHeaderCell,
nsIArray **aHeaderCells)
{
// Get header cells from @header attribute.
IDRefsIterator iter(mContent, nsAccessibilityAtoms::headers);
IDRefsIterator iter(mContent, nsGkAtoms::headers);
nsIContent* headerCellElm = iter.NextElem();
if (headerCellElm) {
nsresult rv = NS_OK;
@ -366,9 +365,9 @@ nsHTMLTableHeaderCellAccessible::NativeRole()
{
// Check value of @scope attribute.
static nsIContent::AttrValuesArray scopeValues[] =
{&nsAccessibilityAtoms::col, &nsAccessibilityAtoms::row, nsnull};
{&nsGkAtoms::col, &nsGkAtoms::row, nsnull};
PRInt32 valueIdx =
mContent->FindAttrValueIn(kNameSpaceID_None, nsAccessibilityAtoms::scope,
mContent->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::scope,
scopeValues, eCaseMatters);
switch (valueIdx) {
@ -483,7 +482,7 @@ nsHTMLTableAccessible::GetNameInternal(nsAString& aName)
}
// If no caption then use summary as a name.
mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::summary, aName);
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::summary, aName);
return NS_OK;
}
@ -1283,7 +1282,7 @@ nsHTMLTableAccessible::Description(nsString& aDescription)
&captionText);
if (!captionText.IsEmpty()) { // summary isn't used as a name.
mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::summary,
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::summary,
aDescription);
}
}
@ -1381,7 +1380,7 @@ nsHTMLTableAccessible::IsProbablyForLayout(PRBool *aIsProbablyForLayout)
RETURN_LAYOUT_ANSWER(PR_FALSE, "Has role attribute");
}
if (mContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::role)) {
if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::role)) {
// Role attribute is present, but overridden roles have already been dealt with.
// Only landmarks and other roles that don't override the role from native
// markup are left to deal with here.
@ -1390,7 +1389,7 @@ nsHTMLTableAccessible::IsProbablyForLayout(PRBool *aIsProbablyForLayout)
// Check for legitimate data table elements or attributes
nsAutoString summary;
if ((mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::summary, summary) &&
if ((mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::summary, summary) &&
!summary.IsEmpty()) ||
HasDescendant(NS_LITERAL_STRING("caption"), PR_FALSE) ||
HasDescendant(NS_LITERAL_STRING("th")) ||

Просмотреть файл

@ -204,7 +204,7 @@ nsHTMLOutputAccessible::RelationByType(PRUint32 aType)
{
Relation rel = nsAccessibleWrap::RelationByType(aType);
if (aType == nsIAccessibleRelation::RELATION_CONTROLLED_BY)
rel.AppendIter(new IDRefsIterator(mContent, nsAccessibilityAtoms::_for));
rel.AppendIter(new IDRefsIterator(mContent, nsGkAtoms::_for));
return rel;
}
@ -221,7 +221,7 @@ nsHTMLOutputAccessible::GetAttributesInternal(nsIPersistentProperties* aAttribut
nsresult rv = nsAccessibleWrap::GetAttributesInternal(aAttributes);
NS_ENSURE_SUCCESS(rv, rv);
nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::live,
nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::live,
NS_LITERAL_STRING("polite"));
return NS_OK;

Просмотреть файл

@ -40,7 +40,6 @@
#include "nsHyperTextAccessible.h"
#include "States.h"
#include "nsAccessibilityAtoms.h"
#include "nsAccessibilityService.h"
#include "nsAccUtils.h"
#include "nsTextAttrs.h"
@ -129,39 +128,39 @@ nsHyperTextAccessible::NativeRole()
{
nsIAtom *tag = mContent->Tag();
if (tag == nsAccessibilityAtoms::form)
if (tag == nsGkAtoms::form)
return nsIAccessibleRole::ROLE_FORM;
if (tag == nsAccessibilityAtoms::blockquote ||
tag == nsAccessibilityAtoms::div ||
tag == nsAccessibilityAtoms::nav)
if (tag == nsGkAtoms::blockquote ||
tag == nsGkAtoms::div ||
tag == nsGkAtoms::nav)
return nsIAccessibleRole::ROLE_SECTION;
if (tag == nsAccessibilityAtoms::h1 ||
tag == nsAccessibilityAtoms::h2 ||
tag == nsAccessibilityAtoms::h3 ||
tag == nsAccessibilityAtoms::h4 ||
tag == nsAccessibilityAtoms::h5 ||
tag == nsAccessibilityAtoms::h6)
if (tag == nsGkAtoms::h1 ||
tag == nsGkAtoms::h2 ||
tag == nsGkAtoms::h3 ||
tag == nsGkAtoms::h4 ||
tag == nsGkAtoms::h5 ||
tag == nsGkAtoms::h6)
return nsIAccessibleRole::ROLE_HEADING;
if (tag == nsAccessibilityAtoms::article)
if (tag == nsGkAtoms::article)
return nsIAccessibleRole::ROLE_DOCUMENT;
// Deal with html landmark elements
if (tag == nsAccessibilityAtoms::header)
if (tag == nsGkAtoms::header)
return nsIAccessibleRole::ROLE_HEADER;
if (tag == nsAccessibilityAtoms::footer)
if (tag == nsGkAtoms::footer)
return nsIAccessibleRole::ROLE_FOOTER;
if (tag == nsAccessibilityAtoms::aside)
if (tag == nsGkAtoms::aside)
return nsIAccessibleRole::ROLE_NOTE;
// Treat block frames as paragraphs
nsIFrame *frame = GetFrame();
if (frame && frame->GetType() == nsAccessibilityAtoms::blockFrame &&
frame->GetContent()->Tag() != nsAccessibilityAtoms::input) {
if (frame && frame->GetType() == nsGkAtoms::blockFrame &&
frame->GetContent()->Tag() != nsGkAtoms::input) {
// An html:input @type="file" is the only input that is exposed as a
// blockframe. It must be exposed as ROLE_TEXT_CONTAINER for JAWS.
return nsIAccessibleRole::ROLE_PARAGRAPH;
@ -183,7 +182,7 @@ nsHyperTextAccessible::NativeState()
if (0 == (flags & nsIPlaintextEditor::eEditorReadonlyMask)) {
states |= states::EDITABLE;
}
} else if (mContent->Tag() == nsAccessibilityAtoms::article) {
} else if (mContent->Tag() == nsGkAtoms::article) {
// We want <article> to behave like a document in terms of readonly state.
states |= states::READONLY;
}
@ -200,7 +199,7 @@ nsIntRect nsHyperTextAccessible::GetBoundsForString(nsIFrame *aFrame, PRUint32 a
{
nsIntRect screenRect;
NS_ENSURE_TRUE(aFrame, screenRect);
if (aFrame->GetType() != nsAccessibilityAtoms::textFrame) {
if (aFrame->GetType() != nsGkAtoms::textFrame) {
// XXX fallback for non-text frames, happens for bullets right now
// but in the future bullets will have proper text frames
return aFrame->GetScreenRectExternal();
@ -338,7 +337,7 @@ nsHyperTextAccessible::GetPosAndText(PRInt32& aStartOffset, PRInt32& aEndOffset,
PRInt32 substringEndOffset = -1;
PRUint32 ourRenderedStart = 0;
PRInt32 ourContentStart = 0;
if (frame->GetType() == nsAccessibilityAtoms::textFrame) {
if (frame->GetType() == nsGkAtoms::textFrame) {
nsresult rv = frame->GetRenderedText(nsnull, &skipChars, &iter);
if (NS_SUCCEEDED(rv)) {
ourRenderedStart = iter.GetSkippedOffset();
@ -360,7 +359,7 @@ nsHyperTextAccessible::GetPosAndText(PRInt32& aStartOffset, PRInt32& aEndOffset,
// Get out the continuing text frame with this offset
PRInt32 outStartLineUnused;
PRInt32 contentOffset;
if (frame->GetType() == nsAccessibilityAtoms::textFrame) {
if (frame->GetType() == nsGkAtoms::textFrame) {
contentOffset = iter.ConvertSkippedToOriginal(startOffset) +
ourRenderedStart - ourContentStart;
}
@ -423,7 +422,7 @@ nsHyperTextAccessible::GetPosAndText(PRInt32& aStartOffset, PRInt32& aEndOffset,
if (endOffset > 0) {
if (aText) {
// XXX: should use nsIAccessible::AppendTextTo.
if (frame->GetType() == nsAccessibilityAtoms::brFrame) {
if (frame->GetType() == nsGkAtoms::brFrame) {
*aText += kForcedNewLineChar;
} else if (nsAccUtils::MustPrune(this)) {
*aText += kImaginaryEmbeddedObjectChar;
@ -609,10 +608,10 @@ nsHyperTextAccessible::DOMPointToHypertextOffset(nsINode *aNode,
if (findNode) {
nsCOMPtr<nsIContent> findContent(do_QueryInterface(findNode));
if (findContent && findContent->IsHTML() &&
findContent->NodeInfo()->Equals(nsAccessibilityAtoms::br) &&
findContent->NodeInfo()->Equals(nsGkAtoms::br) &&
findContent->AttrValueIs(kNameSpaceID_None,
nsAccessibilityAtoms::mozeditorbogusnode,
nsAccessibilityAtoms::_true,
nsGkAtoms::mozeditorbogusnode,
nsGkAtoms::_true,
eIgnoreCase)) {
// This <br> is the hacky "bogus node" used when there is no text in a control
*aHyperTextOffset = 0;
@ -801,7 +800,7 @@ nsHyperTextAccessible::GetRelativeOffset(nsIPresShell *aPresShell,
nsIFrame *frame = aFromAccessible->GetFrame();
NS_ENSURE_TRUE(frame, -1);
if (frame->GetType() == nsAccessibilityAtoms::textFrame) {
if (frame->GetType() == nsGkAtoms::textFrame) {
rv = RenderedToContentOffset(frame, aFromOffset, &contentOffset);
NS_ENSURE_SUCCESS(rv, -1);
}
@ -1166,7 +1165,7 @@ nsHyperTextAccessible::GetTextAttributes(PRBool aIncludeDefAttrs,
// Compute spelling attributes on text accessible only.
nsIFrame *offsetFrame = accAtOffset->GetFrame();
if (offsetFrame && offsetFrame->GetType() == nsAccessibilityAtoms::textFrame) {
if (offsetFrame && offsetFrame->GetType() == nsGkAtoms::textFrame) {
nsCOMPtr<nsIDOMNode> node = accAtOffset->GetDOMNode();
PRInt32 nodeOffset = 0;
@ -1210,17 +1209,17 @@ PRInt32
nsHyperTextAccessible::GetLevelInternal()
{
nsIAtom *tag = mContent->Tag();
if (tag == nsAccessibilityAtoms::h1)
if (tag == nsGkAtoms::h1)
return 1;
if (tag == nsAccessibilityAtoms::h2)
if (tag == nsGkAtoms::h2)
return 2;
if (tag == nsAccessibilityAtoms::h3)
if (tag == nsGkAtoms::h3)
return 3;
if (tag == nsAccessibilityAtoms::h4)
if (tag == nsGkAtoms::h4)
return 4;
if (tag == nsAccessibilityAtoms::h5)
if (tag == nsGkAtoms::h5)
return 5;
if (tag == nsAccessibilityAtoms::h6)
if (tag == nsGkAtoms::h6)
return 6;
return nsAccessibleWrap::GetLevelInternal();
@ -1237,7 +1236,7 @@ nsHyperTextAccessible::GetAttributesInternal(nsIPersistentProperties *aAttribute
// XXX: 'formatting' attribute is deprecated and will be removed in Mozilla2,
// use 'display' attribute instead.
nsIFrame *frame = GetFrame();
if (frame && frame->GetType() == nsAccessibilityAtoms::blockFrame) {
if (frame && frame->GetType() == nsGkAtoms::blockFrame) {
nsAutoString oldValueUnused;
aAttributes->SetStringProperty(NS_LITERAL_CSTRING("formatting"), NS_LITERAL_STRING("block"),
oldValueUnused);
@ -1248,7 +1247,7 @@ nsHyperTextAccessible::GetAttributesInternal(nsIPersistentProperties *aAttribute
if (lineNumber >= 1) {
nsAutoString strLineNumber;
strLineNumber.AppendInt(lineNumber);
nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::lineNumber,
nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::lineNumber,
strLineNumber);
}
}
@ -1257,14 +1256,14 @@ nsHyperTextAccessible::GetAttributesInternal(nsIPersistentProperties *aAttribute
// make AT navigation schemes "just work". Note html:header is redundant as
// a landmark since it usually contains headings. We're not yet sure how the
// web will use html:footer but our best bet right now is as contentinfo.
if (mContent->Tag() == nsAccessibilityAtoms::nav)
nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::xmlroles,
if (mContent->Tag() == nsGkAtoms::nav)
nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::xmlroles,
NS_LITERAL_STRING("navigation"));
else if (mContent->Tag() == nsAccessibilityAtoms::footer)
nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::xmlroles,
else if (mContent->Tag() == nsGkAtoms::footer)
nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::xmlroles,
NS_LITERAL_STRING("contentinfo"));
else if (mContent->Tag() == nsAccessibilityAtoms::aside)
nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::xmlroles,
else if (mContent->Tag() == nsGkAtoms::aside)
nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::xmlroles,
NS_LITERAL_STRING("complementary"));
return NS_OK;
@ -1360,7 +1359,7 @@ nsHyperTextAccessible::GetOffsetAtPoint(PRInt32 aX, PRInt32 aY,
nsSize frameSize = frame->GetSize();
if (pointInFrame.x < frameSize.width && pointInFrame.y < frameSize.height) {
// Finished
if (frame->GetType() == nsAccessibilityAtoms::textFrame) {
if (frame->GetType() == nsGkAtoms::textFrame) {
nsIFrame::ContentOffsets contentOffsets = frame->GetContentOffsetsFromPointExternal(pointInFrame, PR_TRUE);
if (contentOffsets.IsNull() || contentOffsets.content != content) {
return NS_OK; // Not found, will return -1
@ -2110,7 +2109,7 @@ nsresult nsHyperTextAccessible::ContentToRenderedOffset(nsIFrame *aFrame, PRInt3
*aRenderedOffset = 0;
return NS_OK;
}
NS_ASSERTION(aFrame->GetType() == nsAccessibilityAtoms::textFrame,
NS_ASSERTION(aFrame->GetType() == nsGkAtoms::textFrame,
"Need text frame for offset conversion");
NS_ASSERTION(aFrame->GetPrevContinuation() == nsnull,
"Call on primary frame only");
@ -2136,7 +2135,7 @@ nsresult nsHyperTextAccessible::RenderedToContentOffset(nsIFrame *aFrame, PRUint
*aContentOffset = 0;
NS_ENSURE_TRUE(aFrame, NS_ERROR_FAILURE);
NS_ASSERTION(aFrame->GetType() == nsAccessibilityAtoms::textFrame,
NS_ASSERTION(aFrame->GetType() == nsGkAtoms::textFrame,
"Need text frame for offset conversion");
NS_ASSERTION(aFrame->GetPrevContinuation() == nsnull,
"Call on primary frame only");
@ -2283,7 +2282,7 @@ nsHyperTextAccessible::GetDOMPointByFrameOffset(nsIFrame *aFrame,
*aNodeOffset = parent->IndexOf(content) + 1;
node = do_QueryInterface(parent);
} else if (aFrame->GetType() == nsAccessibilityAtoms::textFrame) {
} else if (aFrame->GetType() == nsGkAtoms::textFrame) {
nsCOMPtr<nsIContent> content(aFrame->GetContent());
NS_ENSURE_STATE(content);
@ -2418,7 +2417,7 @@ nsHyperTextAccessible::GetSpellTextAttribute(nsIDOMNode *aNode,
*aHTEndOffset = endHTOffset;
if (aAttributes) {
nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::invalid,
nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::invalid,
NS_LITERAL_STRING("spelling"));
}

Просмотреть файл

@ -41,7 +41,6 @@
#include "AccessibleApplication.h"
#include "ISimpleDOMNode_i.c"
#include "nsAccessibilityAtoms.h"
#include "nsAccessibilityService.h"
#include "nsApplicationAccessibleWrap.h"
#include "nsCoreUtils.h"

Просмотреть файл

@ -38,7 +38,6 @@
#include "nsAccessibleWrap.h"
#include "nsAccessibilityAtoms.h"
#include "nsAccUtils.h"
#include "nsCoreUtils.h"
#include "nsWinUtils.h"
@ -408,7 +407,7 @@ __try {
if (content->IsElement()) {
nsAutoString roleString;
if (msaaRole != ROLE_SYSTEM_CLIENT &&
!content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::role, roleString)) {
!content->GetAttr(kNameSpaceID_None, nsGkAtoms::role, roleString)) {
nsIDocument * document = content->GetCurrentDoc();
if (!document)
return E_FAIL;

Просмотреть файл

@ -36,7 +36,6 @@
* ***** END LICENSE BLOCK ***** */
#include "nsXULMenuAccessibleWrap.h"
#include "nsAccessibilityAtoms.h"
#include "nsINameSpaceManager.h"
////////////////////////////////////////////////////////////////////////////////
@ -60,7 +59,7 @@ nsXULMenuitemAccessibleWrap::GetName(nsAString& aName)
}
nsAutoString accel;
mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::acceltext, accel);
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::acceltext, accel);
if (!accel.IsEmpty()) {
aName += NS_LITERAL_STRING("\t") + accel;
}

Просмотреть файл

@ -204,7 +204,7 @@ void
nsXFormsAccessible::Description(nsString& aDescription)
{
nsTextEquivUtils::
GetTextEquivFromIDRefs(this, nsAccessibilityAtoms::aria_describedby,
GetTextEquivFromIDRefs(this, nsGkAtoms::aria_describedby,
aDescription);
if (aDescription.IsEmpty())
@ -300,7 +300,7 @@ nsXFormsSelectableAccessible::
nsXFormsEditableAccessible(aContent, aShell), mIsSelect1Element(nsnull)
{
mIsSelect1Element =
mContent->NodeInfo()->Equals(nsAccessibilityAtoms::select1);
mContent->NodeInfo()->Equals(nsGkAtoms::select1);
}
bool
@ -511,12 +511,12 @@ nsXFormsSelectableAccessible::GetItemByIndex(PRUint32* aIndex,
nsIContent* childContent = child->GetContent();
nsINodeInfo *nodeInfo = childContent->NodeInfo();
if (nodeInfo->NamespaceEquals(NS_LITERAL_STRING(NS_NAMESPACE_XFORMS))) {
if (nodeInfo->Equals(nsAccessibilityAtoms::item)) {
if (nodeInfo->Equals(nsGkAtoms::item)) {
if (!*aIndex)
return childContent;
--*aIndex;
} else if (nodeInfo->Equals(nsAccessibilityAtoms::choices)) {
} else if (nodeInfo->Equals(nsGkAtoms::choices)) {
nsIContent* itemContent = GetItemByIndex(aIndex, child);
if (itemContent)
return itemContent;
@ -582,13 +582,13 @@ nsXFormsSelectableItemAccessible::IsSelected()
continue;
nsCOMPtr<nsIDOMNode> DOMNode(do_QueryInterface(mContent));
if (nodeinfo->Equals(nsAccessibilityAtoms::select)) {
if (nodeinfo->Equals(nsGkAtoms::select)) {
PRBool isSelected = PR_FALSE;
rv = sXFormsService->IsSelectItemSelected(select, DOMNode, &isSelected);
return NS_SUCCEEDED(rv) && isSelected;
}
if (nodeinfo->Equals(nsAccessibilityAtoms::select1)) {
if (nodeinfo->Equals(nsGkAtoms::select1)) {
nsCOMPtr<nsIDOMNode> selitem;
rv = sXFormsService->GetSelectedItemForSelect1(select,
getter_AddRefs(selitem));

Просмотреть файл

@ -70,7 +70,7 @@ void
nsXFormsLabelAccessible::Description(nsString& aDescription)
{
nsTextEquivUtils::
GetTextEquivFromIDRefs(this, nsAccessibilityAtoms::aria_describedby,
GetTextEquivFromIDRefs(this, nsGkAtoms::aria_describedby,
aDescription);
}

Просмотреть файл

@ -69,7 +69,7 @@ nsXULColorPickerTileAccessible::GetValue(nsAString& aValue)
if (IsDefunct())
return NS_ERROR_FAILURE;
mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::color, aValue);
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::color, aValue);
return NS_OK;
}
@ -94,12 +94,12 @@ nsXULColorPickerTileAccessible::NativeState()
// Focused?
PRBool isFocused = mContent->HasAttr(kNameSpaceID_None,
nsAccessibilityAtoms::hover);
nsGkAtoms::hover);
if (isFocused)
states |= states::FOCUSED;
PRBool isSelected = mContent->HasAttr(kNameSpaceID_None,
nsAccessibilityAtoms::selected);
nsGkAtoms::selected);
if (isSelected)
states |= states::SELECTED;

Просмотреть файл

@ -62,8 +62,8 @@ nsXULComboboxAccessible::
PRUint32
nsXULComboboxAccessible::NativeRole()
{
if (mContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
nsAccessibilityAtoms::autocomplete, eIgnoreCase))
if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
nsGkAtoms::autocomplete, eIgnoreCase))
return nsIAccessibleRole::ROLE_AUTOCOMPLETE;
return nsIAccessibleRole::ROLE_COMBOBOX;
}
@ -138,9 +138,9 @@ nsXULComboboxAccessible::Description(nsString& aDescription)
PRBool
nsXULComboboxAccessible::GetAllowsAnonChildAccessibles()
{
if (mContent->NodeInfo()->Equals(nsAccessibilityAtoms::textbox, kNameSpaceID_XUL) ||
mContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::editable,
nsAccessibilityAtoms::_true, eIgnoreCase)) {
if (mContent->NodeInfo()->Equals(nsGkAtoms::textbox, kNameSpaceID_XUL) ||
mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::editable,
nsGkAtoms::_true, eIgnoreCase)) {
// Both the XUL <textbox type="autocomplete"> and <menulist editable="true"> widgets
// use nsXULComboboxAccessible. We need to walk the anonymous children for these
// so that the entry field is a child

Просмотреть файл

@ -39,7 +39,6 @@
#include "nsXULFormControlAccessible.h"
#include "nsAccessibilityAtoms.h"
#include "nsAccUtils.h"
#include "nsAccTreeWalker.h"
#include "nsCoreUtils.h"
@ -159,7 +158,7 @@ nsXULButtonAccessible::NativeState()
if (ContainsMenu())
state |= states::HASPOPUP;
if (mContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::_default))
if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::_default))
state |= states::DEFAULT;
return state;
@ -178,14 +177,14 @@ nsXULButtonAccessible::CacheChildren()
// XXX: no children until the button is menu button. Probably it's not
// totally correct but in general AT wants to have leaf buttons.
PRBool isMenu = mContent->AttrValueIs(kNameSpaceID_None,
nsAccessibilityAtoms::type,
nsAccessibilityAtoms::menu,
nsGkAtoms::type,
nsGkAtoms::menu,
eCaseMatters);
PRBool isMenuButton = isMenu ?
PR_FALSE :
mContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
nsAccessibilityAtoms::menuButton, eCaseMatters);
mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
nsGkAtoms::menuButton, eCaseMatters);
if (!isMenu && !isMenuButton)
return;
@ -230,10 +229,10 @@ PRBool
nsXULButtonAccessible::ContainsMenu()
{
static nsIContent::AttrValuesArray strings[] =
{&nsAccessibilityAtoms::menu, &nsAccessibilityAtoms::menuButton, nsnull};
{&nsGkAtoms::menu, &nsGkAtoms::menuButton, nsnull};
return mContent->FindAttrValueIn(kNameSpaceID_None,
nsAccessibilityAtoms::type,
nsGkAtoms::type,
strings, eCaseMatters) >= 0;
}
@ -600,9 +599,9 @@ nsXULToolbarButtonAccessible::IsSeparator(nsAccessible *aAccessible)
if (!contentDomNode)
return PR_FALSE;
return (contentDomNode->Tag() == nsAccessibilityAtoms::toolbarseparator) ||
(contentDomNode->Tag() == nsAccessibilityAtoms::toolbarspacer) ||
(contentDomNode->Tag() == nsAccessibilityAtoms::toolbarspring);
return (contentDomNode->Tag() == nsGkAtoms::toolbarseparator) ||
(contentDomNode->Tag() == nsGkAtoms::toolbarspacer) ||
(contentDomNode->Tag() == nsGkAtoms::toolbarspring);
}
@ -626,8 +625,7 @@ nsresult
nsXULToolbarAccessible::GetNameInternal(nsAString& aName)
{
nsAutoString name;
if (mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::toolbarname,
name)) {
if (mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::toolbarname, name)) {
name.CompressWhitespace();
aName = name;
}
@ -728,8 +726,8 @@ nsXULTextFieldAccessible::NativeState()
if (menuList) {
// <xul:menulist droppable="false">
if (!mContent->AttrValueIs(kNameSpaceID_None,
nsAccessibilityAtoms::editable,
nsAccessibilityAtoms::_true, eIgnoreCase)) {
nsGkAtoms::editable,
nsGkAtoms::_true, eIgnoreCase)) {
state |= states::READONLY;
}
}
@ -740,8 +738,8 @@ nsXULTextFieldAccessible::NativeState()
PRUint32
nsXULTextFieldAccessible::NativeRole()
{
if (mContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
nsAccessibilityAtoms::password, eIgnoreCase))
if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
nsGkAtoms::password, eIgnoreCase))
return nsIAccessibleRole::ROLE_PASSWORD_TEXT;
return nsIAccessibleRole::ROLE_ENTRY;
}

Просмотреть файл

@ -177,8 +177,8 @@ nsXULListboxAccessible::NativeState()
// see if we are multiple select if so set ourselves as such
if (mContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::seltype,
nsAccessibilityAtoms::multiple, eCaseMatters)) {
if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::seltype,
nsGkAtoms::multiple, eCaseMatters)) {
states |= states::MULTISELECTABLE | states::EXTSELECTABLE;
}
@ -250,7 +250,7 @@ nsXULListboxAccessible::GetColumnCount(PRInt32 *aColumnsCout)
PRUint32 count = mContent->GetChildCount();
for (PRUint32 index = 0; index < count; ++index) {
nsIContent* childContent = mContent->GetChildAt(index);
if (childContent->NodeInfo()->Equals(nsAccessibilityAtoms::listcols,
if (childContent->NodeInfo()->Equals(nsGkAtoms::listcols,
kNameSpaceID_XUL)) {
headContent = childContent;
}
@ -264,7 +264,7 @@ nsXULListboxAccessible::GetColumnCount(PRInt32 *aColumnsCout)
count = headContent->GetChildCount();
for (PRUint32 index = 0; index < count; ++index) {
nsIContent* childContent = headContent->GetChildAt(index);
if (childContent->NodeInfo()->Equals(nsAccessibilityAtoms::listcol,
if (childContent->NodeInfo()->Equals(nsGkAtoms::listcol,
kNameSpaceID_XUL)) {
columnCount++;
}
@ -834,8 +834,8 @@ nsXULListitemAccessible::
nsXULMenuitemAccessible(aContent, aShell)
{
mIsCheckbox = mContent->AttrValueIs(kNameSpaceID_None,
nsAccessibilityAtoms::type,
nsAccessibilityAtoms::checkbox,
nsGkAtoms::type,
nsGkAtoms::checkbox,
eCaseMatters);
}
@ -883,9 +883,9 @@ nsXULListitemAccessible::GetNameInternal(nsAString& aName)
{
nsIContent* child = mContent->GetChildAt(0);
if (child) {
if (child->NodeInfo()->Equals(nsAccessibilityAtoms::listcell,
if (child->NodeInfo()->Equals(nsGkAtoms::listcell,
kNameSpaceID_XUL)) {
child->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::label, aName);
child->GetAttr(kNameSpaceID_None, nsGkAtoms::label, aName);
return NS_OK;
}
}
@ -1214,7 +1214,7 @@ nsXULListCellAccessible::GetAttributesInternal(nsIPersistentProperties *aAttribu
nsAutoString stringIdx;
stringIdx.AppendInt(cellIdx);
nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::tableCellIndex,
nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::tableCellIndex,
stringIdx);
return NS_OK;

Просмотреть файл

@ -286,15 +286,13 @@ nsXULMenuitemAccessible::NativeState()
PRUint64 state = nsAccessible::NativeState();
// Focused?
if (mContent->HasAttr(kNameSpaceID_None,
nsAccessibilityAtoms::_moz_menuactive))
if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::menuactive))
state |= states::FOCUSED;
// Has Popup?
if (mContent->NodeInfo()->Equals(nsAccessibilityAtoms::menu,
kNameSpaceID_XUL)) {
if (mContent->NodeInfo()->Equals(nsGkAtoms::menu, kNameSpaceID_XUL)) {
state |= states::HASPOPUP;
if (mContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::open))
if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::open))
state |= states::EXPANDED;
else
state |= states::COLLAPSED;
@ -302,18 +300,17 @@ nsXULMenuitemAccessible::NativeState()
// Checkable/checked?
static nsIContent::AttrValuesArray strings[] =
{ &nsAccessibilityAtoms::radio, &nsAccessibilityAtoms::checkbox, nsnull };
{ &nsGkAtoms::radio, &nsGkAtoms::checkbox, nsnull };
if (mContent->FindAttrValueIn(kNameSpaceID_None,
nsAccessibilityAtoms::type,
strings, eCaseMatters) >= 0) {
if (mContent->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::type, strings,
eCaseMatters) >= 0) {
// Checkable?
state |= states::CHECKABLE;
// Checked?
if (mContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::checked,
nsAccessibilityAtoms::_true, eCaseMatters))
if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::checked,
nsGkAtoms::_true, eCaseMatters))
state |= states::CHECKED;
}
@ -373,14 +370,14 @@ nsXULMenuitemAccessible::NativeState()
nsresult
nsXULMenuitemAccessible::GetNameInternal(nsAString& aName)
{
mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::label, aName);
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::label, aName);
return NS_OK;
}
void
nsXULMenuitemAccessible::Description(nsString& aDescription)
{
mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::description,
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::description,
aDescription);
}
@ -393,7 +390,7 @@ nsXULMenuitemAccessible::AccessKey() const
// We do not use nsCoreUtils::GetAccesskeyFor() because accesskeys for
// menu are't registered by nsEventStateManager.
nsAutoString accesskey;
mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::accesskey,
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::accesskey,
accesskey);
if (accesskey.IsEmpty())
return KeyBinding();
@ -505,13 +502,13 @@ nsXULMenuitemAccessible::NativeRole()
if (mParent && mParent->Role() == nsIAccessibleRole::ROLE_COMBOBOX_LIST)
return nsIAccessibleRole::ROLE_COMBOBOX_OPTION;
if (mContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
nsAccessibilityAtoms::radio, eCaseMatters)) {
if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
nsGkAtoms::radio, eCaseMatters)) {
return nsIAccessibleRole::ROLE_RADIO_MENU_ITEM;
}
if (mContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
nsAccessibilityAtoms::checkbox,
if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
nsGkAtoms::checkbox,
eCaseMatters)) {
return nsIAccessibleRole::ROLE_CHECK_MENU_ITEM;
}
@ -633,7 +630,7 @@ nsXULMenupopupAccessible::NativeState()
#ifdef DEBUG_A11Y
// We are onscreen if our parent is active
PRBool isActive = mContent->HasAttr(kNameSpaceID_None,
nsAccessibilityAtoms::menuactive);
nsGkAtoms::menuactive);
if (!isActive) {
nsAccessible* parent = Parent();
if (!parent)
@ -643,7 +640,7 @@ nsXULMenupopupAccessible::NativeState()
NS_ENSURE_TRUE(parentContent, state);
isActive = parentContent->HasAttr(kNameSpaceID_None,
nsAccessibilityAtoms::open);
nsGkAtoms::open);
}
NS_ASSERTION(isActive || states & states::INVISIBLE,
@ -661,7 +658,7 @@ nsXULMenupopupAccessible::GetNameInternal(nsAString& aName)
{
nsIContent *content = mContent;
while (content && aName.IsEmpty()) {
content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::label, aName);
content->GetAttr(kNameSpaceID_None, nsGkAtoms::label, aName);
content = content->GetParent();
}

Просмотреть файл

@ -38,7 +38,6 @@
#include "nsXULSliderAccessible.h"
#include "nsAccessibilityAtoms.h"
#include "States.h"
#include "nsIDOMDocument.h"
@ -94,7 +93,7 @@ nsXULSliderAccessible::NativeState()
NS_IMETHODIMP
nsXULSliderAccessible::GetValue(nsAString& aValue)
{
return GetSliderAttr(nsAccessibilityAtoms::curpos, aValue);
return GetSliderAttr(nsGkAtoms::curpos, aValue);
}
PRUint8
@ -137,7 +136,7 @@ nsXULSliderAccessible::GetMaximumValue(double *aValue)
if (rv != NS_OK_NO_ARIA_VALUE)
return rv;
return GetSliderAttr(nsAccessibilityAtoms::maxpos, aValue);
return GetSliderAttr(nsGkAtoms::maxpos, aValue);
}
NS_IMETHODIMP
@ -149,7 +148,7 @@ nsXULSliderAccessible::GetMinimumValue(double *aValue)
if (rv != NS_OK_NO_ARIA_VALUE)
return rv;
return GetSliderAttr(nsAccessibilityAtoms::minpos, aValue);
return GetSliderAttr(nsGkAtoms::minpos, aValue);
}
NS_IMETHODIMP
@ -161,7 +160,7 @@ nsXULSliderAccessible::GetMinimumIncrement(double *aValue)
if (rv != NS_OK_NO_ARIA_VALUE)
return rv;
return GetSliderAttr(nsAccessibilityAtoms::increment, aValue);
return GetSliderAttr(nsGkAtoms::increment, aValue);
}
NS_IMETHODIMP
@ -173,7 +172,7 @@ nsXULSliderAccessible::GetCurrentValue(double *aValue)
if (rv != NS_OK_NO_ARIA_VALUE)
return rv;
return GetSliderAttr(nsAccessibilityAtoms::curpos, aValue);
return GetSliderAttr(nsGkAtoms::curpos, aValue);
}
NS_IMETHODIMP
@ -185,7 +184,7 @@ nsXULSliderAccessible::SetCurrentValue(double aValue)
if (rv != NS_OK_NO_ARIA_VALUE)
return rv;
return SetSliderAttr(nsAccessibilityAtoms::curpos, aValue);
return SetSliderAttr(nsGkAtoms::curpos, aValue);
}
PRBool

Просмотреть файл

@ -40,7 +40,6 @@
// NOTE: groups are alphabetically ordered
#include "nsXULTextAccessible.h"
#include "nsAccessibilityAtoms.h"
#include "nsAccUtils.h"
#include "nsBaseWidgetAccessible.h"
#include "nsCoreUtils.h"
@ -71,7 +70,7 @@ nsXULTextAccessible::GetNameInternal(nsAString& aName)
{
// if the value attr doesn't exist, the screen reader must get the accessible text
// from the accessible text interface or from the children
mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::value, aName);
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::value, aName);
return NS_OK;
}
@ -96,7 +95,7 @@ nsXULTextAccessible::RelationByType(PRUint32 aType)
if (aType == nsIAccessibleRelation::RELATION_LABEL_FOR) {
// Caption is the label for groupbox
nsIContent *parent = mContent->GetParent();
if (parent && parent->Tag() == nsAccessibilityAtoms::caption) {
if (parent && parent->Tag() == nsGkAtoms::caption) {
nsAccessible* parent = Parent();
if (parent && parent->Role() == nsIAccessibleRole::ROLE_GROUPING)
rel.AppendTarget(parent);
@ -159,14 +158,14 @@ nsXULLinkAccessible::GetValue(nsAString& aValue)
if (IsDefunct())
return NS_ERROR_FAILURE;
mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::href, aValue);
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::href, aValue);
return NS_OK;
}
nsresult
nsXULLinkAccessible::GetNameInternal(nsAString& aName)
{
mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::value, aName);
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::value, aName);
if (!aName.IsEmpty())
return NS_OK;
@ -255,7 +254,7 @@ nsXULLinkAccessible::AnchorURIAt(PRUint32 aAnchorIndex)
return nsnull;
nsAutoString href;
mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::href, href);
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::href, href);
nsCOMPtr<nsIURI> baseURI = mContent->GetBaseURI();
nsIDocument* document = mContent->GetOwnerDoc();

Просмотреть файл

@ -1183,14 +1183,14 @@ nsXULTreeGridCellAccessible::GetAttributesInternal(nsIPersistentProperties *aAtt
nsAutoString stringIdx;
stringIdx.AppendInt(cellIdx);
nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::tableCellIndex,
nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::tableCellIndex,
stringIdx);
// "cycles" attribute
PRBool isCycler = PR_FALSE;
nsresult rv = mColumn->GetCycler(&isCycler);
if (NS_SUCCEEDED(rv) && isCycler)
nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::cycles,
nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::cycles,
NS_LITERAL_STRING("true"));
return NS_OK;
@ -1339,12 +1339,12 @@ nsXULTreeGridCellAccessible::IsEditable() const
nsCOMPtr<nsIContent> columnContent(do_QueryInterface(columnElm));
if (!columnContent->AttrValueIs(kNameSpaceID_None,
nsAccessibilityAtoms::editable,
nsAccessibilityAtoms::_true,
nsGkAtoms::editable,
nsGkAtoms::_true,
eCaseMatters))
return PR_FALSE;
return mContent->AttrValueIs(kNameSpaceID_None,
nsAccessibilityAtoms::editable,
nsAccessibilityAtoms::_true, eCaseMatters);
nsGkAtoms::editable,
nsGkAtoms::_true, eCaseMatters);
}

Просмотреть файл

@ -35,10 +35,6 @@
new invokerChecker(EVENT_FOCUS, getAccessible, this.linkNode)
];
this.unexpectedEventSeq = [
new invokerChecker(EVENT_REORDER, this.linkNode.parentNode)
];
this.invoke = function focusAnchor_invoke()
{
this.linkNode.focus();
@ -46,8 +42,8 @@
this.check = function focusAnchor_check(aEvent)
{
is(this.link, aEvent.accessible,
"The link accessible shouldn't be recreated!");
todo_is(this.link, aEvent.accessible,
"Focus should be fired against new link accessible!");
}
this.getID = function focusAnchor_getID()
@ -65,10 +61,6 @@
new invokerChecker(EVENT_FOCUS, getAccessible, this.linkNode)
];
this.unexpectedEventSeq = [
new invokerChecker(EVENT_REORDER, this.linkNode.parentNode)
];
this.invoke = function tabAnchor_invoke()
{
synthesizeKey("VK_TAB", { shiftKey: false });
@ -76,8 +68,8 @@
this.check = function tabAnchor_check(aEvent)
{
is(this.link, aEvent.accessible,
"The link accessible shouldn't be recreated!");
todo_is(this.link, aEvent.accessible,
"Focus should be fired against new link accessible!");
}
this.getID = function tabAnchor_getID()
@ -126,9 +118,9 @@
Mozilla Bug 570275
</a><br>
<a target="_blank"
title="Don't recreate frames for inlines with overflow style applied"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=606087">
Mozilla Bug 606087
title="Text control frames should accept dynamic changes to the CSS overflow property"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=686247">
Mozilla Bug 686247
</a><br>
<p id="display"></p>

Просмотреть файл

@ -85,8 +85,6 @@ ifdef MOZ_APP_PROFILE
DEFINES += -DMOZ_APP_PROFILE="$(MOZ_APP_PROFILE)"
endif
LIBS += $(JEMALLOC_LIBS)
ifdef LIBXUL_SDK
include $(topsrcdir)/config/rules.mk
else

Просмотреть файл

@ -308,7 +308,7 @@ pref("browser.urlbar.trimURLs", true);
// the Content-Disposition filename) before giving up and falling back to
// picking a filename without that info in hand so that the user sees some
// feedback from their action.
pref("browser.download.saveLinkAsFilenameTimeout", 1000);
pref("browser.download.saveLinkAsFilenameTimeout", 4000);
pref("browser.download.useDownloadDir", true);

Просмотреть файл

@ -36,6 +36,7 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include <windows.h>
#include "nsNativeAppSupportWin.h"
@ -49,37 +50,3 @@ STRINGTABLE DISCARDABLE
BEGIN
IDS_STARTMENU_APPNAME, "@MOZ_APP_DISPLAYNAME@"
END
#ifdef MOZ_STATIC_BUILD
// XXX This code is copied from resource.h and widget.rc. It's a work-around
// for the limitation that only one resource file can be used in an .exe. We
// should develop a method, for static builds only, to combine multiple .rc
// files into a single .rc file, and then use that to build the single .res
// file for the .exe.
#define IDC_GRAB 4101
#define IDC_GRABBING 4102
#define IDC_CELL 4103
#define IDC_COPY 4104
#define IDC_ALIAS 4105
#define IDC_ZOOMIN 4106
#define IDC_ZOOMOUT 4107
#define IDC_COLRESIZE 4108
#define IDC_ROWRESIZE 4109
#define IDC_VERTICALTEXT 4110
#define IDC_NONE 4112
IDC_GRAB CURSOR DISCARDABLE "../../widget/src/build/res/grab.cur"
IDC_GRABBING CURSOR DISCARDABLE "../../widget/src/build/res/grabbing.cur"
IDC_CELL CURSOR DISCARDABLE "../../widget/src/build/res/cell.cur"
IDC_COPY CURSOR DISCARDABLE "../../widget/src/build/res/copy.cur"
IDC_ALIAS CURSOR DISCARDABLE "../../widget/src/build/res/aliasb.cur"
IDC_ZOOMIN CURSOR DISCARDABLE "../../widget/src/build/res/zoom_in.cur"
IDC_ZOOMOUT CURSOR DISCARDABLE "../../widget/src/build/res/zoom_out.cur"
IDC_COLRESIZE CURSOR DISCARDABLE "../../widget/src/build/res/col_resize.cur"
IDC_ROWRESIZE CURSOR DISCARDABLE "../../widget/src/build/res/row_resize.cur"
IDC_VERTICALTEXT CURSOR DISCARDABLE "../../widget/src/build/res/vertical_text.cur"
IDC_NONE CURSOR DISCARDABLE "../../widget/src/build/res/none.cur"
#endif

Просмотреть файл

@ -37,6 +37,7 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include <os2.h>
// Splash screen dialog ID.
@ -55,24 +56,3 @@ BEGIN
END
//BITMAP IDB_SPLASH "splash.bmp"
#ifdef MOZ_STATIC_BUILD
#include "wdgtos2rc.h"
POINTER IDC_SELECTANCHOR "..\\..\\widget\\src\\os2\\res\\select.ptr"
POINTER IDC_GRAB "..\\..\\widget\\src\\os2\\res\\grab.ptr"
POINTER IDC_GRABBING "..\\..\\widget\\src\\os2\\res\\grabbing.ptr"
POINTER IDC_CELL "..\\..\\widget\\src\\os2\\res\\cell.ptr"
POINTER IDC_COPY "..\\..\\widget\\src\\os2\\res\\copy.ptr"
POINTER IDC_ALIAS "..\\..\\widget\\src\\os2\\res\\aliasb.ptr"
POINTER IDC_ZOOMIN "..\\..\\widget\\src\\os2\\res\\zoom_in.ptr"
POINTER IDC_ZOOMOUT "..\\..\\widget\\src\\os2\\res\\zoom_out.ptr"
POINTER IDC_ARROWWAIT "..\\..\\widget\\src\\os2\\res\\arrow_wait.ptr"
POINTER IDC_CROSS "..\\..\\widget\\src\\os2\\res\\crosshair.ptr"
POINTER IDC_HELP "..\\..\\widget\\src\\os2\\res\\help.ptr"
POINTER IDC_NONE "..\\..\\widget\\src\\os2\\res\\none.ptr"
ICON IDC_DNDURL "..\\..\\widget\\src\\os2\\res\\dndurl.ico"
ICON IDC_DNDTEXT "..\\..\\widget\\src\\os2\\res\\dndtext.ico"
#endif

Просмотреть файл

@ -321,10 +321,8 @@ nsContextMenu.prototype = {
var onMisspelling = InlineSpellCheckerUI.overMisspelling;
this.showItem("spell-check-enabled", canSpell);
this.showItem("spell-separator", canSpell || this.onEditableArea);
if (canSpell) {
document.getElementById("spell-check-enabled")
.setAttribute("checked", InlineSpellCheckerUI.enabled);
}
document.getElementById("spell-check-enabled")
.setAttribute("checked", canSpell && InlineSpellCheckerUI.enabled);
this.showItem("spell-add-to-dictionary", onMisspelling);

Просмотреть файл

@ -138,7 +138,9 @@ function initRow(aPartId)
var checkbox = document.getElementById(aPartId + "Def");
var command = document.getElementById("cmd_" + aPartId + "Toggle");
var perm = permissionManager.testPermission(gPermURI, aPartId);
// Geolocation permission consumers use testExactPermission, not testPermission.
var perm = aPartId == "geo" ? permissionManager.testExactPermission(gPermURI, aPartId) :
permissionManager.testPermission(gPermURI, aPartId);
if (perm) {
checkbox.checked = false;
command.removeAttribute("disabled");

Просмотреть файл

@ -565,6 +565,8 @@
this.mTab.removeAttribute("busy");
this.mTab.removeAttribute("progress");
if (!this.mTab.selected)
this.mTab.setAttribute("unread", "true");
var location = aRequest.QueryInterface(nsIChannel).URI;
@ -871,6 +873,7 @@
(window.windowState != window.STATE_MINIMIZED);
this.mCurrentBrowser = newBrowser;
this.mCurrentTab = this.selectedTab;
this.mCurrentTab.removeAttribute("unread");
this.showTab(this.mCurrentTab);
if (updatePageReport)
@ -3676,13 +3679,10 @@
<body><![CDATA[
if (tab.parentNode != this)
return;
tab._fullyOpen = true;
this.adjustTabstrip();
if (tab._fullyOpen)
return;
tab._fullyOpen = true;
if (tab.getAttribute("selected") == "true") {
this._fillTrailingGap();
this._handleTabSelect();
@ -3724,10 +3724,14 @@
var tab = event.target;
if (tab.getAttribute("fadein") == "true")
this._handleNewTab(tab);
else if (tab.closing)
if (tab.getAttribute("fadein") == "true") {
if (tab._fullyOpen)
this.adjustTabstrip();
else
this._handleNewTab(tab);
} else if (tab.closing) {
this.tabbrowser._endRemoveTab(tab);
}
]]></handler>
<handler event="dblclick"><![CDATA[

Просмотреть файл

@ -122,6 +122,7 @@ function GroupItem(listOfEls, options) {
this.isDragging = false;
$container
.css({zIndex: -100})
.attr("data-id", this.id)
.appendTo("body");
// ___ Resizer
@ -919,6 +920,7 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
this.$undoContainer = iQ("<div/>")
.addClass("undo")
.attr("type", "button")
.attr("data-group-id", this.id)
.appendTo("body");
iQ("<span/>")
.text(tabviewString("groupItem.undoCloseGroup"))
@ -1050,6 +1052,7 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
item.addSubscriber("close", this._onChildClose);
item.setParent(this);
$el.attr("data-group-id", this.id);
if (typeof item.setResizable == 'function')
item.setResizable(false, options.immediately);
@ -1135,6 +1138,7 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
this._activeTab = null;
}
$el[0].removeAttribute("data-group-id");
item.setParent(null);
item.removeClass("stacked");
item.isStacked = false;

Просмотреть файл

@ -45,9 +45,7 @@
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@mozalloc@DLL_SUFFIX@
#ifdef MOZ_MEMORY_DARWIN
@BINPATH@/@DLL_PREFIX@jemalloc@DLL_SUFFIX@
#endif
@BINPATH@/@DLL_PREFIX@mozutils@DLL_SUFFIX@
#ifdef XP_MACOSX
@BINPATH@/XUL
#else
@ -60,9 +58,6 @@
@BINPATH@/@MOZ_CHILD_PROCESS_NAME@
#endif
#ifdef XP_WIN32
#ifdef MOZ_MEMORY
@BINPATH@/jemalloc.dll
#endif
#if _MSC_VER == 1400
@BINPATH@/Microsoft.VC80.CRT.manifest
@BINPATH@/msvcm80.dll

Просмотреть файл

@ -9,6 +9,7 @@
@DLL_PREFIX@xpcom_compat@DLL_SUFFIX@
@DLL_PREFIX@xpistub@DLL_SUFFIX@
@DLL_PREFIX@zlib@DLL_SUFFIX@
@DLL_PREFIX@jemalloc@DLL_SUFFIX@
#ifdef MOZ_STATIC_JS
@DLL_PREFIX@mozjs@DLL_SUFFIX@
#endif
@ -1258,7 +1259,6 @@ xpicleanup@BIN_SUFFIX@
dictionaries/PL.dic
icons/mozicon16.xpm
icons/mozicon50.xpm
libjemalloc.so
plugins/libnullplugin.so
readme.txt
#endif

Просмотреть файл

@ -296,7 +296,7 @@ can reach it easily. -->
<!ENTITY appMenuSafeMode.accesskey "R">
<!ENTITY openCmd.commandkey "l">
<!ENTITY urlbar.placeholder "Go to a Web Site">
<!ENTITY urlbar.placeholder "Go to a Website">
<!ENTITY urlbar.accesskey "d">
<!ENTITY urlbar.switchToTab.label "Switch to tab:">
@ -492,7 +492,7 @@ you can use these alternative items. Otherwise, their values should be empty. -
<!ENTITY pageStylePersistentOnly.label "Basic Page Style">
<!ENTITY pageStylePersistentOnly.accesskey "b">
<!ENTITY pageReportIcon.tooltip "Change pop-up blocking settings for this web site">
<!ENTITY pageReportIcon.tooltip "Change pop-up blocking settings for this website">
<!ENTITY allowPopups.accesskey "p">
<!-- On Windows we use the term "Options" to describe settings, but
@ -524,7 +524,7 @@ you can use these alternative items. Otherwise, their values should be empty. -
<!ENTITY editBookmark.cancel.label "Cancel">
<!ENTITY editBookmark.removeBookmark.accessKey "R">
<!ENTITY identity.unverifiedsite2 "This web site does not supply identity information.">
<!ENTITY identity.unverifiedsite2 "This website does not supply identity information.">
<!ENTITY identity.connectedTo "You are connected to">
<!-- Localization note (identity.runBy) : This string appears between a
domain name (above) and an organization name (below). E.g.

Просмотреть файл

@ -205,11 +205,11 @@ identity.identified.verifier=Verified by: %S
identity.identified.verified_by_you=You have added a security exception for this site.
identity.identified.state_and_country=%S, %S
identity.encrypted=Your connection to this web site is encrypted to prevent eavesdropping.
identity.unencrypted=Your connection to this web site is not encrypted.
identity.encrypted=Your connection to this website is encrypted to prevent eavesdropping.
identity.unencrypted=Your connection to this website is not encrypted.
identity.mixed_content=Your connection to this site is only partially encrypted, and does not prevent eavesdropping.
identity.unknown.tooltip=This web site does not supply identity information.
identity.unknown.tooltip=This website does not supply identity information.
identity.ownerUnknown2=(unknown)

Просмотреть файл

@ -111,17 +111,17 @@
<!ENTITY securityView.unknown "Unknown">
<!ENTITY securityView.identity.header "Web Site Identity">
<!ENTITY securityView.identity.header "Website Identity">
<!ENTITY securityView.identity.owner "Owner:">
<!ENTITY securityView.identity.domain "Web site:">
<!ENTITY securityView.identity.domain "Website:">
<!ENTITY securityView.identity.verifier "Verified by:">
<!ENTITY securityView.privacy.header "Privacy &amp; History">
<!ENTITY securityView.privacy.history "Have I visited this web site prior to today?">
<!ENTITY securityView.privacy.cookies "Is this web site storing information (cookies) on my computer?">
<!ENTITY securityView.privacy.history "Have I visited this website prior to today?">
<!ENTITY securityView.privacy.cookies "Is this website storing information (cookies) on my computer?">
<!ENTITY securityView.privacy.viewCookies "View Cookies">
<!ENTITY securityView.privacy.viewCookies.accessKey "k">
<!ENTITY securityView.privacy.passwords "Have I saved any passwords for this web site?">
<!ENTITY securityView.privacy.passwords "Have I saved any passwords for this website?">
<!ENTITY securityView.privacy.viewPasswords "View Saved Passwords">
<!ENTITY securityView.privacy.viewPasswords.accessKey "w">

Просмотреть файл

@ -70,13 +70,13 @@ generalStrictMode=Standards compliance mode
generalSize=%S KB (%S bytes)
generalMetaTag=Meta (1 tag)
generalMetaTags=Meta (%S tags)
generalSiteIdentity=This web site is owned by %S\nThis has been verified by %S
generalSiteIdentity=This website is owned by %S\nThis has been verified by %S
feedRss=RSS
feedAtom=Atom
feedXML=XML
securityNoOwner=This web site does not supply ownership information.
securityNoOwner=This website does not supply ownership information.
securityOneVisit=Yes, once
securityNVisits=Yes, %S times
@ -85,4 +85,4 @@ securityNVisits=Yes, %S times
# e.g. indexedDBUsage : "50.23 MB"
# %1$S = size (in bytes or megabytes, ...)
# %2$S = unit of measure (bytes, KB, MB, ...)
indexedDBUsage=This web site is using %1$S %2$S
indexedDBUsage=This website is using %1$S %2$S

Просмотреть файл

@ -1,5 +1,5 @@
# LOCALIZATION NOTE (visitCount): #1 is the number of history visits for a site
visitCount=#1 visit;#1 visits
passwordsCount=#1 password is stored for this web site.;#1 passwords are stored for this web site.
cookiesCount=#1 cookie is set for this web site.;#1 cookies are set for this web site.
passwordsCount=#1 password is stored for this website.;#1 passwords are stored for this website.
cookiesCount=#1 cookie is set for this website.;#1 cookies are set for this website.

Просмотреть файл

@ -8,7 +8,7 @@
<!ENTITY useCursorNavigation.accesskey "c">
<!ENTITY searchStartTyping.label "Search for text when I start typing">
<!ENTITY searchStartTyping.accesskey "x">
<!ENTITY blockAutoRefresh.label "Warn me when web sites try to redirect or reload the page">
<!ENTITY blockAutoRefresh.label "Warn me when websites try to redirect or reload the page">
<!ENTITY blockAutoRefresh.accesskey "b">
<!ENTITY browsing.label "Browsing">

Просмотреть файл

@ -7,7 +7,7 @@
<!ENTITY removepermission.accesskey "R">
<!ENTITY removeallpermissions.label "Remove All Sites">
<!ENTITY removeallpermissions.accesskey "e">
<!ENTITY address.label "Address of web site:">
<!ENTITY address.label "Address of website:">
<!ENTITY address.accesskey "d">
<!ENTITY block.label "Block">
<!ENTITY block.accesskey "B">

Просмотреть файл

@ -11,13 +11,13 @@ labelDefaultFont=Default (%S)
#### Permissions Manager
cookiepermissionstext=You can specify which web sites are always or never allowed to use cookies. Type the exact address of the site you want to manage and then click Block, Allow for Session, or Allow.
cookiepermissionstext=You can specify which websites are always or never allowed to use cookies. Type the exact address of the site you want to manage and then click Block, Allow for Session, or Allow.
cookiepermissionstitle=Exceptions - Cookies
addonspermissionstext=You can specify which web sites are allowed to install add-ons. Type the exact address of the site you want to allow and then click Allow.
addonspermissionstext=You can specify which websites are allowed to install add-ons. Type the exact address of the site you want to allow and then click Allow.
addons_permissions_title=Allowed Sites - Add-ons Installation
popuppermissionstext=You can specify which web sites are allowed to open pop-up windows. Type the exact address of the site you want to allow and then click Allow.
popuppermissionstext=You can specify which websites are allowed to open pop-up windows. Type the exact address of the site you want to allow and then click Allow.
popuppermissionstitle=Allowed Sites - Pop-ups
imagepermissionstext=You can specify which web sites are allowed to load images. Type the exact address of the site you want to manage and then click Block or Allow.
imagepermissionstext=You can specify which websites are allowed to load images. Type the exact address of the site you want to manage and then click Block or Allow.
imagepermissionstitle=Exceptions - Images
invalidURI=Please enter a valid hostname
invalidURITitle=Invalid Hostname Entered

Просмотреть файл

@ -1,6 +1,6 @@
<!ENTITY tracking.label "Tracking">
<!ENTITY doNotTrack.label "Tell web sites I do not want to be tracked">
<!ENTITY doNotTrack.label "Tell websites I do not want to be tracked">
<!ENTITY doNotTrack.accesskey "d">
<!ENTITY history.label "History">
@ -42,7 +42,7 @@
<!ENTITY historyHeader.custom.label "Use custom settings for history">
<!ENTITY historyHeader.post.label "">
<!ENTITY rememberDescription.label "&brandShortName; will remember your browsing, download, form and search history, and keep cookies from Web sites you visit.">
<!ENTITY rememberDescription.label "&brandShortName; will remember your browsing, download, form and search history, and keep cookies from websites you visit.">
<!-- LOCALIZATION NOTE (rememberActions.pre.label): include a trailing space as needed -->
<!-- LOCALIZATION NOTE (rememberActions.middle.label): include a starting and trailing space as needed -->

Просмотреть файл

@ -61,7 +61,7 @@ externalProtocolUnknown=<Unknown>
externalProtocolChkMsg=Remember my choice for all links of this type.
externalProtocolLaunchBtn=Launch application
malwareBlocked=The site at %S has been reported as an attack site and has been blocked based on your security preferences.
phishingBlocked=The web site at %S has been reported as a web forgery designed to trick users into sharing personal or financial information.
phishingBlocked=The website at %S has been reported as a web forgery designed to trick users into sharing personal or financial information.
cspFrameAncestorBlocked=This page has a content security policy that prevents it from being embedded in this way.
corruptedContentError=The page you are trying to view cannot be shown because an error in the data transmission was detected.
remoteXUL=This page uses an unsupported technology that is no longer available by default in Firefox.

Просмотреть файл

@ -126,7 +126,7 @@
<!ENTITY nssFailure2.longDesc "
<ul>
<li>The page you are trying to view can not be shown because the authenticity of the received data could not be verified.</li>
<li>Please contact the web site owners to inform them of this problem. Alternatively, use the command found in the help menu to report this broken site.</li>
<li>Please contact the website owners to inform them of this problem. Alternatively, use the command found in the help menu to report this broken site.</li>
</ul>
">
@ -154,7 +154,7 @@ be temporary, and you can try again later.</li>
<!ENTITY malwareBlocked.title "Suspected Attack Site!">
<!ENTITY malwareBlocked.longDesc "
<p>Attack sites try to install programs that steal private information, use your computer to attack others, or damage your system.</p>
<p>Web site owners who believe their site has been reported as an attack site in error may <a href='http://www.stopbadware.org/home/reviewinfo' >request a review</a>.</p>
<p>Website owners who believe their site has been reported as an attack site in error may <a href='http://www.stopbadware.org/home/reviewinfo' >request a review</a>.</p>
">
<!ENTITY phishingBlocked.title "Suspected Web Forgery!">

Просмотреть файл

@ -687,7 +687,7 @@ menuitem.bookmark-item {
-moz-linear-gradient(rgba(251,252,253,.95), rgba(246,247,248,.47) 49%,
rgba(231,232,233,.45) 51%, rgba(225,226,229,.3));
background-clip: padding-box;
border-radius: 3.5px;
border-radius: 2.5px;
border: 1px solid;
border-color: rgba(0,0,0,.12) rgba(0,0,0,.19) rgba(0,0,0,.38);
box-shadow: 0 0 0 1px rgba(255,255,255,.3) inset,
@ -1195,7 +1195,7 @@ toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
padding: 2px;
background-clip: padding-box;
border: 1px solid ThreeDShadow;
border-radius: 3.5px;
border-radius: 2.5px;
}
@media all and (-moz-windows-default-theme) {
@ -1282,13 +1282,13 @@ html|*.urlbar-input:-moz-lwtheme:-moz-placeholder,
}
#identity-box:-moz-locale-dir(ltr) {
border-top-left-radius: 2.5px;
border-bottom-left-radius: 2.5px;
border-top-left-radius: 1.5px;
border-bottom-left-radius: 1.5px;
}
#identity-box:-moz-locale-dir(rtl) {
border-top-right-radius: 2.5px;
border-bottom-right-radius: 2.5px;
border-top-right-radius: 1.5px;
border-bottom-right-radius: 1.5px;
}
#identity-box:hover {
@ -1500,13 +1500,13 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
}
#urlbar:-moz-locale-dir(ltr) > toolbarbutton {
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
border-top-right-radius: 1.5px;
border-bottom-right-radius: 1.5px;
}
#urlbar:-moz-locale-dir(rtl) > toolbarbutton {
border-top-left-radius: 2px;
border-bottom-left-radius: 2px;
border-top-left-radius: 1.5px;
border-bottom-left-radius: 1.5px;
}
#urlbar > toolbarbutton:not([disabled]):active:hover,

Просмотреть файл

@ -69,17 +69,17 @@ abspath() {
}
if [ -n "$MOZCONFIG" ] && ! [ -f "$MOZCONFIG" ]; then
echo "Specified MOZCONFIG \"$MOZCONFIG\" does not exist!"
echo "Specified MOZCONFIG \"$MOZCONFIG\" does not exist!" 1>&2
exit 1
fi
if [ -n "$MOZ_MYCONFIG" ]; then
echo "Your environment currently has the MOZ_MYCONFIG variable set to \"$MOZ_MYCONFIG\". MOZ_MYCONFIG is no longer supported. Please use MOZCONFIG instead."
echo "Your environment currently has the MOZ_MYCONFIG variable set to \"$MOZ_MYCONFIG\". MOZ_MYCONFIG is no longer supported. Please use MOZCONFIG instead." 1>&2
exit 1
fi
if [ -z "$MOZCONFIG" ] && [ -f "$topsrcdir/.mozconfig" ] && [ -f "$topsrcdir/mozconfig" ]; then
echo "Both \$topsrcdir/.mozconfig and \$topsrcdir/mozconfig are supported, but you must choose only one. Please remove the other."
echo "Both \$topsrcdir/.mozconfig and \$topsrcdir/mozconfig are supported, but you must choose only one. Please remove the other." 1>&2
exit 1
fi
@ -103,7 +103,7 @@ for _config in "$topsrcdir/mozconfig.sh" \
"$HOME/.mozmyconfig.sh"
do
if test -f "$_config"; then
echo "You currently have a mozconfig at \"$_config\". This implicit location is no longer supported. Please move it to $topsrcdir/.mozconfig or specify it explicitly via \$MOZCONFIG.";
echo "You currently have a mozconfig at \"$_config\". This implicit location is no longer supported. Please move it to $topsrcdir/.mozconfig or specify it explicitly via \$MOZCONFIG." 1>&2
exit 1
fi
done

Просмотреть файл

@ -22,6 +22,7 @@
#
# Contributor(s):
# Stephen Lamm <slamm@netscape.com>
# Siddharth Agarwal <sagarwal@mozilla.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
@ -92,20 +93,32 @@ opts=""
trap "rm -f $tmp_file; exit 1" 1 2 15
MOZCONFIG=`$scriptdir/mozconfig-find $topsrcdir`
print_header > $tmp_file
# If the path changes, configure should be rerun
echo "# PATH=$PATH" >> $tmp_file
if [ "$MOZCONFIG" ]
then
. "$MOZCONFIG"
# If FOUND_MOZCONFIG isn't set, look for it and make sure the script doesn't error out
isfoundset=${FOUND_MOZCONFIG+yes}
if [ -z $isfoundset ]; then
FOUND_MOZCONFIG=`$scriptdir/mozconfig-find $topsrcdir`
if [ $? -ne 0 ]; then
echo '$(error Fix above errors before continuing.)' >> $tmp_file
else
isfoundset=yes
fi
fi
if [ "$opts" ]; then
mk_echo_options
if [ -n $isfoundset ]; then
if [ "$FOUND_MOZCONFIG" ]
then
. "$FOUND_MOZCONFIG"
fi
echo "export FOUND_MOZCONFIG := $FOUND_MOZCONFIG" >> $tmp_file
if [ "$opts" ]; then
mk_echo_options
fi
fi
if test -f $out_file && cmp -s $tmp_file $out_file; then

Просмотреть файл

@ -22,6 +22,7 @@
#
# Contributor(s):
# Stephen Lamm <slamm@netscape.com>
# Siddharth Agarwal <sagarwal@mozilla.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
@ -113,14 +114,24 @@ do
ac_options="$ac_options \"$_opt\""
done
MOZCONFIG=`$_AUTOCONF_TOOLS_DIR/mozconfig-find $topsrcdir`
if [ "$MOZCONFIG" ]; then
. "$MOZCONFIG"
# If FOUND_MOZCONFIG isn't set, look for it and make sure the script doesn't error out
isfoundset=${FOUND_MOZCONFIG+yes}
if [ -z $isfoundset ]; then
FOUND_MOZCONFIG=`$_AUTOCONF_TOOLS_DIR/mozconfig-find $topsrcdir`
if [ $? -ne 0 ]; then
echo "Fix above errors before continuing." 1>&2
exit 1
fi
fi
if [ "$FOUND_MOZCONFIG" ]; then
. "$FOUND_MOZCONFIG"
fi
export FOUND_MOZCONFIG
if [ "$mozconfig_ac_options" ]; then
ac_echo_options 1>&2
fi
eval "set -- $mozconfig_ac_options $ac_options"

Просмотреть файл

@ -62,6 +62,8 @@ CPPSRCS = crashinject.cpp
endif # ENABLE_TESTS
MOZ_UTILS_LDFLAGS =
include $(topsrcdir)/config/rules.mk
ifdef WIN32_REDIST_DIR

Просмотреть файл

@ -50,4 +50,6 @@ USE_STATIC_LIBS = 1
CPPSRCS = crashinjectdll.cpp
MOZ_UTILS_LDFLAGS =
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -51,4 +51,6 @@ USE_STATIC_LIBS = 1
CPPSRCS = $(LIBRARY_NAME).cpp
MOZ_UTILS_LDFLAGS =
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -197,7 +197,6 @@ RM = rm -f
MOZ_UI_LOCALE = @MOZ_UI_LOCALE@
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS = @MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS@
MOZ_JEMALLOC_STANDALONE_GLUE_LDOPTS = @MOZ_JEMALLOC_STANDALONE_GLUE_LDOPTS@
MOZ_COMPONENT_NSPR_LIBS=@MOZ_COMPONENT_NSPR_LIBS@
MOZ_FIX_LINK_PATHS=@MOZ_FIX_LINK_PATHS@
@ -547,6 +546,7 @@ MOZ_ENABLE_QMSYSTEM2 = @MOZ_ENABLE_QMSYSTEM2@
MOZ_ENABLE_QTMOBILITY = @MOZ_ENABLE_QTMOBILITY@
MOZ_ENABLE_CONTENTACTION = @MOZ_ENABLE_CONTENTACTION@
MOZ_ENABLE_MEEGOTOUCHSHARE = @MOZ_ENABLE_MEEGOTOUCHSHARE@
MOZ_ENABLE_CONTENTMANAGER = @MOZ_ENABLE_CONTENTMANAGER@
MOZ_DBUS_CFLAGS = @MOZ_DBUS_CFLAGS@
MOZ_DBUS_LIBS = @MOZ_DBUS_LIBS@
@ -629,13 +629,12 @@ MOZ_TOOLS_DIR = @MOZ_TOOLS_DIR@
MOZ_QUANTIFY = @MOZ_QUANTIFY@
MSMANIFEST_TOOL = @MSMANIFEST_TOOL@
WIN32_REDIST_DIR = @WIN32_REDIST_DIR@
MOZ_MEMORY_LDFLAGS = @MOZ_MEMORY_LDFLAGS@
MOZ_UTILS_LDFLAGS = @MOZ_UTILS_LDFLAGS@
MOZ_UTILS_PROGRAM_LDFLAGS = @MOZ_UTILS_PROGRAM_LDFLAGS@
WIN32_CRT_LIBS = @WIN32_CRT_LIBS@
# This is for custom CRT building
ifdef MOZ_MEMORY
# This is used to pass jemalloc flags to NSS
DLLFLAGS = @DLLFLAGS@
endif
# Codesighs tools option, enables win32 mapfiles.
MOZ_MAPINFO = @MOZ_MAPINFO@

Просмотреть файл

@ -149,17 +149,6 @@ FINAL_LINK_COMP_NAMES = $(DEPTH)/config/final-link-comp-names
MOZ_UNICHARUTIL_LIBS = $(LIBXUL_DIST)/lib/$(LIB_PREFIX)unicharutil_s.$(LIB_SUFFIX)
MOZ_WIDGET_SUPPORT_LIBS = $(DIST)/lib/$(LIB_PREFIX)widgetsupport_s.$(LIB_SUFFIX)
ifdef MOZ_MEMORY
ifneq ($(OS_ARCH),WINNT)
JEMALLOC_LIBS = $(MKSHLIB_FORCE_ALL) $(call EXPAND_MOZLIBNAME,jemalloc) $(MKSHLIB_UNFORCE_ALL)
# If we are linking jemalloc into a program, we want the jemalloc symbols
# to be exported
ifneq (,$(SIMPLE_PROGRAMS)$(PROGRAM))
JEMALLOC_LIBS += $(MOZ_JEMALLOC_STANDALONE_GLUE_LDOPTS)
endif
endif
endif
CC := $(CC_WRAPPER) $(CC)
CXX := $(CXX_WRAPPER) $(CXX)
MKDIR ?= mkdir
@ -247,13 +236,17 @@ endif # MOZ_DEBUG
# We don't build a static CRT when building a custom CRT,
# it appears to be broken. So don't link to jemalloc if
# the Makefile wants static CRT linking.
ifeq ($(MOZ_MEMORY)_$(USE_STATIC_LIBS),1_)
ifeq ($(MOZ_MEMORY)_$(USE_STATIC_LIBS),1_1)
# Disable default CRT libs and add the right lib path for the linker
OS_LDFLAGS += $(MOZ_MEMORY_LDFLAGS)
MOZ_UTILS_LDFLAGS=
endif
endif # WINNT && !GNU_CC
ifndef MOZ_UTILS_PROGRAM_LDFLAGS
MOZ_UTILS_PROGRAM_LDFLAGS=$(MOZ_UTILS_LDFLAGS)
endif
#
# Build using PIC by default
#

Просмотреть файл

@ -250,12 +250,12 @@ endif # ENABLE_TESTS
ifndef LIBRARY
ifdef STATIC_LIBRARY_NAME
_LIBRARY := $(LIB_PREFIX)$(STATIC_LIBRARY_NAME).$(LIB_SUFFIX)
REAL_LIBRARY := $(LIB_PREFIX)$(STATIC_LIBRARY_NAME).$(LIB_SUFFIX)
# Only build actual library if it is installed in DIST/lib or SDK
ifeq (,$(SDK_LIBRARY)$(DIST_INSTALL)$(NO_EXPAND_LIBS))
LIBRARY := $(_LIBRARY).$(LIBS_DESC_SUFFIX)
LIBRARY := $(REAL_LIBRARY).$(LIBS_DESC_SUFFIX)
else
LIBRARY := $(_LIBRARY) $(_LIBRARY).$(LIBS_DESC_SUFFIX)
LIBRARY := $(REAL_LIBRARY) $(REAL_LIBRARY).$(LIBS_DESC_SUFFIX)
endif
endif # STATIC_LIBRARY_NAME
endif # LIBRARY
@ -875,7 +875,7 @@ alltags:
$(PROGRAM): $(PROGOBJS) $(LIBS_DEPS) $(EXTRA_DEPS) $(EXE_DEF_FILE) $(RESFILE) $(GLOBAL_DEPS)
@$(RM) $@.manifest
ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
$(EXPAND_LD) -NOLOGO -OUT:$@ -PDB:$(LINK_PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
$(EXPAND_LD) -NOLOGO -OUT:$@ -PDB:$(LINK_PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
ifdef MSMANIFEST_TOOL
@if test -f $@.manifest; then \
if test -f "$(srcdir)/$@.manifest"; then \
@ -897,10 +897,10 @@ ifdef MOZ_PROFILE_GENERATE
endif
else # !WINNT || GNU_CC
ifeq ($(CPP_PROG_LINK),1)
$(EXPAND_CCC) -o $@ $(CXXFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
$(EXPAND_CCC) -o $@ $(CXXFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
@$(call CHECK_STDCXX,$@)
else # ! CPP_PROG_LINK
$(EXPAND_CC) -o $@ $(CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
$(EXPAND_CC) -o $@ $(CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
endif # CPP_PROG_LINK
endif # WINNT && !GNU_CC
@ -946,7 +946,7 @@ endif
#
$(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(LIBS_DEPS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
$(EXPAND_LD) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
$(EXPAND_LD) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
ifdef MSMANIFEST_TOOL
@if test -f $@.manifest; then \
mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
@ -955,10 +955,10 @@ ifdef MSMANIFEST_TOOL
endif # MSVC with manifest tool
else
ifeq ($(CPP_PROG_LINK),1)
$(EXPAND_CCC) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS)
$(EXPAND_CCC) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS)
@$(call CHECK_STDCXX,$@)
else
$(EXPAND_CC) $(CFLAGS) $(OUTOPTION)$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS)
$(EXPAND_CC) $(CFLAGS) $(OUTOPTION)$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS)
endif # CPP_PROG_LINK
endif # WINNT && !GNU_CC
@ -1016,6 +1016,8 @@ $(filter %.$(LIB_SUFFIX),$(LIBRARY)): $(OBJS) $(LOBJS) $(SHARED_LIBRARY_LIBS_DEP
$(RANLIB) $@
$(filter-out %.$(LIB_SUFFIX),$(LIBRARY)): $(filter %.$(LIB_SUFFIX),$(LIBRARY)) $(OBJS) $(LOBJS) $(SHARED_LIBRARY_LIBS_DEPS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
# When we only build a library descriptor, blow out any existing library
$(if $(filter %.$(LIB_SUFFIX),$(LIBRARY)),,$(RM) $(REAL_LIBRARY) $(EXPORT_LIBRARY:%=%/$(REAL_LIBRARY)))
$(EXPAND_LIBS_GEN) $(OBJS) $(LOBJS) $(SHARED_LIBRARY_LIBS) > $@
ifeq ($(OS_ARCH),WINNT)
@ -1069,10 +1071,10 @@ ifdef DTRACE_LIB_DEPENDENT
ifndef XP_MACOSX
dtrace -G -C -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(shell $(EXPAND_LIBS) $(MOZILLA_PROBE_LIBS))
endif
$(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(DTRACE_PROBE_OBJ) $(MOZILLA_PROBE_LIBS) $(RESFILE) $(LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
$(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(DTRACE_PROBE_OBJ) $(MOZILLA_PROBE_LIBS) $(RESFILE) $(LDFLAGS) $(MOZ_UTILS_LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
@$(RM) $(DTRACE_PROBE_OBJ)
else # ! DTRACE_LIB_DEPENDENT
$(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(RESFILE) $(LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
$(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(RESFILE) $(LDFLAGS) $(MOZ_UTILS_LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
endif # DTRACE_LIB_DEPENDENT
@$(call CHECK_STDCXX,$@)

Просмотреть файл

@ -1020,6 +1020,14 @@ proxy.h
#if MOZ_PLATFORM_MAEMO==6
contentaction/contentaction.h
#endif
#ifdef MOZ_ENABLE_CONTENTMANAGER
SelectSingleContentItemPage.h
SelectMultipleContentItemsPage.h
QtSparql/qsparqlconnection.h
QtSparql/qsparqlquery.h
QtSparql/qsparqlresult.h
#endif
#if MOZ_TREE_PIXMAN!=1
pixman.h
#endif

Просмотреть файл

@ -295,6 +295,28 @@ case "$target" in
if test -z "$android_sdk" ; then
AC_MSG_ERROR([You must specify --with-android-sdk=/path/to/sdk when targeting Android.])
else
if ! test -e "$android_sdk"/source.properties ; then
AC_MSG_ERROR([The path in --with-android-sdk isn't valid (source.properties hasn't been found).])
fi
# Minimum Android SDK API Level we require.
android_min_api_level=13
# Get the api level from "$android_sdk"/source.properties.
android_api_level=`$AWK -F = '$1 == "AndroidVersion.ApiLevel" {print $2}' "$android_sdk"/source.properties`
if test -z "$android_api_level" ; then
AC_MSG_ERROR([Unexpected error: no AndroidVersion.ApiLevel field has been found in source.properties.])
fi
if ! test "$android_api_level" -eq "$android_api_level" ; then
AC_MSG_ERROR([Unexpected error: the found android api value isn't a number! (found $android_api_level)])
fi
if test $android_api_level -lt $android_min_api_level ; then
AC_MSG_ERROR([The given Android SDK provides API level $android_api_level ($android_min_api_level or higher required).])
fi
fi
android_platform_tools="$android_sdk"/../../platform-tools
@ -1352,36 +1374,9 @@ solaris*)
BSD_386)
HOST_OS_ARCH=BSD
;;
dgux)
HOST_OS_ARCH=DGUX
;;
UNIX_SV)
if "`cat /etc/bcheckrc | grep -c NCR 2>/dev/null`" != "0"; then
HOST_OS_ARCH=NCR
else
HOST_OS_ARCH=UNIXWARE
fi
;;
ncr)
HOST_OS_ARCH=NCR
;;
UNIX_SYSTEM_V)
HOST_OS_ARCH=NEC
;;
OSF1)
;;
OS_2)
HOST_OS_ARCH=OS2
;;
SCO_SV)
HOST_OS_ARCH=SCOOS
;;
SINIX-N | SINIX-Y | SINIX-Z |ReliantUNIX-M)
HOST_OS_ARCH=SINIX
;;
UnixWare)
HOST_OS_ARCH=UNIXWARE
;;
esac
case "$OS_ARCH" in
@ -1423,53 +1418,11 @@ AIX)
BSD_386)
OS_ARCH=BSD
;;
dgux)
OS_ARCH=DGUX
;;
UNIX_SV)
if "`cat /etc/bcheckrc | grep -c NCR 2>/dev/null`" != "0"; then
OS_ARCH=NCR
else
OS_ARCH=UNIXWARE
OS_RELEASE=`uname -v`
fi
;;
ncr)
OS_ARCH=NCR
;;
UNIX_SYSTEM_V)
OS_ARCH=NEC
;;
OSF1)
case `uname -v` in
148)
OS_RELEASE=V3.2C
;;
564)
OS_RELEASE=V4.0B
;;
878)
OS_RELEASE=V4.0D
;;
esac
;;
OS_2)
OS_ARCH=OS2
OS_TARGET=OS2
OS_RELEASE=`uname -v`
;;
SCO_SV)
OS_ARCH=SCOOS
OS_RELEASE=5.0
;;
SINIX-N | SINIX-Y | SINIX-Z |ReliantUNIX-M)
OS_ARCH=SINIX
OS_TEST=`uname -p`
;;
UnixWare)
OS_ARCH=UNIXWARE
OS_RELEASE=`uname -v`
;;
Darwin)
case "${target_cpu}" in
powerpc*)
@ -1490,12 +1443,6 @@ Darwin)
;;
esac
if test "$OS_ARCH" = "NCR"; then
changequote(,)
OS_RELEASE=`awk '{print $3}' /etc/.relid | sed 's/^\([0-9]\)\(.\)\(..\)\(.*\)$/\2.\3/'`
changequote([,])
fi
# Only set CPU_ARCH if we recognize the value of OS_TEST
case "$OS_TEST" in
@ -1951,12 +1898,6 @@ case "$host" in
MOZ_FIX_LINK_PATHS=
;;
*-osf*)
HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
HOST_NSPR_MDCPUCFG='\"md/_osf1.cfg\"'
HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}"
;;
*)
HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}"
@ -2518,42 +2459,6 @@ ia64*-hpux*)
fi
;;
alpha*-*-osf*)
if test "$GNU_CC"; then
MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$@ -o $@'
MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$@ -o $@'
else
MOZ_DEBUG_FLAGS='-g'
ASFLAGS='-I$(topsrcdir)/xpcom/reflect/xptcall/public -g'
CFLAGS="$CFLAGS -ieee"
CXXFLAGS="$CXXFLAGS "'-noexceptions -ieee -ptr $(DIST)/cxx_repository'
DSO_LDOPTS='-shared -msym -expect_unresolved \* -update_registry $(DIST)/so_locations'
DSO_CFLAGS=
DSO_PIC_CFLAGS=
MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -soname $@ -o $@'
MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -soname $@ -o $@'
MKSHLIB_FORCE_ALL='-all'
MKSHLIB_UNFORCE_ALL='-none'
dnl Might fix the libxpcom.so breakage on this platform as well....
AC_DEFINE(NSCAP_DISABLE_TEST_DONTQUERY_CASES)
AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES)
fi
if test -z "$GNU_CXX"; then
COMPAQ_CXX=1
fi
AC_DEFINE(NEED_USLEEP_PROTOTYPE)
;;
*-sco*)
AC_DEFINE(NSCAP_DISABLE_TEST_DONTQUERY_CASES)
AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES)
CXXFLAGS="$CXXFLAGS -I/usr/include/CC"
if test ! "$GNU_CC"; then
DSO_LDOPTS='-G'
fi
;;
*-solaris*)
AC_DEFINE(SOLARIS)
TARGET_NSPR_MDCPUCFG='\"md/_solaris.cfg\"'
@ -2653,10 +2558,6 @@ alpha*-*-osf*)
esac
;;
*-sysv4.2uw7*)
NSPR_LIBS="-lnspr$NSPR_VERSION -lplc$NSPR_VERSION -lplds$NSPR_VERSION -L/usr/ccs/lib -lcrt"
;;
*-os2*)
HOST_NSPR_MDCPUCFG='\"md/_os2.cfg\"'
;;
@ -2702,7 +2603,6 @@ dnl ========================================================
case "$target" in
*-linux*|*-kfreebsd*-gnu|*-gnu*)
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
MOZ_JEMALLOC_STANDALONE_GLUE_LDOPTS='-rdynamic -Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/jemalloc-standalone-linkage-version-script'
;;
*-solaris*)
if test -z "$GNU_CC"; then
@ -2715,9 +2615,6 @@ case "$target" in
fi
fi
;;
*-nto*)
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
;;
*-darwin*)
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,-exported_symbols_list -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-export-list'
;;
@ -3485,10 +3382,6 @@ then
AC_DEFINE(_REENTRANT)
;;
*-*-nto*)
AC_DEFINE(_REENTRANT)
;;
*-aix4.3*|*-aix5*)
AC_DEFINE(_REENTRANT)
;;
@ -3497,10 +3390,6 @@ then
AC_DEFINE(_REENTRANT)
;;
alpha*-*-osf*)
AC_DEFINE(_REENTRANT)
;;
*-*-solaris*)
AC_DEFINE(_REENTRANT)
if test "$SOLARIS_SUNPRO_CC"; then
@ -6499,6 +6388,20 @@ if test $MOZ_PLATFORM_MAEMO; then
fi
if test $MOZ_PLATFORM_MAEMO = 6; then
PKG_CHECK_MODULES(LIBCONTENTMANAGER, ContentManager QtSparql,
_LIB_FOUND=1,
_LIB_FOUND=)
if test "$_LIB_FOUND"; then
MOZ_PLATFORM_MAEMO_LIBS="$MOZ_PLATFORM_MAEMO_LIBS $LIBCONTENTMANAGER_LIBS"
MOZ_PLATFORM_MAEMO_CFLAGS="$MOZ_PLATFORM_MAEMO_CFLAGS $LIBCONTENTMANAGER_CFLAGS"
MOZ_ENABLE_CONTENTMANAGER=1
AC_DEFINE(MOZ_ENABLE_CONTENTMANAGER)
else
AC_MSG_WARN([Cannot find libcontentmanager and or QtSparql building for Maemo 6])
fi
AC_SUBST(MOZ_ENABLE_CONTENTMANAGER)
dnl ========================================================
dnl = Enable meego libcontentaction
dnl ========================================================
@ -7070,6 +6973,21 @@ if test "$NS_TRACE_MALLOC"; then
MOZ_MEMORY=
fi
if test "${OS_TARGET}" = "Android"; then
dnl On Android, we use WRAP_LDFLAGS to link everything to mozutils
:
elif test "${OS_TARGET}" = "WINNT" -o "${OS_TARGET}" = "Darwin" -o "${OS_TARGET}" = "OS2"; then
dnl On Windows, OSX and OS2, we want to link all our binaries against mozutils
MOZ_UTILS_LDFLAGS='$(call EXPAND_LIBNAME_PATH,mozutils,$(LIBXUL_DIST)/lib)'
else
dnl On other Unix systems, we only want to link executables against mozutils
MOZ_UTILS_PROGRAM_LDFLAGS='$(MKSHLIB_FORCE_ALL) $(call EXPAND_LIBNAME_PATH,mozutils,$(LIBXUL_DIST)/lib) $(MKSHLIB_UNFORCE_ALL)'
if test -n "$GNU_CC"; then
dnl And we need mozutils symbols to be exported.
MOZ_UTILS_PROGRAM_LDFLAGS="$MOZ_UTILS_PROGRAM_LDFLAGS -rdynamic"
fi
fi
if test -z "$MOZ_MEMORY"; then
case "${target}" in
*-mingw*)
@ -7119,6 +7037,7 @@ else
AC_DEFINE(MOZ_MEMORY_LINUX)
AC_DEFINE(MOZ_MEMORY_ANDROID)
_WRAP_MALLOC=1
MOZ_UTILS_LDFLAGS=
;;
*-*linux*)
AC_DEFINE(MOZ_MEMORY_LINUX)
@ -7140,14 +7059,12 @@ else
WIN32_CRTDLL_FULLPATH=`lib -nologo -list $WIN32_CRT_LIBS | grep crtdll\\.obj`
lib -NOLOGO -OUT:crtdll.obj $WIN32_CRT_LIBS -EXTRACT:$WIN32_CRTDLL_FULLPATH
if grep -q '__imp__\{0,1\}free' crtdll.obj; then
MOZ_MEMORY_LDFLAGS='-LIBPATH:$(DIST)/lib -NODEFAULTLIB:msvcrt -NODEFAULTLIB:msvcrtd -NODEFAULTLIB:msvcprt -NODEFAULTLIB:msvcprtd -DEFAULTLIB:mozcrt'
else
MOZ_MEMORY_LDFLAGS='$(DIST)/../memory/jemalloc/jemalloc.lib'
MOZ_UTILS_LDFLAGS='-LIBPATH:$(DIST)/lib -NODEFAULTLIB:msvcrt -NODEFAULTLIB:msvcrtd -NODEFAULTLIB:msvcprt -NODEFAULTLIB:msvcprtd -DEFAULTLIB:mozcrt'
fi
rm crtdll.obj
dnl Also pass this to NSPR/NSS
DLLFLAGS="$DLLFLAGS $MOZ_MEMORY_LDFLAGS"
DLLFLAGS="$DLLFLAGS $MOZ_UTILS_LDFLAGS"
export DLLFLAGS
;;
*)
@ -7163,7 +7080,8 @@ else
AC_DEFINE(HAVE_JEMALLOC_MEMALIGN)
fi # MOZ_MEMORY
AC_SUBST(MOZ_MEMORY)
AC_SUBST(MOZ_MEMORY_LDFLAGS)
AC_SUBST(MOZ_UTILS_LDFLAGS)
AC_SUBST(MOZ_UTILS_PROGRAM_LDFLAGS)
AC_SUBST(WIN32_CRT_LIBS)
dnl Need to set this for make because NSS doesn't have configure
AC_SUBST(DLLFLAGS)
@ -7786,13 +7704,7 @@ fi
AC_SUBST(_MOZ_EXCEPTIONS_FLAGS_ON)
# OSF native compilers do not like exception declarations
# when exceptions are disabled
if test -n "$COMPAQ_CXX" -o -n "$VACPP"; then
AC_DEFINE(CPP_THROW_NEW, [])
else
AC_DEFINE(CPP_THROW_NEW, [throw()])
fi
AC_DEFINE(CPP_THROW_NEW, [throw()])
AC_LANG_C
dnl ========================================================
@ -8578,7 +8490,6 @@ AC_SUBST(USE_ELF_DYNSTR_GC)
AC_SUBST(USE_ELF_HACK)
AC_SUBST(INCREMENTAL_LINKER)
AC_SUBST(MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS)
AC_SUBST(MOZ_JEMALLOC_STANDALONE_GLUE_LDOPTS)
AC_SUBST(MOZ_COMPONENT_NSPR_LIBS)
AC_SUBST(MOZ_FIX_LINK_PATHS)
@ -9152,8 +9063,11 @@ ac_configure_args="$ac_configure_args --prefix=$dist"
ac_configure_args="$ac_configure_args --with-sync-build-files=$_topsrcdir"
if test "$MOZ_MEMORY"; then
ac_configure_args="$ac_configure_args --enable-jemalloc"
if test -n "$MOZ_MEMORY_LDFLAGS"; then
export MOZ_MEMORY_LDFLAGS
if test -n "$MOZ_UTILS_LDFLAGS"; then
export MOZ_UTILS_LDFLAGS
fi
if test -n "$MOZ_UTILS_PROGRAM_LDFLAGS"; then
export MOZ_UTILS_PROGRAM_LDFLAGS
fi
fi
export MOZ_APP_NAME

Просмотреть файл

@ -205,7 +205,6 @@ INCLUDES += \
-I$(topsrcdir)/js/src/xpconnect/src \
-I$(topsrcdir)/caps/include \
-I$(topsrcdir)/netwerk/base/src \
-I$(topsrcdir)/xpcom/ds \
$(NULL)
DEFINES += -D_IMPL_NS_LAYOUT

Просмотреть файл

@ -100,7 +100,7 @@
#include "nsIDOMTouchEvent.h"
#include "nsIInlineEventHandlers.h"
#include "nsDataHashtable.h"
#include "TimeStamp.h"
#include "mozilla/TimeStamp.h"
#define XML_DECLARATION_BITS_DECLARATION_EXISTS (1 << 0)
#define XML_DECLARATION_BITS_ENCODING_EXISTS (1 << 1)

Просмотреть файл

@ -1899,3 +1899,80 @@ GK_ATOM(_moz_maemo_classic, "-moz-maemo-classic")
GK_ATOM(_moz_menubar_drag, "-moz-menubar-drag")
GK_ATOM(_moz_device_pixel_ratio, "-moz-device-pixel-ratio")
GK_ATOM(_moz_device_orientation, "-moz-device-orientation")
#ifdef ACCESSIBILITY
GK_ATOM(anonid, "anonid")
GK_ATOM(aria_activedescendant, "aria-activedescendant")
GK_ATOM(aria_atomic, "aria-atomic")
GK_ATOM(aria_autocomplete, "aria-autocomplete")
GK_ATOM(aria_busy, "aria-busy")
GK_ATOM(aria_checked, "aria-checked")
GK_ATOM(aria_controls, "aria-controls")
GK_ATOM(aria_describedby, "aria-describedby")
GK_ATOM(aria_disabled, "aria-disabled")
GK_ATOM(aria_dropeffect, "aria-dropeffect")
GK_ATOM(aria_expanded, "aria-expanded")
GK_ATOM(aria_flowto, "aria-flowto")
GK_ATOM(aria_grabbed, "aria-grabbed")
GK_ATOM(aria_haspopup, "aria-haspopup")
GK_ATOM(aria_hidden, "aria-hidden")
GK_ATOM(aria_invalid, "aria-invalid")
GK_ATOM(aria_label, "aria-label")
GK_ATOM(aria_labelledby, "aria-labelledby")
GK_ATOM(aria_level, "aria-level")
GK_ATOM(aria_live, "aria-live")
GK_ATOM(aria_multiline, "aria-multiline")
GK_ATOM(aria_multiselectable, "aria-multiselectable")
GK_ATOM(aria_orientation, "aria-orientation")
GK_ATOM(aria_owns, "aria-owns")
GK_ATOM(aria_posinset, "aria-posinset")
GK_ATOM(aria_pressed, "aria-pressed")
GK_ATOM(aria_readonly, "aria-readonly")
GK_ATOM(aria_relevant, "aria-relevant")
GK_ATOM(aria_required, "aria-required")
GK_ATOM(aria_selected, "aria-selected")
GK_ATOM(aria_setsize, "aria-setsize")
GK_ATOM(aria_sort, "aria-sort")
GK_ATOM(aria_valuenow, "aria-valuenow")
GK_ATOM(aria_valuemin, "aria-valuemin")
GK_ATOM(aria_valuemax, "aria-valuemax")
GK_ATOM(aria_valuetext, "aria-valuetext")
GK_ATOM(AreaFrame, "AreaFrame")
GK_ATOM(backgroundColor, "background-color")
GK_ATOM(checkable, "checkable")
GK_ATOM(choices, "choices")
GK_ATOM(containerAtomic, "container-atomic")
GK_ATOM(containerBusy, "container-busy")
GK_ATOM(containerLive, "container-live")
GK_ATOM(containerLiveRole, "container-live-role")
GK_ATOM(containerRelevant, "container-relevant")
GK_ATOM(cycles, "cycles")
GK_ATOM(droppable, "droppable")
GK_ATOM(eventFromInput, "event-from-input")
GK_ATOM(InlineBlockFrame, "InlineBlockFrame")
GK_ATOM(invalid, "invalid")
GK_ATOM(item, "item")
GK_ATOM(itemset, "itemset")
GK_ATOM(language, "language")
GK_ATOM(lineNumber, "line-number")
GK_ATOM(linkedPanel, "linkedpanel")
GK_ATOM(live, "live")
GK_ATOM(mixed, "mixed")
GK_ATOM(multiline, "multiline")
GK_ATOM(password, "password")
GK_ATOM(posinset, "posinset")
GK_ATOM(select1, "select1")
GK_ATOM(setsize, "setsize")
GK_ATOM(tableCellIndex, "table-cell-index")
GK_ATOM(textAlign, "text-align")
GK_ATOM(textIndent, "text-indent")
GK_ATOM(textLineThroughStyle, "text-line-through-style")
GK_ATOM(textPosition, "text-position")
GK_ATOM(textUnderlineStyle, "text-underline-style")
GK_ATOM(toolbarname, "toolbarname")
GK_ATOM(toolbarseparator, "toolbarseparator")
GK_ATOM(toolbarspacer, "toolbarspacer")
GK_ATOM(toolbarspring, "toolbarspring")
GK_ATOM(_undefined, "undefined")
GK_ATOM(xmlroles, "xml-roles")
#endif

Просмотреть файл

@ -4098,11 +4098,12 @@ nsCanvasRenderingContext2DAzure::GetImageData_explicit(PRInt32 x, PRInt32 y, PRU
PRUint8 *src = aData;
PRUint32 srcStride = w * 4;
RefPtr<DataSourceSurface> readback;
if (!srcReadRect.IsEmpty()) {
RefPtr<SourceSurface> snapshot = mTarget->Snapshot();
RefPtr<DataSourceSurface> readback = snapshot->GetDataSurface();
readback = snapshot->GetDataSurface();
srcStride = readback->Stride();
src = readback->GetData() + srcReadRect.y * srcStride + srcReadRect.x * 4;

Просмотреть файл

@ -1058,6 +1058,9 @@ nsTextEditorState::BindToFrame(nsTextControlFrame* aFrame)
nsIContent *rootNode = GetRootNode();
nsresult rv = InitializeRootNode();
NS_ENSURE_SUCCESS(rv, rv);
nsIPresShell *shell = mBoundFrame->PresContext()->GetPresShell();
NS_ENSURE_TRUE(shell, NS_ERROR_FAILURE);
@ -1545,6 +1548,17 @@ nsTextEditorState::CreateRootNode()
NOT_FROM_PARSER);
NS_ENSURE_SUCCESS(rv, rv);
if (!IsSingleLineTextControl()) {
mMutationObserver = new nsAnonDivObserver(this);
mRootNode->AddMutationObserver(mMutationObserver);
}
return rv;
}
nsresult
nsTextEditorState::InitializeRootNode()
{
// Set the necessary classes on the text control. We use class values
// instead of a 'style' attribute so that the style comes from a user-agent
// style sheet and is still applied even if author styles are disabled.
@ -1564,19 +1578,12 @@ nsTextEditorState::CreateRootNode()
disp->mOverflowX != NS_STYLE_OVERFLOW_CLIP) {
classValue.AppendLiteral(" inherit-overflow");
}
mMutationObserver = new nsAnonDivObserver(this);
NS_ENSURE_TRUE(mMutationObserver, NS_ERROR_OUT_OF_MEMORY);
mRootNode->AddMutationObserver(mMutationObserver);
}
rv = mRootNode->SetAttr(kNameSpaceID_None, nsGkAtoms::_class,
classValue, PR_FALSE);
nsresult rv = mRootNode->SetAttr(kNameSpaceID_None, nsGkAtoms::_class,
classValue, PR_FALSE);
NS_ENSURE_SUCCESS(rv, rv);
rv = mBoundFrame->UpdateValueDisplay(PR_FALSE);
NS_ENSURE_SUCCESS(rv, rv);
return rv;
return mBoundFrame->UpdateValueDisplay(PR_FALSE);
}
nsresult

Просмотреть файл

@ -253,6 +253,8 @@ private:
void DestroyEditor();
void Clear();
nsresult InitializeRootNode();
void FinishedRestoringSelection() { mRestoringSelection = nsnull; }
class InitializationGuard {

Просмотреть файл

@ -141,17 +141,17 @@ PRBool SamplesToUsecs(PRInt64 aSamples, PRUint32 aRate, PRInt64& aOutUsecs);
PRBool UsecsToSamples(PRInt64 aUsecs, PRUint32 aRate, PRInt64& aOutSamples);
// Number of microseconds per second. 1e6.
#define USECS_PER_S 1000000
static const PRInt64 USECS_PER_S = 1000000;
// Number of microseconds per millisecond.
#define USECS_PER_MS 1000
static const PRInt64 USECS_PER_MS = 1000;
// The maximum height and width of the video. Used for
// sanitizing the memory allocation of the RGB buffer.
// The maximum resolution we anticipate encountering in the
// wild is 2160p - 3840x2160 pixels.
#define MAX_VIDEO_WIDTH 4000
#define MAX_VIDEO_HEIGHT 3000
static const PRInt32 MAX_VIDEO_WIDTH = 4000;
static const PRInt32 MAX_VIDEO_HEIGHT = 3000;
// Scales the display rect aDisplay by aspect ratio aAspectRatio.
// Note that aDisplay must be validated by nsVideoInfo::ValidateVideoRegion()

Просмотреть файл

@ -41,7 +41,7 @@
#include "nsAudioAvailableEventManager.h"
#include "VideoUtils.h"
#define MAX_PENDING_EVENTS 100
static const nsTArray< nsCOMPtr<nsIRunnable> >::size_type MAX_PENDING_EVENTS = 100;
using namespace mozilla;

Просмотреть файл

@ -78,7 +78,7 @@ using mozilla::TimeStamp;
PRLogModuleInfo* gAudioStreamLog = nsnull;
#endif
#define FAKE_BUFFER_SIZE 176400
static const PRUint32 FAKE_BUFFER_SIZE = 176400;
class nsAudioStreamLocal : public nsAudioStream
{

Просмотреть файл

@ -59,7 +59,7 @@ extern PRLogModuleInfo* gBuiltinDecoderLog;
// Wait this number of seconds when buffering, then leave and play
// as best as we can if the required amount of data hasn't been
// retrieved.
#define BUFFERING_WAIT 30
static const PRUint32 BUFFERING_WAIT = 30;
// The amount of data to retrieve during buffering is computed based
// on the download rate. BUFFERING_MIN_RATE is the minimum download

Просмотреть файл

@ -57,10 +57,10 @@
using namespace mozilla;
// Number of milliseconds between progress events as defined by spec
#define PROGRESS_MS 350
static const PRUint32 PROGRESS_MS = 350;
// Number of milliseconds of no data before a stall event is fired as defined by spec
#define STALL_MS 3000
static const PRUint32 STALL_MS = 3000;
// Number of estimated seconds worth of data we need to have buffered
// ahead of the current playback position before we allow the media decoder
@ -68,7 +68,7 @@ using namespace mozilla;
// catching up with the download. Having this margin make the
// nsMediaDecoder::CanPlayThrough() calculation more stable in the case of
// fluctuating bitrates.
#define CAN_PLAY_THROUGH_MARGIN 10
static const PRInt64 CAN_PLAY_THROUGH_MARGIN = 10;
nsMediaDecoder::nsMediaDecoder() :
mElement(0),

Просмотреть файл

@ -59,12 +59,12 @@ class nsTimeRanges;
// The size to use for audio data frames in MozAudioAvailable events.
// This value is per channel, and is chosen to give ~43 fps of events,
// for example, 44100 with 2 channels, 2*1024 = 2048.
#define FRAMEBUFFER_LENGTH_PER_CHANNEL 1024
static const PRUint32 FRAMEBUFFER_LENGTH_PER_CHANNEL = 1024;
// The total size of the framebuffer used for MozAudioAvailable events
// has to be within the following range.
#define FRAMEBUFFER_LENGTH_MIN 512
#define FRAMEBUFFER_LENGTH_MAX 16384
static const PRUint32 FRAMEBUFFER_LENGTH_MIN = 512;
static const PRUint32 FRAMEBUFFER_LENGTH_MAX = 16384;
// All methods of nsMediaDecoder must be called from the main thread only
// with the exception of GetImageContainer, SetVideoData and GetStatistics,

Просмотреть файл

@ -62,8 +62,8 @@
#include "mozilla/Util.h" // for DebugOnly
#include "nsContentUtils.h"
#define HTTP_OK_CODE 200
#define HTTP_PARTIAL_RESPONSE_CODE 206
static const PRUint32 HTTP_OK_CODE = 200;
static const PRUint32 HTTP_PARTIAL_RESPONSE_CODE = 206;
using namespace mozilla;

Просмотреть файл

@ -51,9 +51,9 @@
// For HTTP seeking, if number of bytes needing to be
// seeked forward is less than this value then a read is
// done rather than a byte range request.
#define SEEK_VS_READ_THRESHOLD (32*1024)
static const PRInt64 SEEK_VS_READ_THRESHOLD = 32*1024;
#define HTTP_REQUESTED_RANGE_NOT_SATISFIABLE_CODE 416
static const PRUint32 HTTP_REQUESTED_RANGE_NOT_SATISFIABLE_CODE = 416;
class nsMediaDecoder;

Просмотреть файл

@ -773,34 +773,34 @@ nsSkeletonState::~nsSkeletonState()
// http://wiki.xiph.org/Ogg_Skeleton_4
// Minimum length in bytes of a Skeleton header packet.
#define SKELETON_MIN_HEADER_LEN 28
#define SKELETON_4_0_MIN_HEADER_LEN 80
static const long SKELETON_MIN_HEADER_LEN = 28;
static const long SKELETON_4_0_MIN_HEADER_LEN = 80;
// Minimum length in bytes of a Skeleton 4.0 index packet.
#define SKELETON_4_0_MIN_INDEX_LEN 42
static const long SKELETON_4_0_MIN_INDEX_LEN = 42;
// Minimum possible size of a compressed index keypoint.
#define MIN_KEY_POINT_SIZE 2
static const size_t MIN_KEY_POINT_SIZE = 2;
// Byte offset of the major and minor version numbers in the
// Ogg Skeleton 4.0 header packet.
#define SKELETON_VERSION_MAJOR_OFFSET 8
#define SKELETON_VERSION_MINOR_OFFSET 10
static const size_t SKELETON_VERSION_MAJOR_OFFSET = 8;
static const size_t SKELETON_VERSION_MINOR_OFFSET = 10;
// Byte-offsets of the presentation time numerator and denominator
#define SKELETON_PRESENTATION_TIME_NUMERATOR_OFFSET 12
#define SKELETON_PRESENTATION_TIME_DENOMINATOR_OFFSET 20
static const size_t SKELETON_PRESENTATION_TIME_NUMERATOR_OFFSET = 12;
static const size_t SKELETON_PRESENTATION_TIME_DENOMINATOR_OFFSET = 20;
// Byte-offsets of the length of file field in the Skeleton 4.0 header packet.
#define SKELETON_FILE_LENGTH_OFFSET 64
static const size_t SKELETON_FILE_LENGTH_OFFSET = 64;
// Byte-offsets of the fields in the Skeleton index packet.
#define INDEX_SERIALNO_OFFSET 6
#define INDEX_NUM_KEYPOINTS_OFFSET 10
#define INDEX_TIME_DENOM_OFFSET 18
#define INDEX_FIRST_NUMER_OFFSET 26
#define INDEX_LAST_NUMER_OFFSET 34
#define INDEX_KEYPOINT_OFFSET 42
static const size_t INDEX_SERIALNO_OFFSET = 6;
static const size_t INDEX_NUM_KEYPOINTS_OFFSET = 10;
static const size_t INDEX_TIME_DENOM_OFFSET = 18;
static const size_t INDEX_FIRST_NUMER_OFFSET = 26;
static const size_t INDEX_LAST_NUMER_OFFSET = 34;
static const size_t INDEX_KEYPOINT_OFFSET = 42;
static PRBool IsSkeletonBOS(ogg_packet* aPacket)
{

Просмотреть файл

@ -63,20 +63,13 @@ extern PRLogModuleInfo* gBuiltinDecoderLog;
#define SEEK_LOG(type, msg)
#endif
// If we don't have a Theora video stream, then during seeking, if a seek
// target is less than SEEK_DECODE_MARGIN ahead of the current playback
// position, we'll just decode forwards rather than performing a bisection
// search. If we have Theora video we use the maximum keyframe interval as
// this value, rather than SEEK_DECODE_MARGIN. This makes small seeks faster.
#define SEEK_DECODE_MARGIN 2000000
// The number of microseconds of "fuzz" we use in a bisection search over
// HTTP. When we're seeking with fuzz, we'll stop the search if a bisection
// lands between the seek target and SEEK_FUZZ_USECS microseconds before the
// seek target. This is becaue it's usually quicker to just keep downloading
// from an exisiting connection than to do another bisection inside that
// small range, which would open a new HTTP connetion.
#define SEEK_FUZZ_USECS 500000
static const PRUint32 SEEK_FUZZ_USECS = 500000;
enum PageSyncResult {
PAGE_SYNC_ERROR = 1,

Просмотреть файл

@ -43,7 +43,7 @@
#include "nsRawDecoder.h"
#include "VideoUtils.h"
#define RAW_ID 0x595556
static const PRUint24 RAW_ID = 0x595556;
nsRawReader::nsRawReader(nsBuiltinDecoder* aDecoder)
: nsBuiltinDecoderReader(aDecoder),

Просмотреть файл

@ -62,27 +62,27 @@ extern PRLogModuleInfo* gBuiltinDecoderLog;
#endif
// Magic values that identify RIFF chunks we're interested in.
#define RIFF_CHUNK_MAGIC 0x52494646
#define WAVE_CHUNK_MAGIC 0x57415645
#define FRMT_CHUNK_MAGIC 0x666d7420
#define DATA_CHUNK_MAGIC 0x64617461
static const PRUint32 RIFF_CHUNK_MAGIC = 0x52494646;
static const PRUint32 WAVE_CHUNK_MAGIC = 0x57415645;
static const PRUint32 FRMT_CHUNK_MAGIC = 0x666d7420;
static const PRUint32 DATA_CHUNK_MAGIC = 0x64617461;
// Size of RIFF chunk header. 4 byte chunk header type and 4 byte size field.
#define RIFF_CHUNK_HEADER_SIZE 8
static const PRUint16 RIFF_CHUNK_HEADER_SIZE = 8;
// Size of RIFF header. RIFF chunk and 4 byte RIFF type.
#define RIFF_INITIAL_SIZE (RIFF_CHUNK_HEADER_SIZE + 4)
static const PRUint16 RIFF_INITIAL_SIZE = RIFF_CHUNK_HEADER_SIZE + 4;
// Size of required part of format chunk. Actual format chunks may be
// extended (for non-PCM encodings), but we skip any extended data.
#define WAVE_FORMAT_CHUNK_SIZE 16
static const PRUint16 WAVE_FORMAT_CHUNK_SIZE = 16;
// PCM encoding type from format chunk. Linear PCM is the only encoding
// supported by nsAudioStream.
#define WAVE_FORMAT_ENCODING_PCM 1
static const PRUint16 WAVE_FORMAT_ENCODING_PCM = 1;
// Maximum number of channels supported
#define MAX_CHANNELS 2
static const PRUint8 MAX_CHANNELS = 2;
namespace {
PRUint32

Просмотреть файл

@ -177,7 +177,7 @@ private:
PRBool aBOS,
PRBool aEOS,
PRInt64 aGranulepos);
// Decode a nestegg packet of audio data. Push the audio data on the
// audio queue. Returns PR_TRUE when there's more audio to decode,
// PR_FALSE if the audio is finished, end of file has been reached,

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше