mirror of
https://github.com/Feodor2/Mypal68.git
synced 2025-06-18 14:55:44 -04:00
68.13 - everything else
This commit is contained in:
parent
328230f3de
commit
dd80f21ab7
@ -24,7 +24,7 @@ replace-with = "vendored-sources"
|
||||
|
||||
[source."https://github.com/CraneStation/Cranelift"]
|
||||
git = "https://github.com/CraneStation/Cranelift"
|
||||
rev = "cc216b46b35a797d03c0f3e8b16a2096f1c6db61"
|
||||
rev = "182414f15c18538dfebbe040469ec8001e93ecc5"
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source.vendored-sources]
|
||||
|
@ -4,16 +4,16 @@ build/clang-plugin/.*
|
||||
config/gcc-stl-wrapper.template.h
|
||||
config/msvc-stl-wrapper.template.h
|
||||
# Generated code
|
||||
js/src/builtin/intl/LanguageTagGenerated.cpp
|
||||
js/src/builtin/intl/TimeZoneDataGenerated.h
|
||||
|
||||
# Don't want to reformat irregexp. bug 1510128
|
||||
js/src/irregexp/.*
|
||||
# Don't want to reformat irregexp (third-party code)
|
||||
js/src/irregexp/imported/.*
|
||||
|
||||
# Don't want to reformat zydis (third-party library subject to occasional updates).
|
||||
js/src/zydis/.*
|
||||
|
||||
# Generated by js/src/util/make_unicode.py
|
||||
# Note: the irregexp files are already excluded with the rest of js/src/irregexp
|
||||
# but we add them here in case that ever changes.
|
||||
js/src/irregexp/RegExpCharacters-inl.h
|
||||
js/src/irregexp/RegExpCharacters.cpp
|
||||
js/src/util/Unicode.cpp
|
||||
js/src/util/UnicodeNonBMP.h
|
||||
|
||||
@ -136,7 +136,6 @@ media/openmax_dl/.*
|
||||
media/openmax_il/.*
|
||||
media/webrtc/signaling/src/sdp/sipcc/.*
|
||||
media/webrtc/trunk/.*
|
||||
mfbt/decimal/.*
|
||||
mfbt/double-conversion/double-conversion/.*
|
||||
mfbt/lz4.*
|
||||
mobile/android/geckoview/src/thirdparty/.*
|
||||
@ -150,6 +149,7 @@ modules/pdfium/.*
|
||||
modules/woff2/.*
|
||||
modules/xz-embedded/.*
|
||||
modules/zlib/.*
|
||||
mozglue/misc/decimal/.*
|
||||
netwerk/dns/nsIDNKitInterface.h
|
||||
netwerk/sctp/src/.*
|
||||
netwerk/srtp/src/.*
|
||||
|
@ -45,8 +45,14 @@ browser/extensions/pdfjs/content/web**
|
||||
# generated or library files in pocket
|
||||
browser/components/pocket/content/panels/js/tmpl.js
|
||||
browser/components/pocket/content/panels/js/vendor/**
|
||||
# Activity Stream has incompatible eslintrc. `npm run lint` from its directory
|
||||
browser/components/newtab/**
|
||||
|
||||
# Ignore newtab files
|
||||
# Kept in sync with browser/components/newtab/.eslintignore
|
||||
browser/components/newtab/data/
|
||||
browser/components/newtab/logs/
|
||||
browser/components/newtab/prerendered/
|
||||
browser/components/newtab/vendor/
|
||||
|
||||
# The only file in browser/locales/ is pre-processed.
|
||||
browser/locales/**
|
||||
# imported from chromium
|
||||
@ -76,7 +82,6 @@ devtools/client/shared/webpack/shims/test/test_clipboard.html
|
||||
devtools/shared/qrcode/tests/mochitest/test_decode.html
|
||||
devtools/shared/tests/mochitest/*.html
|
||||
devtools/shared/webconsole/test/test_*.html
|
||||
devtools/client/webreplay/mochitest/examples/*.html
|
||||
|
||||
# Ignore devtools debugger files
|
||||
# Keep in sync with devtools/client/debugger/.eslintignore
|
||||
|
@ -296,7 +296,6 @@ module.exports = {
|
||||
"rules": {
|
||||
"consistent-return": "off",
|
||||
"dot-notation": "off",
|
||||
"object-shorthand": "off",
|
||||
"mozilla/avoid-removeChild": "off",
|
||||
"mozilla/consistent-if-bracing": "off",
|
||||
"mozilla/no-arbitrary-setTimeout": "off",
|
||||
|
2
.flake8
2
.flake8
@ -46,7 +46,7 @@ exclude =
|
||||
toolkit/content/tests/chrome/file_about_networking_wsh.py,
|
||||
toolkit/crashreporter/tools/symbolstore.py,
|
||||
toolkit/crashreporter/tools/unit-symbolstore.py,
|
||||
toolkit/library/dependentlibs.py,
|
||||
toolkit/library/build/dependentlibs.py,
|
||||
toolkit/locales/generate_update_locale.py,
|
||||
toolkit/mozapps,
|
||||
toolkit/moz.configure,
|
||||
|
2
CLOBBER
2
CLOBBER
@ -22,4 +22,4 @@
|
||||
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
|
||||
# don't change CLOBBER for WebIDL changes any more.
|
||||
|
||||
Merge day clobber
|
||||
Bug 1632434 - Update to ICU 67 requires clobber
|
||||
|
15
Makefile.in
15
Makefile.in
@ -38,19 +38,12 @@ DIST_GARBAGE = config.cache config.log config.status* config-defs.h \
|
||||
.mozconfig.mk
|
||||
|
||||
ifndef MOZ_PROFILE_USE
|
||||
# Automation builds should always have a new buildid, but for the sake of not
|
||||
# re-linking libxul on every incremental build we do not enforce this for
|
||||
# developer builds. Tests always need a new buildid as well.
|
||||
ifneq (,$(MOZ_AUTOMATION)$(MOZ_BUILD_DATE)$(TEST_MOZBUILD))
|
||||
ifneq (mobile/android,$(MOZ_BUILD_APP))
|
||||
$(MDDEPDIR)/buildid.h.stub $(MDDEPDIR)/source-repo.h.stub: FORCE
|
||||
endif
|
||||
# Additionally, provide a dummy target during tests, because
|
||||
# faster/rules.mk will expect these targets to exist.
|
||||
ifdef TEST_MOZBUILD
|
||||
source-repo.h: $(MDDEPDIR)/source-repo.h.stub
|
||||
buildid.h: $(MDDEPDIR)/buildid.h.stub
|
||||
endif
|
||||
endif
|
||||
|
||||
BUILD_BACKEND_FILES := $(addprefix backend.,$(addsuffix Backend,$(BUILD_BACKENDS)))
|
||||
|
||||
@ -136,7 +129,7 @@ recurse_pre-export::
|
||||
# process the install manifests as part of export.
|
||||
# For the binaries rule, not all the install manifests matter, so force only
|
||||
# the interesting ones to be done.
|
||||
ifdef MOZ_PROFILE_USE
|
||||
ifdef MOZ_1TIER_PGO
|
||||
ifndef NO_PROFILE_GUIDED_OPTIMIZE
|
||||
ifneq ($(OS_ARCH)_$(GNU_CC), WINNT_)
|
||||
recurse_pre-export:: install-manifests
|
||||
@ -144,7 +137,7 @@ binaries::
|
||||
@$(MAKE) install-manifests install_manifests=dist/include
|
||||
endif
|
||||
endif
|
||||
else # !MOZ_PROFILE_USE (normal build)
|
||||
else # !MOZ_1TIER_PGO (normal build)
|
||||
recurse_pre-export:: install-manifests
|
||||
binaries::
|
||||
@$(MAKE) install-manifests install_manifests=dist/include
|
||||
@ -191,7 +184,7 @@ profiledbuild::
|
||||
$(MAKE) maybe_clobber_profiledbuild
|
||||
$(call BUILDSTATUS,TIER_FINISH pgo_clobber)
|
||||
$(call BUILDSTATUS,TIER_START pgo_profile_use)
|
||||
$(MAKE) default MOZ_PROFILE_USE=1 $(if $(CLANG_CL),MOZ_PROFILE_ORDER_FILE=$(topobjdir)/cygprofile.txt)
|
||||
$(MAKE) default MOZ_PROFILE_USE=1 MOZ_1TIER_PGO=1
|
||||
$(call BUILDSTATUS,TIER_FINISH pgo_profile_use)
|
||||
|
||||
# Change default target to PGO build if PGO is enabled.
|
||||
|
20
README.md
20
README.md
@ -4,26 +4,20 @@ A browser for Windows XP based on Firefox 68.
|
||||
|
||||

|
||||
|
||||
**The most recent version is 68.13 nightly**
|
||||
|
||||
[Look here for download](https://github.com/Feodor2/Mypal68/issues/160)
|
||||
|
||||
**WARNING**
|
||||
|
||||
This browser does not run well on winxp SP2 and lower. If you do not want to install SP3, be ready for crashes and blue screens.
|
||||
If you are on SP2 and lower, there is no need to post a screenshot from blue_screen_view. And I suggest to apply postready updates of 2019.
|
||||
|
||||
|
||||
**IF YOU GOT A CRASH BUT WITHOUT BLUE SCREEN**
|
||||
|
||||
Please post drwatson.log only. It is located inside \Documents and settings\All Users\Application Data\Microsoft\Dr Watson
|
||||
Do not post any irrelevant things.
|
||||
If you are on SP2 and lower, there is no need to post a screenshot from blue_screen_view. And i suggest to apply postready updates of 2019.
|
||||
|
||||
**IF YOU GOT A BLUE SCREEN**
|
||||
|
||||
Don't post a screenshot of the blue screen, as the screen isn't useful for troubleshooting.
|
||||
No anymore report needed, either you may research it or wait for a new version where it will be fixed
|
||||
|
||||
**YOU MAY DONATE**
|
||||
Use http://www.nirsoft.net/utils/blue_screen_view.html and post on the attachment data report as on the example below.
|
||||
|
||||

|
||||
|
||||
But only by crypto [Look here](https://github.com/Feodor2/Mypal68/issues/84)
|
||||
**IF YOU GOT A CRASH BUT WITHOUT BLUE SCREEN**
|
||||
|
||||
Please post drwatson.log only. Do not post any irrelevent logs.
|
||||
|
@ -327,11 +327,11 @@ void AccessibleWrap::GetRoleDescription(role aRole,
|
||||
|
||||
if (aRole == roles::HEADING && aAttributes) {
|
||||
// The heading level is an attribute, so we need that.
|
||||
nsString level;
|
||||
rv = aAttributes->GetStringProperty(NS_LITERAL_CSTRING("level"), level);
|
||||
AutoTArray<nsString, 1> formatString;
|
||||
rv = aAttributes->GetStringProperty(NS_LITERAL_CSTRING("level"),
|
||||
*formatString.AppendElement());
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
const char16_t* formatString[] = {level.get()};
|
||||
rv = bundle->FormatStringFromName("headingLevel", formatString, 1,
|
||||
rv = bundle->FormatStringFromName("headingLevel", formatString,
|
||||
aRoleDescription);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
return;
|
||||
@ -677,7 +677,7 @@ bool AccessibleWrap::HandleLiveRegionEvent(AccEvent* aEvent) {
|
||||
Accessible* atomicAncestor = nullptr;
|
||||
for (Accessible* parent = announcementTarget; parent;
|
||||
parent = parent->Parent()) {
|
||||
Element* element = parent->Elm();
|
||||
dom::Element* element = parent->Elm();
|
||||
if (element &&
|
||||
element->AttrValueIs(kNameSpaceID_None, nsGkAtoms::aria_atomic,
|
||||
nsGkAtoms::_true, eCaseMatters)) {
|
||||
|
@ -27,7 +27,7 @@ DocAccessibleWrap::DocAccessibleWrap(Document* aDocument, PresShell* aPresShell)
|
||||
nsCOMPtr<nsIDocShellTreeItem> treeItem(aDocument->GetDocShell());
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> parentTreeItem;
|
||||
treeItem->GetParent(getter_AddRefs(parentTreeItem));
|
||||
treeItem->GetInProcessParent(getter_AddRefs(parentTreeItem));
|
||||
|
||||
if (treeItem->ItemType() == nsIDocShellTreeItem::typeContent &&
|
||||
(!parentTreeItem ||
|
||||
|
@ -6,7 +6,6 @@
|
||||
|
||||
#include "nsIAccessibleEvent.h"
|
||||
#include "nsIGSettingsService.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsMai.h"
|
||||
#include "AtkSocketAccessible.h"
|
||||
#include "prenv.h"
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include "mozilla/Likely.h"
|
||||
#include "nsMai.h"
|
||||
#include "nsIAccessibleTypes.h"
|
||||
#include "nsIURI.h"
|
||||
#include "ProxyAccessible.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
@ -251,7 +251,7 @@ uint8_t GetIndexFromRoleMap(const nsRoleMapEntry* aRoleMap);
|
||||
* Return accessible state from ARIA universal states applied to the given
|
||||
* element.
|
||||
*/
|
||||
uint64_t UniversalStatesFor(mozilla::dom::Element* aElement);
|
||||
uint64_t UniversalStatesFor(dom::Element* aElement);
|
||||
|
||||
/**
|
||||
* Get the ARIA attribute characteristics for a given ARIA attribute.
|
||||
@ -274,7 +274,7 @@ bool HasDefinedARIAHidden(nsIContent* aContent);
|
||||
class AttrIterator {
|
||||
public:
|
||||
explicit AttrIterator(nsIContent* aContent)
|
||||
: mElement(Element::FromNode(aContent)), mAttrIdx(0) {
|
||||
: mElement(dom::Element::FromNode(aContent)), mAttrIdx(0) {
|
||||
mAttrCount = mElement ? mElement->GetAttrCount() : 0;
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include "DocAccessible.h"
|
||||
#include "xpcAccEvents.h"
|
||||
#include "States.h"
|
||||
#include "xpcAccessibleDocument.h"
|
||||
|
||||
#include "mozilla/EventStateManager.h"
|
||||
#include "mozilla/dom/Selection.h"
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "Platform.h"
|
||||
#include "RootAccessibleWrap.h"
|
||||
#include "xpcAccessibleDocument.h"
|
||||
|
||||
#ifdef A11Y_LOG
|
||||
# include "Logging.h"
|
||||
@ -447,7 +446,7 @@ DocAccessible* DocManager::CreateDocOrRootAccessible(Document* aDocument) {
|
||||
if (!isRootDoc) {
|
||||
// XXXaaronl: ideally we would traverse the presshell chain. Since there's
|
||||
// no easy way to do that, we cheat and use the document hierarchy.
|
||||
parentDocAcc = GetDocAccessible(aDocument->GetParentDocument());
|
||||
parentDocAcc = GetDocAccessible(aDocument->GetInProcessParentDocument());
|
||||
NS_ASSERTION(parentDocAcc, "Can't create an accessible for the document!");
|
||||
if (!parentDocAcc) return nullptr;
|
||||
}
|
||||
|
@ -14,12 +14,10 @@
|
||||
#include "nsDocShellLoadTypes.h"
|
||||
#include "nsIChannel.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsISelectionController.h"
|
||||
#include "nsTraceRefcnt.h"
|
||||
#include "nsIWebProgress.h"
|
||||
#include "prenv.h"
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
#include "nsIURI.h"
|
||||
#include "mozilla/PresShell.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/HTMLBodyElement.h"
|
||||
@ -119,7 +117,7 @@ static void LogDocShellTree(dom::Document* aDocumentNode) {
|
||||
if (aDocumentNode->IsActive()) {
|
||||
nsCOMPtr<nsIDocShellTreeItem> treeItem(aDocumentNode->GetDocShell());
|
||||
nsCOMPtr<nsIDocShellTreeItem> parentTreeItem;
|
||||
treeItem->GetParent(getter_AddRefs(parentTreeItem));
|
||||
treeItem->GetInProcessParent(getter_AddRefs(parentTreeItem));
|
||||
nsCOMPtr<nsIDocShellTreeItem> rootTreeItem;
|
||||
treeItem->GetRootTreeItem(getter_AddRefs(rootTreeItem));
|
||||
printf("docshell hierarchy, parent: %p, root: %p, is tab document: %s;",
|
||||
@ -180,7 +178,7 @@ static void LogDocLoadGroup(dom::Document* aDocumentNode) {
|
||||
}
|
||||
|
||||
static void LogDocParent(dom::Document* aDocumentNode) {
|
||||
dom::Document* parentDoc = aDocumentNode->GetParentDocument();
|
||||
dom::Document* parentDoc = aDocumentNode->GetInProcessParentDocument();
|
||||
printf("parent DOM document: %p", static_cast<void*>(parentDoc));
|
||||
if (parentDoc) {
|
||||
printf(", parent acc document: %p",
|
||||
|
@ -13,7 +13,6 @@
|
||||
#include "nsEventShell.h"
|
||||
#include "nsFrameSelection.h"
|
||||
|
||||
#include "nsIAccessibleTypes.h"
|
||||
#include "mozilla/PresShell.h"
|
||||
#include "mozilla/dom/Document.h"
|
||||
#include "mozilla/dom/Selection.h"
|
||||
|
@ -19,10 +19,7 @@ StyleInfo::StyleInfo(dom::Element* aElement) : mElement(aElement) {
|
||||
|
||||
void StyleInfo::Display(nsAString& aValue) {
|
||||
aValue.Truncate();
|
||||
AppendASCIItoUTF16(
|
||||
nsCSSProps::ValueToKeyword(mComputedStyle->StyleDisplay()->mDisplay,
|
||||
nsCSSProps::kDisplayKTable),
|
||||
aValue);
|
||||
Servo_GetPropertyValue(mComputedStyle, eCSSProperty_display, &aValue);
|
||||
}
|
||||
|
||||
void StyleInfo::TextAlign(nsAString& aValue) {
|
||||
|
@ -262,7 +262,7 @@ bool TextAttrsMgr::InvalidTextAttr::GetValue(nsIContent* aElm,
|
||||
nsIContent* elm = aElm;
|
||||
do {
|
||||
if (nsAccUtils::HasDefinedARIAToken(elm, nsGkAtoms::aria_invalid)) {
|
||||
static Element::AttrValuesArray tokens[] = {
|
||||
static dom::Element::AttrValuesArray tokens[] = {
|
||||
nsGkAtoms::_false, nsGkAtoms::grammar, nsGkAtoms::spelling, nullptr};
|
||||
|
||||
int32_t idx = elm->AsElement()->FindAttrValueIn(
|
||||
@ -347,11 +347,11 @@ bool TextAttrsMgr::BGColorTextAttr::GetColor(nsIFrame* aFrame,
|
||||
TextAttrsMgr::ColorTextAttr::ColorTextAttr(nsIFrame* aRootFrame,
|
||||
nsIFrame* aFrame)
|
||||
: TTextAttr<nscolor>(!aFrame) {
|
||||
mRootNativeValue = aRootFrame->StyleColor()->mColor.ToColor();
|
||||
mRootNativeValue = aRootFrame->StyleText()->mColor.ToColor();
|
||||
mIsRootDefined = true;
|
||||
|
||||
if (aFrame) {
|
||||
mNativeValue = aFrame->StyleColor()->mColor.ToColor();
|
||||
mNativeValue = aFrame->StyleText()->mColor.ToColor();
|
||||
mIsDefined = true;
|
||||
}
|
||||
}
|
||||
@ -361,7 +361,7 @@ bool TextAttrsMgr::ColorTextAttr::GetValueFor(Accessible* aAccessible,
|
||||
nsIContent* elm = nsCoreUtils::GetDOMElementFor(aAccessible->GetContent());
|
||||
if (elm) {
|
||||
if (nsIFrame* frame = elm->GetPrimaryFrame()) {
|
||||
*aValue = frame->StyleColor()->mColor.ToColor();
|
||||
*aValue = frame->StyleText()->mColor.ToColor();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,6 @@
|
||||
#ifndef _nsAccCache_H_
|
||||
#define _nsAccCache_H_
|
||||
|
||||
#include "xpcAccessibleDocument.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Accessible cache utils
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -95,7 +95,7 @@ int32_t nsAccUtils::GetLevelForXULContainerItem(nsIContent* aContent) {
|
||||
aContent->AsElement()->AsXULContainerItem();
|
||||
if (!item) return 0;
|
||||
|
||||
nsCOMPtr<Element> containerElement;
|
||||
nsCOMPtr<dom::Element> containerElement;
|
||||
item->GetParentContainer(getter_AddRefs(containerElement));
|
||||
nsCOMPtr<nsIDOMXULContainerElement> container =
|
||||
containerElement ? containerElement->AsXULContainer() : nullptr;
|
||||
@ -173,7 +173,7 @@ bool nsAccUtils::HasDefinedARIAToken(nsIContent* aContent, nsAtom* aAtom) {
|
||||
|
||||
if (!aContent->IsElement()) return false;
|
||||
|
||||
Element* element = aContent->AsElement();
|
||||
dom::Element* element = aContent->AsElement();
|
||||
if (!element->HasAttr(kNameSpaceID_None, aAtom) ||
|
||||
element->AttrValueIs(kNameSpaceID_None, aAtom, nsGkAtoms::_empty,
|
||||
eCaseMatters) ||
|
||||
@ -187,7 +187,7 @@ bool nsAccUtils::HasDefinedARIAToken(nsIContent* aContent, nsAtom* aAtom) {
|
||||
nsStaticAtom* nsAccUtils::GetARIAToken(dom::Element* aElement, nsAtom* aAttr) {
|
||||
if (!HasDefinedARIAToken(aElement, aAttr)) return nsGkAtoms::_empty;
|
||||
|
||||
static Element::AttrValuesArray tokens[] = {
|
||||
static dom::Element::AttrValuesArray tokens[] = {
|
||||
nsGkAtoms::_false, nsGkAtoms::_true, nsGkAtoms::mixed, nullptr};
|
||||
|
||||
int32_t idx =
|
||||
@ -204,7 +204,7 @@ nsStaticAtom* nsAccUtils::NormalizeARIAToken(dom::Element* aElement,
|
||||
}
|
||||
|
||||
if (aAttr == nsGkAtoms::aria_current) {
|
||||
static Element::AttrValuesArray tokens[] = {
|
||||
static dom::Element::AttrValuesArray tokens[] = {
|
||||
nsGkAtoms::page, nsGkAtoms::step, nsGkAtoms::location_,
|
||||
nsGkAtoms::date, nsGkAtoms::time, nsGkAtoms::_true,
|
||||
nullptr};
|
||||
@ -510,12 +510,13 @@ bool nsAccUtils::IsARIALive(const Accessible* aAccessible) {
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> sameTypeParent;
|
||||
docShellTreeItem->GetSameTypeParent(getter_AddRefs(sameTypeParent));
|
||||
docShellTreeItem->GetInProcessSameTypeParent(
|
||||
getter_AddRefs(sameTypeParent));
|
||||
if (!sameTypeParent || sameTypeParent == docShellTreeItem) {
|
||||
break;
|
||||
}
|
||||
|
||||
dom::Document* parentDoc = doc->GetParentDocument();
|
||||
dom::Document* parentDoc = doc->GetInProcessParentDocument();
|
||||
if (!parentDoc) {
|
||||
break;
|
||||
}
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include "nsAttrName.h"
|
||||
#include "nsDOMTokenList.h"
|
||||
#include "nsEventShell.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsTextFormatter.h"
|
||||
#include "OuterDocAccessible.h"
|
||||
#include "Role.h"
|
||||
@ -37,7 +36,6 @@
|
||||
#include "TextLeafAccessibleWrap.h"
|
||||
#include "TreeWalker.h"
|
||||
#include "xpcAccessibleApplication.h"
|
||||
#include "xpcAccessibleDocument.h"
|
||||
|
||||
#ifdef MOZ_ACCESSIBILITY_ATK
|
||||
# include "AtkSocketAccessible.h"
|
||||
@ -1395,12 +1393,13 @@ nsAccessibilityService::CreateAccessibleByFrameType(nsIFrame* aFrame,
|
||||
|
||||
if (table) {
|
||||
nsIContent* parentContent =
|
||||
aContent->GetParentOrHostNode()->AsContent();
|
||||
aContent->GetParentOrShadowHostNode()->AsContent();
|
||||
nsIFrame* parentFrame = nullptr;
|
||||
if (parentContent) {
|
||||
parentFrame = parentContent->GetPrimaryFrame();
|
||||
if (!parentFrame || !parentFrame->IsTableWrapperFrame()) {
|
||||
parentContent = parentContent->GetParentOrHostNode()->AsContent();
|
||||
parentContent =
|
||||
parentContent->GetParentOrShadowHostNode()->AsContent();
|
||||
if (parentContent) {
|
||||
parentFrame = parentContent->GetPrimaryFrame();
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ class PresShell;
|
||||
|
||||
namespace dom {
|
||||
class DOMStringList;
|
||||
class Element;
|
||||
}
|
||||
|
||||
namespace a11y {
|
||||
@ -52,7 +53,8 @@ SelectionManager* SelectionMgr();
|
||||
ApplicationAccessible* ApplicationAcc();
|
||||
xpcAccessibleApplication* XPCApplicationAcc();
|
||||
|
||||
typedef Accessible*(New_Accessible)(Element* aElement, Accessible* aContext);
|
||||
typedef Accessible*(New_Accessible)(mozilla::dom::Element* aElement,
|
||||
Accessible* aContext);
|
||||
|
||||
// These fields are not `nsStaticAtom* const` because MSVC doesn't like it.
|
||||
struct MarkupAttrInfo {
|
||||
|
@ -233,7 +233,7 @@ nsresult nsCoreUtils::ScrollSubstringTo(nsIFrame* aFrame, nsRange* aRange,
|
||||
selCon->GetSelection(nsISelectionController::SELECTION_ACCESSIBILITY);
|
||||
|
||||
selection->RemoveAllRanges(IgnoreErrors());
|
||||
selection->AddRange(*aRange, IgnoreErrors());
|
||||
selection->AddRangeAndSelectFramesAndNotifyListeners(*aRange, IgnoreErrors());
|
||||
|
||||
selection->ScrollIntoView(nsISelectionController::SELECTION_ANCHOR_REGION,
|
||||
aVertical, aHorizontal,
|
||||
@ -341,7 +341,7 @@ bool nsCoreUtils::IsRootDocument(Document* aDocument) {
|
||||
NS_ASSERTION(docShellTreeItem, "No document shell for document!");
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> parentTreeItem;
|
||||
docShellTreeItem->GetParent(getter_AddRefs(parentTreeItem));
|
||||
docShellTreeItem->GetInProcessParent(getter_AddRefs(parentTreeItem));
|
||||
|
||||
return !parentTreeItem;
|
||||
}
|
||||
@ -357,7 +357,7 @@ bool nsCoreUtils::IsTabDocument(Document* aDocumentNode) {
|
||||
nsCOMPtr<nsIDocShellTreeItem> treeItem(aDocumentNode->GetDocShell());
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> parentTreeItem;
|
||||
treeItem->GetParent(getter_AddRefs(parentTreeItem));
|
||||
treeItem->GetInProcessParent(getter_AddRefs(parentTreeItem));
|
||||
|
||||
// Tab document running in own process doesn't have parent.
|
||||
if (XRE_IsContentProcess()) return !parentTreeItem;
|
||||
@ -371,9 +371,9 @@ bool nsCoreUtils::IsTabDocument(Document* aDocumentNode) {
|
||||
|
||||
bool nsCoreUtils::IsErrorPage(Document* aDocument) {
|
||||
nsIURI* uri = aDocument->GetDocumentURI();
|
||||
bool isAboutScheme = false;
|
||||
uri->SchemeIs("about", &isAboutScheme);
|
||||
if (!isAboutScheme) return false;
|
||||
if (!uri->SchemeIs("about")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
nsAutoCString path;
|
||||
uri->GetPathQueryRef(path);
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include "Role.h"
|
||||
#include "States.h"
|
||||
|
||||
#include "nsIMutableArray.h"
|
||||
#include "nsIPersistentProperties2.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
|
||||
|
@ -58,9 +58,6 @@
|
||||
#include "nsAtom.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsArrayUtils.h"
|
||||
#include "nsIMutableArray.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsWhitespaceTokenizer.h"
|
||||
#include "nsAttrName.h"
|
||||
#include "nsPersistentProperties.h"
|
||||
@ -119,15 +116,10 @@ Accessible::Accessible(nsIContent* aContent, DocAccessible* aDoc)
|
||||
mHideEventTarget(false) {
|
||||
mBits.groupInfo = nullptr;
|
||||
mInt.mIndexOfEmbeddedChild = -1;
|
||||
|
||||
// Assign an ID to this Accessible for use in UniqueID().
|
||||
recordreplay::RegisterThing(this);
|
||||
}
|
||||
|
||||
Accessible::~Accessible() {
|
||||
NS_ASSERTION(!mDoc, "LastRelease was never called!?!");
|
||||
|
||||
recordreplay::UnregisterThing(this);
|
||||
}
|
||||
|
||||
ENameValueFlag Accessible::Name(nsString& aName) const {
|
||||
@ -741,8 +733,7 @@ void Accessible::TakeFocus() const {
|
||||
|
||||
nsFocusManager* fm = nsFocusManager::GetFocusManager();
|
||||
if (fm) {
|
||||
AutoHandlingUserInputStatePusher inputStatePusher(true, nullptr,
|
||||
focusContent->OwnerDoc());
|
||||
AutoHandlingUserInputStatePusher inputStatePusher(true);
|
||||
// XXXbz: Can we actually have a non-element content here?
|
||||
RefPtr<Element> element =
|
||||
focusContent->IsElement() ? focusContent->AsElement() : nullptr;
|
||||
@ -1076,10 +1067,11 @@ already_AddRefed<nsIPersistentProperties> Accessible::NativeAttributes() {
|
||||
if (!docShellTreeItem) break;
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> sameTypeParent;
|
||||
docShellTreeItem->GetSameTypeParent(getter_AddRefs(sameTypeParent));
|
||||
docShellTreeItem->GetInProcessSameTypeParent(
|
||||
getter_AddRefs(sameTypeParent));
|
||||
if (!sameTypeParent || sameTypeParent == docShellTreeItem) break;
|
||||
|
||||
dom::Document* parentDoc = doc->GetParentDocument();
|
||||
dom::Document* parentDoc = doc->GetInProcessParentDocument();
|
||||
if (!parentDoc) break;
|
||||
|
||||
startContent = parentDoc->FindContentForSubDocument(doc);
|
||||
@ -1789,7 +1781,7 @@ Relation Accessible::RelationByType(RelationType aType) const {
|
||||
// Walk up the parent chain without crossing the boundary at which item
|
||||
// types change, preventing us from walking up out of tab content.
|
||||
nsCOMPtr<nsIDocShellTreeItem> root;
|
||||
docShell->GetSameTypeRootTreeItem(getter_AddRefs(root));
|
||||
docShell->GetInProcessSameTypeRootTreeItem(getter_AddRefs(root));
|
||||
if (root) {
|
||||
// If the item type is typeContent, we assume we are in browser tab
|
||||
// content. Note, this includes content such as about:addons,
|
||||
@ -2453,8 +2445,7 @@ Accessible* Accessible::CurrentItem() const {
|
||||
dom::Document* DOMDoc = mContent->OwnerDoc();
|
||||
dom::Element* activeDescendantElm = DOMDoc->GetElementById(id);
|
||||
if (activeDescendantElm) {
|
||||
if (nsContentUtils::ContentIsDescendantOf(mContent,
|
||||
activeDescendantElm)) {
|
||||
if (mContent->IsInclusiveDescendantOf(activeDescendantElm)) {
|
||||
// Don't want a cyclical descendant relationship. That would be bad.
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -171,15 +171,7 @@ class Accessible : public nsISupports {
|
||||
/**
|
||||
* Return the unique identifier of the accessible.
|
||||
*/
|
||||
void* UniqueID() {
|
||||
// When recording or replaying, use an ID which will be consistent when
|
||||
// recording/replaying (pointer values are not consistent), so that IPC
|
||||
// messages from the parent process can be handled when replaying.
|
||||
if (recordreplay::IsRecordingOrReplaying()) {
|
||||
return reinterpret_cast<void*>(recordreplay::ThingIndex(this));
|
||||
}
|
||||
return static_cast<void*>(this);
|
||||
}
|
||||
void* UniqueID() { return static_cast<void*>(this); }
|
||||
|
||||
/**
|
||||
* Return language associated with the accessible.
|
||||
|
@ -10,8 +10,6 @@
|
||||
#include "Role.h"
|
||||
#include "States.h"
|
||||
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIWindowMediator.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "mozilla/Services.h"
|
||||
#include "nsGlobalWindow.h"
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
#include "AccessibleWrap.h"
|
||||
|
||||
#include "nsIMutableArray.h"
|
||||
#include "nsIXULAppInfo.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
#include "nsCommandManager.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsIMutableArray.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "mozilla/dom/Document.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
@ -28,7 +27,6 @@
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsImageFrame.h"
|
||||
#include "nsIPersistentProperties2.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIScrollableFrame.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
@ -191,7 +189,7 @@ role DocAccessible::NativeRole() const {
|
||||
nsCOMPtr<nsIDocShell> docShell = nsCoreUtils::GetDocShellFor(mDocumentNode);
|
||||
if (docShell) {
|
||||
nsCOMPtr<nsIDocShellTreeItem> sameTypeRoot;
|
||||
docShell->GetSameTypeRootTreeItem(getter_AddRefs(sameTypeRoot));
|
||||
docShell->GetInProcessSameTypeRootTreeItem(getter_AddRefs(sameTypeRoot));
|
||||
int32_t itemType = docShell->ItemType();
|
||||
if (sameTypeRoot == docShell) {
|
||||
// Root of content or chrome tree
|
||||
@ -292,8 +290,7 @@ void DocAccessible::TakeFocus() const {
|
||||
// Focus the document.
|
||||
nsFocusManager* fm = nsFocusManager::GetFocusManager();
|
||||
RefPtr<dom::Element> newFocus;
|
||||
AutoHandlingUserInputStatePusher inputStatePusher(true, nullptr,
|
||||
mDocumentNode);
|
||||
AutoHandlingUserInputStatePusher inputStatePusher(true);
|
||||
fm->MoveFocus(mDocumentNode->GetWindow(), nullptr,
|
||||
nsFocusManager::MOVEFOCUS_ROOT, 0, getter_AddRefs(newFocus));
|
||||
}
|
||||
@ -497,7 +494,7 @@ nsRect DocAccessible::RelativeBounds(nsIFrame** aRelativeFrame) const {
|
||||
bounds = scrollPort;
|
||||
}
|
||||
|
||||
document = parentDoc = document->GetParentDocument();
|
||||
document = parentDoc = document->GetInProcessParentDocument();
|
||||
}
|
||||
|
||||
return bounds;
|
||||
@ -1937,7 +1934,7 @@ void DocAccessible::DoARIAOwnsRelocation(Accessible* aOwner) {
|
||||
// Make an attempt to create an accessible if it wasn't created yet.
|
||||
if (!child) {
|
||||
// An owned child cannot be an ancestor of the owner.
|
||||
if (nsContentUtils::ContentIsDescendantOf(aOwner->Elm(), childEl)) {
|
||||
if (aOwner->Elm()->IsInclusiveDescendantOf(childEl)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -2275,7 +2272,7 @@ bool DocAccessible::IsLoadEventTarget() const {
|
||||
NS_ASSERTION(treeItem, "No document shell for document!");
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> parentTreeItem;
|
||||
treeItem->GetParent(getter_AddRefs(parentTreeItem));
|
||||
treeItem->GetInProcessParent(getter_AddRefs(parentTreeItem));
|
||||
|
||||
// Not a root document.
|
||||
if (parentTreeItem) {
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include "nsIObserver.h"
|
||||
#include "nsIScrollPositionListener.h"
|
||||
#include "nsITimer.h"
|
||||
#include "nsIWeakReference.h"
|
||||
|
||||
class nsAccessiblePivot;
|
||||
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include "nsAccUtils.h"
|
||||
|
||||
#include "nsIClipboard.h"
|
||||
#include "nsIPersistentProperties2.h"
|
||||
#include "nsFrameSelection.h"
|
||||
|
||||
#include "mozilla/TextEditor.h"
|
||||
|
@ -25,18 +25,17 @@
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsPersistentProperties.h"
|
||||
#include "nsIScrollableFrame.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsITextControlElement.h"
|
||||
#include "nsIMathMLFrame.h"
|
||||
#include "nsRange.h"
|
||||
#include "nsTextFragment.h"
|
||||
#include "mozilla/BinarySearch.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/EventStates.h"
|
||||
#include "mozilla/dom/Selection.h"
|
||||
#include "mozilla/MathAlgorithms.h"
|
||||
#include "mozilla/PresShell.h"
|
||||
#include "mozilla/TextEditor.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/HTMLBRElement.h"
|
||||
#include "mozilla/dom/Selection.h"
|
||||
#include "gfxSkipChars.h"
|
||||
#include <algorithm>
|
||||
|
||||
@ -253,13 +252,10 @@ uint32_t HyperTextAccessible::DOMPointToOffset(nsINode* aNode,
|
||||
// first search)
|
||||
Accessible* descendant = nullptr;
|
||||
if (findNode) {
|
||||
nsCOMPtr<nsIContent> findContent(do_QueryInterface(findNode));
|
||||
if (findContent && findContent->IsHTMLElement(nsGkAtoms::br) &&
|
||||
findContent->AsElement()->AttrValueIs(kNameSpaceID_None,
|
||||
nsGkAtoms::mozeditorbogusnode,
|
||||
nsGkAtoms::_true, eIgnoreCase)) {
|
||||
// This <br> is the hacky "bogus node" used when there is no text in a
|
||||
// control
|
||||
dom::HTMLBRElement* brElement = dom::HTMLBRElement::FromNode(findNode);
|
||||
if (brElement && brElement->IsPaddingForEmptyEditor()) {
|
||||
// This <br> is the hacky "padding <br> element" used when there is no
|
||||
// text in the editor.
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -317,7 +313,7 @@ uint32_t HyperTextAccessible::TransformOffset(Accessible* aDescendant,
|
||||
* ancestors too.
|
||||
*/
|
||||
static nsIContent* GetElementAsContentOf(nsINode* aNode) {
|
||||
if (Element* element = Element::FromNode(aNode)) {
|
||||
if (auto* element = dom::Element::FromNode(aNode)) {
|
||||
return element;
|
||||
}
|
||||
return aNode->GetParentElement();
|
||||
@ -1270,7 +1266,8 @@ nsresult HyperTextAccessible::SetSelectionRange(int32_t aStartPos,
|
||||
|
||||
// Set up the selection.
|
||||
for (int32_t idx = domSel->RangeCount() - 1; idx > 0; idx--)
|
||||
domSel->RemoveRange(*domSel->GetRangeAt(idx), IgnoreErrors());
|
||||
domSel->RemoveRangeAndUnselectFramesAndNotifyListeners(
|
||||
*domSel->GetRangeAt(idx), IgnoreErrors());
|
||||
SetSelectionBoundsAt(0, aStartPos, aEndPos);
|
||||
|
||||
// Make sure it is visible
|
||||
@ -1527,12 +1524,12 @@ bool HyperTextAccessible::SelectionBoundsAt(int32_t aSelectionNum,
|
||||
endOffset = tempOffset;
|
||||
}
|
||||
|
||||
if (!nsContentUtils::ContentIsDescendantOf(startNode, mContent))
|
||||
if (!startNode->IsInclusiveDescendantOf(mContent))
|
||||
*aStartOffset = 0;
|
||||
else
|
||||
*aStartOffset = DOMPointToOffset(startNode, startOffset);
|
||||
|
||||
if (!nsContentUtils::ContentIsDescendantOf(endNode, mContent))
|
||||
if (!endNode->IsInclusiveDescendantOf(mContent))
|
||||
*aEndOffset = CharacterCount();
|
||||
else
|
||||
*aEndOffset = DOMPointToOffset(endNode, endOffset, true);
|
||||
@ -1569,11 +1566,12 @@ bool HyperTextAccessible::SetSelectionBoundsAt(int32_t aSelectionNum,
|
||||
// If this is not a new range, notify selection listeners that the existing
|
||||
// selection range has changed. Otherwise, just add the new range.
|
||||
if (aSelectionNum != static_cast<int32_t>(rangeCount)) {
|
||||
domSel->RemoveRange(*range, IgnoreErrors());
|
||||
domSel->RemoveRangeAndUnselectFramesAndNotifyListeners(*range,
|
||||
IgnoreErrors());
|
||||
}
|
||||
|
||||
IgnoredErrorResult err;
|
||||
domSel->AddRange(*range, err);
|
||||
domSel->AddRangeAndSelectFramesAndNotifyListeners(*range, err);
|
||||
|
||||
if (!err.Failed()) {
|
||||
// Changing the direction of the selection assures that the caret
|
||||
@ -1593,7 +1591,8 @@ bool HyperTextAccessible::RemoveFromSelection(int32_t aSelectionNum) {
|
||||
aSelectionNum >= static_cast<int32_t>(domSel->RangeCount()))
|
||||
return false;
|
||||
|
||||
domSel->RemoveRange(*domSel->GetRangeAt(aSelectionNum), IgnoreErrors());
|
||||
domSel->RemoveRangeAndUnselectFramesAndNotifyListeners(
|
||||
*domSel->GetRangeAt(aSelectionNum), IgnoreErrors());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -12,8 +12,6 @@
|
||||
#include "WordMovementType.h"
|
||||
#include "nsIFrame.h"
|
||||
|
||||
#include "nsISelectionController.h"
|
||||
|
||||
class nsFrameSelection;
|
||||
class nsRange;
|
||||
class nsIWidget;
|
||||
@ -400,8 +398,9 @@ class HyperTextAccessible : public AccessibleWrap {
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// EditableTextAccessible
|
||||
|
||||
void ReplaceText(const nsAString& aText);
|
||||
void InsertText(const nsAString& aText, int32_t aPosition);
|
||||
MOZ_CAN_RUN_SCRIPT_BOUNDARY void ReplaceText(const nsAString& aText);
|
||||
MOZ_CAN_RUN_SCRIPT_BOUNDARY void InsertText(const nsAString& aText,
|
||||
int32_t aPosition);
|
||||
void CopyText(int32_t aStartPos, int32_t aEndPos);
|
||||
MOZ_CAN_RUN_SCRIPT_BOUNDARY void CutText(int32_t aStartPos, int32_t aEndPos);
|
||||
MOZ_CAN_RUN_SCRIPT_BOUNDARY void DeleteText(int32_t aStartPos,
|
||||
|
@ -14,7 +14,6 @@
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "mozilla/dom/Document.h"
|
||||
#include "nsIImageLoadingContent.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIPersistentProperties2.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsIURI.h"
|
||||
@ -151,10 +150,10 @@ already_AddRefed<nsIURI> ImageAccessible::GetLongDescURI() const {
|
||||
longdesc.FindChar('\r') != -1 || longdesc.FindChar('\n') != -1) {
|
||||
return nullptr;
|
||||
}
|
||||
nsCOMPtr<nsIURI> baseURI = mContent->GetBaseURI();
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
nsContentUtils::NewURIWithDocumentCharset(getter_AddRefs(uri), longdesc,
|
||||
mContent->OwnerDoc(), baseURI);
|
||||
mContent->OwnerDoc(),
|
||||
mContent->GetBaseURI());
|
||||
return uri.forget();
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/ScriptSettings.h"
|
||||
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
#include "nsIDocShellTreeOwner.h"
|
||||
#include "mozilla/dom/Event.h"
|
||||
#include "mozilla/dom/EventTarget.h"
|
||||
@ -35,7 +34,6 @@
|
||||
#include "mozilla/dom/Document.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsIPropertyBag2.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsIWebBrowserChrome.h"
|
||||
#include "nsReadableUtils.h"
|
||||
|
@ -6,7 +6,6 @@
|
||||
|
||||
#include "DocAccessible.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsIPersistentProperties2.h"
|
||||
#include "nsTextEquivUtils.h"
|
||||
#include "Relation.h"
|
||||
#include "Role.h"
|
||||
|
@ -15,12 +15,8 @@
|
||||
#include "nsContentList.h"
|
||||
#include "mozilla/dom/HTMLInputElement.h"
|
||||
#include "mozilla/dom/HTMLTextAreaElement.h"
|
||||
#include "nsIEditor.h"
|
||||
#include "nsIFormControl.h"
|
||||
#include "nsIPersistentProperties2.h"
|
||||
#include "nsISelectionController.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsITextControlElement.h"
|
||||
#include "nsITextControlFrame.h"
|
||||
#include "nsNameSpaceManager.h"
|
||||
#include "mozilla/dom/ScriptSettings.h"
|
||||
@ -28,6 +24,7 @@
|
||||
#include "mozilla/EventStates.h"
|
||||
#include "mozilla/FloatingPoint.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/TextControlElement.h"
|
||||
#include "mozilla/TextEditor.h"
|
||||
|
||||
using namespace mozilla;
|
||||
@ -337,7 +334,8 @@ uint64_t HTMLTextFieldAccessible::NativeState() const {
|
||||
return state | states::SUPPORTS_AUTOCOMPLETION | states::HASPOPUP;
|
||||
|
||||
// Ordinal XUL textboxes don't support autocomplete.
|
||||
if (!BindingOrWidgetParent() && Preferences::GetBool("browser.formfill.enable")) {
|
||||
if (!BindingOrWidgetParent() &&
|
||||
Preferences::GetBool("browser.formfill.enable")) {
|
||||
// Check to see if autocompletion is allowed on this input. We don't expose
|
||||
// it for password fields even though the entire password can be remembered
|
||||
// for a page if the user asks it to be. However, the kind of autocomplete
|
||||
@ -376,8 +374,8 @@ bool HTMLTextFieldAccessible::DoAction(uint8_t aIndex) const {
|
||||
}
|
||||
|
||||
already_AddRefed<TextEditor> HTMLTextFieldAccessible::GetEditor() const {
|
||||
nsCOMPtr<nsITextControlElement> textControlElement =
|
||||
do_QueryInterface(mContent);
|
||||
RefPtr<TextControlElement> textControlElement =
|
||||
TextControlElement::FromNodeOrNull(mContent);
|
||||
if (!textControlElement) {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -72,7 +72,8 @@ class HTMLTextFieldAccessible final : public HyperTextAccessibleWrap {
|
||||
HyperTextAccessibleWrap)
|
||||
|
||||
// HyperTextAccessible
|
||||
virtual already_AddRefed<TextEditor> GetEditor() const override;
|
||||
MOZ_CAN_RUN_SCRIPT_BOUNDARY virtual already_AddRefed<TextEditor> GetEditor()
|
||||
const override;
|
||||
|
||||
// Accessible
|
||||
virtual void Value(nsString& aValue) const override;
|
||||
@ -101,7 +102,7 @@ class HTMLTextFieldAccessible final : public HyperTextAccessibleWrap {
|
||||
* HTML:input@type="number".
|
||||
*/
|
||||
nsIContent* BindingOrWidgetParent() const {
|
||||
nsIContent * el = mContent->GetBindingParent();
|
||||
nsIContent* el = mContent->GetBindingParent();
|
||||
if (el) {
|
||||
return el;
|
||||
}
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include "DocAccessible-inl.h"
|
||||
#include "Role.h"
|
||||
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsImageFrame.h"
|
||||
#include "nsImageMap.h"
|
||||
|
@ -9,8 +9,8 @@
|
||||
#include "Role.h"
|
||||
#include "States.h"
|
||||
|
||||
#include "nsBlockFrame.h"
|
||||
#include "nsBulletFrame.h"
|
||||
#include "nsContainerFrame.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::a11y;
|
||||
@ -36,8 +36,7 @@ HTMLLIAccessible::HTMLLIAccessible(nsIContent* aContent, DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc), mBullet(nullptr) {
|
||||
mType = eHTMLLiType;
|
||||
|
||||
nsBlockFrame* blockFrame = do_QueryFrame(GetFrame());
|
||||
if (blockFrame && blockFrame->HasMarker()) {
|
||||
if (nsLayoutUtils::GetMarkerFrame(aContent)) {
|
||||
mBullet = new HTMLListBulletAccessible(mContent, mDoc);
|
||||
Document()->BindToDocument(mBullet, nullptr);
|
||||
AppendChild(mBullet);
|
||||
@ -117,17 +116,15 @@ HTMLListBulletAccessible::HTMLListBulletAccessible(nsIContent* aContent,
|
||||
// HTMLListBulletAccessible: Accessible
|
||||
|
||||
nsIFrame* HTMLListBulletAccessible::GetFrame() const {
|
||||
nsBlockFrame* blockFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
||||
return blockFrame ? blockFrame->GetMarker() : nullptr;
|
||||
return nsLayoutUtils::GetMarkerFrame(mContent);
|
||||
}
|
||||
|
||||
ENameValueFlag HTMLListBulletAccessible::Name(nsString& aName) const {
|
||||
aName.Truncate();
|
||||
|
||||
// Native anonymous content, ARIA can't be used. Get list bullet text.
|
||||
nsBlockFrame* blockFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
||||
if (blockFrame) {
|
||||
blockFrame->GetSpokenMarkerText(aName);
|
||||
if (nsContainerFrame* frame = do_QueryFrame(mContent->GetPrimaryFrame())) {
|
||||
frame->GetSpokenMarkerText(aName);
|
||||
}
|
||||
|
||||
return eNameOK;
|
||||
@ -143,9 +140,7 @@ void HTMLListBulletAccessible::AppendTextTo(nsAString& aText,
|
||||
uint32_t aStartOffset,
|
||||
uint32_t aLength) {
|
||||
nsAutoString bulletText;
|
||||
nsBlockFrame* blockFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
||||
if (blockFrame) blockFrame->GetSpokenMarkerText(bulletText);
|
||||
|
||||
Name(bulletText);
|
||||
aText.Append(Substring(bulletText, aStartOffset, aLength));
|
||||
}
|
||||
|
||||
@ -153,6 +148,9 @@ void HTMLListBulletAccessible::AppendTextTo(nsAString& aText,
|
||||
// HTMLListBulletAccessible: public
|
||||
|
||||
bool HTMLListBulletAccessible::IsInside() const {
|
||||
nsBlockFrame* blockFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
||||
return blockFrame ? blockFrame->HasInsideMarker() : false;
|
||||
if (nsIFrame* frame = mContent->GetPrimaryFrame()) {
|
||||
return frame->StyleList()->mListStylePosition ==
|
||||
NS_STYLE_LIST_STYLE_POSITION_INSIDE;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "mozilla/dom/HTMLTableElement.h"
|
||||
#include "nsIHTMLCollection.h"
|
||||
#include "mozilla/dom/Document.h"
|
||||
#include "nsIMutableArray.h"
|
||||
#include "nsIPersistentProperties2.h"
|
||||
#include "nsITableCellLayout.h"
|
||||
#include "nsFrameSelection.h"
|
||||
|
@ -13,7 +13,6 @@
|
||||
#include "mozilla/dom/BrowserParent.h"
|
||||
#include "mozilla/Unused.h"
|
||||
#include "RelationType.h"
|
||||
#include "xpcAccessibleDocument.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
@ -14,7 +14,6 @@
|
||||
#include "TableAccessible.h"
|
||||
#include "TableCellAccessible.h"
|
||||
#include "nsIPersistentProperties2.h"
|
||||
#include "nsISimpleEnumerator.h"
|
||||
#include "nsAccUtils.h"
|
||||
#ifdef MOZ_ACCESSIBILITY_ATK
|
||||
# include "AccessibleWrap.h"
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include "mozilla/a11y/Platform.h"
|
||||
#include "RelationType.h"
|
||||
#include "mozilla/a11y/Role.h"
|
||||
#include "xpcAccessibleDocument.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
@ -8,8 +8,6 @@
|
||||
#include "Accessible.h"
|
||||
#include "mozilla/a11y/ProxyAccessibleBase.h"
|
||||
#include "mozilla/a11y/Role.h"
|
||||
#include "nsIAccessibleText.h"
|
||||
#include "nsIAccessibleTypes.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsRect.h"
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
#include "mozilla/a11y/COMPtrTypes.h"
|
||||
|
||||
#include "Accessible2_3.h"
|
||||
#include "MainThreadUtils.h"
|
||||
#include "mozilla/a11y/Accessible.h"
|
||||
#include "mozilla/a11y/Platform.h"
|
||||
|
@ -16,7 +16,6 @@
|
||||
#include "mozilla/a11y/Platform.h"
|
||||
#include "RelationType.h"
|
||||
#include "mozilla/a11y/Role.h"
|
||||
#include "xpcAccessibleDocument.h"
|
||||
|
||||
#include <comutil.h>
|
||||
|
||||
|
@ -8,8 +8,6 @@
|
||||
#include "Accessible.h"
|
||||
#include "mozilla/a11y/ProxyAccessibleBase.h"
|
||||
#include "mozilla/a11y/Role.h"
|
||||
#include "nsIAccessibleText.h"
|
||||
#include "nsIAccessibleTypes.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsRect.h"
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include "HandlerRelation.h"
|
||||
|
||||
#include "Factory.h"
|
||||
#include "HandlerData.h"
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/a11y/HandlerDataCleanup.h"
|
||||
#include "mozilla/mscom/Registration.h"
|
||||
|
@ -6,7 +6,6 @@
|
||||
#define mozilla_a11y_HandlerDataCleanup_h
|
||||
|
||||
#include <oleauto.h>
|
||||
#include "HandlerData.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
@ -6,6 +6,4 @@ FINAL_TARGET_FILES += [
|
||||
'!Accessible.tlb',
|
||||
]
|
||||
|
||||
GENERATED_FILES += [
|
||||
'Accessible.tlb',
|
||||
]
|
||||
GeneratedFile('Accessible.tlb')
|
||||
|
@ -141,7 +141,7 @@ var Utils = {
|
||||
let args = aDetails.args;
|
||||
let count = aDetails.count;
|
||||
if (args) {
|
||||
str = bundle.formatStringFromName(string, args, args.length);
|
||||
str = bundle.formatStringFromName(string, args);
|
||||
} else {
|
||||
str = bundle.GetStringFromName(string);
|
||||
}
|
||||
|
@ -9,8 +9,6 @@
|
||||
|
||||
#include "Accessible-inl.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsIAccessibleRelation.h"
|
||||
#include "nsIAccessibleEditableText.h"
|
||||
#include "nsIPersistentProperties2.h"
|
||||
#include "DocAccessibleParent.h"
|
||||
#include "Relation.h"
|
||||
|
@ -19,7 +19,7 @@ const defaultAttributes = {
|
||||
"text-indent": "0px",
|
||||
id: "textbox",
|
||||
tag: "input",
|
||||
display: "inline",
|
||||
display: "inline-block",
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -192,7 +192,7 @@
|
||||
is(anode, node.accessibleNode, "an AccessibleNode is properly cached");
|
||||
|
||||
// Adopting node to another document doesn't change .accessibleNode
|
||||
let anotherDoc = document.implementation.createDocument("", "", null);
|
||||
let anotherDoc = ifrDoc.implementation.createDocument("", "", null);
|
||||
let adopted_node = anotherDoc.adoptNode(node);
|
||||
is(anode, adopted_node.accessibleNode, "adopting node to another document doesn't change node.accessibleNode");
|
||||
|
||||
|
@ -23,11 +23,9 @@
|
||||
testCSSAttrs("display_mozbox");
|
||||
testCSSAttrs("display_mozinlinebox");
|
||||
testCSSAttrs("display_mozgrid");
|
||||
testCSSAttrs("display_mozinlinegrid");
|
||||
testCSSAttrs("display_mozgridgroup");
|
||||
testCSSAttrs("display_mozgridline");
|
||||
testCSSAttrs("display_mozstack");
|
||||
testCSSAttrs("display_mozinlinestack");
|
||||
testCSSAttrs("display_mozdeck");
|
||||
testCSSAttrs("display_mozpopup");
|
||||
testCSSAttrs("display_mozgroupbox");
|
||||
@ -58,11 +56,9 @@
|
||||
<vbox id="display_mozbox" style="display: -moz-box;" role="img"/>
|
||||
<vbox id="display_mozinlinebox" style="display: -moz-inline-box;" role="img"/>
|
||||
<vbox id="display_mozgrid" style="display: -moz-grid;" role="img"/>
|
||||
<vbox id="display_mozinlinegrid" style="display: -moz-inline-grid;" role="img"/>
|
||||
<vbox id="display_mozgridgroup" style="display: -moz-grid-group;" role="img"/>
|
||||
<vbox id="display_mozgridline" style="display: -moz-grid-line;" role="img"/>
|
||||
<vbox id="display_mozstack" style="display: -moz-stack;" role="img"/>
|
||||
<vbox id="display_mozinlinestack" style="display: -moz-inline-stack;" role="img"/>
|
||||
<vbox id="display_mozdeck" style="display: -moz-deck;" role="img"/>
|
||||
<vbox id="display_mozpopup" style="display: -moz-popup;" role="img"/>
|
||||
<vbox id="display_mozgroupbox" style="display: -moz-groupbox;" role="img"/>
|
||||
|
@ -939,23 +939,6 @@
|
||||
};
|
||||
testElm("kbd_container", obj);
|
||||
|
||||
// ////////////////////////////////////////////////////////////////////////
|
||||
// HTML:keygen
|
||||
|
||||
obj = {
|
||||
role: ROLE_COMBOBOX,
|
||||
states: STATE_COLLAPSED | STATE_HASPOPUP,
|
||||
extraStates: EXT_STATE_EXPANDABLE,
|
||||
actions: "open",
|
||||
children: [
|
||||
{ COMBOBOX_LIST: [
|
||||
{ role: ROLE_COMBOBOX_OPTION }, // high grade
|
||||
{ role: ROLE_COMBOBOX_OPTION }, // medium grade
|
||||
] },
|
||||
],
|
||||
};
|
||||
testElm("keygen", obj);
|
||||
|
||||
// ////////////////////////////////////////////////////////////////////////
|
||||
// HTML:label
|
||||
|
||||
@ -1685,7 +1668,6 @@
|
||||
|
||||
<p id="ins_container">normal<ins>Inserted</ins></p>
|
||||
<p id="kbd_container">normal<kbd>cmd</kbd></p>
|
||||
<keygen id="keygen" name="RSA public key" challenge="123456789" keytype="RSA">
|
||||
|
||||
<label id="label">label<input id="label_input"></label>
|
||||
<label id="label_for" for="label_for_input">label</label>
|
||||
|
@ -39,7 +39,13 @@
|
||||
// change list style type
|
||||
var list = getNode("list");
|
||||
list.setAttribute("style", "list-style-type: disc;");
|
||||
getComputedStyle(list, "").color; // make style processing sync
|
||||
|
||||
// Flush both the style change and the resulting layout change.
|
||||
// Flushing style on its own is not sufficient, because that can
|
||||
// leave frames marked with NS_FRAME_IS_DIRTY, which will cause
|
||||
// nsTextFrame::GetRenderedText to report the text of a text
|
||||
// frame is empty.
|
||||
list.offsetWidth; // flush layout (which also flushes style)
|
||||
|
||||
testName("li_start", kDiscBulletText + "list start");
|
||||
testName("li_end", kDiscBulletText + "list end");
|
||||
|
@ -77,47 +77,6 @@ function testText(aIDs, aStartOffset, aEndOffset, aText, aTodoFlag) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test password text between two given offsets
|
||||
*
|
||||
* @param aIDs [in] an array of accessible IDs to test
|
||||
* @param aStartOffset [in] the start offset within the text to test
|
||||
* @param aEndOffset [in] the end offset up to which the text is tested
|
||||
* @param aText [in] the expected result from the test
|
||||
*
|
||||
* @note All this function does is test that getText doe snot expose the
|
||||
* password text itself, but something else.
|
||||
*/
|
||||
function testPasswordText(aIDs, aStartOffset, aEndOffset, aText) {
|
||||
for (var i = 0; i < aIDs.length; i++) {
|
||||
var acc = getAccessible(aIDs[i], nsIAccessibleText);
|
||||
try {
|
||||
isnot(
|
||||
acc.getText(aStartOffset, aEndOffset),
|
||||
aText,
|
||||
"getText: plain text between start and end offsets '" +
|
||||
aStartOffset +
|
||||
"', '" +
|
||||
aEndOffset +
|
||||
" for '" +
|
||||
prettyName(aIDs[i]) +
|
||||
"'"
|
||||
);
|
||||
} catch (e) {
|
||||
ok(
|
||||
false,
|
||||
"getText fails between start and end offsets '" +
|
||||
aStartOffset +
|
||||
"', '" +
|
||||
aEndOffset +
|
||||
" for '" +
|
||||
prettyName(aIDs[i]) +
|
||||
"'"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test getTextAtOffset for BOUNDARY_CHAR over different elements.
|
||||
*
|
||||
|
@ -29,7 +29,21 @@
|
||||
|
||||
IDs = [ "password" ];
|
||||
testCharacterCount(IDs, 4);
|
||||
testPasswordText(IDs, 0, 4, "test");
|
||||
let password = document.getElementById("password");
|
||||
let editor = SpecialPowers.wrap(password).editor;
|
||||
let passwordMask = editor.passwordMask;
|
||||
testText(IDs, 0, 4, `${passwordMask}${passwordMask}${passwordMask}${passwordMask}`);
|
||||
// a11y data is updated at next tick so that we need to refresh here.
|
||||
editor.unmask(0, 2);
|
||||
SpecialPowers.DOMWindowUtils.advanceTimeAndRefresh(0);
|
||||
testText(IDs, 0, 4, `te${passwordMask}${passwordMask}`);
|
||||
editor.unmask(2, 4);
|
||||
SpecialPowers.DOMWindowUtils.advanceTimeAndRefresh(0);
|
||||
testText(IDs, 0, 4, `${passwordMask}${passwordMask}st`);
|
||||
editor.unmask(0, 4);
|
||||
SpecialPowers.DOMWindowUtils.advanceTimeAndRefresh(0);
|
||||
testText(IDs, 0, 4, `test`);
|
||||
SpecialPowers.DOMWindowUtils.restoreNormalRefresh();
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
@ -597,7 +597,7 @@
|
||||
this.invoke = () => {
|
||||
// trigger a tree update.
|
||||
let doc = getNode("t9_container").contentDocument;
|
||||
doc.body.appendChild(document.createElement("p"));
|
||||
doc.body.appendChild(doc.createElement("p"));
|
||||
};
|
||||
|
||||
this.finalCheck = () => {
|
||||
|
@ -163,9 +163,6 @@ nsTreeView.prototype = {
|
||||
|
||||
this.mTree.invalidateCell(aRow, aCol);
|
||||
},
|
||||
performAction: function performAction(aAction) {},
|
||||
performActionOnRow: function performActionOnRow(aAction, aRow) {},
|
||||
performActionOnCell: function performActionOnCell(aAction, aRow, aCol) {},
|
||||
|
||||
// ////////////////////////////////////////////////////////////////////////////
|
||||
// public implementation
|
||||
|
@ -71,7 +71,7 @@ class DocProxyAccessibleWrap : public HyperTextProxyAccessibleWrap {
|
||||
|
||||
template <typename T>
|
||||
inline ProxyAccessible* HyperTextProxyFor(T* aWrapper) {
|
||||
static_assert(mozilla::IsBaseOf<IUnknown, T>::value,
|
||||
static_assert(std::is_base_of<IUnknown, T>::value,
|
||||
"only IAccessible* should be passed in");
|
||||
auto wrapper = static_cast<HyperTextProxyAccessibleWrap*>(aWrapper);
|
||||
return wrapper->IsProxy() ? wrapper->Proxy() : nullptr;
|
||||
|
@ -76,7 +76,7 @@ ia2AccessibleComponent::get_foreground(IA2Color* aForeground) {
|
||||
if (acc->IsDefunct()) return CO_E_OBJNOTCONNECTED;
|
||||
|
||||
nsIFrame* frame = acc->GetFrame();
|
||||
if (frame) *aForeground = frame->StyleColor()->mColor.ToColor();
|
||||
if (frame) *aForeground = frame->StyleText()->mColor.ToColor();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "Accessible2.h"
|
||||
#include "AccessibleHyperlink.h"
|
||||
#include "AccessibleHyperlink_i.c"
|
||||
|
||||
|
@ -11,7 +11,6 @@
|
||||
#include "nsIAccessibleTypes.h"
|
||||
|
||||
#include "nsString.h"
|
||||
#include "nsIURI.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::a11y;
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
#include "ia2AccessibleTableCell.h"
|
||||
|
||||
#include "Accessible2.h"
|
||||
#include "AccessibleTable2_i.c"
|
||||
#include "AccessibleTableCell_i.c"
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
#include "ia2AccessibleText.h"
|
||||
|
||||
#include "Accessible2.h"
|
||||
#include "AccessibleText_i.c"
|
||||
|
||||
#include "HyperTextAccessibleWrap.h"
|
||||
|
@ -5,8 +5,6 @@
|
||||
#ifndef _ACCESSIBLE_TEXT_H
|
||||
#define _ACCESSIBLE_TEXT_H
|
||||
|
||||
#include "nsIAccessibleText.h"
|
||||
|
||||
#include "AccessibleText.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -29,13 +29,11 @@
|
||||
# include "Logging.h"
|
||||
#endif
|
||||
|
||||
#include "nsIMutableArray.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIScrollableFrame.h"
|
||||
#include "mozilla/PresShell.h"
|
||||
#include "mozilla/dom/NodeInfo.h"
|
||||
#include "mozilla/dom/BrowserParent.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsNameSpaceManager.h"
|
||||
#include "nsTextFormatter.h"
|
||||
#include "nsView.h"
|
||||
@ -44,7 +42,6 @@
|
||||
#include "nsArrayUtils.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/ReverseIterator.h"
|
||||
#include "nsIXULRuntime.h"
|
||||
#include "mozilla/mscom/AsyncInvoker.h"
|
||||
#include "mozilla/mscom/Interceptor.h"
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "Accessible.h"
|
||||
#include "Accessible2.h"
|
||||
#include "ia2Accessible.h"
|
||||
#include "ia2AccessibleComponent.h"
|
||||
#include "ia2AccessibleHyperlink.h"
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include "mozilla/WindowsVersion.h"
|
||||
#include "nsExceptionHandler.h"
|
||||
#include "nsIXULRuntime.h"
|
||||
#include "nsPrintfCString.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "nsWindowsDllInterceptor.h"
|
||||
|
@ -3,7 +3,6 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "ImageAccessibleWrap.h"
|
||||
#include "nsIURI.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::a11y;
|
||||
|
@ -6,7 +6,6 @@
|
||||
#define mozilla_a11y_ImageAccessibleWrap_h__
|
||||
|
||||
#include "ImageAccessible.h"
|
||||
#include "ia2AccessibleImage.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "mozilla/Unused.h"
|
||||
#include "nsDataHashtable.h"
|
||||
#include "nsIXULRuntime.h"
|
||||
#include "sdnAccessible.h"
|
||||
|
||||
// These constants may be adjusted to modify the proportion of the Child ID
|
||||
|
@ -7,9 +7,7 @@
|
||||
#include "AccEvent.h"
|
||||
#include "Compatibility.h"
|
||||
#include "HyperTextAccessibleWrap.h"
|
||||
#include "ia2AccessibleText.h"
|
||||
#include "nsIWindowsRegKey.h"
|
||||
#include "nsIXULRuntime.h"
|
||||
#include "nsWinUtils.h"
|
||||
#include "mozilla/a11y/ProxyAccessible.h"
|
||||
#include "mozilla/mscom/ActivationContext.h"
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include "uiaRawElmProvider.h"
|
||||
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "nsIDocShell.h"
|
||||
|
||||
#include "ISimpleDOM.h"
|
||||
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include "XULListboxAccessible.h"
|
||||
|
||||
#include "ia2AccessibleTable.h"
|
||||
#include "ia2AccessibleTableCell.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
@ -12,10 +12,8 @@
|
||||
#include "mozilla/a11y/DocAccessibleParent.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "nsArrayUtils.h"
|
||||
#include "nsIArray.h"
|
||||
#include "nsICSSDeclaration.h"
|
||||
#include "mozilla/dom/Document.h"
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
#include "ProxyWrappers.h"
|
||||
|
@ -216,7 +216,8 @@ sdnAccessible::get_computedStyle(
|
||||
uint32_t index = 0, realIndex = 0;
|
||||
for (index = realIndex = 0; index < length && realIndex < aMaxStyleProperties;
|
||||
index++) {
|
||||
nsAutoString property, value;
|
||||
nsAutoCString property;
|
||||
nsAutoString value;
|
||||
|
||||
// Ignore -moz-* properties.
|
||||
cssDecl->Item(index, property);
|
||||
@ -224,7 +225,8 @@ sdnAccessible::get_computedStyle(
|
||||
cssDecl->GetPropertyValue(property, value); // Get property value
|
||||
|
||||
if (!value.IsEmpty()) {
|
||||
aStyleProperties[realIndex] = ::SysAllocString(property.get());
|
||||
aStyleProperties[realIndex] =
|
||||
::SysAllocString(NS_ConvertUTF8toUTF16(property).get());
|
||||
aStyleValues[realIndex] = ::SysAllocString(value.get());
|
||||
++realIndex;
|
||||
}
|
||||
@ -253,8 +255,9 @@ sdnAccessible::get_computedStyleForProperties(
|
||||
for (index = 0; index < aNumStyleProperties; index++) {
|
||||
nsAutoString value;
|
||||
if (aStyleProperties[index])
|
||||
cssDecl->GetPropertyValue(nsDependentString(aStyleProperties[index]),
|
||||
value); // Get property value
|
||||
cssDecl->GetPropertyValue(
|
||||
NS_ConvertUTF16toUTF8(nsDependentString(aStyleProperties[index])),
|
||||
value); // Get property value
|
||||
aStyleValues[index] = ::SysAllocString(value.get());
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from __future__ import absolute_import
|
||||
import sys
|
||||
import os
|
||||
|
||||
|
@ -54,11 +54,15 @@ else:
|
||||
'/accessible/other',
|
||||
]
|
||||
|
||||
GENERATED_FILES += [('xpcAccEvents.h', 'xpcAccEvents.cpp')]
|
||||
|
||||
xpc_acc = GENERATED_FILES[('xpcAccEvents.h', 'xpcAccEvents.cpp')]
|
||||
xpc_acc.script = 'AccEventGen.py:gen_files'
|
||||
xpc_acc.inputs += ['AccEvents.conf', '!/xpcom/idl-parser/xpidl/xpidllex.py', '!/xpcom/idl-parser/xpidl/xpidlyacc.py']
|
||||
GeneratedFile(
|
||||
'xpcAccEvents.h', 'xpcAccEvents.cpp',
|
||||
script='AccEventGen.py', entry_point='gen_files',
|
||||
inputs=[
|
||||
'AccEvents.conf',
|
||||
'!/xpcom/idl-parser/xpidl/xpidllex.py',
|
||||
'!/xpcom/idl-parser/xpidl/xpidlyacc.py',
|
||||
])
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "Accessible-inl.h"
|
||||
#include "xpcAccessibleDocument.h"
|
||||
#include "nsNetUtil.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
@ -7,7 +7,6 @@
|
||||
#include "Accessible-inl.h"
|
||||
#include "HyperTextAccessible-inl.h"
|
||||
#include "TextRange.h"
|
||||
#include "xpcAccessibleDocument.h"
|
||||
#include "xpcAccessibleTextRange.h"
|
||||
|
||||
#include "nsIPersistentProperties2.h"
|
||||
|
@ -3,7 +3,6 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "Accessible-inl.h"
|
||||
#include "xpcAccessibleDocument.h"
|
||||
|
||||
#include "nsIMutableArray.h"
|
||||
|
||||
|
@ -6,7 +6,6 @@
|
||||
|
||||
#include "Accessible.h"
|
||||
#include "TableAccessible.h"
|
||||
#include "xpcAccessibleDocument.h"
|
||||
|
||||
#include "nsIMutableArray.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include "nsIAccessibleTable.h"
|
||||
#include "TableAccessible.h"
|
||||
#include "TableCellAccessible.h"
|
||||
#include "xpcAccessibleDocument.h"
|
||||
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsIMutableArray.h"
|
||||
|
@ -5,7 +5,6 @@
|
||||
#include "xpcAccessibleTextRange.h"
|
||||
|
||||
#include "TextRange-inl.h"
|
||||
#include "xpcAccessibleDocument.h"
|
||||
|
||||
#include "nsIMutableArray.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
|
@ -13,7 +13,6 @@
|
||||
|
||||
#include "nsIAutoCompleteInput.h"
|
||||
#include "nsIDOMXULMenuListElement.h"
|
||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
@ -72,7 +71,7 @@ void XULComboboxAccessible::Description(nsString& aDescription) {
|
||||
nsCOMPtr<nsIDOMXULMenuListElement> menuListElm = Elm()->AsXULMenuList();
|
||||
if (!menuListElm) return;
|
||||
|
||||
nsCOMPtr<Element> focusedOptionItem;
|
||||
nsCOMPtr<dom::Element> focusedOptionItem;
|
||||
menuListElm->GetSelectedItem(getter_AddRefs(focusedOptionItem));
|
||||
if (focusedOptionItem && mDoc) {
|
||||
Accessible* focusedOptionAcc = mDoc->GetAccessible(focusedOptionItem);
|
||||
|
@ -204,12 +204,11 @@ already_AddRefed<nsIURI> XULLinkAccessible::AnchorURIAt(
|
||||
nsAutoString href;
|
||||
mContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::href, href);
|
||||
|
||||
nsCOMPtr<nsIURI> baseURI = mContent->GetBaseURI();
|
||||
dom::Document* document = mContent->OwnerDoc();
|
||||
|
||||
nsCOMPtr<nsIURI> anchorURI;
|
||||
NS_NewURI(getter_AddRefs(anchorURI), href,
|
||||
document->GetDocumentCharacterSet(), baseURI);
|
||||
document->GetDocumentCharacterSet(), mContent->GetBaseURI());
|
||||
|
||||
return anchorURI.forget();
|
||||
}
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include "HTMLFormControlAccessible.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "DocAccessible.h"
|
||||
#include "nsIAccessibleRelation.h"
|
||||
#include "Relation.h"
|
||||
#include "Role.h"
|
||||
#include "States.h"
|
||||
@ -19,7 +18,6 @@
|
||||
#include "nsIDOMXULMenuListElement.h"
|
||||
#include "nsIDOMXULRadioGroupElement.h"
|
||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||
#include "nsIEditor.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsITextControlFrame.h"
|
||||
#include "nsMenuPopupFrame.h"
|
||||
@ -311,7 +309,7 @@ Accessible* XULRadioGroupAccessible::CurrentItem() const {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RefPtr<Element> currentItemElm;
|
||||
RefPtr<dom::Element> currentItemElm;
|
||||
nsCOMPtr<nsIDOMXULRadioGroupElement> group =
|
||||
mSelectControl->AsXULRadioGroup();
|
||||
if (group) {
|
||||
@ -333,7 +331,7 @@ void XULRadioGroupAccessible::SetCurrentItem(const Accessible* aItem) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<Element> itemElm = aItem->Elm();
|
||||
nsCOMPtr<dom::Element> itemElm = aItem->Elm();
|
||||
nsCOMPtr<nsIDOMXULRadioGroupElement> group =
|
||||
mSelectControl->AsXULRadioGroup();
|
||||
if (group) {
|
||||
|
@ -12,14 +12,11 @@
|
||||
#include "States.h"
|
||||
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsIAutoCompleteInput.h"
|
||||
#include "nsIAutoCompletePopup.h"
|
||||
#include "nsIDOMXULMenuListElement.h"
|
||||
#include "nsIDOMXULMultSelectCntrlEl.h"
|
||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||
#include "nsIMutableArray.h"
|
||||
#include "nsINodeList.h"
|
||||
#include "nsIPersistentProperties2.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
@ -107,7 +104,7 @@ void XULListboxAccessible::Value(nsString& aValue) const {
|
||||
|
||||
nsCOMPtr<nsIDOMXULSelectControlElement> select = Elm()->AsXULSelectControl();
|
||||
if (select) {
|
||||
RefPtr<Element> element;
|
||||
RefPtr<dom::Element> element;
|
||||
select->GetSelectedItem(getter_AddRefs(element));
|
||||
|
||||
if (element) {
|
||||
@ -149,7 +146,7 @@ Accessible* XULListboxAccessible::CellAt(uint32_t aRowIndex,
|
||||
nsCOMPtr<nsIDOMXULSelectControlElement> control = Elm()->AsXULSelectControl();
|
||||
NS_ENSURE_TRUE(control, nullptr);
|
||||
|
||||
RefPtr<Element> element;
|
||||
RefPtr<dom::Element> element;
|
||||
control->GetItemAtIndex(aRowIndex, getter_AddRefs(element));
|
||||
if (!element) return nullptr;
|
||||
|
||||
@ -176,7 +173,7 @@ bool XULListboxAccessible::IsRowSelected(uint32_t aRowIdx) {
|
||||
nsCOMPtr<nsIDOMXULSelectControlElement> control = Elm()->AsXULSelectControl();
|
||||
NS_ASSERTION(control, "Doesn't implement nsIDOMXULSelectControlElement.");
|
||||
|
||||
RefPtr<Element> element;
|
||||
RefPtr<dom::Element> element;
|
||||
nsresult rv = control->GetItemAtIndex(aRowIdx, getter_AddRefs(element));
|
||||
NS_ENSURE_SUCCESS(rv, false);
|
||||
if (!element) {
|
||||
@ -341,7 +338,7 @@ void XULListboxAccessible::SelectRow(uint32_t aRowIdx) {
|
||||
NS_ASSERTION(control,
|
||||
"Doesn't implement nsIDOMXULMultiSelectControlElement.");
|
||||
|
||||
RefPtr<Element> item;
|
||||
RefPtr<dom::Element> item;
|
||||
control->GetItemAtIndex(aRowIdx, getter_AddRefs(item));
|
||||
if (!item) {
|
||||
return;
|
||||
@ -358,7 +355,7 @@ void XULListboxAccessible::UnselectRow(uint32_t aRowIdx) {
|
||||
NS_ASSERTION(control,
|
||||
"Doesn't implement nsIDOMXULMultiSelectControlElement.");
|
||||
|
||||
RefPtr<Element> item;
|
||||
RefPtr<dom::Element> item;
|
||||
control->GetItemAtIndex(aRowIdx, getter_AddRefs(item));
|
||||
if (!item) {
|
||||
return;
|
||||
@ -451,7 +448,7 @@ Accessible* XULListitemAccessible::GetListAccessible() const {
|
||||
Elm()->AsXULSelectControlItem();
|
||||
if (!listItem) return nullptr;
|
||||
|
||||
RefPtr<Element> listElement;
|
||||
RefPtr<dom::Element> listElement;
|
||||
listItem->GetControl(getter_AddRefs(listElement));
|
||||
if (!listElement) return nullptr;
|
||||
|
||||
|
@ -8,8 +8,6 @@
|
||||
#include "BaseAccessibles.h"
|
||||
#include "TableAccessible.h"
|
||||
#include "TableCellAccessible.h"
|
||||
#include "xpcAccessibleTable.h"
|
||||
#include "xpcAccessibleTableCell.h"
|
||||
#include "XULMenuAccessible.h"
|
||||
#include "XULSelectControlAccessible.h"
|
||||
|
||||
|
@ -12,11 +12,8 @@
|
||||
#include "States.h"
|
||||
#include "XULFormControlAccessible.h"
|
||||
|
||||
#include "nsIMutableArray.h"
|
||||
#include "nsIDOMXULContainerElement.h"
|
||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||
#include "nsIDOMXULMultSelectCntrlEl.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsMenuBarFrame.h"
|
||||
#include "nsMenuPopupFrame.h"
|
||||
@ -52,8 +49,8 @@ uint64_t XULMenuitemAccessible::NativeState() const {
|
||||
}
|
||||
|
||||
// Checkable/checked?
|
||||
static Element::AttrValuesArray strings[] = {nsGkAtoms::radio,
|
||||
nsGkAtoms::checkbox, nullptr};
|
||||
static dom::Element::AttrValuesArray strings[] = {
|
||||
nsGkAtoms::radio, nsGkAtoms::checkbox, nullptr};
|
||||
|
||||
if (mContent->AsElement()->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::type,
|
||||
strings, eCaseMatters) >= 0) {
|
||||
@ -182,7 +179,7 @@ KeyBinding XULMenuitemAccessible::KeyboardShortcut() const {
|
||||
mContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::key, keyElmId);
|
||||
if (keyElmId.IsEmpty()) return KeyBinding();
|
||||
|
||||
Element* keyElm = mContent->OwnerDoc()->GetElementById(keyElmId);
|
||||
dom::Element* keyElm = mContent->OwnerDoc()->GetElementById(keyElmId);
|
||||
if (!keyElm) return KeyBinding();
|
||||
|
||||
uint32_t key = 0;
|
||||
|
@ -6,7 +6,6 @@
|
||||
#define mozilla_a11y_XULMenuAccessible_h__
|
||||
|
||||
#include "AccessibleWrap.h"
|
||||
#include "nsIDOMXULSelectCntrlEl.h"
|
||||
#include "XULSelectControlAccessible.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -9,8 +9,6 @@
|
||||
|
||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||
#include "nsIDOMXULMultSelectCntrlEl.h"
|
||||
#include "nsIMutableArray.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/KeyboardEventBinding.h"
|
||||
@ -48,7 +46,7 @@ void XULSelectControlAccessible::SelectedItems(nsTArray<Accessible*>* aItems) {
|
||||
int32_t length = 0;
|
||||
xulMultiSelect->GetSelectedCount(&length);
|
||||
for (int32_t index = 0; index < length; index++) {
|
||||
RefPtr<Element> element;
|
||||
RefPtr<dom::Element> element;
|
||||
xulMultiSelect->MultiGetSelectedItem(index, getter_AddRefs(element));
|
||||
Accessible* item = mDoc->GetAccessible(element);
|
||||
if (item) aItems->AppendElement(item);
|
||||
@ -56,7 +54,7 @@ void XULSelectControlAccessible::SelectedItems(nsTArray<Accessible*>* aItems) {
|
||||
} else { // Single select?
|
||||
nsCOMPtr<nsIDOMXULSelectControlElement> selectControl =
|
||||
mSelectControl->AsXULSelectControl();
|
||||
RefPtr<Element> element;
|
||||
RefPtr<dom::Element> element;
|
||||
selectControl->GetSelectedItem(getter_AddRefs(element));
|
||||
if (element) {
|
||||
Accessible* item = mDoc->GetAccessible(element);
|
||||
@ -69,7 +67,7 @@ Accessible* XULSelectControlAccessible::GetSelectedItem(uint32_t aIndex) {
|
||||
nsCOMPtr<nsIDOMXULMultiSelectControlElement> multiSelectControl =
|
||||
mSelectControl->AsXULMultiSelectControl();
|
||||
|
||||
RefPtr<Element> element;
|
||||
RefPtr<dom::Element> element;
|
||||
if (multiSelectControl) {
|
||||
multiSelectControl->MultiGetSelectedItem(aIndex, getter_AddRefs(element));
|
||||
} else if (aIndex == 0) {
|
||||
@ -208,7 +206,7 @@ bool XULSelectControlAccessible::SelectAll() {
|
||||
Accessible* XULSelectControlAccessible::CurrentItem() const {
|
||||
if (!mSelectControl) return nullptr;
|
||||
|
||||
RefPtr<Element> currentItemElm;
|
||||
RefPtr<dom::Element> currentItemElm;
|
||||
nsCOMPtr<nsIDOMXULMultiSelectControlElement> multiSelectControl =
|
||||
mSelectControl->AsXULMultiSelectControl();
|
||||
if (multiSelectControl) {
|
||||
@ -232,7 +230,7 @@ Accessible* XULSelectControlAccessible::CurrentItem() const {
|
||||
void XULSelectControlAccessible::SetCurrentItem(const Accessible* aItem) {
|
||||
if (!mSelectControl) return;
|
||||
|
||||
nsCOMPtr<Element> itemElm = aItem->Elm();
|
||||
nsCOMPtr<dom::Element> itemElm = aItem->Elm();
|
||||
nsCOMPtr<nsIDOMXULMultiSelectControlElement> multiSelectControl =
|
||||
itemElm->AsXULMultiSelectControl();
|
||||
if (multiSelectControl) {
|
||||
|
@ -6,7 +6,6 @@
|
||||
#define mozilla_a11y_XULSelectControlAccessible_h__
|
||||
|
||||
#include "AccessibleWrap.h"
|
||||
#include "nsIDOMXULSelectCntrlEl.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
@ -37,7 +36,7 @@ class XULSelectControlAccessible : public AccessibleWrap {
|
||||
virtual void SetCurrentItem(const Accessible* aItem) override;
|
||||
|
||||
protected:
|
||||
RefPtr<Element> mSelectControl;
|
||||
RefPtr<dom::Element> mSelectControl;
|
||||
};
|
||||
|
||||
} // namespace a11y
|
||||
|
@ -12,7 +12,6 @@
|
||||
|
||||
// NOTE: alphabetically ordered
|
||||
#include "mozilla/dom/Document.h"
|
||||
#include "nsIDOMXULSelectCntrlEl.h"
|
||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||
#include "nsIDOMXULRelatedElement.h"
|
||||
#include "nsXULElement.h"
|
||||
|
@ -18,13 +18,9 @@
|
||||
#include "nsQueryObject.h"
|
||||
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsIAccessibleRelation.h"
|
||||
#include "nsIAutoCompleteInput.h"
|
||||
#include "nsIAutoCompletePopup.h"
|
||||
#include "nsIDOMXULMenuListElement.h"
|
||||
#include "nsIDOMXULMultSelectCntrlEl.h"
|
||||
#include "nsITreeSelection.h"
|
||||
#include "nsIMutableArray.h"
|
||||
#include "nsTreeBodyFrame.h"
|
||||
#include "nsTreeColumns.h"
|
||||
#include "nsTreeUtils.h"
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user