mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge from cvs-trunk-mirror to mozilla-central.
--HG-- rename : js/src/js.c => js/src/js.cpp rename : js/src/jsapi.c => js/src/jsapi.cpp rename : js/src/jsarray.c => js/src/jsarray.cpp rename : js/src/jsatom.c => js/src/jsatom.cpp rename : js/src/jsbool.c => js/src/jsbool.cpp rename : js/src/jsdbgapi.c => js/src/jsdbgapi.cpp rename : js/src/jsemit.c => js/src/jsemit.cpp rename : js/src/jsfun.c => js/src/jsfun.cpp rename : js/src/jsgc.c => js/src/jsgc.cpp rename : js/src/jsinterp.c => js/src/jsinterp.cpp rename : js/src/jsiter.c => js/src/jsiter.cpp rename : js/src/jslock.c => js/src/jslock.cpp rename : js/src/jsobj.c => js/src/jsobj.cpp rename : js/src/jsopcode.c => js/src/jsopcode.cpp rename : js/src/jsparse.c => js/src/jsparse.cpp rename : js/src/jsstr.c => js/src/jsstr.cpp rename : js/src/jsxml.c => js/src/jsxml.cpp
This commit is contained in:
commit
bbea725a53
314
README.txt
314
README.txt
@ -1,306 +1,20 @@
|
|||||||
==============================================================
|
For information on how to build Mozilla from the source code, see:
|
||||||
|
|
||||||
= = = = = = = = = = Mozilla Read Me = = = = = = = = = = =
|
http://developer.mozilla.org/en/docs/Build_Documentation
|
||||||
|
|
||||||
==============================================================
|
To have your bug fix / feature added to Mozilla, you should create a patch and
|
||||||
|
submit it to Bugzilla (http://bugzilla.mozilla.org). Instructions are at:
|
||||||
|
|
||||||
Mozilla is subject to the terms detailed in the license
|
http://developer.mozilla.org/en/docs/Creating_a_patch
|
||||||
agreement accompanying it.
|
http://developer.mozilla.org/en/docs/Getting_your_patch_in_the_tree
|
||||||
|
|
||||||
This Read Me file contains information about system
|
If you have a question about developing Mozilla, and can't find the solution
|
||||||
requirements and installation instructions for the Windows,
|
on http://developer.mozilla.org, you can try asking your question in a
|
||||||
Mac OS, and Linux builds of Mozilla.
|
mozilla.* Usenet group, or on IRC at irc.mozilla.org. [The Mozilla news groups
|
||||||
|
are accessible on Google Groups, or news.mozilla.org with a NNTP reader.]
|
||||||
|
|
||||||
For more info on Mozilla, see www.mozilla.org. To submit bugs
|
You can download nightly development builds from the the Mozilla FTP server.
|
||||||
or other feedback, see the Navigator QA menu and check out
|
Keep in mind that nightly builds, which are used by Mozilla developers for
|
||||||
Bugzilla at http://bugzilla.mozilla.org for links to known
|
testing, may be buggy. Firefox nightlies, for example, can be found at:
|
||||||
bugs, bug-writing guidelines, and more. You can also get help
|
|
||||||
with Bugzilla by pointing your IRC client to #mozillazine
|
|
||||||
at irc.mozilla.org.
|
|
||||||
|
|
||||||
|
ftp://ftp.mozilla.org/pub/firefox/nightly/latest-trunk/
|
||||||
==============================================================
|
|
||||||
|
|
||||||
Getting Mozilla
|
|
||||||
|
|
||||||
==============================================================
|
|
||||||
|
|
||||||
You can download nightly builds of Mozilla from the
|
|
||||||
Mozilla.org FTP site at
|
|
||||||
|
|
||||||
ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/nightly/
|
|
||||||
|
|
||||||
For the very latest builds, see
|
|
||||||
|
|
||||||
ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/nightly/latest-trunk
|
|
||||||
|
|
||||||
Keep in mind that nightly builds, which are used by
|
|
||||||
Mozilla.org developers for testing, may be buggy. If you are
|
|
||||||
looking for a more polished version of Mozilla, Mozilla.org
|
|
||||||
releases Milestone builds of Mozilla every six weeks or so
|
|
||||||
that you can download from
|
|
||||||
|
|
||||||
http://www.mozilla.org/releases
|
|
||||||
|
|
||||||
Be sure to read the Mozilla release notes for information
|
|
||||||
on known problems and installation issues with Mozilla.
|
|
||||||
The release notes can be found at the preceding URL along
|
|
||||||
with the milestone releases themselves.
|
|
||||||
|
|
||||||
Note: Please use Talkback builds whenever possible. These
|
|
||||||
builds allow transmission of crash data back to Mozilla
|
|
||||||
developers, improved crash analysis, and posting of crash
|
|
||||||
information to our crash-data newsgroup.
|
|
||||||
|
|
||||||
|
|
||||||
==============================================================
|
|
||||||
|
|
||||||
System Requirements
|
|
||||||
|
|
||||||
==============================================================
|
|
||||||
|
|
||||||
*All Platforms
|
|
||||||
|
|
||||||
To view and use the new streamlined "Modern" theme,
|
|
||||||
your display monitor should be set to display
|
|
||||||
thousands of colors. For users who cannot set their
|
|
||||||
displays to use more than 256 colors, Mozilla.org
|
|
||||||
recommends using the "Classic" theme for Mozilla.
|
|
||||||
|
|
||||||
To select the Modern theme after you have installed
|
|
||||||
Mozilla, from the Navigator browser, open the View
|
|
||||||
menu, and then open then open the Apply Theme submenu
|
|
||||||
and choose Modern.
|
|
||||||
|
|
||||||
*Mac OS
|
|
||||||
|
|
||||||
-Mac OS X or later
|
|
||||||
-PowerPC processor (266 MHz or faster recommended)
|
|
||||||
-64 MB RAM
|
|
||||||
-36 MB of free hard disk space
|
|
||||||
|
|
||||||
*Windows
|
|
||||||
|
|
||||||
-Windows 95, 98, Me, NT4, 2000 or XP
|
|
||||||
-Intel Pentium class processor (233 MHz or faster
|
|
||||||
recommended)
|
|
||||||
-64 MB RAM
|
|
||||||
-26 MB free hard disk space
|
|
||||||
|
|
||||||
*Linux
|
|
||||||
|
|
||||||
-The following library versions (or compatible) are
|
|
||||||
required: glibc 2.1, XFree86 3.3.x, GTK 1.2.x, Glib
|
|
||||||
1.2.x, Libstdc++ 2.9.0. Red Hat Linux 6.0,
|
|
||||||
Debian 2.1, and SuSE 6.2 (or later) installations
|
|
||||||
should work.
|
|
||||||
-Red Hat 6.x users who want to install the Mozilla
|
|
||||||
RPM must have at least version 4.0.2 of rpm
|
|
||||||
installed.
|
|
||||||
-Intel Pentium class processor (233 MHz or faster
|
|
||||||
recommended)
|
|
||||||
-64MB RAM
|
|
||||||
-26MB free hard disk space
|
|
||||||
|
|
||||||
|
|
||||||
==============================================================
|
|
||||||
|
|
||||||
Installation Instructions
|
|
||||||
|
|
||||||
==============================================================
|
|
||||||
|
|
||||||
For Mac OS and Windows users, it is strongly recommended that
|
|
||||||
you exit all programs before running the setup program. Also,
|
|
||||||
you should temporarily disable virus-detection software.
|
|
||||||
|
|
||||||
For Linux users, note that the installation instructions use
|
|
||||||
the bash shell. If you're not using bash, adjust the commands
|
|
||||||
accordingly.
|
|
||||||
|
|
||||||
For all platforms, install into a clean (new) directory.
|
|
||||||
Installing on top of previously released builds may cause
|
|
||||||
problems.
|
|
||||||
|
|
||||||
Note: These instructions do not tell you how to build Mozilla.
|
|
||||||
For info on building the Mozilla source, see
|
|
||||||
|
|
||||||
http://www.mozilla.org/source.html
|
|
||||||
|
|
||||||
|
|
||||||
Windows Installation Instructions
|
|
||||||
---------------------------------
|
|
||||||
|
|
||||||
Note: For Windows NT/2000/XP systems, you need Administrator
|
|
||||||
privileges to install Mozilla. If you see an "Error 5" message
|
|
||||||
during installation, make sure you're running the installation
|
|
||||||
with Administrator privileges.
|
|
||||||
|
|
||||||
|
|
||||||
To install Mozilla by downloading the Mozilla installer,
|
|
||||||
follow these steps:
|
|
||||||
|
|
||||||
1. Click the the mozilla-win32-installer.exe link on
|
|
||||||
the site you're downloading Mozilla from to download
|
|
||||||
the installer file to your machine.
|
|
||||||
|
|
||||||
2. Navigate to where you downloaded the file and
|
|
||||||
double-click the Mozilla program icon on your machine
|
|
||||||
to begin the Setup program.
|
|
||||||
|
|
||||||
3. Follow the on-screen instructions in the setup
|
|
||||||
program. The program starts automatically the first
|
|
||||||
time.
|
|
||||||
|
|
||||||
|
|
||||||
To install Mozilla by downloading the .zip file and
|
|
||||||
installing manually, follow these steps:
|
|
||||||
|
|
||||||
1. Click the mozilla-win32-talkback.zip link or the
|
|
||||||
mozilla-win32.zip link on the site you're down-
|
|
||||||
loading Mozilla from to download the .zip file to
|
|
||||||
your machine.
|
|
||||||
|
|
||||||
2. Navigate to where you downloaded the file and
|
|
||||||
double-click the compressed file.
|
|
||||||
|
|
||||||
Note: This step assumes you already have a recent
|
|
||||||
version of WinZip installed, and that you know how to
|
|
||||||
use it. If not, you can get WinZip and information
|
|
||||||
about the program at www.winzip.com.
|
|
||||||
|
|
||||||
3. Extract the .zip file to a directory such as
|
|
||||||
C:\Program Files\mozilla.org\Mozilla.
|
|
||||||
|
|
||||||
4. To start Mozilla, navigate to the directory you
|
|
||||||
extracted Mozilla to and double-click the Mozilla.exe
|
|
||||||
icon.
|
|
||||||
|
|
||||||
|
|
||||||
Mac OS X Installation Instructions
|
|
||||||
----------------------------------
|
|
||||||
|
|
||||||
To install Mozilla by downloading the Mozilla disk image,
|
|
||||||
follow these steps:
|
|
||||||
|
|
||||||
1. Click the mozilla-mac-MachO.dmg.gz link to download
|
|
||||||
it to your machine. By default, the download file is
|
|
||||||
downloaded to your desktop.
|
|
||||||
|
|
||||||
2. Once you have downloaded the .dmg.gz file, drag it
|
|
||||||
onto Stuffit Expander to decompress it. If the disk
|
|
||||||
image doesn't mount automatically, double-click on the
|
|
||||||
.dmg file to mount it. If that fails, and the file
|
|
||||||
does not look like a disk image file, do a "Show Info"
|
|
||||||
on the file, and, in the "Open with application"
|
|
||||||
category, choose Disk Copy. In Mac OS 10.2, you can
|
|
||||||
use "Open with" from the context menu.
|
|
||||||
|
|
||||||
3. Once the disk image mounts, open it, and drag the
|
|
||||||
Mozilla icon onto your hard disk.
|
|
||||||
|
|
||||||
4. We recommend that you copy it to the Applications
|
|
||||||
folder.
|
|
||||||
|
|
||||||
5. Now Eject the disk image.
|
|
||||||
|
|
||||||
6. If you like, you can drag Mozilla to your dock to
|
|
||||||
have it easily accessible at all times. You might also
|
|
||||||
wish to select Mozilla as your default browser in the
|
|
||||||
Internet system preferences pane (under the Web tab).
|
|
||||||
|
|
||||||
|
|
||||||
Linux Installation Instructions
|
|
||||||
-------------------------------
|
|
||||||
|
|
||||||
Note: If you install in the default directory (which is
|
|
||||||
usually /usr/local/mozilla), or any other directory where
|
|
||||||
only the root user normally has write-access, you must
|
|
||||||
start Mozilla first as root before other users can start
|
|
||||||
the program. Doing so generates a set of files required
|
|
||||||
for later use by other users.
|
|
||||||
|
|
||||||
|
|
||||||
To install Mozilla by downloading the Mozilla installer,
|
|
||||||
follow these steps:
|
|
||||||
|
|
||||||
1. Create a directory named mozilla (mkdir mozilla)
|
|
||||||
and change to that directory (cd mozilla).
|
|
||||||
|
|
||||||
2. Click the link on the site you're downloading
|
|
||||||
Mozilla from to download the installer file
|
|
||||||
(called mozilla-1686-pc-linux-gnu-installer.tar.gz)
|
|
||||||
to your machine.
|
|
||||||
|
|
||||||
3. Change to the mozilla directory (cd mozilla) and
|
|
||||||
decompress the archive with the following command:
|
|
||||||
|
|
||||||
tar zxvf moz*.tar.gz
|
|
||||||
|
|
||||||
The installer is now located in a subdirectory of
|
|
||||||
Mozilla named mozilla-installer.
|
|
||||||
|
|
||||||
4. Change to the mozilla-installer directory
|
|
||||||
(cd mozilla-installer) and run the installer with the
|
|
||||||
./mozilla-installer command.
|
|
||||||
|
|
||||||
5. Follow the instructions in the install wizard for
|
|
||||||
installing Mozilla.
|
|
||||||
|
|
||||||
Note: If you have a slower machine, be aware that the
|
|
||||||
installation may take some time. In this case, the
|
|
||||||
installation progress may appear to hang indefinitely,
|
|
||||||
even though the installation is still in process.
|
|
||||||
|
|
||||||
6. To start Mozilla, change to the directory where you
|
|
||||||
installed it and run the ./mozilla command.
|
|
||||||
|
|
||||||
|
|
||||||
To install Mozilla by downloading the tar.gz file:
|
|
||||||
|
|
||||||
1. Create a directory named "mozilla" (mkdir mozilla)
|
|
||||||
and change to that directory (cd mozilla).
|
|
||||||
|
|
||||||
2. Click the link on the site you're downloading
|
|
||||||
Mozilla from to download the non-installer
|
|
||||||
(mozilla*.tar.gz) file into the mozilla directory.
|
|
||||||
|
|
||||||
3. Change to the mozilla directory (cd mozilla) and
|
|
||||||
decompress the file with the following command:
|
|
||||||
|
|
||||||
tar zxvf moz*.tar.gz
|
|
||||||
|
|
||||||
This creates a "mozilla" directory under your mozilla
|
|
||||||
directory.
|
|
||||||
|
|
||||||
4. Change to the mozilla directory (cd mozilla).
|
|
||||||
|
|
||||||
5. Run Mozilla with the following run script:
|
|
||||||
|
|
||||||
./mozilla
|
|
||||||
|
|
||||||
|
|
||||||
To hook up Mozilla complete with icon to the GNOME Panel,
|
|
||||||
follow these steps:
|
|
||||||
|
|
||||||
1. Click the GNOME Main Menu button, open the Panel menu,
|
|
||||||
and then open the Add to Panel submenu and choose Launcher.
|
|
||||||
|
|
||||||
2. Right-click the icon for Mozilla on the Panel and
|
|
||||||
enter the following command:
|
|
||||||
directory_name./mozilla
|
|
||||||
|
|
||||||
where directory_name is the name of the directory
|
|
||||||
you downloaded mozilla to. For example, the default
|
|
||||||
directory that Mozilla suggests is /usr/local/mozilla.
|
|
||||||
|
|
||||||
3. Type in a name for the icon, and type in a comment
|
|
||||||
if you wish.
|
|
||||||
|
|
||||||
4. Click the icon button and type in the following as
|
|
||||||
the icon's location:
|
|
||||||
|
|
||||||
directory_name/icons/mozicon50.xpm
|
|
||||||
|
|
||||||
where directory name is the directory where you
|
|
||||||
installed Mozilla. For example, the default directory
|
|
||||||
is /usr/local/mozilla/icons/mozicon50.xpm.
|
|
||||||
|
@ -569,3 +569,17 @@ interface nsIAccessibleCaretMoveEvent: nsIAccessibleEvent
|
|||||||
readonly attribute long caretOffset;
|
readonly attribute long caretOffset;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[scriptable, uuid(a9485c7b-5861-4695-8441-fab0235b205d)]
|
||||||
|
interface nsIAccessibleTableChangeEvent: nsIAccessibleEvent
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Return the row or column index.
|
||||||
|
*/
|
||||||
|
readonly attribute long rowOrColIndex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the number of rows or cols
|
||||||
|
*/
|
||||||
|
readonly attribute long numRowsOrCols;
|
||||||
|
};
|
||||||
|
|
||||||
|
@ -52,6 +52,12 @@ interface nsIAccessibleProvider : nsISupports
|
|||||||
* Constants set of common use.
|
* Constants set of common use.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/** Do not create an accessible for this object
|
||||||
|
* This is useful if an ancestor binding already implements nsIAccessibleProvider,
|
||||||
|
* but no accessible is desired for the inheriting binding
|
||||||
|
*/
|
||||||
|
const long NoAccessible = 0;
|
||||||
|
|
||||||
/** For elements that spawn a new document. For example now it is used by
|
/** For elements that spawn a new document. For example now it is used by
|
||||||
<xul:iframe>, <xul:browser> and <xul:editor>. */
|
<xul:iframe>, <xul:browser> and <xul:editor>. */
|
||||||
const long OuterDoc = 0x00000001;
|
const long OuterDoc = 0x00000001;
|
||||||
@ -78,32 +84,33 @@ interface nsIAccessibleProvider : nsISupports
|
|||||||
const long XULMenuitem = 0x0000100E;
|
const long XULMenuitem = 0x0000100E;
|
||||||
const long XULMenupopup = 0x0000100F;
|
const long XULMenupopup = 0x0000100F;
|
||||||
const long XULMenuSeparator = 0x00001010;
|
const long XULMenuSeparator = 0x00001010;
|
||||||
const long XULProgressMeter = 0x00001011;
|
const long XULPane = 0x00001011;
|
||||||
const long XULScale = 0x00001012;
|
const long XULProgressMeter = 0x00001012;
|
||||||
const long XULStatusBar = 0x00001013;
|
const long XULScale = 0x00001013;
|
||||||
const long XULRadioButton = 0x00001014;
|
const long XULStatusBar = 0x00001014;
|
||||||
const long XULRadioGroup = 0x00001015;
|
const long XULRadioButton = 0x00001015;
|
||||||
|
const long XULRadioGroup = 0x00001016;
|
||||||
|
|
||||||
/** The single tab in a dialog or tabbrowser/editor interface */
|
/** The single tab in a dialog or tabbrowser/editor interface */
|
||||||
const long XULTab = 0x00001016;
|
const long XULTab = 0x00001017;
|
||||||
|
|
||||||
/** A combination of a tabs object and a tabpanels object */
|
/** A combination of a tabs object and a tabpanels object */
|
||||||
const long XULTabBox = 0x00001017;
|
const long XULTabBox = 0x00001018;
|
||||||
|
|
||||||
/** The collection of tab objects, useable in the TabBox and independant of
|
/** The collection of tab objects, useable in the TabBox and independant of
|
||||||
as well */
|
as well */
|
||||||
const long XULTabs = 0x00001018;
|
const long XULTabs = 0x00001019;
|
||||||
|
|
||||||
const long XULText = 0x00001019;
|
const long XULText = 0x0000101A;
|
||||||
const long XULTextBox = 0x0000101A;
|
const long XULTextBox = 0x0000101B;
|
||||||
const long XULThumb = 0x0000101B;
|
const long XULThumb = 0x0000101C;
|
||||||
const long XULTree = 0x0000101C;
|
const long XULTree = 0x0000101D;
|
||||||
const long XULTreeColumns = 0x0000101D;
|
const long XULTreeColumns = 0x0000101E;
|
||||||
const long XULTreeColumnItem = 0x0000101E;
|
const long XULTreeColumnItem = 0x0000101F;
|
||||||
const long XULToolbar = 0x0000101F;
|
const long XULToolbar = 0x00001020;
|
||||||
const long XULToolbarSeparator = 0x00001020;
|
const long XULToolbarSeparator = 0x00001021;
|
||||||
const long XULTooltip = 0x00001021;
|
const long XULTooltip = 0x00001022;
|
||||||
const long XULToolbarButton = 0x00001022;
|
const long XULToolbarButton = 0x00001023;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -110,9 +110,9 @@ interface nsIAccessibleRole : nsISupports
|
|||||||
const unsigned long ROLE_WINDOW = 9;
|
const unsigned long ROLE_WINDOW = 9;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* XXX: document this.
|
* A sub-document (<frame> or <iframe>)
|
||||||
*/
|
*/
|
||||||
const unsigned long ROLE_CLIENT = 10;
|
const unsigned long ROLE_INTERNAL_FRAME = 10;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a menu, which presents a list of options from which the user can
|
* Represents a menu, which presents a list of options from which the user can
|
||||||
|
@ -45,7 +45,7 @@ interface nsIAccessibleEvent;
|
|||||||
%}
|
%}
|
||||||
[ptr] native nsRoleMapEntryPtr(nsRoleMapEntry);
|
[ptr] native nsRoleMapEntryPtr(nsRoleMapEntry);
|
||||||
|
|
||||||
[uuid(2d552ed0-3f38-4c7f-94c1-419de4d693ed)]
|
[uuid(893ee16d-c157-4d5f-b236-60b3b2bef6a5)]
|
||||||
interface nsPIAccessible : nsISupports
|
interface nsPIAccessible : nsISupports
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -83,12 +83,10 @@ interface nsPIAccessible : nsISupports
|
|||||||
*
|
*
|
||||||
* @param aEvent - DOM event
|
* @param aEvent - DOM event
|
||||||
* @param aTarget - target of DOM event
|
* @param aTarget - target of DOM event
|
||||||
* @param aData - additional information for accessible event.
|
|
||||||
*
|
*
|
||||||
* XXX: eventually this method will be removed (see bug 377022)
|
* XXX: eventually this method will be removed (see bug 377022)
|
||||||
*/
|
*/
|
||||||
void fireToolkitEvent(in unsigned long aEvent, in nsIAccessible aTarget,
|
void fireToolkitEvent(in unsigned long aEvent, in nsIAccessible aTarget);
|
||||||
in voidPtr aData);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fire accessible event.
|
* Fire accessible event.
|
||||||
|
@ -302,6 +302,7 @@ nsAccessibleWrap::nsAccessibleWrap(nsIDOMNode* aNode,
|
|||||||
|
|
||||||
nsAccessibleWrap::~nsAccessibleWrap()
|
nsAccessibleWrap::~nsAccessibleWrap()
|
||||||
{
|
{
|
||||||
|
NS_ASSERTION(!mAtkObject, "ShutdownAtkObject() is not called");
|
||||||
|
|
||||||
#ifdef MAI_LOGGING
|
#ifdef MAI_LOGGING
|
||||||
++mAccWrapDeleted;
|
++mAccWrapDeleted;
|
||||||
@ -1114,9 +1115,6 @@ nsAccessibleWrap::FireAccessibleEvent(nsIAccessibleEvent *aEvent)
|
|||||||
rv = aEvent->GetEventType(&type);
|
rv = aEvent->GetEventType(&type);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
nsAccEvent *event = reinterpret_cast<nsAccEvent*>(aEvent);
|
|
||||||
void *eventData = event->mEventData;
|
|
||||||
|
|
||||||
AtkObject *atkObj = nsAccessibleWrap::GetAtkObject(accessible);
|
AtkObject *atkObj = nsAccessibleWrap::GetAtkObject(accessible);
|
||||||
|
|
||||||
// We don't create ATK objects for nsIAccessible plain text leaves,
|
// We don't create ATK objects for nsIAccessible plain text leaves,
|
||||||
@ -1135,8 +1133,6 @@ nsAccessibleWrap::FireAccessibleEvent(nsIAccessibleEvent *aEvent)
|
|||||||
return NS_OK; // Node is shut down
|
return NS_OK; // Node is shut down
|
||||||
}
|
}
|
||||||
|
|
||||||
AtkTableChange * pAtkTableChange = nsnull;
|
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case nsIAccessibleEvent::EVENT_STATE_CHANGE:
|
case nsIAccessibleEvent::EVENT_STATE_CHANGE:
|
||||||
return FireAtkStateChangeEvent(aEvent, atkObj);
|
return FireAtkStateChangeEvent(aEvent, atkObj);
|
||||||
@ -1145,9 +1141,6 @@ nsAccessibleWrap::FireAccessibleEvent(nsIAccessibleEvent *aEvent)
|
|||||||
case nsIAccessibleEvent::EVENT_TEXT_INSERTED:
|
case nsIAccessibleEvent::EVENT_TEXT_INSERTED:
|
||||||
return FireAtkTextChangedEvent(aEvent, atkObj);
|
return FireAtkTextChangedEvent(aEvent, atkObj);
|
||||||
|
|
||||||
case nsIAccessibleEvent::EVENT_PROPERTY_CHANGED:
|
|
||||||
return FireAtkPropChangedEvent(aEvent, atkObj);
|
|
||||||
|
|
||||||
case nsIAccessibleEvent::EVENT_FOCUS:
|
case nsIAccessibleEvent::EVENT_FOCUS:
|
||||||
{
|
{
|
||||||
MAI_LOG_DEBUG(("\n\nReceived: EVENT_FOCUS\n"));
|
MAI_LOG_DEBUG(("\n\nReceived: EVENT_FOCUS\n"));
|
||||||
@ -1209,73 +1202,83 @@ nsAccessibleWrap::FireAccessibleEvent(nsIAccessibleEvent *aEvent)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case nsIAccessibleEvent::EVENT_TABLE_ROW_INSERT:
|
case nsIAccessibleEvent::EVENT_TABLE_ROW_INSERT:
|
||||||
|
{
|
||||||
MAI_LOG_DEBUG(("\n\nReceived: EVENT_TABLE_ROW_INSERT\n"));
|
MAI_LOG_DEBUG(("\n\nReceived: EVENT_TABLE_ROW_INSERT\n"));
|
||||||
NS_ASSERTION(eventData, "Event needs event data");
|
nsCOMPtr<nsIAccessibleTableChangeEvent> tableEvent = do_QueryInterface(aEvent);
|
||||||
if (!eventData)
|
NS_ENSURE_TRUE(tableEvent, NS_ERROR_FAILURE);
|
||||||
break;
|
|
||||||
|
|
||||||
pAtkTableChange = reinterpret_cast<AtkTableChange *>(eventData);
|
PRInt32 rowIndex, numRows;
|
||||||
|
tableEvent->GetRowOrColIndex(&rowIndex);
|
||||||
|
tableEvent->GetNumRowsOrCols(&numRows);
|
||||||
|
|
||||||
g_signal_emit_by_name(atkObj,
|
g_signal_emit_by_name(atkObj,
|
||||||
"row_inserted",
|
"row_inserted",
|
||||||
// After which the rows are inserted
|
// After which the rows are inserted
|
||||||
pAtkTableChange->index,
|
rowIndex,
|
||||||
// The number of the inserted
|
// The number of the inserted
|
||||||
pAtkTableChange->count);
|
numRows);
|
||||||
break;
|
} break;
|
||||||
|
|
||||||
case nsIAccessibleEvent::EVENT_TABLE_ROW_DELETE:
|
case nsIAccessibleEvent::EVENT_TABLE_ROW_DELETE:
|
||||||
|
{
|
||||||
MAI_LOG_DEBUG(("\n\nReceived: EVENT_TABLE_ROW_DELETE\n"));
|
MAI_LOG_DEBUG(("\n\nReceived: EVENT_TABLE_ROW_DELETE\n"));
|
||||||
NS_ASSERTION(eventData, "Event needs event data");
|
nsCOMPtr<nsIAccessibleTableChangeEvent> tableEvent = do_QueryInterface(aEvent);
|
||||||
if (!eventData)
|
NS_ENSURE_TRUE(tableEvent, NS_ERROR_FAILURE);
|
||||||
break;
|
|
||||||
|
|
||||||
pAtkTableChange = reinterpret_cast<AtkTableChange *>(eventData);
|
PRInt32 rowIndex, numRows;
|
||||||
|
tableEvent->GetRowOrColIndex(&rowIndex);
|
||||||
|
tableEvent->GetNumRowsOrCols(&numRows);
|
||||||
|
|
||||||
g_signal_emit_by_name(atkObj,
|
g_signal_emit_by_name(atkObj,
|
||||||
"row_deleted",
|
"row_deleted",
|
||||||
// After which the rows are deleted
|
// After which the rows are deleted
|
||||||
pAtkTableChange->index,
|
rowIndex,
|
||||||
// The number of the deleted
|
// The number of the deleted
|
||||||
pAtkTableChange->count);
|
numRows);
|
||||||
break;
|
} break;
|
||||||
|
|
||||||
case nsIAccessibleEvent::EVENT_TABLE_ROW_REORDER:
|
case nsIAccessibleEvent::EVENT_TABLE_ROW_REORDER:
|
||||||
|
{
|
||||||
MAI_LOG_DEBUG(("\n\nReceived: EVENT_TABLE_ROW_REORDER\n"));
|
MAI_LOG_DEBUG(("\n\nReceived: EVENT_TABLE_ROW_REORDER\n"));
|
||||||
g_signal_emit_by_name(atkObj, "row_reordered");
|
g_signal_emit_by_name(atkObj, "row_reordered");
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case nsIAccessibleEvent::EVENT_TABLE_COLUMN_INSERT:
|
case nsIAccessibleEvent::EVENT_TABLE_COLUMN_INSERT:
|
||||||
|
{
|
||||||
MAI_LOG_DEBUG(("\n\nReceived: EVENT_TABLE_COLUMN_INSERT\n"));
|
MAI_LOG_DEBUG(("\n\nReceived: EVENT_TABLE_COLUMN_INSERT\n"));
|
||||||
NS_ASSERTION(eventData, "Event needs event data");
|
nsCOMPtr<nsIAccessibleTableChangeEvent> tableEvent = do_QueryInterface(aEvent);
|
||||||
if (!eventData)
|
NS_ENSURE_TRUE(tableEvent, NS_ERROR_FAILURE);
|
||||||
break;
|
|
||||||
|
|
||||||
pAtkTableChange = reinterpret_cast<AtkTableChange *>(eventData);
|
PRInt32 colIndex, numCols;
|
||||||
|
tableEvent->GetRowOrColIndex(&colIndex);
|
||||||
|
tableEvent->GetNumRowsOrCols(&numCols);
|
||||||
|
|
||||||
g_signal_emit_by_name(atkObj,
|
g_signal_emit_by_name(atkObj,
|
||||||
"column_inserted",
|
"column_inserted",
|
||||||
// After which the columns are inserted
|
// After which the columns are inserted
|
||||||
pAtkTableChange->index,
|
colIndex,
|
||||||
// The number of the inserted
|
// The number of the inserted
|
||||||
pAtkTableChange->count);
|
numCols);
|
||||||
break;
|
} break;
|
||||||
|
|
||||||
case nsIAccessibleEvent::EVENT_TABLE_COLUMN_DELETE:
|
case nsIAccessibleEvent::EVENT_TABLE_COLUMN_DELETE:
|
||||||
|
{
|
||||||
MAI_LOG_DEBUG(("\n\nReceived: EVENT_TABLE_COLUMN_DELETE\n"));
|
MAI_LOG_DEBUG(("\n\nReceived: EVENT_TABLE_COLUMN_DELETE\n"));
|
||||||
NS_ASSERTION(eventData, "Event needs event data");
|
nsCOMPtr<nsIAccessibleTableChangeEvent> tableEvent = do_QueryInterface(aEvent);
|
||||||
if (!eventData)
|
NS_ENSURE_TRUE(tableEvent, NS_ERROR_FAILURE);
|
||||||
break;
|
|
||||||
|
|
||||||
pAtkTableChange = reinterpret_cast<AtkTableChange *>(eventData);
|
PRInt32 colIndex, numCols;
|
||||||
|
tableEvent->GetRowOrColIndex(&colIndex);
|
||||||
|
tableEvent->GetNumRowsOrCols(&numCols);
|
||||||
|
|
||||||
g_signal_emit_by_name(atkObj,
|
g_signal_emit_by_name(atkObj,
|
||||||
"column_deleted",
|
"column_deleted",
|
||||||
// After which the columns are deleted
|
// After which the columns are deleted
|
||||||
pAtkTableChange->index,
|
colIndex,
|
||||||
// The number of the deleted
|
// The number of the deleted
|
||||||
pAtkTableChange->count);
|
numCols);
|
||||||
break;
|
} break;
|
||||||
|
|
||||||
case nsIAccessibleEvent::EVENT_TABLE_COLUMN_REORDER:
|
case nsIAccessibleEvent::EVENT_TABLE_COLUMN_REORDER:
|
||||||
MAI_LOG_DEBUG(("\n\nReceived: EVENT_TABLE_COLUMN_REORDER\n"));
|
MAI_LOG_DEBUG(("\n\nReceived: EVENT_TABLE_COLUMN_REORDER\n"));
|
||||||
@ -1436,76 +1439,6 @@ nsAccessibleWrap::FireAtkTextChangedEvent(nsIAccessibleEvent *aEvent,
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
|
||||||
nsAccessibleWrap::FireAtkPropChangedEvent(nsIAccessibleEvent *aEvent,
|
|
||||||
AtkObject *aObject)
|
|
||||||
{
|
|
||||||
MAI_LOG_DEBUG(("\n\nReceived: EVENT_PROPERTY_CHANGED\n"));
|
|
||||||
|
|
||||||
AtkPropertyChange *pAtkPropChange;
|
|
||||||
AtkPropertyValues values = { NULL };
|
|
||||||
nsAccessibleWrap *oldAccWrap = nsnull, *newAccWrap = nsnull;
|
|
||||||
|
|
||||||
nsAccEvent *event = reinterpret_cast<nsAccEvent*>(aEvent);
|
|
||||||
|
|
||||||
pAtkPropChange = reinterpret_cast<AtkPropertyChange *>(event->mEventData);
|
|
||||||
values.property_name = sAtkPropertyNameArray[pAtkPropChange->type];
|
|
||||||
|
|
||||||
NS_ASSERTION(pAtkPropChange, "Event needs event data");
|
|
||||||
if (!pAtkPropChange)
|
|
||||||
return NS_OK;
|
|
||||||
|
|
||||||
MAI_LOG_DEBUG(("\n\nthe type of EVENT_PROPERTY_CHANGED: %d\n\n",
|
|
||||||
pAtkPropChange->type));
|
|
||||||
|
|
||||||
switch (pAtkPropChange->type) {
|
|
||||||
case PROP_TABLE_CAPTION:
|
|
||||||
case PROP_TABLE_SUMMARY:
|
|
||||||
|
|
||||||
if (pAtkPropChange->oldvalue)
|
|
||||||
oldAccWrap = reinterpret_cast<nsAccessibleWrap *>
|
|
||||||
(pAtkPropChange->oldvalue);
|
|
||||||
|
|
||||||
if (pAtkPropChange->newvalue)
|
|
||||||
newAccWrap = reinterpret_cast<nsAccessibleWrap *>
|
|
||||||
(pAtkPropChange->newvalue);
|
|
||||||
|
|
||||||
if (oldAccWrap && newAccWrap) {
|
|
||||||
g_value_init(&values.old_value, G_TYPE_POINTER);
|
|
||||||
g_value_set_pointer(&values.old_value,
|
|
||||||
oldAccWrap->GetAtkObject());
|
|
||||||
g_value_init(&values.new_value, G_TYPE_POINTER);
|
|
||||||
g_value_set_pointer(&values.new_value,
|
|
||||||
newAccWrap->GetAtkObject());
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PROP_TABLE_COLUMN_DESCRIPTION:
|
|
||||||
case PROP_TABLE_COLUMN_HEADER:
|
|
||||||
case PROP_TABLE_ROW_HEADER:
|
|
||||||
case PROP_TABLE_ROW_DESCRIPTION:
|
|
||||||
g_value_init(&values.new_value, G_TYPE_INT);
|
|
||||||
g_value_set_int(&values.new_value,
|
|
||||||
*reinterpret_cast<gint *>
|
|
||||||
(pAtkPropChange->newvalue));
|
|
||||||
break;
|
|
||||||
|
|
||||||
//Perhaps need more cases in the future
|
|
||||||
default:
|
|
||||||
g_value_init (&values.old_value, G_TYPE_POINTER);
|
|
||||||
g_value_set_pointer (&values.old_value, pAtkPropChange->oldvalue);
|
|
||||||
g_value_init (&values.new_value, G_TYPE_POINTER);
|
|
||||||
g_value_set_pointer (&values.new_value, pAtkPropChange->newvalue);
|
|
||||||
}
|
|
||||||
|
|
||||||
char *signal_name = g_strconcat("property_change::",
|
|
||||||
values.property_name, NULL);
|
|
||||||
g_signal_emit_by_name(aObject, signal_name, &values, NULL);
|
|
||||||
g_free (signal_name);
|
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsAccessibleWrap::FireAtkShowHideEvent(nsIAccessibleEvent *aEvent,
|
nsAccessibleWrap::FireAtkShowHideEvent(nsIAccessibleEvent *aEvent,
|
||||||
AtkObject *aObject, PRBool aIsAdded)
|
AtkObject *aObject, PRBool aIsAdded)
|
||||||
|
@ -56,7 +56,7 @@ static const PRUint32 atkRoleMap[] = {
|
|||||||
ATK_ROLE_UNKNOWN, // nsIAccessibleRole::ROLE_CARET 7
|
ATK_ROLE_UNKNOWN, // nsIAccessibleRole::ROLE_CARET 7
|
||||||
ATK_ROLE_ALERT, // nsIAccessibleRole::ROLE_ALERT 8
|
ATK_ROLE_ALERT, // nsIAccessibleRole::ROLE_ALERT 8
|
||||||
ATK_ROLE_WINDOW, // nsIAccessibleRole::ROLE_WINDOW 9
|
ATK_ROLE_WINDOW, // nsIAccessibleRole::ROLE_WINDOW 9
|
||||||
ATK_ROLE_PANEL, // nsIAccessibleRole::ROLE_CLIENT 10
|
ATK_ROLE_INTERNAL_FRAME, // nsIAccessibleRole::ROLE_INTERNAL_FRAME 10
|
||||||
ATK_ROLE_MENU, // nsIAccessibleRole::ROLE_MENUPOPUP 11
|
ATK_ROLE_MENU, // nsIAccessibleRole::ROLE_MENUPOPUP 11
|
||||||
ATK_ROLE_MENU_ITEM, // nsIAccessibleRole::ROLE_MENUITEM 12
|
ATK_ROLE_MENU_ITEM, // nsIAccessibleRole::ROLE_MENUITEM 12
|
||||||
ATK_ROLE_TOOL_TIP, // nsIAccessibleRole::ROLE_TOOLTIP 13
|
ATK_ROLE_TOOL_TIP, // nsIAccessibleRole::ROLE_TOOLTIP 13
|
||||||
|
@ -46,5 +46,11 @@ nsNativeRootAccessibleWrap::nsNativeRootAccessibleWrap(AtkObject *aAccessible):
|
|||||||
nsRootAccessible(nsnull, nsnull)
|
nsRootAccessible(nsnull, nsnull)
|
||||||
{
|
{
|
||||||
g_object_ref(aAccessible);
|
g_object_ref(aAccessible);
|
||||||
nsAccessibleWrap::mAtkObject = aAccessible;
|
mAtkObject = aAccessible;
|
||||||
|
}
|
||||||
|
|
||||||
|
nsNativeRootAccessibleWrap::~nsNativeRootAccessibleWrap()
|
||||||
|
{
|
||||||
|
g_object_unref(mAtkObject);
|
||||||
|
mAtkObject = nsnull;
|
||||||
}
|
}
|
||||||
|
@ -55,6 +55,7 @@ class nsNativeRootAccessibleWrap: public nsRootAccessible
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
nsNativeRootAccessibleWrap(AtkObject *aAccessible);
|
nsNativeRootAccessibleWrap(AtkObject *aAccessible);
|
||||||
|
~nsNativeRootAccessibleWrap();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __NS_ROOT_ACCESSIBLE_WRAP_H__ */
|
#endif /* __NS_ROOT_ACCESSIBLE_WRAP_H__ */
|
||||||
|
@ -82,6 +82,8 @@ ACCESSIBILITY_ATOM(textFrame, "TextFrame")
|
|||||||
ACCESSIBILITY_ATOM(tableCaptionFrame, "TableCaptionFrame")
|
ACCESSIBILITY_ATOM(tableCaptionFrame, "TableCaptionFrame")
|
||||||
ACCESSIBILITY_ATOM(tableCellFrame, "TableCellFrame")
|
ACCESSIBILITY_ATOM(tableCellFrame, "TableCellFrame")
|
||||||
ACCESSIBILITY_ATOM(tableOuterFrame, "TableOuterFrame")
|
ACCESSIBILITY_ATOM(tableOuterFrame, "TableOuterFrame")
|
||||||
|
ACCESSIBILITY_ATOM(tableRowGroupFrame, "TableRowGroupFrame")
|
||||||
|
ACCESSIBILITY_ATOM(tableRowFrame, "TableRowFrame")
|
||||||
|
|
||||||
// Alphabetical list of tag names
|
// Alphabetical list of tag names
|
||||||
ACCESSIBILITY_ATOM(a, "a")
|
ACCESSIBILITY_ATOM(a, "a")
|
||||||
|
@ -1196,6 +1196,34 @@ nsresult nsAccessibilityService::InitAccessible(nsIAccessible *aAccessibleIn,
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static PRBool HasRelatedContent(nsIContent *aContent)
|
||||||
|
{
|
||||||
|
nsAutoString id;
|
||||||
|
if (!aContent || !nsAccUtils::GetID(aContent, id) || id.IsEmpty()) {
|
||||||
|
return PR_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
nsIAtom *relationAttrs[] = {nsAccessibilityAtoms::aria_labelledby,
|
||||||
|
nsAccessibilityAtoms::aria_describedby,
|
||||||
|
nsAccessibilityAtoms::aria_owns,
|
||||||
|
nsAccessibilityAtoms::aria_controls,
|
||||||
|
nsAccessibilityAtoms::aria_flowto};
|
||||||
|
if (nsAccUtils::FindNeighbourPointingToNode(aContent, relationAttrs, NS_ARRAY_LENGTH(relationAttrs))) {
|
||||||
|
return PR_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
nsIContent *ancestorContent = aContent;
|
||||||
|
nsAutoString activeID;
|
||||||
|
while ((ancestorContent = ancestorContent->GetParent()) != nsnull) {
|
||||||
|
if (ancestorContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_activedescendant, activeID)) {
|
||||||
|
// ancestor has activedescendant property, this content could be active
|
||||||
|
return PR_TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return PR_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsAccessibilityService::GetAccessible(nsIDOMNode *aNode,
|
NS_IMETHODIMP nsAccessibilityService::GetAccessible(nsIDOMNode *aNode,
|
||||||
nsIPresShell *aPresShell,
|
nsIPresShell *aPresShell,
|
||||||
nsIWeakReference *aWeakShell,
|
nsIWeakReference *aWeakShell,
|
||||||
@ -1395,41 +1423,36 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessible(nsIDOMNode *aNode,
|
|||||||
if (!content->IsFocusable()) {
|
if (!content->IsFocusable()) {
|
||||||
// If we're in unfocusable table-related subcontent, check for the
|
// If we're in unfocusable table-related subcontent, check for the
|
||||||
// Presentation role on the containing table
|
// Presentation role on the containing table
|
||||||
nsIAtom *tag = content->Tag();
|
if (frame->GetType() == nsAccessibilityAtoms::tableCaptionFrame ||
|
||||||
if (tag == nsAccessibilityAtoms::td ||
|
frame->GetType() == nsAccessibilityAtoms::tableCellFrame ||
|
||||||
tag == nsAccessibilityAtoms::th ||
|
frame->GetType() == nsAccessibilityAtoms::tableRowGroupFrame ||
|
||||||
tag == nsAccessibilityAtoms::tr ||
|
frame->GetType() == nsAccessibilityAtoms::tableRowFrame) {
|
||||||
tag == nsAccessibilityAtoms::tbody ||
|
|
||||||
tag == nsAccessibilityAtoms::tfoot ||
|
|
||||||
tag == nsAccessibilityAtoms::thead) {
|
|
||||||
nsIContent *tableContent = content;
|
nsIContent *tableContent = content;
|
||||||
nsAutoString tableRole;
|
|
||||||
while ((tableContent = tableContent->GetParent()) != nsnull) {
|
while ((tableContent = tableContent->GetParent()) != nsnull) {
|
||||||
if (tableContent->Tag() == nsAccessibilityAtoms::table) {
|
nsIFrame *tableFrame = aPresShell->GetPrimaryFrameFor(tableContent);
|
||||||
// Table that we're a descendant of is not styled as a table,
|
if (tableFrame &&
|
||||||
// and has no table accessible for an ancestor, or
|
tableFrame->GetType() == nsAccessibilityAtoms::tableOuterFrame) {
|
||||||
// table that we're a descendant of is presentational
|
|
||||||
|
|
||||||
nsCOMPtr<nsIDOMNode> tableNode(do_QueryInterface(tableContent));
|
nsCOMPtr<nsIDOMNode> tableNode(do_QueryInterface(tableContent));
|
||||||
if (tableNode) {
|
if (tableNode) {
|
||||||
nsRoleMapEntry *tableRoleMapEntry =
|
nsRoleMapEntry *tableRoleMapEntry =
|
||||||
nsAccUtils::GetRoleMapEntry(tableNode);
|
nsAccUtils::GetRoleMapEntry(tableNode);
|
||||||
if (tableRoleMapEntry &&
|
if (tableRoleMapEntry &&
|
||||||
tableRoleMapEntry != &nsARIAMap::gLandmarkRoleMap) {
|
tableRoleMapEntry != &nsARIAMap::gLandmarkRoleMap)
|
||||||
tryTagNameOrFrame = PR_FALSE;
|
tryTagNameOrFrame = PR_FALSE;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
nsIFrame *tableFrame =
|
|
||||||
aPresShell->GetPrimaryFrameFor(tableContent);
|
|
||||||
if (!tableFrame ||
|
|
||||||
tableFrame->GetType() != nsAccessibilityAtoms::tableOuterFrame) {
|
|
||||||
tryTagNameOrFrame = PR_FALSE;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tableContent->Tag() == nsAccessibilityAtoms::table) {
|
||||||
|
tryTagNameOrFrame = PR_FALSE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!tableContent)
|
||||||
|
tryTagNameOrFrame = PR_FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1473,7 +1496,8 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessible(nsIDOMNode *aNode,
|
|||||||
if (!newAcc && content->Tag() != nsAccessibilityAtoms::body && content->GetParent() &&
|
if (!newAcc && content->Tag() != nsAccessibilityAtoms::body && content->GetParent() &&
|
||||||
(content->IsFocusable() ||
|
(content->IsFocusable() ||
|
||||||
(isHTML && nsAccUtils::HasListener(content, NS_LITERAL_STRING("click"))) ||
|
(isHTML && nsAccUtils::HasListener(content, NS_LITERAL_STRING("click"))) ||
|
||||||
HasUniversalAriaProperty(content, aWeakShell) || roleMapEntry)) {
|
HasUniversalAriaProperty(content, aWeakShell) || roleMapEntry) ||
|
||||||
|
HasRelatedContent(content)) {
|
||||||
// This content is focusable or has an interesting dynamic content accessibility property.
|
// This content is focusable or has an interesting dynamic content accessibility property.
|
||||||
// If it's interesting we need it in the accessibility hierarchy so that events or
|
// If it's interesting we need it in the accessibility hierarchy so that events or
|
||||||
// other accessibles can point to it, or so that it can hold a state, etc.
|
// other accessibles can point to it, or so that it can hold a state, etc.
|
||||||
@ -1606,6 +1630,8 @@ nsresult nsAccessibilityService::GetAccessibleByType(nsIDOMNode *aNode,
|
|||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
#ifdef MOZ_XUL
|
#ifdef MOZ_XUL
|
||||||
|
case nsIAccessibleProvider::NoAccessible:
|
||||||
|
return NS_OK;
|
||||||
// XUL controls
|
// XUL controls
|
||||||
case nsIAccessibleProvider::XULAlert:
|
case nsIAccessibleProvider::XULAlert:
|
||||||
*aAccessible = new nsXULAlertAccessible(aNode, weakShell);
|
*aAccessible = new nsXULAlertAccessible(aNode, weakShell);
|
||||||
@ -1690,6 +1716,9 @@ nsresult nsAccessibilityService::GetAccessibleByType(nsIDOMNode *aNode,
|
|||||||
case nsIAccessibleProvider::XULMenuSeparator:
|
case nsIAccessibleProvider::XULMenuSeparator:
|
||||||
*aAccessible = new nsXULMenuSeparatorAccessible(aNode, weakShell);
|
*aAccessible = new nsXULMenuSeparatorAccessible(aNode, weakShell);
|
||||||
break;
|
break;
|
||||||
|
case nsIAccessibleProvider::XULPane:
|
||||||
|
*aAccessible = new nsEnumRoleAccessible(aNode, weakShell, nsIAccessibleRole::ROLE_PANE);
|
||||||
|
break;
|
||||||
case nsIAccessibleProvider::XULProgressMeter:
|
case nsIAccessibleProvider::XULProgressMeter:
|
||||||
*aAccessible = new nsXULProgressMeterAccessible(aNode, weakShell);
|
*aAccessible = new nsXULProgressMeterAccessible(aNode, weakShell);
|
||||||
break;
|
break;
|
||||||
|
@ -152,7 +152,7 @@ static const char kRoleNames[][20] = {
|
|||||||
"caret", //ROLE_CARET
|
"caret", //ROLE_CARET
|
||||||
"alert", //ROLE_ALERT
|
"alert", //ROLE_ALERT
|
||||||
"window", //ROLE_WINDOW
|
"window", //ROLE_WINDOW
|
||||||
"client", //ROLE_CLIENT
|
"internal frame", //ROLE_INTERNAL_FRAME
|
||||||
"menupopup", //ROLE_MENUPOPUP
|
"menupopup", //ROLE_MENUPOPUP
|
||||||
"menuitem", //ROLE_MENUITEM
|
"menuitem", //ROLE_MENUITEM
|
||||||
"tooltip", //ROLE_TOOLTIP
|
"tooltip", //ROLE_TOOLTIP
|
||||||
|
@ -257,7 +257,7 @@ nsAccUtils::FireAccEvent(PRUint32 aEventType, nsIAccessible *aAccessible,
|
|||||||
NS_ASSERTION(pAccessible, "Accessible doesn't implement nsPIAccessible");
|
NS_ASSERTION(pAccessible, "Accessible doesn't implement nsPIAccessible");
|
||||||
|
|
||||||
nsCOMPtr<nsIAccessibleEvent> event =
|
nsCOMPtr<nsIAccessibleEvent> event =
|
||||||
new nsAccEvent(aEventType, aAccessible, nsnull, aIsAsynch);
|
new nsAccEvent(aEventType, aAccessible, aIsAsynch);
|
||||||
NS_ENSURE_TRUE(event, NS_ERROR_OUT_OF_MEMORY);
|
NS_ENSURE_TRUE(event, NS_ERROR_OUT_OF_MEMORY);
|
||||||
|
|
||||||
return pAccessible->FireAccessibleEvent(event);
|
return pAccessible->FireAccessibleEvent(event);
|
||||||
@ -586,6 +586,16 @@ nsAccUtils::FindNeighbourPointingToNode(nsIContent *aForNode,
|
|||||||
nsIAtom *aRelationAttr,
|
nsIAtom *aRelationAttr,
|
||||||
nsIAtom *aTagName,
|
nsIAtom *aTagName,
|
||||||
PRUint32 aAncestorLevelsToSearch)
|
PRUint32 aAncestorLevelsToSearch)
|
||||||
|
{
|
||||||
|
return FindNeighbourPointingToNode(aForNode, &aRelationAttr, 1, aTagName, aAncestorLevelsToSearch);
|
||||||
|
}
|
||||||
|
|
||||||
|
nsIContent*
|
||||||
|
nsAccUtils::FindNeighbourPointingToNode(nsIContent *aForNode,
|
||||||
|
nsIAtom **aRelationAttrs,
|
||||||
|
PRUint32 aAttrNum,
|
||||||
|
nsIAtom *aTagName,
|
||||||
|
PRUint32 aAncestorLevelsToSearch)
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIContent> binding;
|
nsCOMPtr<nsIContent> binding;
|
||||||
nsAutoString controlID;
|
nsAutoString controlID;
|
||||||
@ -638,14 +648,16 @@ nsAccUtils::FindNeighbourPointingToNode(nsIContent *aForNode,
|
|||||||
|
|
||||||
if (content != prevSearched) {
|
if (content != prevSearched) {
|
||||||
labelContent = FindDescendantPointingToID(&controlID, content,
|
labelContent = FindDescendantPointingToID(&controlID, content,
|
||||||
aRelationAttr, nsnull, aTagName);
|
aRelationAttrs, aAttrNum,
|
||||||
|
nsnull, aTagName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
labelContent = FindDescendantPointingToID(&controlID, aForNode,
|
labelContent = FindDescendantPointingToID(&controlID, aForNode,
|
||||||
aRelationAttr, prevSearched, aTagName);
|
aRelationAttrs, aAttrNum,
|
||||||
|
prevSearched, aTagName);
|
||||||
prevSearched = aForNode;
|
prevSearched = aForNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -656,7 +668,8 @@ nsAccUtils::FindNeighbourPointingToNode(nsIContent *aForNode,
|
|||||||
nsIContent*
|
nsIContent*
|
||||||
nsAccUtils::FindDescendantPointingToID(const nsString *aId,
|
nsAccUtils::FindDescendantPointingToID(const nsString *aId,
|
||||||
nsIContent *aLookContent,
|
nsIContent *aLookContent,
|
||||||
nsIAtom *aRelationAttr,
|
nsIAtom **aRelationAttrs,
|
||||||
|
PRUint32 aAttrNum,
|
||||||
nsIContent *aExcludeContent,
|
nsIContent *aExcludeContent,
|
||||||
nsIAtom *aTagType)
|
nsIAtom *aTagType)
|
||||||
{
|
{
|
||||||
@ -665,31 +678,45 @@ nsAccUtils::FindDescendantPointingToID(const nsString *aId,
|
|||||||
LossyAppendUTF16toASCII(*aId, idWithSpaces);
|
LossyAppendUTF16toASCII(*aId, idWithSpaces);
|
||||||
idWithSpaces += ' ';
|
idWithSpaces += ' ';
|
||||||
return FindDescendantPointingToIDImpl(idWithSpaces, aLookContent,
|
return FindDescendantPointingToIDImpl(idWithSpaces, aLookContent,
|
||||||
aRelationAttr, aExcludeContent, aTagType);
|
aRelationAttrs, aAttrNum,
|
||||||
|
aExcludeContent, aTagType);
|
||||||
|
}
|
||||||
|
|
||||||
|
nsIContent*
|
||||||
|
nsAccUtils::FindDescendantPointingToID(const nsString *aId,
|
||||||
|
nsIContent *aLookContent,
|
||||||
|
nsIAtom *aRelationAttr,
|
||||||
|
nsIContent *aExcludeContent,
|
||||||
|
nsIAtom *aTagType)
|
||||||
|
{
|
||||||
|
return FindDescendantPointingToID(aId, aLookContent, &aRelationAttr, 1, aExcludeContent, aTagType);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsIContent*
|
nsIContent*
|
||||||
nsAccUtils::FindDescendantPointingToIDImpl(nsCString& aIdWithSpaces,
|
nsAccUtils::FindDescendantPointingToIDImpl(nsCString& aIdWithSpaces,
|
||||||
nsIContent *aLookContent,
|
nsIContent *aLookContent,
|
||||||
nsIAtom *aRelationAttr,
|
nsIAtom **aRelationAttrs,
|
||||||
|
PRUint32 aAttrNum,
|
||||||
nsIContent *aExcludeContent,
|
nsIContent *aExcludeContent,
|
||||||
nsIAtom *aTagType)
|
nsIAtom *aTagType)
|
||||||
{
|
{
|
||||||
NS_ENSURE_TRUE(aLookContent, nsnull);
|
NS_ENSURE_TRUE(aLookContent, nsnull);
|
||||||
NS_ENSURE_TRUE(aRelationAttr, nsnull);
|
NS_ENSURE_TRUE(aRelationAttrs && *aRelationAttrs, nsnull);
|
||||||
|
|
||||||
if (!aTagType || aLookContent->Tag() == aTagType) {
|
if (!aTagType || aLookContent->Tag() == aTagType) {
|
||||||
// Tag matches
|
// Tag matches
|
||||||
// Check for ID in the attribute aRelationAttr, which can be a list
|
// Check for ID in the attributes aRelationAttrs, which can be a list
|
||||||
nsAutoString idList;
|
for (PRUint32 i = 0; i < aAttrNum; i++) {
|
||||||
if (aLookContent->GetAttr(kNameSpaceID_None, aRelationAttr, idList)) {
|
nsAutoString idList;
|
||||||
idList.Insert(' ', 0); // Surround idlist with spaces for search
|
if (aLookContent->GetAttr(kNameSpaceID_None, aRelationAttrs[i], idList)) {
|
||||||
idList.Append(' ');
|
idList.Insert(' ', 0); // Surround idlist with spaces for search
|
||||||
// idList is now a set of id's with spaces around each,
|
idList.Append(' ');
|
||||||
// and id also has spaces around it.
|
// idList is now a set of id's with spaces around each,
|
||||||
// If id is a substring of idList then we have a match
|
// and id also has spaces around it.
|
||||||
if (idList.Find(aIdWithSpaces) != -1) {
|
// If id is a substring of idList then we have a match
|
||||||
return aLookContent;
|
if (idList.Find(aIdWithSpaces) != -1) {
|
||||||
|
return aLookContent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (aTagType) {
|
if (aTagType) {
|
||||||
@ -707,7 +734,8 @@ nsAccUtils::FindDescendantPointingToIDImpl(nsCString& aIdWithSpaces,
|
|||||||
while ((child = aLookContent->GetChildAt(count++)) != nsnull) {
|
while ((child = aLookContent->GetChildAt(count++)) != nsnull) {
|
||||||
if (child != aExcludeContent) {
|
if (child != aExcludeContent) {
|
||||||
labelContent = FindDescendantPointingToIDImpl(aIdWithSpaces, child,
|
labelContent = FindDescendantPointingToIDImpl(aIdWithSpaces, child,
|
||||||
aRelationAttr, aExcludeContent, aTagType);
|
aRelationAttrs, aAttrNum,
|
||||||
|
aExcludeContent, aTagType);
|
||||||
if (labelContent) {
|
if (labelContent) {
|
||||||
return labelContent;
|
return labelContent;
|
||||||
}
|
}
|
||||||
|
@ -277,15 +277,27 @@ public:
|
|||||||
* attribute value that equals to ID attribute of the given element.
|
* attribute value that equals to ID attribute of the given element.
|
||||||
* ID attribute can be either 'id' attribute or 'anonid' if the element is
|
* ID attribute can be either 'id' attribute or 'anonid' if the element is
|
||||||
* anonymous.
|
* anonymous.
|
||||||
|
* The first matched content will be returned.
|
||||||
*
|
*
|
||||||
* @param aForNode - the given element the search is performed for
|
* @param aForNode - the given element the search is performed for
|
||||||
* @param aRelationAttr - attribute name of searched element, ignored if aAriaProperty passed in
|
* @param aRelationAttrs - an array of attributes, element is attribute name of searched element, ignored if aAriaProperty passed in
|
||||||
|
* @param aAttrNum - how many attributes in aRelationAttrs
|
||||||
* @param aTagName - tag name of searched element, or nsnull for any -- ignored if aAriaProperty passed in
|
* @param aTagName - tag name of searched element, or nsnull for any -- ignored if aAriaProperty passed in
|
||||||
* @param aAncestorLevelsToSearch - points how is the neighborhood of the
|
* @param aAncestorLevelsToSearch - points how is the neighborhood of the
|
||||||
* given element big.
|
* given element big.
|
||||||
*/
|
*/
|
||||||
static nsIContent *FindNeighbourPointingToNode(nsIContent *aForNode,
|
static nsIContent *FindNeighbourPointingToNode(nsIContent *aForNode,
|
||||||
nsIAtom *aRelationAttr,
|
nsIAtom **aRelationAttrs,
|
||||||
|
PRUint32 aAttrNum,
|
||||||
|
nsIAtom *aTagName = nsnull,
|
||||||
|
PRUint32 aAncestorLevelsToSearch = 5);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Overloaded version of FindNeighbourPointingToNode to accept only one
|
||||||
|
* relation attribute.
|
||||||
|
*/
|
||||||
|
static nsIContent *FindNeighbourPointingToNode(nsIContent *aForNode,
|
||||||
|
nsIAtom *aRelationAttr,
|
||||||
nsIAtom *aTagName = nsnull,
|
nsIAtom *aTagName = nsnull,
|
||||||
PRUint32 aAncestorLevelsToSearch = 5);
|
PRUint32 aAncestorLevelsToSearch = 5);
|
||||||
|
|
||||||
@ -293,15 +305,28 @@ public:
|
|||||||
* Search for element that satisfies the requirements in subtree of the given
|
* Search for element that satisfies the requirements in subtree of the given
|
||||||
* element. The requirements are tag name, attribute name and value of
|
* element. The requirements are tag name, attribute name and value of
|
||||||
* attribute.
|
* attribute.
|
||||||
|
* The first matched content will be returned.
|
||||||
*
|
*
|
||||||
* @param aId - value of searched attribute
|
* @param aId - value of searched attribute
|
||||||
* @param aLookContent - element that search is performed inside
|
* @param aLookContent - element that search is performed inside
|
||||||
* @param aRelationAttr - searched attribute
|
* @param aRelationAttrs - an array of searched attributes
|
||||||
* @param if both aAriaProperty and aRelationAttr are null, then any element with aTagType will do
|
* @param aAttrNum - how many attributes in aRelationAttrs
|
||||||
|
* @param if both aAriaProperty and aRelationAttrs are null, then any element with aTagType will do
|
||||||
* @param aExcludeContent - element that is skiped for search
|
* @param aExcludeContent - element that is skiped for search
|
||||||
* @param aTagType - tag name of searched element, by default it is 'label' --
|
* @param aTagType - tag name of searched element, by default it is 'label' --
|
||||||
* ignored if aAriaProperty passed in
|
* ignored if aAriaProperty passed in
|
||||||
*/
|
*/
|
||||||
|
static nsIContent *FindDescendantPointingToID(const nsString *aId,
|
||||||
|
nsIContent *aLookContent,
|
||||||
|
nsIAtom **aRelationAttrs,
|
||||||
|
PRUint32 aAttrNum = 1,
|
||||||
|
nsIContent *aExcludeContent = nsnull,
|
||||||
|
nsIAtom *aTagType = nsAccessibilityAtoms::label);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Overloaded version of FindDescendantPointingToID to accept only one
|
||||||
|
* relation attribute.
|
||||||
|
*/
|
||||||
static nsIContent *FindDescendantPointingToID(const nsString *aId,
|
static nsIContent *FindDescendantPointingToID(const nsString *aId,
|
||||||
nsIContent *aLookContent,
|
nsIContent *aLookContent,
|
||||||
nsIAtom *aRelationAttr,
|
nsIAtom *aRelationAttr,
|
||||||
@ -311,7 +336,8 @@ public:
|
|||||||
// Helper for FindDescendantPointingToID(), same args
|
// Helper for FindDescendantPointingToID(), same args
|
||||||
static nsIContent *FindDescendantPointingToIDImpl(nsCString& aIdWithSpaces,
|
static nsIContent *FindDescendantPointingToIDImpl(nsCString& aIdWithSpaces,
|
||||||
nsIContent *aLookContent,
|
nsIContent *aLookContent,
|
||||||
nsIAtom *aRelationAttrs,
|
nsIAtom **aRelationAttrs,
|
||||||
|
PRUint32 aAttrNum = 1,
|
||||||
nsIContent *aExcludeContent = nsnull,
|
nsIContent *aExcludeContent = nsnull,
|
||||||
nsIAtom *aTagType = nsAccessibilityAtoms::label);
|
nsIAtom *aTagType = nsAccessibilityAtoms::label);
|
||||||
};
|
};
|
||||||
|
@ -829,7 +829,7 @@ NS_IMETHODIMP nsAccessible::TestChildCache(nsIAccessible *aCachedChild)
|
|||||||
// It will assert if not all the children were created
|
// It will assert if not all the children were created
|
||||||
// when they were first cached, and no invalidation
|
// when they were first cached, and no invalidation
|
||||||
// ever corrected parent accessible's child cache.
|
// ever corrected parent accessible's child cache.
|
||||||
if (mAccChildCount == eChildCountUninitialized) {
|
if (mAccChildCount <= 0) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
nsCOMPtr<nsIAccessible> sibling = mFirstChild;
|
nsCOMPtr<nsIAccessible> sibling = mFirstChild;
|
||||||
@ -1909,15 +1909,14 @@ PRBool nsAccessible::IsNodeRelevant(nsIDOMNode *aNode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsAccessible::FireToolkitEvent(PRUint32 aEvent, nsIAccessible *aTarget,
|
nsAccessible::FireToolkitEvent(PRUint32 aEvent, nsIAccessible *aTarget)
|
||||||
void * aData)
|
|
||||||
{
|
{
|
||||||
// Don't fire event for accessible that has been shut down.
|
// Don't fire event for accessible that has been shut down.
|
||||||
if (!mWeakShell)
|
if (!mWeakShell)
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
nsCOMPtr<nsIAccessibleEvent> accEvent =
|
nsCOMPtr<nsIAccessibleEvent> accEvent =
|
||||||
new nsAccEvent(aEvent, aTarget, aData);
|
new nsAccEvent(aEvent, aTarget);
|
||||||
NS_ENSURE_TRUE(accEvent, NS_ERROR_OUT_OF_MEMORY);
|
NS_ENSURE_TRUE(accEvent, NS_ERROR_OUT_OF_MEMORY);
|
||||||
|
|
||||||
return FireAccessibleEvent(accEvent);
|
return FireAccessibleEvent(accEvent);
|
||||||
@ -1964,7 +1963,7 @@ NS_IMETHODIMP nsAccessible::GetFinalRole(PRUint32 *aRole)
|
|||||||
// For simplicity, any pressed attribute indicates it's a toggle button
|
// For simplicity, any pressed attribute indicates it's a toggle button
|
||||||
*aRole = nsIAccessibleRole::ROLE_TOGGLE_BUTTON;
|
*aRole = nsIAccessibleRole::ROLE_TOGGLE_BUTTON;
|
||||||
}
|
}
|
||||||
else if (content->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::aria_secret,
|
else if (content->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::aria_haspopup,
|
||||||
nsAccessibilityAtoms::_true, eCaseMatters)) {
|
nsAccessibilityAtoms::_true, eCaseMatters)) {
|
||||||
// For button with aria-haspopup="true"
|
// For button with aria-haspopup="true"
|
||||||
*aRole = nsIAccessibleRole::ROLE_BUTTONMENU;
|
*aRole = nsIAccessibleRole::ROLE_BUTTONMENU;
|
||||||
|
@ -60,15 +60,15 @@ nsIDOMNode* nsAccEvent::gLastEventNodeWeak = 0;
|
|||||||
NS_IMPL_ISUPPORTS1(nsAccEvent, nsIAccessibleEvent)
|
NS_IMPL_ISUPPORTS1(nsAccEvent, nsIAccessibleEvent)
|
||||||
|
|
||||||
nsAccEvent::nsAccEvent(PRUint32 aEventType, nsIAccessible *aAccessible,
|
nsAccEvent::nsAccEvent(PRUint32 aEventType, nsIAccessible *aAccessible,
|
||||||
void *aEventData, PRBool aIsAsynch):
|
PRBool aIsAsynch):
|
||||||
mEventType(aEventType), mAccessible(aAccessible), mEventData(aEventData)
|
mEventType(aEventType), mAccessible(aAccessible)
|
||||||
{
|
{
|
||||||
CaptureIsFromUserInput(aIsAsynch);
|
CaptureIsFromUserInput(aIsAsynch);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsAccEvent::nsAccEvent(PRUint32 aEventType, nsIDOMNode *aDOMNode,
|
nsAccEvent::nsAccEvent(PRUint32 aEventType, nsIDOMNode *aDOMNode,
|
||||||
void *aEventData, PRBool aIsAsynch):
|
PRBool aIsAsynch):
|
||||||
mEventType(aEventType), mDOMNode(aDOMNode), mEventData(aEventData)
|
mEventType(aEventType), mDOMNode(aDOMNode)
|
||||||
{
|
{
|
||||||
CaptureIsFromUserInput(aIsAsynch);
|
CaptureIsFromUserInput(aIsAsynch);
|
||||||
}
|
}
|
||||||
@ -274,7 +274,7 @@ nsAccStateChangeEvent::
|
|||||||
nsAccStateChangeEvent(nsIAccessible *aAccessible,
|
nsAccStateChangeEvent(nsIAccessible *aAccessible,
|
||||||
PRUint32 aState, PRBool aIsExtraState,
|
PRUint32 aState, PRBool aIsExtraState,
|
||||||
PRBool aIsEnabled):
|
PRBool aIsEnabled):
|
||||||
nsAccEvent(::nsIAccessibleEvent::EVENT_STATE_CHANGE, aAccessible, nsnull),
|
nsAccEvent(::nsIAccessibleEvent::EVENT_STATE_CHANGE, aAccessible),
|
||||||
mState(aState), mIsExtraState(aIsExtraState), mIsEnabled(aIsEnabled)
|
mState(aState), mIsExtraState(aIsExtraState), mIsEnabled(aIsEnabled)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -283,7 +283,7 @@ nsAccStateChangeEvent::
|
|||||||
nsAccStateChangeEvent(nsIDOMNode *aNode,
|
nsAccStateChangeEvent(nsIDOMNode *aNode,
|
||||||
PRUint32 aState, PRBool aIsExtraState,
|
PRUint32 aState, PRBool aIsExtraState,
|
||||||
PRBool aIsEnabled):
|
PRBool aIsEnabled):
|
||||||
nsAccEvent(::nsIAccessibleEvent::EVENT_STATE_CHANGE, aNode, nsnull),
|
nsAccEvent(::nsIAccessibleEvent::EVENT_STATE_CHANGE, aNode),
|
||||||
mState(aState), mIsExtraState(aIsExtraState), mIsEnabled(aIsEnabled)
|
mState(aState), mIsExtraState(aIsExtraState), mIsEnabled(aIsEnabled)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -291,7 +291,7 @@ nsAccStateChangeEvent::
|
|||||||
nsAccStateChangeEvent::
|
nsAccStateChangeEvent::
|
||||||
nsAccStateChangeEvent(nsIDOMNode *aNode,
|
nsAccStateChangeEvent(nsIDOMNode *aNode,
|
||||||
PRUint32 aState, PRBool aIsExtraState):
|
PRUint32 aState, PRBool aIsExtraState):
|
||||||
nsAccEvent(::nsIAccessibleEvent::EVENT_STATE_CHANGE, aNode, nsnull),
|
nsAccEvent(::nsIAccessibleEvent::EVENT_STATE_CHANGE, aNode),
|
||||||
mState(aState), mIsExtraState(aIsExtraState)
|
mState(aState), mIsExtraState(aIsExtraState)
|
||||||
{
|
{
|
||||||
// Use GetAccessibleByNode() because we do not want to store an accessible
|
// Use GetAccessibleByNode() because we do not want to store an accessible
|
||||||
@ -337,7 +337,7 @@ nsAccTextChangeEvent::
|
|||||||
nsAccTextChangeEvent(nsIAccessible *aAccessible,
|
nsAccTextChangeEvent(nsIAccessible *aAccessible,
|
||||||
PRInt32 aStart, PRUint32 aLength, PRBool aIsInserted, PRBool aIsAsynch):
|
PRInt32 aStart, PRUint32 aLength, PRBool aIsInserted, PRBool aIsAsynch):
|
||||||
nsAccEvent(aIsInserted ? nsIAccessibleEvent::EVENT_TEXT_INSERTED : nsIAccessibleEvent::EVENT_TEXT_REMOVED,
|
nsAccEvent(aIsInserted ? nsIAccessibleEvent::EVENT_TEXT_INSERTED : nsIAccessibleEvent::EVENT_TEXT_REMOVED,
|
||||||
aAccessible, nsnull, aIsAsynch),
|
aAccessible, aIsAsynch),
|
||||||
mStart(aStart), mLength(aLength), mIsInserted(aIsInserted)
|
mStart(aStart), mLength(aLength), mIsInserted(aIsInserted)
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIAccessibleText> textAccessible = do_QueryInterface(aAccessible);
|
nsCOMPtr<nsIAccessibleText> textAccessible = do_QueryInterface(aAccessible);
|
||||||
@ -381,14 +381,14 @@ NS_IMPL_ISUPPORTS_INHERITED1(nsAccCaretMoveEvent, nsAccEvent,
|
|||||||
|
|
||||||
nsAccCaretMoveEvent::
|
nsAccCaretMoveEvent::
|
||||||
nsAccCaretMoveEvent(nsIAccessible *aAccessible, PRInt32 aCaretOffset) :
|
nsAccCaretMoveEvent(nsIAccessible *aAccessible, PRInt32 aCaretOffset) :
|
||||||
nsAccEvent(::nsIAccessibleEvent::EVENT_TEXT_CARET_MOVED, aAccessible, nsnull, PR_TRUE), // Currently always asynch
|
nsAccEvent(::nsIAccessibleEvent::EVENT_TEXT_CARET_MOVED, aAccessible, PR_TRUE), // Currently always asynch
|
||||||
mCaretOffset(aCaretOffset)
|
mCaretOffset(aCaretOffset)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
nsAccCaretMoveEvent::
|
nsAccCaretMoveEvent::
|
||||||
nsAccCaretMoveEvent(nsIDOMNode *aNode) :
|
nsAccCaretMoveEvent(nsIDOMNode *aNode) :
|
||||||
nsAccEvent(::nsIAccessibleEvent::EVENT_TEXT_CARET_MOVED, aNode, nsnull, PR_TRUE), // Currently always asynch
|
nsAccEvent(::nsIAccessibleEvent::EVENT_TEXT_CARET_MOVED, aNode, PR_TRUE), // Currently always asynch
|
||||||
mCaretOffset(-1)
|
mCaretOffset(-1)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -402,3 +402,33 @@ nsAccCaretMoveEvent::GetCaretOffset(PRInt32* aCaretOffset)
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// nsAccTableChangeEvent
|
||||||
|
NS_IMPL_ISUPPORTS_INHERITED1(nsAccTableChangeEvent, nsAccEvent,
|
||||||
|
nsIAccessibleTableChangeEvent)
|
||||||
|
|
||||||
|
nsAccTableChangeEvent::
|
||||||
|
nsAccTableChangeEvent(nsIAccessible *aAccessible, PRUint32 aEventType,
|
||||||
|
PRInt32 aRowOrColIndex, PRInt32 aNumRowsOrCols, PRBool aIsAsynch):
|
||||||
|
nsAccEvent(aEventType, aAccessible, aIsAsynch),
|
||||||
|
mRowOrColIndex(aRowOrColIndex), mNumRowsOrCols(aNumRowsOrCols)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP
|
||||||
|
nsAccTableChangeEvent::GetRowOrColIndex(PRInt32* aRowOrColIndex)
|
||||||
|
{
|
||||||
|
NS_ENSURE_ARG_POINTER(aRowOrColIndex);
|
||||||
|
|
||||||
|
*aRowOrColIndex = mRowOrColIndex;
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP
|
||||||
|
nsAccTableChangeEvent::GetNumRowsOrCols(PRInt32* aNumRowsOrCols)
|
||||||
|
{
|
||||||
|
NS_ENSURE_ARG_POINTER(aNumRowsOrCols);
|
||||||
|
|
||||||
|
*aNumRowsOrCols = mNumRowsOrCols;
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -54,16 +54,16 @@ class nsAccEvent: public nsIAccessibleEvent
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Initialize with an nsIAccessible
|
// Initialize with an nsIAccessible
|
||||||
nsAccEvent(PRUint32 aEventType, nsIAccessible *aAccessible, void *aEventData, PRBool aIsAsynch = PR_FALSE);
|
nsAccEvent(PRUint32 aEventType, nsIAccessible *aAccessible, PRBool aIsAsynch = PR_FALSE);
|
||||||
// Initialize with an nsIDOMNode
|
// Initialize with an nsIDOMNode
|
||||||
nsAccEvent(PRUint32 aEventType, nsIDOMNode *aDOMNode, void *aEventData, PRBool aIsAsynch = PR_FALSE);
|
nsAccEvent(PRUint32 aEventType, nsIDOMNode *aDOMNode, PRBool aIsAsynch = PR_FALSE);
|
||||||
virtual ~nsAccEvent() {}
|
virtual ~nsAccEvent() {}
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
NS_DECL_NSIACCESSIBLEEVENT
|
NS_DECL_NSIACCESSIBLEEVENT
|
||||||
|
|
||||||
static void GetLastEventAttributes(nsIDOMNode *aNode,
|
static void GetLastEventAttributes(nsIDOMNode *aNode,
|
||||||
nsIPersistentProperties *aAttributes);
|
nsIPersistentProperties *aAttributes);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
already_AddRefed<nsIAccessible> GetAccessibleByNode();
|
already_AddRefed<nsIAccessible> GetAccessibleByNode();
|
||||||
@ -96,8 +96,6 @@ public:
|
|||||||
* was waiting in an event queue
|
* was waiting in an event queue
|
||||||
*/
|
*/
|
||||||
static void PrepareForEvent(nsIAccessibleEvent *aEvent);
|
static void PrepareForEvent(nsIAccessibleEvent *aEvent);
|
||||||
|
|
||||||
void *mEventData;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class nsAccStateChangeEvent: public nsAccEvent,
|
class nsAccStateChangeEvent: public nsAccEvent,
|
||||||
@ -158,12 +156,20 @@ private:
|
|||||||
PRInt32 mCaretOffset;
|
PRInt32 mCaretOffset;
|
||||||
};
|
};
|
||||||
|
|
||||||
// XXX todo: We might want to use XPCOM interfaces instead of struct
|
class nsAccTableChangeEvent : public nsAccEvent,
|
||||||
// e.g., nsAccessibleTableChangeEvent: public nsIAccessibleTableChangeEvent
|
public nsIAccessibleTableChangeEvent {
|
||||||
|
public:
|
||||||
|
nsAccTableChangeEvent(nsIAccessible *aAccessible, PRUint32 aEventType,
|
||||||
|
PRInt32 aRowOrColIndex, PRInt32 aNumRowsOrCols,
|
||||||
|
PRBool aIsAsynch);
|
||||||
|
|
||||||
struct AtkTableChange {
|
NS_DECL_ISUPPORTS
|
||||||
PRUint32 index; // the start row/column after which the rows are inserted/deleted.
|
NS_FORWARD_NSIACCESSIBLEEVENT(nsAccEvent::)
|
||||||
PRUint32 count; // the number of inserted/deleted rows/columns
|
NS_DECL_NSIACCESSIBLETABLECHANGEEVENT
|
||||||
|
|
||||||
|
private:
|
||||||
|
PRUint32 mRowOrColIndex; // the start row/column after which the rows are inserted/deleted.
|
||||||
|
PRUint32 mNumRowsOrCols; // the number of inserted/deleted rows/columns
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -146,13 +146,18 @@ nsLinkableAccessible::GetState(PRUint32 *aState, PRUint32 *aExtraState)
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsLinkableAccessible::GetValue(nsAString& _retval)
|
NS_IMETHODIMP nsLinkableAccessible::GetValue(nsAString& aValue)
|
||||||
{
|
{
|
||||||
|
aValue.Truncate();
|
||||||
|
nsHyperTextAccessible::GetValue(aValue);
|
||||||
|
if (!aValue.IsEmpty())
|
||||||
|
return NS_OK;
|
||||||
|
|
||||||
if (mIsLink) {
|
if (mIsLink) {
|
||||||
nsCOMPtr<nsIDOMNode> linkNode(do_QueryInterface(mActionContent));
|
nsCOMPtr<nsIDOMNode> linkNode(do_QueryInterface(mActionContent));
|
||||||
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mWeakShell));
|
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mWeakShell));
|
||||||
if (linkNode && presShell)
|
if (linkNode && presShell)
|
||||||
return presShell->GetLinkLocation(linkNode, _retval);
|
return presShell->GetLinkLocation(linkNode, aValue);
|
||||||
}
|
}
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
return NS_ERROR_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
@ -88,6 +88,10 @@ nsresult nsCaretAccessible::ClearControlSelectionListener()
|
|||||||
|
|
||||||
nsresult nsCaretAccessible::SetControlSelectionListener(nsIDOMNode *aCurrentNode)
|
nsresult nsCaretAccessible::SetControlSelectionListener(nsIDOMNode *aCurrentNode)
|
||||||
{
|
{
|
||||||
|
NS_ENSURE_TRUE(mRootAccessible, NS_ERROR_FAILURE);
|
||||||
|
|
||||||
|
ClearControlSelectionListener();
|
||||||
|
|
||||||
mCurrentControl = aCurrentNode;
|
mCurrentControl = aCurrentNode;
|
||||||
mLastTextAccessible = nsnull;
|
mLastTextAccessible = nsnull;
|
||||||
|
|
||||||
@ -121,7 +125,6 @@ nsresult nsCaretAccessible::SetControlSelectionListener(nsIDOMNode *aCurrentNode
|
|||||||
nsCOMPtr<nsISelection> domSel;
|
nsCOMPtr<nsISelection> domSel;
|
||||||
selCon->GetSelection(nsISelectionController::SELECTION_NORMAL, getter_AddRefs(domSel));
|
selCon->GetSelection(nsISelectionController::SELECTION_NORMAL, getter_AddRefs(domSel));
|
||||||
|
|
||||||
ClearControlSelectionListener();
|
|
||||||
nsCOMPtr<nsISelectionPrivate> selPrivate(do_QueryInterface(domSel));
|
nsCOMPtr<nsISelectionPrivate> selPrivate(do_QueryInterface(domSel));
|
||||||
NS_ENSURE_TRUE(selPrivate, NS_ERROR_FAILURE);
|
NS_ENSURE_TRUE(selPrivate, NS_ERROR_FAILURE);
|
||||||
|
|
||||||
@ -131,6 +134,8 @@ nsresult nsCaretAccessible::SetControlSelectionListener(nsIDOMNode *aCurrentNode
|
|||||||
|
|
||||||
nsresult nsCaretAccessible::AddDocSelectionListener(nsIDOMDocument *aDoc)
|
nsresult nsCaretAccessible::AddDocSelectionListener(nsIDOMDocument *aDoc)
|
||||||
{
|
{
|
||||||
|
NS_ENSURE_TRUE(mRootAccessible, NS_ERROR_FAILURE);
|
||||||
|
|
||||||
nsCOMPtr<nsIDocument> doc = do_QueryInterface(aDoc);
|
nsCOMPtr<nsIDocument> doc = do_QueryInterface(aDoc);
|
||||||
NS_ENSURE_TRUE(doc, NS_ERROR_FAILURE);
|
NS_ENSURE_TRUE(doc, NS_ERROR_FAILURE);
|
||||||
nsCOMPtr<nsISelectionController> selCon = do_QueryInterface(doc->GetPrimaryShell());
|
nsCOMPtr<nsISelectionController> selCon = do_QueryInterface(doc->GetPrimaryShell());
|
||||||
@ -171,7 +176,7 @@ NS_IMETHODIMP nsCaretAccessible::NotifySelectionChanged(nsIDOMDocument *aDoc, ns
|
|||||||
nsIPresShell *presShell = doc->GetPrimaryShell();
|
nsIPresShell *presShell = doc->GetPrimaryShell();
|
||||||
NS_ENSURE_TRUE(presShell, NS_OK);
|
NS_ENSURE_TRUE(presShell, NS_OK);
|
||||||
|
|
||||||
// Get first nnsIAccessibleText in parent chain and fire caret-move, selection-change event for it
|
// Get first nsIAccessibleText in parent chain and fire caret-move, selection-change event for it
|
||||||
nsCOMPtr<nsIAccessible> accessible;
|
nsCOMPtr<nsIAccessible> accessible;
|
||||||
nsIAccessibilityService *accService = mRootAccessible->GetAccService();
|
nsIAccessibilityService *accService = mRootAccessible->GetAccService();
|
||||||
NS_ENSURE_TRUE(accService, NS_ERROR_FAILURE);
|
NS_ENSURE_TRUE(accService, NS_ERROR_FAILURE);
|
||||||
@ -248,6 +253,7 @@ nsCaretAccessible::GetCaretRect(nsIWidget **aOutWidget)
|
|||||||
nsRect caretRect;
|
nsRect caretRect;
|
||||||
NS_ENSURE_TRUE(aOutWidget, caretRect);
|
NS_ENSURE_TRUE(aOutWidget, caretRect);
|
||||||
*aOutWidget = nsnull;
|
*aOutWidget = nsnull;
|
||||||
|
NS_ENSURE_TRUE(mRootAccessible, caretRect);
|
||||||
|
|
||||||
if (!mLastTextAccessible) {
|
if (!mLastTextAccessible) {
|
||||||
return caretRect; // Return empty rect
|
return caretRect; // Return empty rect
|
||||||
|
@ -691,6 +691,7 @@ nsresult nsDocAccessible::RemoveEventListeners()
|
|||||||
if (mScrollWatchTimer) {
|
if (mScrollWatchTimer) {
|
||||||
mScrollWatchTimer->Cancel();
|
mScrollWatchTimer->Cancel();
|
||||||
mScrollWatchTimer = nsnull;
|
mScrollWatchTimer = nsnull;
|
||||||
|
NS_RELEASE_THIS(); // Kung fu death grip
|
||||||
}
|
}
|
||||||
|
|
||||||
nsRefPtr<nsRootAccessible> rootAccessible(GetRootAccessible());
|
nsRefPtr<nsRootAccessible> rootAccessible(GetRootAccessible());
|
||||||
@ -827,6 +828,7 @@ void nsDocAccessible::ScrollTimerCallback(nsITimer *aTimer, void *aClosure)
|
|||||||
if (docAcc->mScrollWatchTimer) {
|
if (docAcc->mScrollWatchTimer) {
|
||||||
docAcc->mScrollWatchTimer->Cancel();
|
docAcc->mScrollWatchTimer->Cancel();
|
||||||
docAcc->mScrollWatchTimer = nsnull;
|
docAcc->mScrollWatchTimer = nsnull;
|
||||||
|
NS_RELEASE(docAcc); // Release kung fu death grip
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -879,6 +881,7 @@ NS_IMETHODIMP nsDocAccessible::ScrollPositionDidChange(nsIScrollableView *aScrol
|
|||||||
else {
|
else {
|
||||||
mScrollWatchTimer = do_CreateInstance("@mozilla.org/timer;1");
|
mScrollWatchTimer = do_CreateInstance("@mozilla.org/timer;1");
|
||||||
if (mScrollWatchTimer) {
|
if (mScrollWatchTimer) {
|
||||||
|
NS_ADDREF_THIS(); // Kung fu death grip
|
||||||
mScrollWatchTimer->InitWithFuncCallback(ScrollTimerCallback, this,
|
mScrollWatchTimer->InitWithFuncCallback(ScrollTimerCallback, this,
|
||||||
kScrollPosCheckWait,
|
kScrollPosCheckWait,
|
||||||
nsITimer::TYPE_REPEATING_SLACK);
|
nsITimer::TYPE_REPEATING_SLACK);
|
||||||
@ -1030,19 +1033,19 @@ nsDocAccessible::AttributeChangedImpl(nsIContent* aContent, PRInt32 aNameSpaceID
|
|||||||
multiSelectAccessNode->GetDOMNode(getter_AddRefs(multiSelectDOMNode));
|
multiSelectAccessNode->GetDOMNode(getter_AddRefs(multiSelectDOMNode));
|
||||||
NS_ASSERTION(multiSelectDOMNode, "A new accessible without a DOM node!");
|
NS_ASSERTION(multiSelectDOMNode, "A new accessible without a DOM node!");
|
||||||
FireDelayedToolkitEvent(nsIAccessibleEvent::EVENT_SELECTION_WITHIN,
|
FireDelayedToolkitEvent(nsIAccessibleEvent::EVENT_SELECTION_WITHIN,
|
||||||
multiSelectDOMNode, nsnull, eAllowDupes);
|
multiSelectDOMNode, eAllowDupes);
|
||||||
|
|
||||||
static nsIContent::AttrValuesArray strings[] =
|
static nsIContent::AttrValuesArray strings[] =
|
||||||
{&nsAccessibilityAtoms::_empty, &nsAccessibilityAtoms::_false, nsnull};
|
{&nsAccessibilityAtoms::_empty, &nsAccessibilityAtoms::_false, nsnull};
|
||||||
if (aContent->FindAttrValueIn(kNameSpaceID_None, aAttribute,
|
if (aContent->FindAttrValueIn(kNameSpaceID_None, aAttribute,
|
||||||
strings, eCaseMatters) >= 0) {
|
strings, eCaseMatters) >= 0) {
|
||||||
FireDelayedToolkitEvent(nsIAccessibleEvent::EVENT_SELECTION_REMOVE,
|
FireDelayedToolkitEvent(nsIAccessibleEvent::EVENT_SELECTION_REMOVE,
|
||||||
targetNode, nsnull);
|
targetNode);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
FireDelayedToolkitEvent(nsIAccessibleEvent::EVENT_SELECTION_ADD,
|
FireDelayedToolkitEvent(nsIAccessibleEvent::EVENT_SELECTION_ADD,
|
||||||
targetNode, nsnull);
|
targetNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1152,7 +1155,7 @@ nsDocAccessible::ARIAAttributeChanged(nsIContent* aContent, nsIAtom* aAttribute)
|
|||||||
|
|
||||||
if (aAttribute == nsAccessibilityAtoms::aria_valuenow) {
|
if (aAttribute == nsAccessibilityAtoms::aria_valuenow) {
|
||||||
FireDelayedToolkitEvent(nsIAccessibleEvent::EVENT_VALUE_CHANGE,
|
FireDelayedToolkitEvent(nsIAccessibleEvent::EVENT_VALUE_CHANGE,
|
||||||
targetNode, nsnull);
|
targetNode);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1381,12 +1384,11 @@ nsDocAccessible::CreateTextChangeEventForNode(nsIAccessible *aContainerAccessibl
|
|||||||
|
|
||||||
nsresult nsDocAccessible::FireDelayedToolkitEvent(PRUint32 aEvent,
|
nsresult nsDocAccessible::FireDelayedToolkitEvent(PRUint32 aEvent,
|
||||||
nsIDOMNode *aDOMNode,
|
nsIDOMNode *aDOMNode,
|
||||||
void *aData,
|
|
||||||
EDupeEventRule aAllowDupes,
|
EDupeEventRule aAllowDupes,
|
||||||
PRBool aIsAsynch)
|
PRBool aIsAsynch)
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIAccessibleEvent> event =
|
nsCOMPtr<nsIAccessibleEvent> event =
|
||||||
new nsAccEvent(aEvent, aDOMNode, aData, PR_TRUE);
|
new nsAccEvent(aEvent, aDOMNode, PR_TRUE);
|
||||||
NS_ENSURE_TRUE(event, NS_ERROR_OUT_OF_MEMORY);
|
NS_ENSURE_TRUE(event, NS_ERROR_OUT_OF_MEMORY);
|
||||||
|
|
||||||
return FireDelayedAccessibleEvent(event, aAllowDupes, aIsAsynch);
|
return FireDelayedAccessibleEvent(event, aAllowDupes, aIsAsynch);
|
||||||
@ -1622,14 +1624,30 @@ void nsDocAccessible::FlushEventsCallback(nsITimer *aTimer, void *aClosure)
|
|||||||
|
|
||||||
void nsDocAccessible::RefreshNodes(nsIDOMNode *aStartNode)
|
void nsDocAccessible::RefreshNodes(nsIDOMNode *aStartNode)
|
||||||
{
|
{
|
||||||
|
if (mAccessNodeCache.Count() <= 1) {
|
||||||
|
return; // All we have is a doc accessible. There is nothing to invalidate, quit early
|
||||||
|
}
|
||||||
|
|
||||||
nsCOMPtr<nsIAccessNode> accessNode;
|
nsCOMPtr<nsIAccessNode> accessNode;
|
||||||
GetCachedAccessNode(aStartNode, getter_AddRefs(accessNode));
|
GetCachedAccessNode(aStartNode, getter_AddRefs(accessNode));
|
||||||
nsCOMPtr<nsIDOMNode> nextNode, iterNode;
|
|
||||||
|
|
||||||
// Shut down accessible subtree, which may have been created for
|
// Shut down accessible subtree, which may have been created for
|
||||||
// anonymous content subtree
|
// anonymous content subtree
|
||||||
nsCOMPtr<nsIAccessible> accessible(do_QueryInterface(accessNode));
|
nsCOMPtr<nsIAccessible> accessible(do_QueryInterface(accessNode));
|
||||||
if (accessible) {
|
if (accessible) {
|
||||||
|
// Fire menupopup end if a menu goes away
|
||||||
|
PRUint32 role = Role(accessible);
|
||||||
|
if (role == nsIAccessibleRole::ROLE_MENUPOPUP) {
|
||||||
|
nsCOMPtr<nsIDOMNode> domNode;
|
||||||
|
accessNode->GetDOMNode(getter_AddRefs(domNode));
|
||||||
|
nsCOMPtr<nsIDOMXULPopupElement> popup(do_QueryInterface(domNode));
|
||||||
|
if (!popup) {
|
||||||
|
// Popup elements already fire these via DOMMenuInactive
|
||||||
|
// handling in nsRootAccessible::HandleEvent
|
||||||
|
nsAccUtils::FireAccEvent(nsIAccessibleEvent::EVENT_MENUPOPUP_END,
|
||||||
|
accessible);
|
||||||
|
}
|
||||||
|
}
|
||||||
nsCOMPtr<nsPIAccessible> privateAccessible = do_QueryInterface(accessible);
|
nsCOMPtr<nsPIAccessible> privateAccessible = do_QueryInterface(accessible);
|
||||||
NS_ASSERTION(privateAccessible, "No nsPIAccessible for nsIAccessible");
|
NS_ASSERTION(privateAccessible, "No nsPIAccessible for nsIAccessible");
|
||||||
|
|
||||||
@ -1645,55 +1663,54 @@ void nsDocAccessible::RefreshNodes(nsIDOMNode *aStartNode)
|
|||||||
|
|
||||||
PRUint32 childCount;
|
PRUint32 childCount;
|
||||||
children->GetLength(&childCount);
|
children->GetLength(&childCount);
|
||||||
|
nsCOMPtr<nsIDOMNode> possibleAnonNode;
|
||||||
for (PRUint32 index = 0; index < childCount; index++) {
|
for (PRUint32 index = 0; index < childCount; index++) {
|
||||||
nsCOMPtr<nsIAccessNode> childAccessNode;
|
nsCOMPtr<nsIAccessNode> childAccessNode;
|
||||||
children->QueryElementAt(index, NS_GET_IID(nsIAccessNode),
|
children->QueryElementAt(index, NS_GET_IID(nsIAccessNode),
|
||||||
getter_AddRefs(childAccessNode));
|
getter_AddRefs(childAccessNode));
|
||||||
childAccessNode->GetDOMNode(getter_AddRefs(iterNode));
|
childAccessNode->GetDOMNode(getter_AddRefs(possibleAnonNode));
|
||||||
nsCOMPtr<nsIContent> iterContent = do_QueryInterface(iterNode);
|
nsCOMPtr<nsIContent> iterContent = do_QueryInterface(possibleAnonNode);
|
||||||
if (iterContent && (iterContent->IsNativeAnonymous() ||
|
if (iterContent && (iterContent->IsNativeAnonymous() ||
|
||||||
iterContent->GetBindingParent())) {
|
iterContent->GetBindingParent())) {
|
||||||
// GetBindingParent() check is a perf win -- make sure we don't
|
// GetBindingParent() check is a perf win -- make sure we don't
|
||||||
// shut down the same subtree twice since we'll reach non-anon content via
|
// shut down the same subtree twice since we'll reach non-anon content via
|
||||||
// DOM traversal later in this method
|
// DOM traversal later in this method
|
||||||
RefreshNodes(iterNode);
|
RefreshNodes(possibleAnonNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shutdown ordinary content subtree as well -- there may be
|
|
||||||
// access node children which are not full accessible objects
|
|
||||||
aStartNode->GetFirstChild(getter_AddRefs(nextNode));
|
|
||||||
while (nextNode) {
|
|
||||||
nextNode.swap(iterNode);
|
|
||||||
RefreshNodes(iterNode);
|
|
||||||
iterNode->GetNextSibling(getter_AddRefs(nextNode));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Don't shutdown our doc object!
|
|
||||||
if (accessNode && accessNode != static_cast<nsIAccessNode*>(this)) {
|
|
||||||
// Fire menupopup end if a menu goes away
|
|
||||||
PRUint32 role = Role(accessible);
|
|
||||||
if (role == nsIAccessibleRole::ROLE_MENUPOPUP) {
|
|
||||||
nsCOMPtr<nsIDOMNode> domNode;
|
|
||||||
accessNode->GetDOMNode(getter_AddRefs(domNode));
|
|
||||||
nsCOMPtr<nsIDOMXULPopupElement> popup(do_QueryInterface(domNode));
|
|
||||||
if (!popup) {
|
|
||||||
// Popup elements already fire these via DOMMenuInactive
|
|
||||||
// handling in nsRootAccessible::HandleEvent
|
|
||||||
nsAccUtils::FireAccEvent(nsIAccessibleEvent::EVENT_MENUPOPUP_END,
|
|
||||||
accessible);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Shut down the actual accessible or access node
|
|
||||||
void *uniqueID;
|
|
||||||
accessNode->GetUniqueID(&uniqueID);
|
|
||||||
nsCOMPtr<nsPIAccessNode> privateAccessNode(do_QueryInterface(accessNode));
|
|
||||||
privateAccessNode->Shutdown();
|
|
||||||
// Remove from hash table as well
|
|
||||||
mAccessNodeCache.Remove(uniqueID);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Shutdown ordinary content subtree as well -- there may be
|
||||||
|
// access node children which are not full accessible objects
|
||||||
|
nsCOMPtr<nsIDOMNode> nextNode, iterNode;
|
||||||
|
aStartNode->GetFirstChild(getter_AddRefs(nextNode));
|
||||||
|
while (nextNode) {
|
||||||
|
nextNode.swap(iterNode);
|
||||||
|
RefreshNodes(iterNode);
|
||||||
|
iterNode->GetNextSibling(getter_AddRefs(nextNode));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!accessNode)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (accessNode == this) {
|
||||||
|
// Don't shutdown our doc object -- this may just be from the finished loading.
|
||||||
|
// We will completely shut it down when the pagehide event is received
|
||||||
|
// However, we must invalidate the doc accessible's children in order to be sure
|
||||||
|
// all pointers to them are correct
|
||||||
|
InvalidateChildren();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Shut down the actual accessible or access node
|
||||||
|
void *uniqueID;
|
||||||
|
accessNode->GetUniqueID(&uniqueID);
|
||||||
|
nsCOMPtr<nsPIAccessNode> privateAccessNode(do_QueryInterface(accessNode));
|
||||||
|
privateAccessNode->Shutdown();
|
||||||
|
|
||||||
|
// Remove from hash table as well
|
||||||
|
mAccessNodeCache.Remove(uniqueID);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsDocAccessible::InvalidateCacheSubtree(nsIContent *aChild,
|
NS_IMETHODIMP nsDocAccessible::InvalidateCacheSubtree(nsIContent *aChild,
|
||||||
@ -1742,37 +1759,29 @@ NS_IMETHODIMP nsDocAccessible::InvalidateCacheSubtree(nsIContent *aChild,
|
|||||||
// which it is if anyone asks for its children right now.
|
// which it is if anyone asks for its children right now.
|
||||||
return InvalidateChildren();
|
return InvalidateChildren();
|
||||||
}
|
}
|
||||||
if (aChangeEventType == nsIAccessibleEvent::EVENT_DOM_CREATE) {
|
nsIEventStateManager *esm = presShell->GetPresContext()->EventStateManager();
|
||||||
nsIEventStateManager *esm = presShell->GetPresContext()->EventStateManager();
|
NS_ENSURE_TRUE(esm, NS_ERROR_FAILURE);
|
||||||
NS_ENSURE_TRUE(esm, NS_ERROR_FAILURE);
|
if (!esm->IsHandlingUserInputExternal()) {
|
||||||
if (!esm->IsHandlingUserInputExternal()) {
|
// Changes during page load, but not caused by user input
|
||||||
// Adding content during page load, but not caused by user input
|
// Just invalidate accessible hierarchy and return,
|
||||||
// Just invalidate accessible hierarchy and return,
|
// otherwise the page load time slows down way too much
|
||||||
// otherwise the page load time slows down way too much
|
nsCOMPtr<nsIAccessible> containerAccessible;
|
||||||
nsCOMPtr<nsIAccessible> containerAccessible;
|
GetAccessibleInParentChain(childNode, PR_FALSE, getter_AddRefs(containerAccessible));
|
||||||
GetAccessibleInParentChain(childNode, PR_FALSE, getter_AddRefs(containerAccessible));
|
if (!containerAccessible) {
|
||||||
if (!containerAccessible) {
|
containerAccessible = this;
|
||||||
containerAccessible = this;
|
}
|
||||||
}
|
nsCOMPtr<nsPIAccessible> privateContainer = do_QueryInterface(containerAccessible);
|
||||||
nsCOMPtr<nsPIAccessible> privateContainer = do_QueryInterface(containerAccessible);
|
return privateContainer->InvalidateChildren();
|
||||||
return privateContainer->InvalidateChildren();
|
}
|
||||||
}
|
// else: user input, so we must fall through and for full handling,
|
||||||
// else: user input, so we must fall through and for full handling,
|
// e.g. fire the mutation events. Note: user input could cause DOM_CREATE
|
||||||
// e.g. fire the mutation events. Note: user input could cause DOM_CREATE
|
// during page load if user typed into an input field or contentEditable area
|
||||||
// during page load if user typed into an input field or contentEditable area
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update last change state information
|
// Update last change state information
|
||||||
nsCOMPtr<nsIAccessNode> childAccessNode;
|
nsCOMPtr<nsIAccessNode> childAccessNode;
|
||||||
GetCachedAccessNode(childNode, getter_AddRefs(childAccessNode));
|
GetCachedAccessNode(childNode, getter_AddRefs(childAccessNode));
|
||||||
nsCOMPtr<nsIAccessible> childAccessible = do_QueryInterface(childAccessNode);
|
nsCOMPtr<nsIAccessible> childAccessible = do_QueryInterface(childAccessNode);
|
||||||
if (!childAccessible && !isHiding) {
|
|
||||||
// If not about to hide it, make sure there's an accessible so we can fire an
|
|
||||||
// event for it
|
|
||||||
GetAccService()->GetAttachedAccessibleFor(childNode,
|
|
||||||
getter_AddRefs(childAccessible));
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef DEBUG_A11Y
|
#ifdef DEBUG_A11Y
|
||||||
nsAutoString localName;
|
nsAutoString localName;
|
||||||
@ -1870,14 +1879,14 @@ NS_IMETHODIMP nsDocAccessible::InvalidateCacheSubtree(nsIContent *aChild,
|
|||||||
// nsIAccessibleStates::STATE_INVISIBLE for the event's accessible object.
|
// nsIAccessibleStates::STATE_INVISIBLE for the event's accessible object.
|
||||||
PRUint32 additionEvent = isAsynch ? nsIAccessibleEvent::EVENT_ASYNCH_SHOW :
|
PRUint32 additionEvent = isAsynch ? nsIAccessibleEvent::EVENT_ASYNCH_SHOW :
|
||||||
nsIAccessibleEvent::EVENT_DOM_CREATE;
|
nsIAccessibleEvent::EVENT_DOM_CREATE;
|
||||||
FireDelayedToolkitEvent(additionEvent, childNode, nsnull,
|
FireDelayedToolkitEvent(additionEvent, childNode,
|
||||||
eCoalesceFromSameSubtree, isAsynch);
|
eCoalesceFromSameSubtree, isAsynch);
|
||||||
|
|
||||||
// Check to see change occured in an ARIA menu, and fire an EVENT_MENUPOPUP_START if it did
|
// Check to see change occured in an ARIA menu, and fire an EVENT_MENUPOPUP_START if it did
|
||||||
nsRoleMapEntry *roleMapEntry = nsAccUtils::GetRoleMapEntry(childNode);
|
nsRoleMapEntry *roleMapEntry = nsAccUtils::GetRoleMapEntry(childNode);
|
||||||
if (roleMapEntry && roleMapEntry->role == nsIAccessibleRole::ROLE_MENUPOPUP) {
|
if (roleMapEntry && roleMapEntry->role == nsIAccessibleRole::ROLE_MENUPOPUP) {
|
||||||
FireDelayedToolkitEvent(nsIAccessibleEvent::EVENT_MENUPOPUP_START,
|
FireDelayedToolkitEvent(nsIAccessibleEvent::EVENT_MENUPOPUP_START,
|
||||||
childNode, nsnull, eAllowDupes, isAsynch);
|
childNode, eAllowDupes, isAsynch);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check to see if change occured inside an alert, and fire an EVENT_ALERT if it did
|
// Check to see if change occured inside an alert, and fire an EVENT_ALERT if it did
|
||||||
@ -1885,7 +1894,7 @@ NS_IMETHODIMP nsDocAccessible::InvalidateCacheSubtree(nsIContent *aChild,
|
|||||||
while (PR_TRUE) {
|
while (PR_TRUE) {
|
||||||
if (roleMapEntry && roleMapEntry->role == nsIAccessibleRole::ROLE_ALERT) {
|
if (roleMapEntry && roleMapEntry->role == nsIAccessibleRole::ROLE_ALERT) {
|
||||||
nsCOMPtr<nsIDOMNode> alertNode(do_QueryInterface(ancestor));
|
nsCOMPtr<nsIDOMNode> alertNode(do_QueryInterface(ancestor));
|
||||||
FireDelayedToolkitEvent(nsIAccessibleEvent::EVENT_ALERT, alertNode, nsnull,
|
FireDelayedToolkitEvent(nsIAccessibleEvent::EVENT_ALERT, alertNode,
|
||||||
eRemoveDupes, isAsynch);
|
eRemoveDupes, isAsynch);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1904,7 +1913,7 @@ NS_IMETHODIMP nsDocAccessible::InvalidateCacheSubtree(nsIContent *aChild,
|
|||||||
// from SHOW and HIDE so that they don't fetch extra objects
|
// from SHOW and HIDE so that they don't fetch extra objects
|
||||||
if (childAccessible) {
|
if (childAccessible) {
|
||||||
nsCOMPtr<nsIAccessibleEvent> reorderEvent =
|
nsCOMPtr<nsIAccessibleEvent> reorderEvent =
|
||||||
new nsAccEvent(nsIAccessibleEvent::EVENT_REORDER, containerAccessible, nsnull, PR_TRUE);
|
new nsAccEvent(nsIAccessibleEvent::EVENT_REORDER, containerAccessible, PR_TRUE);
|
||||||
NS_ENSURE_TRUE(reorderEvent, NS_ERROR_OUT_OF_MEMORY);
|
NS_ENSURE_TRUE(reorderEvent, NS_ERROR_OUT_OF_MEMORY);
|
||||||
FireDelayedAccessibleEvent(reorderEvent, eCoalesceFromSameSubtree, isAsynch);
|
FireDelayedAccessibleEvent(reorderEvent, eCoalesceFromSameSubtree, isAsynch);
|
||||||
}
|
}
|
||||||
@ -1980,7 +1989,7 @@ nsDocAccessible::FireShowHideEvents(nsIDOMNode *aDOMNode, PRUint32 aEventType,
|
|||||||
aEventType == nsIAccessibleEvent::EVENT_ASYNCH_SHOW;
|
aEventType == nsIAccessibleEvent::EVENT_ASYNCH_SHOW;
|
||||||
|
|
||||||
nsCOMPtr<nsIAccessibleEvent> event =
|
nsCOMPtr<nsIAccessibleEvent> event =
|
||||||
new nsAccEvent(aEventType, accessible, nsnull, isAsynch);
|
new nsAccEvent(aEventType, accessible, isAsynch);
|
||||||
NS_ENSURE_TRUE(event, NS_ERROR_OUT_OF_MEMORY);
|
NS_ENSURE_TRUE(event, NS_ERROR_OUT_OF_MEMORY);
|
||||||
if (aForceIsFromUserInput) {
|
if (aForceIsFromUserInput) {
|
||||||
nsAccEvent::PrepareForEvent(aDOMNode, aForceIsFromUserInput);
|
nsAccEvent::PrepareForEvent(aDOMNode, aForceIsFromUserInput);
|
||||||
|
@ -108,7 +108,6 @@ class nsDocAccessible : public nsHyperTextAccessibleWrap,
|
|||||||
*
|
*
|
||||||
* @param aEvent - the nsIAccessibleEvent event type
|
* @param aEvent - the nsIAccessibleEvent event type
|
||||||
* @param aDOMNode - DOM node the accesible event should be fired for
|
* @param aDOMNode - DOM node the accesible event should be fired for
|
||||||
* @param aData - any additional data for the event
|
|
||||||
* @param aAllowDupes - eAllowDupes: more than one event of the same type is allowed.
|
* @param aAllowDupes - eAllowDupes: more than one event of the same type is allowed.
|
||||||
* eCoalesceFromSameSubtree: if two events are in the same subtree,
|
* eCoalesceFromSameSubtree: if two events are in the same subtree,
|
||||||
* only the event on ancestor is used
|
* only the event on ancestor is used
|
||||||
@ -119,7 +118,7 @@ class nsDocAccessible : public nsHyperTextAccessibleWrap,
|
|||||||
* synchronous with a DOM event
|
* synchronous with a DOM event
|
||||||
*/
|
*/
|
||||||
nsresult FireDelayedToolkitEvent(PRUint32 aEvent, nsIDOMNode *aDOMNode,
|
nsresult FireDelayedToolkitEvent(PRUint32 aEvent, nsIDOMNode *aDOMNode,
|
||||||
void *aData, EDupeEventRule aAllowDupes = eRemoveDupes,
|
EDupeEventRule aAllowDupes = eRemoveDupes,
|
||||||
PRBool aIsAsynch = PR_FALSE);
|
PRBool aIsAsynch = PR_FALSE);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -74,7 +74,7 @@ NS_IMETHODIMP nsOuterDocAccessible::GetName(nsAString& aName)
|
|||||||
/* unsigned long getRole (); */
|
/* unsigned long getRole (); */
|
||||||
NS_IMETHODIMP nsOuterDocAccessible::GetRole(PRUint32 *aRole)
|
NS_IMETHODIMP nsOuterDocAccessible::GetRole(PRUint32 *aRole)
|
||||||
{
|
{
|
||||||
*aRole = nsIAccessibleRole::ROLE_CLIENT;
|
*aRole = nsIAccessibleRole::ROLE_INTERNAL_FRAME;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ void nsOuterDocAccessible::CacheChildren()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetFirstChild(nsnull);
|
InvalidateChildren();
|
||||||
mAccChildCount = 0;
|
mAccChildCount = 0;
|
||||||
|
|
||||||
// In these variable names, "outer" relates to the nsOuterDocAccessible
|
// In these variable names, "outer" relates to the nsOuterDocAccessible
|
||||||
|
@ -430,7 +430,7 @@ void nsRootAccessible::TryFireEarlyLoadEvent(nsIDOMNode *aDocNode)
|
|||||||
|
|
||||||
// No frames or iframes, so we can fire the doc load finished event early
|
// No frames or iframes, so we can fire the doc load finished event early
|
||||||
FireDelayedToolkitEvent(nsIAccessibleEvent::EVENT_INTERNAL_LOAD, aDocNode,
|
FireDelayedToolkitEvent(nsIAccessibleEvent::EVENT_INTERNAL_LOAD, aDocNode,
|
||||||
nsnull, eRemoveDupes);
|
eRemoveDupes);
|
||||||
}
|
}
|
||||||
|
|
||||||
PRBool nsRootAccessible::FireAccessibleFocusEvent(nsIAccessible *aAccessible,
|
PRBool nsRootAccessible::FireAccessibleFocusEvent(nsIAccessible *aAccessible,
|
||||||
@ -519,7 +519,7 @@ PRBool nsRootAccessible::FireAccessibleFocusEvent(nsIAccessible *aAccessible,
|
|||||||
}
|
}
|
||||||
else if (mCurrentARIAMenubar) {
|
else if (mCurrentARIAMenubar) {
|
||||||
nsCOMPtr<nsIAccessibleEvent> menuEndEvent =
|
nsCOMPtr<nsIAccessibleEvent> menuEndEvent =
|
||||||
new nsAccEvent(nsIAccessibleEvent::EVENT_MENU_END, mCurrentARIAMenubar, nsnull, PR_FALSE);
|
new nsAccEvent(nsIAccessibleEvent::EVENT_MENU_END, mCurrentARIAMenubar, PR_FALSE);
|
||||||
if (menuEndEvent) {
|
if (menuEndEvent) {
|
||||||
FireDelayedAccessibleEvent(menuEndEvent, eAllowDupes, PR_FALSE);
|
FireDelayedAccessibleEvent(menuEndEvent, eAllowDupes, PR_FALSE);
|
||||||
}
|
}
|
||||||
@ -543,7 +543,7 @@ PRBool nsRootAccessible::FireAccessibleFocusEvent(nsIAccessible *aAccessible,
|
|||||||
}
|
}
|
||||||
|
|
||||||
FireDelayedToolkitEvent(nsIAccessibleEvent::EVENT_FOCUS,
|
FireDelayedToolkitEvent(nsIAccessibleEvent::EVENT_FOCUS,
|
||||||
finalFocusNode, nsnull, eRemoveDupes, aIsAsynch);
|
finalFocusNode, eRemoveDupes, aIsAsynch);
|
||||||
|
|
||||||
return PR_TRUE;
|
return PR_TRUE;
|
||||||
}
|
}
|
||||||
@ -597,6 +597,9 @@ nsresult nsRootAccessible::HandleEventWithTarget(nsIDOMEvent* aEvent,
|
|||||||
aEvent->GetType(eventType);
|
aEvent->GetType(eventType);
|
||||||
nsAutoString localName;
|
nsAutoString localName;
|
||||||
aTargetNode->GetLocalName(localName);
|
aTargetNode->GetLocalName(localName);
|
||||||
|
#ifdef MOZ_XUL
|
||||||
|
PRBool isTree = localName.EqualsLiteral("tree");
|
||||||
|
#endif
|
||||||
#ifdef DEBUG_A11Y
|
#ifdef DEBUG_A11Y
|
||||||
// Very useful for debugging, please leave this here.
|
// Very useful for debugging, please leave this here.
|
||||||
if (eventType.EqualsLiteral("AlertActive")) {
|
if (eventType.EqualsLiteral("AlertActive")) {
|
||||||
@ -642,8 +645,9 @@ nsresult nsRootAccessible::HandleEventWithTarget(nsIDOMEvent* aEvent,
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MOZ_XUL
|
||||||
if (eventType.EqualsLiteral("TreeViewChanged")) { // Always asynch, always from user input
|
if (eventType.EqualsLiteral("TreeViewChanged")) { // Always asynch, always from user input
|
||||||
if (!localName.EqualsLiteral("tree"))
|
if (!isTree)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
nsCOMPtr<nsIContent> treeContent = do_QueryInterface(aTargetNode);
|
nsCOMPtr<nsIContent> treeContent = do_QueryInterface(aTargetNode);
|
||||||
@ -651,6 +655,44 @@ nsresult nsRootAccessible::HandleEventWithTarget(nsIDOMEvent* aEvent,
|
|||||||
return accService->InvalidateSubtreeFor(eventShell, treeContent,
|
return accService->InvalidateSubtreeFor(eventShell, treeContent,
|
||||||
nsIAccessibleEvent::EVENT_ASYNCH_SIGNIFICANT_CHANGE);
|
nsIAccessibleEvent::EVENT_ASYNCH_SIGNIFICANT_CHANGE);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (eventType.EqualsLiteral("popuphiding")) {
|
||||||
|
// If accessible focus was on or inside popup that closes,
|
||||||
|
// then restore it to true current focus.
|
||||||
|
// This is the case when we've been getting DOMMenuItemActive events
|
||||||
|
// inside of a combo box that closes. The real focus is on the combo box.
|
||||||
|
// It's also the case when a popup gets focus in ATK -- when it closes
|
||||||
|
// we need to fire an event to restore focus to where it was
|
||||||
|
if (!gLastFocusedNode) {
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
if (gLastFocusedNode != aTargetNode) {
|
||||||
|
// Was not focused on popup
|
||||||
|
nsCOMPtr<nsIDOMNode> parentOfFocus;
|
||||||
|
gLastFocusedNode->GetParentNode(getter_AddRefs(parentOfFocus));
|
||||||
|
if (parentOfFocus != aTargetNode) {
|
||||||
|
return NS_OK; // And was not focused on an item inside the popup
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Focus was on or inside of a popup that's being hidden
|
||||||
|
FireCurrentFocusEvent();
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (aTargetNode == mDOMNode && mDOMNode != gLastFocusedNode && eventType.EqualsLiteral("focus")) {
|
||||||
|
// Got focus event for the window, we will make sure that an accessible
|
||||||
|
// focus event for initial focus is fired. We do this on a short timer
|
||||||
|
// because the initial focus may not have been set yet.
|
||||||
|
if (!mFireFocusTimer) {
|
||||||
|
mFireFocusTimer = do_CreateInstance("@mozilla.org/timer;1");
|
||||||
|
}
|
||||||
|
if (mFireFocusTimer) {
|
||||||
|
mFireFocusTimer->InitWithFuncCallback(FireFocusCallback, this,
|
||||||
|
0, nsITimer::TYPE_ONE_SHOT);
|
||||||
|
}
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
nsCOMPtr<nsIAccessible> accessible;
|
nsCOMPtr<nsIAccessible> accessible;
|
||||||
accService->GetAccessibleInShell(aTargetNode, eventShell,
|
accService->GetAccessibleInShell(aTargetNode, eventShell,
|
||||||
@ -659,8 +701,9 @@ nsresult nsRootAccessible::HandleEventWithTarget(nsIDOMEvent* aEvent,
|
|||||||
if (!privAcc)
|
if (!privAcc)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
|
#ifdef MOZ_XUL
|
||||||
if (eventType.EqualsLiteral("TreeRowCountChanged")) {
|
if (eventType.EqualsLiteral("TreeRowCountChanged")) {
|
||||||
if (!localName.EqualsLiteral("tree"))
|
if (!isTree)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
nsCOMPtr<nsIDOMDataContainerEvent> dataEvent(do_QueryInterface(aEvent));
|
nsCOMPtr<nsIDOMDataContainerEvent> dataEvent(do_QueryInterface(aEvent));
|
||||||
@ -685,6 +728,7 @@ nsresult nsRootAccessible::HandleEventWithTarget(nsIDOMEvent* aEvent,
|
|||||||
|
|
||||||
return treeAccCache->InvalidateCache(index, count);
|
return treeAccCache->InvalidateCache(index, count);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (eventType.EqualsLiteral("RadioStateChange")) {
|
if (eventType.EqualsLiteral("RadioStateChange")) {
|
||||||
PRUint32 state = State(accessible);
|
PRUint32 state = State(accessible);
|
||||||
@ -723,7 +767,7 @@ nsresult nsRootAccessible::HandleEventWithTarget(nsIDOMEvent* aEvent,
|
|||||||
nsCOMPtr<nsIAccessible> treeItemAccessible;
|
nsCOMPtr<nsIAccessible> treeItemAccessible;
|
||||||
#ifdef MOZ_XUL
|
#ifdef MOZ_XUL
|
||||||
// If it's a tree element, need the currently selected item
|
// If it's a tree element, need the currently selected item
|
||||||
if (localName.EqualsLiteral("tree")) {
|
if (isTree) {
|
||||||
nsCOMPtr<nsIDOMXULMultiSelectControlElement> multiSelect =
|
nsCOMPtr<nsIDOMXULMultiSelectControlElement> multiSelect =
|
||||||
do_QueryInterface(aTargetNode);
|
do_QueryInterface(aTargetNode);
|
||||||
if (multiSelect) {
|
if (multiSelect) {
|
||||||
@ -779,19 +823,6 @@ nsresult nsRootAccessible::HandleEventWithTarget(nsIDOMEvent* aEvent,
|
|||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
if (eventType.EqualsLiteral("focus")) {
|
if (eventType.EqualsLiteral("focus")) {
|
||||||
if (aTargetNode == mDOMNode && mDOMNode != gLastFocusedNode) {
|
|
||||||
// Got focus event for the window, we will make sure that an accessible
|
|
||||||
// focus event for initial focus is fired. We do this on a short timer
|
|
||||||
// because the initial focus may not have been set yet.
|
|
||||||
if (!mFireFocusTimer) {
|
|
||||||
mFireFocusTimer = do_CreateInstance("@mozilla.org/timer;1");
|
|
||||||
}
|
|
||||||
if (mFireFocusTimer) {
|
|
||||||
mFireFocusTimer->InitWithFuncCallback(FireFocusCallback, this,
|
|
||||||
0, nsITimer::TYPE_ONE_SHOT);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Keep a reference to the target node. We might want to change
|
// Keep a reference to the target node. We might want to change
|
||||||
// it to the individual radio button or selected item, and send
|
// it to the individual radio button or selected item, and send
|
||||||
// the focus event to that.
|
// the focus event to that.
|
||||||
@ -847,28 +878,6 @@ nsresult nsRootAccessible::HandleEventWithTarget(nsIDOMEvent* aEvent,
|
|||||||
nsAccUtils::FireAccEvent(event, accessible);
|
nsAccUtils::FireAccEvent(event, accessible);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (eventType.EqualsLiteral("popuphiding")) {
|
|
||||||
// If accessible focus was on or inside popup that closes,
|
|
||||||
// then restore it to true current focus.
|
|
||||||
// This is the case when we've been getting DOMMenuItemActive events
|
|
||||||
// inside of a combo box that closes. The real focus is on the combo box.
|
|
||||||
// It's also the case when a popup gets focus in ATK -- when it closes
|
|
||||||
// we need to fire an event to restore focus to where it was
|
|
||||||
if (!gLastFocusedNode) {
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
if (gLastFocusedNode != aTargetNode) {
|
|
||||||
// Was not focused on popup
|
|
||||||
nsCOMPtr<nsIDOMNode> parentOfFocus;
|
|
||||||
gLastFocusedNode->GetParentNode(getter_AddRefs(parentOfFocus));
|
|
||||||
if (parentOfFocus != aTargetNode) {
|
|
||||||
return NS_OK; // And was not focused on an item inside the popup
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Focus was on or inside of a popup that's being hidden
|
|
||||||
FireCurrentFocusEvent();
|
|
||||||
}
|
|
||||||
else if (eventType.EqualsLiteral("DOMMenuInactive")) {
|
else if (eventType.EqualsLiteral("DOMMenuInactive")) {
|
||||||
if (Role(accessible) == nsIAccessibleRole::ROLE_MENUPOPUP) {
|
if (Role(accessible) == nsIAccessibleRole::ROLE_MENUPOPUP) {
|
||||||
nsAccUtils::FireAccEvent(nsIAccessibleEvent::EVENT_MENUPOPUP_END,
|
nsAccUtils::FireAccEvent(nsIAccessibleEvent::EVENT_MENUPOPUP_END,
|
||||||
@ -877,6 +886,11 @@ nsresult nsRootAccessible::HandleEventWithTarget(nsIDOMEvent* aEvent,
|
|||||||
}
|
}
|
||||||
else if (eventType.EqualsLiteral("DOMMenuItemActive")) {
|
else if (eventType.EqualsLiteral("DOMMenuItemActive")) {
|
||||||
if (!treeItemAccessible) {
|
if (!treeItemAccessible) {
|
||||||
|
#ifdef MOZ_XUL
|
||||||
|
if (isTree) {
|
||||||
|
return NS_OK; // Tree with nothing selected
|
||||||
|
}
|
||||||
|
#endif
|
||||||
nsCOMPtr<nsPIAccessNode> menuAccessNode = do_QueryInterface(accessible);
|
nsCOMPtr<nsPIAccessNode> menuAccessNode = do_QueryInterface(accessible);
|
||||||
NS_ENSURE_TRUE(menuAccessNode, NS_ERROR_FAILURE);
|
NS_ENSURE_TRUE(menuAccessNode, NS_ERROR_FAILURE);
|
||||||
nsIFrame* menuFrame = menuAccessNode->GetFrame();
|
nsIFrame* menuFrame = menuAccessNode->GetFrame();
|
||||||
|
@ -857,29 +857,22 @@ nsHTMLTableAccessible::GetTableNode(nsIDOMNode **_retval)
|
|||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsHTMLTableAccessible::GetTableLayout(nsITableLayout **aLayoutObject)
|
nsHTMLTableAccessible::GetTableLayout(nsITableLayout **aTableLayout)
|
||||||
{
|
{
|
||||||
*aLayoutObject = nsnull;
|
*aTableLayout = nsnull;
|
||||||
|
|
||||||
nsresult rv = NS_OK;
|
|
||||||
|
|
||||||
nsCOMPtr<nsIDOMNode> tableNode;
|
nsCOMPtr<nsIDOMNode> tableNode;
|
||||||
rv = GetTableNode(getter_AddRefs(tableNode));
|
GetTableNode(getter_AddRefs(tableNode));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
nsCOMPtr<nsIContent> tableContent(do_QueryInterface(tableNode));
|
||||||
|
if (!tableContent) {
|
||||||
|
return NS_ERROR_FAILURE; // Table shut down
|
||||||
|
}
|
||||||
|
|
||||||
nsCOMPtr<nsIContent> content(do_QueryInterface(tableNode));
|
nsCOMPtr<nsIPresShell> shell = GetPresShell();
|
||||||
NS_ENSURE_TRUE(content, NS_ERROR_FAILURE);
|
NS_ENSURE_TRUE(shell, NS_ERROR_FAILURE);
|
||||||
|
|
||||||
nsIDocument *doc = content->GetDocument();
|
nsIFrame *frame = shell->GetPrimaryFrameFor(tableContent);
|
||||||
NS_ENSURE_TRUE(doc, NS_ERROR_FAILURE);
|
return frame ? CallQueryInterface(frame, aTableLayout) : NS_ERROR_FAILURE;
|
||||||
|
|
||||||
nsIPresShell *presShell = doc->GetPrimaryShell();
|
|
||||||
|
|
||||||
nsCOMPtr<nsISupports> layoutObject;
|
|
||||||
rv = presShell->GetLayoutObjectFor(content, getter_AddRefs(layoutObject));
|
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
|
|
||||||
return CallQueryInterface(layoutObject, aLayoutObject);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
|
@ -96,7 +96,10 @@ nsresult nsHyperTextAccessible::QueryInterface(REFNSIID aIID, void** aInstancePt
|
|||||||
|
|
||||||
if (mRoleMapEntry &&
|
if (mRoleMapEntry &&
|
||||||
(mRoleMapEntry->role == nsIAccessibleRole::ROLE_GRAPHIC ||
|
(mRoleMapEntry->role == nsIAccessibleRole::ROLE_GRAPHIC ||
|
||||||
mRoleMapEntry->role == nsIAccessibleRole::ROLE_IMAGE_MAP)) {
|
mRoleMapEntry->role == nsIAccessibleRole::ROLE_IMAGE_MAP ||
|
||||||
|
mRoleMapEntry->role == nsIAccessibleRole::ROLE_SLIDER ||
|
||||||
|
mRoleMapEntry->role == nsIAccessibleRole::ROLE_PROGRESSBAR ||
|
||||||
|
mRoleMapEntry->role == nsIAccessibleRole::ROLE_SEPARATOR)) {
|
||||||
// ARIA roles that these interfaces are not appropriate for
|
// ARIA roles that these interfaces are not appropriate for
|
||||||
return nsAccessible::QueryInterface(aIID, aInstancePtr);
|
return nsAccessible::QueryInterface(aIID, aInstancePtr);
|
||||||
}
|
}
|
||||||
@ -565,7 +568,10 @@ nsresult nsHyperTextAccessible::DOMPointToHypertextOffset(nsIDOMNode* aNode, PRI
|
|||||||
// On failure, return null. On success, return the DOM node which contains the offset.
|
// On failure, return null. On success, return the DOM node which contains the offset.
|
||||||
NS_ENSURE_ARG_POINTER(aHyperTextOffset);
|
NS_ENSURE_ARG_POINTER(aHyperTextOffset);
|
||||||
*aHyperTextOffset = 0;
|
*aHyperTextOffset = 0;
|
||||||
NS_ENSURE_ARG_POINTER(aNode);
|
|
||||||
|
if (!aNode) {
|
||||||
|
return NS_ERROR_FAILURE;
|
||||||
|
}
|
||||||
if (aFinalAccessible) {
|
if (aFinalAccessible) {
|
||||||
*aFinalAccessible = nsnull;
|
*aFinalAccessible = nsnull;
|
||||||
}
|
}
|
||||||
@ -619,6 +625,17 @@ nsresult nsHyperTextAccessible::DOMPointToHypertextOffset(nsIDOMNode* aNode, PRI
|
|||||||
// accessible for the next DOM node which has one (based on forward depth first search)
|
// accessible for the next DOM node which has one (based on forward depth first search)
|
||||||
nsCOMPtr<nsIAccessible> descendantAccessible;
|
nsCOMPtr<nsIAccessible> descendantAccessible;
|
||||||
if (findNode) {
|
if (findNode) {
|
||||||
|
nsCOMPtr<nsIContent> findContent = do_QueryInterface(findNode);
|
||||||
|
if (findContent->IsNodeOfType(nsINode::eHTML) &&
|
||||||
|
findContent->NodeInfo()->Equals(nsAccessibilityAtoms::br)) {
|
||||||
|
nsIContent *parent = findContent->GetParent();
|
||||||
|
if (parent && parent->IsNativeAnonymous() && parent->GetChildCount() == 1) {
|
||||||
|
// This <br> is the only node in a text control, therefore it is the hacky
|
||||||
|
// "bogus node" used when there is no text in a control
|
||||||
|
*aHyperTextOffset = 0;
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
}
|
||||||
descendantAccessible = GetFirstAvailableAccessible(findNode);
|
descendantAccessible = GetFirstAvailableAccessible(findNode);
|
||||||
}
|
}
|
||||||
// From the descendant, go up and get the immediate child of this hypertext
|
// From the descendant, go up and get the immediate child of this hypertext
|
||||||
@ -987,6 +1004,13 @@ nsresult nsHyperTextAccessible::GetTextHelper(EGetTextType aType, nsAccessibleTe
|
|||||||
if (!endFrame) {
|
if (!endFrame) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
if (endAcc && Role(endAcc) == nsIAccessibleRole::ROLE_STATICTEXT) {
|
||||||
|
// Static text like list bullets will ruin our forward calculation,
|
||||||
|
// since the caret cannot be in the static text. Start just after the static text.
|
||||||
|
startOffset = endOffset = finalStartOffset + (aBoundaryType == BOUNDARY_LINE_END) + TextLength(endAcc);
|
||||||
|
endFrame = GetPosAndText(startOffset, endOffset, nsnull, nsnull,
|
||||||
|
nsnull, getter_AddRefs(endAcc));
|
||||||
|
}
|
||||||
finalEndOffset = GetRelativeOffset(presShell, endFrame, endOffset, endAcc,
|
finalEndOffset = GetRelativeOffset(presShell, endFrame, endOffset, endAcc,
|
||||||
amount, eDirNext, needsStart);
|
amount, eDirNext, needsStart);
|
||||||
NS_ENSURE_TRUE(endOffset >= 0, NS_ERROR_FAILURE);
|
NS_ENSURE_TRUE(endOffset >= 0, NS_ERROR_FAILURE);
|
||||||
|
@ -52,7 +52,7 @@ static const NSString* AXRoles [] = {
|
|||||||
NSAccessibilityUnknownRole, // ROLE_CARET. unused on OS X
|
NSAccessibilityUnknownRole, // ROLE_CARET. unused on OS X
|
||||||
NSAccessibilityWindowRole, // ROLE_ALERT
|
NSAccessibilityWindowRole, // ROLE_ALERT
|
||||||
NSAccessibilityWindowRole, // ROLE_WINDOW. irrelevant on OS X; all window a11y is handled by the system.
|
NSAccessibilityWindowRole, // ROLE_WINDOW. irrelevant on OS X; all window a11y is handled by the system.
|
||||||
@"AXWebArea", // ROLE_CLIENT
|
@"AXWebArea", // ROLE_INTERNAL_FRAME
|
||||||
NSAccessibilityMenuRole, // ROLE_MENUPOPUP. the parent of menuitems
|
NSAccessibilityMenuRole, // ROLE_MENUPOPUP. the parent of menuitems
|
||||||
NSAccessibilityMenuItemRole, // ROLE_MENUITEM.
|
NSAccessibilityMenuItemRole, // ROLE_MENUITEM.
|
||||||
@"AXHelpTag", // ROLE_TOOLTIP. 10.4+ only, so we re-define the constant.
|
@"AXHelpTag", // ROLE_TOOLTIP. 10.4+ only, so we re-define the constant.
|
||||||
|
@ -95,8 +95,8 @@ static const WindowsRoleMapItem gWindowsRoleMap[] = {
|
|||||||
// nsIAccessibleRole::ROLE_WINDOW
|
// nsIAccessibleRole::ROLE_WINDOW
|
||||||
{ ROLE_SYSTEM_WINDOW, ROLE_SYSTEM_WINDOW },
|
{ ROLE_SYSTEM_WINDOW, ROLE_SYSTEM_WINDOW },
|
||||||
|
|
||||||
// nsIAccessibleRole::ROLE_CLIENT
|
// nsIAccessibleRole::ROLE_INTERNAL_FRAME
|
||||||
{ USE_ROLE_STRING, IA2_ROLE_UNKNOWN},
|
{ USE_ROLE_STRING, IA2_ROLE_INTERNAL_FRAME},
|
||||||
|
|
||||||
// nsIAccessibleRole::ROLE_MENUPOPUP
|
// nsIAccessibleRole::ROLE_MENUPOPUP
|
||||||
{ ROLE_SYSTEM_MENUPOPUP, ROLE_SYSTEM_MENUPOPUP },
|
{ ROLE_SYSTEM_MENUPOPUP, ROLE_SYSTEM_MENUPOPUP },
|
||||||
@ -429,7 +429,7 @@ static const WindowsRoleMapItem gWindowsRoleMap[] = {
|
|||||||
{ ROLE_SYSTEM_LISTITEM, ROLE_SYSTEM_LISTITEM },
|
{ ROLE_SYSTEM_LISTITEM, ROLE_SYSTEM_LISTITEM },
|
||||||
|
|
||||||
// nsIAccessibleRole::ROLE_RICH_OPTION
|
// nsIAccessibleRole::ROLE_RICH_OPTION
|
||||||
{ ROLE_SYSTEM_LIST, ROLE_SYSTEM_LIST },
|
{ ROLE_SYSTEM_LISTITEM, ROLE_SYSTEM_LISTITEM },
|
||||||
|
|
||||||
// nsIAccessibleRole::ROLE_LISTBOX
|
// nsIAccessibleRole::ROLE_LISTBOX
|
||||||
{ ROLE_SYSTEM_LIST, ROLE_SYSTEM_LIST },
|
{ ROLE_SYSTEM_LIST, ROLE_SYSTEM_LIST },
|
||||||
|
@ -51,7 +51,7 @@ nsXFormsLabelAccessible::GetRole(PRUint32 *aRole)
|
|||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(aRole);
|
NS_ENSURE_ARG_POINTER(aRole);
|
||||||
|
|
||||||
*aRole = nsIAccessibleRole::ROLE_STATICTEXT;
|
*aRole = nsIAccessibleRole::ROLE_LABEL;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,3 +64,11 @@ nsXULAlertAccessible::GetState(PRUint32 *aState, PRUint32 *aExtraState)
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP
|
||||||
|
nsXULAlertAccessible::GetName(nsAString& aName)
|
||||||
|
{
|
||||||
|
// Screen readers need to read contents of alert, not the accessible name.
|
||||||
|
// If we have both some screen readers will read the alert twice.
|
||||||
|
aName.Truncate();
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
@ -50,6 +50,7 @@ public:
|
|||||||
NS_DECL_ISUPPORTS_INHERITED
|
NS_DECL_ISUPPORTS_INHERITED
|
||||||
NS_IMETHOD GetRole(PRUint32 *aRole);
|
NS_IMETHOD GetRole(PRUint32 *aRole);
|
||||||
NS_IMETHOD GetState(PRUint32 *aState, PRUint32 *aExtraState);
|
NS_IMETHOD GetState(PRUint32 *aState, PRUint32 *aExtraState);
|
||||||
|
NS_IMETHOD GetName(nsAString& aName);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -486,7 +486,9 @@ NS_IMETHODIMP nsXULMenuitemAccessible::GetRole(PRUint32 *aRole)
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mParent && Role(mParent) == nsIAccessibleRole::ROLE_COMBOBOX_LIST) {
|
nsCOMPtr<nsIAccessible> parent;
|
||||||
|
GetParent(getter_AddRefs(parent));
|
||||||
|
if (parent && Role(parent) == nsIAccessibleRole::ROLE_COMBOBOX_LIST) {
|
||||||
*aRole = nsIAccessibleRole::ROLE_COMBOBOX_OPTION;
|
*aRole = nsIAccessibleRole::ROLE_COMBOBOX_OPTION;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
@ -716,14 +718,18 @@ NS_IMETHODIMP nsXULMenupopupAccessible::GetRole(PRUint32 *aRole)
|
|||||||
if (!content) {
|
if (!content) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
if ((mParent && Role(mParent) == nsIAccessibleRole::ROLE_COMBOBOX) ||
|
nsCOMPtr<nsIAccessible> parent;
|
||||||
content->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
|
GetParent(getter_AddRefs(parent));
|
||||||
nsAccessibilityAtoms::autocomplete, eIgnoreCase)) {
|
if (parent) {
|
||||||
*aRole = nsIAccessibleRole::ROLE_COMBOBOX_LIST;
|
// Some widgets like the search bar have several popups, owned by buttons
|
||||||
}
|
PRUint32 role = Role(parent);
|
||||||
else {
|
if (role == nsIAccessibleRole::ROLE_COMBOBOX ||
|
||||||
*aRole = nsIAccessibleRole::ROLE_MENUPOPUP;
|
role == nsIAccessibleRole::ROLE_PUSHBUTTON) {
|
||||||
|
*aRole = nsIAccessibleRole::ROLE_COMBOBOX_LIST;
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
*aRole = nsIAccessibleRole::ROLE_MENUPOPUP;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include "nsAccessibilityService.h"
|
#include "nsAccessibilityService.h"
|
||||||
#include "nsIContent.h"
|
#include "nsIContent.h"
|
||||||
#include "nsIDOMXULMenuListElement.h"
|
#include "nsIDOMXULMenuListElement.h"
|
||||||
|
#include "nsIDOMXULPopupElement.h"
|
||||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||||
#include "nsIDOMXULSelectCntrlEl.h"
|
#include "nsIDOMXULSelectCntrlEl.h"
|
||||||
#include "nsIDOMXULTextboxElement.h"
|
#include "nsIDOMXULTextboxElement.h"
|
||||||
@ -194,9 +195,20 @@ NS_IMETHODIMP nsXULListboxAccessible::GetValue(nsAString& _retval)
|
|||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsXULListboxAccessible::GetRole(PRUint32 *_retval)
|
NS_IMETHODIMP nsXULListboxAccessible::GetRole(PRUint32 *aRole)
|
||||||
{
|
{
|
||||||
*_retval = nsIAccessibleRole::ROLE_LIST;
|
nsCOMPtr<nsIContent> content = do_QueryInterface(mDOMNode);
|
||||||
|
if (content) {
|
||||||
|
// A richlistbox is used with the new autocomplete URL bar,
|
||||||
|
// and has a parent popup <panel>
|
||||||
|
nsCOMPtr<nsIDOMXULPopupElement> xulPopup =
|
||||||
|
do_QueryInterface(content->GetParent());
|
||||||
|
if (xulPopup) {
|
||||||
|
*aRole = nsIAccessibleRole::ROLE_COMBOBOX_LIST;
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*aRole = nsIAccessibleRole::ROLE_LIST;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -250,6 +262,8 @@ NS_IMETHODIMP nsXULListitemAccessible::GetRole(PRUint32 *aRole)
|
|||||||
{
|
{
|
||||||
if (mIsCheckbox)
|
if (mIsCheckbox)
|
||||||
*aRole = nsIAccessibleRole::ROLE_CHECKBUTTON;
|
*aRole = nsIAccessibleRole::ROLE_CHECKBUTTON;
|
||||||
|
else if (mParent && Role(mParent) == nsIAccessibleRole::ROLE_COMBOBOX_LIST)
|
||||||
|
*aRole = nsIAccessibleRole::ROLE_COMBOBOX_OPTION;
|
||||||
else
|
else
|
||||||
*aRole = nsIAccessibleRole::ROLE_RICH_OPTION;
|
*aRole = nsIAccessibleRole::ROLE_RICH_OPTION;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
@ -61,13 +61,9 @@ NS_IMETHODIMP nsXULTextAccessible::GetName(nsAString& aName)
|
|||||||
if (!content) {
|
if (!content) {
|
||||||
return NS_ERROR_FAILURE; // Node shut down
|
return NS_ERROR_FAILURE; // Node shut down
|
||||||
}
|
}
|
||||||
if (!content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::value,
|
// if the value attr doesn't exist, the screen reader must get the accessible text
|
||||||
aName)) {
|
// from the accessible text interface or from the children
|
||||||
// if the value doesn't exist, flatten the inner content as the name (for descriptions)
|
return content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::value, aName);
|
||||||
return AppendFlatStringFromSubtree(content, &aName);
|
|
||||||
}
|
|
||||||
// otherwise, use the value attribute as the name (for labels)
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
@ -176,13 +172,9 @@ NS_IMETHODIMP nsXULLinkAccessible::GetName(nsAString& aName)
|
|||||||
|
|
||||||
NS_IMETHODIMP nsXULLinkAccessible::GetRole(PRUint32 *aRole)
|
NS_IMETHODIMP nsXULLinkAccessible::GetRole(PRUint32 *aRole)
|
||||||
{
|
{
|
||||||
if (mIsLink) {
|
// We used to say ROLE_BUTTON if there was no href, but then screen readers
|
||||||
*aRole = nsIAccessibleRole::ROLE_LINK;
|
// would tell users to hit the space bar for activation, which is wrong for a link
|
||||||
} else {
|
*aRole = nsIAccessibleRole::ROLE_LINK;
|
||||||
// default to calling the link a button; might have javascript
|
|
||||||
*aRole = nsIAccessibleRole::ROLE_PUSHBUTTON;
|
|
||||||
}
|
|
||||||
// should there be a third case where it becomes just text?
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -563,9 +563,11 @@ nsXULTreeAccessible::InvalidateCache(PRInt32 aRow, PRInt32 aCount)
|
|||||||
if (aCount > 0)
|
if (aCount > 0)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
|
NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
|
||||||
|
|
||||||
nsCOMPtr<nsITreeColumns> cols;
|
nsCOMPtr<nsITreeColumns> cols;
|
||||||
nsresult rv = mTree->GetColumns(getter_AddRefs(cols));
|
nsresult rv = mTree->GetColumns(getter_AddRefs(cols));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_STATE(cols);
|
||||||
|
|
||||||
#ifdef MOZ_ACCESSIBILITY_ATK
|
#ifdef MOZ_ACCESSIBILITY_ATK
|
||||||
PRInt32 colsCount = 0;
|
PRInt32 colsCount = 0;
|
||||||
@ -597,7 +599,7 @@ nsXULTreeAccessible::InvalidateCache(PRInt32 aRow, PRInt32 aCount)
|
|||||||
nsCOMPtr<nsIAccessible> accessible(do_QueryInterface(accessNode));
|
nsCOMPtr<nsIAccessible> accessible(do_QueryInterface(accessNode));
|
||||||
nsCOMPtr<nsIAccessibleEvent> event =
|
nsCOMPtr<nsIAccessibleEvent> event =
|
||||||
new nsAccEvent(nsIAccessibleEvent::EVENT_DOM_DESTROY,
|
new nsAccEvent(nsIAccessibleEvent::EVENT_DOM_DESTROY,
|
||||||
accessible, nsnull, PR_FALSE);
|
accessible, PR_FALSE);
|
||||||
FireAccessibleEvent(event);
|
FireAccessibleEvent(event);
|
||||||
|
|
||||||
mAccessNodeCache->Remove(key);
|
mAccessNodeCache->Remove(key);
|
||||||
|
@ -318,10 +318,7 @@ endif
|
|||||||
|
|
||||||
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
||||||
libs::
|
libs::
|
||||||
$(INSTALL) $(DIST)/branding/default.xpm $(DIST)/bin/chrome/icons/default
|
$(INSTALL) $(DIST)/branding/default16.png $(DIST)/bin/chrome/icons/default
|
||||||
|
|
||||||
install::
|
|
||||||
$(SYSINSTALL) $(IFLAGS1) $(DIST)/branding/default.xpm $(DESTDIR)$(mozappdir)/chrome/icons/default
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
export::
|
export::
|
||||||
@ -347,7 +344,7 @@ ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT)))
|
|||||||
cp $(srcdir)/document.png $(DIST)/branding/document.png
|
cp $(srcdir)/document.png $(DIST)/branding/document.png
|
||||||
endif
|
endif
|
||||||
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
||||||
cp $(srcdir)/default.xpm $(DIST)/branding/default.xpm
|
cp $(srcdir)/default16.png $(DIST)/branding/default16.png
|
||||||
endif
|
endif
|
||||||
ifeq ($(OS_ARCH),OS2)
|
ifeq ($(OS_ARCH),OS2)
|
||||||
cp $(srcdir)/firefox-os2.ico $(DIST)/branding/firefox.ico
|
cp $(srcdir)/firefox-os2.ico $(DIST)/branding/firefox.ico
|
||||||
@ -380,6 +377,9 @@ else
|
|||||||
APPFILES = MacOS
|
APPFILES = MacOS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
libs:: $(srcdir)/profile/prefs.js
|
||||||
|
$(INSTALL) $^ $(DIST)/bin/defaults/profile
|
||||||
|
|
||||||
libs repackage:: $(PROGRAM) application.ini
|
libs repackage:: $(PROGRAM) application.ini
|
||||||
mkdir -p $(DIST)/$(APP_NAME).app/Contents/MacOS
|
mkdir -p $(DIST)/$(APP_NAME).app/Contents/MacOS
|
||||||
rsync -a --exclude CVS --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/$(APP_NAME).app --exclude English.lproj
|
rsync -a --exclude CVS --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/$(APP_NAME).app --exclude English.lproj
|
||||||
@ -419,12 +419,6 @@ else
|
|||||||
$(INSTALL) $(topsrcdir)/LICENSE $(DIST)/bin
|
$(INSTALL) $(topsrcdir)/LICENSE $(DIST)/bin
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libs:: $(srcdir)/profile/prefs.js
|
|
||||||
$(INSTALL) $^ $(DIST)/bin/defaults/profile
|
|
||||||
|
|
||||||
install:: $(srcdir)/profile/prefs.js
|
|
||||||
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/defaults/profile
|
|
||||||
|
|
||||||
ifdef LIBXUL_SDK
|
ifdef LIBXUL_SDK
|
||||||
ifndef SKIP_COPY_XULRUNNER
|
ifndef SKIP_COPY_XULRUNNER
|
||||||
libs::
|
libs::
|
||||||
|
File diff suppressed because it is too large
Load Diff
BIN
browser/app/default16.png
Normal file
BIN
browser/app/default16.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 722 B |
@ -68,6 +68,15 @@ pref("extensions.logging.enabled", false);
|
|||||||
// Hides the install button in the add-ons mgr
|
// Hides the install button in the add-ons mgr
|
||||||
pref("extensions.hideInstallButton", true);
|
pref("extensions.hideInstallButton", true);
|
||||||
|
|
||||||
|
// Preferences for the Get Add-ons pane
|
||||||
|
pref("extensions.getAddons.showPane", true);
|
||||||
|
pref("extensions.getAddons.browseAddons", "https://%LOCALE%.add-ons.mozilla.com/%LOCALE%/%APP%");
|
||||||
|
pref("extensions.getAddons.maxResults", 5);
|
||||||
|
pref("extensions.getAddons.recommended.browseURL", "https://%LOCALE%.add-ons.mozilla.com/%LOCALE%/%APP%/recommended");
|
||||||
|
pref("extensions.getAddons.recommended.url", "https://services.addons.mozilla.org/%LOCALE%/%APP%/api/list/featured/all/10");
|
||||||
|
pref("extensions.getAddons.search.browseURL", "https://%LOCALE%.add-ons.mozilla.com/%LOCALE%/%APP%/search?q=%TERMS%");
|
||||||
|
pref("extensions.getAddons.search.url", "https://services.addons.mozilla.org/%LOCALE%/%APP%/api/search/%TERMS%");
|
||||||
|
|
||||||
// Blocklist preferences
|
// Blocklist preferences
|
||||||
pref("extensions.blocklist.enabled", true);
|
pref("extensions.blocklist.enabled", true);
|
||||||
pref("extensions.blocklist.interval", 86400);
|
pref("extensions.blocklist.interval", 86400);
|
||||||
@ -217,6 +226,7 @@ pref("browser.download.manager.openDelay", 0);
|
|||||||
pref("browser.download.manager.focusWhenStarting", false);
|
pref("browser.download.manager.focusWhenStarting", false);
|
||||||
pref("browser.download.manager.flashCount", 2);
|
pref("browser.download.manager.flashCount", 2);
|
||||||
pref("browser.download.manager.addToRecentDocs", true);
|
pref("browser.download.manager.addToRecentDocs", true);
|
||||||
|
pref("browser.download.manager.quitBehavior", 0);
|
||||||
|
|
||||||
// search engines URL
|
// search engines URL
|
||||||
pref("browser.search.searchEnginesURL", "https://%LOCALE%.add-ons.mozilla.com/%LOCALE%/firefox/%VERSION%/search-engines/");
|
pref("browser.search.searchEnginesURL", "https://%LOCALE%.add-ons.mozilla.com/%LOCALE%/firefox/%VERSION%/search-engines/");
|
||||||
@ -335,14 +345,15 @@ pref("privacy.popups.usecustom", true);
|
|||||||
pref("privacy.popups.firstTime", true);
|
pref("privacy.popups.firstTime", true);
|
||||||
pref("privacy.popups.showBrowserMessage", true);
|
pref("privacy.popups.showBrowserMessage", true);
|
||||||
|
|
||||||
pref("privacy.item.history", true);
|
pref("privacy.item.history", true);
|
||||||
pref("privacy.item.formdata", true);
|
pref("privacy.item.formdata", true);
|
||||||
pref("privacy.item.passwords", false);
|
pref("privacy.item.passwords", false);
|
||||||
pref("privacy.item.downloads", true);
|
pref("privacy.item.downloads", true);
|
||||||
pref("privacy.item.cookies", false);
|
pref("privacy.item.cookies", false);
|
||||||
pref("privacy.item.cache", true);
|
pref("privacy.item.cache", true);
|
||||||
pref("privacy.item.siteprefs", false);
|
pref("privacy.item.siteprefs", false);
|
||||||
pref("privacy.item.sessions", true);
|
pref("privacy.item.sessions", true);
|
||||||
|
pref("privacy.item.offlineApps", false);
|
||||||
|
|
||||||
pref("privacy.sanitize.sanitizeOnShutdown", false);
|
pref("privacy.sanitize.sanitizeOnShutdown", false);
|
||||||
pref("privacy.sanitize.promptOnSanitize", true);
|
pref("privacy.sanitize.promptOnSanitize", true);
|
||||||
@ -599,6 +610,42 @@ pref("browser.places.createdSmartBookmarks", false);
|
|||||||
// XXX to be removed after beta 2 (bug 391419)
|
// XXX to be removed after beta 2 (bug 391419)
|
||||||
pref("browser.places.migratePostDataAnnotations", true);
|
pref("browser.places.migratePostDataAnnotations", true);
|
||||||
|
|
||||||
|
// the (maximum) number of the recent visits to sample
|
||||||
|
// when calculating frecency
|
||||||
|
pref("places.frecency.numVisits", 10);
|
||||||
|
|
||||||
|
// Perform frecency recalculation after this amount of idle, repeating.
|
||||||
|
// A value of zero disables updating of frecency on idle.
|
||||||
|
// Default is 1 minute (60000ms).
|
||||||
|
pref("places.frecency.updateIdleTime", 60000);
|
||||||
|
|
||||||
|
// buckets (in days) for frecency calculation
|
||||||
|
pref("places.frecency.firstBucketCutoff", 4);
|
||||||
|
pref("places.frecency.secondBucketCutoff", 14);
|
||||||
|
pref("places.frecency.thirdBucketCutoff", 31);
|
||||||
|
pref("places.frecency.fourthBucketCutoff", 90);
|
||||||
|
|
||||||
|
// weights for buckets for frecency calculations
|
||||||
|
pref("places.frecency.firstBucketWeight", 100);
|
||||||
|
pref("places.frecency.secondBucketWeight", 70);
|
||||||
|
pref("places.frecency.thirdBucketWeight", 50);
|
||||||
|
pref("places.frecency.fourthBucketWeight", 30);
|
||||||
|
pref("places.frecency.defaultBucketWeight", 10);
|
||||||
|
|
||||||
|
// bonus (in percent) for visit transition types for frecency calculations
|
||||||
|
pref("places.frecency.embedVisitBonus", 0);
|
||||||
|
pref("places.frecency.linkVisitBonus", 120);
|
||||||
|
pref("places.frecency.typedVisitBonus", 200);
|
||||||
|
pref("places.frecency.bookmarkVisitBonus", 140);
|
||||||
|
pref("places.frecency.downloadVisitBonus", 0);
|
||||||
|
pref("places.frecency.permRedirectVisitBonus", 0);
|
||||||
|
pref("places.frecency.tempRedirectVisitBonus", 0);
|
||||||
|
pref("places.frecency.defaultVisitBonus", 0);
|
||||||
|
|
||||||
|
// bonus (in percent) for place types for frecency calculations
|
||||||
|
pref("places.frecency.unvisitedBookmarkBonus", 140);
|
||||||
|
pref("places.frecency.unvisitedTypedBonus", 200);
|
||||||
|
|
||||||
// Controls behavior of the "Add Exception" dialog launched from SSL error pages
|
// Controls behavior of the "Add Exception" dialog launched from SSL error pages
|
||||||
// 0 - don't pre-populate anything
|
// 0 - don't pre-populate anything
|
||||||
// 1 - pre-populate site URL, but don't fetch certificate
|
// 1 - pre-populate site URL, but don't fetch certificate
|
||||||
@ -608,3 +655,5 @@ pref("browser.ssl_override_behavior", 1);
|
|||||||
// replace newlines with spaces when pasting into <input type="text"> fields
|
// replace newlines with spaces when pasting into <input type="text"> fields
|
||||||
pref("editor.singleLine.pasteNewlines", 2);
|
pref("editor.singleLine.pasteNewlines", 2);
|
||||||
|
|
||||||
|
// The breakpad report server to link to in about:crashes
|
||||||
|
pref("breakpad.reportURL", "http://crash-stats.mozilla.com/report/index/");
|
||||||
|
@ -68,6 +68,7 @@ END
|
|||||||
#define IDC_COLRESIZE 4108
|
#define IDC_COLRESIZE 4108
|
||||||
#define IDC_ROWRESIZE 4109
|
#define IDC_ROWRESIZE 4109
|
||||||
#define IDC_VERTICALTEXT 4110
|
#define IDC_VERTICALTEXT 4110
|
||||||
|
#define IDC_NONE 4112
|
||||||
|
|
||||||
IDC_GRAB CURSOR DISCARDABLE "../../widget/src/build/res/grab.cur"
|
IDC_GRAB CURSOR DISCARDABLE "../../widget/src/build/res/grab.cur"
|
||||||
IDC_GRABBING CURSOR DISCARDABLE "../../widget/src/build/res/grabbing.cur"
|
IDC_GRABBING CURSOR DISCARDABLE "../../widget/src/build/res/grabbing.cur"
|
||||||
@ -79,5 +80,6 @@ IDC_ZOOMOUT CURSOR DISCARDABLE "../../widget/src/build/res/zoom
|
|||||||
IDC_COLRESIZE CURSOR DISCARDABLE "../../widget/src/build/res/col_resize.cur"
|
IDC_COLRESIZE CURSOR DISCARDABLE "../../widget/src/build/res/col_resize.cur"
|
||||||
IDC_ROWRESIZE CURSOR DISCARDABLE "../../widget/src/build/res/row_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_VERTICALTEXT CURSOR DISCARDABLE "../../widget/src/build/res/vertical_text.cur"
|
||||||
|
IDC_NONE CURSOR DISCARDABLE "../../widget/src/build/res/none.cur"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -71,6 +71,7 @@ POINTER IDC_ZOOMOUT "..\\..\\widget\\src\\os2\\res\\zoom_out.ptr"
|
|||||||
POINTER IDC_ARROWWAIT "..\\..\\widget\\src\\os2\\res\\arrow_wait.ptr"
|
POINTER IDC_ARROWWAIT "..\\..\\widget\\src\\os2\\res\\arrow_wait.ptr"
|
||||||
POINTER IDC_CROSS "..\\..\\widget\\src\\os2\\res\\crosshair.ptr"
|
POINTER IDC_CROSS "..\\..\\widget\\src\\os2\\res\\crosshair.ptr"
|
||||||
POINTER IDC_HELP "..\\..\\widget\\src\\os2\\res\\help.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_DNDURL "..\\..\\widget\\src\\os2\\res\\dndurl.ico"
|
||||||
ICON IDC_DNDTEXT "..\\..\\widget\\src\\os2\\res\\dndtext.ico"
|
ICON IDC_DNDTEXT "..\\..\\widget\\src\\os2\\res\\dndtext.ico"
|
||||||
|
@ -79,7 +79,7 @@
|
|||||||
|
|
||||||
#copyright {
|
#copyright {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
-moz-margin-end: 0;
|
-moz-margin-end: 16px;
|
||||||
margin-bottom: 3px;
|
margin-bottom: 3px;
|
||||||
-moz-margin-start: 16px;
|
-moz-margin-start: 16px;
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
#expand <label id="version" value="&aboutVersion; __MOZ_APP_VERSION__"/>
|
#expand <label id="version" value="&aboutVersion; __MOZ_APP_VERSION__"/>
|
||||||
<label id="distribution"/>
|
<label id="distribution"/>
|
||||||
<label id="distributionId"/>
|
<label id="distributionId"/>
|
||||||
<description id="copyright">©rightText;</description>
|
<description id="copyright">©rightInfo;</description>
|
||||||
<textbox id="userAgent" multiline="true" readonly="true"/>
|
<textbox id="userAgent" multiline="true" readonly="true"/>
|
||||||
</vbox>
|
</vbox>
|
||||||
<vbox flex="1" id="creditsBox">
|
<vbox flex="1" id="creditsBox">
|
||||||
|
80
browser/base/content/bindings.xml
Normal file
80
browser/base/content/bindings.xml
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
# -*- Mode: HTML -*-
|
||||||
|
# ***** 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 browser.
|
||||||
|
#
|
||||||
|
# The Initial Developer of the Original Code is
|
||||||
|
# Simon Bünzli <zeniko@gmail.com>
|
||||||
|
# Portions created by the Initial Developer are Copyright (C) 2007 - 2008
|
||||||
|
# the Initial Developer. All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Contributor(s):
|
||||||
|
#
|
||||||
|
# Alternatively, the contents of this file may be used under the terms of
|
||||||
|
# either 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 *****
|
||||||
|
|
||||||
|
<!DOCTYPE bindings SYSTEM "chrome://global/locale/global.dtd">
|
||||||
|
|
||||||
|
<bindings xmlns="http://www.mozilla.org/xbl"
|
||||||
|
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
|
xmlns:xbl="http://www.mozilla.org/xbl"
|
||||||
|
>
|
||||||
|
<binding id="unified-back-forward-button-wrapper" display="xul:menu"
|
||||||
|
extends="chrome://global/content/bindings/toolbarbutton.xml#menu">
|
||||||
|
<content>
|
||||||
|
<children includes="toolbarbutton|observes|template|menupopup|tooltip"/>
|
||||||
|
<xul:dropmarker type="menu-button"
|
||||||
|
class="toolbarbutton-menubutton-dropmarker"
|
||||||
|
chromedir="&locale.dir;"
|
||||||
|
xbl:inherits="align,dir,pack,orient,disabled,toolbarmode,buttonstyle"
|
||||||
|
/>
|
||||||
|
</content>
|
||||||
|
|
||||||
|
<implementation>
|
||||||
|
<constructor><![CDATA[
|
||||||
|
this._updateUnifiedState();
|
||||||
|
]]></constructor>
|
||||||
|
|
||||||
|
<method name="_updateUnifiedState">
|
||||||
|
<body><![CDATA[
|
||||||
|
var canGoBack = !document.getElementById("Browser:Back").hasAttribute("disabled");
|
||||||
|
var canGoForward = !document.getElementById("Browser:Forward").hasAttribute("disabled");
|
||||||
|
|
||||||
|
if (canGoBack || canGoForward)
|
||||||
|
this.removeAttribute("disabled");
|
||||||
|
else
|
||||||
|
this.setAttribute("disabled", "true");
|
||||||
|
]]></body>
|
||||||
|
</method>
|
||||||
|
</implementation>
|
||||||
|
|
||||||
|
<handlers>
|
||||||
|
<!-- observing state changes of the child buttons -->
|
||||||
|
<handler event="broadcast" action="this._updateUnifiedState();"/>
|
||||||
|
</handlers>
|
||||||
|
</binding>
|
||||||
|
</bindings>
|
@ -54,8 +54,8 @@
|
|||||||
oncommand="gContextMenu.openLinkInTab();"/>
|
oncommand="gContextMenu.openLinkInTab();"/>
|
||||||
<menuseparator id="context-sep-open"/>
|
<menuseparator id="context-sep-open"/>
|
||||||
<menuitem id="context-bookmarklink"
|
<menuitem id="context-bookmarklink"
|
||||||
label="&bookmarkLinkCmd.label;"
|
label="&bookmarkThisLinkCmd.label;"
|
||||||
accesskey="&bookmarkLinkCmd.accesskey;"
|
accesskey="&bookmarkThisLinkCmd.accesskey;"
|
||||||
oncommand="gContextMenu.bookmarkLink();"/>
|
oncommand="gContextMenu.bookmarkLink();"/>
|
||||||
<menuitem id="context-savelink"
|
<menuitem id="context-savelink"
|
||||||
label="&saveLinkCmd.label;"
|
label="&saveLinkCmd.label;"
|
||||||
@ -126,8 +126,8 @@
|
|||||||
command="Browser:Stop"/>
|
command="Browser:Stop"/>
|
||||||
<menuseparator id="context-sep-stop"/>
|
<menuseparator id="context-sep-stop"/>
|
||||||
<menuitem id="context-bookmarkpage"
|
<menuitem id="context-bookmarkpage"
|
||||||
label="&bookmarkPageCmd.label;"
|
label="&bookmarkPageCmd2.label;"
|
||||||
accesskey="&bookmarkPageCmd.accesskey;"
|
accesskey="&bookmarkPageCmd2.accesskey;"
|
||||||
oncommand="gContextMenu.bookmarkThisPage();"/>
|
oncommand="gContextMenu.bookmarkThisPage();"/>
|
||||||
<menuitem id="context-savepage"
|
<menuitem id="context-savepage"
|
||||||
label="&savePageCmd.label;"
|
label="&savePageCmd.label;"
|
||||||
@ -194,8 +194,8 @@
|
|||||||
accesskey="&reloadFrameCmd.accesskey;"
|
accesskey="&reloadFrameCmd.accesskey;"
|
||||||
oncommand="gContextMenu.reloadFrame();"/>
|
oncommand="gContextMenu.reloadFrame();"/>
|
||||||
<menuseparator/>
|
<menuseparator/>
|
||||||
<menuitem label="&bookmarkFrameCmd.label;"
|
<menuitem label="&bookmarkThisFrameCmd.label;"
|
||||||
accesskey="&bookmarkFrameCmd.accesskey;"
|
accesskey="&bookmarkThisFrameCmd.accesskey;"
|
||||||
oncommand="gContextMenu.addBookmarkForFrame();"/>
|
oncommand="gContextMenu.addBookmarkForFrame();"/>
|
||||||
<menuitem label="&saveFrameCmd.label;"
|
<menuitem label="&saveFrameCmd.label;"
|
||||||
accesskey="&saveFrameCmd.accesskey;"
|
accesskey="&saveFrameCmd.accesskey;"
|
||||||
@ -240,9 +240,9 @@
|
|||||||
oncommand="gContextMenu.showMetadata();"/>
|
oncommand="gContextMenu.showMetadata();"/>
|
||||||
<menuseparator id="spell-separator"/>
|
<menuseparator id="spell-separator"/>
|
||||||
<menuitem id="spell-check-enabled"
|
<menuitem id="spell-check-enabled"
|
||||||
label="&spellEnable.label;"
|
label="&spellCheckEnable.label;"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
accesskey="&spellEnable.accesskey;"
|
accesskey="&spellCheckEnable.accesskey;"
|
||||||
oncommand="InlineSpellCheckerUI.toggleEnabled();"/>
|
oncommand="InlineSpellCheckerUI.toggleEnabled();"/>
|
||||||
#ifndef MOZ_WIDGET_COCOA
|
#ifndef MOZ_WIDGET_COCOA
|
||||||
<menuitem id="spell-add-dictionaries-main"
|
<menuitem id="spell-add-dictionaries-main"
|
||||||
|
@ -88,7 +88,9 @@
|
|||||||
|
|
||||||
<menu id="edit-menu" label="&editMenu.label;"
|
<menu id="edit-menu" label="&editMenu.label;"
|
||||||
accesskey="&editMenu.accesskey;">
|
accesskey="&editMenu.accesskey;">
|
||||||
<menupopup id="menu_EditPopup">
|
<menupopup id="menu_EditPopup"
|
||||||
|
onpopupshowing="updateEditUIVisibility()"
|
||||||
|
onpopuphidden="updateEditUIVisibility()">
|
||||||
<menuitem label="&undoCmd.label;"
|
<menuitem label="&undoCmd.label;"
|
||||||
key="key_undo"
|
key="key_undo"
|
||||||
accesskey="&undoCmd.accesskey;"
|
accesskey="&undoCmd.accesskey;"
|
||||||
|
@ -97,11 +97,8 @@ var PlacesCommandHook = {
|
|||||||
break;
|
break;
|
||||||
case "keypress":
|
case "keypress":
|
||||||
if (aEvent.keyCode == KeyEvent.DOM_VK_ESCAPE ||
|
if (aEvent.keyCode == KeyEvent.DOM_VK_ESCAPE ||
|
||||||
aEvent.keyCode == KeyEvent.DOM_VK_RETURN) {
|
aEvent.keyCode == KeyEvent.DOM_VK_RETURN)
|
||||||
// focus the content area and hide the panel
|
this.panel.hidePopup(); // hide the panel
|
||||||
window.content.focus();
|
|
||||||
this.panel.hidePopup();
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -208,7 +205,7 @@ var PlacesCommandHook = {
|
|||||||
if (aBrowser.contentWindow == window.content) {
|
if (aBrowser.contentWindow == window.content) {
|
||||||
var starIcon = aBrowser.ownerDocument.getElementById("star-button");
|
var starIcon = aBrowser.ownerDocument.getElementById("star-button");
|
||||||
if (starIcon && isElementVisible(starIcon)) {
|
if (starIcon && isElementVisible(starIcon)) {
|
||||||
this.showEditBookmarkPopup(itemId, starIcon, "after_start");
|
this.showEditBookmarkPopup(itemId, starIcon, "after_end");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -107,9 +107,7 @@
|
|||||||
<command id="Browser:OpenLocation" oncommand="openLocation();"/>
|
<command id="Browser:OpenLocation" oncommand="openLocation();"/>
|
||||||
|
|
||||||
<command id="Tools:Search" oncommand="BrowserSearch.webSearch();"/>
|
<command id="Tools:Search" oncommand="BrowserSearch.webSearch();"/>
|
||||||
<command id="Tools:Downloads" oncommand="toOpenWindowByType('Download:Manager',
|
<command id="Tools:Downloads" oncommand="BrowserDownloadsUI();"/>
|
||||||
'chrome://mozapps/content/downloads/downloads.xul',
|
|
||||||
'chrome,dialog=no,resizable');"/>
|
|
||||||
<command id="Tools:Addons" oncommand="BrowserOpenAddonsMgr();"/>
|
<command id="Tools:Addons" oncommand="BrowserOpenAddonsMgr();"/>
|
||||||
<command id="Tools:Sanitize"
|
<command id="Tools:Sanitize"
|
||||||
oncommand="Cc[GLUE_CID].getService(Ci.nsIBrowserGlue).sanitize(window || null);"/>
|
oncommand="Cc[GLUE_CID].getService(Ci.nsIBrowserGlue).sanitize(window || null);"/>
|
||||||
|
@ -23,6 +23,17 @@ toolbar[printpreview="true"] {
|
|||||||
-moz-binding: url("chrome://browser/content/urlbarBindings.xml#urlbar-rich-result-popup");
|
-moz-binding: url("chrome://browser/content/urlbarBindings.xml#urlbar-rich-result-popup");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ::::: Unified Back-/Forward Button ::::: */
|
||||||
|
#unified-back-forward-button {
|
||||||
|
-moz-binding: url("chrome://browser/content/bindings.xml#unified-back-forward-button-wrapper");
|
||||||
|
}
|
||||||
|
#unified-back-forward-button > toolbarbutton > dropmarker {
|
||||||
|
display: none; /* we provide our own */
|
||||||
|
}
|
||||||
|
.unified-nav-current {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
menuitem.spell-suggestion {
|
menuitem.spell-suggestion {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,12 @@
|
|||||||
#
|
#
|
||||||
# ***** END LICENSE BLOCK *****
|
# ***** END LICENSE BLOCK *****
|
||||||
|
|
||||||
|
let Ci = Components.interfaces;
|
||||||
|
let Cu = Components.utils;
|
||||||
|
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
|
Cu.import("resource://gre/modules/DownloadUtils.jsm");
|
||||||
|
Cu.import("resource://gre/modules/PluralForm.jsm");
|
||||||
|
|
||||||
const kXULNS =
|
const kXULNS =
|
||||||
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||||
|
|
||||||
@ -99,6 +105,7 @@ var gBrowser = null;
|
|||||||
var gNavToolbox = null;
|
var gNavToolbox = null;
|
||||||
var gSidebarCommand = "";
|
var gSidebarCommand = "";
|
||||||
var gInPrintPreviewMode = false;
|
var gInPrintPreviewMode = false;
|
||||||
|
let gDownloadMgr = null;
|
||||||
|
|
||||||
// Global variable that holds the nsContextMenu instance.
|
// Global variable that holds the nsContextMenu instance.
|
||||||
var gContextMenu = null;
|
var gContextMenu = null;
|
||||||
@ -114,6 +121,10 @@ var gBookmarkAllTabsHandler = null;
|
|||||||
var gClickAndHoldTimer = null;
|
var gClickAndHoldTimer = null;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef XP_MACOSX
|
||||||
|
var gEditUIVisible = true;
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We can avoid adding multiple load event listeners and save some time by adding
|
* We can avoid adding multiple load event listeners and save some time by adding
|
||||||
* one listener that calls all real handlers.
|
* one listener that calls all real handlers.
|
||||||
@ -170,6 +181,45 @@ function UpdateBackForwardCommands(aWebNavigation)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var UnifiedBackForwardButton = {
|
||||||
|
unify: function() {
|
||||||
|
var backButton = document.getElementById("back-button");
|
||||||
|
if (!backButton || !backButton.nextSibling || backButton.nextSibling.id != "forward-button")
|
||||||
|
return; // back and forward buttons aren't adjacent
|
||||||
|
|
||||||
|
var wrapper = document.createElement("toolbaritem");
|
||||||
|
wrapper.id = "unified-back-forward-button";
|
||||||
|
wrapper.className = "chromeclass-toolbar-additional";
|
||||||
|
wrapper.setAttribute("context", "backMenu");
|
||||||
|
|
||||||
|
var toolbar = backButton.parentNode;
|
||||||
|
toolbar.insertBefore(wrapper, backButton);
|
||||||
|
|
||||||
|
var forwardButton = backButton.nextSibling;
|
||||||
|
wrapper.appendChild(backButton);
|
||||||
|
wrapper.appendChild(forwardButton);
|
||||||
|
|
||||||
|
var popup = backButton.getElementsByTagName("menupopup")[0].cloneNode(true);
|
||||||
|
wrapper.appendChild(popup);
|
||||||
|
|
||||||
|
this._unified = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
separate: function() {
|
||||||
|
if (!this._unified)
|
||||||
|
return;
|
||||||
|
|
||||||
|
var wrapper = document.getElementById("unified-back-forward-button");
|
||||||
|
var toolbar = wrapper.parentNode;
|
||||||
|
|
||||||
|
toolbar.insertBefore(wrapper.firstChild, wrapper); // Back button
|
||||||
|
toolbar.insertBefore(wrapper.firstChild, wrapper); // Forward button
|
||||||
|
toolbar.removeChild(wrapper);
|
||||||
|
|
||||||
|
this._unified = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
#ifdef XP_MACOSX
|
#ifdef XP_MACOSX
|
||||||
/**
|
/**
|
||||||
* Click-and-Hold implementation for the Back and Forward buttons
|
* Click-and-Hold implementation for the Back and Forward buttons
|
||||||
@ -889,7 +939,8 @@ function delayedStartup()
|
|||||||
gPrefService = Components.classes["@mozilla.org/preferences-service;1"]
|
gPrefService = Components.classes["@mozilla.org/preferences-service;1"]
|
||||||
.getService(Components.interfaces.nsIPrefBranch2);
|
.getService(Components.interfaces.nsIPrefBranch2);
|
||||||
BrowserOffline.init();
|
BrowserOffline.init();
|
||||||
|
OfflineApps.init();
|
||||||
|
|
||||||
if (gURLBar && document.documentElement.getAttribute("chromehidden").indexOf("toolbar") != -1) {
|
if (gURLBar && document.documentElement.getAttribute("chromehidden").indexOf("toolbar") != -1) {
|
||||||
gURLBar.setAttribute("readonly", "true");
|
gURLBar.setAttribute("readonly", "true");
|
||||||
gURLBar.setAttribute("enablehistory", "false");
|
gURLBar.setAttribute("enablehistory", "false");
|
||||||
@ -908,6 +959,7 @@ function delayedStartup()
|
|||||||
sidebar.setAttribute("src", sidebarBox.getAttribute("src"));
|
sidebar.setAttribute("src", sidebarBox.getAttribute("src"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UnifiedBackForwardButton.unify();
|
||||||
UpdateUrlbarSearchSplitterState();
|
UpdateUrlbarSearchSplitterState();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -1049,13 +1101,33 @@ function delayedStartup()
|
|||||||
// themselves.
|
// themselves.
|
||||||
gBrowser.addEventListener("command", BrowserOnCommand, false);
|
gBrowser.addEventListener("command", BrowserOnCommand, false);
|
||||||
|
|
||||||
|
// Delayed initialization of the livemarks update timer.
|
||||||
|
// Livemark updates don't need to start until after bookmark UI
|
||||||
|
// such as the toolbar has initialized. Starting 5 seconds after
|
||||||
|
// delayedStartup in order to stagger this before the download
|
||||||
|
// manager starts (see below).
|
||||||
|
setTimeout(function() PlacesUtils.livemarks.start(), 5000);
|
||||||
|
|
||||||
// Initialize the download manager some time after the app starts so that
|
// Initialize the download manager some time after the app starts so that
|
||||||
// auto-resume downloads begin (such as after crashing or quitting with
|
// auto-resume downloads begin (such as after crashing or quitting with
|
||||||
// active downloads) and speeds up the first-load of the download manager UI.
|
// active downloads) and speeds up the first-load of the download manager UI.
|
||||||
// If the user manually opens the download manager before the timeout, the
|
// If the user manually opens the download manager before the timeout, the
|
||||||
// downloads will start right away, and getting the service again won't hurt.
|
// downloads will start right away, and getting the service again won't hurt.
|
||||||
setTimeout(function() Cc["@mozilla.org/download-manager;1"].
|
setTimeout(function() {
|
||||||
getService(Ci.nsIDownloadManager), 10000);
|
gDownloadMgr = Cc["@mozilla.org/download-manager;1"].
|
||||||
|
getService(Ci.nsIDownloadManager);
|
||||||
|
|
||||||
|
// Initialize the downloads monitor panel listener
|
||||||
|
gDownloadMgr.addListener(DownloadMonitorPanel);
|
||||||
|
DownloadMonitorPanel.init();
|
||||||
|
}, 10000);
|
||||||
|
|
||||||
|
#ifndef XP_MACOSX
|
||||||
|
updateEditUIVisibility();
|
||||||
|
let placesContext = document.getElementById("placesContext");
|
||||||
|
placesContext.addEventListener("popupshowing", updateEditUIVisibility, false);
|
||||||
|
placesContext.addEventListener("popuphiding", updateEditUIVisibility, false);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
function BrowserShutdown()
|
function BrowserShutdown()
|
||||||
@ -1091,6 +1163,7 @@ function BrowserShutdown()
|
|||||||
gSanitizeListener.shutdown();
|
gSanitizeListener.shutdown();
|
||||||
|
|
||||||
BrowserOffline.uninit();
|
BrowserOffline.uninit();
|
||||||
|
OfflineApps.uninit();
|
||||||
|
|
||||||
var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService();
|
var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService();
|
||||||
var windowManagerInterface = windowManager.QueryInterface(Components.interfaces.nsIWindowMediator);
|
var windowManagerInterface = windowManager.QueryInterface(Components.interfaces.nsIWindowMediator);
|
||||||
@ -1269,13 +1342,15 @@ function ctrlNumberTabSelection(event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef XP_MACOSX
|
#ifdef XP_MACOSX
|
||||||
if (!event.metaKey)
|
// Mac: Cmd+number
|
||||||
|
if (!event.metaKey || event.ctrlKey || event.altKey || event.shiftKey)
|
||||||
#else
|
#else
|
||||||
#ifdef XP_UNIX
|
#ifdef XP_UNIX
|
||||||
// don't let tab selection clash with numeric accesskeys (bug 366084)
|
// Linux: Alt+number
|
||||||
if (!event.altKey || event.shiftKey)
|
if (!event.altKey || event.ctrlKey || event.metaKey || event.shiftKey)
|
||||||
#else
|
#else
|
||||||
if (!event.ctrlKey)
|
// Windows: Ctrl+number
|
||||||
|
if (!event.ctrlKey || event.metaKey || event.altKey || event.shiftKey)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
@ -1409,12 +1484,14 @@ function BrowserHandleShiftBackspace()
|
|||||||
|
|
||||||
function BrowserBackMenu(event)
|
function BrowserBackMenu(event)
|
||||||
{
|
{
|
||||||
return FillHistoryMenu(event.target, "back");
|
var menuType = UnifiedBackForwardButton._unified ? "unified" : "back";
|
||||||
|
return FillHistoryMenu(event.target, menuType);
|
||||||
}
|
}
|
||||||
|
|
||||||
function BrowserForwardMenu(event)
|
function BrowserForwardMenu(event)
|
||||||
{
|
{
|
||||||
return FillHistoryMenu(event.target, "forward");
|
var menuType = UnifiedBackForwardButton._unified ? "unified" : "forward";
|
||||||
|
return FillHistoryMenu(event.target, menuType);
|
||||||
}
|
}
|
||||||
|
|
||||||
function BrowserStop()
|
function BrowserStop()
|
||||||
@ -1496,13 +1573,20 @@ function loadOneOrMoreURIs(aURIString)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function openLocation()
|
function focusAndSelectUrlBar()
|
||||||
{
|
{
|
||||||
if (gURLBar && isElementVisible(gURLBar) && !gURLBar.readOnly) {
|
if (gURLBar && isElementVisible(gURLBar) && !gURLBar.readOnly) {
|
||||||
gURLBar.focus();
|
gURLBar.focus();
|
||||||
gURLBar.select();
|
gURLBar.select();
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function openLocation()
|
||||||
|
{
|
||||||
|
if (focusAndSelectUrlBar())
|
||||||
|
return;
|
||||||
#ifdef XP_MACOSX
|
#ifdef XP_MACOSX
|
||||||
if (window.location.href != getBrowserURL()) {
|
if (window.location.href != getBrowserURL()) {
|
||||||
var win = getTopWin();
|
var win = getTopWin();
|
||||||
@ -1904,10 +1988,25 @@ function URLBarSetURI(aURI) {
|
|||||||
if (!content.opener)
|
if (!content.opener)
|
||||||
value = "";
|
value = "";
|
||||||
} else {
|
} else {
|
||||||
// try to decode as UTF-8
|
// Try to decode as UTF-8 if there's no encoding sequence that we would break.
|
||||||
try {
|
if (!/%25(?:3B|2F|3F|3A|40|26|3D|2B|24|2C|23)/i.test(value))
|
||||||
value = decodeURI(value).replace(/%/g, "%25");
|
try {
|
||||||
} catch(e) {}
|
value = decodeURI(value)
|
||||||
|
// 1. decodeURI decodes %25 to %, which creates unintended
|
||||||
|
// encoding sequences. Re-encode it, unless it's part of
|
||||||
|
// a sequence that survived decodeURI, i.e. one for:
|
||||||
|
// ';', '/', '?', ':', '@', '&', '=', '+', '$', ',', '#'
|
||||||
|
// (RFC 3987 section 3.2)
|
||||||
|
// 2. Re-encode whitespace so that it doesn't get eaten away
|
||||||
|
// by the location bar (bug 410726).
|
||||||
|
.replace(/%(?!3B|2F|3F|3A|40|26|3D|2B|24|2C|23)|[\r\n\t]/ig,
|
||||||
|
encodeURIComponent);
|
||||||
|
} catch (e) {}
|
||||||
|
|
||||||
|
// Encode bidirectional formatting characters.
|
||||||
|
// (RFC 3987 sections 3.2 and 4.1 paragraph 6)
|
||||||
|
value = value.replace(/[\u200e\u200f\u202a\u202b\u202c\u202d\u202e]/g,
|
||||||
|
encodeURIComponent);
|
||||||
|
|
||||||
state = "valid";
|
state = "valid";
|
||||||
}
|
}
|
||||||
@ -2877,6 +2976,7 @@ function FillHistoryMenu(aParent, aMenu)
|
|||||||
|
|
||||||
var webNav = getWebNavigation();
|
var webNav = getWebNavigation();
|
||||||
var sessionHistory = webNav.sessionHistory;
|
var sessionHistory = webNav.sessionHistory;
|
||||||
|
var bundle_browser = document.getElementById("bundle_browser");
|
||||||
|
|
||||||
var count = sessionHistory.count;
|
var count = sessionHistory.count;
|
||||||
var index = sessionHistory.index;
|
var index = sessionHistory.index;
|
||||||
@ -2893,7 +2993,8 @@ function FillHistoryMenu(aParent, aMenu)
|
|||||||
{
|
{
|
||||||
entry = sessionHistory.getEntryAtIndex(j, false);
|
entry = sessionHistory.getEntryAtIndex(j, false);
|
||||||
if (entry)
|
if (entry)
|
||||||
createMenuItem(aParent, j, entry.title);
|
createMenuItem(aParent, j, entry.title || entry.URI.spec,
|
||||||
|
bundle_browser.getString("tabHistory.goBack"));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "forward":
|
case "forward":
|
||||||
@ -2903,9 +3004,39 @@ function FillHistoryMenu(aParent, aMenu)
|
|||||||
{
|
{
|
||||||
entry = sessionHistory.getEntryAtIndex(j, false);
|
entry = sessionHistory.getEntryAtIndex(j, false);
|
||||||
if (entry)
|
if (entry)
|
||||||
createMenuItem(aParent, j, entry.title);
|
createMenuItem(aParent, j, entry.title || entry.URI.spec,
|
||||||
|
bundle_browser.getString("tabHistory.goForward"));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case "unified":
|
||||||
|
if (count <= 1) // don't display the popup for a single item
|
||||||
|
return false;
|
||||||
|
|
||||||
|
var half_length = Math.floor(MAX_HISTORY_MENU_ITEMS / 2);
|
||||||
|
var start = Math.max(index - half_length, 0);
|
||||||
|
end = Math.min(start == 0 ? MAX_HISTORY_MENU_ITEMS : index + half_length + 1, count);
|
||||||
|
if (end == count)
|
||||||
|
start = Math.max(count - MAX_HISTORY_MENU_ITEMS, 0);
|
||||||
|
|
||||||
|
var tooltips = [
|
||||||
|
bundle_browser.getString("tabHistory.goBack"),
|
||||||
|
bundle_browser.getString("tabHistory.current"),
|
||||||
|
bundle_browser.getString("tabHistory.goForward")
|
||||||
|
];
|
||||||
|
var classNames = ["unified-nav-back", "unified-nav-current", "unified-nav-forward"];
|
||||||
|
|
||||||
|
for (var j = end - 1; j >= start; j--) {
|
||||||
|
entry = sessionHistory.getEntryAtIndex(j, false);
|
||||||
|
var tooltip = tooltips[j < index ? 0 : j == index ? 1 : 2];
|
||||||
|
var className = classNames[j < index ? 0 : j == index ? 1 : 2];
|
||||||
|
var item = createMenuItem(aParent, j, entry.title || entry.URI.spec, tooltip, className);
|
||||||
|
|
||||||
|
if (j == index) { // mark the current history item
|
||||||
|
item.setAttribute("type", "radio");
|
||||||
|
item.setAttribute("checked", "true");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -2927,12 +3058,16 @@ function addToUrlbarHistory(aUrlToAdd)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function createMenuItem( aParent, aIndex, aLabel)
|
function createMenuItem(aParent, aIndex, aLabel, aTooltipText, aClassName)
|
||||||
{
|
{
|
||||||
var menuitem = document.createElement( "menuitem" );
|
var menuitem = document.createElement( "menuitem" );
|
||||||
menuitem.setAttribute( "label", aLabel );
|
menuitem.setAttribute( "label", aLabel );
|
||||||
menuitem.setAttribute( "index", aIndex );
|
menuitem.setAttribute( "index", aIndex );
|
||||||
aParent.appendChild( menuitem );
|
if (aTooltipText)
|
||||||
|
menuitem.setAttribute("tooltiptext", aTooltipText);
|
||||||
|
if (aClassName)
|
||||||
|
menuitem.className = aClassName;
|
||||||
|
return aParent.appendChild(menuitem);
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteHistoryItems(aParent)
|
function deleteHistoryItems(aParent)
|
||||||
@ -2951,6 +3086,12 @@ function toJavaScriptConsole()
|
|||||||
toOpenWindowByType("global:console", "chrome://global/content/console.xul");
|
toOpenWindowByType("global:console", "chrome://global/content/console.xul");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function BrowserDownloadsUI()
|
||||||
|
{
|
||||||
|
Cc["@mozilla.org/download-manager-ui;1"].
|
||||||
|
getService(Ci.nsIDownloadManagerUI).show();
|
||||||
|
}
|
||||||
|
|
||||||
function toOpenWindowByType(inType, uri, features)
|
function toOpenWindowByType(inType, uri, features)
|
||||||
{
|
{
|
||||||
var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService();
|
var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService();
|
||||||
@ -3025,6 +3166,8 @@ function BrowserCustomizeToolbar()
|
|||||||
var cmd = document.getElementById("cmd_CustomizeToolbars");
|
var cmd = document.getElementById("cmd_CustomizeToolbars");
|
||||||
cmd.setAttribute("disabled", "true");
|
cmd.setAttribute("disabled", "true");
|
||||||
|
|
||||||
|
UnifiedBackForwardButton.separate();
|
||||||
|
|
||||||
var splitter = document.getElementById("urlbar-search-splitter");
|
var splitter = document.getElementById("urlbar-search-splitter");
|
||||||
if (splitter)
|
if (splitter)
|
||||||
splitter.parentNode.removeChild(splitter);
|
splitter.parentNode.removeChild(splitter);
|
||||||
@ -3061,8 +3204,13 @@ function BrowserToolboxCustomizeDone(aToolboxChanged)
|
|||||||
gHomeButton.updateTooltip();
|
gHomeButton.updateTooltip();
|
||||||
gIdentityHandler._cacheElements();
|
gIdentityHandler._cacheElements();
|
||||||
window.XULBrowserWindow.init();
|
window.XULBrowserWindow.init();
|
||||||
|
|
||||||
|
#ifndef XP_MACOSX
|
||||||
|
updateEditUIVisibility();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UnifiedBackForwardButton.unify();
|
||||||
UpdateUrlbarSearchSplitterState();
|
UpdateUrlbarSearchSplitterState();
|
||||||
|
|
||||||
// Update the urlbar
|
// Update the urlbar
|
||||||
@ -3101,6 +3249,67 @@ function BrowserToolboxCustomizeDone(aToolboxChanged)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the global flag that tracks whether or not any edit UI (the Edit menu,
|
||||||
|
* edit-related items in the context menu, and edit-related toolbar buttons
|
||||||
|
* is visible, then update the edit commands' enabled state accordingly. We use
|
||||||
|
* this flag to skip updating the edit commands on focus or selection changes
|
||||||
|
* when no UI is visible to improve performance (including pageload performance,
|
||||||
|
* since focus changes when you load a new page).
|
||||||
|
*
|
||||||
|
* If UI is visible, we use goUpdateGlobalEditMenuItems to set the commands'
|
||||||
|
* enabled state so the UI will reflect it appropriately.
|
||||||
|
*
|
||||||
|
* If the UI isn't visible, we enable all edit commands so keyboard shortcuts
|
||||||
|
* still work and just lazily disable them as needed when the user presses a
|
||||||
|
* shortcut.
|
||||||
|
*
|
||||||
|
* This doesn't work on Mac, since Mac menus flash when users press their
|
||||||
|
* keyboard shortcuts, so edit UI is essentially always visible on the Mac,
|
||||||
|
* and we need to always update the edit commands. Thus on Mac this function
|
||||||
|
* is a no op.
|
||||||
|
*/
|
||||||
|
function updateEditUIVisibility()
|
||||||
|
{
|
||||||
|
#ifndef XP_MACOSX
|
||||||
|
let editMenuPopupState = document.getElementById("menu_EditPopup").state;
|
||||||
|
let contextMenuPopupState = document.getElementById("contentAreaContextMenu").state;
|
||||||
|
let placesContextMenuPopupState = document.getElementById("placesContext").state;
|
||||||
|
|
||||||
|
// The UI is visible if the Edit menu is opening or open, if the context menu
|
||||||
|
// is open, or if the toolbar has been customized to include the Cut, Copy,
|
||||||
|
// or Paste toolbar buttons.
|
||||||
|
gEditUIVisible = editMenuPopupState == "showing" ||
|
||||||
|
editMenuPopupState == "open" ||
|
||||||
|
contextMenuPopupState == "showing" ||
|
||||||
|
contextMenuPopupState == "open" ||
|
||||||
|
placesContextMenuPopupState == "showing" ||
|
||||||
|
placesContextMenuPopupState == "open" ||
|
||||||
|
document.getElementById("cut-button") ||
|
||||||
|
document.getElementById("copy-button") ||
|
||||||
|
document.getElementById("paste-button") ? true : false;
|
||||||
|
|
||||||
|
// If UI is visible, update the edit commands' enabled state to reflect
|
||||||
|
// whether or not they are actually enabled for the current focus/selection.
|
||||||
|
if (gEditUIVisible)
|
||||||
|
goUpdateGlobalEditMenuItems();
|
||||||
|
|
||||||
|
// Otherwise, enable all commands, so that keyboard shortcuts still work,
|
||||||
|
// then lazily determine their actual enabled state when the user presses
|
||||||
|
// a keyboard shortcut.
|
||||||
|
else {
|
||||||
|
goSetCommandEnabled("cmd_undo", true);
|
||||||
|
goSetCommandEnabled("cmd_redo", true);
|
||||||
|
goSetCommandEnabled("cmd_cut", true);
|
||||||
|
goSetCommandEnabled("cmd_copy", true);
|
||||||
|
goSetCommandEnabled("cmd_paste", true);
|
||||||
|
goSetCommandEnabled("cmd_selectAll", true);
|
||||||
|
goSetCommandEnabled("cmd_delete", true);
|
||||||
|
goSetCommandEnabled("cmd_switchTextDirection", true);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
var FullScreen =
|
var FullScreen =
|
||||||
{
|
{
|
||||||
toggle: function()
|
toggle: function()
|
||||||
@ -3279,7 +3488,10 @@ nsBrowserStatusHandler.prototype =
|
|||||||
|
|
||||||
setOverLink : function(link, b)
|
setOverLink : function(link, b)
|
||||||
{
|
{
|
||||||
this.overLink = link;
|
// Encode bidirectional formatting characters.
|
||||||
|
// (RFC 3987 sections 3.2 and 4.1 paragraph 6)
|
||||||
|
this.overLink = link.replace(/[\u200e\u200f\u202a\u202b\u202c\u202d\u202e]/g,
|
||||||
|
encodeURIComponent);
|
||||||
this.updateStatusField();
|
this.updateStatusField();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -3363,6 +3575,11 @@ nsBrowserStatusHandler.prototype =
|
|||||||
var browser = gBrowser.mCurrentBrowser;
|
var browser = gBrowser.mCurrentBrowser;
|
||||||
if (!gBrowser.mTabbedMode && !browser.mIconURL)
|
if (!gBrowser.mTabbedMode && !browser.mIconURL)
|
||||||
gBrowser.useDefaultIcon(gBrowser.mCurrentTab);
|
gBrowser.useDefaultIcon(gBrowser.mCurrentTab);
|
||||||
|
|
||||||
|
if (Components.isSuccessCode(aStatus) &&
|
||||||
|
content.document.documentElement.getAttribute("manifest")) {
|
||||||
|
OfflineApps.offlineAppRequested(content);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4821,6 +5038,117 @@ var BrowserOffline = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var OfflineApps = {
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// OfflineApps Public Methods
|
||||||
|
init: function ()
|
||||||
|
{
|
||||||
|
// XXX: empty init left as a placeholder for patch in bug 397417
|
||||||
|
},
|
||||||
|
|
||||||
|
uninit: function ()
|
||||||
|
{
|
||||||
|
// XXX: empty uninit left as a placeholder for patch in bug 397417
|
||||||
|
},
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// OfflineApps Implementation Methods
|
||||||
|
|
||||||
|
// XXX: _getBrowserWindowForContentWindow and _getBrowserForContentWindow
|
||||||
|
// were taken from browser/components/feeds/src/WebContentConverter.
|
||||||
|
_getBrowserWindowForContentWindow: function(aContentWindow) {
|
||||||
|
return aContentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||||
|
.getInterface(Ci.nsIWebNavigation)
|
||||||
|
.QueryInterface(Ci.nsIDocShellTreeItem)
|
||||||
|
.rootTreeItem
|
||||||
|
.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||||
|
.getInterface(Ci.nsIDOMWindow)
|
||||||
|
.wrappedJSObject;
|
||||||
|
},
|
||||||
|
|
||||||
|
_getBrowserForContentWindow: function(aBrowserWindow, aContentWindow) {
|
||||||
|
// This depends on pseudo APIs of browser.js and tabbrowser.xml
|
||||||
|
aContentWindow = aContentWindow.top;
|
||||||
|
var browsers = aBrowserWindow.getBrowser().browsers;
|
||||||
|
for (var i = 0; i < browsers.length; ++i) {
|
||||||
|
if (browsers[i].contentWindow == aContentWindow)
|
||||||
|
return browsers[i];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
offlineAppRequested: function(aContentWindow) {
|
||||||
|
var browserWindow = this._getBrowserWindowForContentWindow(aContentWindow);
|
||||||
|
var browser = this._getBrowserForContentWindow(browserWindow,
|
||||||
|
aContentWindow);
|
||||||
|
|
||||||
|
var currentURI = browser.webNavigation.currentURI;
|
||||||
|
var pm = Cc["@mozilla.org/permissionmanager;1"].
|
||||||
|
getService(Ci.nsIPermissionManager);
|
||||||
|
|
||||||
|
// don't bother showing UI if the user has already made a decision
|
||||||
|
if (pm.testExactPermission(currentURI, "offline-app") !=
|
||||||
|
Ci.nsIPermissionManager.UNKNOWN_ACTION)
|
||||||
|
return;
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (gPrefService.getBoolPref("offline-apps.allow_by_default")) {
|
||||||
|
// all pages can use offline capabilities, no need to ask the user
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} catch(e) {
|
||||||
|
// this pref isn't set by default, ignore failures
|
||||||
|
}
|
||||||
|
|
||||||
|
var notificationBox = gBrowser.getNotificationBox(browser);
|
||||||
|
var notification = notificationBox.getNotificationWithValue("offline-app-requested");
|
||||||
|
if (!notification) {
|
||||||
|
var bundle_browser = document.getElementById("bundle_browser");
|
||||||
|
|
||||||
|
var buttons = [{
|
||||||
|
label: bundle_browser.getString("offlineApps.allow"),
|
||||||
|
accessKey: bundle_browser.getString("offlineApps.allowAccessKey"),
|
||||||
|
callback: function() { OfflineApps.allowSite(); }
|
||||||
|
}];
|
||||||
|
|
||||||
|
const priority = notificationBox.PRIORITY_INFO_LOW;
|
||||||
|
var message = bundle_browser.getFormattedString("offlineApps.available",
|
||||||
|
[ currentURI.host ]);
|
||||||
|
notificationBox.appendNotification(message, "offline-app-requested",
|
||||||
|
"chrome://browser/skin/Info.png",
|
||||||
|
priority, buttons);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
allowSite: function() {
|
||||||
|
var currentURI = gBrowser.selectedBrowser.webNavigation.currentURI;
|
||||||
|
var pm = Cc["@mozilla.org/permissionmanager;1"].
|
||||||
|
getService(Ci.nsIPermissionManager);
|
||||||
|
pm.add(currentURI, "offline-app", Ci.nsIPermissionManager.ALLOW_ACTION);
|
||||||
|
|
||||||
|
// When a site is enabled while loading, <link rel="offline-resource">
|
||||||
|
// resources will start fetching immediately. This one time we need to
|
||||||
|
// do it ourselves.
|
||||||
|
this._startFetching();
|
||||||
|
},
|
||||||
|
|
||||||
|
_startFetching: function() {
|
||||||
|
var manifest = content.document.documentElement.getAttribute("manifest");
|
||||||
|
if (!manifest)
|
||||||
|
return;
|
||||||
|
|
||||||
|
var ios = Cc["@mozilla.org/network/io-service;1"].
|
||||||
|
getService(Ci.nsIIOService);
|
||||||
|
|
||||||
|
var contentURI = ios.newURI(content.location.href, null, null);
|
||||||
|
var manifestURI = ios.newURI(manifest, content.document.characterSet,
|
||||||
|
contentURI);
|
||||||
|
|
||||||
|
var updateService = Cc["@mozilla.org/offlinecacheupdate-service;1"].
|
||||||
|
getService(Ci.nsIOfflineCacheUpdateService);
|
||||||
|
updateService.scheduleUpdate(manifestURI, contentURI);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
function WindowIsClosing()
|
function WindowIsClosing()
|
||||||
{
|
{
|
||||||
var browser = getBrowser();
|
var browser = getBrowser();
|
||||||
@ -5743,16 +6071,23 @@ IdentityHandler.prototype = {
|
|||||||
this._identityPopupContentSupp.textContent = supplemental;
|
this._identityPopupContentSupp.textContent = supplemental;
|
||||||
this._identityPopupContentVerif.textContent = verifier;
|
this._identityPopupContentVerif.textContent = verifier;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
hideIdentityPopup : function() {
|
||||||
|
this._identityPopup.hidePopup();
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Click handler for the identity-box element in primary chrome.
|
* Click handler for the identity-box element in primary chrome.
|
||||||
*/
|
*/
|
||||||
handleIdentityClick : function(event) {
|
handleIdentityButtonEvent : function(event) {
|
||||||
|
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
|
if ((event.type == "click" && event.button != 0) ||
|
||||||
|
(event.type == "keypress" && event.charCode != KeyEvent.DOM_VK_SPACE &&
|
||||||
|
event.keyCode != KeyEvent.DOM_VK_RETURN))
|
||||||
|
return; // Left click, space or enter only
|
||||||
|
|
||||||
if (event.button != 0)
|
|
||||||
return; // We only want left-clicks
|
|
||||||
|
|
||||||
// Make sure that the display:none style we set in xul is removed now that
|
// Make sure that the display:none style we set in xul is removed now that
|
||||||
// the popup is actually needed
|
// the popup is actually needed
|
||||||
this._identityPopup.hidden = false;
|
this._identityPopup.hidden = false;
|
||||||
@ -5780,3 +6115,110 @@ function getIdentityHandler() {
|
|||||||
gIdentityHandler = new IdentityHandler();
|
gIdentityHandler = new IdentityHandler();
|
||||||
return gIdentityHandler;
|
return gIdentityHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let DownloadMonitorPanel = {
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
//// DownloadMonitorPanel Member Variables
|
||||||
|
|
||||||
|
_panel: null,
|
||||||
|
_activeStr: null,
|
||||||
|
_pausedStr: null,
|
||||||
|
_lastTime: Infinity,
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
//// DownloadMonitorPanel Public Methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize the status panel and member variables
|
||||||
|
*/
|
||||||
|
init: function DMP_init() {
|
||||||
|
// Initialize "private" member variables
|
||||||
|
this._panel = document.getElementById("download-monitor");
|
||||||
|
|
||||||
|
// Cache the status strings
|
||||||
|
let (bundle = document.getElementById("bundle_browser")) {
|
||||||
|
this._activeStr = bundle.getString("activeDownloads");
|
||||||
|
this._pausedStr = bundle.getString("pausedDownloads");
|
||||||
|
}
|
||||||
|
|
||||||
|
this.updateStatus();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update status based on the number of active and paused downloads
|
||||||
|
*/
|
||||||
|
updateStatus: function DMP_updateStatus() {
|
||||||
|
let numActive = gDownloadMgr.activeDownloadCount;
|
||||||
|
|
||||||
|
// Hide the panel and reset the "last time" if there's no downloads
|
||||||
|
if (numActive == 0) {
|
||||||
|
this._panel.hidden = true;
|
||||||
|
this._lastTime = Infinity;
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find the download with the longest remaining time
|
||||||
|
let numPaused = 0;
|
||||||
|
let maxTime = -Infinity;
|
||||||
|
let dls = gDownloadMgr.activeDownloads;
|
||||||
|
while (dls.hasMoreElements()) {
|
||||||
|
let dl = dls.getNext().QueryInterface(Ci.nsIDownload);
|
||||||
|
if (dl.state == gDownloadMgr.DOWNLOAD_DOWNLOADING) {
|
||||||
|
// Figure out if this download takes longer
|
||||||
|
if (dl.speed > 0 && dl.size > 0)
|
||||||
|
maxTime = Math.max(maxTime, (dl.size - dl.amountTransferred) / dl.speed);
|
||||||
|
else
|
||||||
|
maxTime = -1;
|
||||||
|
}
|
||||||
|
else if (dl.state == gDownloadMgr.DOWNLOAD_PAUSED)
|
||||||
|
numPaused++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the remaining time string and last sec for time estimation
|
||||||
|
let timeLeft;
|
||||||
|
[timeLeft, this._lastSec] = DownloadUtils.getTimeLeft(maxTime, this._lastSec);
|
||||||
|
|
||||||
|
// Figure out how many downloads are currently downloading
|
||||||
|
let numDls = numActive - numPaused;
|
||||||
|
let status = this._activeStr;
|
||||||
|
|
||||||
|
// If all downloads are paused, show the paused message instead
|
||||||
|
if (numDls == 0) {
|
||||||
|
numDls = numPaused;
|
||||||
|
status = this._pausedStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the correct plural form and insert the number of downloads and time
|
||||||
|
// left message if necessary
|
||||||
|
status = PluralForm.get(numDls, status);
|
||||||
|
status = status.replace("#1", numDls);
|
||||||
|
status = status.replace("#2", timeLeft);
|
||||||
|
|
||||||
|
// Update the panel and show it
|
||||||
|
this._panel.label = status;
|
||||||
|
this._panel.hidden = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
//// nsIDownloadProgressListener
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update status for download progress changes
|
||||||
|
*/
|
||||||
|
onProgressChange: function() {
|
||||||
|
this.updateStatus();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update status for download state changes
|
||||||
|
*/
|
||||||
|
onDownloadStateChange: function() {
|
||||||
|
this.updateStatus();
|
||||||
|
},
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
//// nsISupports
|
||||||
|
|
||||||
|
QueryInterface: XPCOMUtils.generateQI([Ci.nsIDownloadProgressListener]),
|
||||||
|
};
|
||||||
|
@ -106,7 +106,8 @@
|
|||||||
<panel type="autocomplete-richlistbox" chromedir="&locale.dir;" id="PopupAutoCompleteRichResult" noautofocus="true" hidden="true"/>
|
<panel type="autocomplete-richlistbox" chromedir="&locale.dir;" id="PopupAutoCompleteRichResult" noautofocus="true" hidden="true"/>
|
||||||
|
|
||||||
<panel id="editBookmarkPanel" orient="vertical" hidden="true"
|
<panel id="editBookmarkPanel" orient="vertical" hidden="true"
|
||||||
onpopupshown="PlacesCommandHook.editBookmarkPanelShown();">
|
onpopupshown="PlacesCommandHook.editBookmarkPanelShown();"
|
||||||
|
label="&bookmarkPageCmd2.label;">
|
||||||
<vbox id="editBookmarkPanelContent" flex="1"/>
|
<vbox id="editBookmarkPanelContent" flex="1"/>
|
||||||
<hbox flex="1">
|
<hbox flex="1">
|
||||||
<spacer flex="1"/>
|
<spacer flex="1"/>
|
||||||
@ -137,20 +138,22 @@
|
|||||||
</popup>
|
</popup>
|
||||||
|
|
||||||
<popup id="contentAreaContextMenu"
|
<popup id="contentAreaContextMenu"
|
||||||
onpopupshowing="if (event.target != this) return true; gContextMenu = new nsContextMenu(this, window.getBrowser()); return gContextMenu.shouldDisplay;"
|
onpopupshowing="if (event.target != this) return true; updateEditUIVisibility(); gContextMenu = new nsContextMenu(this, window.getBrowser()); return gContextMenu.shouldDisplay;"
|
||||||
onpopuphiding="if (event.target == this) { gContextMenu = null; }">
|
onpopuphiding="if (event.target == this) { gContextMenu = null; updateEditUIVisibility(); }">
|
||||||
#include browser-context.inc
|
#include browser-context.inc
|
||||||
</popup>
|
</popup>
|
||||||
|
|
||||||
<popup id="placesContext"/>
|
<popup id="placesContext"/>
|
||||||
|
|
||||||
<!-- Popup for site identity information -->
|
<!-- Popup for site identity information -->
|
||||||
<panel id="identity-popup" position="after_start" hidden="true" noautofocus="true">
|
<panel id="identity-popup" position="after_start" hidden="true" noautofocus="true"
|
||||||
|
onpopupshown="document.getElementById('identity-popup-more-info-link').focus();"
|
||||||
|
onpopuphidden="focusAndSelectUrlBar();" norestorefocus="true">
|
||||||
<hbox id="identity-popup-container" align="top">
|
<hbox id="identity-popup-container" align="top">
|
||||||
<image id="identity-popup-icon"/>
|
<image id="identity-popup-icon"/>
|
||||||
<vbox id="identity-popup-content-box">
|
<vbox id="identity-popup-content-box">
|
||||||
<!-- Title Bar -->
|
<!-- Title Bar -->
|
||||||
<label id="identity-popup-title"/>
|
<label id="identity-popup-title" control="identity-popup"/>
|
||||||
<!-- Content area -->
|
<!-- Content area -->
|
||||||
<description id="identity-popup-content"/>
|
<description id="identity-popup-content"/>
|
||||||
<description id="identity-popup-content-supplemental"/>
|
<description id="identity-popup-content-supplemental"/>
|
||||||
@ -167,6 +170,7 @@
|
|||||||
<label id="identity-popup-more-info-link"
|
<label id="identity-popup-more-info-link"
|
||||||
class="text-link plain"
|
class="text-link plain"
|
||||||
value="&identity.moreInfoLinkText;"
|
value="&identity.moreInfoLinkText;"
|
||||||
|
onblur="getIdentityHandler().hideIdentityPopup();"
|
||||||
onclick="getIdentityHandler().handleMoreInfoClick(event);"/>
|
onclick="getIdentityHandler().handleMoreInfoClick(event);"/>
|
||||||
</vbox>
|
</vbox>
|
||||||
</hbox>
|
</hbox>
|
||||||
@ -269,8 +273,9 @@
|
|||||||
pageproxystate="invalid">
|
pageproxystate="invalid">
|
||||||
<!-- Use onclick instead of normal popup= syntax since the popup
|
<!-- Use onclick instead of normal popup= syntax since the popup
|
||||||
code fires onmousedown, and hence eats our favicon drag events -->
|
code fires onmousedown, and hence eats our favicon drag events -->
|
||||||
<box id="identity-box"
|
<box id="identity-box" role="button"
|
||||||
onclick="getIdentityHandler().handleIdentityClick(event);">
|
onclick="getIdentityHandler().handleIdentityButtonEvent(event);"
|
||||||
|
onkeypress="getIdentityHandler().handleIdentityButtonEvent(event);">
|
||||||
<hbox align="center">
|
<hbox align="center">
|
||||||
<deck id="page-proxy-deck" onclick="PageProxyClickHandler(event);">
|
<deck id="page-proxy-deck" onclick="PageProxyClickHandler(event);">
|
||||||
<image id="page-proxy-button"
|
<image id="page-proxy-button"
|
||||||
@ -465,6 +470,9 @@
|
|||||||
<statusbar class="chromeclass-status" id="status-bar"
|
<statusbar class="chromeclass-status" id="status-bar"
|
||||||
ondragdrop="nsDragAndDrop.drop(event, contentAreaDNDObserver);">
|
ondragdrop="nsDragAndDrop.drop(event, contentAreaDNDObserver);">
|
||||||
<statusbarpanel id="statusbar-display" label="" flex="1"/>
|
<statusbarpanel id="statusbar-display" label="" flex="1"/>
|
||||||
|
<statusbarpanel id="download-monitor" class="statusbarpanel-iconic-text"
|
||||||
|
tooltiptext="&downloadMonitor.tooltip;" hidden="true"
|
||||||
|
ondblclick="doCommand();" command="Tools:Downloads"/>
|
||||||
<statusbarpanel class="statusbarpanel-progress" collapsed="true" id="statusbar-progresspanel">
|
<statusbarpanel class="statusbarpanel-progress" collapsed="true" id="statusbar-progresspanel">
|
||||||
<progressmeter class="progressmeter-statusbar" id="statusbar-icon" mode="normal" value="0"/>
|
<progressmeter class="progressmeter-statusbar" id="statusbar-icon" mode="normal" value="0"/>
|
||||||
</statusbarpanel>
|
</statusbarpanel>
|
||||||
|
@ -464,7 +464,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p id="gecko" class="center">&credit.poweredByGecko;®</p>
|
<p id="gecko" class="center">&credit.poweredByGeckoReg;</p>
|
||||||
|
|
||||||
<p class="footnote">
|
<p class="footnote">
|
||||||
&brandFullName;™ &license.part0; ©1998-2008 &license.part1;
|
&brandFullName;™ &license.part0; ©1998-2008 &license.part1;
|
||||||
|
@ -83,6 +83,11 @@ function nsContextMenu(aXulMenu, aBrowser) {
|
|||||||
this.shouldDisplay = true;
|
this.shouldDisplay = true;
|
||||||
this.isDesignMode = false;
|
this.isDesignMode = false;
|
||||||
this.possibleSpellChecking = false;
|
this.possibleSpellChecking = false;
|
||||||
|
this.ellipsis = "\u2026";
|
||||||
|
try {
|
||||||
|
this.ellipsis = gPrefService.getComplexValue("intl.ellipsis",
|
||||||
|
Ci.nsIPrefLocalizedString).data;
|
||||||
|
} catch (e) { }
|
||||||
|
|
||||||
// Initialize new menu.
|
// Initialize new menu.
|
||||||
this.initMenu(aXulMenu, aBrowser);
|
this.initMenu(aXulMenu, aBrowser);
|
||||||
@ -249,7 +254,7 @@ nsContextMenu.prototype = {
|
|||||||
if (hostLabel) {
|
if (hostLabel) {
|
||||||
var shortenedUriHost = hostLabel.replace(/^www\./i,"");
|
var shortenedUriHost = hostLabel.replace(/^www\./i,"");
|
||||||
if (shortenedUriHost.length > 15)
|
if (shortenedUriHost.length > 15)
|
||||||
shortenedUriHost = shortenedUriHost.substr(0,15) + "...";
|
shortenedUriHost = shortenedUriHost.substr(0,15) + this.ellipsis;
|
||||||
blockImage.label = gNavigatorBundle.getFormattedString("blockImages", [shortenedUriHost]);
|
blockImage.label = gNavigatorBundle.getFormattedString("blockImages", [shortenedUriHost]);
|
||||||
|
|
||||||
if (this.isImageBlocked())
|
if (this.isImageBlocked())
|
||||||
@ -839,9 +844,10 @@ nsContextMenu.prototype = {
|
|||||||
|
|
||||||
var uri = this.target.QueryInterface(Ci.nsIImageLoadingContent).currentURI;
|
var uri = this.target.QueryInterface(Ci.nsIImageLoadingContent).currentURI;
|
||||||
|
|
||||||
permissionmanager.add(uri, "image",
|
if (aBlock)
|
||||||
aBlock ? Ci.nsIPermissionManager.DENY_ACTION :
|
permissionmanager.add(uri, "image", Ci.nsIPermissionManager.DENY_ACTION);
|
||||||
Ci.nsIPermissionManager.ALLOW_ACTION);
|
else
|
||||||
|
permissionmanager.remove(uri.host, "image");
|
||||||
|
|
||||||
var brandBundle = document.getElementById("bundle_brand");
|
var brandBundle = document.getElementById("bundle_brand");
|
||||||
var app = brandBundle.getString("brandShortName");
|
var app = brandBundle.getString("brandShortName");
|
||||||
@ -1035,7 +1041,7 @@ nsContextMenu.prototype = {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (selectedText.length > 15)
|
if (selectedText.length > 15)
|
||||||
selectedText = selectedText.substr(0,15) + "...";
|
selectedText = selectedText.substr(0,15) + this.ellipsis;
|
||||||
|
|
||||||
// Use the current engine if the search bar is visible, the default
|
// Use the current engine if the search bar is visible, the default
|
||||||
// engine otherwise.
|
// engine otherwise.
|
||||||
|
@ -823,97 +823,87 @@ function makePreview(row)
|
|||||||
{
|
{
|
||||||
var imageTree = document.getElementById("imagetree");
|
var imageTree = document.getElementById("imagetree");
|
||||||
var item = getSelectedImage(imageTree);
|
var item = getSelectedImage(imageTree);
|
||||||
var col = imageTree.columns["image-address"];
|
var url = gImageView.data[row][COL_IMAGE_ADDRESS];
|
||||||
var url = gImageView.getCellText(row, col);
|
|
||||||
// image-bg
|
|
||||||
var isBG = gImageView.data[row][COL_IMAGE_BG];
|
var isBG = gImageView.data[row][COL_IMAGE_BG];
|
||||||
|
|
||||||
setItemValue("imageurltext", url);
|
setItemValue("imageurltext", url);
|
||||||
|
|
||||||
if (item.hasAttribute("title"))
|
var imageText;
|
||||||
setItemValue("imagetitletext", item.title);
|
if (!isBG &&
|
||||||
else
|
|
||||||
setItemValue("imagetitletext", null);
|
|
||||||
|
|
||||||
if (item.hasAttribute("longDesc"))
|
|
||||||
setItemValue("imagelongdesctext", item.longDesc);
|
|
||||||
else
|
|
||||||
setItemValue("imagelongdesctext", null);
|
|
||||||
|
|
||||||
if (item.hasAttribute("alt"))
|
|
||||||
setItemValue("imagealttext", item.alt);
|
|
||||||
else if (item instanceof HTMLImageElement || isBG)
|
|
||||||
setItemValue("imagealttext", null);
|
|
||||||
else
|
|
||||||
setItemValue("imagealttext", getValueText(item));
|
|
||||||
|
|
||||||
#ifdef MOZ_SVG
|
#ifdef MOZ_SVG
|
||||||
if (item instanceof SVGImageElement) {
|
!(item instanceof SVGImageElement) &&
|
||||||
setItemValue("imagetitletext", null);
|
|
||||||
setItemValue("imagelongdesctext", null);
|
|
||||||
setItemValue("imagealttext", null);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
!(gDocument instanceof ImageDocument)) {
|
||||||
|
imageText = item.title || item.alt;
|
||||||
|
|
||||||
|
if (!imageText && !(item instanceof HTMLImageElement))
|
||||||
|
imageText = getValueText(item);
|
||||||
|
}
|
||||||
|
setItemValue("imagetext", imageText);
|
||||||
|
|
||||||
|
setItemValue("imagelongdesctext", item.longDesc);
|
||||||
|
|
||||||
// get cache info
|
// get cache info
|
||||||
var sourceText = gBundle.getString("generalNotCached");
|
|
||||||
var cacheKey = url.replace(/#.*$/, "");
|
var cacheKey = url.replace(/#.*$/, "");
|
||||||
try {
|
try {
|
||||||
// open for READ, in non-blocking mode
|
// open for READ, in non-blocking mode
|
||||||
var cacheEntryDescriptor = httpCacheSession.openCacheEntry(cacheKey, ACCESS_READ, false);
|
var cacheEntryDescriptor = httpCacheSession.openCacheEntry(cacheKey, ACCESS_READ, false);
|
||||||
if (cacheEntryDescriptor)
|
|
||||||
switch (cacheEntryDescriptor.deviceID) {
|
|
||||||
case "disk":
|
|
||||||
sourceText = gBundle.getString("generalDiskCache");
|
|
||||||
break;
|
|
||||||
case "memory":
|
|
||||||
sourceText = gBundle.getString("generalMemoryCache");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
sourceText = cacheEntryDescriptor.deviceID;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch(ex) {
|
catch(ex) {
|
||||||
try {
|
try {
|
||||||
// open for READ, in non-blocking mode
|
// open for READ, in non-blocking mode
|
||||||
cacheEntryDescriptor = ftpCacheSession.openCacheEntry(cacheKey, ACCESS_READ, false);
|
cacheEntryDescriptor = ftpCacheSession.openCacheEntry(cacheKey, ACCESS_READ, false);
|
||||||
if (cacheEntryDescriptor)
|
|
||||||
switch (cacheEntryDescriptor.deviceID) {
|
|
||||||
case "disk":
|
|
||||||
sourceText = gBundle.getString("generalDiskCache");
|
|
||||||
break;
|
|
||||||
case "memory":
|
|
||||||
sourceText = gBundle.getString("generalMemoryCache");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
sourceText = cacheEntryDescriptor.deviceID;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch(ex2) { }
|
catch(ex2) { }
|
||||||
}
|
}
|
||||||
setItemValue("imagesourcetext", sourceText);
|
|
||||||
|
|
||||||
// find out the file size
|
// find out the file size
|
||||||
var sizeText;
|
var sizeText;
|
||||||
if (cacheEntryDescriptor) {
|
if (cacheEntryDescriptor) {
|
||||||
var pageSize = cacheEntryDescriptor.dataSize;
|
var imageSize = cacheEntryDescriptor.dataSize;
|
||||||
var kbSize = Math.round(pageSize / 1024 * 100) / 100;
|
var kbSize = Math.round(imageSize / 1024 * 100) / 100;
|
||||||
sizeText = gBundle.getFormattedString("generalSize",
|
sizeText = gBundle.getFormattedString("generalSize",
|
||||||
[formatNumber(kbSize), formatNumber(pageSize)]);
|
[formatNumber(kbSize), formatNumber(imageSize)]);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
sizeText = gBundle.getString("mediaUnknownNotCached");
|
||||||
setItemValue("imagesizetext", sizeText);
|
setItemValue("imagesizetext", sizeText);
|
||||||
|
|
||||||
var mimeType;
|
var mimeType;
|
||||||
|
var numFrames = 1;
|
||||||
if (item instanceof HTMLObjectElement ||
|
if (item instanceof HTMLObjectElement ||
|
||||||
item instanceof HTMLEmbedElement ||
|
item instanceof HTMLEmbedElement ||
|
||||||
item instanceof HTMLLinkElement)
|
item instanceof HTMLLinkElement)
|
||||||
mimeType = item.type;
|
mimeType = item.type;
|
||||||
if (!mimeType)
|
|
||||||
mimeType = getContentTypeFromImgRequest(item) ||
|
|
||||||
getContentTypeFromHeaders(cacheEntryDescriptor);
|
|
||||||
|
|
||||||
|
if (!mimeType && item instanceof nsIImageLoadingContent) {
|
||||||
|
var imageRequest = item.getRequest(nsIImageLoadingContent.CURRENT_REQUEST);
|
||||||
|
if (imageRequest) {
|
||||||
|
mimeType = imageRequest.mimeType;
|
||||||
|
var image = imageRequest.image;
|
||||||
|
if (image)
|
||||||
|
numFrames = image.numFrames;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!mimeType)
|
||||||
|
mimeType = getContentTypeFromHeaders(cacheEntryDescriptor);
|
||||||
|
|
||||||
|
if (mimeType) {
|
||||||
|
// We found the type, try to display it nicely
|
||||||
|
var imageMimeType = /^image\/(.*)/.exec(mimeType);
|
||||||
|
if (imageMimeType) {
|
||||||
|
mimeType = imageMimeType[1].toUpperCase();
|
||||||
|
if (numFrames > 1)
|
||||||
|
mimeType = gBundle.getFormattedString("mediaAnimatedImageType",
|
||||||
|
[mimeType, numFrames]);
|
||||||
|
else
|
||||||
|
mimeType = gBundle.getFormattedString("mediaImageType", [mimeType]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// We couldn't find the type, fall back to the value in the treeview
|
||||||
|
mimeType = gImageView.data[row][COL_IMAGE_TYPE];
|
||||||
|
}
|
||||||
setItemValue("imagetypetext", mimeType);
|
setItemValue("imagetypetext", mimeType);
|
||||||
|
|
||||||
var imageContainer = document.getElementById("theimagecontainer");
|
var imageContainer = document.getElementById("theimagecontainer");
|
||||||
@ -974,18 +964,21 @@ function makePreview(row)
|
|||||||
}
|
}
|
||||||
|
|
||||||
var imageSize = "";
|
var imageSize = "";
|
||||||
if (url)
|
if (url) {
|
||||||
imageSize = gBundle.getFormattedString("mediaSize",
|
if (width != physWidth || height != physHeight) {
|
||||||
[formatNumber(width),
|
imageSize = gBundle.getFormattedString("mediaDimensionsScaled",
|
||||||
formatNumber(height)]);
|
[formatNumber(physWidth),
|
||||||
setItemValue("imageSize", imageSize);
|
formatNumber(physHeight),
|
||||||
|
formatNumber(width),
|
||||||
var physSize = "";
|
formatNumber(height)]);
|
||||||
if (width != physWidth || height != physHeight)
|
}
|
||||||
physSize = gBundle.getFormattedString("mediaSize",
|
else {
|
||||||
[formatNumber(physWidth),
|
imageSize = gBundle.getFormattedString("mediaDimensions",
|
||||||
formatNumber(physHeight)]);
|
[formatNumber(width),
|
||||||
setItemValue("physSize", physSize);
|
formatNumber(height)]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setItemValue("imagedimensiontext", imageSize);
|
||||||
|
|
||||||
makeBlockImage(url);
|
makeBlockImage(url);
|
||||||
|
|
||||||
@ -1047,21 +1040,6 @@ function getContentTypeFromHeaders(cacheEntryDescriptor)
|
|||||||
.exec(cacheEntryDescriptor.getMetaDataElement("response-head")))[1];
|
.exec(cacheEntryDescriptor.getMetaDataElement("response-head")))[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
function getContentTypeFromImgRequest(item)
|
|
||||||
{
|
|
||||||
var httpRequest;
|
|
||||||
|
|
||||||
try {
|
|
||||||
var imageItem = item.QueryInterface(nsIImageLoadingContent);
|
|
||||||
var imageRequest = imageItem.getRequest(nsIImageLoadingContent.CURRENT_REQUEST);
|
|
||||||
if (imageRequest)
|
|
||||||
httpRequest = imageRequest.mimeType;
|
|
||||||
}
|
|
||||||
catch (ex) { } // This never happened. ;)
|
|
||||||
|
|
||||||
return httpRequest;
|
|
||||||
}
|
|
||||||
|
|
||||||
//******** Other Misc Stuff
|
//******** Other Misc Stuff
|
||||||
// Modified from the Links Panel v2.3, http://segment7.net/mozilla/links/links.html
|
// Modified from the Links Panel v2.3, http://segment7.net/mozilla/links/links.html
|
||||||
// parse a node to extract the contents of the node
|
// parse a node to extract the contents of the node
|
||||||
|
@ -232,57 +232,42 @@
|
|||||||
</tree>
|
</tree>
|
||||||
<splitter orient="vertical" id="mediaSplitter"/>
|
<splitter orient="vertical" id="mediaSplitter"/>
|
||||||
<vbox flex="1" id="mediaPreviewBox" collapsed="true">
|
<vbox flex="1" id="mediaPreviewBox" collapsed="true">
|
||||||
<grid>
|
<grid id="mediaGrid">
|
||||||
<columns>
|
<columns>
|
||||||
<column/>
|
<column id="mediaLabelColumn"/>
|
||||||
<column class="gridSeparator"/>
|
<column class="gridSeparator"/>
|
||||||
<column flex="1"/>
|
<column flex="1"/>
|
||||||
</columns>
|
</columns>
|
||||||
<rows>
|
<rows>
|
||||||
<row>
|
<row>
|
||||||
<label control="imageurltext" value="&mediaURL;"/>
|
<label control="imageurltext" value="&mediaLocation;"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<textbox readonly="true" id="imageurltext"/>
|
<textbox readonly="true" id="imageurltext"/>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
|
||||||
<label control="imagetitletext" value="&mediaTitle;"/>
|
|
||||||
<separator/>
|
|
||||||
<textbox readonly="true" id="imagetitletext"/>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<label control="imagealttext" value="&mediaAlt;"/>
|
|
||||||
<separator/>
|
|
||||||
<textbox readonly="true" id="imagealttext"/>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<label control="imagelongdesctext" value="&mediaLongdesc;"/>
|
|
||||||
<separator/>
|
|
||||||
<textbox readonly="true" id="imagelongdesctext"/>
|
|
||||||
</row>
|
|
||||||
<row>
|
<row>
|
||||||
<label control="imagetypetext" value="&generalType;"/>
|
<label control="imagetypetext" value="&generalType;"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<textbox readonly="true" id="imagetypetext"/>
|
<textbox readonly="true" id="imagetypetext"/>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
|
||||||
<label control="imagesourcetext" value="&generalSource;"/>
|
|
||||||
<separator/>
|
|
||||||
<textbox readonly="true" id="imagesourcetext"/>
|
|
||||||
</row>
|
|
||||||
<row>
|
<row>
|
||||||
<label control="imagesizetext" value="&generalSize;"/>
|
<label control="imagesizetext" value="&generalSize;"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<textbox readonly="true" id="imagesizetext"/>
|
<textbox readonly="true" id="imagesizetext"/>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label control="imageSize" value="&mediaDimensions;"/>
|
<label control="imagedimensiontext" value="&mediaDimension;"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<textbox readonly="true" id="imageSize"/>
|
<textbox readonly="true" id="imagedimensiontext"/>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label control="physSize" value="&mediaPhysDimensions;"/>
|
<label control="imagetext" value="&mediaText;"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<textbox readonly="true" id="physSize"/>
|
<textbox readonly="true" id="imagetext"/>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<label control="imagelongdesctext" value="&mediaLongdesc;"/>
|
||||||
|
<separator/>
|
||||||
|
<textbox readonly="true" id="imagelongdesctext"/>
|
||||||
</row>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
|
@ -123,6 +123,28 @@ Sanitizer.prototype = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
offlineApps: {
|
||||||
|
clear: function ()
|
||||||
|
{
|
||||||
|
const Cc = Components.classes;
|
||||||
|
const Ci = Components.interfaces;
|
||||||
|
var cacheService = Cc["@mozilla.org/network/cache-service;1"].
|
||||||
|
getService(Ci.nsICacheService);
|
||||||
|
try {
|
||||||
|
cacheService.evictEntries(Ci.nsICache.STORE_OFFLINE);
|
||||||
|
} catch(er) {}
|
||||||
|
|
||||||
|
var storageManagerService = Cc["@mozilla.org/dom/storagemanager;1"].
|
||||||
|
getService(Ci.nsIDOMStorageManager);
|
||||||
|
storageManagerService.clearOfflineApps();
|
||||||
|
},
|
||||||
|
|
||||||
|
get canClear()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
history: {
|
history: {
|
||||||
clear: function ()
|
clear: function ()
|
||||||
{
|
{
|
||||||
|
@ -124,6 +124,7 @@
|
|||||||
<preference id="privacy.item.downloads" name="privacy.item.downloads" type="bool" readonly="true"/>
|
<preference id="privacy.item.downloads" name="privacy.item.downloads" type="bool" readonly="true"/>
|
||||||
<preference id="privacy.item.cookies" name="privacy.item.cookies" type="bool" readonly="true"/>
|
<preference id="privacy.item.cookies" name="privacy.item.cookies" type="bool" readonly="true"/>
|
||||||
<preference id="privacy.item.cache" name="privacy.item.cache" type="bool" readonly="true"/>
|
<preference id="privacy.item.cache" name="privacy.item.cache" type="bool" readonly="true"/>
|
||||||
|
<preference id="privacy.item.offlineApps" name="privacy.item.offlineApps" type="bool"/>
|
||||||
<preference id="privacy.item.sessions" name="privacy.item.sessions" type="bool" readonly="true"/>
|
<preference id="privacy.item.sessions" name="privacy.item.sessions" type="bool" readonly="true"/>
|
||||||
</preferences>
|
</preferences>
|
||||||
|
|
||||||
@ -149,6 +150,10 @@
|
|||||||
accesskey="&itemCookies.accesskey;"
|
accesskey="&itemCookies.accesskey;"
|
||||||
preference="privacy.item.cookies"
|
preference="privacy.item.cookies"
|
||||||
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
|
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
|
||||||
|
<checkbox label="&itemOfflineApps.label;"
|
||||||
|
accesskey="&itemOfflineApps.accesskey;"
|
||||||
|
preference="privacy.item.offlineApps"
|
||||||
|
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
|
||||||
<checkbox label="&itemPasswords.label;"
|
<checkbox label="&itemPasswords.label;"
|
||||||
accesskey="&itemPasswords.accesskey;"
|
accesskey="&itemPasswords.accesskey;"
|
||||||
preference="privacy.item.passwords"
|
preference="privacy.item.passwords"
|
||||||
|
@ -92,8 +92,8 @@
|
|||||||
oncommand="var tabbrowser = this.parentNode.parentNode.parentNode.parentNode;
|
oncommand="var tabbrowser = this.parentNode.parentNode.parentNode.parentNode;
|
||||||
tabbrowser.removeAllTabsBut(tabbrowser.mContextTab);"/>
|
tabbrowser.removeAllTabsBut(tabbrowser.mContextTab);"/>
|
||||||
<xul:menuseparator/>
|
<xul:menuseparator/>
|
||||||
<xul:menuitem label="&bookmarkCurTab.label;"
|
<xul:menuitem label="&bookmarkThisTab.label;"
|
||||||
accesskey="&bookmarkCurTab.accesskey;"
|
accesskey="&bookmarkThisTab.accesskey;"
|
||||||
oncommand="BookmarkThisTab();"/>
|
oncommand="BookmarkThisTab();"/>
|
||||||
<xul:menuitem label="&bookmarkAllTabs.label;"
|
<xul:menuitem label="&bookmarkAllTabs.label;"
|
||||||
accesskey="&bookmarkAllTabs.accesskey;"
|
accesskey="&bookmarkAllTabs.accesskey;"
|
||||||
@ -2128,9 +2128,10 @@
|
|||||||
<parameter name="aFlags"/>
|
<parameter name="aFlags"/>
|
||||||
<parameter name="aReferrerURI"/>
|
<parameter name="aReferrerURI"/>
|
||||||
<parameter name="aCharset"/>
|
<parameter name="aCharset"/>
|
||||||
|
<parameter name="aPostData"/>
|
||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
return this.mCurrentBrowser.loadURIWithFlags(aURI, aFlags, aReferrerURI, aCharset);
|
return this.mCurrentBrowser.loadURIWithFlags(aURI, aFlags, aReferrerURI, aCharset, aPostData);
|
||||||
]]>
|
]]>
|
||||||
</body>
|
</body>
|
||||||
</method>
|
</method>
|
||||||
|
@ -13,6 +13,7 @@ browser.jar:
|
|||||||
* content/browser/aboutDialog.xul (content/aboutDialog.xul)
|
* content/browser/aboutDialog.xul (content/aboutDialog.xul)
|
||||||
* content/browser/aboutDialog.js (content/aboutDialog.js)
|
* content/browser/aboutDialog.js (content/aboutDialog.js)
|
||||||
content/browser/aboutDialog.css (content/aboutDialog.css)
|
content/browser/aboutDialog.css (content/aboutDialog.css)
|
||||||
|
* content/browser/bindings.xml (content/bindings.xml)
|
||||||
* content/browser/browser.css (content/browser.css)
|
* content/browser/browser.css (content/browser.css)
|
||||||
* content/browser/browser.js (content/browser.js)
|
* content/browser/browser.js (content/browser.js)
|
||||||
* content/browser/browser.xul (content/browser.xul)
|
* content/browser/browser.xul (content/browser.xul)
|
||||||
|
@ -20,7 +20,7 @@ PREF_JS_EXPORTS = $(srcdir)/pref/firefox-branding.js
|
|||||||
include $(topsrcdir)/config/rules.mk
|
include $(topsrcdir)/config/rules.mk
|
||||||
|
|
||||||
BROWSER_APP_FILES = \
|
BROWSER_APP_FILES = \
|
||||||
default.xpm \
|
default16.png \
|
||||||
mozicon128.png \
|
mozicon128.png \
|
||||||
mozicon16.xpm \
|
mozicon16.xpm \
|
||||||
mozicon50.xpm \
|
mozicon50.xpm \
|
||||||
|
File diff suppressed because it is too large
Load Diff
BIN
browser/branding/unofficial/default16.png
Normal file
BIN
browser/branding/unofficial/default16.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 744 B |
@ -509,7 +509,7 @@ BrowserGlue.prototype = {
|
|||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
prefBranch.setBoolPref("browser.places.createdSmartBookmarks", true);
|
prefBranch.setBoolPref("browser.places.createdSmartBookmarks", true);
|
||||||
prefBranch.savePrefFile(null);
|
prefBranch.QueryInterface(Ci.nsIPrefService).savePrefFile(null);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -425,6 +425,7 @@ PlacesController.prototype = {
|
|||||||
nodeData["dynamiccontainer"] = true;
|
nodeData["dynamiccontainer"] = true;
|
||||||
break;
|
break;
|
||||||
case Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER:
|
case Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER:
|
||||||
|
case Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER_SHORTCUT:
|
||||||
nodeData["folder"] = true;
|
nodeData["folder"] = true;
|
||||||
break;
|
break;
|
||||||
case Ci.nsINavHistoryResultNode.RESULT_TYPE_HOST:
|
case Ci.nsINavHistoryResultNode.RESULT_TYPE_HOST:
|
||||||
|
@ -438,14 +438,14 @@ var gEditItemOverlay = {
|
|||||||
if (tags.length > 0 || currentTags.length > 0) {
|
if (tags.length > 0 || currentTags.length > 0) {
|
||||||
var tagsToRemove = [];
|
var tagsToRemove = [];
|
||||||
var tagsToAdd = [];
|
var tagsToAdd = [];
|
||||||
var t;
|
var i;
|
||||||
for each (t in currentTags) {
|
for (i = 0; i < currentTags.length; i++) {
|
||||||
if (tags.indexOf(t) == -1)
|
if (tags.indexOf(currentTags[i]) == -1)
|
||||||
tagsToRemove.push(t);
|
tagsToRemove.push(currentTags[i]);
|
||||||
}
|
}
|
||||||
for each (t in tags) {
|
for (i = 0; i < tags.length; i++) {
|
||||||
if (currentTags.indexOf(t) == -1)
|
if (currentTags.indexOf(tags[i]) == -1)
|
||||||
tagsToAdd.push(t);
|
tagsToAdd.push(tags[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tagsToAdd.length > 0)
|
if (tagsToAdd.length > 0)
|
||||||
@ -643,7 +643,8 @@ var gEditItemOverlay = {
|
|||||||
// Update folder-tree selection
|
// Update folder-tree selection
|
||||||
if (!this._folderTree.collapsed) {
|
if (!this._folderTree.collapsed) {
|
||||||
var selectedNode = this._folderTree.selectedNode;
|
var selectedNode = this._folderTree.selectedNode;
|
||||||
if (!selectedNode || selectedNode.itemId != container)
|
if (!selectedNode ||
|
||||||
|
PlacesUtils.getConcreteItemId(selectedNode) != container)
|
||||||
this._folderTree.selectItems([container]);
|
this._folderTree.selectItems([container]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -653,7 +654,7 @@ var gEditItemOverlay = {
|
|||||||
if (!selectedNode)
|
if (!selectedNode)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var folderId = selectedNode.itemId;
|
var folderId = PlacesUtils.getConcreteItemId(selectedNode);
|
||||||
if (this._getFolderIdFromMenuList() == folderId)
|
if (this._getFolderIdFromMenuList() == folderId)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -682,7 +683,8 @@ var gEditItemOverlay = {
|
|||||||
|
|
||||||
var tagsInField = this._getTagsArrayFromTagField();
|
var tagsInField = this._getTagsArrayFromTagField();
|
||||||
var allTags = PlacesUtils.tagging.allTags;
|
var allTags = PlacesUtils.tagging.allTags;
|
||||||
for each (var tag in allTags) {
|
for (var i = 0; i < allTags.length; i++) {
|
||||||
|
var tag = allTags[i];
|
||||||
var elt = document.createElement("listitem");
|
var elt = document.createElement("listitem");
|
||||||
elt.setAttribute("type", "checkbox");
|
elt.setAttribute("type", "checkbox");
|
||||||
elt.setAttribute("label", tag);
|
elt.setAttribute("label", tag);
|
||||||
|
@ -511,17 +511,17 @@
|
|||||||
var index = -1;
|
var index = -1;
|
||||||
var folderId = 0;
|
var folderId = 0;
|
||||||
if (PlacesUtils.nodeIsFolder(this._resultNode))
|
if (PlacesUtils.nodeIsFolder(this._resultNode))
|
||||||
folderId = this._resultNode.itemId;
|
folderId = PlacesUtils.getConcreteItemId(this._resultNode);
|
||||||
|
|
||||||
if (this.hasSelection) {
|
if (this.hasSelection) {
|
||||||
if (PlacesUtils.nodeIsFolder(this.selectedNode)) {
|
if (PlacesUtils.nodeIsFolder(this.selectedNode)) {
|
||||||
// If there is a folder selected, the insertion point is the
|
// If there is a folder selected, the insertion point is the
|
||||||
// end of the folder.
|
// end of the folder.
|
||||||
folderId = this.selectedNode.itemId;
|
folderId = PlacesUtils.getConcreteItemId(this.selectedNode);
|
||||||
} else {
|
} else {
|
||||||
// If there is another type of node selected, the insertion point
|
// If there is another type of node selected, the insertion point
|
||||||
// is after that node.
|
// is after that node.
|
||||||
folderId = this.selectedNode.parent.itemId;
|
folderId = PlacesUtils.getConcreteItemId(this.selectedNode.parent);
|
||||||
index = PlacesUtils.getIndexOfNode(this.selectedNode)
|
index = PlacesUtils.getIndexOfNode(this.selectedNode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -395,17 +395,17 @@
|
|||||||
|
|
||||||
// By default, the insertion point is at the top level, at the end.
|
// By default, the insertion point is at the top level, at the end.
|
||||||
var index = -1;
|
var index = -1;
|
||||||
var folderId = this._result.root.itemId;
|
var folderId = PlacesUtils.getConcreteItemId(this._result.root);
|
||||||
|
|
||||||
if (this.hasSelection) {
|
if (this.hasSelection) {
|
||||||
if (PlacesUtils.nodeIsFolder(this.selectedNode)) {
|
if (PlacesUtils.nodeIsFolder(this.selectedNode)) {
|
||||||
// If there is a folder selected, the insertion point is the
|
// If there is a folder selected, the insertion point is the
|
||||||
// end of the folder.
|
// end of the folder.
|
||||||
folderId = this.selectedNode.itemId;
|
folderId = PlacesUtils.getConcreteItemId(this.selectedNode);
|
||||||
} else {
|
} else {
|
||||||
// If there is another type of node selected, the insertion point
|
// If there is another type of node selected, the insertion point
|
||||||
// is after that node.
|
// is after that node.
|
||||||
index = PlacesUtils.getIndexOfNode(this.selectedNode)
|
index = PlacesUtils.getIndexOfNode(this.selectedNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this._cachedInsertionPoint = new InsertionPoint(folderId, index, 1);
|
this._cachedInsertionPoint = new InsertionPoint(folderId, index, 1);
|
||||||
@ -756,13 +756,17 @@
|
|||||||
// 50%, drop into the folder. If it's past that, drop to the right.
|
// 50%, drop into the folder. If it's past that, drop to the right.
|
||||||
if (event.clientX < xulNode.boxObject.x + (xulNode.boxObject.width * 0.25)) {
|
if (event.clientX < xulNode.boxObject.x + (xulNode.boxObject.width * 0.25)) {
|
||||||
// Drop to the left of this folder.
|
// Drop to the left of this folder.
|
||||||
dropPoint.ip = new InsertionPoint(result.root.itemId, i, -1);
|
dropPoint.ip =
|
||||||
|
new InsertionPoint(PlacesUtils.getConcreteItemId(result.root),
|
||||||
|
i, -1);
|
||||||
dropPoint.beforeIndex = i;
|
dropPoint.beforeIndex = i;
|
||||||
return dropPoint;
|
return dropPoint;
|
||||||
}
|
}
|
||||||
else if (event.clientX < xulNode.boxObject.x + (xulNode.boxObject.width * 0.75)) {
|
else if (event.clientX < xulNode.boxObject.x + (xulNode.boxObject.width * 0.75)) {
|
||||||
// Drop inside this folder.
|
// Drop inside this folder.
|
||||||
dropPoint.ip = new InsertionPoint(xulNode.node.itemId, -1, 1);
|
dropPoint.ip =
|
||||||
|
new InsertionPoint(PlacesUtils.getConcreteItemId(xulNode.node),
|
||||||
|
-1, 1);
|
||||||
dropPoint.beforeIndex = i;
|
dropPoint.beforeIndex = i;
|
||||||
dropPoint.folderNode = xulNode;
|
dropPoint.folderNode = xulNode;
|
||||||
return dropPoint;
|
return dropPoint;
|
||||||
@ -772,14 +776,18 @@
|
|||||||
// drop to the left of the folder. If it's right, drop to the right.
|
// drop to the left of the folder. If it's right, drop to the right.
|
||||||
if (event.clientX < xulNode.boxObject.x + (xulNode.boxObject.width / 2)) {
|
if (event.clientX < xulNode.boxObject.x + (xulNode.boxObject.width / 2)) {
|
||||||
// Drop to the left of this bookmark.
|
// Drop to the left of this bookmark.
|
||||||
dropPoint.ip = new InsertionPoint(result.root.itemId, i, -1);
|
dropPoint.ip =
|
||||||
|
new InsertionPoint(PlacesUtils.getConcreteItemId(result.root),
|
||||||
|
i, -1);
|
||||||
dropPoint.beforeIndex = i;
|
dropPoint.beforeIndex = i;
|
||||||
return dropPoint;
|
return dropPoint;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Should drop to the right of the last node.
|
// Should drop to the right of the last node.
|
||||||
dropPoint.ip = new InsertionPoint(result.root.itemId, -1, 1);
|
dropPoint.ip =
|
||||||
|
new InsertionPoint(PlacesUtils.getConcreteItemId(result.root),
|
||||||
|
-1, 1);
|
||||||
dropPoint.beforeIndex = -1;
|
dropPoint.beforeIndex = -1;
|
||||||
return dropPoint;
|
return dropPoint;
|
||||||
},
|
},
|
||||||
|
@ -512,10 +512,11 @@
|
|||||||
//
|
//
|
||||||
// If the sole selection is the bookmarks toolbar folder, we insert
|
// If the sole selection is the bookmarks toolbar folder, we insert
|
||||||
// into it even if it is not opened
|
// into it even if it is not opened
|
||||||
|
var itemId =
|
||||||
|
PlacesUtils.getConcreteItemId(resultView.nodeForTreeIndex(max.value));
|
||||||
if (this.hasSingleSelection && resultView.isContainer(max.value) &&
|
if (this.hasSingleSelection && resultView.isContainer(max.value) &&
|
||||||
(resultView.isContainerOpen(max.value) ||
|
(resultView.isContainerOpen(max.value) ||
|
||||||
resultView.nodeForTreeIndex(max.value)
|
itemId == PlacesUtils.bookmarksMenuFolderId))
|
||||||
.itemId == PlacesUtils.bookmarksMenuFolderId))
|
|
||||||
orientation = NHRVO.DROP_ON;
|
orientation = NHRVO.DROP_ON;
|
||||||
|
|
||||||
this._cachedInsertionPoint =
|
this._cachedInsertionPoint =
|
||||||
@ -528,10 +529,8 @@
|
|||||||
<parameter name="aContainer"/>
|
<parameter name="aContainer"/>
|
||||||
<body><![CDATA[
|
<body><![CDATA[
|
||||||
// Disallow insertion of items under readonly folders
|
// Disallow insertion of items under readonly folders
|
||||||
// Disallow insertion of items under the places root
|
|
||||||
return (!PlacesUtils.nodeIsFolder(aContainer) ||
|
return (!PlacesUtils.nodeIsFolder(aContainer) ||
|
||||||
PlacesUtils.nodeIsReadOnly(aContainer) ||
|
PlacesUtils.nodeIsReadOnly(aContainer));
|
||||||
aContainer.itemId == PlacesUtils.placesRootId);
|
|
||||||
]]></body>
|
]]></body>
|
||||||
</method>
|
</method>
|
||||||
|
|
||||||
@ -581,7 +580,8 @@
|
|||||||
if (this._disallowInsertion(container))
|
if (this._disallowInsertion(container))
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
return new InsertionPoint(container.itemId, index, orientation);
|
return new InsertionPoint(PlacesUtils.getConcreteItemId(container),
|
||||||
|
index, orientation);
|
||||||
]]></body>
|
]]></body>
|
||||||
</method>
|
</method>
|
||||||
|
|
||||||
@ -627,7 +627,13 @@
|
|||||||
function findNodes(node) {
|
function findNodes(node) {
|
||||||
var foundOne = false;
|
var foundOne = false;
|
||||||
// See if node matches an ID we wanted; add to results.
|
// See if node matches an ID we wanted; add to results.
|
||||||
|
// For simple folder queries, check both itemId and the concrete
|
||||||
|
// item id.
|
||||||
var index = ids.indexOf(node.itemId);
|
var index = ids.indexOf(node.itemId);
|
||||||
|
if (index == -1 &&
|
||||||
|
node.type == Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER_SHORTCUT)
|
||||||
|
index = ids.indexOf(asQuery(node).folderItemId);
|
||||||
|
|
||||||
if (index != -1) {
|
if (index != -1) {
|
||||||
nodes.push(node);
|
nodes.push(node);
|
||||||
foundOne = true;
|
foundOne = true;
|
||||||
|
@ -375,16 +375,17 @@ PlacesTreeView.prototype = {
|
|||||||
|
|
||||||
// restore selection
|
// restore selection
|
||||||
if (previouslySelectedNodes.length > 0) {
|
if (previouslySelectedNodes.length > 0) {
|
||||||
for each (var nodeInfo in previouslySelectedNodes) {
|
for (var i = 0; i < previouslySelectedNodes.length; i++) {
|
||||||
|
var nodeInfo = previouslySelectedNodes[i];
|
||||||
var index = nodeInfo.node.viewIndex;
|
var index = nodeInfo.node.viewIndex;
|
||||||
|
|
||||||
// if the same node was used (happens on sorting-changes),
|
// if the same node was used (happens on sorting-changes),
|
||||||
// just use viewIndex
|
// just use viewIndex
|
||||||
if (index == -1) { // otherwise, try to find an equal node
|
if (index == -1) { // otherwise, try to find an equal node
|
||||||
var itemId = nodeInfo.node.itemId;
|
var itemId = PlacesUtils.getConcreteItemId(nodeInfo.node);
|
||||||
if (itemId != 1) { // bookmark-nodes in queries case
|
if (itemId != 1) { // bookmark-nodes in queries case
|
||||||
for (i=0; i < newElements.length && index == -1; i++) {
|
for (i=0; i < newElements.length && index == -1; i++) {
|
||||||
if (newElements[i].itemId == itemId)
|
if (PlacesUtils.getConcreteItemId(newElements[i]) == itemId)
|
||||||
index = newElements[i].viewIndex;
|
index = newElements[i].viewIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -592,10 +593,13 @@ PlacesTreeView.prototype = {
|
|||||||
// At the end of the child list without finding a visible sibling: This
|
// At the end of the child list without finding a visible sibling: This
|
||||||
// is a little harder because we don't know how many rows the last item
|
// is a little harder because we don't know how many rows the last item
|
||||||
// in our list takes up (it could be a container with many children).
|
// in our list takes up (it could be a container with many children).
|
||||||
var lastRowCount =
|
var prevChild = aParent.getChild(aNewIndex - 1);
|
||||||
this._countVisibleRowsForItem(aParent.getChild(aNewIndex - 1));
|
newViewIndex = prevChild.viewIndex + this._countVisibleRowsForItem(prevChild);
|
||||||
newViewIndex =
|
// If we were in the same parent and we are swapping the order, we need to adjust
|
||||||
aParent.getChild(aNewIndex - 1).viewIndex + lastRowCount;
|
if (prevChild.parent == aItem.parent &&
|
||||||
|
aItem.viewIndex != -1 && // view index may not be set
|
||||||
|
prevChild.viewIndex > aItem.viewIndex)
|
||||||
|
newViewIndex--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -685,7 +689,8 @@ PlacesTreeView.prototype = {
|
|||||||
if (selection.getRangeCount() == 1) {
|
if (selection.getRangeCount() == 1) {
|
||||||
var min = { }, max = { };
|
var min = { }, max = { };
|
||||||
selection.getRangeAt(0, min, max);
|
selection.getRangeAt(0, min, max);
|
||||||
if (min.value == max.value)
|
if (min.value == max.value &&
|
||||||
|
this.nodeForTreeIndex(min.value) == aItem)
|
||||||
selectNext = true;
|
selectNext = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -779,7 +784,8 @@ PlacesTreeView.prototype = {
|
|||||||
|
|
||||||
// restore selection
|
// restore selection
|
||||||
if (nodesToSelect.length > 0) {
|
if (nodesToSelect.length > 0) {
|
||||||
for each (var node in nodesToSelect) {
|
for (var i = 0; i < nodesToSelect.length; i++) {
|
||||||
|
var node = nodesToSelect[i];
|
||||||
var index = node.viewIndex;
|
var index = node.viewIndex;
|
||||||
selection.rangedSelect(index, index, true);
|
selection.rangedSelect(index, index, true);
|
||||||
}
|
}
|
||||||
@ -1009,25 +1015,27 @@ PlacesTreeView.prototype = {
|
|||||||
|
|
||||||
var node = this._visibleElements[aRow];
|
var node = this._visibleElements[aRow];
|
||||||
|
|
||||||
// To disable the tree gestures for containers (e.g. double-click to open)
|
var nodeType = node.type;
|
||||||
// we don't mark container nodes as such in flat list mode. The container
|
if (PlacesUtils.containerTypes.indexOf(nodeType) != -1) {
|
||||||
// appearance is desired though, so we add the container atom manually.
|
// To disable the tree gestures for containers (e.g. double-click to open)
|
||||||
if (this._flatList && PlacesUtils.nodeIsContainer(node))
|
// we don't mark container nodes as such in flat list mode. The container
|
||||||
aProperties.AppendElement(this._getAtomFor("container"));
|
// appearance is desired though, so we add the container atom manually.
|
||||||
|
if (this._flatList)
|
||||||
if (PlacesUtils.nodeIsSeparator(node))
|
aProperties.AppendElement(this._getAtomFor("container"));
|
||||||
aProperties.AppendElement(this._getAtomFor("separator"));
|
if (nodeType == Ci.nsINavHistoryResultNode.RESULT_TYPE_QUERY)
|
||||||
else if (node.type == Ci.nsINavHistoryResultNode.RESULT_TYPE_QUERY)
|
aProperties.AppendElement(this._getAtomFor("query"));
|
||||||
aProperties.AppendElement(this._getAtomFor("query"));
|
else if (nodeType == Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER ||
|
||||||
else if (node.type == Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER) {
|
nodeType == Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER_SHORTCUT) {
|
||||||
if (PlacesUtils.annotations.itemHasAnnotation(node.itemId,
|
if (PlacesUtils.annotations.itemHasAnnotation(node.itemId,
|
||||||
LMANNO_FEEDURI))
|
LMANNO_FEEDURI))
|
||||||
aProperties.AppendElement(this._getAtomFor("livemark"));
|
aProperties.AppendElement(this._getAtomFor("livemark"));
|
||||||
else if (PlacesUtils.bookmarks.getFolderIdForItem(node.itemId) ==
|
else if (PlacesUtils.bookmarks.getFolderIdForItem(node.itemId) ==
|
||||||
PlacesUtils.tagsFolderId) {
|
PlacesUtils.tagsFolderId)
|
||||||
aProperties.AppendElement(this._getAtomFor("tagContainer"));
|
aProperties.AppendElement(this._getAtomFor("tagContainer"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (nodeType == Ci.nsINavHistoryResultNode.RESULT_TYPE_SEPARATOR)
|
||||||
|
aProperties.AppendElement(this._getAtomFor("separator"));
|
||||||
},
|
},
|
||||||
|
|
||||||
getColumnProperties: function(aColumn, aProperties) { },
|
getColumnProperties: function(aColumn, aProperties) { },
|
||||||
|
@ -253,7 +253,8 @@ var PlacesUtils = {
|
|||||||
*/
|
*/
|
||||||
nodeIsFolder: function PU_nodeIsFolder(aNode) {
|
nodeIsFolder: function PU_nodeIsFolder(aNode) {
|
||||||
NS_ASSERT(aNode, "null node");
|
NS_ASSERT(aNode, "null node");
|
||||||
return (aNode.type == Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER);
|
return (aNode.type == Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER ||
|
||||||
|
aNode.type == Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER_SHORTCUT);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -331,7 +332,7 @@ var PlacesUtils = {
|
|||||||
NS_ASSERT(aNode, "null node");
|
NS_ASSERT(aNode, "null node");
|
||||||
|
|
||||||
if (this.nodeIsFolder(aNode))
|
if (this.nodeIsFolder(aNode))
|
||||||
return this.bookmarks.getFolderReadonly(aNode.itemId);
|
return this.bookmarks.getFolderReadonly(asQuery(aNode).folderItemId);
|
||||||
if (this.nodeIsQuery(aNode))
|
if (this.nodeIsQuery(aNode))
|
||||||
return asQuery(aNode).childrenReadOnly;
|
return asQuery(aNode).childrenReadOnly;
|
||||||
return false;
|
return false;
|
||||||
@ -355,6 +356,7 @@ var PlacesUtils = {
|
|||||||
* @returns true if the node is a container item, false otherwise
|
* @returns true if the node is a container item, false otherwise
|
||||||
*/
|
*/
|
||||||
containerTypes: [Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER,
|
containerTypes: [Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER,
|
||||||
|
Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER_SHORTCUT,
|
||||||
Ci.nsINavHistoryResultNode.RESULT_TYPE_QUERY,
|
Ci.nsINavHistoryResultNode.RESULT_TYPE_QUERY,
|
||||||
Ci.nsINavHistoryResultNode.RESULT_TYPE_HOST,
|
Ci.nsINavHistoryResultNode.RESULT_TYPE_HOST,
|
||||||
Ci.nsINavHistoryResultNode.RESULT_TYPE_DAY,
|
Ci.nsINavHistoryResultNode.RESULT_TYPE_DAY,
|
||||||
@ -414,7 +416,17 @@ var PlacesUtils = {
|
|||||||
NS_ASSERT(aNode, "null node");
|
NS_ASSERT(aNode, "null node");
|
||||||
|
|
||||||
return this.nodeIsFolder(aNode) &&
|
return this.nodeIsFolder(aNode) &&
|
||||||
this.bookmarks.getFolderReadonly(aNode.itemId);
|
this.bookmarks.getFolderReadonly(asQuery(aNode).folderItemId);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the concrete item-id for the given node. Generally, this is just
|
||||||
|
* node.itemId, but for folder-shortcuts that's node.folderItemId.
|
||||||
|
*/
|
||||||
|
getConcreteItemId: function PU_getConcreteItemId(aNode) {
|
||||||
|
if (aNode.type == Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER_SHORTCUT)
|
||||||
|
return asQuery(aNode).folderItemId;
|
||||||
|
return aNode.itemId;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1566,8 +1578,9 @@ var PlacesUtils = {
|
|||||||
getMostRecentBookmarkForURI:
|
getMostRecentBookmarkForURI:
|
||||||
function PU_getMostRecentBookmarkForURI(aURI) {
|
function PU_getMostRecentBookmarkForURI(aURI) {
|
||||||
var bmkIds = this.bookmarks.getBookmarkIdsForURI(aURI, {});
|
var bmkIds = this.bookmarks.getBookmarkIdsForURI(aURI, {});
|
||||||
for each (var bk in bmkIds) {
|
for (var i = 0; i < bmkIds.length; i++) {
|
||||||
// Find the first folder which isn't a tag container
|
// Find the first folder which isn't a tag container
|
||||||
|
var bk = bmkIds[i];
|
||||||
var parent = this.bookmarks.getFolderIdForItem(bk);
|
var parent = this.bookmarks.getFolderIdForItem(bk);
|
||||||
if (parent == this.unfiledBookmarksFolderId)
|
if (parent == this.unfiledBookmarksFolderId)
|
||||||
return bk;
|
return bk;
|
||||||
@ -1688,7 +1701,8 @@ var PlacesUtils = {
|
|||||||
*/
|
*/
|
||||||
_openTabset: function PU__openTabset(aItemsToOpen, aEvent) {
|
_openTabset: function PU__openTabset(aItemsToOpen, aEvent) {
|
||||||
var urls = [];
|
var urls = [];
|
||||||
for each (var item in aItemsToOpen) {
|
for (var i = 0; i < aItemsToOpen.length; i++) {
|
||||||
|
var item = aItemsToOpen[i];
|
||||||
if (item.isBookmark)
|
if (item.isBookmark)
|
||||||
this.markPageAsFollowedBookmark(item.uri);
|
this.markPageAsFollowedBookmark(item.uri);
|
||||||
else
|
else
|
||||||
|
@ -55,6 +55,7 @@ var gAdvancedPane = {
|
|||||||
this.updateAppUpdateItems();
|
this.updateAppUpdateItems();
|
||||||
this.updateAutoItems();
|
this.updateAutoItems();
|
||||||
this.updateModeItems();
|
this.updateModeItems();
|
||||||
|
this.updateOfflineApps();
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -179,6 +180,94 @@ var gAdvancedPane = {
|
|||||||
} catch(ex) {}
|
} catch(ex) {}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the list of offline applications
|
||||||
|
*/
|
||||||
|
updateOfflineApps: function ()
|
||||||
|
{
|
||||||
|
var pm = Components.classes["@mozilla.org/permissionmanager;1"]
|
||||||
|
.getService(Components.interfaces.nsIPermissionManager);
|
||||||
|
|
||||||
|
var list = document.getElementById("offlineAppsList");
|
||||||
|
while (list.firstChild) {
|
||||||
|
list.removeChild(list.firstChild);
|
||||||
|
}
|
||||||
|
|
||||||
|
var enumerator = pm.enumerator;
|
||||||
|
while (enumerator.hasMoreElements()) {
|
||||||
|
var perm = enumerator.getNext().QueryInterface(Components.interfaces.nsIPermission);
|
||||||
|
if (perm.type == "offline-app" &&
|
||||||
|
perm.capability != Components.interfaces.nsIPermissionManager.DEFAULT_ACTION &&
|
||||||
|
perm.capability != Components.interfaces.nsIPermissionManager.DENY_ACTION) {
|
||||||
|
var row = document.createElementNS(kXULNS, "listitem");
|
||||||
|
row.id = "";
|
||||||
|
row.className = "listitem";
|
||||||
|
row.setAttribute("label", perm.host);
|
||||||
|
|
||||||
|
list.appendChild(row);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
offlineAppSelected: function()
|
||||||
|
{
|
||||||
|
var removeButton = document.getElementById("offlineAppsListRemove");
|
||||||
|
var list = document.getElementById("offlineAppsList");
|
||||||
|
if (list.selectedItem) {
|
||||||
|
removeButton.setAttribute("disabled", "false");
|
||||||
|
} else {
|
||||||
|
removeButton.setAttribute("disabled", "true");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
removeOfflineApp: function()
|
||||||
|
{
|
||||||
|
var list = document.getElementById("offlineAppsList");
|
||||||
|
var item = list.selectedItem;
|
||||||
|
var host = item.getAttribute("label");
|
||||||
|
|
||||||
|
var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
|
||||||
|
.getService(Components.interfaces.nsIPromptService);
|
||||||
|
var flags = prompts.BUTTON_TITLE_IS_STRING * prompts.BUTTON_POS_0 +
|
||||||
|
prompts.BUTTON_TITLE_CANCEL * prompts.BUTTON_POS_1;
|
||||||
|
|
||||||
|
var bundle = document.getElementById("bundlePreferences");
|
||||||
|
var title = bundle.getString("offlineAppRemoveTitle");
|
||||||
|
var prompt = bundle.getFormattedString("offlineAppRemovePrompt", [host]);
|
||||||
|
var confirm = bundle.getString("offlineAppRemoveConfirm");
|
||||||
|
var result = prompts.confirmEx(window, title, prompt, flags, confirm,
|
||||||
|
null, null, null, {});
|
||||||
|
if (result != 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// clear offline cache entries
|
||||||
|
var cacheService = Components.classes["@mozilla.org/network/cache-service;1"]
|
||||||
|
.getService(Components.interfaces.nsICacheService);
|
||||||
|
var cacheSession = cacheService.createSession("HTTP-offline",
|
||||||
|
Components.interfaces.nsICache.STORE_OFFLINE,
|
||||||
|
true)
|
||||||
|
.QueryInterface(Components.interfaces.nsIOfflineCacheSession);
|
||||||
|
cacheSession.clearKeysOwnedByDomain(host);
|
||||||
|
cacheSession.evictUnownedEntries();
|
||||||
|
|
||||||
|
// send out an offline-app-removed signal. The nsDOMStorage
|
||||||
|
// service will clear DOM storage for this host.
|
||||||
|
var obs = Components.classes["@mozilla.org/observer-service;1"]
|
||||||
|
.getService(Components.interfaces.nsIObserverService);
|
||||||
|
obs.notifyObservers(null, "offline-app-removed", host);
|
||||||
|
|
||||||
|
// remove the permission
|
||||||
|
var pm = Components.classes["@mozilla.org/permissionmanager;1"]
|
||||||
|
.getService(Components.interfaces.nsIPermissionManager);
|
||||||
|
pm.remove(host, "offline-app",
|
||||||
|
Components.interfaces.nsIPermissionManager.ALLOW_ACTION);
|
||||||
|
pm.remove(host, "offline-app",
|
||||||
|
Components.interfaces.nsIOfflineCacheUpdateService.ALLOW_NO_WARN);
|
||||||
|
|
||||||
|
list.removeChild(item);
|
||||||
|
gAdvancedPane.offlineAppSelected();
|
||||||
|
},
|
||||||
|
|
||||||
// UPDATE TAB
|
// UPDATE TAB
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
# Contributor(s):
|
# Contributor(s):
|
||||||
# Ben Goodger <ben@mozilla.org>
|
# Ben Goodger <ben@mozilla.org>
|
||||||
# Jeff Walden <jwalden+code@mit.edu>
|
# Jeff Walden <jwalden+code@mit.edu>
|
||||||
|
# Ehsan Akhgari <ehsan.akhgari@gmail.com>
|
||||||
#
|
#
|
||||||
# Alternatively, the contents of this file may be used under the terms of
|
# Alternatively, the contents of this file may be used under the terms of
|
||||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
@ -214,9 +215,9 @@
|
|||||||
</hbox>
|
</hbox>
|
||||||
</groupbox>
|
</groupbox>
|
||||||
|
|
||||||
<!-- Cache -->
|
<!-- Cache/Offline apps -->
|
||||||
<groupbox id="cacheGroup">
|
<groupbox id="offlineGroup">
|
||||||
<caption label="&cache.label;"/>
|
<caption label="&offlineStorage.label;"/>
|
||||||
|
|
||||||
<hbox align="center">
|
<hbox align="center">
|
||||||
<label id="useCacheBefore"
|
<label id="useCacheBefore"
|
||||||
@ -231,7 +232,26 @@
|
|||||||
label="&clearCacheNow.label;" accesskey="&clearCacheNow.accesskey;"
|
label="&clearCacheNow.label;" accesskey="&clearCacheNow.accesskey;"
|
||||||
oncommand="gAdvancedPane.clearCache();"/>
|
oncommand="gAdvancedPane.clearCache();"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</groupbox>
|
<hbox>
|
||||||
|
<vbox flex="1">
|
||||||
|
|
||||||
|
<label id="offlineAppsListLabel">&offlineAppsList.label;</label>
|
||||||
|
<listbox id="offlineAppsList"
|
||||||
|
style="height: &offlineAppsList.height;;"
|
||||||
|
flex="1"
|
||||||
|
aria-labelledby="offlineAppsListLabel"
|
||||||
|
onselect="gAdvancedPane.offlineAppSelected(event);">
|
||||||
|
</listbox>
|
||||||
|
</vbox>
|
||||||
|
<vbox pack="end">
|
||||||
|
<button id="offlineAppsListRemove"
|
||||||
|
disabled="true"
|
||||||
|
label="&offlineAppsListRemove.label;"
|
||||||
|
accesskey="&offlineAppsListRemove.accesskey;"
|
||||||
|
oncommand="gAdvancedPane.removeOfflineApp();"/>
|
||||||
|
</vbox>
|
||||||
|
</hbox>
|
||||||
|
</groupbox>
|
||||||
</tabpanel>
|
</tabpanel>
|
||||||
|
|
||||||
<!-- Update -->
|
<!-- Update -->
|
||||||
@ -315,7 +335,7 @@
|
|||||||
<groupbox id="certificatesGroup">
|
<groupbox id="certificatesGroup">
|
||||||
<caption id="CertGroupCaption" label="&certificates.label;"/>
|
<caption id="CertGroupCaption" label="&certificates.label;"/>
|
||||||
|
|
||||||
<description id="CertSelectionDesc" control="certSelection">&certselect.description;</description>
|
<description id="CertSelectionDesc" control="certSelection">&certSelection.description;</description>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The values on these radio buttons may look like l12y issues, but
|
The values on these radio buttons may look like l12y issues, but
|
||||||
|
@ -850,10 +850,16 @@ var gApplicationsPane = {
|
|||||||
// Figure out how we should be sorting the list. We persist sort settings
|
// Figure out how we should be sorting the list. We persist sort settings
|
||||||
// across sessions, so we can't assume the default sort column/direction.
|
// across sessions, so we can't assume the default sort column/direction.
|
||||||
// XXX should we be using the XUL sort service instead?
|
// XXX should we be using the XUL sort service instead?
|
||||||
if (document.getElementById("typeColumn").hasAttribute("sortDirection"))
|
if (document.getElementById("actionColumn").hasAttribute("sortDirection")) {
|
||||||
this._sortColumn = document.getElementById("typeColumn");
|
|
||||||
else if (document.getElementById("actionColumn").hasAttribute("sortDirection"))
|
|
||||||
this._sortColumn = document.getElementById("actionColumn");
|
this._sortColumn = document.getElementById("actionColumn");
|
||||||
|
// The typeColumn element always has a sortDirection attribute,
|
||||||
|
// either because it was persisted or because the default value
|
||||||
|
// from the xul file was used. If we are sorting on the other
|
||||||
|
// column, we should remove it.
|
||||||
|
document.getElementById("typeColumn").removeAttribute("sortDirection");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
this._sortColumn = document.getElementById("typeColumn");
|
||||||
|
|
||||||
// Load the data and build the list of handlers.
|
// Load the data and build the list of handlers.
|
||||||
// By doing this in a timeout, we let the preferences dialog resize itself
|
// By doing this in a timeout, we let the preferences dialog resize itself
|
||||||
@ -1016,19 +1022,20 @@ var gApplicationsPane = {
|
|||||||
|
|
||||||
// Get the preferences that help determine what types to show.
|
// Get the preferences that help determine what types to show.
|
||||||
var showPlugins = this._prefSvc.getBoolPref(PREF_SHOW_PLUGINS_IN_LIST);
|
var showPlugins = this._prefSvc.getBoolPref(PREF_SHOW_PLUGINS_IN_LIST);
|
||||||
var hideTypesWithoutExtensions =
|
var hidePluginsWithoutExtensions =
|
||||||
this._prefSvc.getBoolPref(PREF_HIDE_PLUGINS_WITHOUT_EXTENSIONS);
|
this._prefSvc.getBoolPref(PREF_HIDE_PLUGINS_WITHOUT_EXTENSIONS);
|
||||||
|
|
||||||
for (let type in this._handledTypes) {
|
for (let type in this._handledTypes) {
|
||||||
let handlerInfo = this._handledTypes[type];
|
let handlerInfo = this._handledTypes[type];
|
||||||
|
|
||||||
// Hide types without extensions if so prefed so we don't show a whole
|
// Hide plugins without associated extensions if so prefed so we don't
|
||||||
// bunch of obscure types handled by plugins on Mac.
|
// show a whole bunch of obscure types handled by plugins on Mac.
|
||||||
// Note: though protocol types don't have extensions, we still show them;
|
// Note: though protocol types don't have extensions, we still show them;
|
||||||
// the pref is only meant to be applied to MIME types.
|
// the pref is only meant to be applied to MIME types, since plugins are
|
||||||
// FIXME: if the type has a plugin, should we also check the "suffixes"
|
// only associated with MIME types.
|
||||||
// property of the plugin? Filed as bug 395135.
|
// FIXME: should we also check the "suffixes" property of the plugin?
|
||||||
if (hideTypesWithoutExtensions &&
|
// Filed as bug 395135.
|
||||||
|
if (hidePluginsWithoutExtensions && handlerInfo.handledOnlyByPlugin &&
|
||||||
handlerInfo.wrappedHandlerInfo instanceof Ci.nsIMIMEInfo &&
|
handlerInfo.wrappedHandlerInfo instanceof Ci.nsIMIMEInfo &&
|
||||||
!handlerInfo.primaryExtension)
|
!handlerInfo.primaryExtension)
|
||||||
continue;
|
continue;
|
||||||
|
@ -270,6 +270,18 @@ var gCookiesWindow = {
|
|||||||
{
|
{
|
||||||
var removeCount = aCount === undefined ? 1 : aCount;
|
var removeCount = aCount === undefined ? 1 : aCount;
|
||||||
if (this._filtered) {
|
if (this._filtered) {
|
||||||
|
// remove the cookies from the unfiltered set so that they
|
||||||
|
// don't reappear when the filter is changed. See bug 410863.
|
||||||
|
for (var i = aIndex; i < aIndex + removeCount; ++i) {
|
||||||
|
var item = this._filterSet[i];
|
||||||
|
var parent = gCookiesWindow._hosts[item.rawHost];
|
||||||
|
for (var j = 0; j < parent.cookies.length; ++j) {
|
||||||
|
if (item == parent.cookies[j]) {
|
||||||
|
parent.cookies.splice(j, 1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
this._filterSet.splice(aIndex, removeCount);
|
this._filterSet.splice(aIndex, removeCount);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -62,6 +62,7 @@
|
|||||||
<preference id="privacy.item.downloads" name="privacy.item.downloads" type="bool"/>
|
<preference id="privacy.item.downloads" name="privacy.item.downloads" type="bool"/>
|
||||||
<preference id="privacy.item.cookies" name="privacy.item.cookies" type="bool"/>
|
<preference id="privacy.item.cookies" name="privacy.item.cookies" type="bool"/>
|
||||||
<preference id="privacy.item.cache" name="privacy.item.cache" type="bool"/>
|
<preference id="privacy.item.cache" name="privacy.item.cache" type="bool"/>
|
||||||
|
<preference id="privacy.item.offlineApps" name="privacy.item.offlineApps" type="bool"/>
|
||||||
<preference id="privacy.item.sessions" name="privacy.item.sessions" type="bool"/>
|
<preference id="privacy.item.sessions" name="privacy.item.sessions" type="bool"/>
|
||||||
</preferences>
|
</preferences>
|
||||||
|
|
||||||
@ -82,6 +83,9 @@
|
|||||||
<checkbox label="&itemCookies.label;"
|
<checkbox label="&itemCookies.label;"
|
||||||
accesskey="&itemCookies.accesskey;"
|
accesskey="&itemCookies.accesskey;"
|
||||||
preference="privacy.item.cookies"/>
|
preference="privacy.item.cookies"/>
|
||||||
|
<checkbox label="&itemOfflineApps.label;"
|
||||||
|
accesskey="&itemOfflineApps.accesskey;"
|
||||||
|
preference="privacy.item.offlineApps"/>
|
||||||
<checkbox label="&itemPasswords.label;"
|
<checkbox label="&itemPasswords.label;"
|
||||||
accesskey="&itemPasswords.accesskey;"
|
accesskey="&itemPasswords.accesskey;"
|
||||||
preference="privacy.item.passwords"/>
|
preference="privacy.item.passwords"/>
|
||||||
|
@ -90,12 +90,16 @@ function PROT_MalwareWarden() {
|
|||||||
updateSuccess: function(requestedTimeout) { }
|
updateSuccess: function(requestedTimeout) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
dbService_.beginUpdate(listener);
|
try {
|
||||||
dbService_.beginStream();
|
dbService_.beginUpdate(listener);
|
||||||
dbService_.updateStream(testUpdate);
|
dbService_.beginStream();
|
||||||
dbService_.finishStream();
|
dbService_.updateStream(testUpdate);
|
||||||
dbService_.finishUpdate();
|
dbService_.finishStream();
|
||||||
|
dbService_.finishUpdate();
|
||||||
|
} catch(ex) {
|
||||||
|
// beginUpdate will throw harmlessly if there's an existing update
|
||||||
|
// in progress, ignore failures.
|
||||||
|
}
|
||||||
G_Debug(this, "malwareWarden initialized");
|
G_Debug(this, "malwareWarden initialized");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
# Ben Goodger <beng@google.com>
|
# Ben Goodger <beng@google.com>
|
||||||
# Pamela Greene <pamg.bugs@gmail.com>
|
# Pamela Greene <pamg.bugs@gmail.com>
|
||||||
# Michael Ventnor <m.ventnor@gmail.com>
|
# Michael Ventnor <m.ventnor@gmail.com>
|
||||||
|
# Ehsan Akhgari <ehsan.akhgari@gmail.com>
|
||||||
#
|
#
|
||||||
# Alternatively, the contents of this file may be used under the terms of
|
# Alternatively, the contents of this file may be used under the terms of
|
||||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
@ -91,8 +92,7 @@
|
|||||||
<xul:menuitem class="open-engine-manager"
|
<xul:menuitem class="open-engine-manager"
|
||||||
anonid="open-engine-manager"
|
anonid="open-engine-manager"
|
||||||
label="&cmd_engineManager.label;"
|
label="&cmd_engineManager.label;"
|
||||||
oncommand="openManager(event);"
|
oncommand="openManager(event);"/>
|
||||||
accesskey="&cmd_engineManager.accesskey;"/>
|
|
||||||
</xul:menupopup>
|
</xul:menupopup>
|
||||||
</xul:button>
|
</xul:button>
|
||||||
<xul:hbox class="search-go-container">
|
<xul:hbox class="search-go-container">
|
||||||
@ -552,7 +552,11 @@
|
|||||||
|
|
||||||
<handler event="DOMMouseScroll"
|
<handler event="DOMMouseScroll"
|
||||||
phase="capturing"
|
phase="capturing"
|
||||||
action="this.selectEngine(event, (event.detail > 0));"/>
|
#ifdef XP_MACOSX
|
||||||
|
action="if (event.metaKey) this.selectEngine(event, (event.detail > 0));"/>
|
||||||
|
#else
|
||||||
|
action="if (event.ctrlKey) this.selectEngine(event, (event.detail > 0));"/>
|
||||||
|
#endif
|
||||||
</handlers>
|
</handlers>
|
||||||
</binding>
|
</binding>
|
||||||
|
|
||||||
|
@ -427,7 +427,7 @@ SuggestAutoComplete.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes a note of the fact that we've recieved a backoff-triggering
|
* Makes a note of the fact that we've received a backoff-triggering
|
||||||
* response, so that we can adjust the backoff behavior appropriately.
|
* response, so that we can adjust the backoff behavior appropriately.
|
||||||
*/
|
*/
|
||||||
_noteServerError: function SAC__noteServeError() {
|
_noteServerError: function SAC__noteServeError() {
|
||||||
|
@ -865,8 +865,6 @@ SessionStoreService.prototype = {
|
|||||||
tabData.index = 1;
|
tabData.index = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
tabData.zoom = browser.markupDocumentViewer.textZoom;
|
|
||||||
|
|
||||||
var disallow = [];
|
var disallow = [];
|
||||||
for (var i = 0; i < CAPABILITIES.length; i++)
|
for (var i = 0; i < CAPABILITIES.length; i++)
|
||||||
if (!browser.docShell["allow" + CAPABILITIES[i]])
|
if (!browser.docShell["allow" + CAPABILITIES[i]])
|
||||||
@ -1502,8 +1500,6 @@ SessionStoreService.prototype = {
|
|||||||
tab.__SS_extdata = tabData.extData;
|
tab.__SS_extdata = tabData.extData;
|
||||||
}
|
}
|
||||||
|
|
||||||
browser.markupDocumentViewer.textZoom = parseFloat(tabData.zoom || 1);
|
|
||||||
|
|
||||||
for (var i = 0; i < tabData.entries.length; i++) {
|
for (var i = 0; i < tabData.entries.length; i++) {
|
||||||
history.addEntry(this._deserializeHistoryEntry(tabData.entries[i], aIdMap), true);
|
history.addEntry(this._deserializeHistoryEntry(tabData.entries[i], aIdMap), true);
|
||||||
}
|
}
|
||||||
|
@ -1157,8 +1157,6 @@ function Application() {
|
|||||||
|
|
||||||
os.addObserver(this, "final-ui-startup", false);
|
os.addObserver(this, "final-ui-startup", false);
|
||||||
os.addObserver(this, "quit-application-requested", false);
|
os.addObserver(this, "quit-application-requested", false);
|
||||||
os.addObserver(this, "quit-application-granted", false);
|
|
||||||
os.addObserver(this, "quit-application", false);
|
|
||||||
os.addObserver(this, "xpcom-shutdown", false);
|
os.addObserver(this, "xpcom-shutdown", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1221,11 +1219,7 @@ Application.prototype = {
|
|||||||
.getService(Ci.nsIObserverService);
|
.getService(Ci.nsIObserverService);
|
||||||
|
|
||||||
os.removeObserver(this, "final-ui-startup");
|
os.removeObserver(this, "final-ui-startup");
|
||||||
|
|
||||||
os.removeObserver(this, "quit-application-requested");
|
os.removeObserver(this, "quit-application-requested");
|
||||||
os.removeObserver(this, "quit-application-granted");
|
|
||||||
os.removeObserver(this, "quit-application");
|
|
||||||
|
|
||||||
os.removeObserver(this, "xpcom-shutdown");
|
os.removeObserver(this, "xpcom-shutdown");
|
||||||
|
|
||||||
this._info = null;
|
this._info = null;
|
||||||
|
@ -39,6 +39,7 @@ searchplugins/yahoo.gif
|
|||||||
searchplugins/
|
searchplugins/
|
||||||
#ifdef MOZ_ENABLE_LIBXUL
|
#ifdef MOZ_ENABLE_LIBXUL
|
||||||
@DLL_PREFIX@xpcom_core@DLL_SUFFIX@
|
@DLL_PREFIX@xpcom_core@DLL_SUFFIX@
|
||||||
|
@DLL_PREFIX@xpistub@DLL_SUFFIX@
|
||||||
components/@DLL_PREFIX@jar50@DLL_SUFFIX@
|
components/@DLL_PREFIX@jar50@DLL_SUFFIX@
|
||||||
#ifdef XP_WIN
|
#ifdef XP_WIN
|
||||||
components/jsd3250.dll
|
components/jsd3250.dll
|
||||||
@ -59,7 +60,6 @@ component.reg
|
|||||||
components/compreg.dat
|
components/compreg.dat
|
||||||
components/@DLL_PREFIX@myspell@DLL_SUFFIX@
|
components/@DLL_PREFIX@myspell@DLL_SUFFIX@
|
||||||
components/@DLL_PREFIX@spellchecker@DLL_SUFFIX@
|
components/@DLL_PREFIX@spellchecker@DLL_SUFFIX@
|
||||||
components/spellchecker.xpt
|
|
||||||
components/@DLL_PREFIX@spellchk@DLL_SUFFIX@
|
components/@DLL_PREFIX@spellchk@DLL_SUFFIX@
|
||||||
components/xpti.dat
|
components/xpti.dat
|
||||||
components/xptitemp.dat
|
components/xptitemp.dat
|
||||||
@ -90,6 +90,7 @@ extensions/reporter@mozilla.org/chrome/reporter.jar
|
|||||||
extensions/reporter@mozilla.org/defaults/preferences/reporter.js
|
extensions/reporter@mozilla.org/defaults/preferences/reporter.js
|
||||||
extensions/inspector@mozilla.org/components/inspector.xpt
|
extensions/inspector@mozilla.org/components/inspector.xpt
|
||||||
extensions/inspector@mozilla.org/components/@DLL_PREFIX@inspector@DLL_SUFFIX@
|
extensions/inspector@mozilla.org/components/@DLL_PREFIX@inspector@DLL_SUFFIX@
|
||||||
|
extensions/inspector@mozilla.org/chrome/icons/default/winInspectorMain.ico
|
||||||
uninstall/UninstallFirefox.exe
|
uninstall/UninstallFirefox.exe
|
||||||
uninstall/UninstallDeerPark.exe
|
uninstall/UninstallDeerPark.exe
|
||||||
uninstall/uninst.exe
|
uninstall/uninst.exe
|
||||||
@ -522,8 +523,8 @@ extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resour
|
|||||||
#else
|
#else
|
||||||
extensions/talkback@mozilla.org/components/talkback/talkback
|
extensions/talkback@mozilla.org/components/talkback/talkback
|
||||||
extensions/talkback@mozilla.org/components/talkback/XTalkback.ad
|
extensions/talkback@mozilla.org/components/talkback/XTalkback.ad
|
||||||
extensions/talkback@mozilla.org/components/master.ini
|
extensions/talkback@mozilla.org/components/talkback/master.ini
|
||||||
extensions/talkback@mozilla.org/components/talkback.so
|
extensions/talkback@mozilla.org/components/talkback/talkback.so
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
components/airbag.xpt
|
components/airbag.xpt
|
||||||
@ -546,4 +547,35 @@ res/fonts/mathfontMath4.properties
|
|||||||
res/fonts/mathfontMTExtra.properties
|
res/fonts/mathfontMTExtra.properties
|
||||||
res/fonts/mathfontPUA.properties
|
res/fonts/mathfontPUA.properties
|
||||||
res/fonts/mathfontSymbol.properties
|
res/fonts/mathfontSymbol.properties
|
||||||
|
res/fonts/fontEncoding.properties
|
||||||
|
res/fonts/pangoFontEncoding.properties
|
||||||
|
res/fonts/fontNameMap.properties
|
||||||
|
@DLL_PREFIX@xpcom_compat@DLL_SUFFIX@
|
||||||
|
components/nsDictionary.js
|
||||||
|
components/nsXmlRpcClient.js
|
||||||
|
components/nsInterfaceInfoToIDL.js
|
||||||
|
chrome/chromelist.txt
|
||||||
|
#ifdef XP_MACOSX
|
||||||
|
LICENSE
|
||||||
|
extensions/inspector@mozilla.org/chrome/chromelist.txt
|
||||||
|
components/accessibility.xpt
|
||||||
|
components/gksvgrenderer.xpt
|
||||||
|
components/jsconsole.xpt
|
||||||
|
components/necko_data.xpt
|
||||||
|
components/nsKillAll.js
|
||||||
|
components/passwordmgr.xpt
|
||||||
|
components/progressDlg.xpt
|
||||||
|
components/search.xpt
|
||||||
|
components/websrvcs.xpt
|
||||||
|
components/widget_mac.xpt
|
||||||
|
components/xml-rpc.xpt
|
||||||
|
components/xpcom_obsolete.xpt
|
||||||
|
init.d/README
|
||||||
|
redo-prebinding.sh
|
||||||
|
res/viewer.properties
|
||||||
|
#endif
|
||||||
|
#ifdef XP_UNIX
|
||||||
|
readme.txt
|
||||||
|
#endif
|
||||||
|
dictionaries/PL.dic
|
||||||
|
dictionaries/PL.aff
|
||||||
|
@ -760,6 +760,13 @@ Destination=[SETUP PATH]
|
|||||||
Fail If Exists=FALSE
|
Fail If Exists=FALSE
|
||||||
Do Not Uninstall=FALSE
|
Do Not Uninstall=FALSE
|
||||||
|
|
||||||
|
[Copy File9]
|
||||||
|
Timing=post smartupdate
|
||||||
|
Source=[$GRE_INSTALL_DIR]\nssutil3.dll
|
||||||
|
Destination=[SETUP PATH]
|
||||||
|
Fail If Exists=FALSE
|
||||||
|
Do Not Uninstall=FALSE
|
||||||
|
|
||||||
[Path Lookup $GRE_INSTALL_DIR]
|
[Path Lookup $GRE_INSTALL_DIR]
|
||||||
Path Reg Key Root=HKEY_LOCAL_MACHINE
|
Path Reg Key Root=HKEY_LOCAL_MACHINE
|
||||||
Path Reg Key=Software\mozilla.org\GRE\$GreUniqueID$\Main
|
Path Reg Key=Software\mozilla.org\GRE\$GreUniqueID$\Main
|
||||||
|
@ -54,6 +54,7 @@ bin/res/cmessage.txt
|
|||||||
bin/res/effective_tld_names.dat
|
bin/res/effective_tld_names.dat
|
||||||
bin/xpicleanup
|
bin/xpicleanup
|
||||||
bin/libsqlite3.so
|
bin/libsqlite3.so
|
||||||
|
bin/README.txt
|
||||||
|
|
||||||
; [Components]
|
; [Components]
|
||||||
bin/components/alerts.xpt
|
bin/components/alerts.xpt
|
||||||
@ -161,6 +162,7 @@ bin/components/satchel.xpt
|
|||||||
bin/components/saxparser.xpt
|
bin/components/saxparser.xpt
|
||||||
bin/components/search.xpt
|
bin/components/search.xpt
|
||||||
bin/components/shistory.xpt
|
bin/components/shistory.xpt
|
||||||
|
bin/components/spellchecker.xpt
|
||||||
bin/components/storage.xpt
|
bin/components/storage.xpt
|
||||||
bin/components/profile.xpt
|
bin/components/profile.xpt
|
||||||
bin/components/toolkitprofile.xpt
|
bin/components/toolkitprofile.xpt
|
||||||
@ -271,7 +273,7 @@ bin/chrome/comm.jar
|
|||||||
bin/chrome/comm.manifest
|
bin/chrome/comm.manifest
|
||||||
bin/chrome/toolkit.jar
|
bin/chrome/toolkit.jar
|
||||||
bin/chrome/toolkit.manifest
|
bin/chrome/toolkit.manifest
|
||||||
bin/chrome/icons/default/default.xpm
|
bin/chrome/icons/default/default16.png
|
||||||
bin/chrome/reporter.manifest
|
bin/chrome/reporter.manifest
|
||||||
bin/chrome/reporter.jar
|
bin/chrome/reporter.jar
|
||||||
bin/@PREF_DIR@/reporter.js
|
bin/@PREF_DIR@/reporter.js
|
||||||
@ -348,6 +350,7 @@ bin/components/pipboot.xpt
|
|||||||
bin/components/pipnss.xpt
|
bin/components/pipnss.xpt
|
||||||
bin/components/pippki.xpt
|
bin/components/pippki.xpt
|
||||||
bin/libnss3.so
|
bin/libnss3.so
|
||||||
|
bin/libnssutil3.so
|
||||||
bin/libsmime3.so
|
bin/libsmime3.so
|
||||||
bin/libsoftokn3.chk
|
bin/libsoftokn3.chk
|
||||||
bin/libsoftokn3.so
|
bin/libsoftokn3.so
|
||||||
@ -375,6 +378,8 @@ bin/updater
|
|||||||
;
|
;
|
||||||
bin/crashreporter
|
bin/crashreporter
|
||||||
bin/crashreporter.ini
|
bin/crashreporter.ini
|
||||||
|
bin/crashreporter-override.ini
|
||||||
|
bin/Throbber-small.gif
|
||||||
|
|
||||||
; [Extensions]
|
; [Extensions]
|
||||||
;
|
;
|
||||||
|
@ -182,6 +182,7 @@ bin\components\widget.xpt
|
|||||||
bin\components\windowds.xpt
|
bin\components\windowds.xpt
|
||||||
bin\components\windowwatcher.xpt
|
bin\components\windowwatcher.xpt
|
||||||
bin\components\shellservice.xpt
|
bin\components\shellservice.xpt
|
||||||
|
bin\components\spellchecker.xpt
|
||||||
bin\components\xpcom_base.xpt
|
bin\components\xpcom_base.xpt
|
||||||
bin\components\xpcom_system.xpt
|
bin\components\xpcom_system.xpt
|
||||||
bin\components\xpcom_components.xpt
|
bin\components\xpcom_components.xpt
|
||||||
@ -331,6 +332,7 @@ bin\nssckbi.dll
|
|||||||
bin\components\pipboot.xpt
|
bin\components\pipboot.xpt
|
||||||
bin\components\pipnss.xpt
|
bin\components\pipnss.xpt
|
||||||
bin\components\pippki.xpt
|
bin\components\pippki.xpt
|
||||||
|
bin\nssutil3.dll
|
||||||
bin\nss3.dll
|
bin\nss3.dll
|
||||||
bin\smime3.dll
|
bin\smime3.dll
|
||||||
bin\softokn3.chk
|
bin\softokn3.chk
|
||||||
@ -349,6 +351,7 @@ bin\updater.exe
|
|||||||
; [Crash Reporter]
|
; [Crash Reporter]
|
||||||
bin\crashreporter.exe
|
bin\crashreporter.exe
|
||||||
bin\crashreporter.ini
|
bin\crashreporter.ini
|
||||||
|
bin\crashreporter-override.ini
|
||||||
|
|
||||||
; [Additional Developer Tools]
|
; [Additional Developer Tools]
|
||||||
[adt]
|
[adt]
|
||||||
|
@ -315,3 +315,8 @@ else
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef MOZ_CRASHREPORTER
|
||||||
|
libs:: $(addprefix $(LOCALE_SRCDIR)/,crashreporter/crashreporter-override.ini)
|
||||||
|
$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)
|
||||||
|
endif
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
<!ENTITY aboutLink "< About &brandFullName;">
|
<!ENTITY aboutLink "< About &brandFullName;">
|
||||||
<!ENTITY aboutLink.accesskey "A">
|
<!ENTITY aboutLink.accesskey "A">
|
||||||
<!ENTITY aboutVersion "version">
|
<!ENTITY aboutVersion "version">
|
||||||
<!ENTITY copyrightText "©1998-2008 Contributors. All Rights Reserved. Firefox and the
|
<!ENTITY copyrightInfo "©1998-2008 Contributors. All Rights Reserved. Firefox and the
|
||||||
Firefox logos are trademarks of the Mozilla Foundation. All rights
|
Firefox logos are trademarks of the Mozilla Foundation. All rights
|
||||||
reserved. Some trademark rights used under license from The
|
reserved.">
|
||||||
Charlton Company.">
|
|
||||||
|
@ -49,6 +49,10 @@
|
|||||||
<!ENTITY fullScreenMinimize.tooltip "Minimize">
|
<!ENTITY fullScreenMinimize.tooltip "Minimize">
|
||||||
<!ENTITY fullScreenRestore.tooltip "Restore">
|
<!ENTITY fullScreenRestore.tooltip "Restore">
|
||||||
<!ENTITY fullScreenClose.tooltip "Close">
|
<!ENTITY fullScreenClose.tooltip "Close">
|
||||||
|
<!ENTITY fullScreenAutohide.label "Hide Toolbars">
|
||||||
|
<!ENTITY fullScreenAutohide.accesskey "H">
|
||||||
|
<!ENTITY fullScreenExit.label "Exit Full Screen Mode">
|
||||||
|
<!ENTITY fullScreenExit.accesskey "F">
|
||||||
|
|
||||||
<!ENTITY closeWindow.label "Close Window">
|
<!ENTITY closeWindow.label "Close Window">
|
||||||
<!ENTITY closeWindow.accesskey "d">
|
<!ENTITY closeWindow.accesskey "d">
|
||||||
@ -227,18 +231,20 @@
|
|||||||
<!ENTITY viewPageInfoCmd.accesskey "I">
|
<!ENTITY viewPageInfoCmd.accesskey "I">
|
||||||
<!ENTITY viewFrameInfoCmd.label "View Frame Info">
|
<!ENTITY viewFrameInfoCmd.label "View Frame Info">
|
||||||
<!ENTITY viewFrameInfoCmd.accesskey "I">
|
<!ENTITY viewFrameInfoCmd.accesskey "I">
|
||||||
|
<!ENTITY showImageCmd.label "Show Image">
|
||||||
|
<!ENTITY showImageCmd.accesskey "S">
|
||||||
<!ENTITY viewImageCmd.label "View Image">
|
<!ENTITY viewImageCmd.label "View Image">
|
||||||
<!ENTITY viewImageCmd.accesskey "I">
|
<!ENTITY viewImageCmd.accesskey "I">
|
||||||
<!ENTITY viewBGImageCmd.label "View Background Image">
|
<!ENTITY viewBGImageCmd.label "View Background Image">
|
||||||
<!ENTITY viewBGImageCmd.accesskey "w">
|
<!ENTITY viewBGImageCmd.accesskey "w">
|
||||||
<!ENTITY setDesktopBackgroundCmd.label "Set As Desktop Background…">
|
<!ENTITY setDesktopBackgroundCmd.label "Set As Desktop Background…">
|
||||||
<!ENTITY setDesktopBackgroundCmd.accesskey "S">
|
<!ENTITY setDesktopBackgroundCmd.accesskey "S">
|
||||||
<!ENTITY bookmarkPageCmd.label "Bookmark This Page…">
|
<!ENTITY bookmarkPageCmd2.label "Bookmark This Page">
|
||||||
<!ENTITY bookmarkPageCmd.accesskey "m">
|
<!ENTITY bookmarkPageCmd2.accesskey "m">
|
||||||
<!ENTITY bookmarkLinkCmd.label "Bookmark This Link…">
|
<!ENTITY bookmarkThisLinkCmd.label "Bookmark This Link">
|
||||||
<!ENTITY bookmarkLinkCmd.accesskey "L">
|
<!ENTITY bookmarkThisLinkCmd.accesskey "L">
|
||||||
<!ENTITY bookmarkFrameCmd.label "Bookmark This Frame…">
|
<!ENTITY bookmarkThisFrameCmd.label "Bookmark This Frame">
|
||||||
<!ENTITY bookmarkFrameCmd.accesskey "m">
|
<!ENTITY bookmarkThisFrameCmd.accesskey "m">
|
||||||
<!ENTITY sendPageCmd.label "Send Link…">
|
<!ENTITY sendPageCmd.label "Send Link…">
|
||||||
<!ENTITY sendPageCmd.accesskey "e">
|
<!ENTITY sendPageCmd.accesskey "e">
|
||||||
<!ENTITY savePageCmd.label "Save Page As…">
|
<!ENTITY savePageCmd.label "Save Page As…">
|
||||||
@ -260,6 +266,8 @@
|
|||||||
<!ENTITY sendImageCmd.accesskey "n">
|
<!ENTITY sendImageCmd.accesskey "n">
|
||||||
<!ENTITY copyLinkCmd.label "Copy Link Location">
|
<!ENTITY copyLinkCmd.label "Copy Link Location">
|
||||||
<!ENTITY copyLinkCmd.accesskey "a">
|
<!ENTITY copyLinkCmd.accesskey "a">
|
||||||
|
<!ENTITY copyLinkTextCmd.label "Copy Link Text">
|
||||||
|
<!ENTITY copyLinkTextCmd.accesskey "x">
|
||||||
<!ENTITY copyImageCmd.label "Copy Image Location">
|
<!ENTITY copyImageCmd.label "Copy Image Location">
|
||||||
<!ENTITY copyImageCmd.accesskey "o">
|
<!ENTITY copyImageCmd.accesskey "o">
|
||||||
<!ENTITY copyImageContentsCmd.label "Copy Image">
|
<!ENTITY copyImageContentsCmd.label "Copy Image">
|
||||||
@ -283,6 +291,8 @@
|
|||||||
<!ENTITY fullZoomResetCmd.commandkey "0">
|
<!ENTITY fullZoomResetCmd.commandkey "0">
|
||||||
<!ENTITY fullZoomResetCmd.label "Reset">
|
<!ENTITY fullZoomResetCmd.label "Reset">
|
||||||
<!ENTITY fullZoomResetCmd.accesskey "R">
|
<!ENTITY fullZoomResetCmd.accesskey "R">
|
||||||
|
<!ENTITY fullZoomToggleCmd.label "Zoom Text Only">
|
||||||
|
<!ENTITY fullZoomToggleCmd.accesskey "T">
|
||||||
<!ENTITY fullZoom.label "Zoom">
|
<!ENTITY fullZoom.label "Zoom">
|
||||||
<!ENTITY fullZoom.accesskey "Z">
|
<!ENTITY fullZoom.accesskey "Z">
|
||||||
|
|
||||||
@ -339,10 +349,12 @@
|
|||||||
<!ENTITY findAgainCmd.commandkey "g">
|
<!ENTITY findAgainCmd.commandkey "g">
|
||||||
<!ENTITY findAgainCmd.commandkey2 "VK_F3">
|
<!ENTITY findAgainCmd.commandkey2 "VK_F3">
|
||||||
|
|
||||||
<!ENTITY spellAddDictionaries.label "Add dictionaries…">
|
<!ENTITY spellAddDictionaries.label "Add Dictionaries…">
|
||||||
<!ENTITY spellAddDictionaries.accesskey "A">
|
<!ENTITY spellAddDictionaries.accesskey "A">
|
||||||
|
|
||||||
<!ENTITY editBookmark.done.label "Done">
|
<!ENTITY editBookmark.done.label "Done">
|
||||||
<!ENTITY editBookmark.delete.label "Delete">
|
<!ENTITY editBookmark.delete.label "Delete">
|
||||||
|
|
||||||
<!ENTITY identity.moreInfoLinkText "Tell me more about this web site…">
|
<!ENTITY identity.moreInfoLinkText "Tell me more about this web site…">
|
||||||
|
|
||||||
|
<!ENTITY downloadMonitor.tooltip "Double-click to open downloads window">
|
||||||
|
@ -81,6 +81,11 @@ feedHasFeedsNew=Subscribe to this page…
|
|||||||
menuOpenAllInTabs.label=Open All in Tabs
|
menuOpenAllInTabs.label=Open All in Tabs
|
||||||
menuOpenAllInTabs.accesskey=o
|
menuOpenAllInTabs.accesskey=o
|
||||||
|
|
||||||
|
# Unified Back-/Forward Popup
|
||||||
|
tabHistory.current=Stay on this page
|
||||||
|
tabHistory.goBack=Go back to this page
|
||||||
|
tabHistory.goForward=Go forward to this page
|
||||||
|
|
||||||
# Block autorefresh
|
# Block autorefresh
|
||||||
refreshBlocked.goButton=Allow
|
refreshBlocked.goButton=Allow
|
||||||
refreshBlocked.goButton.accesskey=A
|
refreshBlocked.goButton.accesskey=A
|
||||||
@ -91,6 +96,11 @@ refreshBlocked.redirectLabel=%S prevented this page from automatically redirecti
|
|||||||
starButtonOn.tooltip=Edit this bookmark
|
starButtonOn.tooltip=Edit this bookmark
|
||||||
starButtonOff.tooltip=Bookmark this page
|
starButtonOff.tooltip=Bookmark this page
|
||||||
|
|
||||||
|
# Offline web applications
|
||||||
|
offlineApps.available=This website (%S) is offering to store data on your computer for offline use.
|
||||||
|
offlineApps.allow=Allow
|
||||||
|
offlineApps.allowAccessKey=A
|
||||||
|
|
||||||
# Identity information
|
# Identity information
|
||||||
identity.domainverified.title=Location Verified
|
identity.domainverified.title=Location Verified
|
||||||
identity.domainverified.body=You are currently visiting:
|
identity.domainverified.body=You are currently visiting:
|
||||||
@ -107,3 +117,11 @@ identity.unknown.body=This web site does not supply identity information.
|
|||||||
|
|
||||||
identity.encrypted=Your connection to this web site is encrypted to prevent eavesdropping.
|
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.unencrypted=Your connection to this web site is not encrypted.
|
||||||
|
|
||||||
|
# Downloads Monitor Panel
|
||||||
|
# LOCALIZATION NOTE (activeDownloads, pausedDownloads): Semi-colon list of plural
|
||||||
|
# forms. See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
|
||||||
|
# #1 number of downloads; #2 time left
|
||||||
|
# examples: One active download (2 minutes remaining); 11 paused downloads
|
||||||
|
activeDownloads=One active download (#2);#1 active downloads (#2)
|
||||||
|
pausedDownloads=One paused download;#1 paused downloads
|
||||||
|
@ -16,4 +16,4 @@
|
|||||||
<!ENTITY credit.translation "">
|
<!ENTITY credit.translation "">
|
||||||
|
|
||||||
<!ENTITY credit.memory "In Fond Memory Of">
|
<!ENTITY credit.memory "In Fond Memory Of">
|
||||||
<!ENTITY credit.poweredByGecko "Powered by Gecko™">
|
<!ENTITY credit.poweredByGeckoReg "Powered by Gecko®">
|
||||||
|
@ -8,6 +8,37 @@ subscribeNow=Subscribe Now
|
|||||||
chooseApplicationMenuItem=Choose Application…
|
chooseApplicationMenuItem=Choose Application…
|
||||||
chooseApplicationDialogTitle=Choose Application
|
chooseApplicationDialogTitle=Choose Application
|
||||||
alwaysUse=Always use %S to subscribe to feeds
|
alwaysUse=Always use %S to subscribe to feeds
|
||||||
|
mediaLabel=Media files
|
||||||
|
|
||||||
|
# LOCALIZATION NOTE: The next string is for the size of the enclosed media.
|
||||||
|
# e.g. enclosureSizeText : "50.23 MB"
|
||||||
|
# %1$S = size (in bytes or megabytes, ...)
|
||||||
|
# %2$S = unit of measure (bytes, KB, MB, ...)
|
||||||
|
enclosureSizeText=%1$S %2$S
|
||||||
|
|
||||||
|
bytes=bytes
|
||||||
|
kilobyte=KB
|
||||||
|
megabyte=MB
|
||||||
|
gigabyte=GB
|
||||||
|
|
||||||
|
# LOCALIZATION NOTE: The next three strings explains to the user what they're
|
||||||
|
# doing.
|
||||||
|
# e.g. alwaysUseForVideoPodcasts : "Always use Miro to subscribe to video podcasts."
|
||||||
|
# %S = application to use (Miro, iTunes, ...)
|
||||||
|
alwaysUseForFeeds=Always use %S to subscribe to feeds.
|
||||||
|
alwaysUseForPodcasts=Always use %S to subscribe to podcasts.
|
||||||
|
alwaysUseForVideoPodcasts=Always use %S to subscribe to video podcasts.
|
||||||
|
|
||||||
|
subscribeFeedUsing=Subscribe to this feed using
|
||||||
|
subscribePodcastUsing=Subscribe to this podcast using
|
||||||
|
subscribeVideoPodcastUsing=Subscribe to this video podcast using
|
||||||
|
|
||||||
|
# "This is a "xyz" of frequently changing content on this site."
|
||||||
|
feedsubscription1=This is a "%S" of frequently changing content on this site.
|
||||||
|
feedsubscription2=You can subscribe to this %S to receive updates when this content changes.
|
||||||
|
webFeed=feed
|
||||||
|
videoPodcastFeed=video podcast
|
||||||
|
audioPodcastFeed=podcast
|
||||||
|
|
||||||
# Protocol Handling
|
# Protocol Handling
|
||||||
# "Add %appName (%appDomain) as an application for %protocolType links?"
|
# "Add %appName (%appDomain) as an application for %protocolType links?"
|
||||||
|
@ -65,16 +65,14 @@
|
|||||||
|
|
||||||
<!ENTITY mediaTab "Media">
|
<!ENTITY mediaTab "Media">
|
||||||
<!ENTITY mediaTab.accesskey "M">
|
<!ENTITY mediaTab.accesskey "M">
|
||||||
<!ENTITY mediaURL "Address:">
|
<!ENTITY mediaLocation "Location:">
|
||||||
<!ENTITY mediaAlt "Alternate Text:">
|
<!ENTITY mediaText "Associated Text:">
|
||||||
<!ENTITY mediaAltHeader "Alternate Text">
|
<!ENTITY mediaAltHeader "Alternate Text">
|
||||||
<!ENTITY mediaAddress "Address">
|
<!ENTITY mediaAddress "Address">
|
||||||
<!ENTITY mediaType "Type">
|
<!ENTITY mediaType "Type">
|
||||||
<!ENTITY mediaSize "Size">
|
<!ENTITY mediaSize "Size">
|
||||||
<!ENTITY mediaCount "Count">
|
<!ENTITY mediaCount "Count">
|
||||||
<!ENTITY mediaDimensions "Specified Dimensions:">
|
<!ENTITY mediaDimension "Dimensions:">
|
||||||
<!ENTITY mediaPhysDimensions "Actual Dimensions:">
|
|
||||||
<!ENTITY mediaTitle "Title:">
|
|
||||||
<!ENTITY mediaLongdesc "Long Description:">
|
<!ENTITY mediaLongdesc "Long Description:">
|
||||||
<!ENTITY mediaBlockImage.accesskey "B">
|
<!ENTITY mediaBlockImage.accesskey "B">
|
||||||
<!ENTITY mediaSaveAs "Save As…">
|
<!ENTITY mediaSaveAs "Save As…">
|
||||||
|
@ -57,6 +57,11 @@ mediaFileSize=%S KB
|
|||||||
mediaSize=%Spx \u00D7 %Spx
|
mediaSize=%Spx \u00D7 %Spx
|
||||||
mediaSelectFolder=Select a Folder to Save the Images
|
mediaSelectFolder=Select a Folder to Save the Images
|
||||||
mediaBlockImage=Block Images from %S
|
mediaBlockImage=Block Images from %S
|
||||||
|
mediaUnknownNotCached=Unknown (not cached)
|
||||||
|
mediaImageType=%S Image
|
||||||
|
mediaAnimatedImageType=%S Image (animated, %S frames)
|
||||||
|
mediaDimensions=%Spx \u00D7 %Spx
|
||||||
|
mediaDimensionsScaled=%Spx \u00D7 %Spx (scaled to %Spx \u00D7 %Spx)
|
||||||
|
|
||||||
generalQuirksMode=Quirks mode
|
generalQuirksMode=Quirks mode
|
||||||
generalStrictMode=Standards compliance mode
|
generalStrictMode=Standards compliance mode
|
||||||
|
@ -70,7 +70,7 @@ view.sortBy.keyword.accesskey=K
|
|||||||
view.sortBy.description.label=Sort by Description
|
view.sortBy.description.label=Sort by Description
|
||||||
view.sortBy.description.accesskey=D
|
view.sortBy.description.accesskey=D
|
||||||
view.sortBy.dateAdded.label=Sort by Added
|
view.sortBy.dateAdded.label=Sort by Added
|
||||||
view.sortBy.dateAdded.accesskey=A
|
view.sortBy.dateAdded.accesskey=e
|
||||||
view.sortBy.lastModified.label=Sort by Last Modified
|
view.sortBy.lastModified.label=Sort by Last Modified
|
||||||
view.sortBy.lastModified.accesskey=M
|
view.sortBy.lastModified.accesskey=M
|
||||||
view.sortBy.tags.label=Sort by Tags
|
view.sortBy.tags.label=Sort by Tags
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
<!ENTITY connectionSettings.label "Settings…">
|
<!ENTITY connectionSettings.label "Settings…">
|
||||||
<!ENTITY connectionSettings.accesskey "e">
|
<!ENTITY connectionSettings.accesskey "e">
|
||||||
|
|
||||||
<!ENTITY cache.label "Cache">
|
<!ENTITY offlineStorage.label "Offline Storage">
|
||||||
|
|
||||||
<!-- LOCALIZATION NOTE:
|
<!-- LOCALIZATION NOTE:
|
||||||
The entities useCacheBefore.label and useCacheAfter.label appear on a single
|
The entities useCacheBefore.label and useCacheAfter.label appear on a single
|
||||||
@ -67,6 +67,11 @@
|
|||||||
<!ENTITY updateHistory.label "Show Update History">
|
<!ENTITY updateHistory.label "Show Update History">
|
||||||
<!ENTITY updateHistory.accesskey "p">
|
<!ENTITY updateHistory.accesskey "p">
|
||||||
|
|
||||||
|
<!ENTITY offlineAppsList.label "The following websites have data installed for offline use:">
|
||||||
|
<!ENTITY offlineAppsList.height "7em">
|
||||||
|
<!ENTITY offlineAppsListRemove.label "Remove…">
|
||||||
|
<!ENTITY offlineAppsListRemove.accesskey "R">
|
||||||
|
<!ENTITY offlineAppRemove.confirm "Remove offline data">
|
||||||
|
|
||||||
<!ENTITY encryptionTab.label "Encryption">
|
<!ENTITY encryptionTab.label "Encryption">
|
||||||
|
|
||||||
@ -76,7 +81,7 @@
|
|||||||
<!ENTITY useTLS1.label "Use TLS 1.0">
|
<!ENTITY useTLS1.label "Use TLS 1.0">
|
||||||
<!ENTITY useTLS1.accesskey "1">
|
<!ENTITY useTLS1.accesskey "1">
|
||||||
<!ENTITY certificates.label "Certificates">
|
<!ENTITY certificates.label "Certificates">
|
||||||
<!ENTITY certselect.description "When a web site requires a certificate:">
|
<!ENTITY certSelection.description "When a server requests my personal certificate:">
|
||||||
<!ENTITY certs.auto "Select one automatically">
|
<!ENTITY certs.auto "Select one automatically">
|
||||||
<!ENTITY certs.auto.accesskey "l">
|
<!ENTITY certs.auto.accesskey "l">
|
||||||
<!ENTITY certs.ask "Ask me every time">
|
<!ENTITY certs.ask "Ask me every time">
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
<!ENTITY proxyTitle.label "Configure Proxies to Access the Internet">
|
<!ENTITY proxyTitle.label "Configure Proxies to Access the Internet">
|
||||||
<!ENTITY directTypeRadio.label "Direct connection to the Internet">
|
<!ENTITY directTypeRadio.label "Direct connection to the Internet">
|
||||||
<!ENTITY directTypeRadio.accesskey "d">
|
<!ENTITY directTypeRadio.accesskey "d">
|
||||||
|
<!ENTITY systemTypeRadio.label "Use system proxy settings">
|
||||||
|
<!ENTITY systemTypeRadio.accesskey "y">
|
||||||
<!ENTITY WPADTypeRadio.label "Auto-detect proxy settings for this network">
|
<!ENTITY WPADTypeRadio.label "Auto-detect proxy settings for this network">
|
||||||
<!ENTITY WPADTypeRadio.accesskey "w">
|
<!ENTITY WPADTypeRadio.accesskey "w">
|
||||||
<!ENTITY manualTypeRadio.label "Manual proxy configuration:">
|
<!ENTITY manualTypeRadio.label "Manual proxy configuration:">
|
||||||
|
@ -50,6 +50,8 @@ saveFile=Save File
|
|||||||
chooseApp=Choose application…
|
chooseApp=Choose application…
|
||||||
fpTitleChooseApp=Select Helper Application
|
fpTitleChooseApp=Select Helper Application
|
||||||
webFeed=Web Feed
|
webFeed=Web Feed
|
||||||
|
videoPodcastFeed=Video Podcast
|
||||||
|
audioPodcastFeed=Podcast
|
||||||
alwaysAsk=Always ask
|
alwaysAsk=Always ask
|
||||||
|
|
||||||
# LOCALIZATION NOTE (pluginName):
|
# LOCALIZATION NOTE (pluginName):
|
||||||
@ -82,3 +84,8 @@ cookiesAll=The following cookies are stored on your computer:
|
|||||||
cookiesFiltered=The following cookies match your search:
|
cookiesFiltered=The following cookies match your search:
|
||||||
removeCookies=Remove Cookies
|
removeCookies=Remove Cookies
|
||||||
removeCookie=Remove Cookie
|
removeCookie=Remove Cookie
|
||||||
|
|
||||||
|
#### Offline apps
|
||||||
|
offlineAppRemoveTitle=Remove offline website data
|
||||||
|
offlineAppRemovePrompt=After removing this data, %S will not be available offline. Are you sure you want to remove this offline website?
|
||||||
|
offlineAppRemoveConfirm=Remove offline data
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
<!ENTITY itemCookies.accesskey "C">
|
<!ENTITY itemCookies.accesskey "C">
|
||||||
<!ENTITY itemCache.label "Cache">
|
<!ENTITY itemCache.label "Cache">
|
||||||
<!ENTITY itemCache.accesskey "a">
|
<!ENTITY itemCache.accesskey "a">
|
||||||
|
<!ENTITY itemOfflineApps.label "Offline Website Data">
|
||||||
|
<!ENTITY itemOfflineApps.accesskey "O">
|
||||||
<!ENTITY itemDownloads.label "Download History">
|
<!ENTITY itemDownloads.label "Download History">
|
||||||
<!ENTITY itemDownloads.accesskey "D">
|
<!ENTITY itemDownloads.accesskey "D">
|
||||||
<!ENTITY itemSessions.label "Authenticated Sessions">
|
<!ENTITY itemSessions.label "Authenticated Sessions">
|
||||||
|
@ -1,3 +1,2 @@
|
|||||||
<!ENTITY cmd_engineManager.label "Manage Search Engines…">
|
<!ENTITY cmd_engineManager.label "Manage Search Engines…">
|
||||||
<!ENTITY cmd_engineManager.accesskey "M">
|
|
||||||
<!ENTITY searchEndCap.label "Search">
|
<!ENTITY searchEndCap.label "Search">
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<!ENTITY listAllTabs.label "List all tabs">
|
<!ENTITY listAllTabs.label "List all tabs">
|
||||||
<!ENTITY bookmarkAllTabs.label "Bookmark All Tabs…">
|
<!ENTITY bookmarkAllTabs.label "Bookmark All Tabs…">
|
||||||
<!ENTITY bookmarkAllTabs.accesskey "T">
|
<!ENTITY bookmarkAllTabs.accesskey "T">
|
||||||
<!ENTITY bookmarkCurTab.label "Bookmark This Tab…">
|
<!ENTITY bookmarkThisTab.label "Bookmark This Tab">
|
||||||
<!ENTITY bookmarkCurTab.accesskey "B">
|
<!ENTITY bookmarkThisTab.accesskey "B">
|
||||||
<!ENTITY undoCloseTab.label "Undo Close Tab">
|
<!ENTITY undoCloseTab.label "Undo Close Tab">
|
||||||
<!ENTITY undoCloseTab.accesskey "U">
|
<!ENTITY undoCloseTab.accesskey "U">
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
# This file is in the UTF-8 encoding
|
||||||
|
[Strings]
|
||||||
|
# LOCALIZATION NOTE (CrashReporterProductErrorText2): The %s is replaced with a string containing detailed information.
|
||||||
|
CrashReporterProductErrorText2=Firefox had a problem and crashed. We'll try to restore your tabs and windows when it restarts.\n\nUnfortunately the crash reporter is unable to submit a crash report.\n\nDetails: %s
|
||||||
|
CrashReporterDescriptionText2=Firefox had a problem and crashed. We'll try to restore your tabs and windows when it restarts.\n\nTo help us diagnose and fix the problem, you can send us a crash report.
|
@ -3,4 +3,5 @@ answers
|
|||||||
creativecommons
|
creativecommons
|
||||||
eBay
|
eBay
|
||||||
google
|
google
|
||||||
|
wikipedia
|
||||||
yahoo
|
yahoo
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user