Compare commits

..

1091 Commits

Author SHA1 Message Date
alex.fritze%crocodile-clips.com
e53b6fbfb5 Correct event client coord handling for listeners on the outermost svg-element.
git-svn-id: svn://10.0.0.236/branches/SVG_0_9_6_BRANCH@111938 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-11 11:53:09 +00:00
alex.fritze%crocodile-clips.com
030c7548ea Make DOM event client coords relative to viewport, bug 118964
git-svn-id: svn://10.0.0.236/branches/SVG_0_9_6_BRANCH@111714 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-09 19:05:46 +00:00
alex.fritze%crocodile-clips.com
ffab6f1106 Fix foreignObject reflow issues (bug 114423). Part by <james.turner@crocodile-clips.com>.
git-svn-id: svn://10.0.0.236/branches/SVG_0_9_6_BRANCH@110429 18797224-902f-48f8-a5cc-f745e15eee43
2001-12-13 19:16:15 +00:00
alex.fritze%crocodile-clips.com
4aaec1935a Remove debug spam.
git-svn-id: svn://10.0.0.236/branches/SVG_0_9_6_BRANCH@109831 18797224-902f-48f8-a5cc-f745e15eee43
2001-12-06 11:59:50 +00:00
alex.fritze%crocodile-clips.com
fafbcc7be3 Backing out libart native pixel format support, because it breaks on Windows and Linux.
git-svn-id: svn://10.0.0.236/branches/SVG_0_9_6_BRANCH@109356 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-30 11:47:22 +00:00
alex.fritze%crocodile-clips.com
99f2ee1e34 Native pixel format support for libart (#111152). Patch by <james.turner@crocodile-clips.com>.
git-svn-id: svn://10.0.0.236/branches/SVG_0_9_6_BRANCH@109232 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-29 16:21:23 +00:00
alex.fritze%crocodile-clips.com
6c001b9b2b Native pixel format support for libart (#111152). Patch by <james.turner@crocodile-clips.com>.
git-svn-id: svn://10.0.0.236/branches/SVG_0_9_6_BRANCH@109210 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-29 12:47:42 +00:00
alex.fritze%crocodile-clips.com
ff39eca2f5 Make nsRenderingContextMac ref-count offscreens (#93217). Patch by <james.turner@crocodile-clips.com>.
git-svn-id: svn://10.0.0.236/branches/SVG_0_9_6_BRANCH@109208 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-29 12:31:55 +00:00
alex.fritze%crocodile-clips.com
ac7b0dc7e6 Build the branch on Mac. Checkin for <james.turner@crocodile-clips.com>
git-svn-id: svn://10.0.0.236/branches/SVG_0_9_6_BRANCH@109207 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-29 12:00:19 +00:00
alex.fritze%crocodile-clips.com
1f5a65a92d Remove debug spam.
git-svn-id: svn://10.0.0.236/branches/SVG_0_9_6_BRANCH@108997 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-27 10:41:14 +00:00
alex.fritze%crocodile-clips.com
9b2dc895b5 Adjust makefile to pull SVG_0_9_6_BRANCH.
git-svn-id: svn://10.0.0.236/branches/SVG_0_9_6_BRANCH@108906 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-26 18:59:08 +00:00
alex.fritze%crocodile-clips.com
de635e1e26 SVG_0_9_6_BRANCH is now a full branch with all files tagged. client.mak adjusted accordingly.
git-svn-id: svn://10.0.0.236/branches/SVG_0_9_6_BRANCH@108900 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-26 17:11:27 +00:00
alex.fritze%crocodile-clips.com
22406a667c Getting rid of debug spam.
git-svn-id: svn://10.0.0.236/branches/SVG_0_9_6_BRANCH@108893 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-26 12:06:36 +00:00
alex.fritze%crocodile-clips.com
c9c8a73bc8 Fix for bug 111361 (<jst@netscape.com>). nsGlobalNameStruct::mDOMClassInfoID is only valid on nsGlobalNameStruct's whose mType == eTypeClassConstructor.
git-svn-id: svn://10.0.0.236/branches/SVG_0_9_6_BRANCH@108875 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-25 19:22:57 +00:00
alex.fritze%crocodile-clips.com
6f4fa2271f Fix art_render path filling (bug#110976. Patch by <james.turner@crocodile-clips.com>.
git-svn-id: svn://10.0.0.236/branches/SVG_0_9_6_BRANCH@108856 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-24 15:10:10 +00:00
alex.fritze%crocodile-clips.com
7e5b97fcfb Fix trees in anonymous content (bug #68936).
git-svn-id: svn://10.0.0.236/branches/SVG_0_9_6_BRANCH@108838 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-23 16:23:44 +00:00
alex.fritze%crocodile-clips.com
c28a1e36f5 Cache micro-tiles (bug #110979). Patch by <james.turner@crocodile-clips.com>.
git-svn-id: svn://10.0.0.236/branches/SVG_0_9_6_BRANCH@108809 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-22 17:24:02 +00:00
alex.fritze%crocodile-clips.com
c18029f66a Patch for #83631.
git-svn-id: svn://10.0.0.236/branches/SVG_0_9_6_BRANCH@108803 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-22 14:59:06 +00:00
alex.fritze%crocodile-clips.com
8876f60a2b Make makefile pull SVG_0_9_6_BRANCH, a 'stable' SVG/Mozilla minibranch based off the 0.9.6 Mozilla milestone.
git-svn-id: svn://10.0.0.236/branches/SVG_0_9_6_BRANCH@108802 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-22 14:56:06 +00:00
(no author)
aecb4fac23 This commit was manufactured by cvs2svn to create branch 'SVG_0_9_6_BRANCH'.
git-svn-id: svn://10.0.0.236/branches/SVG_0_9_6_BRANCH@108662 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-21 03:21:14 +00:00
blizzard%redhat.com
275f0054f4 Bug #109569. Fix searching in the bookmarks and history windows.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108584 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-20 16:31:19 +00:00
rginda%netscape.com
a28b39692c bug 110620, r=aaronl, sr=brendan, a=blizzard/drivers
add null pointer check to avoid crash when we're called in unexpected ways.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108504 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-19 22:44:14 +00:00
bzbarsky%mit.edu
77b0be46cf Update 'Get New Theme' link in View menu. Bug 102632, patch by David
Hallowell <dave532@uklinux.net>, r=doron, sr=ben, a=dbaron


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108421 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-18 04:01:24 +00:00
ssu%netscape.com
d823a97a79 fixing bug 108530 - Setup.exe error on install, mozilla launches with full screen empty page. r=curt, sr=dveditz, a=dbaron
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108416 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-18 01:59:59 +00:00
leaf%mozilla.org
90e7223448 extra quote removal, fixes installer build.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108332 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-16 23:40:22 +00:00
peterv%netscape.com
86b2b1f749 Mac debug bustage fix. Patch suggested by jst, sr=jst.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108293 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-16 11:17:52 +00:00
brendan%mozilla.org
be148cdcc0 Check in mstoltz@netscape.com's patch for bug 109113, r/sr=jst&me, a=blizzard -- plus tab expansion per Modeline.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108270 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-16 04:09:38 +00:00
brendan%mozilla.org
f71c6d1ea2 Remove __call__ and add a callback used to check f.caller access for any function object f (109113, r=jst, sr=jband, a=blizzard).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108268 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-16 04:00:16 +00:00
blizzard%redhat.com
13f363642d bug #95833. In GTK frontend, nsWindow::SetTitle() is confused. Use gtk functions to set title in locale-dependent format.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108265 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-16 03:20:37 +00:00
blizzard%redhat.com
be8e21e4ac bug #108530. Setup.exe error on install, mozilla launches with full screen empty page. Simple null checks.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108258 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-16 02:57:33 +00:00
blizzard%redhat.com
55b0af8d62 bug #78442. Crash for scenario test case using execute (blk param not required) - trunk, N610, M095 [@ js_AllocRawStack][@ js_AllocStack]
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108253 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-16 02:47:21 +00:00
blizzard%redhat.com
605fe67f93 bug #110242. crash in textNode.SubstringData()
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108243 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-16 02:24:58 +00:00
blizzard%redhat.com
a5112ba1ae bug #97958. crash on :jar protocol.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108241 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-16 02:18:36 +00:00
blizzard%redhat.com
008c3b9776 Merge back in bug #108543. Get search working again from the autocomplete window.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108227 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-16 02:06:13 +00:00
dbaron%fas.harvard.edu
1e64b9d490 Fix floater state recovery to descend into blocks (which might contain floaters). b=106658 r=kin sr=waterson a=blizzard
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108208 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-15 23:56:28 +00:00
brade%netscape.com
07224c6e6a fix bug #106022; disable unicode input for OS < 9.0 (r=ftang; sr=sfraser; a=blizzard)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108194 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-15 22:08:35 +00:00
kin%netscape.com
8081c1fff1 Fix for bug 108666: No context menu when right clicking on form text widgets
getAttribute() now returns a null object instead of an empty string
  when an attribute does not exist, so expand shortcuts like
  getAttribute().toUpperCase() to the longer form to prevent errors.

r=blakeross@telocity.com  sr=jst@netscape.com  a=roc+moz@cs.cmu.edu


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108184 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-15 19:53:53 +00:00
brendan%mozilla.org
ea4d244607 Don't warn or 'correct' = to == in a condition unless the right operand has greater precedence than == (106244, r=shaver, sr=jband, a=blizzard).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108181 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-15 19:03:15 +00:00
ccarlen%netscape.com
73477ba01a Bug 108383 - If mozilla is started with -P, user prefs will not be read. r=bnesse/sr=alecf/a=blizzard
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108168 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-15 14:53:53 +00:00
hewitt%netscape.com
2d64be86b3 108579 - hiding first column causes empty outliner, r=jag, sr=sspitzer, a=blizzard
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108142 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-15 04:23:22 +00:00
waterson%netscape.com
ba0e792d6e Bug 109143. r=rjc, sr=hyatt, a=blizzard
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108133 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-15 02:07:40 +00:00
waterson%netscape.com
ec3607a31a Bug 108775. r=jag, sr=hyatt, a=blizzard.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108132 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-15 02:06:04 +00:00
waterson%netscape.com
afcc82bb47 Bug 106749. r=tingley, sr=shaver, a=blizzard
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108128 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-15 02:00:00 +00:00
jj%netscape.com
cc9e58875c updated 'vers' 2 resource to 0.9.6 (installer)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108103 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-14 23:51:19 +00:00
andreww%netscape.com
3da7e7e839 bugzilla 108789 r=shliang, sr=hewitt, a=blizzard - tree borders in prefs panels.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108086 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-14 21:47:57 +00:00
morse%netscape.com
f34e6b0530 bug 109360, image blocking blocks the wrong server, r=andre, sr=alecf, a=roc+moz
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108074 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-14 20:24:09 +00:00
bzbarsky%mit.edu
2a0daf7630 Make middle-mouse-paste into password fields work. Bug 109520,
r=fabian, sr=jst, a=blizzard


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108073 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-14 20:12:36 +00:00
leaf%mozilla.org
d998638479 update version string for windows installers
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108069 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-14 19:01:03 +00:00
leaf%mozilla.org
8e05e81ad8 update version string to 0.9.6
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108068 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-14 18:59:06 +00:00
leaf%mozilla.org
764a8c5066 update mac version strings
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108067 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-14 18:58:18 +00:00
leaf%mozilla.org
f9ee3e8583 turn off traceback tables for optimized builds on macos 9
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108066 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-14 18:56:09 +00:00
blizzard%redhat.com
4e4bbbc924 Bug #75372. Get dragging messages to the compose window working again on Linux.
Fix incorrect case in drag flavour. r=jag,rginda sr=sspitzer, a=dbaron


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108063 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-14 15:40:35 +00:00
jfrancis%netscape.com
5eeaf625ad fix for Bug#:107494, when editting in IME mode, you cannot delete last uncommitted character. r=smfr; sr=kin; a=drivers
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108050 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-14 12:47:03 +00:00
sspitzer%netscape.com
da3401bdb9 fix for #109278. changes made to address cards not saved. a=dbaron
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108022 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-14 05:36:33 +00:00
sspitzer%netscape.com
9564772cf9 fix for #108751. problems with the search results pane.
a=blizzard


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@108020 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-14 05:34:59 +00:00
seawood%netscape.com
fac4ca02d3 Update mail meta module lists with smimestub library info.
Bug #109432 sr=waterson a=blizzard


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@107976 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-14 01:07:00 +00:00
rbs%maths.uq.edu.au
a804cdb595 fix typo that caused font download to stop working. b=106633 r=yokoyama sr=waterson a=blizzard
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@107971 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-13 21:53:24 +00:00
attinasi%netscape.com
8b75c85dd6 Forgot to mark BINARY when originally added. Replacing with same image now that binary mode is set.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@107968 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-13 20:50:03 +00:00
bstell%netscape.com
140d4c55ae bug 102113: fix crash on 64 bit solaris
r=shanjian@netscape.com, sr=brendan@mozilla.org, a=blizzard


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@107948 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-13 07:15:07 +00:00
leaf%mozilla.org
c7128fa22f branch pull scripts pull from the branch
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@107767 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 21:14:55 +00:00
(no author)
b092f7b1ba This commit was manufactured by cvs2svn to create branch
'MOZILLA_0_9_6_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_6_BRANCH@107738 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 16:18:57 +00:00
blizzard%redhat.com
88f0c76909 null check in stack trace code so we don't crash on some systems. r=bryner, dbaron no bug number.
git-svn-id: svn://10.0.0.236/trunk@107737 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 16:18:56 +00:00
ccarlen%netscape.com
bd1340dc29 Bug 104021 - Profile mgr needs to put necko offline when switching profile. r=dougt,kaie/rs=darin/a=asa
git-svn-id: svn://10.0.0.236/trunk@107736 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 15:32:49 +00:00
kin%netscape.com
d7e3258a81 Fix for bug 106383: regression: new composer doc behaves as if empty
mozilla/editor/libeditor/html/nsHTMLDataTransfer.cpp
  mozilla/editor/libeditor/html/nsHTMLEditRules.cpp
  mozilla/editor/libeditor/html/nsHTMLEditRules.h
  mozilla/editor/libeditor/html/nsHTMLEditor.h
  mozilla/editor/libeditor/text/nsTextEditRules.h

    - Added nsHTMLEditRules::WillLoadHTML() which removes any mBogusNode.
    - Modified nsHTMLEditor::LoadHTML() to call Will/DidDoAction().
    - Changed all references of kOpHTMLLoad to kOpLoadHTML to match
      function name, and added kLoadHTML.

r=jfrancis.netscape.com  sr=sfraser.netscape.com  a=asa@mozilla.org


git-svn-id: svn://10.0.0.236/trunk@107735 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 15:16:03 +00:00
ian.mcgreer%sun.com
eaed36d3e2 fixes pk12util import failure
git-svn-id: svn://10.0.0.236/trunk@107734 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 14:52:19 +00:00
sicking%bigfoot.com
bc75854c14 Make checkboxes without value attribute work.
b=109122 r=bz sr=jst a=asa (for drivers)


git-svn-id: svn://10.0.0.236/trunk@107732 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 06:14:52 +00:00
nelsonb%netscape.com
b4a47a9861 Added a new -o option, to override check on received client auth certs,
forcing those certs to be OK.  -v will now test the SSL_LocalCertificate()
function.  Bug 78959.


git-svn-id: svn://10.0.0.236/trunk@107731 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 05:45:21 +00:00
nelsonb%netscape.com
f14f3467c1 Add code to test new SSL_LocalCertificate() function on first connection,
or on every connection if -vv option is used.  Bug 78959.
Also, the nickname "none" can now be used to prevent performing client
authentication without having to use an invalid password.


git-svn-id: svn://10.0.0.236/trunk@107730 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 05:43:06 +00:00
nelsonb%netscape.com
7e4958958b Add localCert field to sid cache entry so SSL_LocalCertificate can
remember the certs it sent back when it established the SSL session.
Bug 78959.  Also, hold on the certs in the received cert chain until
the SSL connection is complete.  This makes it easier for applications
to look at the entire cert chain after the handshake is over without
having to write their own custom authCert callbacks.  It is backwards
compatible with older NSS SSL applications, but may use more memory.


git-svn-id: svn://10.0.0.236/trunk@107729 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 05:39:36 +00:00
timeless%mac.com
01aa33c91c Bugzilla Bug 109138 platform detection not working on macintosh
r=bbaetz,dkl


git-svn-id: svn://10.0.0.236/trunk@107728 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 05:32:43 +00:00
beard%netscape.com
f512f2bbc3 [not part of build] Bumped version to 1.0d6.
git-svn-id: svn://10.0.0.236/trunk@107727 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 04:48:35 +00:00
morse%netscape.com
739bdf33c1 bug 109163, form-manager fields are shrunken, r=jag,sr=blake,a=asa
git-svn-id: svn://10.0.0.236/trunk@107726 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 04:01:11 +00:00
leaf%mozilla.org
2988195a61 Automated update
git-svn-id: svn://10.0.0.236/trunk@107724 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 03:13:03 +00:00
colin%theblakes.com
b6b0b8afda Make OpenVMS use MKSHLIB_[UN]FORCE_ALL. Remove other cruft that is now
no longer needed. b=108862 r=cls a/driver=asa


git-svn-id: svn://10.0.0.236/trunk@107722 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 03:06:36 +00:00
rweltman%netscape.com
3262a36397 Initial introduction to org.ietf.ldap
git-svn-id: svn://10.0.0.236/trunk@107721 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 01:54:26 +00:00
rweltman%netscape.com
f3926530d5 Initial checkin of org.ietf.ldap classes
git-svn-id: svn://10.0.0.236/trunk@107720 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 01:36:04 +00:00
rweltman%netscape.com
3cc7c008cd ant Makefile for ietfldap
git-svn-id: svn://10.0.0.236/trunk@107719 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 01:26:37 +00:00
relyea%netscape.com
cf843bc9b2 Fix reporting of the label
git-svn-id: svn://10.0.0.236/trunk@107718 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 01:23:47 +00:00
relyea%netscape.com
2abd5c3157 Fix Solaris crash.. don't send more of the template than we need
git-svn-id: svn://10.0.0.236/trunk@107717 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 01:22:48 +00:00
myk%mozilla.org
94f803c2c3 Fix for bug 109048: fixes error when creating attachments without logging in.
Patch by Myk Melez <myk@mozilla.org>.
r=bbaetz,gerv


git-svn-id: svn://10.0.0.236/trunk@107716 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 01:11:09 +00:00
sonja.mirtitsch%sun.com
d1a4dd4f04 fixed email header and tinderbox hyperlink
git-svn-id: svn://10.0.0.236/trunk@107715 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 01:09:17 +00:00
timeless%mac.com
0ff9eafab4 Bugzilla Bug 92533 Region selection button is hidden in Profile Manager
patch by jg@cyberstorm.demon.co.uk r=hwaara sr=ben a=asa


git-svn-id: svn://10.0.0.236/trunk@107714 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 01:07:55 +00:00
peterlubczynski%netscape.com
46a8719065 Mac fix for HTML embed region being painted the default background color bug 83159 r=av sr=sfraser a=asa
git-svn-id: svn://10.0.0.236/trunk@107713 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 00:42:02 +00:00
relyea%netscape.com
2391301a89 Update Library name to match the current library.
git-svn-id: svn://10.0.0.236/trunk@107712 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 00:38:03 +00:00
relyea%netscape.com
cdde8c7dd3 Fix NT process command to something that will work in our environment without requiring new tools.
git-svn-id: svn://10.0.0.236/trunk@107711 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 00:37:12 +00:00
ian.mcgreer%sun.com
d16299751e fips changes. forces login for cert listing.
git-svn-id: svn://10.0.0.236/trunk@107710 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 00:37:03 +00:00
ian.mcgreer%sun.com
1f69c02407 changes to get fips working
git-svn-id: svn://10.0.0.236/trunk@107709 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 00:36:12 +00:00
jband%netscape.com
861f4c54ac fix bug 108915 to unbust XPCOM_STANDALONE. This #ifdef's out calls into code that is only available when i18n is part of the build. This has no impact on the browser or gecko embeddings. r=jst sr=alecf a=blizzard
git-svn-id: svn://10.0.0.236/trunk@107708 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 00:34:56 +00:00
cmanske%netscape.com
ec47fc497c Removed duplicate declaration to make Advanced Edit dialog work, b=109085, r=brade, sr=kin, a=asa-drivers@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@107707 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 00:17:59 +00:00
shrutiv%netscape.com
715d7e0780 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@107706 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 23:58:42 +00:00
brendan%mozilla.org
57a2bb6907 For now (0.9.6), str_replace requires an independent replacement string (108832, r=shaver, sr=jband, a=asa).
git-svn-id: svn://10.0.0.236/trunk@107705 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 23:53:33 +00:00
racham%netscape.com
fddea1c06c Fixing bug 108912. Opening the accountmanager window panel for any activity is having adverse affect on the smtp server of the associated identity. Fixing the situation to use the smtp server of the identity only when the key is valid. In all other cases, default smtp server will be used to send messages. r=ducarroz, sr=sspitzer, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@107704 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 23:40:34 +00:00
beard%netscape.com
e7900f1871 [not part of build] Fix for bug #108054, guard against NULL url parameter.
git-svn-id: svn://10.0.0.236/trunk@107703 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 23:28:47 +00:00
roc+%cs.cmu.edu
57363b125c Fix for bug 108940. r=kmcclusk,sr=attinasi. Initialize nsZPlaceholderView correctly.
git-svn-id: svn://10.0.0.236/trunk@107702 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 23:11:01 +00:00
yokoyama%netscape.com
e3dca6f594 Bug 108712
ISO-8859-16 and Korean (ISO-2022-KR) menu
appears in the wrong submenu.
/r=nhotta; /a=asa


git-svn-id: svn://10.0.0.236/trunk@107701 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 23:05:30 +00:00
cmanske%netscape.com
8c7afa2b65 Fix cutoff of buttons in Spell Check (r=kin, sr=hewitt) and Image Properties (r=brade, sr=ben) dialogs, bugscape b=10888
git-svn-id: svn://10.0.0.236/trunk@107699 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 22:59:58 +00:00
yokoyama%netscape.com
60a2ffd6a1 Bug 108712
ISO-8859-16 and Korean (ISO-2022-KR) menu
appears in the wrong submenu.
/r=nhotta; /a=asa


git-svn-id: svn://10.0.0.236/trunk@107698 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 22:57:29 +00:00
morse%netscape.com
0e128015ac bug 109058, text missing in p3p dialog, r=blake, sr=alecf, a=asa
git-svn-id: svn://10.0.0.236/trunk@107697 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 22:51:18 +00:00
pinkerton%netscape.com
e679e16997 processing UI timers. [not part of build]
git-svn-id: svn://10.0.0.236/trunk@107696 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 22:21:27 +00:00
ian.mcgreer%sun.com
4cf69b3ce3 fix pbe gen bugs
git-svn-id: svn://10.0.0.236/trunk@107695 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 22:11:07 +00:00
tao%netscape.com
0d6a80a4bb 107375: localeVersion update: 0.9.4 -> 0.9.6 in the trunk.
(r=jbetak,sr=dveditz,a=asa), fix smime and ldap parts.


git-svn-id: svn://10.0.0.236/trunk@107694 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 21:50:50 +00:00
jst%netscape.com
0dc194375f Fixing compiler warning, unused variable (debug only). This was pointed out by hidday@geocities.com
git-svn-id: svn://10.0.0.236/trunk@107693 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 21:50:47 +00:00
pinkerton%netscape.com
b144b93211 Fixed up view offsets. Now can pass native NSView as parent for nsChildView for embedding. [not part of build]
git-svn-id: svn://10.0.0.236/trunk@107692 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 21:47:44 +00:00
attinasi%netscape.com
f06a7c002e New image for loading and broken images icons. b=108799 r=kmcclusk sr=waterson a=blizzard/drivers
git-svn-id: svn://10.0.0.236/trunk@107691 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 21:43:54 +00:00
attinasi%netscape.com
3d224b0911 New image for broken images icon. b=108799 r=kmcclusk sr=waterson a=blizzard/drivers
git-svn-id: svn://10.0.0.236/trunk@107690 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 21:37:24 +00:00
attinasi%netscape.com
f288530ace New image for loading images icon. b=108799 r=kmcclusk sr=waterson a=blizzard/drivers
git-svn-id: svn://10.0.0.236/trunk@107689 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 21:36:50 +00:00
ian.mcgreer%sun.com
c63b98c7eb get signtool working
git-svn-id: svn://10.0.0.236/trunk@107688 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 21:23:35 +00:00
mikep%oeone.com
f20b08f057 Fixed bug with having to specify your home directory.
git-svn-id: svn://10.0.0.236/trunk@107687 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 21:05:44 +00:00
bryner%netscape.com
127f609447 Initial checkin of mozilla-style Makefile.in's for calendar. r/a=mikep@oeone.com. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@107686 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 21:00:34 +00:00
ian.mcgreer%sun.com
90f3968ca4 a plethora of changes for handling S/MIME certs
git-svn-id: svn://10.0.0.236/trunk@107685 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 20:46:11 +00:00
evaughan%netscape.com
2bfeba936c bug fixes #107707, 108771, 108773
-r jag -sr hyatt -a asa


git-svn-id: svn://10.0.0.236/trunk@107684 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 20:46:02 +00:00
mkaply%us.ibm.com
861f679532 No bug
r=mkaply, sr=blizzard, a=asa for drivers
OS/2 only - lower tile buffer height and width so we won't tile progressive images


git-svn-id: svn://10.0.0.236/trunk@107683 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 20:36:26 +00:00
timeless%mac.com
59208ea8e0 Fixing bustage:
XML Parsing Error: mismatched tag. Expected: </page>.
Location: file:///mozilla/extensions/wallet/editor/WalletUrlspecific.xul
Line Number 114, Column 3: </window>
--^


git-svn-id: svn://10.0.0.236/trunk@107682 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 19:55:36 +00:00
bzbarsky%mit.edu
89020f859e Fix crash for ftp:// and file:// urls that have no useful extension and
binary data.  r=bbaetz, sr=mscott, a=asa


git-svn-id: svn://10.0.0.236/trunk@107681 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 19:05:22 +00:00
despotdaemon%netscape.com
90a6dfd82c Pseudo-automatic update of changes made by rweltman@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@107680 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 18:11:44 +00:00
ian%hixie.ch
0e1edf614f Also send default values to output.
git-svn-id: svn://10.0.0.236/trunk@107679 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 17:27:07 +00:00
ian%hixie.ch
738e081f7c Implement default values for arguments. getArgument() and createArgument() now take two parameters like setArgument(). Changed the CommandLine module's createArgument() method so that if the user hits enter at the prompt, the default value is used. Added some comments to clarify what is going on with the 'batch' argument. Changed setArgument() and createArgument() in the Arguments module and createArgument() in the CommandLine module to be more efficient (less array copying).
git-svn-id: svn://10.0.0.236/trunk@107678 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 17:09:11 +00:00
ian.mcgreer%sun.com
daed5695b8 fix for windows build
git-svn-id: svn://10.0.0.236/trunk@107677 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 16:59:00 +00:00
ian%hixie.ch
5741b48cad Adding comments to clearly indicate that no dump()s, warn()s or error()s should have a level lower than 5 unless they are not expected to occur during normal operation. Also changing the default level at which the user is notified of problems from 3 to 1.
git-svn-id: svn://10.0.0.236/trunk@107676 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 16:47:25 +00:00
ian%hixie.ch
822aa05814 Added two new hooks into the setup code: a start notification and an end notification. Added the ability to disable the string datasource (causes it to only use the default strings and not the database). Made the string datasource automatically disable itself during configuration, using the two hooks added to the setup code. This removes the warning messages that are output during a clean setup ('could not get string from database', etc).
git-svn-id: svn://10.0.0.236/trunk@107675 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 16:42:42 +00:00
ian.mcgreer%sun.com
492833f7cc use nsinstall not copy on windows
git-svn-id: svn://10.0.0.236/trunk@107674 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 16:20:54 +00:00
ian%hixie.ch
9cc94f02cd Improved error handling for the case where the database configuration doesn't exist and therefore every output attempt raises database errors. Fatal database errors are now fatal, missing database configurations is not. This would be a lot cleaner if Perl exceptions were objects... Also improved some of the error messages.
git-svn-id: svn://10.0.0.236/trunk@107673 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 16:10:21 +00:00
relyea%netscape.com
10748492f6 HP ans Solaris are still down...
git-svn-id: svn://10.0.0.236/trunk@107672 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 15:27:56 +00:00
relyea%netscape.com
992f3ed148 OK, try this again. FreeBL needs Get_Noise in the freebl .so on solaris, so
move the random number stuff there where it belongs.


git-svn-id: svn://10.0.0.236/trunk@107671 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 15:02:25 +00:00
blakeross%telocity.com
a55eb44974 108841 - can't create new news account. r=racham,jmkg sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107670 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 12:41:55 +00:00
leaf%mozilla.org
63f6ee74d5 Automated update
git-svn-id: svn://10.0.0.236/trunk@107668 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 12:28:06 +00:00
jdunn%netscape.com
6e7fe92b09 Reverting back to the previous version of this file (1.3)
The patch submitted by IBM didn't take into account all the conditions
r=cls@seawood.org
a=blizzard@mozilla.org
# 24458


git-svn-id: svn://10.0.0.236/trunk@107667 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 12:18:37 +00:00
jdunn%netscape.com
6417df93ef Fixing the problem with AIX not passing floating point params thru xptinvoke
submitted by pkw@austin.ibm.com
r=cls@seawood.org
a=blizzard@mozilla.org
# 106118


git-svn-id: svn://10.0.0.236/trunk@107666 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 12:17:19 +00:00
jdunn%netscape.com
d982a0c526 setting up AIX to only export NSGetModule from all components
These are if'd AIX only!
r=cls@seawood.org
a=blizzard@mozilla.org
# 108864


git-svn-id: svn://10.0.0.236/trunk@107665 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 12:15:48 +00:00
dp%netscape.com
985d1d4f5d changed usage message
git-svn-id: svn://10.0.0.236/trunk@107660 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 07:45:32 +00:00
dp%netscape.com
b9eeff26ec adding more formatting of prints
git-svn-id: svn://10.0.0.236/trunk@107659 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 07:44:12 +00:00
endico%mozilla.org
4a0f6acf08 Text describing the purpose of this directory from Frank Hecker <hecker@mozilla.org>
git-svn-id: svn://10.0.0.236/trunk@107657 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 06:09:01 +00:00
relyea%netscape.com
8e5904ce24 Fixes to make pkcs12 work correctly:
1) Make pkcs12 pbe function.
   2) add code to allow setting and getting of the key nickname attribute.


git-svn-id: svn://10.0.0.236/trunk@107656 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 05:39:56 +00:00
dp%netscape.com
67f3df9ea1 renaming startup-quick.pl to measure-simple.pl
git-svn-id: svn://10.0.0.236/trunk@107655 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 05:30:16 +00:00
ian.mcgreer%sun.com
930d3a8376 add lookup by email function, try to fix softoken bugs for that (but cert->emailAddr doesn't seem to be set there)
git-svn-id: svn://10.0.0.236/trunk@107653 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 05:19:32 +00:00
ian%hixie.ch
f74c5a2421 Added a little more level 9 verbose debugging feedback to help track down where output is going wrong.
git-svn-id: svn://10.0.0.236/trunk@107651 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 05:07:42 +00:00
hyatt%netscape.com
4446eabbf3 Turn off favicon.ico and remove support for turning it on from the UI. r=hixie, sr=ben, a=asa
git-svn-id: svn://10.0.0.236/trunk@107650 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 05:06:48 +00:00
ian%hixie.ch
97db51b03d Stop complaining about the configuration file missing -- if it is not there then just assume there is nothing to worry about. This makes the output of the initial run with the 'setup' argument a lot quieter.
git-svn-id: svn://10.0.0.236/trunk@107649 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 05:06:27 +00:00
ian%hixie.ch
04036664cd Make the STDOUT generic outputter flush everything it outputs -- this fixes a bug whereby sometimes prompts wouldn't appear until after the user had replied to them.
git-svn-id: svn://10.0.0.236/trunk@107648 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 05:03:57 +00:00
sspitzer%netscape.com
a83c005751 more work for #73868. get sorting to work. NOT PART OF THE BUILD
git-svn-id: svn://10.0.0.236/trunk@107647 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 05:00:29 +00:00
ian.mcgreer%sun.com
e22141b43b fix cert and s/mime profile import issues
git-svn-id: svn://10.0.0.236/trunk@107646 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 04:12:26 +00:00
ian.mcgreer%sun.com
d7dcb593c7 this seems to be needed to get linux linking again. libnss3.so tries to access the C_GetFunctionList entry point to the libsoftokn3.so library directly, and linux complains that it can't find it.
git-svn-id: svn://10.0.0.236/trunk@107645 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 03:44:17 +00:00
justdave%syndicomm.com
e78b6416c2 Fix for bug 99519: timestamps were not being set correctly in the activity table in some situations, and the delta_ts on the
bug itself was not always being updated if dependencies or CCs changed.
Patch by Dave Miller <justdave@syndicomm.com>
r= bbaetz, jake


git-svn-id: svn://10.0.0.236/trunk@107644 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 03:38:12 +00:00
mkaply%us.ibm.com
00a1b58d21 No bug
r=jblanco, sr=blizzard, a=asa for drivers
OS/2 only - better fix for not printing on Lexmark printers


git-svn-id: svn://10.0.0.236/trunk@107643 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 03:28:49 +00:00
dp%netscape.com
873f65621c fixed unclosed html tag
git-svn-id: svn://10.0.0.236/trunk@107642 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 03:24:56 +00:00
dp%netscape.com
0c5c3f78ae first version
git-svn-id: svn://10.0.0.236/trunk@107641 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 03:24:26 +00:00
myk%mozilla.org
3b483d8209 Fix for bug 104652: Duplicate bugs in the dependency tree now get marked with the message "This bug appears elsewhere in this tree." so users know why the bug does not appear to have dependencies.
Patch by Gerv <gerv@mozilla.org>.
r=jake@acutex.net,myk@mozilla.org


git-svn-id: svn://10.0.0.236/trunk@107640 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 02:43:55 +00:00
dbaron%fas.harvard.edu
b941398e09 Add omitted NS_INIT_ISUPPORTS. b=108750 a=blizzard
git-svn-id: svn://10.0.0.236/trunk@107639 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 02:17:43 +00:00
nelsonb%netscape.com
076553af57 Implement new function SSL_LocalCertificate(). Bug 78959.
git-svn-id: svn://10.0.0.236/trunk@107638 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 02:15:38 +00:00
beard%netscape.com
b3bc2391fa [not part of build] Implemented vfprintf redirection using Carbon Event timers. Turned off for now. This means that low-level JVM messages still go to the global system console instead of the Java console.
git-svn-id: svn://10.0.0.236/trunk@107637 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 01:50:35 +00:00
beard%netscape.com
da81066722 [not part of build] Fix for bug #108519, to convert "file:" URLs between HFS+ and POSIX representations.
git-svn-id: svn://10.0.0.236/trunk@107636 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 01:49:05 +00:00
beard%netscape.com
9b11f1b0af [not part of any build] Broke out class declaration from MRJContext.cpp for use in MRJSession.cpp.
git-svn-id: svn://10.0.0.236/trunk@107635 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 01:14:28 +00:00
jaggernaut%netscape.com
eb5b6bfd08 Bug 108359: crash when opening subscribe dialog ( crash in grid code ). patch by evaughan, r=jag, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107634 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 01:14:21 +00:00
myk%mozilla.org
f128dfb46b Fix for bug 108822: Prevent any user from changing their own groupset.
Patch by Jake <jake@acutex.net>.
r=bbaetz,myk


git-svn-id: svn://10.0.0.236/trunk@107633 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 00:54:15 +00:00
myk%mozilla.org
37c1fa29af Fix for bug 108821: Prevent users with any blessgroupset privileges from blessing any group set.
Patch by Jake <jake@acutex.net> and Bradley <bbaetz@cs.mcgill.ca>.
r=jake,myk for Bradley's portion, r=bbaetz,myk for Jake's portion.


git-svn-id: svn://10.0.0.236/trunk@107632 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 00:52:13 +00:00
myk%mozilla.org
f0967cda10 Fix for bug 108812: Prevent users from running queries containing arbitrary SQL.
Patch by Jake <jake@acutex.net>
r=bbaetz,myk


git-svn-id: svn://10.0.0.236/trunk@107631 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 00:49:18 +00:00
relyea%netscape.com
162c530b16 Land BOB_WORK_BRANCH unto the tip.
remove lots of depricated files.
move some files to appropriate directories (pcertdb *_rand
associated headers to soft token, for instance)
rename several stan files which had the same name as other nss files.
remove depricated functions.


git-svn-id: svn://10.0.0.236/trunk@107628 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 00:15:51 +00:00
relyea%netscape.com
c587ffe998 Add -DXP_OS2 so that sysrand.c can pick it up...
git-svn-id: svn://10.0.0.236/trunk@107627 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 00:08:28 +00:00
pschwartau%netscape.com
47b893d895 Initial add. Regression test for bug 108440.
git-svn-id: svn://10.0.0.236/trunk@107626 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 23:20:48 +00:00
dp%netscape.com
991378ff5e first version
git-svn-id: svn://10.0.0.236/trunk@107625 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 23:19:53 +00:00
bbaetz%cs.mcgill.ca
8904a09db5 Require (temporarily) mysql >= 3.23.5 for the ~ operator, needed for the
fix to bug 107718. This should be removed when the group stuff lands (bug
60822).

r=justdave x 2


git-svn-id: svn://10.0.0.236/trunk@107624 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 22:42:32 +00:00
dbaron%fas.harvard.edu
19ac8a8d84 Fix |#ifdef TARGET_CARBON| assertions for bug 104651 to fix blocker bug 108911 (TARGET_CARBON changes only).
git-svn-id: svn://10.0.0.236/trunk@107623 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 22:08:31 +00:00
mikep%oeone.com
e395496a29 Fixing file names.
git-svn-id: svn://10.0.0.236/trunk@107622 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 20:59:04 +00:00
ian.mcgreer%sun.com
96eab15224 fix linux 2.1 also
git-svn-id: svn://10.0.0.236/trunk@107621 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 20:58:09 +00:00
ian.mcgreer%sun.com
6ebb09e576 get linux building again
git-svn-id: svn://10.0.0.236/trunk@107620 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 20:56:18 +00:00
mikep%oeone.com
3d37751e19 Moving files around.
git-svn-id: svn://10.0.0.236/trunk@107619 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 20:41:11 +00:00
dbaron%fas.harvard.edu
7ada03aefc Back out incorrect part of my fix from yesterday that was causing AIX tinderbox bustage. b=107052
git-svn-id: svn://10.0.0.236/trunk@107617 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 20:29:59 +00:00
mikep%oeone.com
c3178b792e Fixing all the license header files.
git-svn-id: svn://10.0.0.236/trunk@107616 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 20:29:04 +00:00
blizzard%redhat.com
e31fa995ed back out rpotts' checkin for bug #106558 since it caused blocker bug #108869. r=mscott
git-svn-id: svn://10.0.0.236/trunk@107614 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 19:56:27 +00:00
mikep%oeone.com
4f2d0a9dac Removing unused docs.
git-svn-id: svn://10.0.0.236/trunk@107612 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 19:50:51 +00:00
relyea%netscape.com
c4b6c5af00 Move map file processing definitions back into base .mk files.
setup up map files so the can be switched on simply by adding a directive to
manifest.mn.


git-svn-id: svn://10.0.0.236/trunk@107611 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 19:34:47 +00:00
mikep%oeone.com
531758dbb4 Adding in calendar files.
git-svn-id: svn://10.0.0.236/trunk@107610 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 19:28:41 +00:00
mikep%oeone.com
b4bb33dac3 Adding in the calendar code.
git-svn-id: svn://10.0.0.236/trunk@107609 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 19:18:46 +00:00
locka%iol.ie
f68e749c8b Workaround for problem in PromiseFlatString class. b=108880 r=adamlock@netscape.com sr=scc@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@107608 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 19:03:39 +00:00
ian.mcgreer%sun.com
8a2c7868fb fix handling of token options, specifically deletion
git-svn-id: svn://10.0.0.236/trunk@107606 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 16:15:29 +00:00
bbaetz%cs.mcgill.ca
9caaabcc10 Bug 101166 - users seeing a bug via _accessible bits should see that its
the group

r=justdave,jake


git-svn-id: svn://10.0.0.236/trunk@107605 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 16:11:33 +00:00
jake%acutex.net
7a6b9817cc Bug 108547 - Make the JavaScript use proper DOM
Patch by Christopher Aillon <caillon@returnzero.com>
r= timeless@bemail.org, kiko@async.com.br


git-svn-id: svn://10.0.0.236/trunk@107604 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 14:58:56 +00:00
nboyd%atg.com
9e9cb2fc7c Patch from Igor:
I suggest to move the code in ScriptableObject.get/put that deals with getter/setter
into separated methods so it would be easy to follow the code and the attached patch
does just that.


git-svn-id: svn://10.0.0.236/trunk@107603 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 14:15:48 +00:00
seawood%netscape.com
c29db87705 Oops. That wasn't supposed to go in yet. Fixing tinderbox bustage
git-svn-id: svn://10.0.0.236/trunk@107600 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 08:09:36 +00:00
jaggernaut%netscape.com
98e92c1ba9 Bug 53057: Fixing up users of implicit |CharT*| conversion operators for nsCString to use |.get()| instead, rr=dbaron, rs=scc
git-svn-id: svn://10.0.0.236/trunk@107597 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 07:52:48 +00:00
jst%netscape.com
246aea4410 Fixing bug 92071. Making sure DOM objects that don't have a class interface (such as <span> elements, there is no nsIDOMHTMLSpanElement) get their prototype chain properly set up. r=hidday@geocities.com, peterv@netscape.com, sr=jband@netscape.com
git-svn-id: svn://10.0.0.236/trunk@107596 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 07:52:41 +00:00
jaggernaut%netscape.com
47ed3411c3 Bug 108734: nsCString::Replace is broken. r=darin, sr=scc
git-svn-id: svn://10.0.0.236/trunk@107594 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 07:43:11 +00:00
ben%netscape.com
df9186e2bc 108816 - add back removed navigation bindings for Windows only. r=waterson, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107593 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 07:38:49 +00:00
dbaron%fas.harvard.edu
e456dfae91 Add a comment explaining how to fix callers that trigger the null-termination assertion. r=jag rs=scc b=104651
git-svn-id: svn://10.0.0.236/trunk@107592 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 07:36:36 +00:00
dbaron%fas.harvard.edu
77c9718bde Move nsDOMCSSAttributeDeclaration into its own file to progress towards moving all of the style system code back into the layout library. r=jst sr=hyatt b=108750
git-svn-id: svn://10.0.0.236/trunk@107591 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 07:06:31 +00:00
waterson%netscape.com
48ee495f01 Bug 100952, round two. This time, maintain a stack of active resources that we're currently building content for. r=tingley@sundell.net, sr=brendan
git-svn-id: svn://10.0.0.236/trunk@107590 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 06:56:39 +00:00
seawood%netscape.com
35772f6f4c Where's the auto-update?
git-svn-id: svn://10.0.0.236/trunk@107589 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 06:41:26 +00:00
hyatt%netscape.com
2518cd7fad Fix for 32087, custom icon support in tabs and url bar. r=andreww, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107588 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 06:40:04 +00:00
seawood%netscape.com
e20a9945a1 Don't even ask
git-svn-id: svn://10.0.0.236/trunk@107587 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 06:39:14 +00:00
brendan%mozilla.org
4566fb535b Fix Function.call(this, 'alert(42)')() so the anonymous function finds its nearest scripted caller's principals (90546, sr=shaver&jband).
git-svn-id: svn://10.0.0.236/trunk@107586 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 06:34:04 +00:00
joki%netscape.com
e4bbbe83de Fix for 71705, stop right click from triggering onclick handlers in base html content, though not in xml/xul/chrome. reviewed a while ago, lost in tree. r:saari,sr:hyatt
git-svn-id: svn://10.0.0.236/trunk@107585 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 06:29:29 +00:00
morse%netscape.com
ecb7927d80 bug 108762, select-user dialog (used in password manager) broken, r=cmankse+bryner,sr=brendan
git-svn-id: svn://10.0.0.236/trunk@107584 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 06:26:33 +00:00
dbaron%fas.harvard.edu
13b5500ba3 Ensure that string literals are used as |const char*| rather than |char*|. r=jag sr=brendan b=107052
git-svn-id: svn://10.0.0.236/trunk@107583 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 06:24:10 +00:00
seawood%netscape.com
c981ebf61c Move defines from config.mk into configure.in
git-svn-id: svn://10.0.0.236/trunk@107582 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 06:13:22 +00:00
seawood%netscape.com
ae8c42a6f4 Silence!
git-svn-id: svn://10.0.0.236/trunk@107581 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 06:06:02 +00:00
seawood%netscape.com
307b0d276b Clean up options
git-svn-id: svn://10.0.0.236/trunk@107580 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 05:52:21 +00:00
dbaron%fas.harvard.edu
ab4b9ed8e0 Fix nsDependentString users who were passing non-NULL terminated buffers. b=104651 rr=jag rs=scc
git-svn-id: svn://10.0.0.236/trunk@107579 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 05:51:27 +00:00
hewitt%netscape.com
307e398404 108778 - dialog should fire ondialogcancel when native window close button clicked, r=cmanske, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107578 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 05:43:03 +00:00
cmanske%netscape.com
e07b4c1b35 Fixed problems relating to new XUL 1.0 changes, b=108670, r=timeless, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107577 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 05:42:41 +00:00
mkaply%us.ibm.com
b835c29c3e Temp fix to try to plug OS/2 only region leak
git-svn-id: svn://10.0.0.236/trunk@107576 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 05:36:32 +00:00
mkaply%us.ibm.com
81d93848f0 #91898
r=robinf
Fix some HTML mistakes in help file


git-svn-id: svn://10.0.0.236/trunk@107573 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 05:31:03 +00:00
mkaply%us.ibm.com
7bdb802715 #105476
r=os2team, sr=brendan@mozilla.org
Add ASM implementation of js_CompareAndSwap for OS/2 VACPP


git-svn-id: svn://10.0.0.236/trunk@107572 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 05:20:33 +00:00
dbaron%fas.harvard.edu
c8f7ebfe63 Fix nsDependentString users not to pass null buffers. b=104651 r=jag rs=scc
git-svn-id: svn://10.0.0.236/trunk@107571 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 05:11:46 +00:00
mkaply%us.ibm.com
6b3dd9d642 OS/2 only - let's be more like Windows
git-svn-id: svn://10.0.0.236/trunk@107570 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 05:11:34 +00:00
attinasi%netscape.com
2fffc35507 Default value for pref to override broken-image layout. b=102281 r=kmcclusk sr=waterson
git-svn-id: svn://10.0.0.236/trunk@107569 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 05:05:52 +00:00
attinasi%netscape.com
9e73b286fe Due to popular demand, broken images are now getting an icon and a sized-box if they have width and height and are in QuirksMode documents (see bug for pref to override). b=102281 r=kmcclusk sr=waterson
git-svn-id: svn://10.0.0.236/trunk@107568 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 05:02:42 +00:00
dbaron%fas.harvard.edu
ab5246a768 Really fix HPUX bustage. b=108597
git-svn-id: svn://10.0.0.236/trunk@107567 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 04:52:19 +00:00
rpotts%netscape.com
784b2dd57b bug #106558 (r=darin@netscape.com, sr=mscott@netscape.com) Do not call a consumers OnStartRequest() if an error has already occurred...
git-svn-id: svn://10.0.0.236/trunk@107566 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 04:50:35 +00:00
mkaply%us.ibm.com
858853ff87 #95106
r=pavlov, sr=waterson
Get 256 colors working again - step 3 - handle palette messages in nsWindow


git-svn-id: svn://10.0.0.236/trunk@107565 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 04:45:21 +00:00
mkaply%us.ibm.com
7cfa8e64c4 #95106
r=pavlov, sr=waterson
Get 256 colors working again - step 2 - add back palette stuff back to Windows GFX


git-svn-id: svn://10.0.0.236/trunk@107564 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 04:44:14 +00:00
mkaply%us.ibm.com
5f475d64f6 #95106
r=pavlov, sr=waterson
Get 256 colors working again - step 1 - add back palette API to nsDeviceContext


git-svn-id: svn://10.0.0.236/trunk@107563 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 04:36:47 +00:00
markh%activestate.com
f9f77e73de Update to Python XPCOM for recent breaking changes:
* Freeze/Modifications to nsIObserver and nsIServiceManager
* Header file re-organization.

Thanks to Christof Meerwald for the basis of this patch.

Not part of the build.


git-svn-id: svn://10.0.0.236/trunk@107562 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 04:32:37 +00:00
attinasi%netscape.com
0ed5164758 Export GetAltTextfor as static member fcn. b=102281 r=kmcclusk sr=waerson
git-svn-id: svn://10.0.0.236/trunk@107561 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 04:32:25 +00:00
ccarlen%netscape.com
ca270b69bf Bug 104020 - send out notification after SetOffline has completed, respond to profile change notifications. r=dougt/sr=darin
git-svn-id: svn://10.0.0.236/trunk@107560 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 04:26:19 +00:00
waterson%netscape.com
f0d9433954 Bug 108736. Lurn tuh speel. r=tingley@sundell.net, sr=shaver@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@107559 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 04:25:41 +00:00
waterson%netscape.com
840acb0db5 Bug 103959. Maintain nsTemplateMatch::mBindingDependencies so that we don't leave dangling references in the nsConflictSet::mBindingDependencies table. r=tingley@sundell.net, sr=shaver@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@107558 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 04:24:51 +00:00
dbaron%fas.harvard.edu
25428c5c64 Quiet annoying warning on HP by using the two-step NS_STATIC_CAST that is really meant here. r=jag sr=brendan b=107052
git-svn-id: svn://10.0.0.236/trunk@107557 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 04:12:24 +00:00
dbaron%fas.harvard.edu
52bea38360 Add assertions that users of nsDependentC?String meet the requirements of nsAFlatC?String. Add nsDependentSingleFragmentC?Substring for users that don't. Additional cleanup after bug 100214. b=104651 r=jag sr=scc
git-svn-id: svn://10.0.0.236/trunk@107556 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 04:12:20 +00:00
roc+%cs.cmu.edu
a38af362a7 Bug 73382. Let the view code work with nsView*/nsViewManager* internally and migrate some methods from public to private to the view module. Also deCOMify those methods for speed. r=kmmclusk,sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@107555 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 04:05:38 +00:00
blakeross%telocity.com
689da41ca0 autocomplete dialog shouldn't be resizable. r/sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107554 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 04:05:20 +00:00
beard%netscape.com
9f6db5a709 [not part of build] Bumped version to 1.0d5.
git-svn-id: svn://10.0.0.236/trunk@107552 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 04:05:07 +00:00
beard%netscape.com
5e987d2489 [not part of build] First cut at proxied security for raw LiveConnect calls into Java. Doesn't switch threads any longer.
git-svn-id: svn://10.0.0.236/trunk@107551 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 04:00:35 +00:00
beard%netscape.com
f3cecbf649 [not part of build] Added JNIRunnable to support security proxying.
git-svn-id: svn://10.0.0.236/trunk@107550 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 03:58:47 +00:00
beard%netscape.com
dcb61be6c1 [not part of build] Implemented getApplet() for LiveConnect scripting of applets.
git-svn-id: svn://10.0.0.236/trunk@107549 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 03:58:00 +00:00
beard%netscape.com
de4545ac35 [not part of build] Simplest possible class to provide a security proxy for raw LiveConnect calls into Java.
git-svn-id: svn://10.0.0.236/trunk@107548 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 03:56:52 +00:00
beard%netscape.com
969e21496b [not part of build] Forked for MRJPluginCarbon, to provide class loader caching, and preloading of LiveConnectProxy.
git-svn-id: svn://10.0.0.236/trunk@107547 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 03:56:47 +00:00
beard%netscape.com
6191900cab [not part of build] Added LiveConnectProxy.java, rearranged some entries, added additional access paths to use some Caps classes.
git-svn-id: svn://10.0.0.236/trunk@107546 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 03:54:09 +00:00
sspitzer%netscape.com
67ee809929 more work for converting AB results pane to outliner.
bug #73868.  not part of the build


git-svn-id: svn://10.0.0.236/trunk@107545 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 03:46:17 +00:00
hyatt%netscape.com
db67978a0a Fix for 108318 make ICO decoder non-incremental. r=pav, sr=waterson
git-svn-id: svn://10.0.0.236/trunk@107544 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 03:28:51 +00:00
hyatt%netscape.com
79374b514b Fix for 108318 make ICO decoder non-incremental. r=pav, sr=waterson
git-svn-id: svn://10.0.0.236/trunk@107543 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 03:27:58 +00:00
peterlubczynski%netscape.com
ecf99805e4 Fix for NPN_PostURL not always working correctly [like with binary file data] bug 105417 r=av sr=darin
git-svn-id: svn://10.0.0.236/trunk@107542 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 03:03:04 +00:00
law%netscape.com
e7d529ebd1 Bug 102350; it's just a little disk; r=jag, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107541 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 02:54:28 +00:00
law%netscape.com
1e545b2e81 Bug 100406 (patch submitted by Mike Kaply); size to content before centering; this is necessary because we change the content; r=law, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107540 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 02:50:43 +00:00
ian%hixie.ch
78c02b74a7 Disambiguate the names of the two methods 'hash' and 'sort'. They are now called 'genericHash' and 'genericSort' so as not to clash with the perl builtins 'CORE::hash' and 'CORE::sort'.
git-svn-id: svn://10.0.0.236/trunk@107539 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 02:49:21 +00:00
ian%hixie.ch
2923002831 Changing the shebang to point to a more likely location of the perl interpreter.
git-svn-id: svn://10.0.0.236/trunk@107538 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 02:46:38 +00:00
sgehani%netscape.com
e94a6acda8 Eliminate warnings.
b = 79336
r = sgehani (checking in sfraser's patch)
rs = alecf


git-svn-id: svn://10.0.0.236/trunk@107537 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 02:43:39 +00:00
sgehani%netscape.com
714b51280f Don't change window size on load.
b = 99725
r = matt
sr = blake


git-svn-id: svn://10.0.0.236/trunk@107536 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 02:41:53 +00:00
karnaze%netscape.com
7265213615 bug 105166 - additional patch to place rounding code in the right place. sr=attinasi.
git-svn-id: svn://10.0.0.236/trunk@107535 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 02:38:49 +00:00
loadrunner%betak.net
bfeea864ea bug 106536 Blank charset list in SaveAs charset of HTML composer, r=cmanske, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107534 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 02:32:58 +00:00
sgehani%netscape.com
5042bb2d30 Fix bustage from last checkin.
git-svn-id: svn://10.0.0.236/trunk@107533 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 02:30:18 +00:00
ian%hixie.ch
76d8c32a10 Initial checkin of the first PLIF test application.
git-svn-id: svn://10.0.0.236/trunk@107532 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 01:42:05 +00:00
dbaron%fas.harvard.edu
f4593f1a78 Let's not put crucial XP includes in |#ifdef XP_WIN|. Fixing bustage.
git-svn-id: svn://10.0.0.236/trunk@107530 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 01:32:44 +00:00
peterlubczynski%netscape.com
da662eeea7 Fix for when the browser calls "Destroy" twice for some XPCOM plugins bug 104038 r=av sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@107529 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 01:12:14 +00:00
cls%seawood.org
8a19b66a7c make our 64-bit platforms happy and use the macro to cast from pointer to int.
git-svn-id: svn://10.0.0.236/trunk@107528 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 01:08:26 +00:00
kmcclusk%netscape.com
d0fb62d700 Fix leak of parser objects when page load is interrupted by calling nsParser::CancelParsingEvents inside nsParser::Terminate; bug 108049 (patch from aaronr@us.ibm.com) r=harishd sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@107527 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 01:02:56 +00:00
peterlubczynski%netscape.com
c93017e863 Fix for using OS temp directory for plugin temporary files instead of profile bug 104859 r=av sr=darin
git-svn-id: svn://10.0.0.236/trunk@107526 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 01:00:24 +00:00
hewitt%netscape.com
28703b942c 108759 - nsDOMEvent::InitEvent is throwing away screen/client coordinates, r=hyatt, sr=jst
git-svn-id: svn://10.0.0.236/trunk@107525 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 00:54:02 +00:00
sspitzer%netscape.com
154d93971a new css file for switching ab over to outliner.
NOT PART OF THE BUILD. #73868


git-svn-id: svn://10.0.0.236/trunk@107524 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 00:27:09 +00:00
shliang%netscape.com
07ceb9e71c bug 61244. some classic skin files missing namespace. r=andreww, sr=hewitt.
git-svn-id: svn://10.0.0.236/trunk@107523 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 00:25:21 +00:00
brendan%mozilla.org
c1526a5251 Avoid recursive join/toString death (108440, r=shaver, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@107522 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 00:15:44 +00:00
loadrunner%betak.net
83478013af bug 102026 Charset menu misplacing (.), r=nhotta, rs=kin
git-svn-id: svn://10.0.0.236/trunk@107521 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 00:13:18 +00:00
jgaunt%netscape.com
3c4c93afa1 bug 108069 r=aaronl sr=hyatt
groundwork for XUL select accessibility work


git-svn-id: svn://10.0.0.236/trunk@107520 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 00:13:07 +00:00
jgaunt%netscape.com
daab4c1f4c bug 108069 r=aaronl sr=hyatt
groundwork for XUL select accessibility work
lots of suffling stuff around


git-svn-id: svn://10.0.0.236/trunk@107519 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 00:12:16 +00:00
jst%netscape.com
edf83c6cd6 Fixing bug 108651. Don't call nsIDocument::ContentAppended() if nothing was appended (when inserting an empty document fragment). r=harishd@netscape.com, rs=vidur@netscape.com
git-svn-id: svn://10.0.0.236/trunk@107518 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 00:11:36 +00:00
brendan%mozilla.org
d97c123a81 Move the oversized arena back-pointer to a well-aligned header extension lying just behind a->base (108013, sr=waterson&jband).
git-svn-id: svn://10.0.0.236/trunk@107517 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 00:11:22 +00:00
loadrunner%betak.net
ef7e4e3743 bug 97175 startup perf- remove the need of loading of charsetalias.properties files at startup, r=nhotta, sr=kin
git-svn-id: svn://10.0.0.236/trunk@107516 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 00:06:43 +00:00
sfraser%netscape.com
709635468a Clean up after my wonky fixing of the DefaultPlugin project yesterday, and CVS remove the checked in binary (bug 108223).
git-svn-id: svn://10.0.0.236/trunk@107515 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 00:02:42 +00:00
alecf%netscape.com
ff976d776d fix HPUX bustage
git-svn-id: svn://10.0.0.236/trunk@107514 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 00:02:07 +00:00
ddrinan%netscape.com
e6b9c1e197 Bug 108744 - mail compose does not get S/MIME settings. r=javi,sr=mscott
git-svn-id: svn://10.0.0.236/trunk@107513 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 00:00:44 +00:00
radha%netscape.com
9c70ff699d Fix for bug # 108041. Session history misbehaves when _top is replaced after a series of subframe navigations. r=adamlock sr=rpotts.
git-svn-id: svn://10.0.0.236/trunk@107512 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 23:56:45 +00:00
mscott%netscape.com
73de839dd7 *sigh* fix yet another xul syntax regression. text --> label
git-svn-id: svn://10.0.0.236/trunk@107511 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 23:47:42 +00:00
mscott%netscape.com
179c4c0111 Bug #107707 --> add a row element to the grid to make brief mode work again.
r=bienvenu
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@107510 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 23:46:51 +00:00
peterlubczynski%netscape.com
46045b394a Fix for background color not being set on the widget for plugins bug 83159 r=av sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@107509 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 23:46:13 +00:00
av%netscape.com
8c4c191580 Bug 106435 -- handling booleans passed in NPN_SetVariable in backward compatible way, r=peterl, sr=waterson
git-svn-id: svn://10.0.0.236/trunk@107508 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 23:45:01 +00:00
locka%iol.ie
dca063f714 Add flag to prevent saveURI from decompressing gzipped data as it is arriving b=108268 r=bryner@netscape.com sr=blizzard@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@107507 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 23:43:39 +00:00
srilatha%netscape.com
126a9b7f60 Fix for bug # 107558, added getServerList to make ldap prefs work again.
r=dmose,sr=alecf


git-svn-id: svn://10.0.0.236/trunk@107506 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 23:42:58 +00:00
peterlubczynski%netscape.com
0140ed3af2 Fix for loading Carbon plugins that also have a mainRD exported. Fixes load problems with Carbon Shockwave Director bug 106070 r=beard sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@107505 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 23:42:35 +00:00
bryner%netscape.com
ed1fc72b3e Bug 108742 - cannot get a cert. patch from stephen walker, r=bryner, sr=blizzard.
git-svn-id: svn://10.0.0.236/trunk@107504 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 23:39:17 +00:00
blizzard%redhat.com
966e87d540 Bug #107651. Handle drop type text/uri-list. Patch is from James Henstridge <james@daa.com.au>. r=markh, sr=blizzard
git-svn-id: svn://10.0.0.236/trunk@107503 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 23:31:17 +00:00
javi%netscape.com
ef265319b8 This should be the last for Bug 106507.
Forgot to add mimecryp.cpp to the Mac Mime project file.


git-svn-id: svn://10.0.0.236/trunk@107502 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 23:30:24 +00:00
alecf%netscape.com
e769459750 kill DIST_DIRS, LAYOUT_DIRS, and CLIENT_DIRS r=cls
bug 105077


git-svn-id: svn://10.0.0.236/trunk@107501 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 23:16:37 +00:00
karnaze%netscape.com
bfb10c7fae new regression tests, not affecting the build.
git-svn-id: svn://10.0.0.236/trunk@107500 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 23:15:24 +00:00
alecf%netscape.com
b5cc350bd4 fix for minor leak bug 108640 r=jag, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@107499 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 23:14:47 +00:00
darin%netscape.com
6136114f39 fixes bug 108267 "scale back NS_BINDING_REDIRECTED proliferation"
r=gagan, sr=rpotts


git-svn-id: svn://10.0.0.236/trunk@107498 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 23:09:44 +00:00
locka%iol.ie
3c07440a65 Fix duff indentation (tab instead of space). b=78810
git-svn-id: svn://10.0.0.236/trunk@107497 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 23:06:36 +00:00
ducarroz%netscape.com
d6b8386581 Fix for bug 105729. The string need to have at least the same amount of characters than the substring in order to compare them. R=varada, SR=alecf
git-svn-id: svn://10.0.0.236/trunk@107496 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 23:06:24 +00:00
blizzard%redhat.com
cc0b022772 Bug #99174. Limit the length of requests to XDrawString to 32K avoid causing X protocol errors. r=alecf, sr=brendan
git-svn-id: svn://10.0.0.236/trunk@107495 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 23:05:39 +00:00
karnaze%netscape.com
f410e9f281 bug 77982 - consider border/padding on a cell that goes from empty to non-empty during an incremental reflow. sr=attinasi, r=alexsavulov
git-svn-id: svn://10.0.0.236/trunk@107494 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 23:05:32 +00:00
timeless%mac.com
13298d275a Bug 83017 - Frame Info dialog has title 'View Page Info'
patch by db48x@yahoo.com r=fabian, sr=jst


git-svn-id: svn://10.0.0.236/trunk@107493 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 23:01:03 +00:00
karnaze%netscape.com
b87047f2a5 bug 57300 - treat the height attribute on a row similarly to a style height. sr=attinasi, r=alexsavulov
git-svn-id: svn://10.0.0.236/trunk@107492 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 23:00:10 +00:00
ben%netscape.com
778cb24ef4 108462 - Remove Vixen. r=bryner, sr=jst
git-svn-id: svn://10.0.0.236/trunk@107491 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 22:59:55 +00:00
karnaze%netscape.com
8e9ce2be93 bug 30692 - Have children of cell block use the computed width of the cell. sr=attinasi, r=alexsavulov
git-svn-id: svn://10.0.0.236/trunk@107490 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 22:57:17 +00:00
varada%netscape.com
f054d8ebe7 fix for bug #65761 and #108606 -polishing prefill filters;r/sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@107489 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 22:55:37 +00:00
locka%iol.ie
1151308cf0 Add fixup for view-source: URLs. b=78810 r=bzbarsky@mit.edu sr=blizzard@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@107488 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 22:55:30 +00:00
ben%netscape.com
a125c72d9b 90080 - no restart message appears when switching UI language.
r=jag, sr=hyatt


git-svn-id: svn://10.0.0.236/trunk@107487 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 22:55:05 +00:00
pinkerton%netscape.com
1a055590ab Now a .mm. Obsolete.
git-svn-id: svn://10.0.0.236/trunk@107486 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 22:54:39 +00:00
bryner%netscape.com
f51e958f3e Removing obsolete unused files. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@107485 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 22:54:29 +00:00
pinkerton%netscape.com
6b9b19e010 pulling over bryner's changes from widget/src/mac
git-svn-id: svn://10.0.0.236/trunk@107484 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 22:53:51 +00:00
pinkerton%netscape.com
ee51e87c47 removing timer, it's now in toolkit
git-svn-id: svn://10.0.0.236/trunk@107483 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 22:53:25 +00:00
karnaze%netscape.com
d4308b507a bug 107857 - add -moz-show-background value to empty-cells and make that the quirk default. sr=attinasi, r=pierre.
git-svn-id: svn://10.0.0.236/trunk@107482 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 22:52:59 +00:00
pinkerton%netscape.com
04c86d73f7 cocoa'ifying toolkit. moving PLEvent timer here.
git-svn-id: svn://10.0.0.236/trunk@107481 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 22:52:52 +00:00
wtc%netscape.com
71f6b17411 Removed the temporary #if 0.
git-svn-id: svn://10.0.0.236/trunk@107480 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 22:52:12 +00:00
alecf%netscape.com
618d9ec8d7 fix for bug 108684 - cache objects not included in bloat logs
r=gordon, sr=darin


git-svn-id: svn://10.0.0.236/trunk@107479 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 22:51:58 +00:00
alecf%netscape.com
71dee0899c fix for bug 108597 - move mOwnsBuffer and mCharSize into smaller variables to reduce nsStr's overall size
r=jag, sr=waterson


git-svn-id: svn://10.0.0.236/trunk@107478 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 22:50:13 +00:00
despotdaemon%netscape.com
0d2bde26d8 Pseudo-automatic update of changes made by wtc@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@107477 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 22:49:24 +00:00
wtc%netscape.com
c6fcf205bb Bugzilla bug 108708: commented out the "netstat -ni" command for
debugging.  This change will be backed out.


git-svn-id: svn://10.0.0.236/trunk@107475 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 21:34:09 +00:00
ian.mcgreer%sun.com
1d961328df fix for 95983, compiler warning revealed potential bug
git-svn-id: svn://10.0.0.236/trunk@107474 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 20:32:43 +00:00
ian.mcgreer%sun.com
6c8bd66a32 more trust handling stuff
git-svn-id: svn://10.0.0.236/trunk@107473 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 20:16:19 +00:00
rogerl%netscape.com
2fabd4ccad Added Function.call/apply. Fixed bug in exception handling clean-up of
activation stack.


git-svn-id: svn://10.0.0.236/trunk@107472 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 19:45:04 +00:00
pinkerton%netscape.com
ad253d37ca backing out last change to fix mach-o build
git-svn-id: svn://10.0.0.236/trunk@107471 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 18:50:18 +00:00
despotdaemon%netscape.com
7d27a0daad Pseudo-automatic update of changes made by shliang@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@107470 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 18:42:39 +00:00
despotdaemon%netscape.com
97f686d78c Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@107469 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 18:22:14 +00:00
jake%acutex.net
b4c2275ed0 Refixing bug 71840 - The name should be the 'name' should be the same as what the 'href' points it too...
r= justdave@syndicomm.com


git-svn-id: svn://10.0.0.236/trunk@107468 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 18:06:02 +00:00
blizzard%redhat.com
9b6794d44c back out darin's fix for bug #107789 since it caused blocker #108637.
git-svn-id: svn://10.0.0.236/trunk@107466 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 16:32:52 +00:00
pinkerton%netscape.com
4a6332a214 unix linefeeds this time
git-svn-id: svn://10.0.0.236/trunk@107464 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 16:03:52 +00:00
pinkerton%netscape.com
d5a312024f oops, backing out inclusion of nsIEventSink.idl
git-svn-id: svn://10.0.0.236/trunk@107463 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 16:03:02 +00:00
pinkerton%netscape.com
e13b47e743 New EventSink api. [not part of build]
git-svn-id: svn://10.0.0.236/trunk@107462 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 15:59:32 +00:00
mkaply%us.ibm.com
0b9f89f0d8 Oops overwriting wrong codepage
git-svn-id: svn://10.0.0.236/trunk@107461 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 15:54:54 +00:00
pinkerton%netscape.com
0503d1a3d0 First stab at cocoa. [not part of build]
git-svn-id: svn://10.0.0.236/trunk@107459 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 15:46:50 +00:00
pinkerton%netscape.com
ded9d238a5 Remove dependency on nsDynamicMDEF (it's very os9) and removing those
files altogether. [not part of build]


git-svn-id: svn://10.0.0.236/trunk@107458 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 15:46:26 +00:00
pinkerton%netscape.com
d4634aba3d Ifdefs for mach-o build. We do too have a splash screen. r=beard/rs=sfraser.
git-svn-id: svn://10.0.0.236/trunk@107457 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 15:39:06 +00:00
pinkerton%netscape.com
caf8397f30 Stub impl for cocoa [Not part of build]
git-svn-id: svn://10.0.0.236/trunk@107456 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 15:36:12 +00:00
mkaply%us.ibm.com
6009659a90 Forgot some return codes
git-svn-id: svn://10.0.0.236/trunk@107455 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 15:35:41 +00:00
pinkerton%netscape.com
8f7dd9c564 First stab at Cocoa impl of widget. Some code still carbon, copied from
widget/src/mac. [Not part of build].


git-svn-id: svn://10.0.0.236/trunk@107454 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 15:35:24 +00:00
rods%netscape.com
f5b747b20b Minor fix up to my PrintPreview Checkin
Bug 107562


git-svn-id: svn://10.0.0.236/trunk@107452 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 14:34:00 +00:00
despotdaemon%netscape.com
7d103e0331 Pseudo-automatic update of changes made by mikep@oeone.com.
git-svn-id: svn://10.0.0.236/trunk@107451 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 13:49:32 +00:00
dinglis%qnx.com
6eab060ba1 NTO PART OF BUILD
fixed photon bustage


git-svn-id: svn://10.0.0.236/trunk@107450 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 13:33:36 +00:00
jdunn%netscape.com
a6df12a0f6 fixing build bustage on HP's & AIX's new compilers
removing the static keyword from a couple templates
sr=jst@netscape.com
# 106167


git-svn-id: svn://10.0.0.236/trunk@107449 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 13:22:05 +00:00
rods%netscape.com
843ec68778 Initial check in for print preview work it is complied in for Windows and linix only
The bulk of print preview can be turned on/off with NS_PRINT_PREVIEW define
Bug 107562 r=kmcclusk sr=attinasi


git-svn-id: svn://10.0.0.236/trunk@107448 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 12:18:51 +00:00
seawood%netscape.com
e9d30f1ebc Whoops! The glue library is supposed to be static.
Bug #83544


git-svn-id: svn://10.0.0.236/trunk@107447 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 10:50:37 +00:00
pierre%netscape.com
0ef28aebb3 Checked in for fantasai@escape.com. Bug 43220 "author !important rules override user !important rules in user.css". Add User sheets. Rename Backstop sheets into UserAgent. Fix cascading order. r=pierre/sr=hyatt.
git-svn-id: svn://10.0.0.236/trunk@107446 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 10:04:05 +00:00
seawood%netscape.com
03f596acd6 Allow multiple toolkits to be installed in a build by marking the non-default toolkits as "inactive" and placing them in a separate components dir.
Bug #91829 r=jag


git-svn-id: svn://10.0.0.236/trunk@107445 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 09:45:23 +00:00
jst%netscape.com
ba5a80f5bd Fixing bug 108232. Don't flush like mad in the form code now that form state is kept in the content elements and not in the frames. r=jkeiser@iname.com, sr=waterson@netscape.com
git-svn-id: svn://10.0.0.236/trunk@107444 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 09:10:07 +00:00
hyatt%netscape.com
192c50dc19 103097, fire custom events when link elts are added/removed. Helping out the link toolbar folks. r=jag, sr=jst
git-svn-id: svn://10.0.0.236/trunk@107443 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 09:02:55 +00:00
seawood%netscape.com
e469132bc2 Attempt to fix OS/2 bustage by declaring callback function appropriate
git-svn-id: svn://10.0.0.236/trunk@107442 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 08:23:51 +00:00
rbs%maths.uq.edu.au
ec47d909ea Nail a sneaky memory leak in one of the 'A'-functions - initially detected during the comb of bug 103777, r=shanjian, sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@107441 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 08:00:15 +00:00
dbaron%fas.harvard.edu
8c7cfc52d1 Fix inheritance of percentage values for 'line-height' by removing hacks to base percentage values for 'line-height' on the actual value rather than the computed value of 'font-size'. Fix various |const|-ness issues in nsRuleNode. b=97726 r=pierre sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107440 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 07:48:02 +00:00
jkeiser%iname.com
5c1f007583 Fix from jst@netscape.com to URL-escape A NAME (bug 87996)
git-svn-id: svn://10.0.0.236/trunk@107439 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 07:14:40 +00:00
attinasi%netscape.com
f538e7840a Fix for memory leaks in nsRenderingContextImpl and nsrenderingContextWin (patch provided by Dainis Jonitis). b=107532 r=mkaply sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@107438 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 07:11:30 +00:00
dbaron%fas.harvard.edu
e48117359d Take address before casting to avoid confusing the gcc optimizer with what perhaps shouldn't compile anyway. r=pinkerton sr=sfraser b=108585
git-svn-id: svn://10.0.0.236/trunk@107437 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 06:15:40 +00:00
cls%seawood.org
49044f9a3a Remove c++ comment
git-svn-id: svn://10.0.0.236/trunk@107436 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 06:01:59 +00:00
jkeiser%iname.com
e280789a88 Make only text/password/file/hidden elements reset when value attribute is
changed.  (bug 108526).  r=rpotts@netscape.com, sr=jst@netscape.com


git-svn-id: svn://10.0.0.236/trunk@107435 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 05:41:47 +00:00
naving%netscape.com
9849e524b7 104610 r=bienvenu sr=sspitzer Make sure that mSubFolders array does not have duplicates.
git-svn-id: svn://10.0.0.236/trunk@107434 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 05:35:42 +00:00
seawood%netscape.com
01ed6f94df Move generic implementations of mimexpcom & nsMimeContentTypeHandler classes into glue library. Modify vcard, calendar & smimestub handlers to use the generic implementations of the base classes. Remove old non-generic copies of mimexpcom & nsMimeContentTypeHandler .
Bug #83544 r=ducarroz sr=waterson


git-svn-id: svn://10.0.0.236/trunk@107433 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 05:12:09 +00:00
seawood%netscape.com
e448539c27 Use generic mimexpcom & nsMimeContentTypeHandler files from cthandlers/glue.
Bug #83544 r=ducarroz sr=waterson


git-svn-id: svn://10.0.0.236/trunk@107432 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 05:08:26 +00:00
mstoltz%netscape.com
aa1727f913 Bug 105705, temporary fix. Remove security check optmization
from global property access. sr=jst, r=harishd. We will find
a better fix that preserves the optimization, this fix is temporary.


git-svn-id: svn://10.0.0.236/trunk@107431 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 05:04:36 +00:00
seawood%netscape.com
fce1d10fb6 Allow nsinstall to install (copy) directories.
Thanks to pedemont@us.ibm.com (Javier Pedemonte) for the patch.
Bug #76900 r=cls sr=brendan


git-svn-id: svn://10.0.0.236/trunk@107430 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 04:51:47 +00:00
naving%netscape.com
77196885e6 108276. Open the mailbox in PR_RDONLY mode because only read operations are done using
this connection. should cut down closing mailbox (PR_Close()) time.


git-svn-id: svn://10.0.0.236/trunk@107429 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 04:25:28 +00:00
bryner%netscape.com
6ad05b9ea5 Clarifying log message. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@107428 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 04:23:16 +00:00
bryner%netscape.com
532ac12efb Fixing mac bustage. r=cls.
git-svn-id: svn://10.0.0.236/trunk@107427 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 04:15:05 +00:00
darin%netscape.com
0d51dc65ff fixes mac bustage
git-svn-id: svn://10.0.0.236/trunk@107426 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 03:56:00 +00:00
blakeross%telocity.com
ff478ef551 autocomplete dialog shouldn't be resizable. r/sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107425 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 03:40:13 +00:00
sspitzer%netscape.com
514732e6f4 fix build bustage
git-svn-id: svn://10.0.0.236/trunk@107424 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 03:29:02 +00:00
seawood%netscape.com
f30b49edcb silly line-endings
git-svn-id: svn://10.0.0.236/trunk@107423 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 03:20:41 +00:00
despotdaemon%netscape.com
9ff2328aa5 Pseudo-automatic update of changes made by jkeiser@iname.com.
git-svn-id: svn://10.0.0.236/trunk@107422 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 02:52:52 +00:00
darin%netscape.com
902546fa1d fixes bug 107789 "depracate nsIRandomAccessStore (superceded by nsISeekableStream)"
r=dougt, sr=rpotts


git-svn-id: svn://10.0.0.236/trunk@107421 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 02:50:42 +00:00
seawood%netscape.com
89efd0f65a Removed IGNORE_MANIFEST
git-svn-id: svn://10.0.0.236/trunk@107420 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 02:48:37 +00:00
nelsonb%netscape.com
4035d51f10 Attempt to move all the constant tables in secoid.c into the text segment
where they belong.


git-svn-id: svn://10.0.0.236/trunk@107419 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 02:46:37 +00:00
attinasi%netscape.com
dc30e5998c Oops - check for empty damageRect in nsFrame::Invalidate should be DEBUG only. b=103266 r=rbs sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107418 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 02:44:35 +00:00
bryner%netscape.com
ebb951b148 Reorganize nsLookAndFeel so that all of the platform implementations
derive from nsXPLookAndFeel.  Implement a color cache for
nsXPLookAndFeel::GetColor calls.  bug 77941, r=akkana, rs=waterson.


git-svn-id: svn://10.0.0.236/trunk@107417 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 02:41:04 +00:00
despotdaemon%netscape.com
433d3af967 Pseudo-automatic update of changes made by peterb@oeone.com.
git-svn-id: svn://10.0.0.236/trunk@107416 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 02:37:42 +00:00
seawood%netscape.com
f9e4cb25aa Start building content handler glue library.
Bug #83544 r=ducarroz sr=waterson


git-svn-id: svn://10.0.0.236/trunk@107415 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 02:31:08 +00:00
despotdaemon%netscape.com
ba97acdc6d Pseudo-automatic update of changes made by colinp@oeone.com.
git-svn-id: svn://10.0.0.236/trunk@107414 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 02:30:54 +00:00
seawood%netscape.com
8a9fd9e580 Make mimexpcom & nsMimeContentTypeHandler generic enough to be used for any content handler.
Bug #83544 r=ducarroz sr=waterson


git-svn-id: svn://10.0.0.236/trunk@107413 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 02:29:16 +00:00
ddrinan%netscape.com
d0987df95f Missed this as part of landing of S/MIME. r=javi, sr=blizzard
git-svn-id: svn://10.0.0.236/trunk@107412 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 02:17:46 +00:00
stephend%netscape.com
78cfb1bb22 Bug 81041. 'New Account' -> 'Add Account'. r=jglick, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@107411 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 02:14:08 +00:00
attinasi%netscape.com
8e3b74c6cf Reversed the order that width and height are checked in IsEmpty since it is more common to have a height of 0. b=103266 r=rbs sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107410 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:48:36 +00:00
bbaetz%cs.mcgill.ca
74513dad3c Bug 38014 - show localised dates in html dir listing
Also fixes bug 99169 - display html dir listing file sizes in a nicer
format.

r=darin, sr=smfr


git-svn-id: svn://10.0.0.236/trunk@107409 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:46:18 +00:00
sfraser%netscape.com
05c5dfecdc Fix NullPlugin.mcp to build in a Carbon debug build; renaming it to DefaultPlugin.mcp and fixing prefix files. r=beard, sr=fm
git-svn-id: svn://10.0.0.236/trunk@107408 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:45:15 +00:00
attinasi%netscape.com
11481ea927 Elimiate calls to nsFrame::Invalidate when the dirtyRect is empty. Also, removed some invalid code from nsFrame::Invalidate and added DEBUG check to catch later offenders. b=103266 r=rbs sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107407 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:44:20 +00:00
seawood%netscape.com
84b9551c2a Adding makefiles for cthandlers glue lib.
Bug #83544 r=ducarroz sr=waterson


git-svn-id: svn://10.0.0.236/trunk@107406 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:44:07 +00:00
pete%alphanumerica.com
3c8b2b33e3 b=92329, r=ccarlen, sr=brendan
Fix for nsLocalFileUnix ::GetTarget doesn't handle relative symlinks


--pete


git-svn-id: svn://10.0.0.236/trunk@107405 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:42:00 +00:00
ben%netscape.com
8f4806600a 108595 - Add a method for determining whether or not a context menu separator should be shown by determining if there are any items prior to the separator that are not hidden. r=kerz, sr=blake
git-svn-id: svn://10.0.0.236/trunk@107404 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:41:03 +00:00
ben%netscape.com
7c3257d6ab 108595 - prevent a duplicate load of contentAreaContextOverlay.xul which is causing problems for image blocking, and remove an unused script include. r=kerz, sr=blake
git-svn-id: svn://10.0.0.236/trunk@107403 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:40:09 +00:00
ben%netscape.com
074183292e 108595 - "Block Images for this server" menu item not showing up. Remove display:none style rule now that the overlay that includes this overlay (contentAreaContextOverlay.xul) is no longer being loaded twice by navigator. r=kerz, sr=blake
git-svn-id: svn://10.0.0.236/trunk@107402 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:39:36 +00:00
ben%netscape.com
bd62da3fb8 108595 - wallet context items inserted into the wrong position in navigator context menu. regardless of context. Reposition them after the clipboard items. r=kerz, sr=blake
git-svn-id: svn://10.0.0.236/trunk@107401 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:38:48 +00:00
ben%netscape.com
39826bfdaf 108595 - mail send page/link context menu items always showing in Navigator, regardless of context. Ensure that popupshowing event listener gets added. r=kerz, sr=blake
git-svn-id: svn://10.0.0.236/trunk@107400 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:38:03 +00:00
ben%netscape.com
2e2ef977f4 Bug 107842 - Missing menu items from message pane context menu & 107890 - js error loading standalone message window, popup has no properties
- ensure the correct menu items and separators are hidden using newer separator hide logic. r=blake, sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@107399 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:36:51 +00:00
karnaze%netscape.com
572c89cc71 new regression test, not affecting the build.
git-svn-id: svn://10.0.0.236/trunk@107398 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:35:06 +00:00
dinglis%qnx.com
89d08199b2 NOT PART OF BUILD
increased draw buffer


git-svn-id: svn://10.0.0.236/trunk@107397 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:32:44 +00:00
attinasi%netscape.com
841eb99d32 Fixed typo wrt width and height (patch provided by Dainis Jonitis) b=107530 r=mkaply sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@107396 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:28:27 +00:00
dinglis%qnx.com
35f3674b05 NOT PART OF BUILD
small resize opt to use start/end flux when aRepaint not set


git-svn-id: svn://10.0.0.236/trunk@107395 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:27:50 +00:00
sspitzer%netscape.com
fc8f18ede8 work for converting ab results pane from tree to outliner. NOT PART OF THE BUILD.
bug #73868.


git-svn-id: svn://10.0.0.236/trunk@107394 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:27:07 +00:00
danm%netscape.com
17ff11d2db initial (disabled) cut at creating about:blank documents synchronously. part of bug 88229 r=hyatt,rpotts
git-svn-id: svn://10.0.0.236/trunk@107393 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:24:39 +00:00
waldemar%netscape.com
120229a1fc Added :wrap and extended :nowrap to apply as either a paragraph or an inline style
git-svn-id: svn://10.0.0.236/trunk@107392 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:24:13 +00:00
waldemar%netscape.com
eb97b81cf5 Added dump-units
git-svn-id: svn://10.0.0.236/trunk@107391 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:23:17 +00:00
danm%netscape.com
d908e2d3d8 don't show a new chrome window immediately upon creation, but after chrome has loaded. part of bug 88229 r=hyatt,rpotts
git-svn-id: svn://10.0.0.236/trunk@107390 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:22:58 +00:00
waldemar%netscape.com
18741a2d21 Added support for //, assert, and uninitialized vars
git-svn-id: svn://10.0.0.236/trunk@107389 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:22:57 +00:00
blakeross%telocity.com
f1a55693bd minor optimization in radio.xml. r/sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107388 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:22:48 +00:00
waldemar%netscape.com
dac5e56b37 Added dump-regexp
git-svn-id: svn://10.0.0.236/trunk@107387 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:22:45 +00:00
waldemar%netscape.com
cf5f13c0c6 Ensured that styled text doesn't contain non-keyword symbols as styles
git-svn-id: svn://10.0.0.236/trunk@107386 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:22:14 +00:00
danm%netscape.com
c0a163eddd consolidating nsIWebBrowserChrome::CreateBrowserWindow and nsIWindowCreator::CreateChromeWindow. part of bug 88229 r=hyatt,rpotts"
git-svn-id: svn://10.0.0.236/trunk@107384 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:21:03 +00:00
pchen%netscape.com
74029aa39f bug 108539, r=jag, sr=sfraser, need to call NS_IF_RELEASE(mInner) to prevent leak of datasource, also cleaned up create instance call
git-svn-id: svn://10.0.0.236/trunk@107383 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:20:12 +00:00
danm%netscape.com
9eb95d4aed consolidating nsIWebBrowserChrome::CreateBrowserWindow and nsIWindowCreator::CreateChromeWindow. part of bug 88229 r=hyatt,rpotts
git-svn-id: svn://10.0.0.236/trunk@107382 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:19:39 +00:00
blakeross%telocity.com
603326ad56 one brace too many in radio.xml. r/sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107381 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:16:28 +00:00
ducarroz%netscape.com
de4464b584 Fix for bug 108323. Fix regression introduced with my last checkin. For some reason I cannot initialize the LDAP service in one line like other services. R=varada, SR=sspitzer
git-svn-id: svn://10.0.0.236/trunk@107380 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:15:07 +00:00
andreww%netscape.com
81d29352bb bugzilla bug 84532 r=shliang sr=hewitt line break between subject and body of message.
git-svn-id: svn://10.0.0.236/trunk@107379 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:14:06 +00:00
jgaunt%netscape.com
92dd0623c0 bug 108219 fixing filenames so mac's don't choke and adding them to the mcp file
r=hewitt
rs=sfraser


git-svn-id: svn://10.0.0.236/trunk@107378 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:13:32 +00:00
andreww%netscape.com
2ae361eabe bugzilla 59887 mac classic focus ring matches system color - r=shliang sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107377 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:12:11 +00:00
jgaunt%netscape.com
d93f453d48 bug 108219 fixing filenames so Mac's can handle them
r=hewitt
rs=sfraser


git-svn-id: svn://10.0.0.236/trunk@107376 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:11:41 +00:00
cmanske%netscape.com
a46d07c43d Fixed 'New' Composer command, b=106728, r=rcassin, sr=kin
git-svn-id: svn://10.0.0.236/trunk@107375 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:07:45 +00:00
hewitt%netscape.com
f7e3c96729 107415 - navigation problems in randomly ordered wizards, r=kerz, sr=blake
git-svn-id: svn://10.0.0.236/trunk@107374 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:07:35 +00:00
ducarroz%netscape.com
0e52e9b97a Fix for bug 102536. Need to proceed up to the end of the buffer, we were missing the last byte!
Thanks to Geoffrey.R.Gustafson@intel.com & James.P.Gurganus@intel.com for the fix. R=ducarroz, SR=bienvenu


git-svn-id: svn://10.0.0.236/trunk@107373 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:06:57 +00:00
shanjian%netscape.com
492232ac44 #107869 Reply mail doesn't inherit the original charset
r=ducarroz sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@107372 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 01:02:25 +00:00
timeless%mac.com
f571b33b80 Bugzilla Bug 83017 Frame Info dialog has title 'View Page Info'
patch by db48x@yahoo.com r=fabian sr=jst


git-svn-id: svn://10.0.0.236/trunk@107371 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 00:54:15 +00:00
sspitzer%netscape.com
87b004006d fix for regression bug#108604 and few other ab bugs.
1)  collapse the card pane inner box initially so that it doesn't look like crap
before we select a card
2)  "Edit and "Card Properties" is now "Properties"
3)  if a mailing list has focus, "Properties" should bring up the edit mailing list dialog
4)  fix js warnings
r/sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@107370 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 00:54:04 +00:00
sspitzer%netscape.com
7c19329053 fix for #107639. fix broken select offline dialog. horked by recent
grid changes.  r/sr=sspitzer fix by blakeross.


git-svn-id: svn://10.0.0.236/trunk@107369 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 00:50:56 +00:00
sspitzer%netscape.com
ad2a8546b2 fix for #108346. check rv from do_GetService() to prevent crash.
r=ducarroz, sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@107368 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 00:49:17 +00:00
harishd%netscape.com
1bfa4fee99 106746 - DD/DT should not contain each other. r=heikki, sr=attinasi.
99388 - Avoid PR_GetEnv(). sr=attinasi.


git-svn-id: svn://10.0.0.236/trunk@107367 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 00:48:11 +00:00
bzbarsky%mit.edu
4edf8f2b0f Fix inheritance of frameborder in multiply nested framesets. Bug
108164, r=timeless, sr=attinasi


git-svn-id: svn://10.0.0.236/trunk@107366 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 00:44:25 +00:00
yokoyama%netscape.com
b9407d3971 Bug 108383
removing strtok() for parsing -P correctly
as it should be.  strtok() was added by mistake 10430
/r=ccarlen; /sr=alecf


git-svn-id: svn://10.0.0.236/trunk@107365 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 00:44:18 +00:00
jband%netscape.com
9501633b32 better error message when zero passed where object or null expected. bug 108284. r=dbradley sr=shaver. Also, fix uninitilized counter var in debug only code rs=jband
git-svn-id: svn://10.0.0.236/trunk@107364 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 00:40:54 +00:00
despotdaemon%netscape.com
90b9a8240a Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@107363 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 00:34:24 +00:00
blakeross%telocity.com
9c6542ebad 108592 - js error in filepicker. r=ben sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107361 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 23:27:44 +00:00
blakeross%telocity.com
968987e0c4 108592 - js error in filepicker. r=ben sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107360 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 23:26:25 +00:00
jst%netscape.com
77961e0d07 Checking in workaround for blocker bug 108526. Don't force a reset of an input if there's no parent since this causes checkboxes and radio buttons to be reset before all their attributes are added. r=sicking@bigfoot.com, sr=blizzard@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@107359 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 23:20:05 +00:00
blakeross%telocity.com
2cbfcac3d4 108592 - js error in filepicker. r=ben sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107358 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 23:07:20 +00:00
rginda%netscape.com
e94dc5a898 removing dead code, see mozilla/js2
git-svn-id: svn://10.0.0.236/trunk@107357 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 21:46:17 +00:00
rginda%netscape.com
b217ed22ea removing dead code, see mozilla/js2
git-svn-id: svn://10.0.0.236/trunk@107355 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 21:38:18 +00:00
justdave%syndicomm.com
2d28f97361 SECURITY FIX see bug 108385: Due to trusting of passed form fields that shouldn't have been trusted, it was possible to add a comment to a bug pretending to be someone else if you edited the HTML by hand before submitting. The bug form did not include the field in question, but due to legacy processing code, the field was still trusted if it was present.
Patch by Dave Miller <justdave@syndicomm.com>
r= jake x2


git-svn-id: svn://10.0.0.236/trunk@107350 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 20:47:17 +00:00
justdave%syndicomm.com
2218691609 SECURITY FIX see bug 108516: Due to trusting of passed form fields that shouldn't have been trusted, it was possible to file a
bug pretending to be someone else if you edited the HTML by hand before submitting.
Patch by Dave Miller <justdave@syndicomm.com>
r= bbaetz, jake


git-svn-id: svn://10.0.0.236/trunk@107349 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 20:43:35 +00:00
blakeross%telocity.com
97f2c39c6f 108565 - revert hewitt's one-line change. r=hewitt sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107348 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 19:59:44 +00:00
ian.mcgreer%sun.com
c439de9470 fix Stan reference
git-svn-id: svn://10.0.0.236/trunk@107346 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 19:02:49 +00:00
dinglis%qnx.com
2aba19acd5 NOT PART OF BUILD
fixed random crashes and strange rendering due to using a destroyed GC.


git-svn-id: svn://10.0.0.236/trunk@107345 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 18:53:03 +00:00
dinglis%qnx.com
1018f249a0 NOT PART OF BUILD
fixed damage rect translation and clipping


git-svn-id: svn://10.0.0.236/trunk@107344 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 18:51:56 +00:00
rogerl%netscape.com
c56b67d309 Fixed result value of for..in statement. Handling of user throws & runtime
errors combined. Various reader->pos bugs. Added Error & NativeError types.
Added escape & unescape. Fixed bugs in Array.sort & Date settors.


git-svn-id: svn://10.0.0.236/trunk@107343 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 18:05:37 +00:00
ian.mcgreer%sun.com
095fc6a433 note the token imoprt for Stan
git-svn-id: svn://10.0.0.236/trunk@107342 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 17:55:25 +00:00
ian.mcgreer%sun.com
48d7b0f821 code for handling trust through softoken
git-svn-id: svn://10.0.0.236/trunk@107341 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 17:29:27 +00:00
ian.mcgreer%sun.com
7284b139b8 some attribute and session cleanup
git-svn-id: svn://10.0.0.236/trunk@107340 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 17:18:48 +00:00
karnaze%netscape.com
1f1d2d16ec new regression tests, not affecting the build.
git-svn-id: svn://10.0.0.236/trunk@107338 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 17:04:51 +00:00
jaggernaut%netscape.com
1473ada437 Bug 53057: Fixing up users of implicit |CharT*| conversion operators for nsCString to use |.get()| instead, rr=dbaron, rs=scc
git-svn-id: svn://10.0.0.236/trunk@107336 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 15:49:40 +00:00
karnaze%netscape.com
9a49482ec3 bug 107857 - show backgrounds on empty cells in quirks mode. sr=attinasi,r=alexsavulov,hixie
git-svn-id: svn://10.0.0.236/trunk@107335 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 15:32:25 +00:00
karnaze%netscape.com
548b21d542 additional patch for bug 97138 to cache pct height info on row and constrain sum of row height pcts <= 100.
git-svn-id: svn://10.0.0.236/trunk@107334 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 15:15:24 +00:00
mkaply%us.ibm.com
c1f7cb7901 #107688
r=mkaply, sr=blizzard
Special focus handling for combobox scrollbar


git-svn-id: svn://10.0.0.236/trunk@107333 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 14:53:04 +00:00
beard%netscape.com
557e1e3dec fix pluginClassic bustage, r=peterl, sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@107332 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 14:30:05 +00:00
rods%netscape.com
60fde9b724 Initial check in for print preview work it is complied in for Windows and linix only
The bulk of print preview can be turned on/off with NS_PRINT_PREVIEW define
Bug 107562 r=kmcclusk sr=attinasi


git-svn-id: svn://10.0.0.236/trunk@107331 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 14:14:16 +00:00
dinglis%qnx.com
beda200cf0 Not part of build
fixed REQUIRES


git-svn-id: svn://10.0.0.236/trunk@107330 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 13:35:02 +00:00
bzbarsky%mit.edu
8e5d7cf707 Fix the strings returned by .newValue/.prevValue for mutation events
(get rid of extra quotes, always set .prevValue if it exists).  Bug
107526, r=fabian, sr=jst.


git-svn-id: svn://10.0.0.236/trunk@107329 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 13:19:10 +00:00
seawood%netscape.com
5c19e995e1 Backing out last checkin
git-svn-id: svn://10.0.0.236/trunk@107328 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 12:08:31 +00:00
seawood%netscape.com
f06a6e3ecb Removing toolkit dirs from toplevel Makefile
git-svn-id: svn://10.0.0.236/trunk@107327 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 11:22:12 +00:00
mcafee%netscape.com
2ebd539bdc scrape comment
git-svn-id: svn://10.0.0.236/trunk@107326 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 08:50:55 +00:00
hyatt%netscape.com
404bb5a4e2 108318, tweaks/cleanup to ICO decoder. r=pav, sr=jst
git-svn-id: svn://10.0.0.236/trunk@107325 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 08:38:21 +00:00
hyatt%netscape.com
124acde668 Fix for 108486, XUL images should fire onload. r=jkeiser, sr=jst
git-svn-id: svn://10.0.0.236/trunk@107324 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 08:27:01 +00:00
blakeross%telocity.com
250742ac78 108478 - menulist needs default preftype. r=hewitt sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107323 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 08:09:10 +00:00
blakeross%telocity.com
c6ee97c9d2 108478 - menulist needs default preftype of "int". r=hewitt sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107322 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 06:57:38 +00:00
jst%netscape.com
59f4f0adf1 Fixing blocker bug 108198. Make setAttribute('value') change .value until .value is set by JS or user. Patch by John Keiser <jkeiser@iname.com>, r/sr=hyatt@netscape.com, jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@107321 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 06:50:21 +00:00
hyatt%netscape.com
afda6656e2 Fix for 108389. r=jkeiser, sr=jst
git-svn-id: svn://10.0.0.236/trunk@107320 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 06:45:04 +00:00
law%netscape.com
2da9f9bee9 Bug 102017; add code to register as a WinXP start menu internet app; this was code checked in on the 0.9.4 branch; it needed some more work to factor out the application name into a resource on the trunk; r=ssu, sr=blake
git-svn-id: svn://10.0.0.236/trunk@107319 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 06:42:18 +00:00
law%netscape.com
3269b7dc07 Bug 102017; adding string resource for use in configuring start menu on WinXP; need to include resource constant from new interface file; requires changing resource compiler flags in the makefile
git-svn-id: svn://10.0.0.236/trunk@107318 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 06:24:38 +00:00
law%netscape.com
b5fd6816a6 Bug 102017; build new interface with Win32 resource constant needed for WinXP start menu configuration
git-svn-id: svn://10.0.0.236/trunk@107317 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 06:21:21 +00:00
law%netscape.com
d169e24d96 New interface with Win32-specific resource constants for configuring WinXP start menu (for bug 102017); r=ssu, sr=blake
git-svn-id: svn://10.0.0.236/trunk@107316 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 06:20:19 +00:00
jst%netscape.com
464f592ef1 Removing pointless GetIndex() call that does nothing but slow us down. r=jkeiser@iname.com, r=bzbarsky@mit.edu, sr=me.
git-svn-id: svn://10.0.0.236/trunk@107315 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 06:15:14 +00:00
law%netscape.com
a8dfdd90a5 Bug 105507; handle pseudo-error in OnStopRequest when target is redirected; r=pchen, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107314 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 06:13:26 +00:00
bhart00%yahoo.com
240bedba4f Fix for bug 96786, r=bryner sr=blake
git-svn-id: svn://10.0.0.236/trunk@107313 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 05:15:21 +00:00
blakeross%telocity.com
48e1005da3 Fixing js strict warning in stmpserverlist. r=hewitt sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107312 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 04:50:11 +00:00
timeless%mac.com
b2399744c5 Bugzilla Bug 107672 Browser OS/Platform discrimination alg sucks
r=bbaetz, jake
Windows XP references are #'d because of bug 92763


git-svn-id: svn://10.0.0.236/trunk@107311 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 04:44:34 +00:00
pchen%netscape.com
fbf805a148 bug 14824, r=rjc, sr=blake, add LoadBookmarks() and initDatasource() protected member functions
git-svn-id: svn://10.0.0.236/trunk@107310 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 03:13:15 +00:00
pchen%netscape.com
836165bc5b bug 14824, r=rjc, sr=blake, don't read bookmarks.html in nsBookmarksService::Init(), load bookmarks once in ReadBookmarks()
git-svn-id: svn://10.0.0.236/trunk@107309 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 03:13:12 +00:00
pchen%netscape.com
dc6948470c bug 14824, r=rjc, sr=blake, add timeout at end of Startup() which will call nsBookmarksService::ReadBookmarks()
git-svn-id: svn://10.0.0.236/trunk@107308 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 03:12:53 +00:00
alecf%netscape.com
228074f97b fix for bug 108314 - fix crash in nsStringBundle::GetSimpleEnumeration by loading the string bundle before starting the enumeration
sr=blake
(simple fix, no r= because I wanted to get this in before the smoktests monday)


git-svn-id: svn://10.0.0.236/trunk@107307 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 02:33:16 +00:00
blakeross%telocity.com
65dddf5052 stupid whitespace changes.
git-svn-id: svn://10.0.0.236/trunk@107306 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 02:29:54 +00:00
blakeross%telocity.com
e110e5ae9b stupid whitespace changes.
git-svn-id: svn://10.0.0.236/trunk@107305 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 02:03:49 +00:00
blakeross%telocity.com
19f1759160 Er, typo in last patch. r=hewitt sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107304 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 02:01:31 +00:00
blakeross%telocity.com
b42806bc05 These changes never made it in with original xul landing (/embedding). r=hewitt sr=ben
git-svn-id: svn://10.0.0.236/trunk@107303 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 01:50:50 +00:00
blakeross%telocity.com
9da4e7f2d2 Reverting two of joe's previous changes. r=hewitt sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107302 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 00:47:52 +00:00
blakeross%telocity.com
d4cb41191e Reverting two of joe's previous changes. r=hewitt sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107301 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 00:47:16 +00:00
blakeross%telocity.com
d0554596b1 Problems with download header dialog. Also revert line that joe shouldn't have changed. r=hewitt sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107300 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 00:29:39 +00:00
karnaze%netscape.com
d30758e3fc bug 97138 - rework of table, row group, row, cell height code. sr=attinasi, r=alexsavulov
git-svn-id: svn://10.0.0.236/trunk@107299 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 00:15:51 +00:00
bryner%netscape.com
57b929e4bf Fixing up initial enabling of the OK button when saving files. r=timeless, sr=blake,
git-svn-id: svn://10.0.0.236/trunk@107298 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 00:07:38 +00:00
bryner%netscape.com
89157f0cca Bug 107642 -- XUL syntax changes/cleanup. Patch from blake, r=hyatt, sr=ben.
git-svn-id: svn://10.0.0.236/trunk@107297 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 00:00:02 +00:00
peterv%netscape.com
f8a0c5299a Make Double purly static. Fix some bugs and exactness problems in Double::toString and Double::toDouble. Remove the Integer class.
b=96143 r=Pike sr=scc


git-svn-id: svn://10.0.0.236/trunk@107296 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-04 23:28:36 +00:00
sicking%bigfoot.com
608050c81c Make Double purly static. Fix some bugs and exactness problems in Double::toString and Double::toDouble. Remove the Integer class.
b=96143 r=Pike sr=scc


git-svn-id: svn://10.0.0.236/trunk@107295 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-04 23:27:23 +00:00
rods%netscape.com
0d1f12001c Fixing mem leak from my checkin (Bug 107562)
git-svn-id: svn://10.0.0.236/trunk@107294 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-04 11:33:28 +00:00
hyatt%netscape.com
64ae6e4822 Fix for 108403, XUL images don't scale to match pref size. r=andreww, sr=ben
git-svn-id: svn://10.0.0.236/trunk@107293 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-04 09:32:37 +00:00
blakeross%telocity.com
ecb9fd195a Backing out for now because unimplemented parts of xbl are causing problems.
git-svn-id: svn://10.0.0.236/trunk@107292 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-04 07:44:35 +00:00
blakeross%telocity.com
e42b2b810b smoketest blocker 108198, patch by jkeiser. r=ben sr=blake
git-svn-id: svn://10.0.0.236/trunk@107291 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-04 07:15:53 +00:00
darin%netscape.com
412602d284 fixes bug 107719 "avoid extra copy of http request headers"
r=bbaetz, sr=mscott


git-svn-id: svn://10.0.0.236/trunk@107290 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-04 05:50:37 +00:00
darin%netscape.com
0e7ad2f7b9 fixes bug 103070 "No new connections issued when waiting for timeout"
r=bbaetz, sr=mscott


git-svn-id: svn://10.0.0.236/trunk@107289 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-04 05:46:06 +00:00
darin%netscape.com
198888cf9c fixes bug 98884 "Automatic page refresh for Expires META tag not working"
r=gagan, sr=dougt


git-svn-id: svn://10.0.0.236/trunk@107288 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-04 05:33:33 +00:00
rods%netscape.com
85acd13711 Oops, I didn't mean to check this in, removing my change to turn it on again
git-svn-id: svn://10.0.0.236/trunk@107286 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-04 03:40:27 +00:00
blakeross%telocity.com
bb096393c2 Missed a line in Asko's patch.
git-svn-id: svn://10.0.0.236/trunk@107285 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-04 03:39:03 +00:00
bbaetz%cs.mcgill.ca
725fbf3242 Bug 66601 - drag&drop not working form the xul directory view
r=blake, sr=ben


git-svn-id: svn://10.0.0.236/trunk@107284 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-04 03:05:15 +00:00
mkaply%us.ibm.com
de6273fcb6 OS/2 and AIX bustage - the bustage is related to GetAltDevice in nsDeviceContext.h having an ADDREF of a nonconst - the easiest place to fix it is here
git-svn-id: svn://10.0.0.236/trunk@107283 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-04 03:04:01 +00:00
blakeross%telocity.com
6c53b26079 108382 - fix by Asko Tontti (atontti@cc.hut.fi). r=hewitt sr=blake
git-svn-id: svn://10.0.0.236/trunk@107282 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-04 02:59:03 +00:00
blakeross%telocity.com
69b64d953c Bradley doesn't like dir viewer's border. Who am I to disagree? r=hewitt sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107281 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-04 02:38:04 +00:00
rods%netscape.com
fb6e24185d Fix memory leaks, getting nsIWidget and not releasing it, found an extra one also
git-svn-id: svn://10.0.0.236/trunk@107280 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-04 02:37:07 +00:00
hyatt%netscape.com
96786e6f32 Bug 18502 remainder of checkin. Turning it on on the Mac. r/sr=pav,jband
git-svn-id: svn://10.0.0.236/trunk@107279 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-04 02:17:11 +00:00
blakeross%telocity.com
fd495e07d6 Line of text is missing from debug pref pane. r=hewitt sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107278 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-04 02:16:33 +00:00
blakeross%telocity.com
0f5da37f73 Fixing js error. r=hewitt sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107277 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-04 00:56:16 +00:00
blakeross%telocity.com
dd0627559f Fixing js error. r=hewitt sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107276 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-04 00:55:59 +00:00
rods%netscape.com
b0db719a90 Fix for OS2 bustage
git-svn-id: svn://10.0.0.236/trunk@107275 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-04 00:51:40 +00:00
blakeross%telocity.com
4c900542b8 Bookmarks tree has slightly oversized margins. r=hewitt sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107274 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-04 00:45:41 +00:00
blakeross%telocity.com
b4d8e10d3e Statusbar text has slightly oversized margins. r=hewitt sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107273 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-04 00:16:53 +00:00
hyatt%netscape.com
d8f790f6f5 The XUL content sink doesn't block the parser when loading stylesheets and hasn't for six months! Ack ack ack ack ack! Bug 102114. r=jag, sr=brendan
git-svn-id: svn://10.0.0.236/trunk@107272 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 23:41:10 +00:00
blakeross%telocity.com
b465e82eda Removing mistakenly removed flex. r=hewitt sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107271 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 22:33:59 +00:00
pavlov%netscape.com
2567e9d20e fixing compiler bustage. SetSharedPageData needs a return type (of void)
git-svn-id: svn://10.0.0.236/trunk@107270 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 21:49:38 +00:00
blakeross%telocity.com
b9b8f6e63c Readding mistakenly removed flex. r=hewitt sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107269 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 21:25:58 +00:00
blakeross%telocity.com
fa45eff62b No radiobutton selected by default in add directory dialog. r=hewitt sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107268 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 21:02:55 +00:00
blakeross%telocity.com
20c41f1e94 Editor OK buttons aren't disabled when there aren't valid conditions. r=hewitt, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107267 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 18:46:07 +00:00
blakeross%telocity.com
9e39fc1af9 Tab text has big margins in Classic. r=hewitt sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107266 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 18:27:38 +00:00
blakeross%telocity.com
f395816de5 Er, these weren't supposed to go in.
git-svn-id: svn://10.0.0.236/trunk@107265 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 17:17:25 +00:00
blakeross%telocity.com
24266939a2 Yes, I forgot to commit from /profile last night...
git-svn-id: svn://10.0.0.236/trunk@107264 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 16:47:13 +00:00
rods%netscape.com
63cd1d83cc add PrintPreview to make file
git-svn-id: svn://10.0.0.236/trunk@107263 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 16:35:42 +00:00
rods%netscape.com
361213d98a Removing the Print Preview option from the menu
Bug 107562


git-svn-id: svn://10.0.0.236/trunk@107262 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 15:08:08 +00:00
rods%netscape.com
8193b14cae Initial check in for print preview work it is complied in for Windows and linix only
The bulk of print preview can be turned on/off with NS_PRINT_PREVIEW define
Bug 107562 r=kmcclusk sr=attinasi


git-svn-id: svn://10.0.0.236/trunk@107261 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 15:06:24 +00:00
rods%netscape.com
1100db8190 Initial check in for print preview work it is complied in for Windows and linix only
The bulk of print preview can be turned on/off with NS_PRINT_PREVIEW define
Bug 107562 r=kmcclusk sr=attinasi


git-svn-id: svn://10.0.0.236/trunk@107260 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 14:59:39 +00:00
andreas.otte%primus-online.de
b258c8f56c fix bug 61269 ['%' will get URL-escaped to "%25" if not followed by 2
hexadecimal digits] We no longer escape an % which is not followed by
two hex characters, at least not until forced. This is more compatible
with current usage in other browsers. r=dougt@netscape.com,
sr=darin@netscape.com


git-svn-id: svn://10.0.0.236/trunk@107259 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 14:55:57 +00:00
rods%netscape.com
1314032016 Fixed up nsIPrintSettings interface and add a Get/Set method to nsIPrintOptions (only
the setter is implemented at this time) Bug 107399 r=kmcclusk sr=alexf/attinasi


git-svn-id: svn://10.0.0.236/trunk@107258 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 14:45:46 +00:00
rods%netscape.com
6f99861c46 Backing out checkin, I can't believe you have to edit a mcp to checkin
an IDL file


git-svn-id: svn://10.0.0.236/trunk@107257 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 14:17:37 +00:00
peterv%netscape.com
ae91a9160d Mac bustage fix. Rods didn't add nsIPrintSettings.idl to gfxIDL.mcp.
git-svn-id: svn://10.0.0.236/trunk@107256 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 13:50:33 +00:00
rods%netscape.com
79540d990e change &P to &PT so page totals print at bottom
Bug 107340 r=self sr=attinasi


git-svn-id: svn://10.0.0.236/trunk@107255 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 13:05:09 +00:00
rods%netscape.com
e57c1e15e3 Fixed up nsIPrintSettings interface and add a Get/Set method to nsIPrintOptions
(only the setter is implemented at this time)
Bug 107399 r=kmcclusk sr=alexf/attinasi


git-svn-id: svn://10.0.0.236/trunk@107254 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 13:00:40 +00:00
hyatt%netscape.com
aaf9edc30d Fixing 18502, I misapplied the patch and checked in duplicate lines of code. Backing out.
git-svn-id: svn://10.0.0.236/trunk@107253 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 12:08:04 +00:00
hyatt%netscape.com
5cc58cb983 Fixing 18502, I misapplied the patch and checked in duplicate lines of code. Backing out.
git-svn-id: svn://10.0.0.236/trunk@107252 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 12:00:32 +00:00
hyatt%netscape.com
d209765df9 Fix linux bustage.
git-svn-id: svn://10.0.0.236/trunk@107251 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 11:49:08 +00:00
hewitt%netscape.com
8ac8f55982 106637 - DOM inspector not working with tabbrowser, r=jag, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107250 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 11:41:11 +00:00
hewitt%netscape.com
6a4c4da73e fixing various fun regressions from blake's earlier landing, rs=hyatt
git-svn-id: svn://10.0.0.236/trunk@107249 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 11:33:13 +00:00
hewitt%netscape.com
a9d5f8d148 fixing various fun regressions from blake's earlier landing, rs=hyatt
git-svn-id: svn://10.0.0.236/trunk@107248 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 11:27:04 +00:00
hyatt%netscape.com
7419dbb960 Fix linux bustage
git-svn-id: svn://10.0.0.236/trunk@107247 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 10:52:14 +00:00
hyatt%netscape.com
14cf773f2d One more glitch fixed.
git-svn-id: svn://10.0.0.236/trunk@107246 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 10:46:54 +00:00
hyatt%netscape.com
b3c148824a Fix leaks that I just introduced.
git-svn-id: svn://10.0.0.236/trunk@107245 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 10:24:03 +00:00
hyatt%netscape.com
08471b63e6 Oops. Missed a spot.
git-svn-id: svn://10.0.0.236/trunk@107244 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 10:20:30 +00:00
hyatt%netscape.com
8caf8522c8 Fix for 80147, use XUL prototype elements in anonymous content of XBL. r=dbaron, sr=jst
git-svn-id: svn://10.0.0.236/trunk@107243 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 10:12:20 +00:00
hyatt%netscape.com
5eee28774a Fix nebiros bustage.
git-svn-id: svn://10.0.0.236/trunk@107242 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 09:50:31 +00:00
jaggernaut%netscape.com
afb88a1313 Bug 53057: Fixing up users of implicit |CharT*| conversion operators for nsCString to use |.get()| instead, rr=dbaron, rs=scc
git-svn-id: svn://10.0.0.236/trunk@107241 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 09:26:07 +00:00
sspitzer%netscape.com
5bd05615df fix blake's horkage. tomorrow's build is going to be broken all over.
git-svn-id: svn://10.0.0.236/trunk@107240 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 09:04:19 +00:00
bryner%netscape.com
37ef5e7984 Adding the XUL tabindex test to the debug menu. r=hyatt.
git-svn-id: svn://10.0.0.236/trunk@107239 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 08:56:09 +00:00
seawood%netscape.com
e5cacf943a Update LD_LIBRARY_PATH_64 if LD_LIBRARY_PATH_64 is set.
Thanks to Roland Mainz <Roland.Mainz@informatik.med.uni-giessen.de> for the patch.
Bug #91842


git-svn-id: svn://10.0.0.236/trunk@107238 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 08:26:37 +00:00
jst%netscape.com
425fc3a0b6 Fixing bug 108321. Don't waste time using the component manager when creating an nsHTMLAttributes when setting attributes on an element, call NS_NewHTMLAttributes() directly in stead. Also doing some cleaning up in nsHTMLStyleSheet.cpp. r=dbaron@fas.harvard.edu, sr=hyatt@netscape.com
git-svn-id: svn://10.0.0.236/trunk@107237 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 08:13:48 +00:00
hewitt%netscape.com
23dec3a3a9 putting back flex on textbox that blake seems to have 'accidentally' removed
git-svn-id: svn://10.0.0.236/trunk@107236 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 07:35:43 +00:00
sspitzer%netscape.com
0759dc2c43 remove bogus line (from a CVS conflict) that was causing compose to not work.
also, fix a js strict warning.  rs=bienvenu


git-svn-id: svn://10.0.0.236/trunk@107235 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 07:11:29 +00:00
hyatt%netscape.com
f908dd5b01 Fix for 18502, Christian Biesinger's BMP decoder and my ICO decoder. r/sr=pavlov,jband
git-svn-id: svn://10.0.0.236/trunk@107234 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 07:10:51 +00:00
hewitt%netscape.com
aa8fab1820 63728 - Per-platform behavior of Enter key when a button is focused in a dialog, r=ben, sr=blake
git-svn-id: svn://10.0.0.236/trunk@107233 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 07:10:48 +00:00
jst%netscape.com
6807abf7cc Checking in real fix for bug 108175. Don't loose values in text inputs. Patch by jkeiser@iname.com, r=rpotts@netscape.com, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@107232 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 06:52:55 +00:00
seawood%netscape.com
f1dd2317bd Define _BSD_SOURCE for Linux so that linuxppc's libc can find ftruncate.
git-svn-id: svn://10.0.0.236/trunk@107231 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 06:28:49 +00:00
dbaron%fas.harvard.edu
732f1cd8e9 Ensure that text inputs, checkboxes and radios paint over inline element backgrounds that are behind them. Fix a few build warnings. b=107244 r=rods sr=waterson
git-svn-id: svn://10.0.0.236/trunk@107230 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 06:23:19 +00:00
mkaply%us.ibm.com
b1b93562c7 #103633
r=mkaply, sr=blizzard
Don't call BeginDocument twice - causes us to not print on some printers


git-svn-id: svn://10.0.0.236/trunk@107229 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 06:03:40 +00:00
seawood%netscape.com
ede6e9ac78 Tell BSD strip to just strip local & debug symbols rather than all symbols for darwin.
git-svn-id: svn://10.0.0.236/trunk@107228 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 06:01:31 +00:00
leaf%mozilla.org
60db504876 Automated update
git-svn-id: svn://10.0.0.236/trunk@107227 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 05:58:13 +00:00
seawood%netscape.com
313a11a974 Tell BSD strip to just strip local & debug symbols rather than all symbols.
git-svn-id: svn://10.0.0.236/trunk@107226 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 05:57:04 +00:00
bryner%netscape.com
1433be3df4 Removing obsolete native menu code. Not part of the build, r=jag.
git-svn-id: svn://10.0.0.236/trunk@107225 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 05:50:32 +00:00
bbaetz%cs.mcgill.ca
b2918e050d Bug 107718 - mass changes give all changed bugs the groupset of the first
bug in the list.

Do bit fiddling instead of adding groupsets from the first bug.

r=justdave, jake


git-svn-id: svn://10.0.0.236/trunk@107224 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 05:49:23 +00:00
jaggernaut%netscape.com
76b5b52fd6 Bug 53057: Fixing up users of implicit |CharT*| conversion operators for nsCString to use |.get()| instead, rr=dbaron, rs=scc
git-svn-id: svn://10.0.0.236/trunk@107223 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 05:46:51 +00:00
dbaron%fas.harvard.edu
1d7d2b1344 Remove unused stopwatch code. b=107510 r=jag sr=waterson
git-svn-id: svn://10.0.0.236/trunk@107222 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 05:46:18 +00:00
dbaron%fas.harvard.edu
a049f564c0 Remove unused logging code. b=107510 r=jag sr=waterson
git-svn-id: svn://10.0.0.236/trunk@107221 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 05:45:27 +00:00
dbaron%fas.harvard.edu
2073c31ffb Fix up stacktrace-on-crash debugging code in preparation for turning it on by default. b=14989 r=bryner sr=brendan
git-svn-id: svn://10.0.0.236/trunk@107220 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 05:43:25 +00:00
sspitzer%netscape.com
11c4fd3174 add back a default pref. not sure why ducarroz removed it. sr=no one
git-svn-id: svn://10.0.0.236/trunk@107219 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 05:39:53 +00:00
bryner%netscape.com
df9d231bbe Removing obsolete native menu code. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@107218 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 05:38:52 +00:00
dbaron%fas.harvard.edu
b91bf64133 Removing nsIStopwatch.idl, which was never really part of the build. b=107510 r=jag sr=waterson
git-svn-id: svn://10.0.0.236/trunk@107217 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 05:26:55 +00:00
seawood%netscape.com
a86440c24f Removing old beos build config files.
git-svn-id: svn://10.0.0.236/trunk@107216 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 05:19:46 +00:00
dbaron%fas.harvard.edu
e71e3821f0 Fix FMR/FMW caused by translating the space manager right after deleting it. r=jag sr=waterson b=108017
git-svn-id: svn://10.0.0.236/trunk@107215 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 05:18:39 +00:00
pchen%netscape.com
70eb93e919 Add xul window open test
git-svn-id: svn://10.0.0.236/trunk@107214 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 05:17:56 +00:00
pchen%netscape.com
bee6a53f1a Add test flag and timeout for xul window open test
git-svn-id: svn://10.0.0.236/trunk@107213 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 05:16:32 +00:00
mcafee%netscape.com
03cff05558 remove unused remove_build sub.
git-svn-id: svn://10.0.0.236/trunk@107212 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 05:14:10 +00:00
seawood%netscape.com
036b2ab480 Not sure why we're bothering to remove the prefs on a 'make clean' but we should at least use the right dir to remove them from.
Bug #68117


git-svn-id: svn://10.0.0.236/trunk@107211 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 05:12:57 +00:00
dbaron%fas.harvard.edu
2321e43703 Fix silly way to write an assertion. sr=jst
git-svn-id: svn://10.0.0.236/trunk@107210 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 05:11:36 +00:00
seawood%netscape.com
97c87547a6 Only output startup script *_PATH info if debugging.
Thanks to Dawn Endico <endico@mozilla.org> for the patch.
Bug #79039 r=cls


git-svn-id: svn://10.0.0.236/trunk@107209 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 05:05:47 +00:00
ducarroz%netscape.com
9e7bb13646 Fix for bug 104989: Allow the compose window to be recycled instead of closing it, that will save us precious time next time we need a new compose window. R=varada, SR=sspitzer
git-svn-id: svn://10.0.0.236/trunk@107208 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 04:44:43 +00:00
ducarroz%netscape.com
c7bbc9d9ba Fix for bug 104989: Allow the compose window to be recycled instead of closing it, that will save us precious time next time we need a new compose window. Also include fix for bug 108270: Remove ReleaseMessageServiceFromURI. R=varada, SR=sspitzer
git-svn-id: svn://10.0.0.236/trunk@107207 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 04:42:19 +00:00
blakeross%telocity.com
e17d83b612 Readding mistakenly removed line. sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107206 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 04:36:26 +00:00
blakeross%telocity.com
83c5b8a557 107642 - XUL syntax/cleanup landing. Fixes 94470, 96008, 96019, 76800, 102637, 80399, 108303, and removes over a thousand unnecessary or nonsensical attributes. Also fixes 108302, 102366, 102367, 105815. r=sspitzer,cmanske on appropriate parts sr=ben
git-svn-id: svn://10.0.0.236/trunk@107205 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 04:17:02 +00:00
blakeross%telocity.com
1ec9c4480f 107642 - XUL syntax/cleanup landing. Fixes 94470, 96008, 96019, 76800, 102637, 80399, 108303, and removes over a thousand unnecessary or nonsensical attributes. Also fixes 108302, 102366, 102367, 105815. r=sspitzer,cmanske on appropriate parts sr=ben
git-svn-id: svn://10.0.0.236/trunk@107203 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 04:06:54 +00:00
seawood%netscape.com
c71e171653 Moved darwin section to proper platform location.
Added note about why -traditional-cpp is used for darwin.
Added Mac OSX linker options to be used in darwin builds.
Bug #106617


git-svn-id: svn://10.0.0.236/trunk@107202 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 03:57:36 +00:00
leaf%mozilla.org
f606f4f12d Automated update
git-svn-id: svn://10.0.0.236/trunk@107200 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 03:43:15 +00:00
seawood%netscape.com
76780820f4 Backing out fix for remote mach-o builds as it left mach-o builds fragile.
Add TK_CFLAGS back to default CFLAGS/CXXFLAGS.
Bug #107696


git-svn-id: svn://10.0.0.236/trunk@107199 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 03:29:05 +00:00
jst%netscape.com
d489aa86fc Fixing bug 108174. --disable-bidi build bustage. Patch from jkeiser@iname.com, r=sicking@bigfoot.com, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@107198 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 03:25:29 +00:00
ducarroz%netscape.com
33c0102484 Fix Mac bustage (again)
git-svn-id: svn://10.0.0.236/trunk@107195 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 03:11:44 +00:00
rjesup%wgate.com
1c72d387b9 Bug 107600: mCachedIndex isn't initialized for nsContentSubtreeIterators.
Also fixes problems in two spots where the content tree changing could mess
up the iterator.  patch by jfrancis, r=rjesup, sr=waterson


git-svn-id: svn://10.0.0.236/trunk@107194 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 03:05:05 +00:00
rjesup%wgate.com
ac6f3c6b18 Bug 107341: Xlib/xprint xcleanup. New file was missed on first checkin.
r=biesi, r=pocemit, sr=blizzard


git-svn-id: svn://10.0.0.236/trunk@107193 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 02:46:45 +00:00
rjesup%wgate.com
b40dd6ee1d Bug 107341: Xlib/xprint xcleanup. New file was missed on first checkin.
r=biesi, r=pocemit, sr=blizzard


git-svn-id: svn://10.0.0.236/trunk@107192 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 02:39:12 +00:00
sspitzer%netscape.com
bed0909b4d fix for #72458. don't use 'menu class="push"' r=hwaara, sr=sspitzer
fix by neil@parkwaycc.co.uk


git-svn-id: svn://10.0.0.236/trunk@107190 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 02:36:02 +00:00
waterson%netscape.com
3e3e226985 Remove unused variable (no bug). r=dbaron, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107189 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 02:23:20 +00:00
pchen%netscape.com
8e4ab1ac6c bug 68329, r=jag, sr=sfraser, resurrected an old patch from sfraser which
cleans up a lot of the string stuff, had help from jag to clean string
stuff even more


git-svn-id: svn://10.0.0.236/trunk@107188 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 02:22:40 +00:00
bryner%netscape.com
d9f89d04a6 Removing obsolete/unused native menu code. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@107187 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 02:22:33 +00:00
leaf%mozilla.org
cf0d1e09c0 Automated update
git-svn-id: svn://10.0.0.236/trunk@107186 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 02:13:09 +00:00
tor%cs.brown.edu
f9724fd972 Update tree copy of libmng to 1.0.3. rs=blizzard
git-svn-id: svn://10.0.0.236/trunk@107185 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 02:11:26 +00:00
bryner%netscape.com
e83254e15e Removing obsolete remoteControl component. r=sspitzer, blizzard. (also adding new filepicker makefiles to allmakefiles.sh, this is not turned on yet).
git-svn-id: svn://10.0.0.236/trunk@107183 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 02:10:10 +00:00
mcafee%netscape.com
e8398c149a Adding multi-line support.
git-svn-id: svn://10.0.0.236/trunk@107182 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 02:10:05 +00:00
ducarroz%netscape.com
6f5f359e34 Fix Mac bustage. Sorry for the mistake!
git-svn-id: svn://10.0.0.236/trunk@107181 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 02:08:06 +00:00
jst%netscape.com
ab9c4205b6 Fixing leaks in the exception service. Bug 108213. r=dbradley@netscape.com, sr=jband@netscape.com
git-svn-id: svn://10.0.0.236/trunk@107180 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 02:07:20 +00:00
justdave%syndicomm.com
4aaa66afe8 Fix for bug 105773: Email addresses in the CC list are now sorted case-insensitively
Patch by Adam Kennedy <bugzilla@ali.as>
r= justdave x2


git-svn-id: svn://10.0.0.236/trunk@107178 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 02:05:43 +00:00
tor%cs.brown.edu
319437ece8 Bug 108005 - need to clear bits in alpha mirror for interlaced PNGs
and MNG.  r=rjesup, sr=blizzard


git-svn-id: svn://10.0.0.236/trunk@107177 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 02:03:51 +00:00
sspitzer%netscape.com
0994c4a250 fix for regression #108256 cancelling the auto-sub confirm dialog then running the same url again fails silently
fix for regression bug #108251 don't get the "remove group" dialog when there's msg window.
r=hwaara, sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@107176 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 01:56:19 +00:00
mitesh%netscape.com
6afb223e31 reverting back the mapi changes. Including mapi again. Checking in for kkhandrika@netspcae.com
git-svn-id: svn://10.0.0.236/trunk@107174 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 01:45:54 +00:00
rjesup%wgate.com
7d996ba297 Bug 107341: xlib/xprint xcleanup. Checking in for gisburn.
r=biesi, r=pocemit, sr=blizzard


git-svn-id: svn://10.0.0.236/trunk@107173 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 01:39:11 +00:00
hewitt%netscape.com
8ee5216dc9 bug 51314. classic skin has blue directory icons. images by shuehan liang <shliang@netscape.com> r=andreww, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107172 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 01:33:41 +00:00
sspitzer%netscape.com
fa78a71418 bulletproofing fix for #105183 to help us prevent the crash
and track this down.  r/sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@107171 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 01:32:30 +00:00
rjesup%wgate.com
c61dfd44d2 Bug 100069: XPrint infrastructure for dialog. Checkin for gisburn.
r=rjesup, sr=blizzard


git-svn-id: svn://10.0.0.236/trunk@107170 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 01:31:23 +00:00
hewitt%netscape.com
055960ef35 bug 53558. windows classic theme should not use threedface for borders. patch by shuehan liang <shliang@netscape.com> r=jag, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107169 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 01:29:26 +00:00
hewitt%netscape.com
1a6c5ae97f bug 29828. addmore space between menuitem text and keybinding hint. patch by shuehan liang <shliang@netscape.com> r=jag, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107168 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 01:25:22 +00:00
rjesup%wgate.com
1a798c2278 Bug 104260: Font LRU cache confused as to direction of the head. r=rbs,
sr=waterson (converted from r=waterson)


git-svn-id: svn://10.0.0.236/trunk@107167 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 01:23:28 +00:00
hewitt%netscape.com
67f9c6929b bug 67452. modern: server icon out of alignment with twisty. images by shuehan liang <shliang@netscape.com> r=jag, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107166 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 01:22:46 +00:00
mcafee%netscape.com
1b3bef0ad9 cut&paste bug
git-svn-id: svn://10.0.0.236/trunk@107165 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 01:18:39 +00:00
bryner%netscape.com
e2fdbd9b59 Removing unused native menu code. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@107164 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 01:11:22 +00:00
hewitt%netscape.com
625ead88b9 bug 54821. sidebar grippy too thick when collapsed. patch by shuehan liang <shliang@netscape.com> r=jag, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107163 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 01:04:33 +00:00
rangansen%netscape.com
08ac4958c4 r=ssaux ; sr = blizzard ; bug# 83392 ; Handling page info properly, in case of exceptions
git-svn-id: svn://10.0.0.236/trunk@107162 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 01:04:08 +00:00
hewitt%netscape.com
e0c245de1d bug 54821. sidebar grippy too thick when collapsed. patch by shuehan liang <shliang@netscape.com> r=jag, sr=hewittcommunicator/sidebar/win/sidebar.css
git-svn-id: svn://10.0.0.236/trunk@107161 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 01:02:23 +00:00
hewitt%netscape.com
949fedacde bug 67768. composer: active edit mode tab should not use hardcoded white. patch by shuehan liang <shliang@netscape.com> r=jag, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107160 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:59:23 +00:00
rangansen%netscape.com
318758bc6a r=javi ; sr = hewitt ; bug# 89827 ; adding serial number col to cert manager window
git-svn-id: svn://10.0.0.236/trunk@107159 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:56:20 +00:00
mscott%netscape.com
fb007dc1e8 packaging changes for the mac for smime
git-svn-id: svn://10.0.0.236/trunk@107158 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:54:00 +00:00
hewitt%netscape.com
42a66a2d26 bug 88523. autocomplete urls in classic shouldn't have titles in italics. patch by shuehan liang<shliang@netscape.com> r=jag, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107157 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:52:06 +00:00
ducarroz%netscape.com
b2973b1b34 fix for bug 107708. Look at the attachment real name to determine if possible the content-type before looking at the url. R=varada, SR=sspitzer
git-svn-id: svn://10.0.0.236/trunk@107156 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:51:53 +00:00
hewitt%netscape.com
c5fb21320f bug 99631. preview icon in composer tab (ship steering wheel) not entirely transparent. image by shuehan liang <shliang@netscape.com> r=jag, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107155 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:50:15 +00:00
mcafee%netscape.com
61b1f01bc3 Adding basic scrape functionality. Pick off TinderboxPrint: token and print the argument in the corresponding build box. Currently limited to one line, multi-line change coming next.
git-svn-id: svn://10.0.0.236/trunk@107154 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:50:13 +00:00
rangansen%netscape.com
8598aceb0b r=javi ; sr = hewitt ; bug# 89827 ; adding serial number col to cert manager window
git-svn-id: svn://10.0.0.236/trunk@107153 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:49:35 +00:00
mitesh%netscape.com
ba35aa810c Removing mapi from the normal build. Preparing simple MAPI to land on the trunk (bug 104672). Checking in for kkhandrika@netscape.com
git-svn-id: svn://10.0.0.236/trunk@107152 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:46:49 +00:00
ssu%netscape.com
a8c88e225f forgot to disable the creation of the mail shortcut in the quicklaunch bar as part of the fix to bug 28172
git-svn-id: svn://10.0.0.236/trunk@107151 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:45:41 +00:00
kaie%netscape.com
4dd6a65a89 Bug #106507 --> if BUILD_SMIME is defined in the build environment (which it isn't), build the smime extensions directory to add smime support
git-svn-id: svn://10.0.0.236/trunk@107150 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:42:03 +00:00
gordon%netscape.com
c79f4e05cd Fix bug 86474 "nsFileTransports won't truncate files", extends fix to other unix platforms besides linux. Checking in for lidl@pix.net, r=gordon, sr=darin.
git-svn-id: svn://10.0.0.236/trunk@107149 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:39:14 +00:00
mscott%netscape.com
1f3a527255 Bug #106507 --> add new files to the packaging lists for linux and windows.
git-svn-id: svn://10.0.0.236/trunk@107148 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:39:05 +00:00
javi%netscape.com
bf479f147c Part of Bug 106507. add the ability to build S/MIME as part of the client. Leaving off as default for now. But can be turned on with the build preferences.
git-svn-id: svn://10.0.0.236/trunk@107147 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:37:07 +00:00
ssu%netscape.com
2f006a401a fixing bug 28172 - Add shortcut to launch bar. r=sgehani, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@107146 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:34:17 +00:00
javi%netscape.com
5966735e03 Part of 106507 Land the mime project changes so the S/MIME compose can be built. Not turned on it official build though.
git-svn-id: svn://10.0.0.236/trunk@107145 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:34:13 +00:00
pchen%netscape.com
748331065e Not part of build. Update output of test to jive with new tinderbox test
stuff mcafee is doing.


git-svn-id: svn://10.0.0.236/trunk@107144 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:33:56 +00:00
ducarroz%netscape.com
ebfabe30ba Fix for bug 107660. Put back the bracket in front of Fwd: which has been removed by accident. R=varada, SR=bienvenu
git-svn-id: svn://10.0.0.236/trunk@107143 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:33:55 +00:00
mscott%netscape.com
368d1d900e build the extensions directory.
git-svn-id: svn://10.0.0.236/trunk@107142 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:33:28 +00:00
mscott%netscape.com
0dc1ed91df Bug #106507 --> if BUILD_SMIME is defined in the build environment (which it isn't), build
the smime extensions directory to add smime support

This code was contributed by mscott and ddrinan@netscape.com
r=ducarroz
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@107141 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:32:44 +00:00
mscott%netscape.com
91794d36d7 Bug #106507 --> if BUILD_SMIME is defined in the build environment then don't build the smime
stub dll.

The mime changes have been contributed by ddrinan@netscape.com
r=ducarroz
sr=mscott


git-svn-id: svn://10.0.0.236/trunk@107140 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:31:45 +00:00
mscott%netscape.com
a0c8ea554b Bug #106507 --> if BUILD_SMIME is defined in the build environment (which it isn't), build the new smime
files.

The mime changes have been contributed by ddrinan@netscape.com
r=ducarroz
sr=mscott


git-svn-id: svn://10.0.0.236/trunk@107139 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:31:15 +00:00
hewitt%netscape.com
3fe59f450a bug 95385. classic: text on top of box border in debug preferences. patch by shuehan liang <shliang@netscape.com> r=jag, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107138 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:31:06 +00:00
hewitt%netscape.com
c485002a73 bug 68768. failure to fully specify colors in themes. patch by shuehan liang <shliang@netscape.com> r=jag, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107137 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:28:15 +00:00
sspitzer%netscape.com
1a4a8ffbca fix for #35691. addressing widget problems (no To: field) if the
user his new msg when on a news server, and they've got a reply to
address.  r=varada, sr=bienvenu,sspitzer

thanks to neil@parkwaycc.co.uk  for the fix


git-svn-id: svn://10.0.0.236/trunk@107136 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:25:02 +00:00
hewitt%netscape.com
0a98799487 bug 92019. modern mark button has extra arrow visible. patch by shuehan liang <shliang@netscape.com> r=andreww, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107135 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:23:07 +00:00
aaronl%netscape.com
7cc86dcab7 Bug 107858. Active Accessibility: Radio button and checkbox statechange events not working. r=timeless, sr=scc
git-svn-id: svn://10.0.0.236/trunk@107134 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:16:42 +00:00
alecf%netscape.com
ea0c37bf8f REQUIRES cleanup
git-svn-id: svn://10.0.0.236/trunk@107133 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:16:29 +00:00
javi%netscape.com
0d9a3fe6aa NOT PART OF BUILD.
Previous project file was corrupt.  Replace with one on tip of
OTIS_TEST_BRANCH

NOT PART OF BUILD.


git-svn-id: svn://10.0.0.236/trunk@107132 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:15:45 +00:00
rginda%netscape.com
db72e1cb29 bug 108257, "source notes broken for functions compiled via JS_CompileUCFunctionForPrincipals", sr=brendan, r=shaver
no need to emit the function body after calling FunctionBody


git-svn-id: svn://10.0.0.236/trunk@107131 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:10:47 +00:00
yokoyama%netscape.com
9e2820f301 Bug 105113
Read DefaultCharSet from nsPref
when DocumentViewerImpl::mDefaultCharacterSet is
not assigned
/r=bstell and /sr=alecf


git-svn-id: svn://10.0.0.236/trunk@107130 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:06:51 +00:00
mscott%netscape.com
9a2a443bb4 NOT PART OF THE BUILD
Make the security options menu match the spec --> add access keys, make the selection a radio
widget.
r/sr=sspitzer
NOT PART OF THE BUILD


git-svn-id: svn://10.0.0.236/trunk@107129 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:06:32 +00:00
dbradley%netscape.com
e924214090 Bug 94650 - Added warning for scriptable interfaces that inherit from non-scriptable interfaces. r=jst, sr=jband
git-svn-id: svn://10.0.0.236/trunk@107128 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:05:57 +00:00
dbradley%netscape.com
a8eb4888d7 Bug 33193 - Sanity check for typelib truncation. r=jst, sr=jband
git-svn-id: svn://10.0.0.236/trunk@107127 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:02:56 +00:00
bryner%netscape.com
c2f43529f5 libcmt.so is from psm1 and no longer exists, removing it. r=dveditz.
git-svn-id: svn://10.0.0.236/trunk@107126 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 23:58:10 +00:00
sonja.mirtitsch%sun.com
7a21403394 next try to gat all of the HP problems...
git-svn-id: svn://10.0.0.236/trunk@107125 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 23:47:47 +00:00
jst%netscape.com
c8d98665ac Checking in workaround for bug 108175, temporarily disable framestate storage on frame destruction. r=jkeiser@iname.com, sr=hyatt@netscape.com
git-svn-id: svn://10.0.0.236/trunk@107124 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 23:36:58 +00:00
mcafee%netscape.com
aaf1e15e02 Adding scrape.dat
git-svn-id: svn://10.0.0.236/trunk@107123 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 22:55:09 +00:00
mcafee%netscape.com
e8fea3931a Switching to TinderboxPrint:aaa,bbb,ccc format. r=pchen
git-svn-id: svn://10.0.0.236/trunk@107122 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 22:41:40 +00:00
ben%netscape.com
53ee2db3ec fix blocker 107568, add back accidentally removed function. I am a dumbass.
sr=spitzer,sfraser


git-svn-id: svn://10.0.0.236/trunk@107121 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 22:35:13 +00:00
relyea%netscape.com
1407e64cce Build OID hash table using PL_Hash rather then the dbm hash code.
git-svn-id: svn://10.0.0.236/trunk@107120 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 21:50:09 +00:00
pchen%netscape.com
c76be4ff30 Not part of build. Added jrgm's window open test files to tree to make
available to tinderboxen


git-svn-id: svn://10.0.0.236/trunk@107118 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 20:37:44 +00:00
darin%netscape.com
e61d7118d7 a=leaf, bustage fix!
git-svn-id: svn://10.0.0.236/trunk@107117 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 20:17:18 +00:00
sspitzer%netscape.com
d82ca4aee7 initial work for #73868. convert addressbook results pane to outliner.
NOT PART OF THE BUILD.


git-svn-id: svn://10.0.0.236/trunk@107116 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 20:17:14 +00:00
justdave%syndicomm.com
a0a44f7175 Fix for bug 95615: cosmetic change to clarify error message when trying to use too many votes
Patch by Adam Kennedy <bugzilla@ali.as>
r= justdave x2


git-svn-id: svn://10.0.0.236/trunk@107115 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 20:05:13 +00:00
dinglis%qnx.com
eb6d97c8d6 Not part of build
fixed lib deps.
change repeating precise timers to repeating slack for debug builds - make debuging easier


git-svn-id: svn://10.0.0.236/trunk@107114 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 19:12:36 +00:00
sonja.mirtitsch%sun.com
23fff4e9fa put a workaround in place, so client ands server will not write at the
same time
(to avoid lines like: ...Unable to find the certificate
authenticatfailedion...)


git-svn-id: svn://10.0.0.236/trunk@107113 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 19:09:11 +00:00
mscott%netscape.com
d051432049 NOT PART OF THE BUILD
Mac specific cpp files.
NOT PART OF THE BUILD


git-svn-id: svn://10.0.0.236/trunk@107112 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 19:06:30 +00:00
blizzard%redhat.com
1e43da8c6b add the js-debugger package. not part of the build.
git-svn-id: svn://10.0.0.236/trunk@107111 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 18:47:04 +00:00
bryner%netscape.com
a582ad6211 Removing some native widget cruft. rs=blizzard. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@107110 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 18:21:50 +00:00
loadrunner%betak.net
69ac321f4d bug 64146, Delay nsCharsetMenu initialization to avoid consuming ~2% of startup time, r=dp, sr=brendan, alecf
these files didn't make it the other day and caused this blocker:
bug 107786 - The subsets of Character coding menus are not working


git-svn-id: svn://10.0.0.236/trunk@107108 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 17:30:58 +00:00
ccarlen%netscape.com
e28da6febd Bug 105440 - directory service needs new keys and be able to support lists of directories. r=valeski/sr=jband
git-svn-id: svn://10.0.0.236/trunk@107106 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 15:29:57 +00:00
kin%netscape.com
9ec5334640 Fix for bug #99517: Text migrates past H. Line, loses formatting when converted to list
Modified WillMakeList() to clear prevListItem after adding a block
to a list item so that any inline nodes after the block are put
in a new list item.

r=jfrancis@netscape.com  sr=sfraser@netscape.com


git-svn-id: svn://10.0.0.236/trunk@107105 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 14:47:10 +00:00
jdunn%netscape.com
209ae4db09 HP-UX only
Only export NSGetModule for components.  This is
similar to what OS/2 & Linux are doing
r=cls@seawood.org
# 105324


git-svn-id: svn://10.0.0.236/trunk@107104 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 14:24:34 +00:00
jst%netscape.com
474e0aed63 Fix problem in the formrewrite changes, the new code ends up doing a flush on the document from within DemoteContainer() in the sink which ends up notifying the document about some peices of content more than once. This causes duplicated content on some pages. r=jkeiser@iname.com. sr=myself.
git-svn-id: svn://10.0.0.236/trunk@107100 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 11:28:20 +00:00
peterv%netscape.com
b295e6eab3 Add build option for the JS profiler on Mac. r=sfraser.
git-svn-id: svn://10.0.0.236/trunk@107099 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 10:29:25 +00:00
peterv%netscape.com
625023cc1d Add build option for the JS profiler on Mac. a=dbradley. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@107098 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 10:27:52 +00:00
peterv%netscape.com
7248b4eb16 Fix for bug 106844 (XSLT stylesheet of type text/xml not recognized; type text/xsl is recognized). r=heikki, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@107097 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 10:13:05 +00:00
mcafee%netscape.com
414b31f322 Adding scrape scan.
git-svn-id: svn://10.0.0.236/trunk@107096 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 09:43:12 +00:00
mcafee%netscape.com
3c078a1233 Tinderbox,aaa,bbb,ccc,ddd format.
git-svn-id: svn://10.0.0.236/trunk@107095 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 09:37:35 +00:00
hyatt%netscape.com
f5c44e45af Fix whitespace handling in XBL. Bad regression. r=bryner, sr=jst
git-svn-id: svn://10.0.0.236/trunk@107094 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 09:29:33 +00:00
beard%netscape.com
9a1fddd6a3 [not part of build] Added MRJSession.java, removed MRJConsole.java. Added ProxyClassLoaderFactory.java.
git-svn-id: svn://10.0.0.236/trunk@107092 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 08:22:58 +00:00
beard%netscape.com
51310b2c8b [not part of build] configuration files for MRJPluginCarbon.
git-svn-id: svn://10.0.0.236/trunk@107091 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 08:18:52 +00:00
beard%netscape.com
32129d5816 [Not part of build] Bumped versions to 1.0d4.
git-svn-id: svn://10.0.0.236/trunk@107090 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 08:15:57 +00:00
beard%netscape.com
a4ff0a9ef0 [not part of build] Now reads in MRJPlugin.properties, sets up MRJPlugin.policy, and creates applet security manager.
git-svn-id: svn://10.0.0.236/trunk@107089 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 08:15:33 +00:00
beard%netscape.com
76a8627b94 [not part of build] Now defining system property, netscape.oji.plugin.home, so that classes in MRJPlugin.jar can find other files, such as MRJPlugin.properties & MRJPlugin.policy.
git-svn-id: svn://10.0.0.236/trunk@107088 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 08:13:46 +00:00
beard%netscape.com
e778011fc3 [not part of build] Added pending exception support, to deal with problem of not being able to enter monitors with a pending exception in the JNIEnv.
git-svn-id: svn://10.0.0.236/trunk@107087 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 08:11:37 +00:00
beard%netscape.com
2bb63018ed [not part of build] Added getSystemVersion() to ensure plugin only loads on Mac OS X 10.1 and later.
git-svn-id: svn://10.0.0.236/trunk@107086 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 08:07:31 +00:00
beard%netscape.com
a6c5c9d78e [not part of build] Make class uninstantiable except from native code.
git-svn-id: svn://10.0.0.236/trunk@107085 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 08:01:40 +00:00
jst%netscape.com
acafb94f92 added files: mozilla/content/html/content/src/nsFormSubmitter.cpp
git-svn-id: svn://10.0.0.236/trunk@107084 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 07:40:23 +00:00
jst%netscape.com
81bf1f1956 Checking in John Keiser's <jkeiser@iname.com> fix for *tons* of form submission and <select> related bugs, see tracking bug 34297 for details. r=rods@netscape.com, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@107083 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 07:40:01 +00:00
hewitt%netscape.com
cae7f892f5 Bug 96081. no picture/icons for 'align text to image' on modern. Patch, images by Shuehan Liang <shliang@netscape.com> r=sspitzer, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107082 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 06:57:15 +00:00
seawood%netscape.com
39fc8231a4 Fix the problem with using cygwin perl for REQUIRES path resolution.
Thanks to Daniel Nunes <leaf@mozilla.org> for the patch.
Bug #103460


git-svn-id: svn://10.0.0.236/trunk@107081 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 06:54:02 +00:00
seawood%netscape.com
12f471a465 Fix warnings by only defining _UINT16 & _UINT32 if they aren't already defined.
Thanks to Josh Soref <timeless@mac.com> for the patch.
Bug #107599


git-svn-id: svn://10.0.0.236/trunk@107080 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 06:50:12 +00:00
nicolson%netscape.com
2e6648b1e7 get test scripts working, add license.
git-svn-id: svn://10.0.0.236/trunk@107079 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 06:41:44 +00:00
jaggernaut%netscape.com
2bfaed0498 Bug 53057: Fixing up users of implicit |CharT*| conversion operators for nsCString to use |.get()| instead, rr=dbaron, rs=scc
git-svn-id: svn://10.0.0.236/trunk@107078 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 06:39:49 +00:00
nicolson%netscape.com
16c77d7089 Add a test target and some classes and scripts.
Now we can test with "gmake test".


git-svn-id: svn://10.0.0.236/trunk@107077 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 06:33:21 +00:00
alecf%netscape.com
86a7f7d224 REQUIRES cleanup
git-svn-id: svn://10.0.0.236/trunk@107076 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 06:30:34 +00:00
stephend%netscape.com
8119f139ba Bug 71843. Classic:mail compose:spell button is lower than other buttons. Images by Shuehan Liang <shliang@netscape.com> r=jag, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107075 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 05:35:05 +00:00
stephend%netscape.com
eeddbc5faa Bug 99514. arrow-right.gif vs. arrow-rit.gif. Patch by Shuehan Liang <shliang@netscape.com> r=andreww, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107074 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 05:29:37 +00:00
stephend%netscape.com
46d7d77177 Bug 52888. Classic skin: scrollbar should be at right edge of window. Patch by Shuehan Liang <shliang@netscape.com> r=jag, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107073 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 05:23:45 +00:00
mcafee%netscape.com
d313966c17 General purpose version of bloat.pl
git-svn-id: svn://10.0.0.236/trunk@107072 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 05:22:00 +00:00
mcafee%netscape.com
7a00491cb4 no warn.pl anymore
git-svn-id: svn://10.0.0.236/trunk@107071 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 05:20:25 +00:00
waterson%netscape.com
15276fbb6a More types. Remove JS stuff so we can account for it better.
git-svn-id: svn://10.0.0.236/trunk@107070 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 05:17:28 +00:00
dp%netscape.com
5fbbc564cf bug# 105509 inlining nsHashKey::nsHashKey
r=dougt, sr=jband


git-svn-id: svn://10.0.0.236/trunk@107069 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 04:58:30 +00:00
hewitt%netscape.com
d0fcf2295f Bug 96817. Menu item spacing is larger for bookmarks menu. Patch by Shuehan Liang <shliang@netscape.com> r=andreww, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107068 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 04:53:43 +00:00
jst%netscape.com
09b081e767 Fixing bug 52120. Make mozilla pass the expected arguments to window.onerror. r=jkeiser@iname.com, sr=jband@netscape.com
git-svn-id: svn://10.0.0.236/trunk@107067 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 04:49:07 +00:00
hewitt%netscape.com
9fb8da35ea Bug 90846. Navigation toolbar is one pixel thicker with Print button. Patch by Shuehan Liang <shliang@netscape.com> r=andreww, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107066 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 04:41:44 +00:00
jband%netscape.com
7357d5cf7c part of fix to bug 108045. gracefully handle the case where we can't get info about an interface. r=jst sr=brendan
git-svn-id: svn://10.0.0.236/trunk@107065 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 04:41:37 +00:00
jband%netscape.com
81edd25932 fix bug 108045. Don't crash on case where an xpt file is missing an interface info that was there when the manifest got built. Insead, fail gracefully and force the subsequent run to re-autoreg. r=jst sr=brendan
git-svn-id: svn://10.0.0.236/trunk@107064 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 04:40:13 +00:00
hewitt%netscape.com
475900baf5 Bug 95632. Account Central doesn't use system colors. Patch by Shuehan Liang <shliang@netscape.com> r=andreww, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107063 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 04:38:49 +00:00
hewitt%netscape.com
55b64b0b98 Bug 80349. Classic skin links in What's Related have dark highlighting. Patch by Shuehan Liang <shliang@netscape.com> r=andreww, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107062 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 04:36:29 +00:00
hewitt%netscape.com
40aa2a4a86 Bug 76171. Need minimum height/width for certain cases in classic theme. Patch by Shuehan Liang <shliang@netscape.com>. r=andreww, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107061 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 04:33:00 +00:00
nelsonb%netscape.com
b91f3120f1 Reimplement SSL_GetChannelInfo. Add new function SSL_GetCipherSuiteInfo().
Also, implement new ciphersuite preference order.  Bug 78959.


git-svn-id: svn://10.0.0.236/trunk@107060 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 04:24:28 +00:00
dbaron%fas.harvard.edu
6a5015b10c Ensure that we don't re-resolve placeholders to the style context that should be on their out-of-flow frame. Fixes autocomplete popup. b=107744 r=waterson sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@107059 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 04:14:58 +00:00
nelsonb%netscape.com
5b7036cc69 Put better comments by the table of preconfigured policies.
git-svn-id: svn://10.0.0.236/trunk@107058 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 04:00:27 +00:00
kmcclusk%netscape.com
b2b179a8ba fix crash by removing DisplayZTreeNode's from the mMapPlaceholderViewToZTreeNode hashtable in DestroyZTreeNode. bug 78661. r=roc+moz sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@107057 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 03:59:28 +00:00
kmcclusk%netscape.com
c06f67e167 Wrap nsViewManager::ShowDisplayList in DEBUG #ifdef to reduce footprint a bit. bug 78661. r=karnaze sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@107056 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 03:53:22 +00:00
jpierre%netscape.com
01b9542be6 One more fix for 105271
git-svn-id: svn://10.0.0.236/trunk@107054 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 03:37:41 +00:00
loadrunner%betak.net
83765274c8 bug 103941, Unable to change utf-8 charset on the NS pb page, r=yokoyama, sr=blizzard
git-svn-id: svn://10.0.0.236/trunk@107053 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 03:32:23 +00:00
loadrunner%betak.net
e8e956c67e bug 64146, Delay nsCharsetMenu initialization to avoid consuming ~2% of startup time, r=dp, sr=brendan, alecf
git-svn-id: svn://10.0.0.236/trunk@107052 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 03:29:30 +00:00
jpierre%netscape.com
8fbd37b3c5 Partial fix for 105271
git-svn-id: svn://10.0.0.236/trunk@107051 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 03:11:32 +00:00
jpierre%netscape.com
4ce6e3777c Fix for OS/2 build
git-svn-id: svn://10.0.0.236/trunk@107050 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 03:10:29 +00:00
cavin%netscape.com
d3c128006e Bug #101480: In ParseListOfMessageIds(), set 'm_fetchPartsOnDemand'
to true if we're asking for body only. r=sspitzer, sr=mscott.


git-svn-id: svn://10.0.0.236/trunk@107049 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 03:09:38 +00:00
pchen%netscape.com
e878fec99a 81762, r=jag, sr=sfraser, remove uses of nsCRT::strlen() with testing for null and non-empty string, also use IsEmpty() for nsXPIDLCStrings
git-svn-id: svn://10.0.0.236/trunk@107048 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 02:55:59 +00:00
pchen%netscape.com
28643e60a9 81762, r=jag, sr=sfraser, remove uses of PL_strlen with testing for null and non-empty string, also change const char* to static const char[] so that we can use sizeof-1 instead of PL_strlen
git-svn-id: svn://10.0.0.236/trunk@107047 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 02:55:56 +00:00
pchen%netscape.com
72681d9d8a 81762, r=jag, sr=sfraser, remove uses of PL_strlen with testing for null and non-empty string
git-svn-id: svn://10.0.0.236/trunk@107046 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 02:55:51 +00:00
jpierre%netscape.com
d04d25f44d Enable debug info in ASM code on OS/2
git-svn-id: svn://10.0.0.236/trunk@107045 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 02:41:33 +00:00
javi%netscape.com
de750414ad NOT PART OF BUILD
The project file that was previously checked in was somehow corrupted.
Updating to version on tip of OTIS_TEST_BRANCH

NOT PART OF BUILD


git-svn-id: svn://10.0.0.236/trunk@107044 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 02:22:04 +00:00
bzbarsky%mit.edu
357b320b0b Add a pref (layout.frames.force_resizability) to force frames to be
resizable.  Bug 105797, r=hyatt, sr=attinasi


git-svn-id: svn://10.0.0.236/trunk@107043 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 02:19:49 +00:00
pschwartau%netscape.com
8bb6615f5a Improving readability.
git-svn-id: svn://10.0.0.236/trunk@107042 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 02:17:57 +00:00
nhotta%netscape.com
3bce18c334 Fixed a problem of a charset attribute for Script element is ignored,
request->mElement->GetCharset(charset) succeeded but the returned value 'charset' was ignored, fixed that problem,
bug 106360, r=ftang, sr=jst.


git-svn-id: svn://10.0.0.236/trunk@107041 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 02:07:08 +00:00
pschwartau%netscape.com
2e2a0c6b28 Initial add. Regression test for bug 107771.
git-svn-id: svn://10.0.0.236/trunk@107040 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 02:06:54 +00:00
jj%netscape.com
9df3922f7f fix for bug #106566: updated 'vers' 2 resource to 0.9.5+ (installer)
git-svn-id: svn://10.0.0.236/trunk@107039 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 02:00:16 +00:00
mscott%netscape.com
9ef7753eb0 NOT PART OF THE BUILD
new files for 106507

NOT PART OF THE BUILD


git-svn-id: svn://10.0.0.236/trunk@107038 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 01:59:55 +00:00
av%netscape.com
db71e9c87f Bug 96245 -- xp'zation of dir separator symbol in the spy plugin, not part of the build
git-svn-id: svn://10.0.0.236/trunk@107037 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 01:58:46 +00:00
jst%netscape.com
3aa44affb3 Fixing bug 35294. Speeding up insertion of (specifically appending) document fragments to an element. r=rjesup@wgate.com, sicking@bigfoot.com, sr=vidur@netscape.com
git-svn-id: svn://10.0.0.236/trunk@107036 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 01:55:49 +00:00
hyatt%netscape.com
01ac323a9f added files: mozilla/content/xbl/src/nsXBLContentSink.cpp, mozilla/content/xbl/src/nsXBLDocumentInfo.cpp
git-svn-id: svn://10.0.0.236/trunk@107035 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 01:54:58 +00:00
hyatt%netscape.com
0c09d8b4ed added files: mozilla/content/shared/src/nsXBLAtoms.cpp
git-svn-id: svn://10.0.0.236/trunk@107034 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 01:54:06 +00:00
hyatt%netscape.com
3646e122c1 Fix for 106153, avoid building a content model for XBL event handlers, r=bryner, sr=waterson
git-svn-id: svn://10.0.0.236/trunk@107033 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 01:53:13 +00:00
waterson%netscape.com
95c15b741f Changes for the page loader test. r=mcafee
git-svn-id: svn://10.0.0.236/trunk@107032 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 01:35:13 +00:00
alecf%netscape.com
3179e52fd7 fix - why doesn't outlook build on my machine?
git-svn-id: svn://10.0.0.236/trunk@107031 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 01:03:07 +00:00
rangansen%netscape.com
0fc1cdbf40 Bug# 101760 ; r=javi ; sr = hewitt ; fixing window sizing issue
git-svn-id: svn://10.0.0.236/trunk@107030 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 00:34:15 +00:00
ddrinan%netscape.com
d7d2ef3a82 Bug 107375 - update localVersion to 0.9.6. r=jbetak, sr=dveditz
git-svn-id: svn://10.0.0.236/trunk@107029 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 00:27:05 +00:00
rangansen%netscape.com
155f4be4c1 Bug# 94203 ; r=javi ; sr = hewitt disabling backup all button when there is no cert
git-svn-id: svn://10.0.0.236/trunk@107028 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 00:25:02 +00:00
alecf%netscape.com
144ea77c58 argh, this was left over cruft from my tree
git-svn-id: svn://10.0.0.236/trunk@107027 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 00:17:29 +00:00
sspitzer%netscape.com
e53b3e1168 "Ingore Thread" mnemonic is "I", not "K". r/sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@107026 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 00:16:07 +00:00
ddrinan%netscape.com
ed895f9c12 Fix for decoding sequences. This was encountered when decoding the recipient info of a CMS strucure. Only the first recipient info was decoded, the others were not. Checkin approved by relyea
git-svn-id: svn://10.0.0.236/trunk@107025 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 00:10:55 +00:00
ddrinan%netscape.com
3f65823aa2 Allocate memory when setting digest vale. Checkin approved by relyea
git-svn-id: svn://10.0.0.236/trunk@107024 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 00:03:32 +00:00
blizzard%redhat.com
d5a6fdc729 Update patches to keep up with the trunk. Add patch for Red Hat 7.2 that will get postscript printing working with CJK locales. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@107023 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 00:00:36 +00:00
alecf%netscape.com
a7f0e54b8f *sigh* - I keep forgetting to pre-land these files. Someone shoot me. I'm sorry!
move to NS_LITERAL_STRING


git-svn-id: svn://10.0.0.236/trunk@107022 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 23:55:56 +00:00
despotdaemon%netscape.com
f53d62528c Pseudo-automatic update of changes made by bhart00@yahoo.com.
git-svn-id: svn://10.0.0.236/trunk@107021 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 23:55:07 +00:00
mkaply%us.ibm.com
628682adfe #102457
r=pedemont, sr=blizzard
Bulletproof OS Uconv code and default to 932 for Japanese rendering


git-svn-id: svn://10.0.0.236/trunk@107020 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 23:51:15 +00:00
dougt%netscape.com
6fa08f8d4d removing appshell from xpcom. 96524. r=valeski@netscape.com, sr=jband@netscape.com
git-svn-id: svn://10.0.0.236/trunk@107019 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 23:45:04 +00:00
sspitzer%netscape.com
f75352bafa fix for performance bug #108038, suppressing / skipping command updating when possible in the compose window.
fix for performance bug #98657, we don't need the composerSaveMenuItems command set (which get overlay from editor)
we do our own save foo.
r=varada, sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@107018 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 23:41:22 +00:00
alecf%netscape.com
9dcee8fc46 yank a bunch of junk from tests
r=jag, sr=scc


git-svn-id: svn://10.0.0.236/trunk@107017 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 23:40:10 +00:00
sonja.mirtitsch%sun.com
9e9cbbb7df removed killing of leftover selfservers, since multiple QAs need to
peacefully coexist... will file enhancement request against myself


git-svn-id: svn://10.0.0.236/trunk@107015 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 23:37:36 +00:00
javi%netscape.com
c88a37da60 Fix objdir builds.
NOT PART OF BUILD.


git-svn-id: svn://10.0.0.236/trunk@107014 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 23:18:36 +00:00
alecf%netscape.com
9cd6323563 fix unix bustage.. I can't keep up... :(
git-svn-id: svn://10.0.0.236/trunk@107013 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 23:15:15 +00:00
blakeross%telocity.com
aef3534707 update ui appropriately for helper apps (96939). r=hewitt sr=ben
git-svn-id: svn://10.0.0.236/trunk@107012 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 23:03:37 +00:00
leaf%mozilla.org
b9be88e724 Automated update
git-svn-id: svn://10.0.0.236/trunk@107011 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 22:58:12 +00:00
seawood%netscape.com
f8190d03e6 Do not set either of the logrefcnt defines unless given a specific --enable-logrefcnt option.
Bug #108044


git-svn-id: svn://10.0.0.236/trunk@107010 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 22:55:43 +00:00
alecf%netscape.com
c27b9240de bug 76944 - lazy loading of string bundles.
While I'm there, do massive cleanup of string usage to avoid excess copying
also remove ns*AcceptLang on recommendation of tao
r=tao, sr=dveditz


git-svn-id: svn://10.0.0.236/trunk@107009 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 22:46:39 +00:00
hwaara%chello.se
7a97207ee0 #40033, Pressing on a "news:" link should ask to add to newsgroup.
r=sspitzer, sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@107008 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 22:44:40 +00:00
sonja.mirtitsch%sun.com
e47248081b removed the "missing list" for tinderbox QA
git-svn-id: svn://10.0.0.236/trunk@107007 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 22:43:55 +00:00
leaf%mozilla.org
82e224d915 Automated update
git-svn-id: svn://10.0.0.236/trunk@107006 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 22:43:15 +00:00
alecf%netscape.com
6dd21662ef fix for bug 76944 - cleanup as a result of string bundle cleanup
r=tao, sr=dveditz


git-svn-id: svn://10.0.0.236/trunk@107005 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 22:42:28 +00:00
alecf%netscape.com
32ae7fff08 remove all unicharutil dependencies from xpcom (finally!)
bug 100214, r=jag, sr=scc


git-svn-id: svn://10.0.0.236/trunk@107004 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 22:40:03 +00:00
sonja.mirtitsch%sun.com
448889f5fc added -p port argument, so multiple tinderboxes can run on the same machine
git-svn-id: svn://10.0.0.236/trunk@107003 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 22:36:03 +00:00
bryner%netscape.com
baca245de6 Bug 107823 -- rename nsIFile lastModificationDate to lastModificationTime. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@107002 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 22:35:59 +00:00
mscott%netscape.com
b0a1ab6042 NOT PART OF THE BUILD
Adding new smime extension files.
NOT PART OF THE BUILD


git-svn-id: svn://10.0.0.236/trunk@107001 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 22:35:58 +00:00
wtc%netscape.com
a57b634175 Bugzilla bug 99072: fixed the bug that CPU_ARCH was always set to x86.
The patch was submitted by taya@netbsd.org (Shin'ichiro TAYA), edited
by wtc, and reviewed by cls.


git-svn-id: svn://10.0.0.236/trunk@107000 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 22:35:48 +00:00
akkana%netscape.com
11ad61a35d 106111: heed --enable-plaintext-editor-only for editor build.
r=cls sr=kin


git-svn-id: svn://10.0.0.236/trunk@106998 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 22:29:13 +00:00
seawood%netscape.com
ae70b73a4e Removing obsolete xslt makefile
git-svn-id: svn://10.0.0.236/trunk@106997 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 22:24:35 +00:00
bryner%netscape.com
f77980de82 Correcting the description of the third argument to NS_QuickSort. r=dbaron.
git-svn-id: svn://10.0.0.236/trunk@106996 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 22:21:34 +00:00
radha%netscape.com
adc5d6c010 Fix for bug # 103850. DocShell sets wrong cache key while loading pages with postdata. r=adamlock sr=darin
CVS: ----------------------------------------------------------------------


git-svn-id: svn://10.0.0.236/trunk@106995 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 22:21:31 +00:00
dougt%netscape.com
dd64c90d92 conditionally create nsIChromeRegistry. b=107346. r=dp@netscape.com, sr=waterson@netscape.com
git-svn-id: svn://10.0.0.236/trunk@106993 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 22:18:22 +00:00
yokoyama%netscape.com
6d0ee0a53f Bug 104305
Convert the cmdline Profile name from
platform charset to Unicode instead of calling
AssignWithConversion()
/r=ccarlen, /sr=brendan


git-svn-id: svn://10.0.0.236/trunk@106992 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 22:17:10 +00:00
dougt%netscape.com
6b0afcb82a Fix for 104962. Using faster win api SHGetSpecialFolderPath. r=dveditz@netscape.com, sr=jband@netscape.com
git-svn-id: svn://10.0.0.236/trunk@106991 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 22:16:56 +00:00
locka%iol.ie
1b28bb88de NOT PART OF BUILD. Add code to _OpenURL() to turn relative links into absolute ones for correct loading, using the base address of the browser. Patch provided by mirko@czesla.de. Thanks Mirko!
git-svn-id: svn://10.0.0.236/trunk@106990 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 22:15:34 +00:00
mscott%netscape.com
4c100f311c NOT PART OF THE BUILD.
Adding the new extensions/smime directory. Bug #106507

NOT PART OF THE BUILD


git-svn-id: svn://10.0.0.236/trunk@106989 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 22:14:28 +00:00
bryner%netscape.com
f92d11ff55 Fixing out param on QueryElementAt to be casted to (void**). Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@106983 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 20:28:20 +00:00
bryner%netscape.com
c92903067f Fixing several problems/optimizations that jag pointed out. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@106982 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 20:21:22 +00:00
harishd%netscape.com
887aaf1681 107994 - Backing out rpotts change ( bug 102737 ) to fix the smoketest blocker.
git-svn-id: svn://10.0.0.236/trunk@106981 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 19:40:48 +00:00
locka%iol.ie
2c64cf7242 Missing backslash causing build bustage on some ports platforms. r=brade@netscape.com
git-svn-id: svn://10.0.0.236/trunk@106977 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 17:23:22 +00:00
brade%netscape.com
efde90d683 fix build bustage from #104883; r=adamlock/jag
git-svn-id: svn://10.0.0.236/trunk@106975 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 17:00:41 +00:00
karnaze%netscape.com
5d4ad94e7c fix crash in display reflow debugging.
git-svn-id: svn://10.0.0.236/trunk@106973 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 15:53:57 +00:00
dbradley%netscape.com
636bf8b5b0 Bug 83426 - Remove DOM exception hack. r=jst, r=dbradley, sr=jband
git-svn-id: svn://10.0.0.236/trunk@106972 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 15:52:53 +00:00
brade%netscape.com
3fd06aabc5 (not yet part of the build); add nsICODecoder.cpp for hyatt/biesi (bug #18502)
git-svn-id: svn://10.0.0.236/trunk@106970 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 15:46:10 +00:00
rjesup%wgate.com
ba5d380603 Bug 106509: SaveSelection() doesn't delete entries from range correctly;
the test was backwards and never executed.  r=jfrancis, sr=kin


git-svn-id: svn://10.0.0.236/trunk@106969 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 15:44:26 +00:00
ccarlen%netscape.com
c11a56bbb0 Bug 89465 - Infinite loop in PL_HashTableEnumerateEntries. Added code to use PL_HashTableLookupConst when enumerating the hash table. r=bnesse/sr=brendan@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@106968 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 15:41:53 +00:00
karnaze%netscape.com
b1771999ca bug 105166 - split images (except for image contro frames), round pixels down for printing. sr=attinasi,kin r=alexsavulov
git-svn-id: svn://10.0.0.236/trunk@106966 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 15:31:13 +00:00
brade%netscape.com
74f5fa0887 nsIFile->nsIURI in nsIDiskDocument; fix SaveDocument api (bug #104883)
git-svn-id: svn://10.0.0.236/trunk@106965 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 15:27:38 +00:00
brade%netscape.com
9b3010eb38 nsIFile->nsIURI in SaveDocument api (bug #104883)
git-svn-id: svn://10.0.0.236/trunk@106964 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 15:26:34 +00:00
brade%netscape.com
a56a9f16b8 factoring of SaveDocument and nsIFile->nsIURI (bug #104883)
git-svn-id: svn://10.0.0.236/trunk@106963 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 15:26:33 +00:00
brade%netscape.com
642c74ee59 nsIFile->nsIURI for SaveDocument; factoring of SaveDocument (bug #104883)
git-svn-id: svn://10.0.0.236/trunk@106962 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 15:26:28 +00:00
brade%netscape.com
1d3d0625bd remove fileSpec, remove tabs, and change api to use nsIURI instead of nsIFile (bug #104883)
git-svn-id: svn://10.0.0.236/trunk@106961 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 15:26:27 +00:00
brade%netscape.com
791621834d change mFileSpec to mDocumentURI (nsIURI) for bug #104883
git-svn-id: svn://10.0.0.236/trunk@106960 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 15:26:19 +00:00
brade%netscape.com
84c23e017d remove InitDiskDocument since it's no longer part of nsIDiskDocument.idl, change from nsIFile to nsIURI for SaveFile method (bug #104883)
git-svn-id: svn://10.0.0.236/trunk@106959 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 15:26:16 +00:00
brade%netscape.com
1a487c66d6 nsIFile->nsIURI in nsIDiskDocument r=adamlock (bug #104883)
git-svn-id: svn://10.0.0.236/trunk@106958 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 15:25:53 +00:00
brade%netscape.com
18ad0f0e55 nsIFile->nsIURI in nsIDiskDocument shows missing #include; now added (bug #104883)
git-svn-id: svn://10.0.0.236/trunk@106957 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 15:22:10 +00:00
brade%netscape.com
f7cc2deb3c add necko requires (makefile.win already has this); bug #104883
git-svn-id: svn://10.0.0.236/trunk@106956 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 15:09:56 +00:00
locka%iol.ie
23873585f0 Move webbrowserpersist code to components/ directory. b=106554 r=brade@netscape.com sr=sfraser@netscape.com
git-svn-id: svn://10.0.0.236/trunk@106955 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 15:02:13 +00:00
locka%iol.ie
7e5625d2eb Mac changes to move webbrowserpersist object to components/ b=106554 r=brade@netscape.com sr=sfraser@netscape.com
git-svn-id: svn://10.0.0.236/trunk@106954 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 14:41:02 +00:00
locka%iol.ie
78757538a1 Unix makefile changes to move webbrowserpersist to components/ b=106554 r=brade@netscape.com sr=sfraser@netscape.com
git-svn-id: svn://10.0.0.236/trunk@106953 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 14:39:53 +00:00
locka%iol.ie
43ef9be61e Move webbrowserpersist code to components/ directory. b=106554 r=brade@netscape.com sr=sfraser@netscape.com
git-svn-id: svn://10.0.0.236/trunk@106952 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 14:39:26 +00:00
sicking%bigfoot.com
a6127eabfa Move document-order logic from DOMHelper to the Nodes. Kill the DOMHelper class since it's no longer needed.
Also fix an off-by-one error in the documentorder sorting routine.

r=Pike, peterv sr=jst


git-svn-id: svn://10.0.0.236/trunk@106951 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 14:32:14 +00:00
brade%netscape.com
8540d3e788 remove DOMHelper.cpp for sicking (bug #94471)
git-svn-id: svn://10.0.0.236/trunk@106950 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 14:31:46 +00:00
locka%iol.ie
ccd6837018 Move webbrowserpersist code to components/ directory. b=106554 r=brade@netscape.com sr=sfraser@netscape.com
git-svn-id: svn://10.0.0.236/trunk@106949 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 11:51:20 +00:00
locka%iol.ie
ffcd4bea83 Move webbrowserpersist code to components/ directory. b=106554 r=brade@netscape.com sr=sfraser@netscape.com
git-svn-id: svn://10.0.0.236/trunk@106948 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 11:47:05 +00:00
sspitzer%netscape.com
d8d7ed4835 fix for #105835, move rules for empty tree twisties into tree.css, like in modern.
clean up and optimize the address book css. remove obsolete files
sr=hewitt, r/sr=bienvenu.


git-svn-id: svn://10.0.0.236/trunk@106947 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 09:10:45 +00:00
jaggernaut%netscape.com
640c7f02ab Bug 53057: Fixing up users of implicit |CharT*| conversion operators for nsCString to use |.get()| instead, rr=dbaron, rs=scc
git-svn-id: svn://10.0.0.236/trunk@106946 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 09:09:57 +00:00
jaggernaut%netscape.com
4adbb712fc Bug 53057: Fixing up users of implicit |CharT*| conversion operators for nsCString to use |.get()| instead, rr=dbaron, rs=scc
git-svn-id: svn://10.0.0.236/trunk@106945 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 08:47:44 +00:00
sspitzer%netscape.com
c8682236ef supplimental fix for #106507. we should not fail to send if the S/MIME extension is not
available.  r/sr=mscott


git-svn-id: svn://10.0.0.236/trunk@106944 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 08:36:23 +00:00
hyatt%netscape.com
edd388a429 Remove the wasteful undetermined mode from the browser progress meter. r=jag, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@106943 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 08:25:31 +00:00
sspitzer%netscape.com
ba0670094f fix for correctness bug #107865. location showing up in label column in search results.
r/sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@106942 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 08:18:32 +00:00
bryner%netscape.com
d59f059853 Adding new files for C++ rewrite of filepicker. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@106941 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 07:54:40 +00:00
sspitzer%netscape.com
d88afa5206 fix for crasher bug #107797. my old stand by when I can reproduce a bug:
bullet proof (to prevent the crash) and assert (so if it happens again to
someone with a debug build), we can debug it.
r/sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@106940 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 07:45:59 +00:00
seawood%netscape.com
0542162dad Removing obsolete MOZ_MONOLITHIC_TOOLKIT code.
git-svn-id: svn://10.0.0.236/trunk@106939 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 07:31:42 +00:00
aaronl%netscape.com
539f2b6e44 Bug 107703. Fixes some of the crashes in DOM inspector. r=timeless, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@106938 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 07:28:10 +00:00
sspitzer%netscape.com
28e8bb7bd5 checkin for mscott.
git-svn-id: svn://10.0.0.236/trunk@106937 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 07:01:22 +00:00
mscott%netscape.com
db645d2bf6 Backing out a corrupt mac project i think i checked in.
git-svn-id: svn://10.0.0.236/trunk@106936 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 06:58:37 +00:00
mscott%netscape.com
add14a798a Bug #106507 --> add an abstract interface for crypto modules to hook into the sending
of a message.Store an opaque nsISupports reference on nsIMsgComposefields which can be used by
extensions to mailnews to store security information for a send transaction.
r=ducarroz
sr=sspitzer

DAMM MISSed a file


git-svn-id: svn://10.0.0.236/trunk@106935 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 06:49:44 +00:00
wtc%netscape.com
a9af03654b Bugzilla bug 78978: removed obsolete files .cshrc and .profile.
git-svn-id: svn://10.0.0.236/trunk@106934 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 06:40:05 +00:00
mscott%netscape.com
a7804050ac Bug #106507 --> add an abstract interface for crypto modules to hook into the sending
of a message.Store an opaque nsISupports reference on nsIMsgComposefields which can be used by
extensions to mailnews to store security information for a send transaction.
r=ducarroz
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@106933 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 06:30:43 +00:00
mscott%netscape.com
c69463cb38 Bug #106507 --> add an abstract interface for crypto modules to hook into the sending
of a message.
r=ducarroz
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@106932 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 06:27:04 +00:00
mkaply%us.ibm.com
a5c93a02d6 #88100
r=simon@softel.co.il, sr=blizzard
Hookup Bidi preferences


git-svn-id: svn://10.0.0.236/trunk@106931 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 05:49:45 +00:00
mkaply%us.ibm.com
9c733170f9 #88100
r=simon@softel.co.il, sr=blizzard
Hookup Bidi preferences


git-svn-id: svn://10.0.0.236/trunk@106930 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 05:40:35 +00:00
mkaply%us.ibm.com
3ded5a8fee #95860
r=timeless, sr=blizzard
Add x-mac-hebrew and x-mac-arabic to charset lists so they actually work


git-svn-id: svn://10.0.0.236/trunk@106929 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 05:25:43 +00:00
wtc%netscape.com
d6e75ebac0 Bugzilla bug 103933: loader.c should not be compiled with -xchip=ultra2.
r=nelsonb.


git-svn-id: svn://10.0.0.236/trunk@106928 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 05:25:31 +00:00
jband%netscape.com
3b3d9f5aaf fixing warnings from recent landing and uncommenting test cases I did not mean to comment out for the checkin
git-svn-id: svn://10.0.0.236/trunk@106926 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 05:18:35 +00:00
darin%netscape.com
ebd4cb4576 fixes Darwin mach-o bustage (r=jband)
git-svn-id: svn://10.0.0.236/trunk@106925 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 05:06:41 +00:00
dbradley%netscape.com
acb500fb15 Bug 101696 - interface with no uuid shouldn't parse. Patch adds a warning, does not prohibit it, and cleans up interfaces that are missing id's r=rginda, sr=jband
git-svn-id: svn://10.0.0.236/trunk@106924 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 05:04:35 +00:00
cmanske%netscape.com
6c571e4756 Fixed error message when empty row or col input in Table Properties dialog, b=99306, r=akkana, sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@106923 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 04:59:34 +00:00
jst%netscape.com
8360b93aa5 Fixing bug 103904. Don't let pref change callbacks run wild on documents that are partially torn down already. r=bzbarsky@mit.edu, sr=rpotts@netscape.com
git-svn-id: svn://10.0.0.236/trunk@106922 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 04:42:57 +00:00
jband%netscape.com
e65e0f6378 file had no newline at EOF. rs=jband
git-svn-id: svn://10.0.0.236/trunk@106921 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 04:42:19 +00:00
sspitzer%netscape.com
0492db1f5f supplimental fix for #102180. when closing the stand alone message window, we were
not unregistering the folder listener from the mail session, because the unload handler
was failing.  it was failing because GetSearchSession() has a js error, because
for the stand alone msg window, gSearchSession is undefined.  r/sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@106920 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 04:41:45 +00:00
karnaze%netscape.com
c0b185a870 bug 106158 - changed outer table fix up of nested inner table's computed width to consider if the min width fits.
removed tree specific code. sr=waterson, r=alexsavulov.


git-svn-id: svn://10.0.0.236/trunk@106919 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 04:17:30 +00:00
sspitzer%netscape.com
82db581e68 fix for performance bug #107481 (reduce mail-toolbar command updating)
fix for bug #102180 (close std alone msg window on delete if no more messages
in the folder).  also, fix spelling mistake, "supress" -> "suppress"
r=cavin, sr=bienvenu.


git-svn-id: svn://10.0.0.236/trunk@106918 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 04:05:41 +00:00
tao%netscape.com
2a916db5f1 107375: localeVersion 0.9.5 -> 0.9.6 (one more to go..)
git-svn-id: svn://10.0.0.236/trunk@106917 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 03:32:11 +00:00
brendan%mozilla.org
bd7ff6eb3b Fix nul-termination assumption hidden in lastIndexOf, broken by dependent strings fix for bug 56940 (107771, r=jag, sr=waterson).
git-svn-id: svn://10.0.0.236/trunk@106916 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 03:19:54 +00:00
jband%netscape.com
958b4e78e0 fix Mac bustage. I can't believe the Mac can't do this conversion without a cast!
git-svn-id: svn://10.0.0.236/trunk@106914 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 02:36:19 +00:00
mcafee%netscape.com
6675939165 Adding --start-module=module functionality. Grouped some code into functions. Moved main to the bottom. TrueType for linux comment.
git-svn-id: svn://10.0.0.236/trunk@106912 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 02:14:08 +00:00
jband%netscape.com
90b4a66a35 added files: mozilla/xpcom/ds/nsIPropertyBag.idl
git-svn-id: svn://10.0.0.236/trunk@106911 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 02:10:24 +00:00
jband%netscape.com
837a2c44eb ack! forgot one .idl file. Fix Mac bustage
git-svn-id: svn://10.0.0.236/trunk@106910 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 02:08:41 +00:00
jband%netscape.com
1c7f2a930e the HP compiler says that anonymous unions can't even have structs. So the union must be named. Fixing that bustage
git-svn-id: svn://10.0.0.236/trunk@106909 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 01:45:48 +00:00
jband%netscape.com
4246348236 fix Mac bustage (I hope). I think these names conflicted with other names
git-svn-id: svn://10.0.0.236/trunk@106908 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 01:15:53 +00:00
tao%netscape.com
9e7dcf2046 107375: localeVesion update: 0.9.4 -> 0.9.6 in the trunk.
(r=jbetak,sr=dveditz)


git-svn-id: svn://10.0.0.236/trunk@106907 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 01:11:57 +00:00
jst%netscape.com
639d748f26 Fixing bustage, this was lost in a patch...
git-svn-id: svn://10.0.0.236/trunk@106906 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 00:58:28 +00:00
leaf%mozilla.org
b8c8c7e3ad Automated update
git-svn-id: svn://10.0.0.236/trunk@106905 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 00:58:17 +00:00
seawood%netscape.com
acaf3004b5 Since '-framework Carbon' causes binaries to require console access to run, do not link using that flag by default. Otherwise, remote builds & non-console tinderboxes will break. Mac OSX Mach-O only.
Bug #107696 r=mozbot


git-svn-id: svn://10.0.0.236/trunk@106904 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 00:54:48 +00:00
jband%netscape.com
08cbbc76c9 fix bustage on compilers that don't like anonymouse structs in unions. who knew? sr=jst
git-svn-id: svn://10.0.0.236/trunk@106899 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 00:34:29 +00:00
sfraser%netscape.com
e8b50626a8 Adding strtok.c per bug 106372
git-svn-id: svn://10.0.0.236/trunk@106896 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 00:28:57 +00:00
bienvenu%netscape.com
8596b9672b better fix for problem reading imap messages with inline images 107436 r=jag, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@106895 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 00:21:24 +00:00
bstell%netscape.com
50eb9d5753 checkin for fcrozat@mandrakesoft.com
bug 102516 recognize @euro locales
r=bstell@netscape.com, sr=blizzard


git-svn-id: svn://10.0.0.236/trunk@106894 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 00:21:01 +00:00
tor%cs.brown.edu
36289df1e0 Update to libmng 1.0.3. rs=blizzard
git-svn-id: svn://10.0.0.236/trunk@106893 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 00:19:53 +00:00
bienvenu%netscape.com
dbfea3bd03 fix toolbar flashing on deleting messages r=cavin, sr=sspitzer 100802
git-svn-id: svn://10.0.0.236/trunk@106892 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 00:19:46 +00:00
tor%cs.brown.edu
b82b10fcfc Update to tip. Not in build.
git-svn-id: svn://10.0.0.236/trunk@106891 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 00:18:39 +00:00
tor%cs.brown.edu
e1162335c3 Bug 64188 - don't round-trip the server for each tile when tiling an
8-bit alpha image.  r=rjesup, sr=blizzard


git-svn-id: svn://10.0.0.236/trunk@106890 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 00:15:46 +00:00
morse%netscape.com
6a0f7f2d85 bug 92398, minor wording changes, c=gemal, r=morse, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@106888 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 00:14:00 +00:00
pete%alphanumerica.com
3c4492f3e0 b=107823, r=ccarlen, sr=brendan
--pete


git-svn-id: svn://10.0.0.236/trunk@106886 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 00:11:15 +00:00
bnesse%netscape.com
63115dde46 Fix for bug 107798. Misc source cleanup and JS strict warning removal. r=sgehani, sr=alecf.
git-svn-id: svn://10.0.0.236/trunk@106885 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 00:07:06 +00:00
pavlov%netscape.com
6d74812810 fixing bug 107106 r=valeski sr=jst
git-svn-id: svn://10.0.0.236/trunk@106884 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 00:05:19 +00:00
wtc%netscape.com
81300aad37 Use PL_strcmp instead of strcmp to avoid having to include <string.h>.
git-svn-id: svn://10.0.0.236/trunk@106880 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 00:02:16 +00:00
jst%netscape.com
8d2569a64b Fixing topembed bug 106105. Clear our document.body cache when resetting a document, and make sure the right things are flushed when position and size related properties are accessed. r=heikki@netscape.com, sr=vidur@netscape.com
git-svn-id: svn://10.0.0.236/trunk@106875 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 23:52:52 +00:00
gagan%netscape.com
86e1f7ce7b Fix for bug 100595. Resetting cursor after buffer has been prepended with the boundary string. r/sr=darin/dougt
git-svn-id: svn://10.0.0.236/trunk@106874 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 23:51:38 +00:00
wtc%netscape.com
8e384b8dbf Added lib/tests/Makefile to the list of makefiles to be generated by
configure.
Modified files: configure configure.in
Bugzilla bug 106372: added new function PL_strtok_r.  The function was
implemented by Roland Mainz <Roland.Mainz@informatik.med.uni-giessen.de>.
Modified files: lib/libc/include/plstr.h lib/libc/src/Makefile.in
    lib/tests/string.c
Added file: lib/libc/src/strtok.c


git-svn-id: svn://10.0.0.236/trunk@106872 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 23:49:52 +00:00
alecf%netscape.com
1115fa5f28 bug 100113, r=jag, sr=blizzard - remove some dumb dependencies on dom and gfx
git-svn-id: svn://10.0.0.236/trunk@106871 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 23:43:27 +00:00
jband%netscape.com
e9cb6fa375 added files: mozilla/js/src/xpconnect/src/xpcvariant.cpp
git-svn-id: svn://10.0.0.236/trunk@106869 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 23:36:34 +00:00
jband%netscape.com
2b7d2882d3 added files: mozilla/xpcom/ds/nsVariant.cpp
git-svn-id: svn://10.0.0.236/trunk@106868 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 23:36:08 +00:00
jband%netscape.com
57fc23094c add support for nsIVariant and nsIPropertyBag. bug 44675 and bug 98209. sr=vidur r=dbradley
git-svn-id: svn://10.0.0.236/trunk@106867 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 23:35:07 +00:00
rginda%netscape.com
01b5c4e4c1 venkman only
expose interface to the initAtStartup setting


git-svn-id: svn://10.0.0.236/trunk@106866 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 23:33:41 +00:00
sonja.mirtitsch%sun.com
71b3ea6dee removing the starting : fo`rom the SHLIB_PATH to avoid HP coredumps
git-svn-id: svn://10.0.0.236/trunk@106865 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 23:31:58 +00:00
racham%netscape.com
e0a2a7f645 Fixing bug 107779. This is a regression. Make messagepane link context menu items to work by using the global context menu var. r=ssu,ben sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@106864 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 23:29:53 +00:00
rginda%netscape.com
b8a26a402b venkman only
freeze stack outliner before restoring state


git-svn-id: svn://10.0.0.236/trunk@106863 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 23:29:20 +00:00
timeless%mac.com
2626790b7e Bug 102155 - javascript error in contentAreaUtils.js
whitespace fixes only
patch by caillon@returnzero.com r=stephend@netscape.com sr=alecf


git-svn-id: svn://10.0.0.236/trunk@106862 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 23:29:05 +00:00
bbaetz%cs.mcgill.ca
c3fe6e0f41 Bug 100843 - Add an explicit output filename option (-e) to xpidl
Patch by aegis@aegisknight.org, r=dbradley, sr=scc


git-svn-id: svn://10.0.0.236/trunk@106861 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 23:28:36 +00:00
jband%netscape.com
28d45091af added files: mozilla/xpcom/ds/nsIVariant.idl
git-svn-id: svn://10.0.0.236/trunk@106860 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 23:20:27 +00:00
timeless%mac.com
64073fe805 Bug 86217 - javascript strict warnings in sendProgress.js
patch by caillon@returnzero.com r=hwaara,varada sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@106859 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 23:17:44 +00:00
rginda%netscape.com
a1b245255f Bug 104168, "xpcom-autoregistration notification never fires"
r=dougt, sr=brendan
notify category observers when xpcom registration occurs


git-svn-id: svn://10.0.0.236/trunk@106858 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 23:17:30 +00:00
rpotts%netscape.com
36740b6e82 bug #102737 (r=harishd@netscape.com, sr=jst@netscape.com) do not emit <html> ... </html> for empty text/plain documents.
git-svn-id: svn://10.0.0.236/trunk@106857 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 23:15:57 +00:00
nhotta%netscape.com
f5793e8c32 Changed MimeMultipart_parse_line for retrieving a charset of the original message,
added a special handling for "multipart/related",
also changed to check number of children first to avoid calling MimeObjectChildIsMessageBody if not needed.
bug 92957, r=ducarrroz, sr=bienvenu.


git-svn-id: svn://10.0.0.236/trunk@106856 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 23:14:09 +00:00
nhotta%netscape.com
14ce83238c Moved the hard coded reply header strings to pref so they can be editable, bug 70842, r=ducarroz, sr=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@106855 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 23:13:35 +00:00
rginda%netscape.com
4e00b5d217 bug 99601, don't install xpconnect debugger keyword handler if one is already there, r=jband, sr=brendan
git-svn-id: svn://10.0.0.236/trunk@106854 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 23:13:17 +00:00
rginda%netscape.com
bd4d815147 bug 107421, "--disable-mailnews build broken", r=andreww sr=smfr
comment out reference to chrome://messenger/content/mailOverlay.xul


git-svn-id: svn://10.0.0.236/trunk@106840 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 21:12:08 +00:00
jst%netscape.com
611fab96b0 Fixing blocker bug 107627. Put back the embed elements attribute mapping code that was lost when the embed element was combined with nsHTMLSharedLeafElement.cpp. r=bzbarsky@mit.edu, sr=sfraser@netscape.com
git-svn-id: svn://10.0.0.236/trunk@106839 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 21:03:31 +00:00
relyea%netscape.com
6e5fb40196 Don't crash on SSL2 failures.
git-svn-id: svn://10.0.0.236/trunk@106837 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 20:03:29 +00:00
leaf%mozilla.org
91a693f37f Automated update
git-svn-id: svn://10.0.0.236/trunk@106836 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 19:28:13 +00:00
seawood%netscape.com
ecc465d95d Fixing IRIX bustage cause by grid2 landing (Removing hack from tinderbox)
git-svn-id: svn://10.0.0.236/trunk@106835 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 19:16:30 +00:00
kin%netscape.com
9673ca95ec Backout glazman's fix for bug 107567, pending investigation
on why it causes the tinderbox Leak count to go up.

a=beard@netscape.com,jj@netscape.com


git-svn-id: svn://10.0.0.236/trunk@106834 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 19:03:46 +00:00
glazman%netscape.com
8c9c7abf8d Remove useless mSheetMap table from nsCSSLoader; b=107567, r=peterv,rjesup@wgate.com; sr=kin
git-svn-id: svn://10.0.0.236/trunk@106832 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 15:53:25 +00:00
glazman%netscape.com
833d6a353e call to GetNodesForOperation() in GetAlignment() missed a parameter indicating it should not modify the tree; b=107372, r=brade, sr=kin
git-svn-id: svn://10.0.0.236/trunk@106831 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 15:30:49 +00:00
kin%netscape.com
0faffae415 Fix for bug 103539: Find does not always find strings containing spaces.
and bug 98730: Find/Replace not finding a string with more than one space

  - Reworked the whitespace ignoring code in FindInString() so that it actually
    ignores trailing whitespace and made that code conditional so that it can be
    toggled on and off in the future when the context of the text we are looking
    at is available.

  - We now treat &nbsp; as a space.

r=jfrancis@netscape.com  sr=sfraser@netscape.com


git-svn-id: svn://10.0.0.236/trunk@106830 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 15:19:47 +00:00
mkaply%us.ibm.com
f6af291238 #104874
r=rods, sr=watersin
Patch from simon montagu - cleanup combobox code in Bidi case


git-svn-id: svn://10.0.0.236/trunk@106828 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 14:49:15 +00:00
karnaze%netscape.com
b82075b237 bug 107403 - shannond's patch to cast debug code before deleting to satisfy HP-UX. r=karnaze
git-svn-id: svn://10.0.0.236/trunk@106827 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 14:45:12 +00:00
seawood%netscape.com
ac1a58893c Link libunicharutil_s before xpcom. Blind attempt to fix hpux bustage
git-svn-id: svn://10.0.0.236/trunk@106826 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 10:03:34 +00:00
jst%netscape.com
02e8ea3ff2 Fixing bug 90765. Hold a strong reference to the global object's wrapper to avoid users of that wrapper to cause rooting and unrooting of the global object every time the global object wrapper is addreffed. r=dbaron@fas.harvard.edu, sr=jband@netscape.com
git-svn-id: svn://10.0.0.236/trunk@106824 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 08:39:09 +00:00
brendan%mozilla.org
b27e4fa386 Store FastLoad dependency mtimes, and invalidate if any changes (106021, r=dveditz, sr=shaver).
git-svn-id: svn://10.0.0.236/trunk@106823 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 08:29:25 +00:00
seawood%netscape.com
273df67dca Attempt to fix AIX bustage by linking in smime
git-svn-id: svn://10.0.0.236/trunk@106822 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 08:27:27 +00:00
naving%netscape.com
a054be7f55 107393 r/sr=bienvenu. make minor change to last checkin
git-svn-id: svn://10.0.0.236/trunk@106821 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 06:51:20 +00:00
seawood%netscape.com
9574b14a69 I don't know how this was missed but add nsMacUnicodeFontInfo.cpp to the build.
Should fix OSX macho tinderbox bustage


git-svn-id: svn://10.0.0.236/trunk@106820 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 06:32:04 +00:00
naving%netscape.com
27beaa6be8 107393. r/sr=bienvenu. Make the flag changes in QS view show up when you go back to folder
view.


git-svn-id: svn://10.0.0.236/trunk@106819 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 06:31:33 +00:00
darin%netscape.com
c7306462ea fixes bug 70519 "Select All (+ Copy) does not clobber the X primary selection"
patch=jwbaker@acm.org r=akkana sr=kin


git-svn-id: svn://10.0.0.236/trunk@106818 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 06:14:11 +00:00
aaronl%netscape.com
0c69b5d30d Bug 106533. Active Accessibility: Assert on startup in timer code. r=evaughan, sr=waterson
git-svn-id: svn://10.0.0.236/trunk@106817 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 06:12:39 +00:00
aaronl%netscape.com
7b79d91de9 Bug 107196. Leave empty HTML text nodes and nameless XUL images out of accessible tree. r=evaughan, sr=waterson
git-svn-id: svn://10.0.0.236/trunk@106816 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 06:10:44 +00:00
mkaply%us.ibm.com
e954f26d24 #104792
r=rods, sr==attinasi
patch from simon montagu - hebrew comboboxes go haywire


git-svn-id: svn://10.0.0.236/trunk@106815 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 05:17:34 +00:00
bryner%netscape.com
58bf936788 When creating the root view's widget, don't show it. This prevents full-page Invalidates during page load caused by showing and then hiding the widget. Bug 97895, r=blizzard, sr=hyatt.
git-svn-id: svn://10.0.0.236/trunk@106814 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 05:06:31 +00:00
bryner%netscape.com
d8f860b71e Bug 107500 -- clean up cruft in nsGtkEventHandler. r=jag,pavlov, sr=blizzard.
git-svn-id: svn://10.0.0.236/trunk@106813 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 05:00:17 +00:00
mkaply%us.ibm.com
7b37218070 #97235
r=mkaply,r=maha sr=blizzard
Code from Roozbeh Pournader - get extended Arabic letters to join so Persian works


git-svn-id: svn://10.0.0.236/trunk@106812 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 05:00:06 +00:00
leaf%mozilla.org
1b2e3f3045 Automated update
git-svn-id: svn://10.0.0.236/trunk@106811 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 04:58:14 +00:00
seawood%netscape.com
1def44681a Removing --disable-idlc option. It's a no-op.
Bug #107156


git-svn-id: svn://10.0.0.236/trunk@106810 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 04:55:30 +00:00
bryner%netscape.com
9f640c7836 Debug-only change to print out the img src when the frame tree is dumped. r=pavlov, sr=waterson.
git-svn-id: svn://10.0.0.236/trunk@106808 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 04:43:48 +00:00
tara%tequilarista.org
b0fdab4aac Checking in fix for bug #86920, fix from jake@acutex.net
git-svn-id: svn://10.0.0.236/trunk@106807 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 04:30:33 +00:00
tara%tequilarista.org
20acc203a8 Checking in patch for bug #44641, patch from Ian Wells
git-svn-id: svn://10.0.0.236/trunk@106806 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 04:20:28 +00:00
tara%tequilarista.org
fcdc069ec0 Checking in patch for bug#36597, patch from miri@punknet.cz
git-svn-id: svn://10.0.0.236/trunk@106805 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 04:07:25 +00:00
bienvenu%netscape.com
780270ed60 fix for empty local trash when you've not opened the trash or deleted a message in the session, r=naving, sr=sspitzer 107187
git-svn-id: svn://10.0.0.236/trunk@106804 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 03:56:15 +00:00
mscott%netscape.com
dcde2c8b00 Bug #107608 --> allow generic extensions to account manager,
nsIMsgIdentity and nsIMsgIncomingServer. checking in for Seth.
r=bhuvan
sr=mscott


git-svn-id: svn://10.0.0.236/trunk@106803 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 03:45:24 +00:00
dbaron%fas.harvard.edu
bf5d4ab91a Remove references to nsISimpleEnumerator.h from Makefile.in and MANIFEST as well. b=99136
git-svn-id: svn://10.0.0.236/trunk@106802 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 03:33:12 +00:00
jake%acutex.net
066f569e09 Fixing tinderbox bustage (removing <Tab>s and adding a "use vars" line)
git-svn-id: svn://10.0.0.236/trunk@106800 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 03:31:00 +00:00
javi%netscape.com
ed08a63afb Add the smime source files to the Mac project.
git-svn-id: svn://10.0.0.236/trunk@106799 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 03:24:32 +00:00
mkaply%us.ibm.com
87aa6ece0a #99136
r=dbaron
OS/2 bustage - removing H file that is now generated by IDL


git-svn-id: svn://10.0.0.236/trunk@106797 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 03:17:59 +00:00
brendan%mozilla.org
7c84ad604a Don't try to correct = to == if strict, do it only if downrev (106244, r=jband, sr=shaver).
git-svn-id: svn://10.0.0.236/trunk@106796 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 03:17:00 +00:00
despotdaemon%netscape.com
c7fd19df20 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@106795 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 03:09:28 +00:00
peterv%netscape.com
e5aa9b9c9a Sigh, commit failed. Bustage fix.
git-svn-id: svn://10.0.0.236/trunk@106794 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 03:09:00 +00:00
dbaron%fas.harvard.edu
851c51369f Additional cleanup after bug 56117: prevent :first-letter from leading to style resolution on text nodes and stop all style resolution for placeholder frames (formerly :placeholder-frame pseudo-element) and for text following a :first-line pseudo-element (formerly :-moz-letter-frame pseudo-element). b=107534 r=waterson, attinasi sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@106793 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 02:53:47 +00:00
dbaron%fas.harvard.edu
7115335ed6 Clean up un-needed string copying. r=jag sr=hyatt b=106108
git-svn-id: svn://10.0.0.236/trunk@106789 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 02:46:21 +00:00
pschwartau%netscape.com
974182fbf4 Initial add. Regression test for bug 94257.
git-svn-id: svn://10.0.0.236/trunk@106785 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 02:32:38 +00:00
mkaply%us.ibm.com
8c6d33b3ad HPUX bustage
git-svn-id: svn://10.0.0.236/trunk@106784 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 02:18:43 +00:00
endico%mozilla.org
fa65440ec2 initial checkin
git-svn-id: svn://10.0.0.236/trunk@106783 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 02:08:13 +00:00
sspitzer%netscape.com
3b9c2af032 fix for performance #107481. our FocusRingUpdate_Mail command set updates on
focus changes.  a blur from A to B does this:  sets focused element to null,
sets focused element to B.  by listening to focus, and not dropping null, our js would
update the mail-toolbar twice on a focus change.  now we do it once.

thanks to cavin for finding the problem.

r=cavin, sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@106782 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 02:05:40 +00:00
javi%netscape.com
903bd07e6c Adding new files to the mac project file. Should fix tbox bustage.
git-svn-id: svn://10.0.0.236/trunk@106781 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 02:01:40 +00:00
javi%netscape.com
6acdc56714 Back out ddrinan for now.
git-svn-id: svn://10.0.0.236/trunk@106780 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 01:58:54 +00:00
seawood%netscape.com
b22d1d092d Adding support for obj-c++ (.mm) files.
Thanks to Mike Pinkerton <pinkerton@netscape.com> for the patch.
Bug #107633 r=cls, sr=leaf


git-svn-id: svn://10.0.0.236/trunk@106776 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 01:20:39 +00:00
rbs%maths.uq.edu.au
73446bf2b6 bug 102088 - Cleanup transitory font APIs that were used as a bridge in bug 99010, r=waterson, sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@106775 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 01:15:50 +00:00
zach%zachlipton.com
a96de0e001 Have the tests test .pm files as well, yes this creates bustage, this is
intentional!

No review needed for tests at this time.


git-svn-id: svn://10.0.0.236/trunk@106772 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 01:06:31 +00:00
racham%netscape.com
3eddfd72db Fixing addressbook bug 104468. Getting rid of goEditCardDialog routine in the process of fixing context menu items for sidebar addressbook panel. This routine is now placed under abCommon.js. r=ducarroz, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@106768 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 00:47:58 +00:00
racham%netscape.com
63b589ecd9 Fixing addressbook bugs 102767, 102846, 104468. Fixing the name order problem in the addresbook results pane, making mobile the formal word in place of cellular and add context menu items for sidebar addressbook panel. r=ducarroz, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@106765 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 00:42:55 +00:00
myk%mozilla.org
b5c6611091 Fix test bustage by removing tabs.
git-svn-id: svn://10.0.0.236/trunk@106762 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 00:21:28 +00:00
leaf%mozilla.org
b0a02e9d68 Automated update
git-svn-id: svn://10.0.0.236/trunk@106759 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 00:13:13 +00:00
bnesse%netscape.com
70427bb367 Fix for bug 106159. Force getComplexValue calls to return string values. r=sgehani, sr=alecf.
git-svn-id: svn://10.0.0.236/trunk@106758 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 00:13:06 +00:00
shanjian%netscape.com
cd89da1f32 #107084 View Character Coding for message display broken
r=nhotta, sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@106757 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 00:12:38 +00:00
peterv%netscape.com
803c74667f Fixing bustage.
git-svn-id: svn://10.0.0.236/trunk@106756 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 00:11:57 +00:00
shanjian%netscape.com
4fad3e3ab2 #107514 Regression in the support of Symbol fonts
r=rbs sr=attinasi


git-svn-id: svn://10.0.0.236/trunk@106755 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 00:08:21 +00:00
seawood%netscape.com
f442cf9747 Do not set MOZ_REORDER when giving --enable-reorder if not using GNU ld. The ldscript appears to only work with GNU ld.
Bug #107440


git-svn-id: svn://10.0.0.236/trunk@106752 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 00:00:41 +00:00
seawood%netscape.com
90ed8ea567 Replacing File::Basename with custom hack.
Thanks to Joe Hewitt <hewitt@netscape.com> for the patch.
Bug #107474 r=cls


git-svn-id: svn://10.0.0.236/trunk@106750 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 23:57:14 +00:00
nhotta%netscape.com
3351684d08 For unicode conversion, changed to proceed for decoder errors instead of stop the process, bug 103954, r=ftang, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@106749 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 23:53:52 +00:00
ddrinan%netscape.com
bc18e5bd3c Bug 105526 - Initial landing of PSM S/MIME. Mailnews will land separately. See bug 106507 for that. r=javi, sr=blizzard
git-svn-id: svn://10.0.0.236/trunk@106745 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 23:52:01 +00:00
cmanske%netscape.com
c55ae1b15e Remove unused nsNewEditorCommand, b=106728, r=hewitt, sr=kin
git-svn-id: svn://10.0.0.236/trunk@106744 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 23:49:33 +00:00
peterv%netscape.com
4cff2665ad Fix for bug 105808 (We need atomtables for all xslt elements and attributes). r=Pike, sicking, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@106743 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 23:48:37 +00:00
cmanske%netscape.com
ea302ed58d Enable/disable 'Advanced Edit' button the same as 'Ok' button in dialogs. b=102046, r=hewitt, sr=kin
git-svn-id: svn://10.0.0.236/trunk@106741 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 23:46:25 +00:00
myk%mozilla.org
dc4c583cd4 Fix for bug 98602: re-implementation of "create attachment" page.
Patch by Myk Melez <myk@mozilla.org>.
r=gerv@mozilla.org,jake@acutex.net


git-svn-id: svn://10.0.0.236/trunk@106739 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 23:42:22 +00:00
evaughan%netscape.com
6c95010e5f fixes bug#107638
-r jag -sr hyatt


git-svn-id: svn://10.0.0.236/trunk@106738 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 23:41:30 +00:00
cmanske%netscape.com
ac836839de Fixed '% of cell' label in menulist, b=97826; also part of fix to disable Advanced Edit button along with Ok, b=102046; r=hewitt, sr=kin
git-svn-id: svn://10.0.0.236/trunk@106737 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 23:40:02 +00:00
ducarroz%netscape.com
2a09c41059 Fix for bug 86398. Display a different message when we cannot fetch an attachment depending if we are saving or sending the message. R=varada, SR=mscott
git-svn-id: svn://10.0.0.236/trunk@106735 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 23:28:51 +00:00
cmanske%netscape.com
6f8a23045c Fixed setting all attributes on an inserted link, b=97455, r=jfrancis, sr=kin
git-svn-id: svn://10.0.0.236/trunk@106733 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 23:24:44 +00:00
dougt%netscape.com
b3c5359358 107630 Removing C++ cruft from nsIWeakReference.idl. Adding nsIWeakReferenceUtils.h. r=alecf@netscape.com, sr=scc@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@106731 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 23:18:51 +00:00
locka%iol.ie
ca8a7aea9f NOT PART OF BUILD. Fix for memory leak in simple array
git-svn-id: svn://10.0.0.236/trunk@106730 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 23:06:50 +00:00
bnesse%netscape.com
73ff098797 Fix for bug 106941. Convert nsProfile from nsIPref to nsIPrefService/nsIPrefBranch. Checking in for chipc. r=bnesse, sr=alecf.
git-svn-id: svn://10.0.0.236/trunk@106729 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 22:59:12 +00:00
rbs%maths.uq.edu.au
410c9e51f2 bug 102088 - Cleanup transitory font APIs that were used as a bridge in bug 99010, r=waterson, sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@106728 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 22:58:00 +00:00
bnesse%netscape.com
1f6755259d Fix for bug 177585. Don't request the observer service when shutting down. r=dougt, sr=alecf.
git-svn-id: svn://10.0.0.236/trunk@106727 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 22:57:44 +00:00
sspitzer%netscape.com
ac0c89244d fix for perf bug #103010. don't persist the "open" state of news servers.
(revert to 4.x behaviour).  persisting the open state of news servers
causes us to update the unread count on news servers if they are "open"
on startup, slowing us down.  r=ssu,varada sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@106726 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 22:57:12 +00:00
ducarroz%netscape.com
31deeb0fff Fix for bug 84081. We need to mark an attachment we cannot fetch as bogus in order to avoid generating an empty part. R=varada, SR=mscott
git-svn-id: svn://10.0.0.236/trunk@106725 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 22:49:50 +00:00
ducarroz%netscape.com
7933420766 Fix for bug 83752. Need to close the progress window is an error occurs during the send. R=varada, SR=bienvenu
git-svn-id: svn://10.0.0.236/trunk@106724 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 22:45:31 +00:00
ducarroz%netscape.com
54f06f2fa6 Fix for bug 83549. Add a new send mode in order to be able to display correct message when an error occurs while sending unsent messages. R=varada, SR=mscott
git-svn-id: svn://10.0.0.236/trunk@106723 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 22:36:57 +00:00
locka%iol.ie
081f664139 NOT PART OF BUILD. First working version of CAB file packaging and signing script, install file and docs.
git-svn-id: svn://10.0.0.236/trunk@106722 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 22:32:27 +00:00
andreas.otte%primus-online.de
24dbd2c12a fix bug 104876 [c:foo wrongly considered valid URL] this fixes a bug
in caching protocol handlers, scheme "c" was mixed up with scheme
"chrome" for example, c=darin@netscape.com, r=rjesup@wgate.com,
sr=dougt@netscape.com


git-svn-id: svn://10.0.0.236/trunk@106721 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 22:20:06 +00:00
dougt%netscape.com
8e551369e9 ugh. I did not mean to commit these changes. Backing out
git-svn-id: svn://10.0.0.236/trunk@106720 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 22:19:32 +00:00
alecf%netscape.com
e17afbe404 add initial files for bug 102043 - not part of build, to be reviewed for that bug
git-svn-id: svn://10.0.0.236/trunk@106719 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 22:17:39 +00:00
colin%theblakes.com
2bb2cc48a5 Turn Java back on by default. b=91271. sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@106718 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 22:14:02 +00:00
ian.mcgreer%sun.com
99366f469d patch to fix behavior on AIX's optimizing compiler. Shoul also improve performance on all platforms.
git-svn-id: svn://10.0.0.236/trunk@106717 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 22:11:49 +00:00
dougt%netscape.com
956ec6e34b Moving nsISimpleEnumerator interface to new idl file. 99136, r=alecf@netscape.com sr=rpotts@netscape.com
git-svn-id: svn://10.0.0.236/trunk@106716 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 22:07:28 +00:00
dougt%netscape.com
3e064cf384 Moving nsISimpleEnumeratory interface into a seperate idl file. bug 99136. r=alecf@netscape.com, sr=rpotts@netscape.com
git-svn-id: svn://10.0.0.236/trunk@106715 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 22:03:05 +00:00
ftang%netscape.com
fad8f3eb7f fix bug 90804. add nsMacUnicodeFontInfo.cpp into the mac sectoin and the nsCompressedCCmap.cpp to the src sectoin r=pinkerton sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@106714 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 21:59:57 +00:00
dougt%netscape.com
55e2803f98 Adding nsISimpleEnumerator.idl to project. 99136. r=alecf, sr=rpotts
git-svn-id: svn://10.0.0.236/trunk@106713 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 21:59:51 +00:00
ftang%netscape.com
5611f75355 fix 90804. enable more char by using atsui. r=pinkerton sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@106710 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 21:50:52 +00:00
ftang%netscape.com
39df769b40 fix bug 90804. r=pinkerton sr=sfraser. enable rendering of more characters by using atsui.
git-svn-id: svn://10.0.0.236/trunk@106709 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 21:50:07 +00:00
morse%netscape.com
ee49d0c6a1 bug 106570, prompt for master password when opening context menu, r=sgehani, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@106708 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 21:48:08 +00:00
mcafee%netscape.com
1a2e1cf413 unhardcoding hostname
git-svn-id: svn://10.0.0.236/trunk@106707 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 21:31:00 +00:00
nelsonb%netscape.com
845d4b22d8 Fix bug 107619. The new DHE_ ciphersuites were enabled by default.
Now they are disabled by default, for compatibility with NSS 2.0.


git-svn-id: svn://10.0.0.236/trunk@106706 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 21:09:47 +00:00
nicolson%netscape.com
35b7fde379 Fix 101609: JSS OSF fails, on the trunk this time.
git-svn-id: svn://10.0.0.236/trunk@106705 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 21:07:51 +00:00
despotdaemon%netscape.com
42a480d172 Pseudo-automatic update of changes made by smeredith@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@106704 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 19:32:58 +00:00
sspitzer%netscape.com
549449ba49 backing out a jag's change. mLength on returnString is not correct, so doing returnString.Length()
cause problems, but strlen() works.  bienvenu's looking into why our string foo is doing that to mLength,
but this gets the tree open. sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@106699 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 18:32:31 +00:00
mkaply%us.ibm.com
611a66c1c4 Stupid OS/2 breakage - bug has been opened with compiler folk
git-svn-id: svn://10.0.0.236/trunk@106697 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 17:39:31 +00:00
ian.mcgreer%sun.com
dce8a3b4fd fixes for testing word alignment
git-svn-id: svn://10.0.0.236/trunk@106696 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 16:03:43 +00:00
bzbarsky%mit.edu
a8a1992e09 Fix strict JS warnings in addressbook. Bug 107538, patch from James
Green <jg@cyberstorm.demon.co.uk>, r=hwaara, sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@106695 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 14:54:04 +00:00
ducarroz%netscape.com
38011f6783 Fix for bug 86089. Replace attachments string in message compose fields by an array of nsIMsgAttachment objects. This architecture change allow us to dissocie the attachment name from the attachment url. We can also now carry over extra information like the attachment content type or Mac file type. This check in contains also fix for related bug 52428, bug 80895, bug 87765 and bug 89090.
R=varada, SR=sspitzer


git-svn-id: svn://10.0.0.236/trunk@106694 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 14:42:41 +00:00
rginda%netscape.com
157fee654b bug 99601, add filter support to js/jsd, r=jband sr=brendan
Use the new filtering api to allow users to safely debug with initAtStartup enabled.  Also adds highlighting to source view, saves stack view state, fixes selection problems in the outliners, cleans up some strict mode issues, and refactors menu and script tags out of venkman.xul


git-svn-id: svn://10.0.0.236/trunk@106693 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 14:27:10 +00:00
hwaara%chello.se
aeee16f55d #107094, "Error: mBlank is not defined".
Patch by Andrews <simm0@ii.net>

r=jag, sr=hyatt


git-svn-id: svn://10.0.0.236/trunk@106692 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 14:24:58 +00:00
nboyd%atg.com
8f7d722e97 Fix bug with test case:
var testArray = new Array(6);
testArray[1+1]+=2;


git-svn-id: svn://10.0.0.236/trunk@106691 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 14:06:58 +00:00
nboyd%atg.com
8d20f58b4f Hello Norris
The following test case case leads to a compilation error in Rhino. In this
script alert is an user defined
function in the global object and it shows the value of the specified
parameter in a popup window. Save the script as a html file and run it under
Netscape and IE. The output via their JS engines is that alert(1)
executes but the execution of line fails as blks variable is undefined. The
Fix bug:

Rhino engine fails at compilation time itself and cannot excute the script.
It doesn't like the syntax of line.


Steven


/// ****************  test case **************    ///
<script>
alert(1);
  blks[ 10 << 2 ] |= true;
  alert(2);
</script>


/// **********************  Error Message ************************** ////
evaluating script: null
java.lang.NullPointerException
  at org.mozilla.javascript.Interpreter.generateICode(Compiled Code)
  at org.mozilla.javascript.Interpreter.generateICode(Compiled Code)
  at org.mozilla.javascript.Interpreter.generateICode(Compiled Code)
  at org.mozilla.javascript.Interpreter.generateICode(Compiled Code)
  at org.mozilla.javascript.Interpreter.generateICode(Compiled Code)
  at org.mozilla.javascript.Interpreter.generateICodeFromTree(Compiled Code)
  at
org.mozilla.javascript.Interpreter.generateScriptICode(Interpreter.java)
  at org.mozilla.javascript.Interpreter.compile(Interpreter.java)
  at org.mozilla.javascript.Context.compile(Context.java)
  at org.mozilla.javascript.Context.compile(Context.java)


git-svn-id: svn://10.0.0.236/trunk@106690 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 13:55:26 +00:00
rginda%netscape.com
9dffd404bd bug 99601, add filter support to js/jsd, r=jband sr=brendan
large addition to the jsd_xpc component allows arbitrary filtering of debug hooks by url pattern, line range, and global object.  also adds ability to begin instrumenting jsscripts at app startup.


git-svn-id: svn://10.0.0.236/trunk@106689 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 13:41:32 +00:00
nboyd%atg.com
487a8a8072 Patch from Igor:
I must admit this is very subtitle, but still...

Here are the lines from
    public void defineProperty(String propertyName, Object delegateTo,
                               Method getter, Method setter, int attributes)


        GetterSlot slot = (GetterSlot)getSlotToSet(propertyName,
                                                   propertyName.hashCode(),
                                                   true);
        slot.delegateTo = delegateTo;
        slot.getter = getter;
        slot.setter = setter;
        slot.setterReturnsValue = setter != null && setter.getReturnType() != Void.TYPE;
        slot.value = null;
        slot.attributes = (short) attributes;
        slot.flags = (byte)flags;

Now suppose that after the new slot is added, another thread is accessing it. Then it would see not yet ready slot with all nasty consequences! For example,  SMP computer can re-arrange writes so the new value of slot.flags would be visible before slot.getter then another thread would generate null pointer exception.

race2_fix.diff fixes that by using the explicit Slot argument to addSlot instead of boolean flag so the new slot can be fully initialized and then inserted under synchronization to the table. I also call addSlot directly because it is supposed to be used with not-yet existed properties and split addSlot to addSlot and addSlotImpl so in case of table growth there is no need to re-enter already synchronized monitor.

This changes also allows to explicitly throw RuntimeException if defineProperty is called for the property that is already exists instead of either throwing cast exception in "GetterSlot slot = (GetterSlot)getSlotToSet(propertyName," or worth yet re-initializing already existed slot.

Regards, Igor


git-svn-id: svn://10.0.0.236/trunk@106688 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 13:07:00 +00:00
nboyd%atg.com
8d0d15ef9e Print either line or file name if either is present.
git-svn-id: svn://10.0.0.236/trunk@106687 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 12:59:30 +00:00
mkaply%us.ibm.com
cdde11a97a More reordering crap
git-svn-id: svn://10.0.0.236/trunk@106686 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 12:59:00 +00:00
ben%netscape.com
d51417dc21 add licenses. (not part of build)
git-svn-id: svn://10.0.0.236/trunk@106685 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 11:03:44 +00:00
ben%netscape.com
241c7e48ba 102477 - Download Manager
adding initial XUL & js files for window, basic listview/toolbar UI,
controllers etc.
NOT PART OF BUILD!


git-svn-id: svn://10.0.0.236/trunk@106684 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 11:02:56 +00:00
jst%netscape.com
e605f7d9da Fixing linux build bustage.
git-svn-id: svn://10.0.0.236/trunk@106683 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 10:24:55 +00:00
jst%netscape.com
76aa8c7050 added files: mozilla/content/html/content/src/nsHTMLSharedLeafElement.cpp, removed files: mozilla/content/html/content/src/nsHTMLBaseElement.cpp, mozilla/content/html/content/src/nsHTMLEmbedElement.cpp, mozilla/content/html/content/src/nsHTMLIsIndexElement.cpp, mozilla/content/html/content/src/nsHTMLParamElement.cpp, mozilla/content/html/content/src/nsHTMLSpacerElement.cpp, mozilla/content/html/content/src/nsHTMLTableColGroupElement.cpp, mozilla/content/html/content/src/nsHTMLWBRElement.cpp
git-svn-id: svn://10.0.0.236/trunk@106682 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 10:15:21 +00:00
jst%netscape.com
ac8fa2d5a5 Fixing part of bug 107453. Combine rarely used leaf element classes into one class to cut down on the amount of code we have for implementing all those dom interfaces. This makes using the combined elements (base, embed, isindex, param, spacer, colgroup, and wbr) a bit more expensive but since they're hardly ever used it's ok for them to take up a bit more heap space when used. r=dbaron@netscape.com, sr=waterson@netscape.com
git-svn-id: svn://10.0.0.236/trunk@106681 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 10:14:06 +00:00
jst%netscape.com
4aad4d442d Make the signature of nsHTMLDocument::FlushPendingNotifications() match nsIDocument::FlushPendingNotifications() so that callers of the interface method actually call the correct method. No bug. r=peterv@netscape.com, sr=rpotts@netscape.com. Problem found by jkeiser@iname.com
git-svn-id: svn://10.0.0.236/trunk@106680 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 09:58:07 +00:00
alecf%netscape.com
1467e1e8bc bump max string bundles in cache up to 16 from 10, since thats how many are created on startup
git-svn-id: svn://10.0.0.236/trunk@106678 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 08:48:49 +00:00
dbaron%fas.harvard.edu
b572449775 Fix HP bustage, I hope, by adding -L$(DIST)/lib.
git-svn-id: svn://10.0.0.236/trunk@106677 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 08:46:43 +00:00
dbaron%fas.harvard.edu
5eb9b7f619 Fix BeOS bustage by doing what bryner meant to. b=106208.
git-svn-id: svn://10.0.0.236/trunk@106676 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 08:36:21 +00:00
alecf%netscape.com
a0092293be oops this should be getService not createInstance
git-svn-id: svn://10.0.0.236/trunk@106673 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 08:03:08 +00:00
dbaron%fas.harvard.edu
32b4e50cec Fixing double parens.
git-svn-id: svn://10.0.0.236/trunk@106672 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 08:01:14 +00:00
dbaron%fas.harvard.edu
ae08cf8dcb ... and fixing one other typo.
git-svn-id: svn://10.0.0.236/trunk@106671 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 07:59:16 +00:00
dbaron%fas.harvard.edu
8b7ef70268 ... and converting to double-parens.
git-svn-id: svn://10.0.0.236/trunk@106670 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 07:58:02 +00:00
dbaron%fas.harvard.edu
1f80feae7f Fixing bustage by converting this to use PR-logging. I should've done a Windows build...
git-svn-id: svn://10.0.0.236/trunk@106669 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 07:40:57 +00:00
mcafee%netscape.com
07d49c6343 Adding support startup logging to server. r=jrgm
git-svn-id: svn://10.0.0.236/trunk@106668 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 07:34:34 +00:00
dbaron%fas.harvard.edu
fb67053a26 Removing remnants of warren's s/printf/PRINTF/ landing from the tree. b=94480 r=pavlov sr=darin
git-svn-id: svn://10.0.0.236/trunk@106666 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 06:57:09 +00:00
dbaron%fas.harvard.edu
a191239181 Remove nsLogging.cpp and nsILoggingService.cpp from the build.
git-svn-id: svn://10.0.0.236/trunk@106665 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 06:50:57 +00:00
dbaron%fas.harvard.edu
8497468430 Removing remnants of warren's s/printf/PRINTF/ landing from the tree. b=94480 r=pavlov sr=darin
git-svn-id: svn://10.0.0.236/trunk@106664 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 06:49:37 +00:00
dp%netscape.com
88fbbf69b9 bug 105935 Caching of canUnload to get mac plugin bundles to
work. r=peterlubczynski sr=waterson


git-svn-id: svn://10.0.0.236/trunk@106663 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 06:46:40 +00:00
ben%netscape.com
699644c468 107311 - Add new overlay/js files to jar manifest
r=jst, sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@106662 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 06:46:36 +00:00
ben%netscape.com
572c599966 107311 - Add new overlay for adding editor items to mail, split js into separate file to share between editor/navigator overlays.
r=jst, sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@106661 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 06:46:14 +00:00
ben%netscape.com
dcb37f0029 107311 - Add mail overlay information to contents.rdf
r=jst, sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@106660 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 06:45:41 +00:00
ben%netscape.com
2910d55d13 107311 - rename global variable for consistency & interoperability with other context menu clients.
r=jst, sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@106659 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 06:45:17 +00:00
ben%netscape.com
0df8e4a2a8 107311 - insert accidentally removed <![CDATA[ and add a null check just in case
r=jst, sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@106658 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 06:44:24 +00:00
ben%netscape.com
4cdbd0af0c 107311 - make Mail Message Pane context window code not rely on menuitem visibility specified via style attribute, since this is now specified with the hidden attribute. Also remove unused parameter to fillMessagePaneContextMenu
r=jst, sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@106657 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 06:43:56 +00:00
ben%netscape.com
c35f184eac 107311 - add null check
r=jst, sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@106656 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 06:42:41 +00:00
ben%netscape.com
3b6e234339 107311 - add separator to context menu for apps to hook in relative to
r=jst, sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@106655 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 06:42:21 +00:00
dbaron%fas.harvard.edu
e3cadbb4ce Avoid attempting to do CSS selector matching on text nodes, comments, or processing instructions by adding a 'NonElement' style resolution method that assumes that no rules match (temporarily, until we don't have style contexts for text nodes) and by cleaning code that was using textPseudo (the usual case) or passing the text node directly (only a few unusual cases). b=56117 r=hyatt sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@106650 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 06:36:06 +00:00
dbaron%fas.harvard.edu
aeb1ab18e4 Removing remnants of warren's s/printf/PRINTF/ landing from the tree. b=94480 r=pavlov sr=darin
git-svn-id: svn://10.0.0.236/trunk@106647 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 06:33:52 +00:00
dbaron%fas.harvard.edu
9029efb2b0 Replace static constructor of EmptyEnumeratorImpl with new/delete. b=68092 r=jag sr=waterson
git-svn-id: svn://10.0.0.236/trunk@106644 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 06:10:21 +00:00
bryner%netscape.com
582656069e Bug 106208 - don't build nsBaseFilePicker on platforms where we don't have a native filepicker implementation. Also, don't build the XUL filepicker on platforms where we _do_ use a native filepicker implementation. r=cls.
git-svn-id: svn://10.0.0.236/trunk@106643 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 06:10:01 +00:00
dbaron%fas.harvard.edu
069522c79e Prevent unreable text with light-on-dark system colors by using hardcoded black foreground color when on top of a background image that is light. b=103498 r=jag sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@106642 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 06:05:58 +00:00
dbaron%fas.harvard.edu
39b72d7392 Make sure normal/bold weight distinction in thread pane works correctly when system fonts are bold. b=101981 r=jag sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@106641 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 06:04:18 +00:00
dbaron%fas.harvard.edu
9b135c4afe Avoid attempting to do CSS selector matching on text nodes, comments, or processing instructions by adding a 'NonElement' style resolution method that assumes that no rules match (temporarily, until we don't have style contexts for text nodes) and by cleaning code that was using textPseudo (the usual case) or passing the text node directly (only a few unusual cases). b=56117 r=hyatt sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@106640 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 06:02:05 +00:00
bryner%netscape.com
82f18832e5 Removing dead native filepicker implementation. r=pavlov, not part of the build.
git-svn-id: svn://10.0.0.236/trunk@106639 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 05:49:23 +00:00
sspitzer%netscape.com
6f7b555a51 fix for #106917. strict js warnings from msgHdrViewOverlay.js r/sr=mscott
git-svn-id: svn://10.0.0.236/trunk@106638 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 05:47:25 +00:00
alecf%netscape.com
6ebb917688 Back out my backout, now that mac seems to be fixed
git-svn-id: svn://10.0.0.236/trunk@106633 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 03:39:18 +00:00
timeless%mac.com
f09c6040bb QNX port; adding requires to make it work.
git-svn-id: svn://10.0.0.236/trunk@106632 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 03:31:00 +00:00
timeless%mac.com
73a6aca77d Bugzilla Bug 99627 Freeze nsIURIContentListener
caused bustage for the QNX Port.


git-svn-id: svn://10.0.0.236/trunk@106631 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 03:28:59 +00:00
pschwartau%netscape.com
92afc7b20b Adding reference to another Bugzilla bug this testcase covers.
git-svn-id: svn://10.0.0.236/trunk@106630 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 03:28:15 +00:00
alecf%netscape.com
921a7bcf81 added unicharutilsstatic*.o to build for bug 100214
git-svn-id: svn://10.0.0.236/trunk@106629 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 03:17:12 +00:00
alecf%netscape.com
d764923a0d Back out my checkin because !(*@3 PSM is screwed.
git-svn-id: svn://10.0.0.236/trunk@106627 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 02:41:48 +00:00
brendan%mozilla.org
4b80be2931 Ensure atom strings are immutable -- duh! (107138, r=jag, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@106626 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 02:33:41 +00:00
dougt%netscape.com
cb69e3b965 not part of build
git-svn-id: svn://10.0.0.236/trunk@106625 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 02:11:57 +00:00
despotdaemon%netscape.com
3e40b31fcf Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@106613 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 01:14:45 +00:00
cls%seawood.org
8158d5c759 Removing xpcom dependency upon unicharutil.
Fixing tinderbox bustage.
Bug #100214 r=alecf


git-svn-id: svn://10.0.0.236/trunk@106611 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 01:11:04 +00:00
sspitzer%netscape.com
21e4531927 fix for #98559. implement sorting on about:config results, add color to about:config results,
clean up about:config xul and js.  r=chipc,sr=ben

wasting time on about:config is not a total waste, since it's an
implementation of nsIOutlinerView in js, and it's useful for QA (when debugging.)


git-svn-id: svn://10.0.0.236/trunk@106609 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 01:00:12 +00:00
despotdaemon%netscape.com
7df1016993 Pseudo-automatic update of changes made by curt@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@106606 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 00:38:04 +00:00
pschwartau%netscape.com
9d661386b7 Initial add. Regression test for bug 107138.
git-svn-id: svn://10.0.0.236/trunk@106604 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 00:20:03 +00:00
bienvenu%netscape.com
cd78059f57 check for null db folder info 107457 rs=sspitzer
git-svn-id: svn://10.0.0.236/trunk@106602 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 00:09:35 +00:00
jst%netscape.com
914be99eef Call into baseclass if there's nothing to be done for a given tag. Not part of the build yet.
git-svn-id: svn://10.0.0.236/trunk@106600 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 00:07:56 +00:00
hyatt%netscape.com
cd68d72f41 SetParent in nsIFrame should not be inlined. r=evaughan, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@106598 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 00:01:39 +00:00
hwaara%chello.se
f714992ade #106739, make Quick Search look better integrated into 3pane
Initial fix by Ben Ruppel <slate@gwu.edu>.

r=andreww, sr=hewitt


git-svn-id: svn://10.0.0.236/trunk@106597 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 00:00:02 +00:00
alecf%netscape.com
345e7b6e33 bug 100214 - Remove string dependency on XPCOM routines that depend on unicharutil, r=jag sr=scc
git-svn-id: svn://10.0.0.236/trunk@106596 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 23:16:23 +00:00
alecf%netscape.com
7beecfbd9e more straggelers from bug 100214 - just adding #includes
git-svn-id: svn://10.0.0.236/trunk@106595 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 23:14:05 +00:00
morse%netscape.com
d30f76d8f6 bug 106866, unable to close password manager dialog by pressing OK, r=jag, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@106594 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 23:10:50 +00:00
morse%netscape.com
de8d7471d5 bug 106914, unable to close cookie/image manager dialog by pressing OK, r=jag, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@106593 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 23:09:13 +00:00
seawood%netscape.com
579efebb0d Fixing internal MOZ_TWO_STRINGS_TEST macro so that it doesn't always use enableval to test option arguments
Bug #107055 r=jesup


git-svn-id: svn://10.0.0.236/trunk@106592 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 22:59:31 +00:00
gerv%gerv.net
476d18633b Change default license type. a=rginda. (Not part of the build.)
git-svn-id: svn://10.0.0.236/trunk@106591 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 22:48:07 +00:00
gerv%gerv.net
26caeefdf5 Removing deprecated license types. a=rginda. (Not part of the build.)
git-svn-id: svn://10.0.0.236/trunk@106590 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 22:46:46 +00:00
gerv%gerv.net
7c86934ac9 Add tri-license license type. a=rginda. (Not part of the build.)
git-svn-id: svn://10.0.0.236/trunk@106589 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 22:46:01 +00:00
bbaetz%cs.mcgill.ca
edb5d02fe0 Bug 107355 - fix crash when leaving root directory of an ftp server after
accessing another dir.
r=dougt, sr=scc.


git-svn-id: svn://10.0.0.236/trunk@106588 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 22:42:13 +00:00
jpierre%netscape.com
5a2f0d5fcb Fix for 105271
git-svn-id: svn://10.0.0.236/trunk@106587 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 22:42:12 +00:00
despotdaemon%netscape.com
63e8ac83b5 Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@106586 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 22:23:35 +00:00
despotdaemon%netscape.com
298aaa42c6 Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@106585 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 22:21:39 +00:00
dbradley%netscape.com
553ea0ca40 Bug 106671 - PLDHashTableEnumeratorImpl::IsDone will never return true, patch makes mCurrent == mCount the done condition. r=dougt, sr=jband
git-svn-id: svn://10.0.0.236/trunk@106584 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 22:08:42 +00:00
jpierre%netscape.com
d83e0ecde0 Fix for 105271 - rules.mk change for OS/2 build
git-svn-id: svn://10.0.0.236/trunk@106583 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 21:34:20 +00:00
colin%theblakes.com
5b956c24c7 This comment really goes with the last checkin whose comment I fat-fingered.
Add an initialiser to ImportCharSet::m_Ascii so that it becomes a strong
symbol and therefore visible to the OpenVMS linker.
b=90666  r/sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@106574 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 21:14:11 +00:00
evaughan%netscape.com
001d863331 turning on grid
-r bryner -sr hyatt


git-svn-id: svn://10.0.0.236/trunk@106570 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 20:20:36 +00:00
evaughan%netscape.com
d204280000 Turning on new grid code
-r bryner -sr hyatt


git-svn-id: svn://10.0.0.236/trunk@106568 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 20:12:07 +00:00
colin%theblakes.com
8cd2779009 ImportCharSet::m_AsciiImportCharSet.cpp
git-svn-id: svn://10.0.0.236/trunk@106566 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 20:07:56 +00:00
locka%iol.ie
61fa21541f NOT PART OF BUILD. New test pages
git-svn-id: svn://10.0.0.236/trunk@106565 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 20:03:03 +00:00
locka%iol.ie
b511a68a02 NOT PART OF BUILD. Stop a crash when no content type is specified at all
git-svn-id: svn://10.0.0.236/trunk@106564 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 20:02:01 +00:00
locka%iol.ie
e2dc152e07 NOT PART OF BUILD. More updates to get a working CAB file packaging and signing working for control for hosting plugins
git-svn-id: svn://10.0.0.236/trunk@106563 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 19:50:36 +00:00
bernd.mielke%snafu.de
010f750f2f bug 97630 cut line-height inheritance for tables in quirks mode
r=hixie,karnaze sr=attinasi


git-svn-id: svn://10.0.0.236/trunk@106562 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 19:44:05 +00:00
depstein%netscape.com
25e89b0967 per bugzilla 106523, set PR_TRUE in observerService->AddObserver() for initializing profiles
git-svn-id: svn://10.0.0.236/trunk@106561 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 19:43:32 +00:00
brendan%mozilla.org
bc470f1b6b Consolidate property cache flush under JS_ClearScope (107265, r=shaver, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@106560 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 19:30:03 +00:00
locka%iol.ie
39bbba1dc0 NOT PART OF BUILD. More updates to get a working CAB file packaging and signing working for control for hosting plugins
git-svn-id: svn://10.0.0.236/trunk@106559 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 19:22:19 +00:00
bernd.mielke%snafu.de
8e23bfe8f8 bug 107103 enable regression output for table printing tests
r=karnaze sr=attinasi


git-svn-id: svn://10.0.0.236/trunk@106558 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 19:19:06 +00:00
mkaply%us.ibm.com
8f4261a45d OS/2 TB bustage - accidentally checked in wrong version
git-svn-id: svn://10.0.0.236/trunk@106557 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 17:57:08 +00:00
sspitzer%netscape.com
b9cd88e27a fix blocker bug #107334. undefined entity causes mailnews to crash.
working on the broken contenxt menus next, but the tree could open with that.
sr=shaver.


git-svn-id: svn://10.0.0.236/trunk@106556 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 17:38:57 +00:00
despotdaemon%netscape.com
4a90db0573 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@106554 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 16:30:13 +00:00
kaie%netscape.com
083f50ec8e b=106794 r=kaie,javi sr=blizzard
Fix to make "delete certificate" work again.


git-svn-id: svn://10.0.0.236/trunk@106553 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 15:43:20 +00:00
leaf%mozilla.org
1304681475 Automated update
git-svn-id: svn://10.0.0.236/trunk@106552 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 15:43:11 +00:00
dinglis%qnx.com
ed7cdb8957 QNX6 configure update
r=cls


git-svn-id: svn://10.0.0.236/trunk@106551 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 15:35:44 +00:00
rods%netscape.com
9681a58c7e Make sure default printing for FrameSets is "AsIs" when printing silently
Bug 106015 r=kmcclusk sr=attinasi


git-svn-id: svn://10.0.0.236/trunk@106550 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 15:28:45 +00:00
dinglis%qnx.com
c58eac94f2 fixed lib deps.
git-svn-id: svn://10.0.0.236/trunk@106549 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 15:17:44 +00:00
mkaply%us.ibm.com
b435496262 #107261
r=mkaply, sr=blizzard (Totally OS/2 only change)
OS/2 only - If creating the Unicode locale fails, just use en_US - this always works
Also fix a possible failure case only leak


git-svn-id: svn://10.0.0.236/trunk@106548 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 14:40:41 +00:00
mkaply%us.ibm.com
9591f00f2c #107261
r=mkaply, sr=blizzard
If creating the Unicode locale fails, just use en_US - this always works


git-svn-id: svn://10.0.0.236/trunk@106547 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 14:38:48 +00:00
mkaply%us.ibm.com
fa20cbc9e0 #107296
r=cls
Use SHARED_LIBRARY_LIBS so that dependent building works correctly


git-svn-id: svn://10.0.0.236/trunk@106546 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 14:31:33 +00:00
dinglis%qnx.com
17e3ef8259 Not part of build
Photon embedding update


git-svn-id: svn://10.0.0.236/trunk@106544 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 14:17:16 +00:00
ben%netscape.com
5c0e5bb51d 103064 - add Send Page/Link to browser context menu. Shifting XUL into this file
& parameterizing functions a little better so that they can be re-used more
efficiently. r=pchen, sr=hyatt


git-svn-id: svn://10.0.0.236/trunk@106541 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 10:15:18 +00:00
ben%netscape.com
e0bf4a1f56 103064 - hook up new dynamic overlay via contents.rdf r=pchen, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@106540 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 10:11:14 +00:00
ben%netscape.com
43b63d102d 103064 - add new dynamic overlay & string file to jar manifest. r=pchen, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@106539 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 10:10:47 +00:00
ben%netscape.com
76c01e7ced 103064 - add "Edit Page/Link" to Navigator context menu via new editor dynamic overlay. This is
the string file for the dynamic overlay. r=pchen, sr=hyatt


git-svn-id: svn://10.0.0.236/trunk@106538 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 10:10:12 +00:00
ben%netscape.com
c6c35465b4 103064 - add "Edit Page/Link" to Navigator context menu via dynamic overlay (this file is
the new editor dynamic overlay for adding UI to Navigator).
from Navigator. r=pchen, sr=hyatt


git-svn-id: svn://10.0.0.236/trunk@106537 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 10:09:41 +00:00
ben%netscape.com
18b4464e5f 103064 - add "Edit Page/Link" and "Send Page/Link" to Navigator context menu.
Also includes some code tidy up, simplify show/hide code, removing editor UI dependencies
from Navigator. r=pchen, sr=hyatt


git-svn-id: svn://10.0.0.236/trunk@106536 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 10:08:26 +00:00
jaggernaut%netscape.com
a1a8efe1c8 Bug 101896: check in "fix" for weird WS6 (static build) bustage. patch by gisburn <Roland.Mainz@informatik.med.uni-giessen.de>, r=jag
git-svn-id: svn://10.0.0.236/trunk@106535 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 09:32:03 +00:00
jaggernaut%netscape.com
e4b4c0231a Bug 53057: Fixing up users of implicit |CharT*| conversion operators for nsCString to use |.get()| instead, rr=dbaron, rs=scc
git-svn-id: svn://10.0.0.236/trunk@106534 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 09:27:57 +00:00
jaggernaut%netscape.com
20333c98e2 Bug 53057: Fixing up users of implicit |CharT*| conversion operators for nsCString to use |.get()| instead, rr=dbaron, rs=scc
git-svn-id: svn://10.0.0.236/trunk@106533 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 09:12:39 +00:00
leaf%mozilla.org
a1a1fd2080 Automated update
git-svn-id: svn://10.0.0.236/trunk@106531 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 07:43:12 +00:00
seawood%netscape.com
2f420d8afd Putting darwin platform section in proper place
git-svn-id: svn://10.0.0.236/trunk@106530 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 07:28:45 +00:00
seawood%netscape.com
d304c093d0 split xpidl into seperate module
git-svn-id: svn://10.0.0.236/trunk@106529 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 06:32:18 +00:00
rpotts%netscape.com
5befed23d6 bug #107097 - back/foward do not work!
git-svn-id: svn://10.0.0.236/trunk@106528 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 06:03:27 +00:00
gerv%gerv.net
87fff34258 Fix Hypertext -> HyperText. Bug 91077. Patch by evilbeaver@tekscode.com , r=gerv,dean_tessman. sr=brendan (string-only changes.)
git-svn-id: svn://10.0.0.236/trunk@106527 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 05:25:03 +00:00
seawood%netscape.com
f7364a1682 Do an exact match
git-svn-id: svn://10.0.0.236/trunk@106526 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 04:48:55 +00:00
bryner%netscape.com
73d57b769c Removing dead/obsolete file. r=pavlov, not part of the build.
git-svn-id: svn://10.0.0.236/trunk@106525 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 04:43:12 +00:00
karnaze%netscape.com
4ff0e5cecb bug 103925 - general reflow debugging capability. sr=attinasi, r=alexsavulov
git-svn-id: svn://10.0.0.236/trunk@106524 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-29 01:43:59 +00:00
bbaetz%cs.mcgill.ca
05fc5ed6d6 bug 92892. Remove DOM Viewer from the debug menu, since its confusing
people, and isn't even in the tree any more.
r=bz, sr=darin


git-svn-id: svn://10.0.0.236/trunk@106523 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-28 23:46:17 +00:00
brendan%mozilla.org
f5e80ade8f Followup to bug 56940's big patch, tighten GC-mark case analysis, assume atom strings are immutable.
git-svn-id: svn://10.0.0.236/trunk@106522 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-28 22:37:25 +00:00
bryner%netscape.com
2b8302efc9 Fixing uninitialized variable. Bug 107262, r=bbaetz, sr=darin.
git-svn-id: svn://10.0.0.236/trunk@106521 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-28 22:30:30 +00:00
mkaply%us.ibm.com
fe491e5e88 More crap
git-svn-id: svn://10.0.0.236/trunk@106520 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-28 21:59:04 +00:00
mkaply%us.ibm.com
ca87d182ff Man I feel silly checking this crap in. Breaks on my machine, not the TB. Same problem
git-svn-id: svn://10.0.0.236/trunk@106519 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-28 21:55:32 +00:00
mkaply%us.ibm.com
88a869aeaf I don't know why this isn't breaking the tb. more reordering
git-svn-id: svn://10.0.0.236/trunk@106518 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-28 21:25:46 +00:00
dbaron%fas.harvard.edu
98e23443a4 Fix -O2 optimization crash with gcc 2.96 or 3.0.{1,2} by not inlining |#ifdef __GNUC__|. b=106891 r=pavlov sr=brendan
git-svn-id: svn://10.0.0.236/trunk@106517 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-28 21:02:05 +00:00
brendan%mozilla.org
8dc3d47fd7 Ensure proper pointer alignment in oversized arena footers (105726, r/sr=jband,shaver).
git-svn-id: svn://10.0.0.236/trunk@106516 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-28 20:41:53 +00:00
bienvenu%netscape.com
91836d1e86 add support for sorting by label r=bhuvan, sr=sspitzer 106717
git-svn-id: svn://10.0.0.236/trunk@106515 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-28 20:26:59 +00:00
bienvenu%netscape.com
35f98f686b fix for topcrash in morkRowObject::closerow r=naving, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@106514 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-28 20:25:12 +00:00
mkaply%us.ibm.com
cb63f542c1 Strange - this one builds on the TB but fails locally, one more ugly link order change
git-svn-id: svn://10.0.0.236/trunk@106513 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-28 16:16:38 +00:00
locka%iol.ie
a44ab92537 NOT PART OF BUILD. First cut packaging script for creating a control for hosting plugins IE CAB file.
git-svn-id: svn://10.0.0.236/trunk@106512 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-28 15:50:09 +00:00
locka%iol.ie
52a165425a NOT PART OF BUILD. First cut packaging script for creating a control for hosting plugins IE CAB file.
git-svn-id: svn://10.0.0.236/trunk@106511 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-28 15:40:45 +00:00
beard%netscape.com
95bf572e60 Fixing Carbon bustage: peterv's fix wasn't correct, seawood's checkin shouldn't have turned off opening the resource fork on TARGET_CARBON, only on XP_MACOSX.
git-svn-id: svn://10.0.0.236/trunk@106510 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-28 15:15:32 +00:00
jaggernaut%netscape.com
14b3d540ed Bug 106622: create profile wizard's first page is blank. Some stuff was accidentily removed recently, putting it back in. sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@106509 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-28 10:38:28 +00:00
sspitzer%netscape.com
a784f63b5d fix for #75611. the Message | Mark menu item is supposed to have a seperator between it and the
"Ignore Thread" menu item when reading a news message.
fix by andreas.premstaller@uibk.ac.at, r/sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@106508 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-28 10:00:56 +00:00
andreas.otte%primus-online.de
2bff3cee38 fix bug 84242 [FTP URL parsing broken] and bug 95277 [ftp: URL w/o path
should redirect to home dir] This will change the way we parse ftp
urls, a ftp url like ftp://user@host/path will go to path under
the users home directory not the root directory. With most anonymous
ftp servers there is no change since root is the home, but if you want
to access /path from a users directory you have to use
ftp://user@host//path instead. This will bring us closer to the ftp
urls outlined in rfc 1738. r=bbaetzcs.@mcgill.ca,
sr=darin@netscape.com


git-svn-id: svn://10.0.0.236/trunk@106507 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-28 08:58:18 +00:00
jaggernaut%netscape.com
ff4abec1dd Bug 53057: Fixing up users of implicit |CharT*| conversion operators for nsCString to use |.get()| instead, rr=dbaron, rs=scc
git-svn-id: svn://10.0.0.236/trunk@106506 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-28 08:33:51 +00:00
jaggernaut%netscape.com
fbfa1c9edc Bug 70083: add nsASingleFragmentString to hierarchy. r=dbaron, sr=scc
git-svn-id: svn://10.0.0.236/trunk@106505 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-28 08:24:55 +00:00
jaggernaut%netscape.com
4e12eb6e14 Fix spelling of "isContentPrefered" parameter. sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@106504 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-28 07:36:09 +00:00
beard%netscape.com
5a7716207f fix mach-o bustage: to cope with header skew between Mac OS X headers and Universal headers, use explicit cast to AEEventHandlerProcPtr.
git-svn-id: svn://10.0.0.236/trunk@106503 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-28 04:30:35 +00:00
sspitzer%netscape.com
35cdb5ca19 fix for #57756. when clicking on a link in the addressbook card page, it should
open up a new window, or use and existing browser window.
also, the links should look and act like links.
initial patch by jessica blanco (jblanco@us.ibm.com), r=racham, sr=sspitzer,bienvenu


git-svn-id: svn://10.0.0.236/trunk@106502 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-28 04:21:46 +00:00
23849 changed files with 4845888 additions and 106011 deletions

262
mozilla/Makefile.in Normal file
View File

@@ -0,0 +1,262 @@
#
# The contents of this file are subject to the Netscape 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/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = .
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/build/unix/modules.mk
ifneq ($(BUILD_MODULES),all)
DIRS = $(BUILD_MODULE_DIRS)
EXPORT_DIRS = $(BUILD_MODULE_DEP_DIRS)
else
#
# And now for something completely different...
# Divide the default build into tiers.
# Tiers must be defined on module boundaries
#
default:
$(MAKE) nspr
$(MAKE) tier_0
$(MAKE) tier_1
$(MAKE) tier_9
# Make sure that the existing rulesets work
DIRS = $(NSPRPUB_DIR) $(tier_0_dirs) $(tier_1_dirs) $(tier_9_dirs)
#
# tier 0 - base build config dirs
#
tier_0_dirs = \
config \
build \
include \
$(NULL)
#
# tier 1 - base libraries
#
tier_1_dirs = js
# MacOSX needs to build lib for MoreFiles before xpcom
ifeq ($(MOZ_WIDGET_TOOLKIT),mac)
tier_1_dirs += lib/mac/MoreFiles
endif
# intl should not be in here - it's just temporary until
# xpconnect's dependency on intl is repaired - see bug 106130
tier_9_dirs += \
modules/libreg \
string \
xpcom \
intl \
$(NULL)
ifndef MOZ_NATIVE_ZLIB
tier_9_dirs += modules/zlib
endif
# Linux and Solaris installer needs standalone libjar, hence standalone zlib
ifneq (,$(filter Linux SunOS,$(OS_ARCH)))
tier_9_dirs += modules/zlib/standalone
endif
tier_9_dirs += \
modules/libjar \
$(NULL)
#
# tier 9 - mozilla application
#
ifdef MOZ_JAVA_SUPPLEMENT
tier_9_dirs += \
java/util \
java/webclient \
$(NULL)
endif
ifndef MOZ_NATIVE_JPEG
tier_9_dirs += jpeg
endif
tier_9_dirs += dbm js/src/xpconnect
ifdef MOZ_OJI
tier_9_dirs += js/src/liveconnect
endif
ifdef MOZ_JSDEBUGGER
tier_9_dirs += js/jsd
endif
ifdef MOZ_ENABLE_XLIB
tier_9_dirs += gfx/src/xlibrgb widget/src/xlibxtbin
endif
ifdef MOZ_ENABLE_GTK
tier_9_dirs += widget/src/gtksuperwin widget/src/gtkxtbin
endif
ifdef MOZ_INTERNAL_LIBART_LGPL
tier_9_dirs += other-licenses/libart_lgpl
endif
tier_9_dirs += \
widget/timer \
modules/libutil \
netwerk \
modules/mpfilelocprovider \
uriloader \
modules/libpref \
modules/libimg \
modules/oji \
caps \
rdf \
expat \
htmlparser \
gfx \
gfx2 \
modules/libpr0n \
modules/plugin \
dom \
view \
widget \
content \
layout \
db \
docshell \
webshell \
embedding \
editor \
sun-java \
profile \
themes \
$(NULL)
ifdef ACCESSIBILITY
tier_9_dirs += accessible
endif
# This must preceed xpfe
ifdef MOZ_JPROF
tier_9_dirs += tools/jprof
endif
tier_9_dirs += xpfe xpinstall
ifdef MOZ_PSM
tier_9_dirs += security/manager
endif
ifdef MOZ_LDAP_XPCOM
tier_9_dirs += directory/c-sdk/ldap directory/xpcom
endif
ifdef MOZ_EXTENSIONS
tier_9_dirs += extensions
endif
ifdef MOZ_MAIL_NEWS
tier_9_dirs += mailnews
endif
ifdef MOZ_CALENDAR
tier_9_dirs += calendar
endif
ifdef MOZ_LEAKY
tier_9_dirs += tools/leaky
endif
ifdef ENABLE_TESTS
tier_9_dirs += xpcom/tests
endif
ifdef NS_TRACE_MALLOC
tier_9_dirs += tools/trace-malloc
endif
tier_9_dirs += l10n
ifneq (,$(MOZ_STATIC_COMPONENTS)$(MOZ_META_COMPONENTS))
tier_9_dirs += modules/staticmod
endif
tier_9_dirs += xpfe/bootstrap
endif # BUILD_MODULES == all
STATIC_MAKEFILES := $(NSPRPUB_DIR) directory/c-sdk/ldap
ifdef MOZ_PSM
STATIC_MAKEFILES += security/nss
endif
GARBAGE_DIRS += dist
DIST_GARBAGE = config.cache config.log config.status config-defs.h \
dependencies.beos config/autoconf.mk config/myrules.mk config/myconfig.mk \
unallmakefiles \
$(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
include $(topsrcdir)/config/rules.mk
tier_%:
@echo "$@: $($@_dirs)"
@$(EXIT_ON_ERROR) \
for d in $($@_dirs); do $(UPDATE_TITLE) \
$(MAKE) -C $$d export; \
done ; \
$(PERL) $(MOZILLA_DIR)/config/purge-old-headers.pl $(DIST)/include ;\
for d in $($@_dirs); do $(UPDATE_TITLE) \
$(MAKE) -C $$d install; \
done
#
# Individual modules
#
boehm:
ifdef GC_LEAK_DETECTOR
$(MAKE) -C gc/boehm
endif
nspr: boehm
ifdef NSPRPUB_DIR
$(MAKE) -C $(NSPRPUB_DIR)
endif
# For modules.mk standalone build
export::
+$(LOOP_OVER_EXPORT_DIRS)
export::
@$(PERL) $(MOZILLA_DIR)/config/purge-old-headers.pl $(DIST)/include
distclean::
cat unallmakefiles | $(XARGS) rm -f
rm -f unallmakefiles $(DIST_GARBAGE)

View File

@@ -0,0 +1,2 @@
Pursuant to section 3.3 of the MPL, this file will contain a list of the files
that have been modified by IBM Corporation.

View File

@@ -0,0 +1,3 @@
For mozilla-the-client build instructions, please read:
http://www.mozilla.org/build/

View File

@@ -0,0 +1,32 @@
#
# The contents of this file are subject to the Netscape 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/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public src build
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,190 @@
<html>
<head>
<title>
How the Accessible Module works
</title>
</head>
<body>
<h1>How the Accessible module (accessibility.dll) works</h1>
<ul>
<p>
See also:
<a href="http://www.mozilla.org/projects/ui/accessibility/vendors-win.html">Gecko Info for Windows Accessibility Vendors</a>, a primer for vendors of 3rd party accessibility software, on how to use our MSAA and other relevant API's.
</p>
<p>
The <a href="http://lxr.mozilla.org/seamonkey/source/accessible/">Accessible module</a> is where we implement support for the <a href="http://www.microsoft.com/enable/msaa/">Microsoft Active Accessibility (MSAA) API</a>
(<a href="http://bugzilla.mozilla.org/show_bug.cgi?id=12952">bug 12952</a>).
Support for Sun's <a href="http://www.sun.com/access/gnome/">Gnome Accessibility API</a> is part of our future plans as well.
</p>
</ul>
<h2>What is MSAA?</h2>
<ul>
<p>
A 3rd part accessibility aid, such as a screen reader, wants to track what's happening inside Mozilla. It needs to know about
focus changes and other events, and it needs to know whtat data nodes there are in the layout tree.
Using this information,
the screen reader will speak out loud important changes to the document or UI, and allow the user to track
where they navigate. Some screen readers also magnify text and images in the currently focused area, and others
show information on a <a href="http://www.audiodata.de/e/produkte/pc/lapbraille/">refreshable braille display</a>.
</p>
<p>
In Windows, accesibility aids acquires the necessary information to do this using hacks and MSAA. MSAA is supposed
to be the "right way" for accessibility aids to get information, but sometimes the hacks are more effective.
For example, screen readers look for screen draws of a vertical blinking line, to determine the location of the caret.
Without doing this, screen readers would not be able to let the user know where there caret has moved to in most programs,
because so many applications do not use the system caret (ours is an example). This is so commonly done, that
no one even bothers to support the MSAA caret, because the hack works.
</p>
<p>
MSAA provides information in two different ways:
<ol>
<li>a COM interface (IAccessible) that allows applications to expose the tree of data nodes that make up
each window in the user interface currently being interacted with and</li>
<li> a set of system messages
that confer accessibility-related events such as focus changes, changes to document content and alerts.</li>
</ol>
</p>
<p>
To really learn about MSAA, you need to download
the entire <a href="http://www.microsoft.com/enable/msaa/download.htm">MSAA SDK</a>.
Without downloading the SDK, you won't get the complete documentation.
The SDK also contains some very useful tools, such as the Accessible Event Watcher, which shows what accessible
events are being generated by a given piece of software. The Accessible Explorer and Inspect Object tools
show the tree of data nodes the Accessible object is exposing through COM.
</p>
</ul>
<h2>IAccessible Interface</h2>
<ul>
<p>
The IAccessible interface is used in a tree of IAccessible's, each one representing a data node, similar to a DOM.
</p>
<p>
Here are the methods supported in IAccessible:
<ul>
<li>get_accParent: Get the parent of an IAccessible.</li>
<li>get_accChildCount: Get the number of children of an IAccesible.</li>
<li>get_accChild: Get the child of an Iaccessible.</li>
<li>get_accName: Get the "name" of the IAccessible, for example the name of a button, checkbox or menuitem.</li>
<li>get_accValue: Get the "value" of the IAccessible, for example a number in a slider, a URL for a link, the text a user entered in a field.</li>
<li>get_accDescription: Get a long description of the current IAccessible. This is not really too useful.</li>
<li>get_accRole: Get an enumerated value representing what this IAccessible is used for, for example.</li>
is it a link, static text, editable text, a checkbox, or a table cell, etc.</li>
<li>get_accState: a 32 bit field representing possible on/off states, such as focused, fousable, selected, selectable, visible, protected (for passwords),
checked, etc. </li>
<li>get_accHelp: Get context sensitive help for the IAccessible.</li>
<li>get_accHelpTopic: We don't use this, it's only if the Windows help system is used.</li>
<li>get_accKeyboardShortcut: What is the keyboard shortcut for this IAccessible.</li>
<li>get_accFocus: Which child is focused?</li>
<li>get_accSelection: Which children of this item are selected?</li>
<li>get_accDefaultAction: Get a description or name of the default action for this component, such as "jump" for links.</li>
<li>accSelect: Select the item associated with this IAccessible.</li>
<li>accLocation: Get the x,y coordinates, and the height and width of this IAccessible node.</li>
<li>accNavigate: Navigate up, down, left or right from this IAccessible.</li>
<li>accHitTest: Find out what IAccessible exists and a specific coordinate.</li>
<li>accDoDefaultAction: Perform the action described by get_accDefaultAction.</li>
<li>put_accName: Change the name.</li>
<li>put_accValue: Change the value.</li>
</ul>
</p>
</ul>
<h2>The Basics</h2>
<ul>
<p>
Rather than directly implement IAccessible with an Accessible class, we have chosen to proxy to our own cross-platform interface,
called nsIAccessible, which is more robust. It has the capability of supporting other new accessibility API's such
as Sun's Gnome Accessiblity API. The nsIAccessible interface is implemented by a variety of classes for each of the
various objects in HTML. Each class is tailored to the specific abilities and properties of the HTML objects it applies to.
</p>
<p>
The first thing that happens when an accessibility aid wants to watch our application is calls the Windows API function
AccessibleObjectFromWindow(). This in turns sends the window in question
a <a href="http://lxr.mozilla.org/seamonkey/search?string=WM_GETOBJECT">WM_GETOBJECT</a> message requesting an IAccessible for the window.
In our case, this event is received in mozilla/widget/src/windows/nsWindow.cpp.
We send back an IAccessible interface that represents that root window. The accessibility aid will use
that first IAccessible to reach rest of the IAccessible hierarchy, by asking for it's children IAccessibles, asking the children for the
grandchildren IAccessibles, and so on. Until this WM_GETOBJECT message is processed, the accessibility.dll is not loaded,
so there is almost zero overhead for accessibility in Mozilla.
</p>
</ul>
<h2>How the IAccessible's are Created</h2>
<ul>
<p>
To create the root IAccessible for a window the first time it gets the <a href="http://lxr.mozilla.org/seamonkey/search?string=WM_GETOBJECT">WM_GETOBJECT</a> message in,
nsWindow.cpp first generates an internal event
called <a href="http://lxr.mozilla.org/seamonkey/search?string=NS_GETACCESSIBLE">NS_GETACCESSIBLE</a>,
which is handled in nsFrame.cpp via the creation of an nsRootAccessible implementation of the nsIAccessible interface.
The first IAccessible is then created by instantiating a RootAccessible class. This RootAccessible is also cached by
the nsWindow it's for, so that any additional WM_GETOBJECT messages use the same RootAccessible.
The RootAccessible class used to implement IAccessible here is slightly different from the normal Accessible class
that's used, in that it keeps track of event data.
RootAccessible and Accessible are both implemented
in <a href="http://lxr.mozilla.org/seamonkey/source/widget/source/windows/Accessible.cpp">
mozilla/widget/src/windows/Accessible.cpp</a>).
</P>
</ul>
<h2>The Real Power Behind IAccessible's</h2>
<ul>
<p>The implementations of IAccessible (Accessible and RootAccessible), don't know anything about Mozilla
objects. They merely proxy to our cross platform accessibility classes, which all have an nsIAccessible interface.
</h2>
<p>
The base implementation for nsIAccessible is called nsAccessible. It has default implementations for all the
nsIAccessible methods. It also knows how
to walk Mozilla's content DOM and frame tree, exposing only the objects that are needed for accessibility.
Essentially, nsAccessible knows what it needs to expose by asking each DOM node's primary frame for
an nsIAccessible, using the GetAccessible() method. If it gets one, it's considered an accessible object.
A frame that wishes to return
an nsIAccessible GetAccessible() is called, creates one of the correct type on the fly using
nsIAccessibilityService methods built for that purpose.
</p>
<p>
The specific implementations
of nsIAccessible for each widget or content type inherit from nsAccessible.
Each implementation then overrides those methods
it wishes to implement, and does nothing for those methods it wants the default behavior for.
For example, the default behavior for nsIAccessible::getAccFirstChild is to
instantial a nsDOMTreeWalker, and ask it for the first child. However, nsImageAccessible overrides getAccFirstChild,
returning the first area of an image map if there is one, otherwise nsnull.
</p>
</ul>
<h2>MSAA Events</h2>
<ul>
<p>
When an accessibility-related event occurs within an application such as Mozilla, it must use NotifyWinEvent from
the Win32 API. NotifyWinEvent is passed arguments for the window the event occured in, and the number of the child
within that window. Accessibility aids use the Win32 call SetWinEventHook() to register as a listener for these events.
</p>
<p>
The accessibility aid is choose which events it is interested in learning more about by using the Win32 API call
AccessibleObjectFromEvent, requesting the IAccessible to the node corresponding to the
child number that had been indicated from NotifyWinEvent(). This ends up asking our RootAccessible for the child
IAccessible that matches the window handle and child id we indicated through NotofyWinEvent().
</p>
<p>
In Mozilla, this creates a problem. We cannot
keep track of a child number for every important accessible node in a document. We deal with this by generating fake
child IDs for the most recent accessibile events that we have generated, in a circular array.
</p>
<p>
Since there is a RootAccessible for each top level window that might generate MSAA events, that's where we do the bookkeeping
for these events and their nsIAccessible's. Whenever NotifyWinEvent() is called, a new fake ID is generated (We use
negative numbers for the fake IDs). When the callback comes to request the IAccessible for that child number,
we check the circular array for that ID, and voila, we have the corresponding nsIAccessible to proxy.
</p>
<p>
Every RootAccessible has an nsRootAccessible which is an nsIAccessibleEventReceiver. The RootAccessible
uses this to register itself as an nsIAccessibleEventListener. In the end, nsRootAccessible registers itself as a listener
of Mozilla's internal and DOM events. It's HandleEvent routine translates these events into MSAA events, and passes them along to
with an nsIAccessible to the original RootAccessible::HandleEvent
which turns that nsIAccessible into a NotifyWinEvent call, complete with a fake child ID.
</p>
<p>
Most MSAA events aren't utilized by accessibility aids. Therefore we implement only the handful that matter.
The most important event is the focus event, followed by name, state and value change events.
</p>
</ul>
</body>
</html>

View File

@@ -0,0 +1,60 @@
#
# The contents of this file are subject to the Netscape 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/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = accessibility
LIBRARY_NAME = accessibility
EXPORT_LIBRARY = 1
SHORT_LIBNAME = access
IS_COMPONENT = 1
MODULE_NAME = nsAccessibilityModule
REQUIRES = xpcom \
string \
dom \
$(NULL)
CPPSRCS = nsAccessibilityFactory.cpp
LOCAL_INCLUDES = -I$(srcdir)/../src
SHARED_LIBRARY_LIBS = \
$(DIST)/lib/libaccessibility_s.$(LIB_SUFFIX) \
$(NULL)
EXTRA_DSO_LIBS = \
gkconshared_s \
$(NULL)
EXTRA_DSO_LDOPTS = \
$(MOZ_COMPONENT_LIBS) \
-L$(DIST)/lib \
$(EXTRA_DSO_LIBS) \
-lgkgfx \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,50 @@
#!gmake
#
# The contents of this file are subject to the Netscape 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/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..
MODULE=accessibility
REQUIRES = xpcom \
string \
dom \
$(NULL)
LIBRARY_NAME=accessibility
MODULE_NAME=nsAccessibilityModule
CPP_OBJS=\
.\$(OBJDIR)\nsAccessibilityFactory.obj \
$(NULL)
LINCS = $(LINCS) -I..\src # for implementation headers
SUB_LIBRARIES=\
$(DIST)\lib\accessibility_s.lib \
$(NULL)
LLIBS=\
$(DIST)\lib\xpcom.lib \
$(DIST)\lib\timer_s.lib \
$(DIST)\lib\gkgfx.lib \
$(DIST)\lib\contentshared_s.lib \
$(LIBNSPR) \
$(NULL)
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,76 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsCOMPtr.h"
#include "nsIModule.h"
#include "nsIGenericFactory.h"
#include "nsIServiceManager.h"
#include "nsIComponentManager.h"
#include "nsIAccessibilityService.h"
#include "nscore.h"
static NS_IMETHODIMP
NS_ConstructAccessibilityService(nsISupports *aOuter, REFNSIID aIID, void **aResult)
{
nsresult rv;
NS_ASSERTION(aOuter == nsnull, "no aggregation");
nsIAccessibilityService* accessibility;
rv = NS_NewAccessibilityService(&accessibility);
if (NS_FAILED(rv)) {
NS_ERROR("Unable to construct chrome registry");
return rv;
}
rv = accessibility->QueryInterface(aIID, aResult);
NS_ASSERTION(NS_SUCCEEDED(rv), "unable to find correct interface");
NS_RELEASE(accessibility);
return rv;
}
// The list of components we register
static nsModuleComponentInfo components[] =
{
{ "AccessibilityService",
NS_ACCESSIBILITY_SERVICE_CID,
"@mozilla.org/accessibilityService;1",
NS_ConstructAccessibilityService
},
};
NS_IMPL_NSGETMODULE(nsAccessibilityModule, components);

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,26 @@
#!gmake
#
# The contents of this file are subject to the Netscape 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/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..
DIRS= public src build
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,2 @@
nsIAccessibilityService.idl
nsIAccessible.idl

View File

@@ -0,0 +1,46 @@
#
# The contents of this file are subject to the Netscape 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/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = accessibility
XPIDL_MODULE= accessibility
XPIDLSRCS = \
nsIAccessibilityService.idl \
nsIAccessible.idl \
nsIAccessibleDocument.idl \
nsIAccessibleEventReceiver.idl \
nsIAccessibleEventListener.idl \
nsIAccessibleSelectable.idl \
nsIAccessibleProvider.idl \
$(NULL)
EXPORTS = \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,39 @@
#!gmake
#
# The contents of this file are subject to the Netscape 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/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..
MODULE=accessibility
XPIDL_MODULE=accessibility
XPIDLSRCS = \
.\nsIAccessibilityService.idl \
.\nsIAccessible.idl \
.\nsIAccessibleDocument.idl \
.\nsIAccessibleEventReceiver.idl \
.\nsIAccessibleEventListener.idl \
.\nsIAccessibleSelectable.idl \
.\nsIAccessibleProvider.idl \
$(NULL)
EXPORTS = \
$(NULL)
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,71 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* 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 the Mozilla browser.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author: Eric Vaughan (evaughan@netscape.com)
*
* Contributor(s):
*/
#include "nsISupports.idl"
#include "domstubs.idl"
#include "nsIAtom.idl"
#include "domstubs.idl"
#include "nsIAccessible.idl"
interface nsIWeakReference;
[scriptable, uuid(68D9720A-0984-42b6-A3F5-8237ED925727)]
interface nsIAccessibilityService : nsISupports
{
nsIAccessible createRootAccessible(in nsISupports aPresContext, in nsISupports aFrame);
nsIAccessible createHTMLComboboxAccessible(in nsIDOMNode aNode, in nsISupports aPresShell);
nsIAccessible createHTMLListboxAccessible(in nsIDOMNode aNode, in nsISupports aPresShell);
nsIAccessible createHTMLSelectOptionAccessible(in nsIDOMNode aNode, in nsIAccessible aAccParent, in nsISupports aPresShell);
nsIAccessible createHTMLCheckboxAccessible(in nsISupports aFrame);
nsIAccessible createHTMLRadioButtonAccessible(in nsISupports aFrame);
nsIAccessible createHTMLButtonAccessible(in nsISupports aFrame);
nsIAccessible createHTML4ButtonAccessible(in nsISupports aFrame);
nsIAccessible createHTMLTextAccessible(in nsISupports aFrame);
nsIAccessible createHTMLImageAccessible(in nsISupports aFrame);
nsIAccessible createHTMLAreaAccessible(in nsIWeakReference aPresShell, in nsIDOMNode aDOMNode, in nsIAccessible aAccParent);
nsIAccessible createHTMLTableAccessible(in nsISupports aFrame);
nsIAccessible createHTMLTableCellAccessible(in nsISupports aFrame);
nsIAccessible createHTMLTextFieldAccessible(in nsISupports aFrame);
nsIAccessible createHTMLIFrameAccessible(in nsIDOMNode aNode, in nsISupports aPresContext);
nsIAccessible createHTMLBlockAccessible(in nsIDOMNode aNode, in nsISupports aDocument);
nsIAccessible createXULButtonAccessible(in nsIDOMNode aNode);
nsIAccessible createXULCheckboxAccessible(in nsIDOMNode aNode);
nsIAccessible createXULImageAccessible(in nsIDOMNode aNode);
nsIAccessible createXULTextAccessible(in nsIDOMNode aNode);
nsIAccessible createAccessible(in nsIDOMNode aNode, in nsISupports aDocument);
nsIAccessible getAccessibleFor(in nsIDOMNode aNode);
};
%{ C++
// for component registration
// {DE401C37-9A7F-4278-A6F8-3DE2833989EF}
#define NS_ACCESSIBILITY_SERVICE_CID \
{ 0xde401c37, 0x9a7f, 0x4278, { 0xa6, 0xf8, 0x3d, 0xe2, 0x83, 0x39, 0x89, 0xef } }
extern nsresult
NS_NewAccessibilityService(nsIAccessibilityService** aResult);
%}

View File

@@ -0,0 +1,192 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* 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 the Mozilla browser.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author: Eric D Vaughan (evaughan@netscape.com)
*
* Contributor(s):
* Aaron Leventhal
* John Gaunt
*/
#include "nsISupports.idl"
#include "nsIDOMNode.idl"
#include "domstubs.idl"
[scriptable, uuid(B26FBE47-9A5F-42a1-822B-082461AE4D6D)]
interface nsIAccessible : nsISupports
{
readonly attribute nsIAccessible accParent;
readonly attribute nsIAccessible accNextSibling;
readonly attribute nsIAccessible accPreviousSibling;
readonly attribute nsIAccessible accFirstChild;
readonly attribute nsIAccessible accLastChild;
readonly attribute long accChildCount;
attribute DOMString accName;
readonly attribute DOMString accValue;
readonly attribute DOMString accDescription;
readonly attribute unsigned long accRole;
readonly attribute unsigned long accState;
readonly attribute unsigned long accExtState;
readonly attribute DOMString accHelp;
readonly attribute nsIAccessible accFocused;
nsIAccessible accGetAt(in long x, in long y);
nsIAccessible accNavigateRight();
nsIAccessible accNavigateLeft();
nsIAccessible accNavigateUp();
nsIAccessible accNavigateDown();
void accGetBounds(out long x,
out long y,
out long width,
out long height);
void accAddSelection();
void accRemoveSelection();
void accExtendSelection();
void accTakeSelection();
void accTakeFocus();
readonly attribute PRUint8 accNumActions;
DOMString getAccActionName(in PRUint8 index);
void accDoAction(in PRUint8 index); // Action number 0 is the default action
nsIDOMNode accGetDOMNode();
// Used by Accessible implementation to save data and speed up accessibility tree walking
[noscript] void CacheOptimizations(in nsIAccessible aParent, in PRInt32 aSiblingIndex, in nsIDOMNodeList aSiblingList);
// MSAA State flags - used for bitfield. More than 1 allowed.
const unsigned long STATE_UNAVAILABLE = 0x00000001; // Disabled, maps to opposite of Java ENABLED, Gnome/ATK SENSITIVE?
const unsigned long STATE_SELECTED = 0x00000002;
const unsigned long STATE_FOCUSED = 0x00000004;
const unsigned long STATE_PRESSED = 0x00000008;
const unsigned long STATE_CHECKED = 0x00000010;
const unsigned long STATE_MIXED = 0x00000020; // 3-state checkbox or toolbar button
const unsigned long STATE_READONLY = 0x00000040; // Maps to opposite of Java/Gnome/ATK EDITABLE state
const unsigned long STATE_HOTTRACKED = 0x00000080;
const unsigned long STATE_DEFAULT = 0x00000100;
const unsigned long STATE_EXPANDED = 0x00000200;
const unsigned long STATE_COLLAPSED = 0x00000400;
const unsigned long STATE_BUSY = 0x00000800;
const unsigned long STATE_FLOATING = 0x00001000; // Children "owned" not "contained" by parent
const unsigned long STATE_MARQUEED = 0x00002000;
const unsigned long STATE_ANIMATED = 0x00004000;
const unsigned long STATE_INVISIBLE = 0x00008000;
const unsigned long STATE_OFFSCREEN = 0x00010000;
const unsigned long STATE_SIZEABLE = 0x00020000;
const unsigned long STATE_MOVEABLE = 0x00040000;
const unsigned long STATE_SELFVOICING = 0x00080000;
const unsigned long STATE_FOCUSABLE = 0x00100000;
const unsigned long STATE_SELECTABLE = 0x00200000;
const unsigned long STATE_LINKED = 0x00400000;
const unsigned long STATE_TRAVERSED = 0x00800000;
const unsigned long STATE_MULTISELECTABLE = 0x01000000; // Supports multiple selection
const unsigned long STATE_EXTSELECTABLE = 0x02000000; // Supports extended selection
const unsigned long STATE_ALERT_LOW = 0x04000000; // This information is of low priority
const unsigned long STATE_ALERT_MEDIUM = 0x08000000; // This information is of medium priority
const unsigned long STATE_ALERT_HIGH = 0x10000000; // This information is of high priority
const unsigned long STATE_PROTECTED = 0x20000000; // Maps to Gnome's *Role* ATK_ROLE_PASSWD_TEXT, nothing for Java?
const unsigned long STATE_HASPOPUP = 0x40000000; // New in MSAA 2.0
// Extended state flags (for now non-MSAA, for Java and Gnome/ATK support)
// This is only the states that there isn't already a mapping for in MSAA
// See www.accessmozilla.org/article.php?sid=11 for information on the mappings between accessibility API states
const unsigned long STATE_INVALID = 0x00200000; // No explanation given
const unsigned long STATE_ACTIVE = 0x00400000; // This window is currently the active window
const unsigned long STATE_EXPANDABLE = 0x00800000; // An item that can be expanded, such as a tree item with children
const unsigned long STATE_MODAL = 0x01000000; // Must do something with control before leaving it
const unsigned long STATE_MULTI_LINE = 0x02000000; // Edit control that can take multiple lines
const unsigned long STATE_SENSITIVE = 0x04000000; // No explanation given
const unsigned long STATE_RESIZABLE = 0x08000000; // Object can be resized
const unsigned long STATE_SHOWING = 0x10000000; // This object and all of it's ancestors are visible
const unsigned long STATE_SINGLE_LINE = 0x20000000; // This text object can only contain 1 line of text
const unsigned long STATE_TRANSIENT = 0x40000000; // Tells accessibility aid "Don't add event listener - this object doesn't generate any". For example, could be used with higher level containers.
const unsigned long STATE_VERTICAL = 0x80000000; // Especially used for sliders and scrollbars
// MSAA Roles - only one per nsIAccessible or IAccessible
const unsigned long ROLE_TITLEBAR = 0x00000001;
const unsigned long ROLE_MENUBAR = 0x00000002;
const unsigned long ROLE_SCROLLBAR = 0x00000003;
const unsigned long ROLE_GRIP = 0x00000004;
const unsigned long ROLE_SOUND = 0x00000005;
const unsigned long ROLE_CURSOR = 0x00000006;
const unsigned long ROLE_CARET = 0x00000007;
const unsigned long ROLE_ALERT = 0x00000008;
const unsigned long ROLE_WINDOW = 0x00000009;
const unsigned long ROLE_CLIENT = 0x0000000A;
const unsigned long ROLE_MENUPOPUP = 0x0000000B;
const unsigned long ROLE_MENUITEM = 0x0000000C;
const unsigned long ROLE_TOOLTIP = 0x0000000D;
const unsigned long ROLE_APPLICATION = 0x0000000E;
const unsigned long ROLE_DOCUMENT = 0x0000000F;
const unsigned long ROLE_PANE = 0x00000010;
const unsigned long ROLE_CHART = 0x00000011;
const unsigned long ROLE_DIALOG = 0x00000012;
const unsigned long ROLE_BORDER = 0x00000013;
const unsigned long ROLE_GROUPING = 0x00000014;
const unsigned long ROLE_SEPARATOR = 0x00000015;
const unsigned long ROLE_TOOLBAR = 0x00000016;
const unsigned long ROLE_STATUSBAR = 0x00000017;
const unsigned long ROLE_TABLE = 0x00000018;
const unsigned long ROLE_COLUMNHEADER = 0x00000019;
const unsigned long ROLE_ROWHEADER = 0x0000001A;
const unsigned long ROLE_COLUMN = 0x0000001B;
const unsigned long ROLE_ROW = 0x0000001C;
const unsigned long ROLE_CELL = 0x0000001D;
const unsigned long ROLE_LINK = 0x0000001E;
const unsigned long ROLE_HELPBALLOON = 0x0000001F;
const unsigned long ROLE_CHARACTER = 0x00000020;
const unsigned long ROLE_LIST = 0x00000021;
const unsigned long ROLE_LISTITEM = 0x00000022;
const unsigned long ROLE_OUTLINE = 0x00000023;
const unsigned long ROLE_OUTLINEITEM = 0x00000024;
const unsigned long ROLE_PAGETAB = 0x00000025;
const unsigned long ROLE_PROPERTYPAGE = 0x00000026;
const unsigned long ROLE_INDICATOR = 0x00000027;
const unsigned long ROLE_GRAPHIC = 0x00000028;
const unsigned long ROLE_STATICTEXT = 0x00000029;
const unsigned long ROLE_TEXT = 0x0000002A; // Editable, selectable, etc.
const unsigned long ROLE_PUSHBUTTON = 0x0000002B;
const unsigned long ROLE_CHECKBUTTON = 0x0000002C;
const unsigned long ROLE_RADIOBUTTON = 0x0000002D;
const unsigned long ROLE_COMBOBOX = 0x0000002E;
const unsigned long ROLE_DROPLIST = 0x0000002F;
const unsigned long ROLE_PROGRESSBAR = 0x00000030;
const unsigned long ROLE_DIAL = 0x00000031;
const unsigned long ROLE_HOTKEYFIELD = 0x00000032;
const unsigned long ROLE_SLIDER = 0x00000033;
const unsigned long ROLE_SPINBUTTON = 0x00000034;
const unsigned long ROLE_DIAGRAM = 0x00000035;
const unsigned long ROLE_ANIMATION = 0x00000036;
const unsigned long ROLE_EQUATION = 0x00000037;
const unsigned long ROLE_BUTTONDROPDOWN = 0x00000038;
const unsigned long ROLE_BUTTONMENU = 0x00000039;
const unsigned long ROLE_BUTTONDROPDOWNGRID = 0x0000003A;
const unsigned long ROLE_WHITESPACE = 0x0000003B;
const unsigned long ROLE_PAGETABLIST = 0x0000003C;
const unsigned long ROLE_CLOCK = 0x0000003D;
const unsigned long ROLE_SPLITBUTTON = 0x0000003E; // New in MSAA 2.0
const unsigned long ROLE_IPADDRESS = 0x0000003F; // New in MSAA 2.0
};

View File

@@ -0,0 +1,41 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* 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 the Mozilla browser.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author: Aaron Leventhal
*
* Contributor(s):
* John Gaunt
*/
#include "nsISupports.idl"
#include "nsIAccessible.idl"
#include "domstubs.idl"
interface nsIDocument;
[scriptable, uuid(8781FC88-355F-4439-881F-6504A0A1CEB6)]
interface nsIAccessibleDocument : nsISupports
{
readonly attribute DOMString URL;
readonly attribute DOMString title;
readonly attribute DOMString mimeType;
readonly attribute DOMString docType;
DOMString getNameSpaceURIForID(in short nameSpaceID);
[noscript] nsIDocument getDocument();
};

View File

@@ -0,0 +1,41 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* 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 the Mozilla browser.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author: Eric D Vaughan (evaughan@netscape.com)
*
* Contributor(s):
*/
#include "nsISupports.idl"
#include "nsIAccessible.idl"
[scriptable, uuid(BEE49E7D-9D06-49bf-8984-1694C697D74F)]
interface nsIAccessibleEventListener : nsISupports
{
// these are set to the values given by MSAA
const unsigned long EVENT_FOCUS = 0x8005;
const unsigned long EVENT_STATE_CHANGE = 0x800A;
const unsigned long EVENT_NAME_CHANGE = 0x800C;
const unsigned long EVENT_SELECTION = 0x8006;
const unsigned long EVENT_SELECTION_ADD = 0x8007;
const unsigned long EVENT_SELECTION_REMOVE = 0x8008;
const unsigned long EVENT_SELECTION_WITHIN = 0x8009;
void handleEvent(in unsigned long aEvent, in nsIAccessible aTarget);
};

View File

@@ -0,0 +1,32 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* 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 the Mozilla browser.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author: Eric D Vaughan (evaughan@netscape.com)
*
* Contributor(s):
*/
#include "nsIAccessibleEventListener.idl"
[scriptable, uuid(AB331E47-4FAA-4a12-9480-9B480DD78B39)]
interface nsIAccessibleEventReceiver : nsISupports
{
void addAccessibleEventListener(in nsIAccessibleEventListener aListener);
void removeAccessibleEventListener();
};

View File

@@ -0,0 +1,33 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* 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 the Mozilla browser.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author: John Gaunt (jgaunt@netscape.com)
*
* Contributor(s):
* John Gaunt
*/
#include "nsISupports.idl"
#include "nsIAccessible.idl"
[scriptable, uuid(3f0e3eb0-1dd2-11b2-9605-be5b8e76cf4b)]
interface nsIAccessibleProvider : nsISupports
{
readonly attribute nsIAccessible accessible;
};

View File

@@ -0,0 +1,34 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* 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 the Mozilla browser.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author: John Gaunt (jgaunt@netscape.com)
*
* Contributor(s):
* John Gaunt
*/
#include "nsISupports.idl"
#include "nsIAccessible.idl"
#include "nsISupportsArray.idl"
[scriptable, uuid(34d268d6-1dd2-11b2-9d63-83a5e0ada290)]
interface nsIAccessibleSelectable : nsISupports
{
nsISupportsArray GetSelectedChildren();
};

View File

@@ -0,0 +1 @@
accessible.properties

View File

@@ -0,0 +1,80 @@
#
# The contents of this file are subject to the Netscape 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/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = accessibility
LIBRARY_NAME = accessibility_s
REQUIRES = xpcom \
string \
gfx \
layout \
content \
widget \
dom \
view \
locale \
intl \
docshell \
webshell \
necko \
htmlparser \
xuldoc \
imglib2 \
gfx2 \
uriloader \
timer \
$(NULL)
CPPSRCS = \
nsAccessible.cpp \
nsAccessibilityService.cpp \
nsBaseWidgetAccessible.cpp \
nsFormControlAccessible.cpp \
nsGenericAccessible.cpp \
nsHTMLAreaAccessible.cpp \
nsHTMLFormControlAccessible.cpp \
nsHTMLIFrameRootAccessible.cpp \
nsHTMLImageAccessible.cpp \
nsHTMLLinkAccessible.cpp \
nsHTMLSelectAccessible.cpp \
nsHTMLTableAccessible.cpp \
nsHTMLTextAccessible.cpp \
nsRootAccessible.cpp \
nsSelectAccessible.cpp \
nsXULFormControlAccessible.cpp \
nsXULTextAccessible.cpp \
$(NULL)
EXPORTS = \
nsRootAccessible.h \
$(NULL)
# we don't want the shared lib, but we want to force the creation of a static lib.
FORCE_STATIC_LIB = 1
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,5 @@
jump = Jump
press = Press
check = Check
uncheck = Uncheck
select = Select

View File

@@ -0,0 +1 @@
accessible.properties

View File

@@ -0,0 +1,5 @@
jump = Jump
press = Press
check = Check
uncheck = Uncheck
select = Select

View File

@@ -0,0 +1,3 @@
en-US.jar:
locale/en-US/global/accessible.properties

View File

@@ -0,0 +1,791 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Original Author: David W. Hyatt (hyatt@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsIAccessibilityService.h"
#include "nsAccessibilityService.h"
#include "nsAccessible.h"
#include "nsCOMPtr.h"
#include "nsIDocument.h"
#include "nsIPresShell.h"
#include "nsIPresContext.h"
#include "nsIContent.h"
#include "nsIFrame.h"
#include "nsRootAccessible.h"
#include "nsINameSpaceManager.h"
#include "nsLayoutAtoms.h"
#include "nsIDOMNode.h"
#include "nsHTMLTextAccessible.h"
#include "nsITextContent.h"
#include "nsTextFragment.h"
#include "nsHTMLTableAccessible.h"
#include "nsHTMLImageAccessible.h"
#include "nsHTMLAreaAccessible.h"
#include "nsHTMLLinkAccessible.h"
#include "nsHTMLSelectAccessible.h"
#include "nsIDOMHTMLAreaElement.h"
#include "nsHTMLFormControlAccessible.h"
#include "nsIAccessibleProvider.h"
#include "nsILink.h"
#include "nsIDocShellTreeItem.h"
#include "nsIDOMDocument.h"
#include "nsIDOMHTMLOptionElement.h"
#include "nsIDOMXULCheckboxElement.h"
#include "nsXULFormControlAccessible.h"
#include "nsXULTextAccessible.h"
#include "nsString.h"
// IFrame
#include "nsIDocShell.h"
#include "nsHTMLIFrameRootAccessible.h"
/**
* nsAccessibility Service
*/
nsAccessibilityService::nsAccessibilityService()
{
NS_INIT_REFCNT();
}
nsAccessibilityService::~nsAccessibilityService()
{
}
NS_IMPL_THREADSAFE_ISUPPORTS1(nsAccessibilityService, nsIAccessibilityService);
////////////////////////////////////////////////////////////////////////////////
// nsIAccessibilityService methods:
NS_IMETHODIMP
nsAccessibilityService::CreateRootAccessible(nsISupports* aPresContext, nsISupports* aFrame, nsIAccessible **_retval)
{
// XXX - jgaunt - looks like we aren't using this
//nsIFrame* f = NS_STATIC_CAST(nsIFrame*, aFrame);
nsCOMPtr<nsIPresContext> presContext(do_QueryInterface(aPresContext));
NS_ASSERTION(presContext,"Error non prescontext passed to accessible factory!!!");
nsCOMPtr<nsIPresShell> presShell;
presContext->GetShell(getter_AddRefs(presShell));
NS_ASSERTION(presShell,"Error not presshell!!");
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(presShell));
*_retval = new nsRootAccessible(weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
NS_IMETHODIMP
nsAccessibilityService::CreateHTMLComboboxAccessible(nsIDOMNode* aDOMNode, nsISupports* aPresContext, nsIAccessible **_retval)
{
nsCOMPtr<nsIPresContext> presContext(do_QueryInterface(aPresContext));
NS_ASSERTION(presContext,"Error non prescontext passed to accessible factory!!!");
nsCOMPtr<nsIPresShell> presShell;
presContext->GetShell(getter_AddRefs(presShell));
nsCOMPtr<nsIWeakReference> weakShell = do_GetWeakReference(presShell);
*_retval = new nsHTMLComboboxAccessible(aDOMNode, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
NS_IMETHODIMP
nsAccessibilityService::CreateHTMLListboxAccessible(nsIDOMNode* aDOMNode, nsISupports* aPresContext, nsIAccessible **_retval)
{
nsCOMPtr<nsIPresContext> presContext(do_QueryInterface(aPresContext));
NS_ASSERTION(presContext,"Error non prescontext passed to accessible factory!!!");
nsCOMPtr<nsIPresShell> presShell;
presContext->GetShell(getter_AddRefs(presShell));
nsCOMPtr<nsIWeakReference> weakShell = do_GetWeakReference(presShell);
*_retval = new nsHTMLListboxAccessible(aDOMNode, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
NS_IMETHODIMP
nsAccessibilityService::CreateHTMLSelectOptionAccessible(nsIDOMNode* aDOMNode, nsIAccessible *aAccParent, nsISupports* aPresContext, nsIAccessible **_retval)
{
nsCOMPtr<nsIPresContext> presContext(do_QueryInterface(aPresContext));
NS_ASSERTION(presContext,"Error non prescontext passed to accessible factory!!!");
nsCOMPtr<nsIPresShell> presShell;
presContext->GetShell(getter_AddRefs(presShell));
nsCOMPtr<nsIWeakReference> weakShell = do_GetWeakReference(presShell);
*_retval = new nsHTMLSelectOptionAccessible(aAccParent, aDOMNode, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
/* nsIAccessible createHTMLCheckboxAccessible (in nsISupports aPresShell, in nsISupports aFrame); */
NS_IMETHODIMP nsAccessibilityService::CreateHTMLCheckboxAccessible(nsISupports *aFrame, nsIAccessible **_retval)
{
nsIFrame* frame;
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIWeakReference> weakShell;
nsresult rv = GetInfo(aFrame, &frame, getter_AddRefs(weakShell), getter_AddRefs(node));
if (NS_FAILED(rv))
return rv;
*_retval = new nsHTMLCheckboxAccessible(node, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
NS_IMETHODIMP nsAccessibilityService::CreateXULCheckboxAccessible(nsIDOMNode *aNode, nsIAccessible **_retval)
{
nsCOMPtr<nsIWeakReference> weakShell;
GetShellFromNode(aNode, getter_AddRefs(weakShell));
// reusing the HTML accessible widget and enhancing for XUL
*_retval = new nsXULCheckboxAccessible(aNode, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
/* nsIAccessible createHTMRadioButtonAccessible (in nsISupports aPresShell, in nsISupports aFrame); */
NS_IMETHODIMP nsAccessibilityService::CreateHTMLRadioButtonAccessible(nsISupports *aFrame, nsIAccessible **_retval)
{
nsIFrame* frame;
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIWeakReference> weakShell;
nsresult rv = GetInfo(aFrame, &frame, getter_AddRefs(weakShell), getter_AddRefs(node));
if (NS_FAILED(rv))
return rv;
*_retval = new nsHTMLRadioButtonAccessible(node, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
/* nsIAccessible createHTMLButtonAccessible (in nsISupports aPresShell, in nsISupports aFrame); */
NS_IMETHODIMP nsAccessibilityService::CreateHTMLButtonAccessible(nsISupports *aFrame, nsIAccessible **_retval)
{
nsIFrame* frame;
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIWeakReference> weakShell;
nsresult rv = GetInfo(aFrame, &frame, getter_AddRefs(weakShell), getter_AddRefs(node));
if (NS_FAILED(rv))
return rv;
*_retval = new nsHTMLButtonAccessible(node, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
/* nsIAccessible createHTML4ButtonAccessible (in nsISupports aPresShell, in nsISupports aFrame); */
NS_IMETHODIMP nsAccessibilityService::CreateHTML4ButtonAccessible(nsISupports *aFrame, nsIAccessible **_retval)
{
nsIFrame* frame;
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIWeakReference> weakShell;
nsresult rv = GetInfo(aFrame, &frame, getter_AddRefs(weakShell), getter_AddRefs(node));
if (NS_FAILED(rv))
return rv;
*_retval = new nsHTML4ButtonAccessible(node, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
NS_IMETHODIMP nsAccessibilityService::CreateXULButtonAccessible(nsIDOMNode *aNode, nsIAccessible **_retval)
{
nsCOMPtr<nsIWeakReference> weakShell;
GetShellFromNode(aNode, getter_AddRefs(weakShell));
// reusing the HTML accessible widget and enhancing for XUL
*_retval = new nsXULButtonAccessible(aNode, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
/* nsIAccessible createHTMLTextAccessible (in nsISupports aPresShell, in nsISupports aFrame); */
NS_IMETHODIMP nsAccessibilityService::CreateHTMLTextAccessible(nsISupports *aFrame, nsIAccessible **_retval)
{
nsIFrame* frame;
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIWeakReference> weakShell;
nsresult rv = GetInfo(aFrame, &frame, getter_AddRefs(weakShell), getter_AddRefs(node));
if (NS_FAILED(rv))
return rv;
*_retval = nsnull;
nsCOMPtr<nsITextContent> textContent(do_QueryInterface(node));
if (textContent) {
// If empty text string, don't include in accessible tree
// Items with length 0 are already gone, we just need to check for single NBSP's
PRInt32 textLength = 0;
textContent->GetTextLength(&textLength);
if (textLength == 1) {
const PRUnichar NBSP = 160;
const nsTextFragment *textFrag;
nsresult rv = textContent->GetText(&textFrag);
PRUnichar theChar = textFrag->CharAt(0);
if (theChar == NBSP)
return NS_ERROR_FAILURE;
}
}
*_retval = new nsHTMLTextAccessible(node, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
NS_IMETHODIMP nsAccessibilityService::CreateXULTextAccessible(nsIDOMNode *aNode, nsIAccessible **_retval)
{
nsCOMPtr<nsIWeakReference> weakShell;
GetShellFromNode(aNode, getter_AddRefs(weakShell));
// reusing the HTML accessible widget and enhancing for XUL
*_retval = new nsXULTextAccessible(aNode, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
/* nsIAccessible createHTMLTableAccessible (in nsISupports aPresShell, in nsISupports aFrame); */
NS_IMETHODIMP nsAccessibilityService::CreateHTMLTableAccessible(nsISupports *aFrame, nsIAccessible **_retval)
{
nsIFrame* frame;
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIWeakReference> weakShell;
nsresult rv = GetInfo(aFrame, &frame, getter_AddRefs(weakShell), getter_AddRefs(node));
if (NS_FAILED(rv))
return rv;
*_retval = new nsHTMLTableAccessible(node, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
/* nsIAccessible createHTMLTableCellAccessible (in nsISupports aPresShell, in nsISupports aFrame); */
NS_IMETHODIMP nsAccessibilityService::CreateHTMLTableCellAccessible(nsISupports *aFrame, nsIAccessible **_retval)
{
nsIFrame* frame;
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIWeakReference> weakShell;
nsresult rv = GetInfo(aFrame, &frame, getter_AddRefs(weakShell), getter_AddRefs(node));
if (NS_FAILED(rv))
return rv;
*_retval = new nsHTMLTableCellAccessible(node, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
NS_IMETHODIMP nsAccessibilityService::CreateXULImageAccessible(nsIDOMNode *aNode, nsIAccessible **_retval)
{
// Don't include nameless images in accessible tree
*_retval = nsnull;
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(aNode));
if (NS_WARN_IF_FALSE(elt, "No DOM element or node!"))
return NS_ERROR_FAILURE;
PRBool hasTextEquivalent;
elt->HasAttribute(NS_LITERAL_STRING("tooltiptext"), &hasTextEquivalent); // Prefer value over tooltiptext
if (!hasTextEquivalent) {
return NS_OK;
}
nsCOMPtr<nsIWeakReference> weakShell;
GetShellFromNode(aNode, getter_AddRefs(weakShell));
*_retval = new nsHTMLImageAccessible(aNode, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
/* nsIAccessible createHTMLImageAccessible (in nsISupports aPresShell, in nsISupports aFrame); */
NS_IMETHODIMP nsAccessibilityService::CreateHTMLImageAccessible(nsISupports *aFrame, nsIAccessible **_retval)
{
nsIFrame* frame;
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIWeakReference> weakShell;
nsresult rv = GetInfo(aFrame, &frame, getter_AddRefs(weakShell), getter_AddRefs(node));
if (NS_FAILED(rv))
return rv;
*_retval = new nsHTMLImageAccessible(node, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
/* nsIAccessible createHTMLAreaAccessible (in nsISupports aPresShell, in nsISupports aFrame); */
NS_IMETHODIMP nsAccessibilityService::CreateHTMLAreaAccessible(nsIWeakReference *aShell, nsIDOMNode *aDOMNode, nsIAccessible *aAccParent,
nsIAccessible **_retval)
{
*_retval = new nsHTMLAreaAccessible(aDOMNode, aAccParent, aShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
/* nsIAccessible createHTMLTextFieldAccessible (in nsISupports aPresShell, in nsISupports aFrame); */
NS_IMETHODIMP nsAccessibilityService::CreateHTMLTextFieldAccessible(nsISupports *aFrame, nsIAccessible **_retval)
{
nsIFrame* frame;
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIWeakReference> weakShell;
nsresult rv = GetInfo(aFrame, &frame, getter_AddRefs(weakShell), getter_AddRefs(node));
if (NS_FAILED(rv))
return rv;
*_retval = new nsHTMLTextFieldAccessible(node, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
NS_IMETHODIMP nsAccessibilityService::GetShellFromNode(nsIDOMNode *aNode, nsIWeakReference **aWeakShell)
{
nsCOMPtr<nsIDOMDocument> domDoc;
aNode->GetOwnerDocument(getter_AddRefs(domDoc));
nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
if (!doc)
return NS_ERROR_INVALID_ARG;
// ---- Get the pres shell ----
nsCOMPtr<nsIPresShell> shell;
doc->GetShellAt(0, getter_AddRefs(shell));
if (!shell)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIWeakReference> weakRef(do_GetWeakReference(shell));
*aWeakShell = weakRef;
NS_IF_ADDREF(*aWeakShell);
return NS_OK;
}
NS_IMETHODIMP nsAccessibilityService::GetInfo(nsISupports* aFrame, nsIFrame** aRealFrame, nsIWeakReference** aShell, nsIDOMNode** aNode)
{
NS_ASSERTION(aFrame,"Error -- 1st argument (aFrame) is null!!");
*aRealFrame = NS_STATIC_CAST(nsIFrame*, aFrame);
nsCOMPtr<nsIContent> content;
(*aRealFrame)->GetContent(getter_AddRefs(content));
nsCOMPtr<nsIDOMNode> node(do_QueryInterface(content));
if (!content || !node)
return NS_ERROR_FAILURE;
*aNode = node;
NS_IF_ADDREF(*aNode);
nsCOMPtr<nsIDocument> document;
content->GetDocument(*getter_AddRefs(document));
if (!document)
return NS_ERROR_FAILURE;
#ifdef DEBUG
PRInt32 shells = document->GetNumberOfShells();
NS_ASSERTION(shells > 0,"Error no shells!");
#endif
// do_GetWR only works into a |nsCOMPtr| :-(
nsCOMPtr<nsIPresShell> tempShell;
nsCOMPtr<nsIWeakReference> weakShell;
document->GetShellAt(0, getter_AddRefs(tempShell));
weakShell = do_GetWeakReference(tempShell);
NS_IF_ADDREF(*aShell = weakShell);
return NS_OK;
}
NS_IMETHODIMP
nsAccessibilityService::CreateAccessible(nsIDOMNode* aDOMNode, nsISupports* aDocument, nsIAccessible **_retval)
{
nsCOMPtr<nsIDocument> document (do_QueryInterface(aDocument));
if (!document)
return NS_ERROR_FAILURE;
#ifdef DEBUG
PRInt32 shells = document->GetNumberOfShells();
NS_ASSERTION(shells > 0,"Error no shells!");
#endif
nsCOMPtr<nsIPresShell> tempShell;
document->GetShellAt(0, getter_AddRefs(tempShell));
nsCOMPtr<nsIWeakReference> weakShell = do_GetWeakReference(tempShell);
*_retval = new nsAccessible(aDOMNode, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
NS_IMETHODIMP
nsAccessibilityService::CreateHTMLBlockAccessible(nsIDOMNode* aDOMNode, nsISupports* aDocument, nsIAccessible **_retval)
{
nsCOMPtr<nsIDocument> document (do_QueryInterface(aDocument));
if (!document)
return NS_ERROR_FAILURE;
#ifdef DEBUG
PRInt32 shells = document->GetNumberOfShells();
NS_ASSERTION(shells > 0,"Error no shells!");
#endif
nsCOMPtr<nsIPresShell> tempShell;
document->GetShellAt(0, getter_AddRefs(tempShell));
nsCOMPtr<nsIWeakReference> weakShell = do_GetWeakReference(tempShell);
*_retval = new nsAccessible(aDOMNode, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
NS_IMETHODIMP
nsAccessibilityService::CreateHTMLIFrameAccessible(nsIDOMNode* aDOMNode, nsISupports* aPresContext, nsIAccessible **_retval)
{
*_retval = nsnull;
nsCOMPtr<nsIContent> content(do_QueryInterface(aDOMNode));
NS_ASSERTION(content,"Error non nsIContent passed to accessible factory!!!");
nsCOMPtr<nsIPresContext> presContext(do_QueryInterface(aPresContext));
NS_ASSERTION(presContext,"Error non prescontext passed to accessible factory!!!");
nsCOMPtr<nsIPresShell> presShell;
presContext->GetShell(getter_AddRefs(presShell));
NS_ASSERTION(presShell,"Error non PresShell passed to accessible factory!!!");
nsCOMPtr<nsIWeakReference> weakRef = do_GetWeakReference(presShell);
nsCOMPtr<nsIDocument> doc;
if (NS_SUCCEEDED(content->GetDocument(*getter_AddRefs(doc))) && doc) {
nsCOMPtr<nsIPresShell> presShell;
doc->GetShellAt(0, getter_AddRefs(presShell));
if (presShell) {
nsCOMPtr<nsISupports> supps;
presShell->GetSubShellFor(content, getter_AddRefs(supps));
if (supps) {
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(supps));
if (docShell) {
nsCOMPtr<nsIPresShell> ps;
docShell->GetPresShell(getter_AddRefs(ps));
if (ps) {
nsCOMPtr<nsIWeakReference> wr = do_GetWeakReference(ps);
nsCOMPtr<nsIDocument> innerDoc;
ps->GetDocument(getter_AddRefs(innerDoc));
if (innerDoc) {
nsCOMPtr<nsIAccessible> root = new nsHTMLIFrameRootAccessible(aDOMNode, wr);
if ( root ) {
nsHTMLIFrameAccessible* frameAcc = new nsHTMLIFrameAccessible(aDOMNode, root, weakRef, innerDoc);
if ( frameAcc != nsnull ) {
*_retval = NS_STATIC_CAST(nsIAccessible*, frameAcc);
if ( *_retval ) {
NS_ADDREF(*_retval);
return NS_OK;
}
}
}
}
}
}
}
}
}
return NS_ERROR_FAILURE;
}
void nsAccessibilityService::GetOwnerFor(nsIPresShell *aPresShell, nsIPresShell **aOwnerShell, nsIContent **aOwnerContent)
{
nsCOMPtr<nsIPresContext> presContext;
aPresShell->GetPresContext(getter_AddRefs(presContext));
if (!presContext)
return;
nsCOMPtr<nsISupports> pcContainer;
presContext->GetContainer(getter_AddRefs(pcContainer));
if (!pcContainer)
return;
nsCOMPtr<nsISupports> docShellSupports(do_QueryInterface(pcContainer));
nsCOMPtr<nsIDocShellTreeItem> treeItem(do_QueryInterface(pcContainer));
if (!treeItem)
return;
// Get Parent Doc
nsCOMPtr<nsIDocShellTreeItem> treeItemParent;
treeItem->GetParent(getter_AddRefs(treeItemParent));
if (!treeItemParent)
return;
nsCOMPtr<nsIDocShell> parentDS(do_QueryInterface(treeItemParent));
if (!parentDS)
return;
nsCOMPtr<nsIPresShell> parentPresShell;
parentDS->GetPresShell(getter_AddRefs(parentPresShell));
if (!parentPresShell)
return;
nsCOMPtr<nsIDocument> parentDoc;
parentPresShell->GetDocument(getter_AddRefs(parentDoc));
if (!parentDoc)
return;
nsCOMPtr<nsIContent> rootContent;
parentDoc->GetRootContent(getter_AddRefs(rootContent));
nsCOMPtr<nsIContent> tempContent;
parentPresShell->FindContentForShell(docShellSupports, getter_AddRefs(tempContent));
if (tempContent) {
*aOwnerContent = tempContent;
*aOwnerShell = parentPresShell;
NS_ADDREF(*aOwnerShell);
NS_ADDREF(*aOwnerContent);
}
}
/**
* GetAccessibleFor - get an nsIAccessible from a DOM node
*/
NS_IMETHODIMP nsAccessibilityService::GetAccessibleFor(nsIDOMNode *aNode,
nsIAccessible **_retval)
{
*_retval = nsnull;
if (!aNode)
return NS_ERROR_NULL_POINTER;
nsCOMPtr<nsIAccessible> newAcc;
nsCOMPtr<nsIAccessibleProvider> accProv(do_QueryInterface(aNode));
if (accProv) {
accProv->GetAccessible(getter_AddRefs(newAcc));
if (newAcc) {
*_retval = newAcc;
NS_ADDREF(*_retval);
return NS_OK;
}
}
// ---- Get the document for this node ----
nsCOMPtr<nsIDocument> doc;
nsCOMPtr<nsIDocument> nodeIsDoc(do_QueryInterface(aNode));
if (nodeIsDoc)
doc = nodeIsDoc;
else {
nsCOMPtr<nsIDOMDocument> domDoc;
aNode->GetOwnerDocument(getter_AddRefs(domDoc));
if (!domDoc)
return NS_ERROR_INVALID_ARG;
doc = do_QueryInterface(domDoc);
}
if (!doc)
return NS_ERROR_INVALID_ARG;
// ---- Get the pres shell ----
nsCOMPtr<nsIPresShell> shell;
doc->GetShellAt(0, getter_AddRefs(shell));
if (!shell)
return NS_ERROR_FAILURE;
// ---- Check if area node ----
nsCOMPtr<nsIDOMHTMLAreaElement> areaContent(do_QueryInterface(aNode));
if (areaContent) // Area elements are implemented in nsHTMLImageAccessible as children of the image
return NS_ERROR_FAILURE; // Return, otherwise the image frame looks like an accessible object in the wrong place
// ---- Check if we need outer owning doc ----
nsCOMPtr<nsIContent> content(do_QueryInterface(aNode));
if (!content && nodeIsDoc) {
// This happens when we're on the document node, which will not QI to an nsIContent,
// When that happens, we try to get the outer, parent document node that contains the document
// For example, a <browser> or <iframe> element
nsCOMPtr<nsIPresShell> ownerShell;
nsCOMPtr<nsIContent> ownerContent;
GetOwnerFor(shell, getter_AddRefs(ownerShell), getter_AddRefs(ownerContent));
if (content) {
shell = ownerShell;
content = ownerContent;
}
else {
doc->GetRootContent(getter_AddRefs(content));
nsIFrame* frame = nsnull;
shell->GetPrimaryFrameFor(content, &frame);
if (!frame)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIPresContext> presContext;
shell->GetPresContext(getter_AddRefs(presContext));
CreateRootAccessible(presContext, frame, getter_AddRefs(newAcc));
*_retval = newAcc;
NS_ADDREF(*_retval);
return NS_OK;
}
}
// ---- If still no nsIContent, return ----
if (!content)
return NS_ERROR_FAILURE;
// ---- Try using frame to get IAccessible ----
nsIFrame* frame = nsnull;
shell->GetPrimaryFrameFor(content, &frame);
if (!frame)
return NS_ERROR_FAILURE;
frame->GetAccessible(getter_AddRefs(newAcc));
// ---- If link, create link accessible ----
if (!newAcc) {
// is it a link?
nsCOMPtr<nsILink> link(do_QueryInterface(aNode));
if (link) {
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(shell));
newAcc = new nsHTMLLinkAccessible(aNode, weakShell);
}
}
// ---- If <select> option, create select option accessible
if (!newAcc) {
nsCOMPtr<nsIDOMHTMLOptionElement> optionElement(do_QueryInterface(aNode));
if (optionElement) {
// nsHTMLSelectionOptionAccessible's must be created via the parent
nsCOMPtr<nsIDOMNode> parentNode;
aNode->GetParentNode(getter_AddRefs(parentNode));
if (parentNode) {
nsCOMPtr<nsIAccessible> parentAccessible;
GetAccessibleFor(parentNode, getter_AddRefs(parentAccessible));
if (parentAccessible) {
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(shell));
newAcc = new nsHTMLSelectOptionAccessible(parentAccessible, aNode, weakShell);
}
}
}
}
if (!newAcc)
return NS_ERROR_FAILURE;
*_retval = newAcc;
NS_ADDREF(*_retval);
return NS_OK;
}
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
nsresult
NS_NewAccessibilityService(nsIAccessibilityService** aResult)
{
NS_PRECONDITION(aResult != nsnull, "null ptr");
if (! aResult)
return NS_ERROR_NULL_POINTER;
nsAccessibilityService* accService = new nsAccessibilityService();
if (!accService)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(accService);
*aResult = accService;
return NS_OK;
}

View File

@@ -0,0 +1,74 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Original Author: David W. Hyatt (hyatt@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef __nsAccessibilityService_h__
#define __nsAccessibilityService_h__
#include "nsIAccessibilityService.h"
#include "nsIContent.h"
#include "nsIPresShell.h"
#include "nsIDocShell.h"
class nsIFrame;
class nsIWeakReference;
class nsIDOMNode;
class nsAccessibilityService : public nsIAccessibilityService
{
public:
NS_DECL_ISUPPORTS
// nsIAccessibilityService methods:
NS_DECL_NSIACCESSIBILITYSERVICE
// nsAccessibilityService methods:
nsAccessibilityService();
virtual ~nsAccessibilityService();
public:
private:
NS_IMETHOD GetInfo(nsISupports* aFrame, nsIFrame** aRealFrame, nsIWeakReference** aShell, nsIDOMNode** aContent);
NS_IMETHOD GetShellFromNode(nsIDOMNode *aNode, nsIWeakReference **weakShell);
void GetOwnerFor(nsIPresShell *aPresShell, nsIPresShell **aOwnerShell, nsIContent **aOwnerContent);
nsIContent* FindContentForDocShell(nsIPresShell* aPresShell, nsIContent* aContent, nsIDocShell* aDocShell);
};
#endif /* __nsIAccessibilityService_h__ */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,151 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* John Gaunt (jgaunt@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsAccessible_H_
#define _nsAccessible_H_
#include "nsCOMPtr.h"
#include "nsGenericAccessible.h"
#include "nsIAccessible.h"
#include "nsIDOMNode.h"
#include "nsIFocusController.h"
#include "nsIPresContext.h"
#include "nsIPresShell.h"
#include "nsPoint.h"
#include "nsRect.h"
#include "nsWeakReference.h"
#include "nsIDOMNodeList.h"
#include "nsIBindingManager.h"
#define ACCESSIBLE_BUNDLE_URL "chrome://global/locale/accessible.properties"
class nsIContent;
class nsIDocShell;
class nsIFrame;
class nsIWebShell;
enum { eSiblingsUninitialized = -1, eSiblingsWalkNormalDOM = -2}; // Used in sibling index field as flags
class nsAccessible : public nsGenericAccessible
{
public:
// to eliminate the confusion of "magic numbers" -- if ( 0 ){ foo; }
enum { eAction_Switch=0, eAction_Jump=0, eAction_Click=0 };
// how many actions
enum { eNo_Action=0, eSingle_Action=1 };
NS_IMETHOD GetAccName(nsAWritableString& _retval);
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccFocused(nsIAccessible **_retval);
NS_IMETHOD AccGetAt(PRInt32 x, PRInt32 y, nsIAccessible **_retval);
NS_IMETHOD AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height);
NS_IMETHOD AccRemoveSelection(void);
NS_IMETHOD AccTakeSelection(void);
NS_IMETHOD AccTakeFocus(void);
NS_IMETHOD AccGetDOMNode(nsIDOMNode **_retval);
public:
nsAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
virtual ~nsAccessible();
virtual void GetListAtomForFrame(nsIFrame* aFrame, nsIAtom*& aList) { aList = nsnull; }
// Helper Routines for Sub-Docs
static nsresult GetDocShellObjects(nsIDocShell* aDocShell,
nsIPresShell** aPresShell,
nsIPresContext** aPresContext,
nsIContent** aContent);
static nsresult GetDocShells(nsIPresShell* aPresShell,
nsIDocShell** aDocShell,
nsIDocShell** aParentDocShell);
static nsresult GetParentPresShellAndContent(nsIPresShell* aPresShell,
nsIPresShell** aParentPresShell,
nsIContent** aSubShellContent);
static PRBool FindContentForWebShell(nsIPresShell* aParentPresShell,
nsIContent* aParentContent,
nsIWebShell* aWebShell,
nsIContent** aFoundContent);
nsresult CalcOffset(nsIFrame* aFrame,
nsIPresContext * aPresContext,
nsRect& aRect);
nsresult GetAbsPosition(nsIPresShell* aPresShell, nsPoint& aPoint);
nsresult GetAbsoluteFramePosition(nsIPresContext* aPresContext,
nsIFrame *aFrame,
nsRect& aAbsoluteTwipsRect,
nsRect& aAbsolutePixelRect);
static nsresult GetTranslatedString(PRUnichar *aKey, nsAWritableString *aStringOut);
// helper method to verify frames
static PRBool IsCorrectFrameType(nsIFrame* aFrame, nsIAtom* aAtom);
protected:
NS_IMETHOD AppendLabelText(nsIDOMNode *aLabelNode, nsAWritableString& _retval);
NS_IMETHOD AppendLabelFor(nsIContent *aLookNode, nsAReadableString *aId, nsAWritableString *aLabel);
NS_IMETHOD GetHTMLAccName(nsAWritableString& _retval);
NS_IMETHOD GetXULAccName(nsAWritableString& _retval);
protected:
virtual nsIFrame* GetFrame();
virtual nsIFrame* GetBoundsFrame();
virtual void GetBounds(nsRect& aRect, nsIFrame** aRelativeFrame);
virtual void GetPresContext(nsCOMPtr<nsIPresContext>& aContext);
PRBool IsEntirelyVisible();
NS_IMETHOD AppendFlatStringFromSubtree(nsIContent *aContent, nsAWritableString *aFlatString);
NS_IMETHOD AppendFlatStringFromContentNode(nsIContent *aContent, nsAWritableString *aFlatString);
NS_IMETHOD AppendStringWithSpaces(nsAWritableString *aFlatString, nsAReadableString& textEquivalent);
NS_IMETHOD GetFocusedElement(nsIDOMElement **aFocusedElement);
NS_IMETHOD CacheOptimizations(nsIAccessible *aParent, PRInt32 aSiblingIndex, nsIDOMNodeList *aSiblingList);
// Data Members
nsCOMPtr<nsIDOMNode> mDOMNode;
nsCOMPtr<nsIWeakReference> mPresShell;
nsCOMPtr<nsIAccessible> mParent;
nsCOMPtr<nsIDOMNodeList> mSiblingList; // If some of our computed siblings are anonymous content nodes, cache node list
PRInt32 mSiblingIndex; // Cache where we are in list of kids that we got from nsIBindingManager::GetContentList(parentContent)
};
#endif

View File

@@ -0,0 +1,410 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* John Gaunt (jgaunt@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsAccessible.h"
#include "nsBaseWidgetAccessible.h"
#include "nsCOMPtr.h"
#include "nsGUIEvent.h"
#include "nsIContent.h"
#include "nsIDOMElement.h"
#include "nsIDOMEventReceiver.h"
#include "nsIFrame.h"
#include "nsILink.h"
#include "nsIPresContext.h"
#include "nsIPresShell.h"
#include "nsISelection.h"
#include "nsISelectionController.h"
// ------------
// nsBlockAccessible
// ------------
nsBlockAccessible::nsBlockAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):nsAccessible(aNode, aShell)
{
}
/* nsIAccessible accGetAt (in long x, in long y); */
NS_IMETHODIMP nsBlockAccessible::AccGetAt(PRInt32 tx, PRInt32 ty, nsIAccessible **_retval)
{
// We're going to find the child that contains coordinates (tx,ty)
PRInt32 x,y,w,h;
AccGetBounds(&x,&y,&w,&h); // Get bounds for this accessible
if (tx > x && tx < x + w && ty > y && ty < y + h)
{
// It's within this nsIAccessible, let's drill down
nsCOMPtr<nsIAccessible> child;
nsCOMPtr<nsIAccessible> smallestChild;
PRInt32 smallestArea = -1;
nsCOMPtr<nsIAccessible> next;
GetAccFirstChild(getter_AddRefs(child));
PRInt32 cx,cy,cw,ch; // Child bounds
while(child) {
child->AccGetBounds(&cx,&cy,&cw,&ch);
// ok if there are multiple frames the contain the point
// and they overlap then pick the smallest. We need to do this
// for text frames.
// For example, A point that's in block #2 is also in block #1, but we want to return #2:
//
// [[block #1 is long wrapped text that continues to
// another line]] [[here is a shorter block #2]]
if (tx > cx && tx < cx + cw && ty > cy && ty < cy + ch)
{
if (smallestArea == -1 || cw*ch < smallestArea) {
smallestArea = cw*ch;
smallestChild = child;
}
}
child->GetAccNextSibling(getter_AddRefs(next));
child = next;
}
if (smallestChild != nsnull)
{
*_retval = smallestChild;
NS_ADDREF(*_retval);
return NS_OK;
}
*_retval = this;
NS_ADDREF(this);
return NS_OK;
}
*_retval = nsnull;
return NS_OK;
}
/**
* nsContainerAccessible
*/
nsContainerAccessible::nsContainerAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsAccessible(aNode, aShell)
{
}
/** no actions */
NS_IMETHODIMP nsContainerAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eNo_Action;
return NS_OK;
}
/** no actions */
NS_IMETHODIMP nsContainerAccessible::GetAccActionName(PRUint8 index, nsAWritableString& _retval)
{
return NS_OK;
}
/** no actions */
NS_IMETHODIMP nsContainerAccessible::AccDoAction(PRUint8 index)
{
return NS_OK;
}
/** no state -- normal */
NS_IMETHODIMP nsContainerAccessible::GetAccState(PRUint32 *_retval)
{
*_retval = 0;
return NS_OK;
}
/** no value */
NS_IMETHODIMP nsContainerAccessible::GetAccValue(nsAWritableString& _retval)
{
return NS_OK;
}
/** no name*/
NS_IMETHODIMP nsContainerAccessible::GetAccName(nsAWritableString& _retval)
{
return NS_OK;
}
//-------------
// nsLeafFrameAccessible
//-------------
nsLeafAccessible::nsLeafAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsAccessible(aNode, aShell)
{
}
/* nsIAccessible getAccFirstChild (); */
NS_IMETHODIMP nsLeafAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/* nsIAccessible getAccLastChild (); */
NS_IMETHODIMP nsLeafAccessible::GetAccLastChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/* long getAccChildCount (); */
NS_IMETHODIMP nsLeafAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 0;
return NS_OK;
}
//----------------
// nsLinkableAccessible
//----------------
nsLinkableAccessible::nsLinkableAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsAccessible(aNode, aShell), mIsALinkCached(PR_FALSE), mLinkContent(nsnull), mIsLinkVisited(PR_FALSE)
{
}
/* long GetAccState (); */
NS_IMETHODIMP nsLinkableAccessible::GetAccState(PRUint32 *_retval)
{
nsAccessible::GetAccState(_retval);
*_retval |= STATE_READONLY | STATE_SELECTABLE;
if (IsALink()) {
*_retval |= STATE_LINKED;
if (mIsLinkVisited)
*_retval |= STATE_TRAVERSED;
}
// Get current selection and find out if current node is in it
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (!shell) {
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIPresContext> context;
shell->GetPresContext(getter_AddRefs(context));
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
nsIFrame *frame;
if (content && NS_SUCCEEDED(shell->GetPrimaryFrameFor(content, &frame))) {
nsCOMPtr<nsISelectionController> selCon;
frame->GetSelectionController(context,getter_AddRefs(selCon));
if (selCon) {
nsCOMPtr<nsISelection> domSel;
selCon->GetSelection(nsISelectionController::SELECTION_NORMAL, getter_AddRefs(domSel));
if (domSel) {
PRBool isSelected = PR_FALSE, isCollapsed = PR_TRUE;
domSel->ContainsNode(mDOMNode, PR_TRUE, &isSelected);
domSel->GetIsCollapsed(&isCollapsed);
if (isSelected && !isCollapsed)
*_retval |=STATE_SELECTED;
}
}
}
// Focused? Do we implement that here or up the chain?
return NS_OK;
}
NS_IMETHODIMP nsLinkableAccessible::GetAccValue(nsAWritableString& _retval)
{
if (IsALink()) {
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(mLinkContent));
if (elt)
return elt->GetAttribute(NS_LITERAL_STRING("href"), _retval);
}
return NS_ERROR_FAILURE;
}
/* PRUint8 getAccNumActions (); */
NS_IMETHODIMP nsLinkableAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
}
/* wstring getAccActionName (in PRUint8 index); */
NS_IMETHODIMP nsLinkableAccessible::GetAccActionName(PRUint8 index, nsAWritableString& _retval)
{
// Action 0 (default action): Jump to link
if (index == eAction_Jump) {
if (IsALink()) {
_retval = NS_LITERAL_STRING("jump");
return NS_OK;
}
}
return NS_ERROR_FAILURE;
}
/* void accDoAction (in PRUint8 index); */
NS_IMETHODIMP nsLinkableAccessible::AccDoAction(PRUint8 index)
{
// Action 0 (default action): Jump to link
if (index == 0) {
if (IsALink()) {
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (!shell) {
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIPresContext> presContext;
shell->GetPresContext(getter_AddRefs(presContext));
if (presContext) {
nsMouseEvent linkClickEvent;
linkClickEvent.eventStructType = NS_EVENT;
linkClickEvent.message = NS_MOUSE_LEFT_CLICK;
linkClickEvent.isShift = PR_FALSE;
linkClickEvent.isControl = PR_FALSE;
linkClickEvent.isAlt = PR_FALSE;
linkClickEvent.isMeta = PR_FALSE;
linkClickEvent.clickCount = 0;
linkClickEvent.widget = nsnull;
nsEventStatus eventStatus = nsEventStatus_eIgnore;
mLinkContent->HandleDOMEvent(presContext,
&linkClickEvent,
nsnull,
NS_EVENT_FLAG_INIT,
&eventStatus);
return NS_OK;
}
}
}
return NS_ERROR_FAILURE;
}
PRBool nsLinkableAccessible::IsALink()
{
if (mIsALinkCached) // Cached answer?
return mLinkContent? PR_TRUE: PR_FALSE;
nsCOMPtr<nsIContent> walkUpContent(do_QueryInterface(mDOMNode));
if (walkUpContent) {
nsCOMPtr<nsIContent> tempContent = walkUpContent;
while (walkUpContent) {
nsCOMPtr<nsILink> link(do_QueryInterface(walkUpContent));
if (link) {
mLinkContent = tempContent;
mIsALinkCached = PR_TRUE;
nsLinkState linkState;
link->GetLinkState(linkState);
if (linkState == eLinkState_Visited)
mIsLinkVisited = PR_TRUE;
return PR_TRUE;
}
walkUpContent->GetParent(*getter_AddRefs(tempContent));
walkUpContent = tempContent;
}
}
mIsALinkCached = PR_TRUE; // Cached that there is no link
return PR_FALSE;
}
// ------------
// nsMenuListenerAccessible
// ------------
NS_IMPL_ISUPPORTS_INHERITED1(nsMenuListenerAccessible, nsAccessible, nsIDOMXULListener)
nsMenuListenerAccessible::nsMenuListenerAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsAccessible(aDOMNode, aShell)
{
mRegistered = PR_FALSE;
mOpen = PR_FALSE;
}
nsMenuListenerAccessible::~nsMenuListenerAccessible()
{
if (mRegistered) {
nsCOMPtr<nsIDOMEventReceiver> eventReceiver(do_QueryInterface(mDOMNode));
if (eventReceiver)
eventReceiver->RemoveEventListener(NS_LITERAL_STRING("popupshowing"), this, PR_TRUE);
}
}
NS_IMETHODIMP nsMenuListenerAccessible::PopupShowing(nsIDOMEvent* aEvent)
{
mOpen = PR_TRUE;
/* TBD send state change event */
return NS_OK;
}
NS_IMETHODIMP nsMenuListenerAccessible::PopupHiding(nsIDOMEvent* aEvent)
{
mOpen = PR_FALSE;
/* TBD send state change event */
return NS_OK;
}
NS_IMETHODIMP nsMenuListenerAccessible::Close(nsIDOMEvent* aEvent)
{
mOpen = PR_FALSE;
/* TBD send state change event */
return NS_OK;
}
void
nsMenuListenerAccessible::SetupMenuListener()
{
// if not already one, register ourselves as a popup listener
if (!mRegistered) {
nsCOMPtr<nsIDOMEventReceiver> eventReceiver(do_QueryInterface(mDOMNode));
if (!eventReceiver) {
return;
}
nsresult rv = eventReceiver->AddEventListener(NS_LITERAL_STRING("popupshowing"), this, PR_TRUE);
if (NS_FAILED(rv)) {
return;
}
mRegistered = PR_TRUE;
}
}

View File

@@ -0,0 +1,148 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* John Gaunt (jgaunt@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsBaseWidgetAccessible_H_
#define _nsBaseWidgetAccessible_H_
#include "nsAccessible.h"
#include "nsCOMPtr.h"
#include "nsIContent.h"
#include "nsIDOMNode.h"
#include "nsIDOMXULListener.h"
/**
* This file contains a number of classes that are used as base
* classes for the different accessibility implementations of
* the HTML and XUL widget sets. --jgaunt
*/
/**
* Special Accessible that knows how to handle hit detection for flowing text
*/
class nsBlockAccessible : public nsAccessible
{
public:
nsBlockAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD AccGetAt(PRInt32 x, PRInt32 y, nsIAccessible **_retval);
};
/**
* Special Accessible that just contains other accessible objects
* no actions, no name, no state, no value
*/
class nsContainerAccessible : public nsAccessible
{
public:
nsContainerAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAWritableString& _retval);
NS_IMETHOD GetAccName(nsAWritableString& _retval);
};
/**
* Leaf version of DOM Accessible -- has no children
*/
class nsLeafAccessible : public nsAccessible
{
public:
nsLeafAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
};
/**
* A type of accessible for DOM nodes containing an href="" attribute.
* It knows how to report the state of the link ( traveled or not )
* and can activate ( click ) the link programmatically.
*/
class nsLinkableAccessible : public nsAccessible
{
public:
nsLinkableAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAWritableString& _retval);
protected:
PRBool IsALink();
PRBool mIsALinkCached; // -1 = unknown, 0 = not a link, 1 = is a link
nsCOMPtr<nsIContent> mLinkContent;
PRBool mIsLinkVisited;
};
/*
* A base class that can listen to menu events. Its used by selects so the
* button and the window accessibles can change their name and role
* depending on whether the drop down list is dropped down on not
*/
class nsMenuListenerAccessible : public nsAccessible, public nsIDOMXULListener
{
public:
NS_DECL_ISUPPORTS_INHERITED
nsMenuListenerAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsMenuListenerAccessible();
// popup listener
NS_IMETHOD PopupShowing(nsIDOMEvent* aEvent);
NS_IMETHOD PopupShown(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD PopupHiding(nsIDOMEvent* aEvent);
NS_IMETHOD PopupHidden(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD Close(nsIDOMEvent* aEvent);
NS_IMETHOD Command(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD Broadcast(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD CommandUpdate(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) { return NS_OK; }
virtual void SetupMenuListener();
PRBool mRegistered;
PRBool mOpen;
};
#endif

View File

@@ -0,0 +1,226 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* John Gaunt (jgaunt@netscape.com)
* Aaron Leventhal (aaronl@netscape.com)
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
// NOTE: alphabetically ordered
#include "nsFormControlAccessible.h"
#include "nsIDocument.h"
#include "nsIDOMHTMLFormElement.h"
#include "nsIDOMHTMLInputElement.h"
#include "nsIDOMHTMLLabelElement.h"
#include "nsIDOMNodeList.h"
#include "nsIDOMXULButtonElement.h"
#include "nsIDOMXULCheckboxElement.h"
#include "nsIDOMXULDocument.h"
#include "nsIDOMXULElement.h"
#include "nsIDOMXULLabelElement.h"
#include "nsIDOMXULSelectCntrlEl.h"
#include "nsIDOMXULSelectCntrlItemEl.h"
#include "nsReadableUtils.h"
#include "nsString.h"
/**
* nsFormControlAccessible
*/
nsFormControlAccessible::nsFormControlAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsAccessible(aNode, aShell)
{
}
/**
* XUL states: focused, unavailable(disabled), focusable, ?protected?
* HTML states: focused, unabailable(disabled), focusable, protected
*/
NS_IMETHODIMP nsFormControlAccessible::GetAccState(PRUint32 *_retval)
{
// Get the focused state from the nsAccessible
nsAccessible::GetAccState(_retval);
PRBool disabled = PR_FALSE;
nsresult rv = NS_ERROR_FAILURE;
nsCOMPtr<nsIDOMHTMLInputElement> htmlFormElement(do_QueryInterface(mDOMNode, &rv));
if (NS_SUCCEEDED(rv) && htmlFormElement) {
htmlFormElement->GetDisabled(&disabled);
nsAutoString typeString;
htmlFormElement->GetType(typeString);
if (typeString.EqualsIgnoreCase("password"))
*_retval |= STATE_PROTECTED;
}
else {
nsCOMPtr<nsIDOMXULControlElement> xulFormElement(do_QueryInterface(mDOMNode, &rv));
if (NS_SUCCEEDED(rv) && xulFormElement) {
xulFormElement->GetDisabled(&disabled);
/* XXX jgaunt do XUL elements support password fields? */
}
}
if (disabled)
*_retval |= STATE_UNAVAILABLE;
else
*_retval |= STATE_FOCUSABLE;
return NS_OK;
}
/**
* Will be called by both HTML and XUL elements, this method
* merely checks who is calling and then calls the appropriate
* protected method for the XUL or HTML element.
*/
NS_IMETHODIMP nsFormControlAccessible::GetAccName(nsAWritableString& _retval)
{
nsCOMPtr<nsIDOMXULElement> xulFormElement(do_QueryInterface(mDOMNode));
if (xulFormElement)
return GetXULAccName(_retval);
else
return GetHTMLAccName(_retval);
}
/**
* No Children
*/
NS_IMETHODIMP nsFormControlAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/**
* No Children
*/
NS_IMETHODIMP nsFormControlAccessible::GetAccLastChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/**
* No Children
*/
NS_IMETHODIMP nsFormControlAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 0;
return NS_OK;
}
// ------------
// Radio button
// ------------
nsRadioButtonAccessible::nsRadioButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsFormControlAccessible(aNode, aShell)
{
}
/**
*
*/
NS_IMETHODIMP nsRadioButtonAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
}
/**
*
*/
NS_IMETHODIMP nsRadioButtonAccessible::GetAccActionName(PRUint8 index, nsAWritableString& _retval)
{
if (index == eAction_Click) {
_retval = NS_LITERAL_STRING("select");
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
/**
*
*/
NS_IMETHODIMP nsRadioButtonAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_RADIOBUTTON;
return NS_OK;
}
// ------------
// Text Accessibles
// ------------
nsTextAccessible::nsTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
nsLinkableAccessible(aDomNode, aShell)
{
}
/**
* We are text
*/
NS_IMETHODIMP nsTextAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_TEXT;
return NS_OK;
}
/**
* No Children
*/
NS_IMETHODIMP nsTextAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/**
* No Children
*/
NS_IMETHODIMP nsTextAccessible::GetAccLastChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/**
* No Children
*/
NS_IMETHODIMP nsTextAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 0;
return NS_OK;
}

View File

@@ -0,0 +1,93 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Eric D Vaughan (evaughan@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsFormControlAccessible_H_
#define _nsFormControlAccessible_H_
#include "nsBaseWidgetAccessible.h"
/**
* This supports name and state information for both XUL and HTML
* widgets. Designed to be a base class for the impls of XUL
* and HTML form widget Accessibles
*/
class nsFormControlAccessible : public nsAccessible
{
public:
nsFormControlAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAWritableString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
};
/**
*
*/
class nsRadioButtonAccessible : public nsFormControlAccessible
{
public:
nsRadioButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _retval);
};
/**
* Text nodes have no children, but since double inheritance
* no-worky we have to re-impl the LeafAccessiblity blocks
* this way.
*/
class nsTextAccessible : public nsLinkableAccessible
{
public:
nsTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
};
#endif

View File

@@ -0,0 +1,243 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Eric Vaughan (evaughan@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsGenericAccessible.h"
#include "nsIFrame.h"
#include "nsCOMPtr.h"
#include "nsIWeakReference.h"
#include "nsReadableUtils.h"
#include "nsIContent.h"
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsGenericAccessible, nsIAccessible)
nsGenericAccessible::nsGenericAccessible()
{
NS_INIT_ISUPPORTS();
/* member initializers and constructor code */
}
nsGenericAccessible::~nsGenericAccessible()
{
/* destructor code */
}
/* nsIAccessible getAccParent (); */
NS_IMETHODIMP nsGenericAccessible::GetAccParent(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible getAccNextSibling (); */
NS_IMETHODIMP nsGenericAccessible::GetAccNextSibling(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible getAccPreviousSibling (); */
NS_IMETHODIMP nsGenericAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible getAccFirstChild (); */
NS_IMETHODIMP nsGenericAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible getAccLastChild (); */
NS_IMETHODIMP nsGenericAccessible::GetAccLastChild(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* long getAccChildCount (); */
NS_IMETHODIMP nsGenericAccessible::GetAccChildCount(PRInt32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* wstring getAccName (); */
NS_IMETHODIMP nsGenericAccessible::GetAccName(nsAWritableString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* wstring getAccValue (); */
NS_IMETHODIMP nsGenericAccessible::GetAccValue(nsAWritableString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void setAccName (in wstring name); */
NS_IMETHODIMP nsGenericAccessible::SetAccName(const nsAReadableString& name)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* wstring getAccDescription (); */
NS_IMETHODIMP nsGenericAccessible::GetAccDescription(nsAWritableString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* unsigned long getAccRole (); */
NS_IMETHODIMP nsGenericAccessible::GetAccRole(PRUint32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* wstring getAccState (); */
NS_IMETHODIMP nsGenericAccessible::GetAccState(PRUint32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* PRUint8 getAccNumActions (); */
NS_IMETHODIMP nsGenericAccessible::GetAccNumActions(PRUint8 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* wstring getAccActionName (in PRUint8 index); */
NS_IMETHODIMP nsGenericAccessible::GetAccActionName(PRUint8 index, nsAWritableString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void accDoAction (in PRUint8 index); */
NS_IMETHODIMP nsGenericAccessible::AccDoAction(PRUint8 index)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible getAccFocused(); */
NS_IMETHODIMP nsGenericAccessible::GetAccFocused(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* wstring getAccHelp (); */
NS_IMETHODIMP nsGenericAccessible::GetAccHelp(nsAWritableString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible accGetAt (in long x, in long y); */
NS_IMETHODIMP nsGenericAccessible::AccGetAt(PRInt32 x, PRInt32 y, nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible accNavigateRight (); */
NS_IMETHODIMP nsGenericAccessible::AccNavigateRight(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible accNavigateLeft (); */
NS_IMETHODIMP nsGenericAccessible::AccNavigateLeft(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible accNavigateUp (); */
NS_IMETHODIMP nsGenericAccessible::AccNavigateUp(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible accNavigateDown (); */
NS_IMETHODIMP nsGenericAccessible::AccNavigateDown(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void accGetBounds (out long x, out long y, out long width, out long height); */
NS_IMETHODIMP nsGenericAccessible::AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void accAddSelection (); */
NS_IMETHODIMP nsGenericAccessible::AccAddSelection()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void accRemoveSelection (); */
NS_IMETHODIMP nsGenericAccessible::AccRemoveSelection()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void accExtendSelection (); */
NS_IMETHODIMP nsGenericAccessible::AccExtendSelection()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void accTakeSelection (); */
NS_IMETHODIMP nsGenericAccessible::AccTakeSelection()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void accTakeFocus (); */
NS_IMETHODIMP nsGenericAccessible::AccTakeFocus()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* unsigned long getAccExtState (); */
NS_IMETHODIMP nsGenericAccessible::GetAccExtState(PRUint32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsGenericAccessible::AccGetDOMNode(nsIDOMNode **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsGenericAccessible::CacheOptimizations(nsIAccessible *aParent, PRInt32 aSiblingIndex, nsIDOMNodeList *aSiblingList)
{
return NS_ERROR_NOT_IMPLEMENTED;
}

View File

@@ -0,0 +1,67 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Eric D Vaughan (evaughan@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsGenericAccessible_H_
#define _nsGenericAccessible_H_
#include "nsISupports.h"
#include "nsIAccessible.h"
#include "nsIContent.h"
#include "nsIDOMNode.h"
#include "nsIPresShell.h"
#include "nsIPresContext.h"
#include "nsCOMPtr.h"
#include "nsIWeakReference.h"
/**
* Basic implementation
* supports nothing
*/
class nsGenericAccessible : public nsIAccessible
{
NS_DECL_ISUPPORTS
NS_DECL_NSIACCESSIBLE
public:
nsGenericAccessible();
virtual ~nsGenericAccessible();
};
#endif

View File

@@ -0,0 +1,587 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsIAccessible.h"
#include "nsRootAccessible.h"
#include "nsCOMPtr.h"
#include "nsIDocument.h"
#include "nsIDOMNSDocument.h"
#include "nsIPresShell.h"
#include "nsIPresContext.h"
#include "nsIContent.h"
#include "nsIFrame.h"
#include "nsIDOMEventTarget.h"
#include "nsIDOMElement.h"
#include "nsIDOMEventReceiver.h"
#include "nsIDOMEventListener.h"
#include "nsReadableUtils.h"
#include "nsILink.h"
#include "nsHTMLFormControlAccessible.h"
#include "nsHTMLLinkAccessible.h"
#include "nsIURI.h"
#include "nsIDocShell.h"
#include "nsIDocShellTreeItem.h"
#include "nsIWebNavigation.h"
#include "nsIXULDocument.h"
#include "nsIDOMDocument.h"
#include "nsIDOMDocumentType.h"
#include "nsINameSpaceManager.h"
#include "nsIDOMNSHTMLSelectElement.h"
#include "nsIAccessibleSelectable.h"
#include "nsLayoutAtoms.h"
#include "nsString.h"
#include "nsXPIDLString.h"
#include "nsIAccessibilityService.h"
#include "nsIServiceManager.h"
#include "nsHTMLSelectAccessible.h"
#include "nsIDOMHTMLSelectElement.h"
#include "nsIWebProgress.h"
#include "nsCURILoader.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsIScriptGlobalObject.h"
NS_INTERFACE_MAP_BEGIN(nsRootAccessible)
NS_INTERFACE_MAP_ENTRY(nsIAccessibleDocument)
NS_INTERFACE_MAP_ENTRY(nsIAccessibleEventReceiver)
NS_INTERFACE_MAP_ENTRY(nsIDOMFocusListener)
NS_INTERFACE_MAP_ENTRY(nsIDOMFormListener)
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
NS_INTERFACE_MAP_ENTRY(nsITimerCallback)
NS_INTERFACE_MAP_ENTRY(nsIWebProgressListener)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMFormListener)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsIDOMEventListener, nsIDOMFormListener)
NS_INTERFACE_MAP_END_INHERITING(nsAccessible)
NS_IMPL_ADDREF_INHERITED(nsRootAccessible, nsAccessible);
NS_IMPL_RELEASE_INHERITED(nsRootAccessible, nsAccessible);
//-----------------------------------------------------
// construction
//-----------------------------------------------------
nsRootAccessible::nsRootAccessible(nsIWeakReference* aShell):nsAccessible(nsnull,aShell),
nsDocAccessibleMixin(aShell), mAccService(do_GetService("@mozilla.org/accessibilityService;1")),
mBusy(eBusyStateUninitialized)
{
mListener = nsnull;
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (shell) {
shell->GetDocument(getter_AddRefs(mDocument));
mDOMNode = do_QueryInterface(mDocument);
nsLayoutAtoms::AddRefAtoms();
}
}
//-----------------------------------------------------
// destruction
//-----------------------------------------------------
nsRootAccessible::~nsRootAccessible()
{
nsLayoutAtoms::ReleaseAtoms();
RemoveAccessibleEventListener();
}
/* attribute wstring accName; */
NS_IMETHODIMP nsRootAccessible::GetAccName(nsAWritableString& aAccName)
{
return GetTitle(aAccName);
}
// helpers
nsIFrame* nsRootAccessible::GetFrame()
{
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
nsIFrame* root = nsnull;
if (shell)
shell->GetRootFrame(&root);
return root;
}
void nsRootAccessible::GetBounds(nsRect& aBounds, nsIFrame** aRelativeFrame)
{
*aRelativeFrame = GetFrame();
(*aRelativeFrame)->GetRect(aBounds);
}
/* readonly attribute nsIAccessible accParent; */
NS_IMETHODIMP nsRootAccessible::GetAccParent(nsIAccessible * *aAccParent)
{
*aAccParent = nsnull;
return NS_OK;
}
/* readonly attribute unsigned long accRole; */
NS_IMETHODIMP nsRootAccessible::GetAccRole(PRUint32 *aAccRole)
{
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (!shell) {
*aAccRole = 0;
return NS_ERROR_FAILURE;
}
/*
// Commenting this out for now.
// It was requested that we always use pane objects instead of client objects.
// However, it might be asked that we put client objects back.
nsCOMPtr<nsIPresContext> context;
shell->GetPresContext(getter_AddRefs(context));
nsCOMPtr<nsISupports> container;
context->GetContainer(getter_AddRefs(container));
if (container) {
nsCOMPtr<nsIDocShellTreeItem> parentTreeItem, docTreeItem(do_QueryInterface(container));
if (docTreeItem) {
docTreeItem->GetSameTypeParent(getter_AddRefs(parentTreeItem));
// Basically, if this docshell has a parent of the same type, it's a frame
if (parentTreeItem) {
*aAccRole = ROLE_PANE;
return NS_OK;
}
}
}
*aAccRole = ROLE_CLIENT;
*/
*aAccRole = ROLE_PANE;
return NS_OK;
}
NS_IMETHODIMP nsRootAccessible::GetAccState(PRUint32 *aAccState)
{
*aAccState = STATE_FOCUSABLE;
if (mBusy == eBusyStateLoading)
*aAccState |= STATE_BUSY;
return NS_OK;
}
NS_IMETHODIMP nsRootAccessible::GetAccValue(nsAWritableString& aAccValue)
{
return GetURL(aAccValue);
}
void nsRootAccessible::Notify(nsITimer *timer)
{
// Short timer is finished
if (mBusy != eBusyStateDone) {
mBusy = eBusyStateDone;
if (mListener)
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, this);
}
}
NS_IMETHODIMP nsRootAccessible::StartDocReadyTimer()
{
nsresult rv;
if (!mTimer) {
mTimer = do_CreateInstance("@mozilla.org/timer;1", &rv);
if (NS_SUCCEEDED(rv)) {
const PRUint32 kUpdateTimerDelay = 1;
rv = mTimer->Init(NS_STATIC_CAST(nsITimerCallback*, this), kUpdateTimerDelay);
}
}
return rv;
}
/* void addAccessibleEventListener (in nsIAccessibleEventListener aListener); */
NS_IMETHODIMP nsRootAccessible::AddAccessibleEventListener(nsIAccessibleEventListener *aListener)
{
if (mListener)
return NS_OK;
mListener = aListener;
// add an event listener to the document
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (!shell)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIDocument> document;
shell->GetDocument(getter_AddRefs(document));
if (!document)
return NS_ERROR_FAILURE;
// use AddEventListener from the nsIDOMEventTarget interface
nsCOMPtr<nsIDOMEventTarget> target(do_QueryInterface(document));
if (target) {
// capture DOM focus events
nsresult rv = target->AddEventListener(NS_LITERAL_STRING("focus"), NS_STATIC_CAST(nsIDOMFocusListener*, this), PR_TRUE);
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
rv = target->AddEventListener(NS_LITERAL_STRING("blur"), NS_STATIC_CAST(nsIDOMFocusListener*, this), PR_TRUE);
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
// capture Form change events
rv = target->AddEventListener(NS_LITERAL_STRING("change"), NS_STATIC_CAST(nsIDOMFormListener*, this), PR_TRUE);
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
// add ourself as a CheckboxStateChange listener (custom event fired in nsHTMLInputElement.cpp)
rv = target->AddEventListener(NS_LITERAL_STRING("CheckboxStateChange"), NS_STATIC_CAST(nsIDOMFormListener*, this), PR_TRUE);
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
// add ourself as a RadiobuttonStateChange listener (custom event fired in nsHTMLInputElement.cpp)
rv = target->AddEventListener(NS_LITERAL_STRING("RadiobuttonStateChange"), NS_STATIC_CAST(nsIDOMFormListener*, this), PR_TRUE);
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
// Extremely short timer, after which we announce that pane is finished loading
// By waiting until after this short time, we know that the 3rd party accessibility software
// has received it's accessible, and can handle events on it.
StartDocReadyTimer();
}
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mPresShell));
if (presShell) {
nsCOMPtr<nsIPresContext> context;
presShell->GetPresContext(getter_AddRefs(context));
if (context) {
nsCOMPtr<nsISupports> container;
context->GetContainer(getter_AddRefs(container));
if (container) {
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(container));
if (docShell) {
nsCOMPtr<nsIWebProgress> webProgress(do_GetInterface(docShell));
if (webProgress) {
webProgress->AddProgressListener(this);
}
}
}
}
}
return NS_OK;
}
/* void removeAccessibleEventListener (); */
NS_IMETHODIMP nsRootAccessible::RemoveAccessibleEventListener()
{
if (mListener) {
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
nsCOMPtr<nsIDocument> document;
if (shell) {
shell->GetDocument(getter_AddRefs(document));
nsCOMPtr<nsIDOMEventReceiver> eventReceiver(do_QueryInterface(document));
if (eventReceiver) {
nsresult rv = eventReceiver->RemoveEventListenerByIID(NS_STATIC_CAST(nsIDOMFocusListener *, this), NS_GET_IID(nsIDOMFocusListener));
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to unregister listener");
rv = eventReceiver->RemoveEventListenerByIID(NS_STATIC_CAST(nsIDOMFormListener *, this), NS_GET_IID(nsIDOMFormListener));
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to unregister listener");
}
}
}
mListener = nsnull;
return NS_OK;
}
// --------------- nsIDOMEventListener Methods (3) ------------------------
NS_IMETHODIMP nsRootAccessible::HandleEvent(nsIDOMEvent* aEvent)
{
if (mListener) {
// optionTargetNode is set to current option for HTML selects
nsCOMPtr<nsIDOMNode> targetNode, optionTargetNode;
nsresult rv = GetTargetNode(aEvent, targetNode);
if (NS_FAILED(rv))
return rv;
// Check to see if it's a select element. If so, need the currently focused option
nsCOMPtr<nsIDOMHTMLSelectElement> selectElement(do_QueryInterface(targetNode));
if (selectElement) // ----- Target Node is an HTML <select> element ------
nsHTMLSelectOptionAccessible::GetFocusedOptionNode(mPresShell, targetNode, optionTargetNode);
nsAutoString eventType;
aEvent->GetType(eventType);
nsCOMPtr<nsIAccessible> accessible;
if (NS_SUCCEEDED(mAccService->GetAccessibleFor(targetNode, getter_AddRefs(accessible)))) {
if (eventType.EqualsIgnoreCase("focus")) {
if (mCurrentFocus != targetNode) {
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_FOCUS, accessible);
mCurrentFocus = targetNode;
}
}
else if (eventType.EqualsIgnoreCase("change")) {
if (optionTargetNode) { // Set to current option only for HTML selects
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_SELECTION, accessible);
if (mCurrentFocus != optionTargetNode &&
NS_SUCCEEDED(mAccService->GetAccessibleFor(optionTargetNode, getter_AddRefs(accessible)))) {
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_FOCUS, accessible);
mCurrentFocus = optionTargetNode;
}
}
else
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, accessible);
}
else if (eventType.EqualsIgnoreCase("CheckboxStateChange"))
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, accessible);
else if (eventType.EqualsIgnoreCase("RadiobuttonStateChange"))
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, accessible);
}
}
return NS_OK;
}
NS_IMETHODIMP nsRootAccessible::GetTargetNode(nsIDOMEvent *aEvent, nsCOMPtr<nsIDOMNode>& aTargetNode)
{
nsCOMPtr<nsIDOMEventTarget> domEventTarget;
aEvent->GetOriginalTarget(getter_AddRefs(domEventTarget));
nsresult rv;
aTargetNode = do_QueryInterface(domEventTarget, &rv);
return rv;
}
// ------- nsIDOMFocusListener Methods (1) -------------
NS_IMETHODIMP nsRootAccessible::Focus(nsIDOMEvent* aEvent)
{
return HandleEvent(aEvent);
}
NS_IMETHODIMP nsRootAccessible::Blur(nsIDOMEvent* aEvent) { return NS_OK; }
// ------- nsIDOMFormListener Methods (5) -------------
NS_IMETHODIMP nsRootAccessible::Submit(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHODIMP nsRootAccessible::Reset(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHODIMP nsRootAccessible::Change(nsIDOMEvent* aEvent)
{
// get change events when the form elements changes its state, checked->not,
// deleted text, new text, change in selection for list/combo boxes
// this may be the event that we have the individual Accessible objects
// handle themselves -- have list/combos figure out the change in selection
// have textareas and inputs fire a change of state etc...
return HandleEvent(aEvent);
}
// gets Select events when text is selected in a textarea or input
NS_IMETHODIMP nsRootAccessible::Select(nsIDOMEvent* aEvent) { return NS_OK; }
// gets Input events when text is entered or deleted in a textarea or input
NS_IMETHODIMP nsRootAccessible::Input(nsIDOMEvent* aEvent) { return NS_OK; }
// ------- nsIAccessibleDocument Methods (5) ---------------
NS_IMETHODIMP nsRootAccessible::GetURL(nsAWritableString& aURL)
{
return nsDocAccessibleMixin::GetURL(aURL);
}
NS_IMETHODIMP nsRootAccessible::GetTitle(nsAWritableString& aTitle)
{
return nsDocAccessibleMixin::GetTitle(aTitle);
}
NS_IMETHODIMP nsRootAccessible::GetMimeType(nsAWritableString& aMimeType)
{
return nsDocAccessibleMixin::GetMimeType(aMimeType);
}
NS_IMETHODIMP nsRootAccessible::GetDocType(nsAWritableString& aDocType)
{
return nsDocAccessibleMixin::GetDocType(aDocType);
}
NS_IMETHODIMP nsRootAccessible::GetNameSpaceURIForID(PRInt16 aNameSpaceID, nsAWritableString& aNameSpaceURI)
{
return nsDocAccessibleMixin::GetNameSpaceURIForID(aNameSpaceID, aNameSpaceURI);
}
NS_IMETHODIMP nsRootAccessible::GetDocument(nsIDocument **doc)
{
return nsDocAccessibleMixin::GetDocument(doc);
}
NS_IMETHODIMP nsRootAccessible::OnStateChange(nsIWebProgress *aWebProgress,
nsIRequest *aRequest, PRInt32 aStateFlags, PRUint32 aStatus)
{
return NS_OK;
}
/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */
NS_IMETHODIMP nsRootAccessible::OnProgressChange(nsIWebProgress *aWebProgress,
nsIRequest *aRequest, PRInt32 aCurSelfProgress, PRInt32 aMaxSelfProgress,
PRInt32 aCurTotalProgress, PRInt32 aMaxTotalProgress)
{
return NS_OK;
}
/* void onLocationChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsIURI location); */
NS_IMETHODIMP nsRootAccessible::OnLocationChange(nsIWebProgress *aWebProgress,
nsIRequest *aRequest, nsIURI *location)
{
// Load has been verified, it will occur, about to commence
if (mListener && mBusy != eBusyStateLoading) {
mBusy = eBusyStateLoading;
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, this);
StartDocReadyTimer();
}
return NS_OK;
}
/* void onStatusChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsresult aStatus, in wstring aMessage); */
NS_IMETHODIMP nsRootAccessible::OnStatusChange(nsIWebProgress *aWebProgress,
nsIRequest *aRequest, nsresult aStatus, const PRUnichar *aMessage)
{
return NS_OK;
}
/* void onSecurityChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long state); */
NS_IMETHODIMP nsRootAccessible::OnSecurityChange(nsIWebProgress *aWebProgress,
nsIRequest *aRequest, PRInt32 state)
{
return NS_OK;
}
nsDocAccessibleMixin::nsDocAccessibleMixin(nsIDocument *aDoc):mDocument(aDoc)
{
}
nsDocAccessibleMixin::nsDocAccessibleMixin(nsIWeakReference *aPresShell)
{
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(aPresShell));
if (shell)
shell->GetDocument(getter_AddRefs(mDocument));
}
nsDocAccessibleMixin::~nsDocAccessibleMixin()
{
}
NS_IMETHODIMP nsDocAccessibleMixin::GetURL(nsAWritableString& aURL)
{
nsCOMPtr<nsIPresShell> presShell;
mDocument->GetShellAt(0, getter_AddRefs(presShell));
NS_ASSERTION(presShell,"Shell is gone!!! What are we doing here?");
nsCOMPtr<nsIDocShell> docShell;
GetDocShellFromPS(presShell, getter_AddRefs(docShell));
nsCOMPtr<nsIWebNavigation> webNav(do_GetInterface(docShell));
nsXPIDLCString theURL;
if (webNav) {
nsCOMPtr<nsIURI> pURI;
webNav->GetCurrentURI(getter_AddRefs(pURI));
if (pURI)
pURI->GetSpec(getter_Copies(theURL));
}
//XXXaaronl Need to use CopyUTF8toUCS2(nsDependentCString(theURL), aURL); when it's written
aURL.Assign(NS_ConvertUTF8toUCS2(theURL).get());
return NS_OK;
}
NS_IMETHODIMP nsDocAccessibleMixin::GetTitle(nsAWritableString& aTitle)
{
// This doesn't leak - we don't own the const pointer that's returned
aTitle = *(mDocument->GetDocumentTitle());
return NS_OK;
}
NS_IMETHODIMP nsDocAccessibleMixin::GetMimeType(nsAWritableString& aMimeType)
{
nsCOMPtr<nsIDOMNSDocument> domnsDocument(do_QueryInterface(mDocument));
if (domnsDocument) {
return domnsDocument->GetContentType(aMimeType);
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsDocAccessibleMixin::GetDocType(nsAWritableString& aDocType)
{
nsCOMPtr<nsIXULDocument> xulDoc(do_QueryInterface(mDocument));
nsCOMPtr<nsIDOMDocument> domDoc(do_QueryInterface(mDocument));
nsCOMPtr<nsIDOMDocumentType> docType;
if (xulDoc) {
aDocType = NS_LITERAL_STRING("window"); // doctype not implemented for XUL at time of writing - causes assertion
return NS_OK;
}
else if (domDoc && NS_SUCCEEDED(domDoc->GetDoctype(getter_AddRefs(docType))) && docType) {
return docType->GetName(aDocType);
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsDocAccessibleMixin::GetNameSpaceURIForID(PRInt16 aNameSpaceID, nsAWritableString& aNameSpaceURI)
{
if (mDocument) {
nsCOMPtr<nsINameSpaceManager> nameSpaceManager;
if (NS_SUCCEEDED(mDocument->GetNameSpaceManager(*getter_AddRefs(nameSpaceManager))))
return nameSpaceManager->GetNameSpaceURI(aNameSpaceID, aNameSpaceURI);
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsDocAccessibleMixin::GetDocument(nsIDocument **doc)
{
*doc = mDocument;
if (mDocument) {
NS_IF_ADDREF(*doc);
return NS_OK;
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsDocAccessibleMixin::GetDocShellFromPS(nsIPresShell* aPresShell, nsIDocShell** aDocShell)
{
*aDocShell = nsnull;
if (aPresShell) {
nsCOMPtr<nsIDocument> doc;
aPresShell->GetDocument(getter_AddRefs(doc));
if (doc) {
nsCOMPtr<nsIScriptGlobalObject> scriptObj;
doc->GetScriptGlobalObject(getter_AddRefs(scriptObj));
if (scriptObj) {
scriptObj->GetDocShell(aDocShell);
if (*aDocShell)
return NS_OK;
}
}
}
return NS_ERROR_FAILURE;
}

View File

@@ -0,0 +1,140 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsRootAccessible_H_
#define _nsRootAccessible_H_
#include "nsAccessible.h"
#include "nsIAccessibleEventReceiver.h"
#include "nsIAccessibleEventListener.h"
#include "nsIAccessibleDocument.h"
#include "nsIDOMFormListener.h"
#include "nsIDOMFocusListener.h"
#include "nsIDocument.h"
#include "nsIAccessibilityService.h"
#include "nsIWebProgressListener.h"
#include "nsIWeakReference.h"
#include "nsITimer.h"
#include "nsITimerCallback.h"
class nsDocAccessibleMixin
{
public:
nsDocAccessibleMixin(nsIDocument *doc);
nsDocAccessibleMixin(nsIWeakReference *aShell);
virtual ~nsDocAccessibleMixin();
NS_DECL_NSIACCESSIBLEDOCUMENT
protected:
NS_IMETHOD GetDocShellFromPS(nsIPresShell* aPresShell, nsIDocShell** aDocShell);
PRBool mTopLevelDocument;
nsCOMPtr<nsIDocument> mDocument;
};
class nsRootAccessible : public nsAccessible,
public nsDocAccessibleMixin,
public nsIAccessibleDocument,
public nsIAccessibleEventReceiver,
public nsIDOMFocusListener,
public nsIDOMFormListener,
public nsIWebProgressListener,
public nsITimerCallback,
public nsSupportsWeakReference
{
NS_DECL_ISUPPORTS_INHERITED
public:
enum EBusyState {eBusyStateUninitialized, eBusyStateLoading, eBusyStateDone};
nsRootAccessible(nsIWeakReference* aShell);
virtual ~nsRootAccessible();
/* attribute wstring accName; */
NS_IMETHOD GetAccName(nsAWritableString& aAccName);
NS_IMETHOD GetAccValue(nsAWritableString& aAccValue);
NS_IMETHOD GetAccParent(nsIAccessible * *aAccParent);
NS_IMETHOD GetAccRole(PRUint32 *aAccRole);
NS_IMETHOD GetAccState(PRUint32 *aAccState);
// ----- nsIAccessibleEventReceiver -------------------
NS_IMETHOD AddAccessibleEventListener(nsIAccessibleEventListener *aListener);
NS_IMETHOD RemoveAccessibleEventListener();
// ----- nsIDOMEventListener --------------------------
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent);
// ----- nsIDOMFocusListener --------------------------
NS_IMETHOD Focus(nsIDOMEvent* aEvent);
NS_IMETHOD Blur(nsIDOMEvent* aEvent);
// ----- nsIDOMFormListener ---------------------------
NS_IMETHOD Submit(nsIDOMEvent* aEvent);
NS_IMETHOD Reset(nsIDOMEvent* aEvent);
NS_IMETHOD Change(nsIDOMEvent* aEvent);
NS_IMETHOD Select(nsIDOMEvent* aEvent);
NS_IMETHOD Input(nsIDOMEvent* aEvent);
NS_IMETHOD_(void) Notify(nsITimer *timer);
NS_IMETHOD StartDocReadyTimer();
NS_DECL_NSIACCESSIBLEDOCUMENT
NS_DECL_NSIWEBPROGRESSLISTENER
protected:
NS_IMETHOD GetTargetNode(nsIDOMEvent *aEvent, nsCOMPtr<nsIDOMNode>& aTargetNode);
virtual void GetBounds(nsRect& aRect, nsIFrame** aRelativeFrame);
virtual nsIFrame* GetFrame();
// mListener is not a com pointer. We don't own the listener
// it is the callers responsibility to remove the listener
// otherwise we will get into circular referencing problems
// We don't need a weak reference, because we're owned by this listener
nsIAccessibleEventListener *mListener;
nsCOMPtr<nsITimer> mTimer;
nsCOMPtr<nsIDOMNode> mCurrentFocus;
nsCOMPtr<nsIAccessibilityService> mAccService;
EBusyState mBusy;
};
#endif

View File

@@ -0,0 +1,680 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Original Author: Eric Vaughan (evaughan@netscape.com)
* Contributor(s): John Gaunt (jgaunt@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsCOMPtr.h"
#include "nsFormControlAccessible.h"
#include "nsIAtom.h"
#include "nsIComboboxControlFrame.h"
#include "nsIDOMEventReceiver.h"
#include "nsIDOMHTMLCollection.h"
#include "nsIDOMHTMLOptionElement.h"
#include "nsIDOMHTMLSelectElement.h"
#include "nsIFrame.h"
#include "nsIListControlFrame.h"
#include "nsISelectControlFrame.h"
#include "nsLayoutAtoms.h"
#include "nsRootAccessible.h"
#include "nsSelectAccessible.h"
/** ------------------------------------------------------ */
/** First, the common widgets */
/** ------------------------------------------------------ */
/** Constructor -- cache our parent */
nsSelectListAccessible::nsSelectListAccessible(nsIAccessible* aParent,
nsIDOMNode* aDOMNode,
nsIWeakReference* aShell)
:nsAccessible(aDOMNode, aShell)
{
mParent = aParent;
}
/** Return our parents bounds */
NS_IMETHODIMP nsSelectListAccessible::AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height)
{
return mParent->AccGetBounds(x,y,width,height);
}
/** Return our cached parent */
NS_IMETHODIMP nsSelectListAccessible::GetAccParent(nsIAccessible **_retval)
{
*_retval = mParent;
NS_ADDREF(*_retval);
return NS_OK;
}
/** We are a list */
NS_IMETHODIMP nsSelectListAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_LIST;
return NS_OK;
}
/** We are an only child */
NS_IMETHODIMP nsSelectListAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/** We are an only child */
NS_IMETHODIMP nsSelectListAccessible::GetAccNextSibling(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/**
* nsSelectOptionAccessible
*/
/** Constructor -- cache our parent */
nsSelectOptionAccessible::nsSelectOptionAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsLeafAccessible(aDOMNode, aShell)
{
mParent = aParent;
}
/** We are a ListItem */
NS_IMETHODIMP nsSelectOptionAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_LISTITEM;
return NS_OK;
}
/** Return our cached parent */
NS_IMETHODIMP nsSelectOptionAccessible::GetAccParent(nsIAccessible **_retval)
{
*_retval = mParent;
NS_IF_ADDREF(*_retval);
return NS_OK;
}
/**
* Get our Name from our Content's subtree
*/
NS_IMETHODIMP nsSelectOptionAccessible::GetAccName(nsAWritableString& _retval)
{
nsCOMPtr<nsIContent> content (do_QueryInterface(mDOMNode));
if (!content) {
return NS_ERROR_FAILURE;
}
nsAutoString option;
nsresult rv = AppendFlatStringFromSubtree(content, &option);
if (NS_SUCCEEDED(rv)) {
// Temp var needed until CompressWhitespace built for nsAWritableString
option.CompressWhitespace();
_retval.Assign(option);
}
return rv;
}
/** ------------------------------------------------------ */
/** Secondly, the Listbox widget */
/** ------------------------------------------------------ */
/** ----- nsListboxAccessible ----- */
/** Constructor */
nsListboxAccessible::nsListboxAccessible(nsIDOMNode* aDOMNode,
nsIWeakReference* aShell):
nsAccessible(aDOMNode, aShell)
{
}
/** We are a window, as far as MSAA is concerned */
NS_IMETHODIMP nsListboxAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_WINDOW;
return NS_OK;
}
/**
* We always have 1 child: a subclass of nsSelectListAccessible.
*/
NS_IMETHODIMP nsListboxAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 1;
return NS_OK;
}
/**
* As a nsHTMLListboxAccessible we can have the following states:
* STATE_FOCUSED
* STATE_READONLY
* STATE_FOCUSABLE
*/
NS_IMETHODIMP nsListboxAccessible::GetAccState(PRUint32 *_retval)
{
// Get focus status from base class
nsAccessible::GetAccState(_retval);
*_retval |= STATE_READONLY | STATE_FOCUSABLE;
return NS_OK;
}
/** ------------------------------------------------------ */
/** Finally, the Combobox widgets */
/** ------------------------------------------------------ */
/** ----- nsComboboxAccessible ----- */
/**
* Constructor -- set initial state - closed, register ourself
*/
nsComboboxAccessible::nsComboboxAccessible(nsIDOMNode* aDOMNode,
nsIWeakReference* aShell):
nsAccessible(aDOMNode, aShell)
{
mRegistered = PR_FALSE;
mOpen = PR_FALSE;
SetupMenuListener();
}
/**
* Destructor -- If we are registered, remove ourselves as a listener.
*/
nsComboboxAccessible::~nsComboboxAccessible()
{
if (mRegistered) {
nsCOMPtr<nsIDOMEventReceiver> eventReceiver(do_QueryInterface(mDOMNode));
if (eventReceiver)
eventReceiver->RemoveEventListener(NS_LITERAL_STRING("popupshowing"), this, PR_TRUE);
}
}
/**
* Inherit the ISupports impl from nsAccessible,
* handle nsIDOMXULListener and nsIAccessibleSelectable ourself
*/
NS_IMPL_ISUPPORTS_INHERITED2(nsComboboxAccessible, nsAccessible, nsIDOMXULListener, nsIAccessibleSelectable)
/**
* If we aren't already registered, register ourselves as a
* listener to "popupshowing" events on our DOM node. Set our
* state to registered, but don't notify MSAA as they
* don't need to know about this state.
*/
void
nsComboboxAccessible::SetupMenuListener()
{
// if not already registered as a popup listener, register ourself
if (!mRegistered) {
nsCOMPtr<nsIDOMEventReceiver> eventReceiver(do_QueryInterface(mDOMNode));
if (eventReceiver && NS_SUCCEEDED(eventReceiver->AddEventListener(NS_LITERAL_STRING("popupshowing"), this, PR_TRUE)))
mRegistered = PR_TRUE;
}
}
/** We are a combobox */
NS_IMETHODIMP nsComboboxAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_COMBOBOX;
return NS_OK;
}
/**
* We always have 3 children: TextField, Button, Window. In that order
*/
NS_IMETHODIMP nsComboboxAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 3;
return NS_OK;
}
/**
* nsIAccessibleSelectable method. No-op because our selection is returned through
* GetValue(). This _may_ change just to provide additional info for the vendors
* and another option for them to get at stuff. Despite the fact that we are
* single selection only.
*/
NS_IMETHODIMP nsComboboxAccessible::GetSelectedChildren(nsISupportsArray **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/**
* As a nsComboboxAccessible we can have the following states:
* STATE_FOCUSED
* STATE_READONLY
* STATE_FOCUSABLE
* STATE_HASPOPUP
* STATE_EXPANDED
* STATE_COLLAPSED
*/
NS_IMETHODIMP nsComboboxAccessible::GetAccState(PRUint32 *_retval)
{
// Get focus status from base class
nsAccessible::GetAccState(_retval);
if (mOpen)
*_retval |= STATE_EXPANDED;
else
*_retval |= STATE_COLLAPSED;
*_retval |= STATE_HASPOPUP | STATE_READONLY | STATE_FOCUSABLE;
return NS_OK;
}
/**
* Set our state to open and (TBD) fire an event to MSAA saying our state
* has changed.
*/
NS_IMETHODIMP nsComboboxAccessible::PopupShowing(nsIDOMEvent* aEvent)
{
mOpen = PR_TRUE;
/* TBD send state change event */
return NS_OK;
}
/**
* Set our state to not open and (TDB) fire an event to MSAA saying
* our state has changed.
*/
NS_IMETHODIMP nsComboboxAccessible::PopupHiding(nsIDOMEvent* aEvent)
{
mOpen = PR_FALSE;
/* TBD send state change event */
return NS_OK;
}
/**
* Set our state to not open and (TDB) fire an event to MSAA saying
* our state has changed.
*/
NS_IMETHODIMP nsComboboxAccessible::Close(nsIDOMEvent* aEvent)
{
mOpen = PR_FALSE;
/* TBD send state change event */
return NS_OK;
}
/** ----- nsComboboxTextFieldAccessible ----- */
/** Constructor */
nsComboboxTextFieldAccessible::nsComboboxTextFieldAccessible(nsIAccessible* aParent,
nsIDOMNode* aDOMNode,
nsIWeakReference* aShell):
nsLeafAccessible(aDOMNode, aShell)
{
mParent = aParent;
}
/**
* Currently gets the text from the first option, needs to check for selection
* and then return that text.
* Walks the Frame tree and checks for proper frames.
*/
NS_IMETHODIMP nsComboboxTextFieldAccessible::GetAccValue(nsAWritableString& _retval)
{
nsIFrame* frame = nsAccessible::GetBoundsFrame();
nsCOMPtr<nsIPresContext> context;
GetPresContext(context);
if (!frame || !context)
return NS_ERROR_FAILURE;
frame->FirstChild(context, nsnull, &frame);
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::blockFrame))
return NS_ERROR_FAILURE;
#endif
frame->FirstChild(context, nsnull, &frame);
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::textFrame))
return NS_ERROR_FAILURE;
#endif
nsCOMPtr<nsIContent> content;
frame->GetContent(getter_AddRefs(content));
if (!content)
return NS_ERROR_FAILURE;
AppendFlatStringFromSubtree(content, &_retval);
return NS_OK;
}
/**
* Gets the bounds for the BlockFrame.
* Walks the Frame tree and checks for proper frames.
*/
void nsComboboxTextFieldAccessible::GetBounds(nsRect& aBounds, nsIFrame** aBoundingFrame)
{
// get our first child's frame
nsIFrame* frame = nsAccessible::GetBoundsFrame();
nsCOMPtr<nsIPresContext> context;
GetPresContext(context);
if (!frame || !context)
return;
frame->FirstChild(context, nsnull, aBoundingFrame);
frame->FirstChild(context, nsnull, &frame);
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::blockFrame))
return;
#endif
frame->GetRect(aBounds);
}
/** Return our cached parent */
NS_IMETHODIMP nsComboboxTextFieldAccessible::GetAccParent(nsIAccessible **_retval)
{
*_retval = mParent;
NS_IF_ADDREF(*_retval);
return NS_OK;
}
/**
* We are the first child of our parent, no previous sibling
*/
NS_IMETHODIMP nsComboboxTextFieldAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/**
* Our role is currently only static text, but we should be able to have
* editable text here and we need to check that case.
*/
NS_IMETHODIMP nsComboboxTextFieldAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_STATICTEXT;
return NS_OK;
}
/**
* As a nsComboboxTextFieldAccessible we can have the following states:
* STATE_READONLY
* STATE_FOCUSED
* STATE_FOCUSABLE
*/
NS_IMETHODIMP nsComboboxTextFieldAccessible::GetAccState(PRUint32 *_retval)
{
// Get focus status from base class
nsAccessible::GetAccState(_retval);
*_retval |= STATE_READONLY | STATE_FOCUSABLE;
return NS_OK;
}
/** -----ComboboxButtonAccessible ----- */
/** Constructor -- cache our parent */
nsComboboxButtonAccessible::nsComboboxButtonAccessible(nsIAccessible* aParent,
nsIDOMNode* aDOMNode,
nsIWeakReference* aShell):
nsLeafAccessible(aDOMNode, aShell)
{
mParent = aParent;
}
/** Just one action ( click ). */
NS_IMETHODIMP nsComboboxButtonAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
}
/**
* Gets the bounds for the gfxButtonControlFrame.
* Walks the Frame tree and checks for proper frames.
*/
void nsComboboxButtonAccessible::GetBounds(nsRect& aBounds, nsIFrame** aBoundingFrame)
{
// get our second child's frame
nsIFrame* frame = nsAccessible::GetBoundsFrame();
nsCOMPtr<nsIPresContext> context;
GetPresContext(context);
if (!context)
return;
frame->FirstChild(context, nsnull, &frame);
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::blockFrame))
return;
#endif
frame->GetNextSibling(aBoundingFrame);
frame->GetNextSibling(&frame);
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::gfxButtonControlFrame))
return;
#endif
frame->GetRect(aBounds);
}
/** We are a button. */
NS_IMETHODIMP nsComboboxButtonAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_PUSHBUTTON;
return NS_OK;
}
/** Return our cached parent */
NS_IMETHODIMP nsComboboxButtonAccessible::GetAccParent(nsIAccessible **_retval)
{
*_retval = mParent;
NS_IF_ADDREF(*_retval);
return NS_OK;
}
/**
* Gets the name from GetAccActionName()
*/
NS_IMETHODIMP nsComboboxButtonAccessible::GetAccName(nsAWritableString& _retval)
{
return GetAccActionName(eAction_Click, _retval);
}
/**
* Our action name is the reverse of our state:
* if we are closed -> open is our name.
* if we are open -> closed is our name.
* Uses the frame to get the state, updated on every click
*/
NS_IMETHODIMP nsComboboxButtonAccessible::GetAccActionName(PRUint8 index, nsAWritableString& _retval)
{
PRBool isOpen = PR_FALSE;
nsIFrame *boundsFrame = GetBoundsFrame();
nsIComboboxControlFrame* comboFrame;
boundsFrame->QueryInterface(NS_GET_IID(nsIComboboxControlFrame), (void**)&comboFrame);
if (!comboFrame)
return NS_ERROR_FAILURE;
comboFrame->IsDroppedDown(&isOpen);
if (isOpen)
_retval = NS_LITERAL_STRING("Close");
else
_retval = NS_LITERAL_STRING("Open");
return NS_OK;
}
/**
* As a nsComboboxButtonAccessible we can have the following states:
* STATE_PRESSED
* STATE_FOCUSED
* STATE_FOCUSABLE
*/
NS_IMETHODIMP nsComboboxButtonAccessible::GetAccState(PRUint32 *_retval)
{
// Get focus status from base class
nsAccessible::GetAccState(_retval);
// we are open or closed --> pressed or not
PRBool isOpen = PR_FALSE;
nsIFrame *boundsFrame = GetBoundsFrame();
nsIComboboxControlFrame* comboFrame;
boundsFrame->QueryInterface(NS_GET_IID(nsIComboboxControlFrame), (void**)&comboFrame);
if (!comboFrame)
return NS_ERROR_FAILURE;
comboFrame->IsDroppedDown(&isOpen);
if (isOpen)
*_retval |= STATE_PRESSED;
*_retval |= STATE_FOCUSABLE;
return NS_OK;
}
/** ----- nsComboboxWindowAccessible ----- */
/**
* Constructor -- cache our parent
*/
nsComboboxWindowAccessible::nsComboboxWindowAccessible(nsIAccessible* aParent,
nsIDOMNode* aDOMNode,
nsIWeakReference* aShell):
nsAccessible(aDOMNode, aShell)
{
mParent = aParent;
}
/**
* As a nsComboboxWindowAccessible we can have the following states:
* STATE_FOCUSED
* STATE_FOCUSABLE
* STATE_INVISIBLE
* STATE_FLOATING
*/
NS_IMETHODIMP nsComboboxWindowAccessible::GetAccState(PRUint32 *_retval)
{
// Get focus status from base class
nsAccessible::GetAccState(_retval);
// we are open or closed
PRBool isOpen = PR_FALSE;
nsIFrame *boundsFrame = GetBoundsFrame();
nsIComboboxControlFrame* comboFrame = nsnull;
boundsFrame->QueryInterface(NS_GET_IID(nsIComboboxControlFrame), (void**)&comboFrame);
if (!comboFrame)
return NS_ERROR_FAILURE;
comboFrame->IsDroppedDown(&isOpen);
if (! isOpen)
*_retval |= STATE_INVISIBLE;
*_retval |= STATE_FOCUSABLE | STATE_FLOATING;
return NS_OK;
}
/** We are a window */
NS_IMETHODIMP nsComboboxWindowAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_WINDOW;
return NS_OK;
}
/** Return our cached parent */
NS_IMETHODIMP nsComboboxWindowAccessible::GetAccParent(nsIAccessible **_retval)
{
*_retval = mParent;
NS_IF_ADDREF(*_retval);
return NS_OK;
}
/**
* We are the last sibling of our parent.
*/
NS_IMETHODIMP nsComboboxWindowAccessible::GetAccNextSibling(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/**
* We only have one child, a list
*/
NS_IMETHODIMP nsComboboxWindowAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 1;
return NS_OK;
}
/**
* Gets the bounds for the areaFrame.
* Walks the Frame tree and checks for proper frames.
*/
void nsComboboxWindowAccessible::GetBounds(nsRect& aBounds, nsIFrame** aBoundingFrame)
{
// get our first option
nsCOMPtr<nsIDOMNode> child;
mDOMNode->GetFirstChild(getter_AddRefs(child));
// now get its frame
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (!shell) {
*aBoundingFrame = nsnull;
return;
}
nsIFrame* frame = nsnull;
nsCOMPtr<nsIContent> content(do_QueryInterface(child));
shell->GetPrimaryFrameFor(content, &frame);
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::blockFrame))
return;
#endif
frame->GetParent(aBoundingFrame);
frame->GetParent(&frame);
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::areaFrame))
return;
#endif
frame->GetRect(aBounds);
}

View File

@@ -0,0 +1,237 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Original Author: Eric Vaughan (evaughan@netscape.com)
* Contributor(s): John Gaunt (jgaunt@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef __nsSelectAccessible_h__
#define __nsSelectAccessible_h__
#include "nsBaseWidgetAccessible.h"
#include "nsIAccessibleSelectable.h"
#include "nsIDOMXULListener.h"
/** ------------------------------------------------------ */
/** First, the common widgets */
/** ------------------------------------------------------ */
/**
* The list that contains all the options in the select.
*/
class nsSelectListAccessible : public nsAccessible
{
public:
nsSelectListAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsSelectListAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height);
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
protected:
nsCOMPtr<nsIAccessible> mParent;
};
/**
* Options inside the select, contained within the list
*/
class nsSelectOptionAccessible : public nsLeafAccessible
{
public:
nsSelectOptionAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsSelectOptionAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccName(nsAWritableString& _retval);
protected:
nsCOMPtr<nsIAccessible> mParent;
};
/** ------------------------------------------------------ */
/** Secondly, the Listbox widget */
/** ------------------------------------------------------ */
/**
* A class that represents the Listbox widget.
*/
class nsListboxAccessible : public nsAccessible
{
public:
nsListboxAccessible (nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsListboxAccessible () {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
};
/** ------------------------------------------------------ */
/** Finally, the Combobox widgets */
/** ------------------------------------------------------ */
/**
* A class the represents the HTML Combobox widget.
*/
class nsComboboxAccessible : public nsAccessible,
public nsIAccessibleSelectable,
public nsIDOMXULListener
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLESELECTABLE
nsComboboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsComboboxAccessible();
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
/* ----- nsIDOMXULListener ----- */
NS_IMETHOD PopupShowing(nsIDOMEvent* aEvent);
NS_IMETHOD PopupShown(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD PopupHiding(nsIDOMEvent* aEvent);
NS_IMETHOD PopupHidden(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD Close(nsIDOMEvent* aEvent);
NS_IMETHOD Command(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD Broadcast(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD CommandUpdate(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) { return NS_OK; }
virtual void SetupMenuListener();
protected:
PRBool mRegistered;
PRBool mOpen;
};
/**
* A class the represents the text field in the Combobox to the left
* of the drop down button
*/
class nsComboboxTextFieldAccessible : public nsLeafAccessible
{
public:
nsComboboxTextFieldAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsComboboxTextFieldAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAWritableString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
virtual void GetBounds(nsRect& aBounds, nsIFrame** aBoundingFrame);
protected:
nsCOMPtr<nsIAccessible> mParent;
};
/**
* A class that represents the button inside the Select to the
* right of the text field
*/
class nsComboboxButtonAccessible : public nsLeafAccessible
{
public:
nsComboboxButtonAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsComboboxButtonAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccName(nsAWritableString& _retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
virtual void GetBounds(nsRect& aBounds, nsIFrame** aBoundingFrame);
protected:
nsCOMPtr<nsIAccessible> mParent;
};
/**
* A class that represents the window that lives to the right
* of the drop down button inside the Select. This is the window
* that is made visible when the button is pressed.
*/
class nsComboboxWindowAccessible : public nsAccessible
{
public:
nsComboboxWindowAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsComboboxWindowAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
virtual void GetBounds(nsRect& aBounds, nsIFrame** aBoundingFrame);
protected:
nsCOMPtr<nsIAccessible> mParent;
};
#endif

View File

@@ -0,0 +1,169 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Aaron Leventhal (aaronl@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsGenericAccessible.h"
#include "nsHTMLAreaAccessible.h"
#include "nsReadableUtils.h"
#include "nsString.h"
#include "nsAccessible.h"
#include "nsIAccessibilityService.h"
#include "nsIServiceManager.h"
#include "nsIDOMElement.h"
#include "nsIDOMHTMLAreaElement.h"
// --- area -----
nsHTMLAreaAccessible::nsHTMLAreaAccessible(nsIDOMNode *aDomNode, nsIAccessible *aAccParent, nsIWeakReference* aShell):
nsLinkableAccessible(aDomNode, aShell), mAccParent(aAccParent)
{
}
/* wstring getAccName (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccName(nsAWritableString & _retval)
{
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(mDOMNode));
if (elt) {
nsAutoString hrefString;
elt->GetAttribute(NS_LITERAL_STRING("title"), _retval);
}
return NS_OK;
}
/* unsigned long getAccRole (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_LINK;
return NS_OK;
}
/* wstring getAccValue (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccValue(nsAWritableString& _retval)
{
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(mDOMNode));
if (elt)
elt->GetAttribute(NS_LITERAL_STRING("href"), _retval);
return NS_OK;
}
/* wstring getAccDescription (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccDescription(nsAWritableString& _retval)
{
// Still to do - follow IE's standard here
nsCOMPtr<nsIDOMHTMLAreaElement> area(do_QueryInterface(mDOMNode));
if (area)
area->GetShape(_retval);
return NS_OK;
}
/* nsIAccessible getAccFirstChild (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/* nsIAccessible getAccLastChild (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccLastChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/* long getAccChildCount (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 0;
return NS_OK;
}
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccParent(nsIAccessible * *aAccParent)
{
*aAccParent = mAccParent;
NS_IF_ADDREF(*aAccParent);
return NS_OK;
}
nsIAccessible *nsHTMLAreaAccessible::CreateAreaAccessible(nsIDOMNode *aDOMNode)
{
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
if (accService) {
nsIAccessible* acc = nsnull;
accService->CreateHTMLAreaAccessible(mPresShell, aDOMNode, mAccParent, &acc);
return acc;
}
return nsnull;
}
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccNextSibling(nsIAccessible * *aAccNextSibling)
{
*aAccNextSibling = nsnull;
nsCOMPtr<nsIDOMNode> nextNode;
mDOMNode->GetNextSibling(getter_AddRefs(nextNode));
if (nextNode)
*aAccNextSibling = CreateAreaAccessible(nextNode);
return NS_OK;
}
/* readonly attribute nsIAccessible accPreviousSibling; */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccPreviousSibling(nsIAccessible * *aAccPrevSibling)
{
*aAccPrevSibling = nsnull;
nsCOMPtr<nsIDOMNode> prevNode;
mDOMNode->GetPreviousSibling(getter_AddRefs(prevNode));
if (prevNode)
*aAccPrevSibling = CreateAreaAccessible(prevNode);
return NS_OK;
}
/* void accGetBounds (out long x, out long y, out long width, out long height); */
NS_IMETHODIMP nsHTMLAreaAccessible::AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height)
{
//nsIFrame *frame;
// Do a better job on this later - need to use GetRect on mAreas of nsImageMap from nsImageFrame
//return mAccParent->nsAccessible::AccGetBounds(x,y,width,height);
*x = *y = *width = *height = 0;
return NS_ERROR_NOT_IMPLEMENTED;
}

View File

@@ -0,0 +1,71 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Aaron Leventhal (aaronl@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsHTMLAreaAccessible_H_
#define _nsHTMLAreaAccessible_H_
#include "nsBaseWidgetAccessible.h"
#include "nsAccessible.h"
/* Accessible for image map areas - must be child of image
*/
class nsHTMLAreaAccessible : public nsLinkableAccessible
{
public:
nsHTMLAreaAccessible(nsIDOMNode *domNode, nsIAccessible *accParent, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAWritableString & _retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAWritableString& _retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccParent(nsIAccessible * *aAccParent);
NS_IMETHOD GetAccNextSibling(nsIAccessible * *aAccNextSibling);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible * *aAccPreviousSibling);
NS_IMETHOD GetAccDescription(nsAWritableString& _retval);
NS_IMETHOD AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height);
protected:
nsIAccessible *CreateAreaAccessible(nsIDOMNode *aDOMNode);
nsCOMPtr<nsIAccessible> mAccParent;
};
#endif

View File

@@ -0,0 +1,376 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Eric Vaughan (evaughan@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
// NOTE: alphabetically ordered
#include "nsAccessible.h"
#include "nsFormControlAccessible.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLFormControlAccessible.h"
#include "nsIDOMHTMLButtonElement.h"
#include "nsIDOMHTMLFormElement.h"
#include "nsIDOMHTMLInputElement.h"
#include "nsIDOMHTMLLabelElement.h"
#include "nsIDOMHTMLTextAreaElement.h"
#include "nsIDOMXULCheckboxElement.h"
#include "nsIDOMXULButtonElement.h"
#include "nsIDOMXULSelectCntrlItemEl.h"
#include "nsIDOMXULSelectCntrlEl.h"
#include "nsINameSpaceManager.h"
#include "nsIFrame.h"
#include "nsISelectionController.h"
#include "nsReadableUtils.h"
#include "nsWeakReference.h"
// --- checkbox -----
nsHTMLCheckboxAccessible::nsHTMLCheckboxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsFormControlAccessible(aNode, aShell)
{
}
NS_IMETHODIMP nsHTMLCheckboxAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_CHECKBUTTON;
return NS_OK;
}
NS_IMETHODIMP nsHTMLCheckboxAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
}
NS_IMETHODIMP nsHTMLCheckboxAccessible::GetAccActionName(PRUint8 index, nsAWritableString& _retval)
{
if (index == eAction_Click) { // 0 is the magic value for default action
// check or uncheck
PRUint32 state;
GetAccState(&state);
if (state & STATE_CHECKED)
_retval = NS_LITERAL_STRING("uncheck");
else
_retval = NS_LITERAL_STRING("check");
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTMLCheckboxAccessible::AccDoAction(PRUint8 index)
{
if (index == 0) { // 0 is the magic value for default action
nsCOMPtr<nsIDOMHTMLInputElement> htmlCheckboxElement(do_QueryInterface(mDOMNode));
PRBool checked = PR_FALSE;
if (htmlCheckboxElement) {
htmlCheckboxElement->GetChecked(&checked);
htmlCheckboxElement->SetChecked(!checked);
return NS_OK;
}
return NS_ERROR_FAILURE;
}
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTMLCheckboxAccessible::GetAccState(PRUint32 *_retval)
{
nsFormControlAccessible::GetAccState(_retval);
PRBool checked = PR_FALSE; // Radio buttons and check boxes can be checked
nsCOMPtr<nsIDOMHTMLInputElement> htmlCheckboxElement(do_QueryInterface(mDOMNode));
if (htmlCheckboxElement)
htmlCheckboxElement->GetChecked(&checked);
if (checked)
*_retval |= STATE_CHECKED;
return NS_OK;
}
//------ Radio button -------
nsHTMLRadioButtonAccessible::nsHTMLRadioButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsRadioButtonAccessible(aNode, aShell)
{
}
NS_IMETHODIMP nsHTMLRadioButtonAccessible::AccDoAction(PRUint8 index)
{
if (index == eAction_Click) {
nsCOMPtr<nsIDOMHTMLInputElement> element(do_QueryInterface(mDOMNode));
element->Click();
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTMLRadioButtonAccessible::GetAccState(PRUint32 *_retval)
{
nsFormControlAccessible::GetAccState(_retval);
PRBool checked = PR_FALSE; // Radio buttons and check boxes can be checked
nsCOMPtr<nsIDOMHTMLInputElement> htmlRadioElement(do_QueryInterface(mDOMNode));
if (htmlRadioElement)
htmlRadioElement->GetChecked(&checked);
if (checked)
*_retval |= STATE_CHECKED;
return NS_OK;
}
// ----- Button -----
nsHTMLButtonAccessible::nsHTMLButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsFormControlAccessible(aNode, aShell)
{
}
NS_IMETHODIMP nsHTMLButtonAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;;
}
NS_IMETHODIMP nsHTMLButtonAccessible::GetAccActionName(PRUint8 index, nsAWritableString& _retval)
{
if (index == eAction_Click) {
_retval = NS_LITERAL_STRING("press");
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTMLButtonAccessible::AccDoAction(PRUint8 index)
{
if (index == 0) {
nsCOMPtr<nsIDOMHTMLInputElement> element(do_QueryInterface(mDOMNode));
element->Click();
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTMLButtonAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_PUSHBUTTON;
return NS_OK;
}
NS_IMETHODIMP nsHTMLButtonAccessible::GetAccName(nsAWritableString& _retval)
{
nsCOMPtr<nsIDOMHTMLInputElement> button(do_QueryInterface(mDOMNode));
if (!button)
return NS_ERROR_FAILURE;
nsAutoString name;
button->GetValue(name);
name.CompressWhitespace();
_retval.Assign(name);
return NS_OK;
}
// ----- HTML 4 Button: can contain arbitrary HTML content -----
nsHTML4ButtonAccessible::nsHTML4ButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsBlockAccessible(aNode, aShell)
{
}
NS_IMETHODIMP nsHTML4ButtonAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;;
}
NS_IMETHODIMP nsHTML4ButtonAccessible::GetAccActionName(PRUint8 index, nsAWritableString& _retval)
{
if (index == eAction_Click) {
_retval = NS_LITERAL_STRING("press");
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTML4ButtonAccessible::AccDoAction(PRUint8 index)
{
if (index == 0) {
nsCOMPtr<nsIDOMHTMLInputElement> inputElement(do_QueryInterface(mDOMNode));
if ( inputElement )
{
inputElement->Click();
return NS_OK;
}
return NS_ERROR_FAILURE;
}
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTML4ButtonAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_PUSHBUTTON;
return NS_OK;
}
NS_IMETHODIMP nsHTML4ButtonAccessible::GetAccState(PRUint32 *_retval)
{
nsAccessible::GetAccState(_retval);
*_retval |= STATE_FOCUSABLE;
return NS_OK;
}
NS_IMETHODIMP nsHTML4ButtonAccessible::GetAccName(nsAWritableString& _retval)
{
nsresult rv = NS_ERROR_FAILURE;
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
nsAutoString name;
if (content)
rv = AppendFlatStringFromSubtree(content, &name);
if (NS_SUCCEEDED(rv)) {
// Temp var needed until CompressWhitespace built for nsAWritableString
name.CompressWhitespace();
_retval.Assign(name);
}
return rv;
}
// --- textfield -----
nsHTMLTextFieldAccessible::nsHTMLTextFieldAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsFormControlAccessible(aNode, aShell)
{
}
NS_IMETHODIMP nsHTMLTextFieldAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_TEXT;
return NS_OK;
}
NS_IMETHODIMP nsHTMLTextFieldAccessible::GetAccValue(nsAWritableString& _retval)
{
PRUint32 state;
GetAccState(&state);
if (state & STATE_PROTECTED) // Don't return password text!
return NS_ERROR_FAILURE;
nsCOMPtr<nsIDOMHTMLTextAreaElement> textArea(do_QueryInterface(mDOMNode));
if (textArea) {
textArea->GetValue(_retval);
return NS_OK;
}
nsCOMPtr<nsIDOMHTMLInputElement> inputElement(do_QueryInterface(mDOMNode));
if (inputElement) {
inputElement->GetValue(_retval);
return NS_OK;
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsHTMLTextFieldAccessible::GetAccState(PRUint32 *_retval)
{
// can be
// focusable, focused, protected. readonly, unavailable, selected
nsAccessible::GetAccState(_retval);
*_retval |= STATE_FOCUSABLE;
nsCOMPtr<nsIDOMHTMLTextAreaElement> textArea(do_QueryInterface(mDOMNode));
nsCOMPtr<nsIDOMHTMLInputElement> inputElement(do_QueryInterface(mDOMNode));
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(mDOMNode));
PRBool isReadOnly = PR_FALSE;
elt->HasAttribute(NS_LITERAL_STRING("readonly"), &isReadOnly);
if (isReadOnly)
*_retval |= STATE_READONLY;
// Get current selection and find out if current node is in it
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (!shell) {
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIPresContext> context;
shell->GetPresContext(getter_AddRefs(context));
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
nsIFrame *frame;
if (content && NS_SUCCEEDED(shell->GetPrimaryFrameFor(content, &frame))) {
nsCOMPtr<nsISelectionController> selCon;
frame->GetSelectionController(context,getter_AddRefs(selCon));
if (selCon) {
nsCOMPtr<nsISelection> domSel;
selCon->GetSelection(nsISelectionController::SELECTION_NORMAL, getter_AddRefs(domSel));
if (domSel) {
PRBool isCollapsed = PR_TRUE;
domSel->GetIsCollapsed(&isCollapsed);
if (!isCollapsed)
*_retval |=STATE_SELECTED;
}
}
}
if (!textArea) {
if (inputElement) {
/////// ====== Must be a password field, so it uses nsIDOMHTMLFormControl ==== ///////
PRUint32 moreStates = 0;
nsresult rv = nsFormControlAccessible::GetAccState(&moreStates);
*_retval |= moreStates;
return rv;
}
return NS_ERROR_FAILURE;
}
PRBool disabled = PR_FALSE;
textArea->GetDisabled(&disabled);
if (disabled)
*_retval |= STATE_UNAVAILABLE;
return NS_OK;
}

View File

@@ -0,0 +1,103 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Eric D Vaughan (evaughan@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsHTMLFormControlAccessible_H_
#define _nsHTMLFormControlAccessible_H_
#include "nsBaseWidgetAccessible.h"
#include "nsFormControlAccessible.h"
class nsICheckboxControlFrame;
class nsHTMLCheckboxAccessible : public nsFormControlAccessible
{
public:
nsHTMLCheckboxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccState(PRUint32 *_retval);
};
class nsHTMLRadioButtonAccessible : public nsRadioButtonAccessible
{
public:
nsHTMLRadioButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccState(PRUint32 *_retval);
};
class nsHTMLButtonAccessible : public nsFormControlAccessible
{
public:
nsHTMLButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccName(nsAWritableString& _retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
};
class nsHTML4ButtonAccessible : public nsBlockAccessible
{
public:
nsHTML4ButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccName(nsAWritableString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
};
class nsHTMLTextFieldAccessible : public nsFormControlAccessible
{
public:
nsHTMLTextFieldAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAWritableString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
};
#endif

View File

@@ -0,0 +1,207 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsHTMLIFrameRootAccessible.h"
#include "nsCOMPtr.h"
#include "nsIDocument.h"
#include "nsIPresShell.h"
#include "nsIContent.h"
#include "nsIFrame.h"
#include "nsIDOMDocument.h"
#include "nsReadableUtils.h"
NS_INTERFACE_MAP_BEGIN(nsHTMLIFrameRootAccessible)
NS_INTERFACE_MAP_END_INHERITING(nsRootAccessible)
NS_IMPL_ADDREF_INHERITED(nsHTMLIFrameRootAccessible, nsRootAccessible);
NS_IMPL_RELEASE_INHERITED(nsHTMLIFrameRootAccessible, nsRootAccessible);
NS_IMPL_ADDREF_INHERITED(nsHTMLIFrameAccessible, nsBlockAccessible);
NS_IMPL_RELEASE_INHERITED(nsHTMLIFrameAccessible, nsBlockAccessible);
NS_IMETHODIMP
nsHTMLIFrameAccessible::QueryInterface(const nsIID& aIID, void** aInstancePtr)
{
NS_ASSERTION(aInstancePtr, "QueryInterface requires a non-NULL destination!");
if ( !aInstancePtr )
return NS_ERROR_NULL_POINTER;
if (aIID.Equals(NS_GET_IID(nsIAccessibleDocument))) {
*aInstancePtr = (void*)(nsIAccessibleDocument*) this;
NS_IF_ADDREF(this);
return NS_OK;
}
return nsBlockAccessible::QueryInterface(aIID, aInstancePtr);
}
nsHTMLIFrameAccessible::nsHTMLIFrameAccessible(nsIDOMNode* aNode, nsIAccessible* aRoot, nsIWeakReference* aShell, nsIDocument *aDoc):
nsBlockAccessible(aNode, aShell), mRootAccessible(aRoot), nsDocAccessibleMixin(aDoc)
{
}
/* attribute wstring accName; */
NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccName(nsAWritableString& aAccName)
{
return GetTitle(aAccName);
}
NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccValue(nsAWritableString& aAccValue)
{
return GetURL(aAccValue);
}
/* nsIAccessible getAccFirstChild (); */
NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
return mRootAccessible->GetAccFirstChild(_retval);
}
/* nsIAccessible getAccLastChild (); */
NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccLastChild(nsIAccessible **_retval)
{
return mRootAccessible->GetAccLastChild(_retval);
}
/* long getAccChildCount (); */
NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccChildCount(PRInt32 *_retval)
{
return mRootAccessible->GetAccChildCount(_retval);
}
/* unsigned long getAccRole (); */
NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_PANE;
return NS_OK;
}
NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccState(PRUint32 *aAccState)
{
return nsAccessible::GetAccState(aAccState);
}
NS_IMETHODIMP nsHTMLIFrameAccessible::GetURL(nsAWritableString& aURL)
{
return nsDocAccessibleMixin::GetURL(aURL);
}
NS_IMETHODIMP nsHTMLIFrameAccessible::GetTitle(nsAWritableString& aTitle)
{
return nsDocAccessibleMixin::GetTitle(aTitle);
}
NS_IMETHODIMP nsHTMLIFrameAccessible::GetMimeType(nsAWritableString& aMimeType)
{
return nsDocAccessibleMixin::GetMimeType(aMimeType);
}
NS_IMETHODIMP nsHTMLIFrameAccessible::GetDocType(nsAWritableString& aDocType)
{
return nsDocAccessibleMixin::GetDocType(aDocType);
}
NS_IMETHODIMP nsHTMLIFrameAccessible::GetNameSpaceURIForID(PRInt16 aNameSpaceID, nsAWritableString& aNameSpaceURI)
{
return nsDocAccessibleMixin::GetNameSpaceURIForID(aNameSpaceID, aNameSpaceURI);
}
NS_IMETHODIMP nsHTMLIFrameAccessible::GetDocument(nsIDocument **doc)
{
return nsDocAccessibleMixin::GetDocument(doc);
}
//=============================//
// nsHTMLIFrameRootAccessible //
//=============================//
//-----------------------------------------------------
// construction
//-----------------------------------------------------
nsHTMLIFrameRootAccessible::nsHTMLIFrameRootAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
mOuterNode(aNode), nsRootAccessible(aShell)
{
}
//-----------------------------------------------------
// destruction
//-----------------------------------------------------
nsHTMLIFrameRootAccessible::~nsHTMLIFrameRootAccessible()
{
}
void nsHTMLIFrameRootAccessible::Init()
{
if (!mOuterAccessible) {
nsCOMPtr<nsIDOMDocument> domDoc;
mOuterNode->GetOwnerDocument(getter_AddRefs(domDoc));
nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
if (doc) {
nsCOMPtr<nsIPresShell> parentShell;
doc->GetShellAt(0, getter_AddRefs(parentShell));
if (parentShell) {
nsCOMPtr<nsIContent> content(do_QueryInterface(mOuterNode));
nsIFrame* frame = nsnull;
parentShell->GetPrimaryFrameFor(content, &frame);
NS_ASSERTION(frame, "No outer frame.");
frame->GetAccessible(getter_AddRefs(mOuterAccessible));
NS_ASSERTION(mOuterAccessible, "Something's wrong - there's no accessible for the outer parent of this frame.");
}
}
}
}
/* readonly attribute nsIAccessible accParent; */
NS_IMETHODIMP nsHTMLIFrameRootAccessible::GetAccParent(nsIAccessible * *_retval)
{
Init();
return mOuterAccessible->GetAccParent(_retval);
}
/* nsIAccessible getAccNextSibling (); */
NS_IMETHODIMP nsHTMLIFrameRootAccessible::GetAccNextSibling(nsIAccessible **_retval)
{
Init();
return mOuterAccessible->GetAccNextSibling(_retval);
}
NS_IMETHODIMP nsHTMLIFrameRootAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
{
Init();
return mOuterAccessible->GetAccPreviousSibling(_retval);
}

View File

@@ -0,0 +1,101 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsIFrameRootAccessible_H_
#define _nsIFrameRootAccessible_H_
#include "nsBaseWidgetAccessible.h"
#include "nsRootAccessible.h"
#include "nsAccessible.h"
#include "nsIAccessibleDocument.h"
class nsIWebShell;
class nsIWeakReference;
class nsHTMLIFrameAccessible : public nsBlockAccessible,
public nsIAccessibleDocument,
public nsDocAccessibleMixin
{
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLEDOCUMENT
public:
nsHTMLIFrameAccessible(nsIDOMNode* aNode, nsIAccessible* aRoot, nsIWeakReference* aShell, nsIDocument *doc);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccName(nsAWritableString& aAccName);
NS_IMETHOD GetAccValue(nsAWritableString& AccValue);
NS_IMETHOD GetAccRole(PRUint32 *aAccRole);
NS_IMETHOD GetAccState(PRUint32 *aAccState);
protected:
nsCOMPtr<nsIAccessible> mRootAccessible;
};
class nsHTMLIFrameRootAccessible : public nsRootAccessible
{
NS_DECL_ISUPPORTS_INHERITED
public:
nsHTMLIFrameRootAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
virtual ~nsHTMLIFrameRootAccessible();
/* attribute wstring accName; */
NS_IMETHOD GetAccParent(nsIAccessible * *aAccParent);
/* nsIAccessible getAccNextSibling (); */
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
/* nsIAccessible getAccPreviousSibling (); */
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
protected:
void Init();
// In these variable names, "outer" relates to the nsHTMLIFrameAccessible, as opposed to the
// nsHTMLIFrameRootAccessible which is "inner".
// The outer node is a <browser> or <iframe> tag, whereas the inner node corresponds to the inner document root.
nsCOMPtr<nsIDOMNode> mOuterNode;
nsCOMPtr<nsIAccessible> mOuterAccessible;
};
#endif

View File

@@ -0,0 +1,205 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Aaron Leventhal (aaronl@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsGenericAccessible.h"
#include "nsHTMLImageAccessible.h"
#include "nsReadableUtils.h"
#include "nsAccessible.h"
#include "nsIHTMLDocument.h"
#include "nsIDocument.h"
#include "nsIDOMHTMLCollection.h"
#include "nsIAccessibilityService.h"
#include "nsIServiceManager.h"
#include "imgIRequest.h"
#include "imgIContainer.h"
#include "nsIImageFrame.h"
// --- image -----
nsHTMLImageAccessible::nsHTMLImageAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsLinkableAccessible(aDOMNode, aShell)
{
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(aDOMNode));
nsCOMPtr<nsIDocument> doc;
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (!shell)
return;
shell->GetDocument(getter_AddRefs(doc));
nsAutoString mapElementName;
if (doc && element) {
nsCOMPtr<nsIHTMLDocument> htmlDoc(do_QueryInterface(doc));
element->GetAttribute(NS_LITERAL_STRING("usemap"),mapElementName);
if (htmlDoc && !mapElementName.IsEmpty()) {
if (mapElementName.CharAt(0) == '#')
mapElementName.Cut(0,1);
htmlDoc->GetImageMap(mapElementName, getter_AddRefs(mMapElement));
}
}
}
NS_IMETHODIMP nsHTMLImageAccessible::GetAccState(PRUint32 *_retval)
{
// The state is a bitfield, get our inherited state, then logically OR it with STATE_ANIMATED if this
// is an animated image.
nsLinkableAccessible::GetAccState(_retval);
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
nsIFrame *frame = nsnull;
if (content && shell)
shell->GetPrimaryFrameFor(content, &frame);
nsCOMPtr<nsIImageFrame> imageFrame(do_QueryInterface(frame));
nsCOMPtr<imgIRequest> imageRequest;
if (imageFrame)
imageFrame->GetImageRequest(getter_AddRefs(imageRequest));
nsCOMPtr<imgIContainer> imgContainer;
if (imageRequest)
imageRequest->GetImage(getter_AddRefs(imgContainer));
if (imgContainer) {
PRUint32 numFrames;
imgContainer->GetNumFrames(&numFrames);
if (numFrames > 1)
*_retval |= STATE_ANIMATED;
}
return NS_OK;
}
/* wstring getAccName (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetAccName(nsAWritableString& _retval)
{
nsresult rv = NS_ERROR_FAILURE;
nsCOMPtr<nsIContent> imageContent(do_QueryInterface(mDOMNode));
if (imageContent) {
nsAutoString name;
rv = AppendFlatStringFromContentNode(imageContent, &name);
if (NS_SUCCEEDED(rv)) {
// Temp var needed until CompressWhitespace built for nsAWritableString
name.CompressWhitespace();
_retval.Assign(name);
}
}
return rv;
}
/* wstring getAccRole (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_GRAPHIC;
return NS_OK;
}
nsIAccessible *nsHTMLImageAccessible::CreateAreaAccessible(PRUint32 areaNum)
{
if (!mMapElement)
return nsnull;
if (areaNum == -1) {
PRInt32 numAreaMaps;
GetAccChildCount(&numAreaMaps);
if (numAreaMaps<=0)
return nsnull;
areaNum = NS_STATIC_CAST(PRUint32,numAreaMaps-1);
}
nsIDOMHTMLCollection *mapAreas;
mMapElement->GetAreas(&mapAreas);
if (!mapAreas)
return nsnull;
nsIDOMNode *domNode = nsnull;
mapAreas->Item(areaNum,&domNode);
if (!domNode)
return nsnull;
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
if (!accService)
return nsnull;
if (accService) {
nsIAccessible* acc = nsnull;
accService->CreateHTMLAreaAccessible(mPresShell, domNode, this, &acc);
return acc;
}
return nsnull;
}
/* nsIAccessible getAccFirstChild (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
*_retval = CreateAreaAccessible(0);
return NS_OK;
}
/* nsIAccessible getAccLastChild (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetAccLastChild(nsIAccessible **_retval)
{
*_retval = CreateAreaAccessible(-1);
return NS_OK;
}
/* long getAccChildCount (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 0;
if (mMapElement) {
nsIDOMHTMLCollection *mapAreas;
mMapElement->GetAreas(&mapAreas);
if (mapAreas) {
PRUint32 length;
mapAreas->GetLength(&length);
*_retval = NS_STATIC_CAST(PRInt32, length);
}
}
return NS_OK;
}

View File

@@ -0,0 +1,71 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Aaron Leventhal (aaronl@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsHTMLImageAccessible_H_
#define _nsHTMLImageAccessible_H_
#include "nsAccessible.h"
#include "nsBaseWidgetAccessible.h"
#include "nsIFrame.h"
#include "nsIImageFrame.h"
#include "nsIDOMHTMLMapElement.h"
/* Accessible for supporting images
* supports:
* - gets name, role
* - support basic state
*/
class nsHTMLImageAccessible : public nsLinkableAccessible
{
public:
nsHTMLImageAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAWritableString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
protected:
nsIAccessible *CreateAreaAccessible(PRUint32 areaNum);
nsCOMPtr<nsIDOMHTMLMapElement> mMapElement;
};
#endif

View File

@@ -0,0 +1,79 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Aaron Leventhal (aaronl@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsHTMLLinkAccessible.h"
#include "nsWeakReference.h"
#include "nsIFrame.h"
#include "nsILink.h"
#include "nsILinkHandler.h"
#include "nsISelection.h"
#include "nsISelectionController.h"
#include "nsIPresContext.h"
#include "nsReadableUtils.h"
#include "nsIDOMElement.h"
nsHTMLLinkAccessible::nsHTMLLinkAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
nsLinkableAccessible(aDomNode, aShell)
{
}
/* wstring getAccName (); */
NS_IMETHODIMP nsHTMLLinkAccessible::GetAccName(nsAWritableString& _retval)
{
if (!IsALink()) // Also initializes private data members
return NS_ERROR_FAILURE;
nsAutoString name;
nsresult rv = AppendFlatStringFromSubtree(mLinkContent, &name);
if (NS_SUCCEEDED(rv)) {
// Temp var needed until CompressWhitespace built for nsAWritableString
name.CompressWhitespace();
_retval.Assign(name);
}
return rv;
}
/* unsigned long getAccRole (); */
NS_IMETHODIMP nsHTMLLinkAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_LINK;
return NS_OK;
}

View File

@@ -0,0 +1,55 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Aaron Leventhal (aaronl@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsHTMLLinkAccessible_H_
#define _nsHTMLLinkAccessible_H_
#include "nsAccessible.h"
#include "nsBaseWidgetAccessible.h"
class nsHTMLLinkAccessible : public nsLinkableAccessible
{
public:
nsHTMLLinkAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAWritableString& _retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
};
#endif

View File

@@ -0,0 +1,589 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Original Author: Eric Vaughan (evaughan@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsCOMPtr.h"
#include "nsHTMLSelectAccessible.h"
#include "nsIAccessibilityService.h"
#include "nsIFrame.h"
#include "nsIComboboxControlFrame.h"
#include "nsIDOMEventReceiver.h"
#include "nsIDOMHTMLCollection.h"
#include "nsIDOMHTMLInputElement.h"
#include "nsIDOMHTMLOptionElement.h"
#include "nsIDOMHTMLSelectElement.h"
#include "nsIListControlFrame.h"
#include "nsIServiceManager.h"
#include "nsLayoutAtoms.h"
/**
* Selects, Listboxes and Comboboxes, are made up of a number of different
* widgets, some of which are shared between the two. This file contains
* all of the widgets for both of the Selects, for HTML only. Some of them
* extend classes from nsSelectAccessible.cpp, which contains base classes
* that are also extended by the XUL Select Accessibility support.
*
* Listbox:
* - nsHTMLListboxAccessible
* - nsHTMLSelctListAccessible
* - nsHTMLSelectOptionAccessible
*
* Comboboxes:
* - nsHTMLComboboxAccessilbe
* - nsHTMLComboboxTextFieldAccessible
* - nsHTMLComboboxButtonAccessible
* - nsHTMLComboboxWindowAccessilbe
* - nsHTMLSelctListAccessible
* - nsHTMLSelectOptionAccessible
*/
/** ------------------------------------------------------ */
/** First, the common widgets */
/** ------------------------------------------------------ */
/** ----- nsHTMLSelectListAccessible ----- */
/** Default Constructor */
nsHTMLSelectListAccessible::nsHTMLSelectListAccessible(nsIAccessible* aParent,
nsIDOMNode* aDOMNode,
nsIWeakReference* aShell)
:nsSelectListAccessible(aParent, aDOMNode, aShell)
{
}
/**
* As a nsHTMLSelectListAccessible we can have the following states:
* STATE_MULTISELECTABLE
* STATE_EXTSELECTABLE
*/
NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccState(PRUint32 *_retval)
{
nsCOMPtr<nsIDOMHTMLSelectElement> select (do_QueryInterface(mDOMNode));
if ( select ) {
PRBool multiple;
select->GetMultiple(&multiple);
if ( multiple )
*_retval |= STATE_MULTISELECTABLE | STATE_EXTSELECTABLE;
}
return NS_OK;
}
/**
* Gets the last child of the DOM node and creates and returns
* a nsHTMLSelectOptionAccessible.
*/
NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccLastChild(nsIAccessible **_retval)
{
nsCOMPtr<nsIDOMNode> last;
mDOMNode->GetLastChild(getter_AddRefs(last));
*_retval = new nsHTMLSelectOptionAccessible(this, last, mPresShell);
if ( ! *_retval )
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/**
* Gets the First child of the DOM node and creates and returns
* a nsHTMLSelectOptionAccessible.
*/
NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
nsCOMPtr<nsIDOMNode> first;
mDOMNode->GetFirstChild(getter_AddRefs(first));
*_retval = new nsHTMLSelectOptionAccessible(this, first, mPresShell);
if ( ! *_retval )
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/** ----- nsHTMLSelectOptionAccessible ----- */
/** Default Constructor */
nsHTMLSelectOptionAccessible::nsHTMLSelectOptionAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsSelectOptionAccessible(aParent, aDOMNode, aShell)
{
}
/**
* Gets the next sibling of the DOM node and creates and returns
* a nsHTMLSelectOptionAccessible.
*/
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccNextSibling(nsIAccessible **_retval)
{
*_retval = nsnull;
nsCOMPtr<nsIDOMNode> next;
mDOMNode->GetNextSibling(getter_AddRefs(next));
if (next) {
*_retval = new nsHTMLSelectOptionAccessible(mParent, next, mPresShell);
if ( ! *_retval )
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
}
return NS_OK;
}
/**
* Gets the previous sibling of the DOM node and creates and returns
* a nsHTMLSelectOptionAccessible.
*/
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
{
*_retval = nsnull;
nsCOMPtr<nsIDOMNode> prev;
mDOMNode->GetPreviousSibling(getter_AddRefs(prev));
if (prev) {
*_retval = new nsHTMLSelectOptionAccessible(mParent, prev, mPresShell);
if ( ! *_retval )
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
}
return NS_OK;
}
/**
* As a nsHTMLSelectOptionAccessible we can have the following states:
* STATE_SELECTABLE
* STATE_SELECTED
* STATE_FOCUSED
* STATE_FOCUSABLE
* STATE_INVISIBLE -- not implemented yet
*/
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccState(PRUint32 *_retval)
{
*_retval = 0;
nsCOMPtr<nsIDOMNode> focusedOptionNode, parentNode;
mParent->AccGetDOMNode(getter_AddRefs(parentNode));
// find out if we are the focused node
GetFocusedOptionNode(mPresShell, parentNode, focusedOptionNode);
if (focusedOptionNode == mDOMNode)
*_retval |= STATE_FOCUSED;
// Are we selected?
nsCOMPtr<nsIDOMHTMLOptionElement> option (do_QueryInterface(mDOMNode));
if ( option ) {
PRBool isSelected = PR_FALSE;
option->GetSelected(&isSelected);
if ( isSelected )
*_retval |= STATE_SELECTED;
}
*_retval |= STATE_SELECTABLE | STATE_FOCUSABLE;
return NS_OK;
}
/**
* Helper method for getting the focused DOM Node from our parent(list) node. We
* need to use the frame to get the focused option because for some reason we
* weren't getting the proper notification when the focus changed using the DOM
*/
nsresult nsHTMLSelectOptionAccessible::GetFocusedOptionNode(nsIWeakReference *aPresShell,
nsIDOMNode *aListNode,
nsCOMPtr<nsIDOMNode>& aFocusedOptionNode)
{
NS_ASSERTION(aListNode, "Called GetFocusedOptionNode without a valid list node");
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(aPresShell));
if (!shell)
return NS_ERROR_FAILURE;
nsIFrame *frame = nsnull;
nsCOMPtr<nsIContent> content(do_QueryInterface(aListNode));
shell->GetPrimaryFrameFor(content, &frame);
nsresult rv;
nsCOMPtr<nsIListControlFrame> listFrame(do_QueryInterface(frame, &rv));
if (NS_FAILED(rv))
return rv; // How can list content not have a list frame?
NS_ASSERTION(listFrame, "We don't have a list frame, but rv returned a success code.");
// Get what's focused by asking frame for "selected item".
PRInt32 focusedOptionIndex = 0;
rv = listFrame->GetSelectedIndex(&focusedOptionIndex);
nsCOMPtr<nsIDOMHTMLCollection> options;
// Get options
if (NS_SUCCEEDED(rv)) {
nsCOMPtr<nsIDOMHTMLSelectElement> selectElement(do_QueryInterface(aListNode));
NS_ASSERTION(selectElement, "No select element where it should be");
rv = selectElement->GetOptions(getter_AddRefs(options));
}
// Either use options and focused index, or default to list node itself
if (NS_SUCCEEDED(rv) && options && focusedOptionIndex >= 0) // Something is focused
rv = options->Item(focusedOptionIndex, getter_AddRefs(aFocusedOptionNode));
else { // If no options in list or focusedOptionIndex <0, then we are not focused on an item
aFocusedOptionNode = aListNode; // return normal target content
rv = NS_OK;
}
return rv;
}
/** ------------------------------------------------------ */
/** Secondly, the Listbox widget */
/** ------------------------------------------------------ */
/** ----- nsHTMLListboxAccessible ----- */
/** Constructor */
nsHTMLListboxAccessible::nsHTMLListboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsListboxAccessible(aDOMNode, aShell)
{
}
/** Inherit the ISupports impl from nsAccessible, we handle nsIAccessibleSelectable */
NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLListboxAccessible, nsListboxAccessible, nsIAccessibleSelectable)
/**
* Our last (and only) child is an nsHTMLSelectListAccessible object
*/
NS_IMETHODIMP nsHTMLListboxAccessible::GetAccLastChild(nsIAccessible **_retval)
{
*_retval = new nsHTMLSelectListAccessible(this, mDOMNode, mPresShell);
if ( ! *_retval )
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/**
* Our first (and only) child is an nsHTMLSelectListAccessible object
*/
NS_IMETHODIMP nsHTMLListboxAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
*_retval = new nsHTMLSelectListAccessible(this, mDOMNode, mPresShell);
if ( ! *_retval )
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/**
* Our value is the value of our ( first ) selected child. nsIDOMHTMLSelectElement
* returns this by default with GetValue().
*/
NS_IMETHODIMP nsHTMLListboxAccessible::GetAccValue(nsAWritableString& _retval)
{
nsCOMPtr<nsIDOMHTMLSelectElement> select (do_QueryInterface(mDOMNode));
if ( select ) {
select->GetValue(_retval);
return NS_OK;
}
return NS_ERROR_FAILURE;
}
/**
* nsIAccessibleSelectable method.
* - gets from the Select DOMNode the list of all Select Options
* - iterates through all of the options looking for selected Options
* - creates IAccessible objects for selected Options
* - Returns the IAccessibles for selectd Options in the nsISupportsArray
*
* retval will be nsnull if:
* - there are no Options in the Select Element
* - there are Options but none are selected
* - the DOMNode is not a nsIDOMHTMLSelectElement ( shouldn't happen )
*/
NS_IMETHODIMP nsHTMLListboxAccessible::GetSelectedChildren(nsISupportsArray **_retval)
{
nsCOMPtr<nsIDOMHTMLSelectElement> select(do_QueryInterface(mDOMNode));
if(select) {
nsCOMPtr<nsIDOMHTMLCollection> options;
// get all the options in the select
select->GetOptions(getter_AddRefs(options));
if (options) {
// set up variables we need to get the selected options and to get their nsIAccessile objects
PRUint32 length;
options->GetLength(&length);
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
nsCOMPtr<nsISupportsArray> selectedAccessibles;
NS_NewISupportsArray(getter_AddRefs(selectedAccessibles));
if (!selectedAccessibles || !accService)
return NS_ERROR_FAILURE;
// find the selected options and get the accessible objects;
PRBool isSelected = PR_FALSE;
nsCOMPtr<nsIPresContext> context;
GetPresContext(context);
for (PRUint32 i = 0 ; i < length ; i++) {
nsCOMPtr<nsIDOMNode> tempNode;
options->Item(i,getter_AddRefs(tempNode));
if (tempNode) {
nsCOMPtr<nsIDOMHTMLOptionElement> tempOption(do_QueryInterface(tempNode));
if (tempOption)
tempOption->GetSelected(&isSelected);
if (isSelected) {
nsCOMPtr<nsIAccessible> tempAccess;
accService->CreateHTMLSelectOptionAccessible(tempOption, this, context, getter_AddRefs(tempAccess));
if ( tempAccess )
selectedAccessibles->AppendElement(tempAccess);
isSelected = PR_FALSE;
}
}
}
selectedAccessibles->Count(&length); // reusing length
if ( length != 0 ) { // length of nsISupportsArray containing selected options
*_retval = selectedAccessibles;
NS_IF_ADDREF(*_retval);
return NS_OK;
}
}
}
// no options, not a select or none of the options are selected
*_retval = nsnull;
return NS_OK;
}
/** ------------------------------------------------------ */
/** Finally, the Combobox widgets */
/** ------------------------------------------------------ */
/** ----- nsHTMLComboboxAccessible ----- */
/** Constructor */
nsHTMLComboboxAccessible::nsHTMLComboboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsComboboxAccessible(aDOMNode, aShell)
{
}
/**
* Our last child is an nsHTMLComboboxWindowAccessible object
*/
NS_IMETHODIMP nsHTMLComboboxAccessible::GetAccLastChild(nsIAccessible **_retval)
{
*_retval = new nsHTMLComboboxWindowAccessible(this, mDOMNode, mPresShell);
if (! *_retval)
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/**
* Our last child is an nsHTMLComboboxTextFieldAccessible object
*/
NS_IMETHODIMP nsHTMLComboboxAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
*_retval = new nsHTMLComboboxTextFieldAccessible(this, mDOMNode, mPresShell);
if (! *_retval)
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/**
* Our value is the value of our ( first ) selected child. nsIDOMHTMLSelectElement
* returns this by default with GetValue().
*/
NS_IMETHODIMP nsHTMLComboboxAccessible::GetAccValue(nsAWritableString& _retval)
{
nsCOMPtr<nsIDOMHTMLSelectElement> select (do_QueryInterface(mDOMNode));
if (select) {
select->GetValue(_retval);
return NS_OK;
}
return NS_ERROR_FAILURE;
}
/** ----- nsHTMLComboboxTextFieldAccessible ----- */
/** Constructor */
nsHTMLComboboxTextFieldAccessible::nsHTMLComboboxTextFieldAccessible(nsIAccessible* aParent,
nsIDOMNode* aDOMNode,
nsIWeakReference* aShell):
nsComboboxTextFieldAccessible(aParent, aDOMNode, aShell)
{
}
/**
* Our next sibling is an nsHTMLComboboxButtonAccessible object
*/
NS_IMETHODIMP nsHTMLComboboxTextFieldAccessible::GetAccNextSibling(nsIAccessible **_retval)
{
nsCOMPtr<nsIAccessible> parent;
GetAccParent(getter_AddRefs(parent));
*_retval = new nsHTMLComboboxButtonAccessible(parent, mDOMNode, mPresShell);
if (! *_retval)
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/** -----ComboboxButtonAccessible ----- */
/** Constructor -- cache our parent */
nsHTMLComboboxButtonAccessible::nsHTMLComboboxButtonAccessible(nsIAccessible* aParent,
nsIDOMNode* aDOMNode,
nsIWeakReference* aShell):
nsComboboxButtonAccessible(aParent, aDOMNode, aShell)
{
}
/**
* Programmaticaly click on the button, causing either the display or
* the hiding of the drop down box ( window ).
* Walks the Frame tree and checks for proper frames.
*/
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::AccDoAction(PRUint8 index)
{
nsIFrame* frame = nsAccessible::GetBoundsFrame();
nsCOMPtr<nsIPresContext> context;
GetPresContext(context);
if (!context)
return NS_ERROR_FAILURE;
frame->FirstChild(context, nsnull, &frame);
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::blockFrame))
return NS_ERROR_FAILURE;
#endif
frame->GetNextSibling(&frame);
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::gfxButtonControlFrame))
return NS_ERROR_FAILURE;
#endif
nsCOMPtr<nsIContent> content;
frame->GetContent(getter_AddRefs(content));
// We only have one action, click. Any other index is meaningless(wrong)
if (index == eAction_Click) {
nsCOMPtr<nsIDOMHTMLInputElement> element(do_QueryInterface(content));
if (element)
{
element->Click();
return NS_OK;
}
return NS_ERROR_FAILURE;
}
return NS_ERROR_INVALID_ARG;
}
/**
* Our next sibling is an nsHTMLComboboxWindowAccessible object
*/
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetAccNextSibling(nsIAccessible **_retval)
{
nsCOMPtr<nsIAccessible> parent;
GetAccParent(getter_AddRefs(parent));
*_retval = new nsHTMLComboboxWindowAccessible(parent, mDOMNode, mPresShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
/**
* Our next sibling is an nsHTMLComboboxTextFieldAccessible object
*/
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
{
nsCOMPtr<nsIAccessible> parent;
GetAccParent(getter_AddRefs(parent));
*_retval = new nsHTMLComboboxTextFieldAccessible(parent, mDOMNode, mPresShell);
if (! *_retval)
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/** ----- nsHTMLComboboxWindowAccessible ----- */
/**
* Constructor -- cache our parent
*/
nsHTMLComboboxWindowAccessible::nsHTMLComboboxWindowAccessible(nsIAccessible* aParent,
nsIDOMNode* aDOMNode,
nsIWeakReference* aShell):
nsComboboxWindowAccessible(aParent, aDOMNode, aShell)
{
}
/**
* Our previous sibling is a nsHTMLComboboxButtonAccessible object
*/
NS_IMETHODIMP nsHTMLComboboxWindowAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
{
nsCOMPtr<nsIAccessible> parent;
GetAccParent(getter_AddRefs(parent));
*_retval = new nsHTMLComboboxButtonAccessible(parent, mDOMNode, mPresShell);
if (! *_retval)
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/**
* We only have one child, a list
*/
NS_IMETHODIMP nsHTMLComboboxWindowAccessible::GetAccLastChild(nsIAccessible **_retval)
{
*_retval = new nsHTMLSelectListAccessible(this, mDOMNode, mPresShell);
if (! *_retval)
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/**
* We only have one child, a list
*/
NS_IMETHODIMP nsHTMLComboboxWindowAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
*_retval = new nsHTMLSelectListAccessible(this, mDOMNode, mPresShell);
if (! *_retval)
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}

View File

@@ -0,0 +1,209 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Original Author: Eric Vaughan (evaughan@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef __nsHTMLSelectAccessible_h__
#define __nsHTMLSelectAccessible_h__
#include "nsCOMPtr.h"
#include "nsIAccessibleSelectable.h"
#include "nsIDOMNode.h"
#include "nsIWeakReference.h"
#include "nsSelectAccessible.h"
/**
* Selects, Listboxes and Comboboxes, are made up of a number of different
* widgets, some of which are shared between the two. This file contains
* all of the widgets for both of the Selects, for HTML only. Some of them
* extend classes from nsSelectAccessible.cpp, which contains base classes
* that are also extended by the XUL Select Accessibility support.
*
* Listbox:
* - nsHTMLListboxAccessible
* - nsHTMLSelctListAccessible
* - nsHTMLSelectOptionAccessible
*
* Comboboxes:
* - nsHTMLComboboxAccessilbe
* - nsHTMLComboboxTextFieldAccessible
* - nsHTMLComboboxButtonAccessible
* - nsHTMLComboboxWindowAccessilbe
* - nsHTMLSelectListAccessible
* - nsHTMLSelectOptionAccessible(s)
*/
/** ------------------------------------------------------ */
/** First, the common widgets */
/** ------------------------------------------------------ */
/*
* The list that contains all the options in the select.
*/
class nsHTMLSelectListAccessible : public nsSelectListAccessible
{
public:
nsHTMLSelectListAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsHTMLSelectListAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
};
/*
* Options inside the select, contained within the list
*/
class nsHTMLSelectOptionAccessible : public nsSelectOptionAccessible
{
public:
nsHTMLSelectOptionAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsHTMLSelectOptionAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
static nsresult GetFocusedOptionNode(nsIWeakReference *aPresShell, nsIDOMNode *aListNode, nsCOMPtr<nsIDOMNode>& aFocusedOptionNode);
};
/** ------------------------------------------------------ */
/** Secondly, the Listbox widget */
/** ------------------------------------------------------ */
/*
* A class the represents the HTML Listbox widget.
*/
class nsHTMLListboxAccessible : public nsListboxAccessible,
public nsIAccessibleSelectable
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLESELECTABLE
nsHTMLListboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsHTMLListboxAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccValue(nsAWritableString& _retval);
};
/** ------------------------------------------------------ */
/** Finally, the Combobox widgets */
/** ------------------------------------------------------ */
/*
* A class the represents the HTML Combobox widget.
*/
class nsHTMLComboboxAccessible : public nsComboboxAccessible
{
public:
nsHTMLComboboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsHTMLComboboxAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccValue(nsAWritableString& _retval);
};
/*
* A class the represents the text field in the Select to the left
* of the drop down button
*/
class nsHTMLComboboxTextFieldAccessible : public nsComboboxTextFieldAccessible
{
public:
nsHTMLComboboxTextFieldAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsHTMLComboboxTextFieldAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
};
/**
* A class that represents the button inside the Select to the
* right of the text field
*/
class nsHTMLComboboxButtonAccessible : public nsComboboxButtonAccessible
{
public:
nsHTMLComboboxButtonAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsHTMLComboboxButtonAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD AccDoAction(PRUint8 index);
};
/*
* A class that represents the window that lives to the right
* of the drop down button inside the Select. This is the window
* that is made visible when the button is pressed.
*/
class nsHTMLComboboxWindowAccessible : public nsComboboxWindowAccessible
{
public:
nsHTMLComboboxWindowAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsHTMLComboboxWindowAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
};
#endif

View File

@@ -0,0 +1,67 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Aaron Leventhal (aaronl@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsHTMLTableAccessible.h"
#include "nsWeakReference.h"
#include "nsReadableUtils.h"
nsHTMLTableCellAccessible::nsHTMLTableCellAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
nsBlockAccessible(aDomNode, aShell)
{
}
/* unsigned long getAccRole (); */
NS_IMETHODIMP nsHTMLTableCellAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_CELL;
return NS_OK;
}
nsHTMLTableAccessible::nsHTMLTableAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
nsBlockAccessible(aDomNode, aShell)
{
}
/* unsigned long getAccRole (); */
NS_IMETHODIMP nsHTMLTableAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_TABLE;
return NS_OK;
}

View File

@@ -0,0 +1,61 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Aaron Leventhal (aaronl@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsHTMLTableAccessible_H_
#define _nsHTMLTableAccessible_H_
#include "nsAccessible.h"
#include "nsBaseWidgetAccessible.h"
class nsHTMLTableCellAccessible : public nsBlockAccessible
{
public:
nsHTMLTableCellAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
};
class nsHTMLTableAccessible : public nsBlockAccessible
{
public:
nsHTMLTableAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
};
#endif

View File

@@ -0,0 +1,51 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Eric Vaughan (evaughan@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsHTMLTextAccessible.h"
nsHTMLTextAccessible::nsHTMLTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
nsTextAccessible(aDomNode, aShell)
{
}
/* wstring getAccName (); */
NS_IMETHODIMP nsHTMLTextAccessible::GetAccName(nsAWritableString& _retval)
{
return mDOMNode->GetNodeValue(_retval);
}

View File

@@ -0,0 +1,54 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsHTMLTextAccessible_H_
#define _nsHTMLTextAccessible_H_
#include "nsFormControlAccessible.h"
class nsIWeakReference;
class nsHTMLTextAccessible : public nsTextAccessible
{
public:
nsHTMLTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAWritableString& _retval);
};
#endif

View File

@@ -0,0 +1,3 @@
en-US.jar:
locale/en-US/global/accessible.properties

View File

@@ -0,0 +1,88 @@
#!gmake
#
# The contents of this file are subject to the Netscape 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/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..
MODULE=accessibility
LIBRARY_NAME=accessibility_s
REQUIRES = xpcom \
string \
layout \
content \
content_xul \
widget \
dom \
view \
locale \
intl \
docshell \
webshell \
necko \
htmlparser \
xuldoc \
imglib2 \
gfx \
gfx2 \
uriloader \
timer \
$(NULL)
CPP_OBJS= \
.\$(OBJDIR)\nsAccessible.obj \
.\$(OBJDIR)\nsAccessibilityService.obj \
.\$(OBJDIR)\nsBaseWidgetAccessible.obj \
.\$(OBJDIR)\nsFormControlAccessible.obj \
.\$(OBJDIR)\nsGenericAccessible.obj \
.\$(OBJDIR)\nsHTMLAreaAccessible.obj \
.\$(OBJDIR)\nsHTMLFormControlAccessible.obj \
.\$(OBJDIR)\nsHTMLIFrameRootAccessible.obj \
.\$(OBJDIR)\nsHTMLImageAccessible.obj \
.\$(OBJDIR)\nsHTMLLinkAccessible.obj \
.\$(OBJDIR)\nsHTMLSelectAccessible.obj \
.\$(OBJDIR)\nsHTMLTableAccessible.obj \
.\$(OBJDIR)\nsHTMLTextAccessible.obj \
.\$(OBJDIR)\nsRootAccessible.obj \
.\$(OBJDIR)\nsSelectAccessible.obj \
.\$(OBJDIR)\nsXULFormControlAccessible.obj \
.\$(OBJDIR)\nsXULTextAccessible.obj \
$(NULL)
EXPORTS = \
.\nsRootAccessible.h \
$(NULL)
LINCS= \
-I..\..\layout\html\forms\public \
-I..\..\layout\html\forms\src \
-I..\..\layout\html\base\src \
$(NULL)
include <$(DEPTH)\config\rules.mak>
install:: $(LIBRARY)
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
clobber::
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib

View File

@@ -0,0 +1,791 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Original Author: David W. Hyatt (hyatt@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsIAccessibilityService.h"
#include "nsAccessibilityService.h"
#include "nsAccessible.h"
#include "nsCOMPtr.h"
#include "nsIDocument.h"
#include "nsIPresShell.h"
#include "nsIPresContext.h"
#include "nsIContent.h"
#include "nsIFrame.h"
#include "nsRootAccessible.h"
#include "nsINameSpaceManager.h"
#include "nsLayoutAtoms.h"
#include "nsIDOMNode.h"
#include "nsHTMLTextAccessible.h"
#include "nsITextContent.h"
#include "nsTextFragment.h"
#include "nsHTMLTableAccessible.h"
#include "nsHTMLImageAccessible.h"
#include "nsHTMLAreaAccessible.h"
#include "nsHTMLLinkAccessible.h"
#include "nsHTMLSelectAccessible.h"
#include "nsIDOMHTMLAreaElement.h"
#include "nsHTMLFormControlAccessible.h"
#include "nsIAccessibleProvider.h"
#include "nsILink.h"
#include "nsIDocShellTreeItem.h"
#include "nsIDOMDocument.h"
#include "nsIDOMHTMLOptionElement.h"
#include "nsIDOMXULCheckboxElement.h"
#include "nsXULFormControlAccessible.h"
#include "nsXULTextAccessible.h"
#include "nsString.h"
// IFrame
#include "nsIDocShell.h"
#include "nsHTMLIFrameRootAccessible.h"
/**
* nsAccessibility Service
*/
nsAccessibilityService::nsAccessibilityService()
{
NS_INIT_REFCNT();
}
nsAccessibilityService::~nsAccessibilityService()
{
}
NS_IMPL_THREADSAFE_ISUPPORTS1(nsAccessibilityService, nsIAccessibilityService);
////////////////////////////////////////////////////////////////////////////////
// nsIAccessibilityService methods:
NS_IMETHODIMP
nsAccessibilityService::CreateRootAccessible(nsISupports* aPresContext, nsISupports* aFrame, nsIAccessible **_retval)
{
// XXX - jgaunt - looks like we aren't using this
//nsIFrame* f = NS_STATIC_CAST(nsIFrame*, aFrame);
nsCOMPtr<nsIPresContext> presContext(do_QueryInterface(aPresContext));
NS_ASSERTION(presContext,"Error non prescontext passed to accessible factory!!!");
nsCOMPtr<nsIPresShell> presShell;
presContext->GetShell(getter_AddRefs(presShell));
NS_ASSERTION(presShell,"Error not presshell!!");
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(presShell));
*_retval = new nsRootAccessible(weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
NS_IMETHODIMP
nsAccessibilityService::CreateHTMLComboboxAccessible(nsIDOMNode* aDOMNode, nsISupports* aPresContext, nsIAccessible **_retval)
{
nsCOMPtr<nsIPresContext> presContext(do_QueryInterface(aPresContext));
NS_ASSERTION(presContext,"Error non prescontext passed to accessible factory!!!");
nsCOMPtr<nsIPresShell> presShell;
presContext->GetShell(getter_AddRefs(presShell));
nsCOMPtr<nsIWeakReference> weakShell = do_GetWeakReference(presShell);
*_retval = new nsHTMLComboboxAccessible(aDOMNode, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
NS_IMETHODIMP
nsAccessibilityService::CreateHTMLListboxAccessible(nsIDOMNode* aDOMNode, nsISupports* aPresContext, nsIAccessible **_retval)
{
nsCOMPtr<nsIPresContext> presContext(do_QueryInterface(aPresContext));
NS_ASSERTION(presContext,"Error non prescontext passed to accessible factory!!!");
nsCOMPtr<nsIPresShell> presShell;
presContext->GetShell(getter_AddRefs(presShell));
nsCOMPtr<nsIWeakReference> weakShell = do_GetWeakReference(presShell);
*_retval = new nsHTMLListboxAccessible(aDOMNode, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
NS_IMETHODIMP
nsAccessibilityService::CreateHTMLSelectOptionAccessible(nsIDOMNode* aDOMNode, nsIAccessible *aAccParent, nsISupports* aPresContext, nsIAccessible **_retval)
{
nsCOMPtr<nsIPresContext> presContext(do_QueryInterface(aPresContext));
NS_ASSERTION(presContext,"Error non prescontext passed to accessible factory!!!");
nsCOMPtr<nsIPresShell> presShell;
presContext->GetShell(getter_AddRefs(presShell));
nsCOMPtr<nsIWeakReference> weakShell = do_GetWeakReference(presShell);
*_retval = new nsHTMLSelectOptionAccessible(aAccParent, aDOMNode, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
/* nsIAccessible createHTMLCheckboxAccessible (in nsISupports aPresShell, in nsISupports aFrame); */
NS_IMETHODIMP nsAccessibilityService::CreateHTMLCheckboxAccessible(nsISupports *aFrame, nsIAccessible **_retval)
{
nsIFrame* frame;
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIWeakReference> weakShell;
nsresult rv = GetInfo(aFrame, &frame, getter_AddRefs(weakShell), getter_AddRefs(node));
if (NS_FAILED(rv))
return rv;
*_retval = new nsHTMLCheckboxAccessible(node, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
NS_IMETHODIMP nsAccessibilityService::CreateXULCheckboxAccessible(nsIDOMNode *aNode, nsIAccessible **_retval)
{
nsCOMPtr<nsIWeakReference> weakShell;
GetShellFromNode(aNode, getter_AddRefs(weakShell));
// reusing the HTML accessible widget and enhancing for XUL
*_retval = new nsXULCheckboxAccessible(aNode, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
/* nsIAccessible createHTMRadioButtonAccessible (in nsISupports aPresShell, in nsISupports aFrame); */
NS_IMETHODIMP nsAccessibilityService::CreateHTMLRadioButtonAccessible(nsISupports *aFrame, nsIAccessible **_retval)
{
nsIFrame* frame;
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIWeakReference> weakShell;
nsresult rv = GetInfo(aFrame, &frame, getter_AddRefs(weakShell), getter_AddRefs(node));
if (NS_FAILED(rv))
return rv;
*_retval = new nsHTMLRadioButtonAccessible(node, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
/* nsIAccessible createHTMLButtonAccessible (in nsISupports aPresShell, in nsISupports aFrame); */
NS_IMETHODIMP nsAccessibilityService::CreateHTMLButtonAccessible(nsISupports *aFrame, nsIAccessible **_retval)
{
nsIFrame* frame;
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIWeakReference> weakShell;
nsresult rv = GetInfo(aFrame, &frame, getter_AddRefs(weakShell), getter_AddRefs(node));
if (NS_FAILED(rv))
return rv;
*_retval = new nsHTMLButtonAccessible(node, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
/* nsIAccessible createHTML4ButtonAccessible (in nsISupports aPresShell, in nsISupports aFrame); */
NS_IMETHODIMP nsAccessibilityService::CreateHTML4ButtonAccessible(nsISupports *aFrame, nsIAccessible **_retval)
{
nsIFrame* frame;
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIWeakReference> weakShell;
nsresult rv = GetInfo(aFrame, &frame, getter_AddRefs(weakShell), getter_AddRefs(node));
if (NS_FAILED(rv))
return rv;
*_retval = new nsHTML4ButtonAccessible(node, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
NS_IMETHODIMP nsAccessibilityService::CreateXULButtonAccessible(nsIDOMNode *aNode, nsIAccessible **_retval)
{
nsCOMPtr<nsIWeakReference> weakShell;
GetShellFromNode(aNode, getter_AddRefs(weakShell));
// reusing the HTML accessible widget and enhancing for XUL
*_retval = new nsXULButtonAccessible(aNode, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
/* nsIAccessible createHTMLTextAccessible (in nsISupports aPresShell, in nsISupports aFrame); */
NS_IMETHODIMP nsAccessibilityService::CreateHTMLTextAccessible(nsISupports *aFrame, nsIAccessible **_retval)
{
nsIFrame* frame;
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIWeakReference> weakShell;
nsresult rv = GetInfo(aFrame, &frame, getter_AddRefs(weakShell), getter_AddRefs(node));
if (NS_FAILED(rv))
return rv;
*_retval = nsnull;
nsCOMPtr<nsITextContent> textContent(do_QueryInterface(node));
if (textContent) {
// If empty text string, don't include in accessible tree
// Items with length 0 are already gone, we just need to check for single NBSP's
PRInt32 textLength = 0;
textContent->GetTextLength(&textLength);
if (textLength == 1) {
const PRUnichar NBSP = 160;
const nsTextFragment *textFrag;
nsresult rv = textContent->GetText(&textFrag);
PRUnichar theChar = textFrag->CharAt(0);
if (theChar == NBSP)
return NS_ERROR_FAILURE;
}
}
*_retval = new nsHTMLTextAccessible(node, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
NS_IMETHODIMP nsAccessibilityService::CreateXULTextAccessible(nsIDOMNode *aNode, nsIAccessible **_retval)
{
nsCOMPtr<nsIWeakReference> weakShell;
GetShellFromNode(aNode, getter_AddRefs(weakShell));
// reusing the HTML accessible widget and enhancing for XUL
*_retval = new nsXULTextAccessible(aNode, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
/* nsIAccessible createHTMLTableAccessible (in nsISupports aPresShell, in nsISupports aFrame); */
NS_IMETHODIMP nsAccessibilityService::CreateHTMLTableAccessible(nsISupports *aFrame, nsIAccessible **_retval)
{
nsIFrame* frame;
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIWeakReference> weakShell;
nsresult rv = GetInfo(aFrame, &frame, getter_AddRefs(weakShell), getter_AddRefs(node));
if (NS_FAILED(rv))
return rv;
*_retval = new nsHTMLTableAccessible(node, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
/* nsIAccessible createHTMLTableCellAccessible (in nsISupports aPresShell, in nsISupports aFrame); */
NS_IMETHODIMP nsAccessibilityService::CreateHTMLTableCellAccessible(nsISupports *aFrame, nsIAccessible **_retval)
{
nsIFrame* frame;
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIWeakReference> weakShell;
nsresult rv = GetInfo(aFrame, &frame, getter_AddRefs(weakShell), getter_AddRefs(node));
if (NS_FAILED(rv))
return rv;
*_retval = new nsHTMLTableCellAccessible(node, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
NS_IMETHODIMP nsAccessibilityService::CreateXULImageAccessible(nsIDOMNode *aNode, nsIAccessible **_retval)
{
// Don't include nameless images in accessible tree
*_retval = nsnull;
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(aNode));
if (NS_WARN_IF_FALSE(elt, "No DOM element or node!"))
return NS_ERROR_FAILURE;
PRBool hasTextEquivalent;
elt->HasAttribute(NS_LITERAL_STRING("tooltiptext"), &hasTextEquivalent); // Prefer value over tooltiptext
if (!hasTextEquivalent) {
return NS_OK;
}
nsCOMPtr<nsIWeakReference> weakShell;
GetShellFromNode(aNode, getter_AddRefs(weakShell));
*_retval = new nsHTMLImageAccessible(aNode, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
/* nsIAccessible createHTMLImageAccessible (in nsISupports aPresShell, in nsISupports aFrame); */
NS_IMETHODIMP nsAccessibilityService::CreateHTMLImageAccessible(nsISupports *aFrame, nsIAccessible **_retval)
{
nsIFrame* frame;
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIWeakReference> weakShell;
nsresult rv = GetInfo(aFrame, &frame, getter_AddRefs(weakShell), getter_AddRefs(node));
if (NS_FAILED(rv))
return rv;
*_retval = new nsHTMLImageAccessible(node, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
/* nsIAccessible createHTMLAreaAccessible (in nsISupports aPresShell, in nsISupports aFrame); */
NS_IMETHODIMP nsAccessibilityService::CreateHTMLAreaAccessible(nsIWeakReference *aShell, nsIDOMNode *aDOMNode, nsIAccessible *aAccParent,
nsIAccessible **_retval)
{
*_retval = new nsHTMLAreaAccessible(aDOMNode, aAccParent, aShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
/* nsIAccessible createHTMLTextFieldAccessible (in nsISupports aPresShell, in nsISupports aFrame); */
NS_IMETHODIMP nsAccessibilityService::CreateHTMLTextFieldAccessible(nsISupports *aFrame, nsIAccessible **_retval)
{
nsIFrame* frame;
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIWeakReference> weakShell;
nsresult rv = GetInfo(aFrame, &frame, getter_AddRefs(weakShell), getter_AddRefs(node));
if (NS_FAILED(rv))
return rv;
*_retval = new nsHTMLTextFieldAccessible(node, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
NS_IMETHODIMP nsAccessibilityService::GetShellFromNode(nsIDOMNode *aNode, nsIWeakReference **aWeakShell)
{
nsCOMPtr<nsIDOMDocument> domDoc;
aNode->GetOwnerDocument(getter_AddRefs(domDoc));
nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
if (!doc)
return NS_ERROR_INVALID_ARG;
// ---- Get the pres shell ----
nsCOMPtr<nsIPresShell> shell;
doc->GetShellAt(0, getter_AddRefs(shell));
if (!shell)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIWeakReference> weakRef(do_GetWeakReference(shell));
*aWeakShell = weakRef;
NS_IF_ADDREF(*aWeakShell);
return NS_OK;
}
NS_IMETHODIMP nsAccessibilityService::GetInfo(nsISupports* aFrame, nsIFrame** aRealFrame, nsIWeakReference** aShell, nsIDOMNode** aNode)
{
NS_ASSERTION(aFrame,"Error -- 1st argument (aFrame) is null!!");
*aRealFrame = NS_STATIC_CAST(nsIFrame*, aFrame);
nsCOMPtr<nsIContent> content;
(*aRealFrame)->GetContent(getter_AddRefs(content));
nsCOMPtr<nsIDOMNode> node(do_QueryInterface(content));
if (!content || !node)
return NS_ERROR_FAILURE;
*aNode = node;
NS_IF_ADDREF(*aNode);
nsCOMPtr<nsIDocument> document;
content->GetDocument(*getter_AddRefs(document));
if (!document)
return NS_ERROR_FAILURE;
#ifdef DEBUG
PRInt32 shells = document->GetNumberOfShells();
NS_ASSERTION(shells > 0,"Error no shells!");
#endif
// do_GetWR only works into a |nsCOMPtr| :-(
nsCOMPtr<nsIPresShell> tempShell;
nsCOMPtr<nsIWeakReference> weakShell;
document->GetShellAt(0, getter_AddRefs(tempShell));
weakShell = do_GetWeakReference(tempShell);
NS_IF_ADDREF(*aShell = weakShell);
return NS_OK;
}
NS_IMETHODIMP
nsAccessibilityService::CreateAccessible(nsIDOMNode* aDOMNode, nsISupports* aDocument, nsIAccessible **_retval)
{
nsCOMPtr<nsIDocument> document (do_QueryInterface(aDocument));
if (!document)
return NS_ERROR_FAILURE;
#ifdef DEBUG
PRInt32 shells = document->GetNumberOfShells();
NS_ASSERTION(shells > 0,"Error no shells!");
#endif
nsCOMPtr<nsIPresShell> tempShell;
document->GetShellAt(0, getter_AddRefs(tempShell));
nsCOMPtr<nsIWeakReference> weakShell = do_GetWeakReference(tempShell);
*_retval = new nsAccessible(aDOMNode, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
NS_IMETHODIMP
nsAccessibilityService::CreateHTMLBlockAccessible(nsIDOMNode* aDOMNode, nsISupports* aDocument, nsIAccessible **_retval)
{
nsCOMPtr<nsIDocument> document (do_QueryInterface(aDocument));
if (!document)
return NS_ERROR_FAILURE;
#ifdef DEBUG
PRInt32 shells = document->GetNumberOfShells();
NS_ASSERTION(shells > 0,"Error no shells!");
#endif
nsCOMPtr<nsIPresShell> tempShell;
document->GetShellAt(0, getter_AddRefs(tempShell));
nsCOMPtr<nsIWeakReference> weakShell = do_GetWeakReference(tempShell);
*_retval = new nsAccessible(aDOMNode, weakShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
NS_IMETHODIMP
nsAccessibilityService::CreateHTMLIFrameAccessible(nsIDOMNode* aDOMNode, nsISupports* aPresContext, nsIAccessible **_retval)
{
*_retval = nsnull;
nsCOMPtr<nsIContent> content(do_QueryInterface(aDOMNode));
NS_ASSERTION(content,"Error non nsIContent passed to accessible factory!!!");
nsCOMPtr<nsIPresContext> presContext(do_QueryInterface(aPresContext));
NS_ASSERTION(presContext,"Error non prescontext passed to accessible factory!!!");
nsCOMPtr<nsIPresShell> presShell;
presContext->GetShell(getter_AddRefs(presShell));
NS_ASSERTION(presShell,"Error non PresShell passed to accessible factory!!!");
nsCOMPtr<nsIWeakReference> weakRef = do_GetWeakReference(presShell);
nsCOMPtr<nsIDocument> doc;
if (NS_SUCCEEDED(content->GetDocument(*getter_AddRefs(doc))) && doc) {
nsCOMPtr<nsIPresShell> presShell;
doc->GetShellAt(0, getter_AddRefs(presShell));
if (presShell) {
nsCOMPtr<nsISupports> supps;
presShell->GetSubShellFor(content, getter_AddRefs(supps));
if (supps) {
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(supps));
if (docShell) {
nsCOMPtr<nsIPresShell> ps;
docShell->GetPresShell(getter_AddRefs(ps));
if (ps) {
nsCOMPtr<nsIWeakReference> wr = do_GetWeakReference(ps);
nsCOMPtr<nsIDocument> innerDoc;
ps->GetDocument(getter_AddRefs(innerDoc));
if (innerDoc) {
nsCOMPtr<nsIAccessible> root = new nsHTMLIFrameRootAccessible(aDOMNode, wr);
if ( root ) {
nsHTMLIFrameAccessible* frameAcc = new nsHTMLIFrameAccessible(aDOMNode, root, weakRef, innerDoc);
if ( frameAcc != nsnull ) {
*_retval = NS_STATIC_CAST(nsIAccessible*, frameAcc);
if ( *_retval ) {
NS_ADDREF(*_retval);
return NS_OK;
}
}
}
}
}
}
}
}
}
return NS_ERROR_FAILURE;
}
void nsAccessibilityService::GetOwnerFor(nsIPresShell *aPresShell, nsIPresShell **aOwnerShell, nsIContent **aOwnerContent)
{
nsCOMPtr<nsIPresContext> presContext;
aPresShell->GetPresContext(getter_AddRefs(presContext));
if (!presContext)
return;
nsCOMPtr<nsISupports> pcContainer;
presContext->GetContainer(getter_AddRefs(pcContainer));
if (!pcContainer)
return;
nsCOMPtr<nsISupports> docShellSupports(do_QueryInterface(pcContainer));
nsCOMPtr<nsIDocShellTreeItem> treeItem(do_QueryInterface(pcContainer));
if (!treeItem)
return;
// Get Parent Doc
nsCOMPtr<nsIDocShellTreeItem> treeItemParent;
treeItem->GetParent(getter_AddRefs(treeItemParent));
if (!treeItemParent)
return;
nsCOMPtr<nsIDocShell> parentDS(do_QueryInterface(treeItemParent));
if (!parentDS)
return;
nsCOMPtr<nsIPresShell> parentPresShell;
parentDS->GetPresShell(getter_AddRefs(parentPresShell));
if (!parentPresShell)
return;
nsCOMPtr<nsIDocument> parentDoc;
parentPresShell->GetDocument(getter_AddRefs(parentDoc));
if (!parentDoc)
return;
nsCOMPtr<nsIContent> rootContent;
parentDoc->GetRootContent(getter_AddRefs(rootContent));
nsCOMPtr<nsIContent> tempContent;
parentPresShell->FindContentForShell(docShellSupports, getter_AddRefs(tempContent));
if (tempContent) {
*aOwnerContent = tempContent;
*aOwnerShell = parentPresShell;
NS_ADDREF(*aOwnerShell);
NS_ADDREF(*aOwnerContent);
}
}
/**
* GetAccessibleFor - get an nsIAccessible from a DOM node
*/
NS_IMETHODIMP nsAccessibilityService::GetAccessibleFor(nsIDOMNode *aNode,
nsIAccessible **_retval)
{
*_retval = nsnull;
if (!aNode)
return NS_ERROR_NULL_POINTER;
nsCOMPtr<nsIAccessible> newAcc;
nsCOMPtr<nsIAccessibleProvider> accProv(do_QueryInterface(aNode));
if (accProv) {
accProv->GetAccessible(getter_AddRefs(newAcc));
if (newAcc) {
*_retval = newAcc;
NS_ADDREF(*_retval);
return NS_OK;
}
}
// ---- Get the document for this node ----
nsCOMPtr<nsIDocument> doc;
nsCOMPtr<nsIDocument> nodeIsDoc(do_QueryInterface(aNode));
if (nodeIsDoc)
doc = nodeIsDoc;
else {
nsCOMPtr<nsIDOMDocument> domDoc;
aNode->GetOwnerDocument(getter_AddRefs(domDoc));
if (!domDoc)
return NS_ERROR_INVALID_ARG;
doc = do_QueryInterface(domDoc);
}
if (!doc)
return NS_ERROR_INVALID_ARG;
// ---- Get the pres shell ----
nsCOMPtr<nsIPresShell> shell;
doc->GetShellAt(0, getter_AddRefs(shell));
if (!shell)
return NS_ERROR_FAILURE;
// ---- Check if area node ----
nsCOMPtr<nsIDOMHTMLAreaElement> areaContent(do_QueryInterface(aNode));
if (areaContent) // Area elements are implemented in nsHTMLImageAccessible as children of the image
return NS_ERROR_FAILURE; // Return, otherwise the image frame looks like an accessible object in the wrong place
// ---- Check if we need outer owning doc ----
nsCOMPtr<nsIContent> content(do_QueryInterface(aNode));
if (!content && nodeIsDoc) {
// This happens when we're on the document node, which will not QI to an nsIContent,
// When that happens, we try to get the outer, parent document node that contains the document
// For example, a <browser> or <iframe> element
nsCOMPtr<nsIPresShell> ownerShell;
nsCOMPtr<nsIContent> ownerContent;
GetOwnerFor(shell, getter_AddRefs(ownerShell), getter_AddRefs(ownerContent));
if (content) {
shell = ownerShell;
content = ownerContent;
}
else {
doc->GetRootContent(getter_AddRefs(content));
nsIFrame* frame = nsnull;
shell->GetPrimaryFrameFor(content, &frame);
if (!frame)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIPresContext> presContext;
shell->GetPresContext(getter_AddRefs(presContext));
CreateRootAccessible(presContext, frame, getter_AddRefs(newAcc));
*_retval = newAcc;
NS_ADDREF(*_retval);
return NS_OK;
}
}
// ---- If still no nsIContent, return ----
if (!content)
return NS_ERROR_FAILURE;
// ---- Try using frame to get IAccessible ----
nsIFrame* frame = nsnull;
shell->GetPrimaryFrameFor(content, &frame);
if (!frame)
return NS_ERROR_FAILURE;
frame->GetAccessible(getter_AddRefs(newAcc));
// ---- If link, create link accessible ----
if (!newAcc) {
// is it a link?
nsCOMPtr<nsILink> link(do_QueryInterface(aNode));
if (link) {
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(shell));
newAcc = new nsHTMLLinkAccessible(aNode, weakShell);
}
}
// ---- If <select> option, create select option accessible
if (!newAcc) {
nsCOMPtr<nsIDOMHTMLOptionElement> optionElement(do_QueryInterface(aNode));
if (optionElement) {
// nsHTMLSelectionOptionAccessible's must be created via the parent
nsCOMPtr<nsIDOMNode> parentNode;
aNode->GetParentNode(getter_AddRefs(parentNode));
if (parentNode) {
nsCOMPtr<nsIAccessible> parentAccessible;
GetAccessibleFor(parentNode, getter_AddRefs(parentAccessible));
if (parentAccessible) {
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(shell));
newAcc = new nsHTMLSelectOptionAccessible(parentAccessible, aNode, weakShell);
}
}
}
}
if (!newAcc)
return NS_ERROR_FAILURE;
*_retval = newAcc;
NS_ADDREF(*_retval);
return NS_OK;
}
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
nsresult
NS_NewAccessibilityService(nsIAccessibilityService** aResult)
{
NS_PRECONDITION(aResult != nsnull, "null ptr");
if (! aResult)
return NS_ERROR_NULL_POINTER;
nsAccessibilityService* accService = new nsAccessibilityService();
if (!accService)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(accService);
*aResult = accService;
return NS_OK;
}

View File

@@ -0,0 +1,74 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Original Author: David W. Hyatt (hyatt@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef __nsAccessibilityService_h__
#define __nsAccessibilityService_h__
#include "nsIAccessibilityService.h"
#include "nsIContent.h"
#include "nsIPresShell.h"
#include "nsIDocShell.h"
class nsIFrame;
class nsIWeakReference;
class nsIDOMNode;
class nsAccessibilityService : public nsIAccessibilityService
{
public:
NS_DECL_ISUPPORTS
// nsIAccessibilityService methods:
NS_DECL_NSIACCESSIBILITYSERVICE
// nsAccessibilityService methods:
nsAccessibilityService();
virtual ~nsAccessibilityService();
public:
private:
NS_IMETHOD GetInfo(nsISupports* aFrame, nsIFrame** aRealFrame, nsIWeakReference** aShell, nsIDOMNode** aContent);
NS_IMETHOD GetShellFromNode(nsIDOMNode *aNode, nsIWeakReference **weakShell);
void GetOwnerFor(nsIPresShell *aPresShell, nsIPresShell **aOwnerShell, nsIContent **aOwnerContent);
nsIContent* FindContentForDocShell(nsIPresShell* aPresShell, nsIContent* aContent, nsIDocShell* aDocShell);
};
#endif /* __nsIAccessibilityService_h__ */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,151 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* John Gaunt (jgaunt@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsAccessible_H_
#define _nsAccessible_H_
#include "nsCOMPtr.h"
#include "nsGenericAccessible.h"
#include "nsIAccessible.h"
#include "nsIDOMNode.h"
#include "nsIFocusController.h"
#include "nsIPresContext.h"
#include "nsIPresShell.h"
#include "nsPoint.h"
#include "nsRect.h"
#include "nsWeakReference.h"
#include "nsIDOMNodeList.h"
#include "nsIBindingManager.h"
#define ACCESSIBLE_BUNDLE_URL "chrome://global/locale/accessible.properties"
class nsIContent;
class nsIDocShell;
class nsIFrame;
class nsIWebShell;
enum { eSiblingsUninitialized = -1, eSiblingsWalkNormalDOM = -2}; // Used in sibling index field as flags
class nsAccessible : public nsGenericAccessible
{
public:
// to eliminate the confusion of "magic numbers" -- if ( 0 ){ foo; }
enum { eAction_Switch=0, eAction_Jump=0, eAction_Click=0 };
// how many actions
enum { eNo_Action=0, eSingle_Action=1 };
NS_IMETHOD GetAccName(nsAWritableString& _retval);
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccFocused(nsIAccessible **_retval);
NS_IMETHOD AccGetAt(PRInt32 x, PRInt32 y, nsIAccessible **_retval);
NS_IMETHOD AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height);
NS_IMETHOD AccRemoveSelection(void);
NS_IMETHOD AccTakeSelection(void);
NS_IMETHOD AccTakeFocus(void);
NS_IMETHOD AccGetDOMNode(nsIDOMNode **_retval);
public:
nsAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
virtual ~nsAccessible();
virtual void GetListAtomForFrame(nsIFrame* aFrame, nsIAtom*& aList) { aList = nsnull; }
// Helper Routines for Sub-Docs
static nsresult GetDocShellObjects(nsIDocShell* aDocShell,
nsIPresShell** aPresShell,
nsIPresContext** aPresContext,
nsIContent** aContent);
static nsresult GetDocShells(nsIPresShell* aPresShell,
nsIDocShell** aDocShell,
nsIDocShell** aParentDocShell);
static nsresult GetParentPresShellAndContent(nsIPresShell* aPresShell,
nsIPresShell** aParentPresShell,
nsIContent** aSubShellContent);
static PRBool FindContentForWebShell(nsIPresShell* aParentPresShell,
nsIContent* aParentContent,
nsIWebShell* aWebShell,
nsIContent** aFoundContent);
nsresult CalcOffset(nsIFrame* aFrame,
nsIPresContext * aPresContext,
nsRect& aRect);
nsresult GetAbsPosition(nsIPresShell* aPresShell, nsPoint& aPoint);
nsresult GetAbsoluteFramePosition(nsIPresContext* aPresContext,
nsIFrame *aFrame,
nsRect& aAbsoluteTwipsRect,
nsRect& aAbsolutePixelRect);
static nsresult GetTranslatedString(PRUnichar *aKey, nsAWritableString *aStringOut);
// helper method to verify frames
static PRBool IsCorrectFrameType(nsIFrame* aFrame, nsIAtom* aAtom);
protected:
NS_IMETHOD AppendLabelText(nsIDOMNode *aLabelNode, nsAWritableString& _retval);
NS_IMETHOD AppendLabelFor(nsIContent *aLookNode, nsAReadableString *aId, nsAWritableString *aLabel);
NS_IMETHOD GetHTMLAccName(nsAWritableString& _retval);
NS_IMETHOD GetXULAccName(nsAWritableString& _retval);
protected:
virtual nsIFrame* GetFrame();
virtual nsIFrame* GetBoundsFrame();
virtual void GetBounds(nsRect& aRect, nsIFrame** aRelativeFrame);
virtual void GetPresContext(nsCOMPtr<nsIPresContext>& aContext);
PRBool IsEntirelyVisible();
NS_IMETHOD AppendFlatStringFromSubtree(nsIContent *aContent, nsAWritableString *aFlatString);
NS_IMETHOD AppendFlatStringFromContentNode(nsIContent *aContent, nsAWritableString *aFlatString);
NS_IMETHOD AppendStringWithSpaces(nsAWritableString *aFlatString, nsAReadableString& textEquivalent);
NS_IMETHOD GetFocusedElement(nsIDOMElement **aFocusedElement);
NS_IMETHOD CacheOptimizations(nsIAccessible *aParent, PRInt32 aSiblingIndex, nsIDOMNodeList *aSiblingList);
// Data Members
nsCOMPtr<nsIDOMNode> mDOMNode;
nsCOMPtr<nsIWeakReference> mPresShell;
nsCOMPtr<nsIAccessible> mParent;
nsCOMPtr<nsIDOMNodeList> mSiblingList; // If some of our computed siblings are anonymous content nodes, cache node list
PRInt32 mSiblingIndex; // Cache where we are in list of kids that we got from nsIBindingManager::GetContentList(parentContent)
};
#endif

View File

@@ -0,0 +1,410 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* John Gaunt (jgaunt@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsAccessible.h"
#include "nsBaseWidgetAccessible.h"
#include "nsCOMPtr.h"
#include "nsGUIEvent.h"
#include "nsIContent.h"
#include "nsIDOMElement.h"
#include "nsIDOMEventReceiver.h"
#include "nsIFrame.h"
#include "nsILink.h"
#include "nsIPresContext.h"
#include "nsIPresShell.h"
#include "nsISelection.h"
#include "nsISelectionController.h"
// ------------
// nsBlockAccessible
// ------------
nsBlockAccessible::nsBlockAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):nsAccessible(aNode, aShell)
{
}
/* nsIAccessible accGetAt (in long x, in long y); */
NS_IMETHODIMP nsBlockAccessible::AccGetAt(PRInt32 tx, PRInt32 ty, nsIAccessible **_retval)
{
// We're going to find the child that contains coordinates (tx,ty)
PRInt32 x,y,w,h;
AccGetBounds(&x,&y,&w,&h); // Get bounds for this accessible
if (tx > x && tx < x + w && ty > y && ty < y + h)
{
// It's within this nsIAccessible, let's drill down
nsCOMPtr<nsIAccessible> child;
nsCOMPtr<nsIAccessible> smallestChild;
PRInt32 smallestArea = -1;
nsCOMPtr<nsIAccessible> next;
GetAccFirstChild(getter_AddRefs(child));
PRInt32 cx,cy,cw,ch; // Child bounds
while(child) {
child->AccGetBounds(&cx,&cy,&cw,&ch);
// ok if there are multiple frames the contain the point
// and they overlap then pick the smallest. We need to do this
// for text frames.
// For example, A point that's in block #2 is also in block #1, but we want to return #2:
//
// [[block #1 is long wrapped text that continues to
// another line]] [[here is a shorter block #2]]
if (tx > cx && tx < cx + cw && ty > cy && ty < cy + ch)
{
if (smallestArea == -1 || cw*ch < smallestArea) {
smallestArea = cw*ch;
smallestChild = child;
}
}
child->GetAccNextSibling(getter_AddRefs(next));
child = next;
}
if (smallestChild != nsnull)
{
*_retval = smallestChild;
NS_ADDREF(*_retval);
return NS_OK;
}
*_retval = this;
NS_ADDREF(this);
return NS_OK;
}
*_retval = nsnull;
return NS_OK;
}
/**
* nsContainerAccessible
*/
nsContainerAccessible::nsContainerAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsAccessible(aNode, aShell)
{
}
/** no actions */
NS_IMETHODIMP nsContainerAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eNo_Action;
return NS_OK;
}
/** no actions */
NS_IMETHODIMP nsContainerAccessible::GetAccActionName(PRUint8 index, nsAWritableString& _retval)
{
return NS_OK;
}
/** no actions */
NS_IMETHODIMP nsContainerAccessible::AccDoAction(PRUint8 index)
{
return NS_OK;
}
/** no state -- normal */
NS_IMETHODIMP nsContainerAccessible::GetAccState(PRUint32 *_retval)
{
*_retval = 0;
return NS_OK;
}
/** no value */
NS_IMETHODIMP nsContainerAccessible::GetAccValue(nsAWritableString& _retval)
{
return NS_OK;
}
/** no name*/
NS_IMETHODIMP nsContainerAccessible::GetAccName(nsAWritableString& _retval)
{
return NS_OK;
}
//-------------
// nsLeafFrameAccessible
//-------------
nsLeafAccessible::nsLeafAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsAccessible(aNode, aShell)
{
}
/* nsIAccessible getAccFirstChild (); */
NS_IMETHODIMP nsLeafAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/* nsIAccessible getAccLastChild (); */
NS_IMETHODIMP nsLeafAccessible::GetAccLastChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/* long getAccChildCount (); */
NS_IMETHODIMP nsLeafAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 0;
return NS_OK;
}
//----------------
// nsLinkableAccessible
//----------------
nsLinkableAccessible::nsLinkableAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsAccessible(aNode, aShell), mIsALinkCached(PR_FALSE), mLinkContent(nsnull), mIsLinkVisited(PR_FALSE)
{
}
/* long GetAccState (); */
NS_IMETHODIMP nsLinkableAccessible::GetAccState(PRUint32 *_retval)
{
nsAccessible::GetAccState(_retval);
*_retval |= STATE_READONLY | STATE_SELECTABLE;
if (IsALink()) {
*_retval |= STATE_LINKED;
if (mIsLinkVisited)
*_retval |= STATE_TRAVERSED;
}
// Get current selection and find out if current node is in it
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (!shell) {
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIPresContext> context;
shell->GetPresContext(getter_AddRefs(context));
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
nsIFrame *frame;
if (content && NS_SUCCEEDED(shell->GetPrimaryFrameFor(content, &frame))) {
nsCOMPtr<nsISelectionController> selCon;
frame->GetSelectionController(context,getter_AddRefs(selCon));
if (selCon) {
nsCOMPtr<nsISelection> domSel;
selCon->GetSelection(nsISelectionController::SELECTION_NORMAL, getter_AddRefs(domSel));
if (domSel) {
PRBool isSelected = PR_FALSE, isCollapsed = PR_TRUE;
domSel->ContainsNode(mDOMNode, PR_TRUE, &isSelected);
domSel->GetIsCollapsed(&isCollapsed);
if (isSelected && !isCollapsed)
*_retval |=STATE_SELECTED;
}
}
}
// Focused? Do we implement that here or up the chain?
return NS_OK;
}
NS_IMETHODIMP nsLinkableAccessible::GetAccValue(nsAWritableString& _retval)
{
if (IsALink()) {
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(mLinkContent));
if (elt)
return elt->GetAttribute(NS_LITERAL_STRING("href"), _retval);
}
return NS_ERROR_FAILURE;
}
/* PRUint8 getAccNumActions (); */
NS_IMETHODIMP nsLinkableAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
}
/* wstring getAccActionName (in PRUint8 index); */
NS_IMETHODIMP nsLinkableAccessible::GetAccActionName(PRUint8 index, nsAWritableString& _retval)
{
// Action 0 (default action): Jump to link
if (index == eAction_Jump) {
if (IsALink()) {
_retval = NS_LITERAL_STRING("jump");
return NS_OK;
}
}
return NS_ERROR_FAILURE;
}
/* void accDoAction (in PRUint8 index); */
NS_IMETHODIMP nsLinkableAccessible::AccDoAction(PRUint8 index)
{
// Action 0 (default action): Jump to link
if (index == 0) {
if (IsALink()) {
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (!shell) {
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIPresContext> presContext;
shell->GetPresContext(getter_AddRefs(presContext));
if (presContext) {
nsMouseEvent linkClickEvent;
linkClickEvent.eventStructType = NS_EVENT;
linkClickEvent.message = NS_MOUSE_LEFT_CLICK;
linkClickEvent.isShift = PR_FALSE;
linkClickEvent.isControl = PR_FALSE;
linkClickEvent.isAlt = PR_FALSE;
linkClickEvent.isMeta = PR_FALSE;
linkClickEvent.clickCount = 0;
linkClickEvent.widget = nsnull;
nsEventStatus eventStatus = nsEventStatus_eIgnore;
mLinkContent->HandleDOMEvent(presContext,
&linkClickEvent,
nsnull,
NS_EVENT_FLAG_INIT,
&eventStatus);
return NS_OK;
}
}
}
return NS_ERROR_FAILURE;
}
PRBool nsLinkableAccessible::IsALink()
{
if (mIsALinkCached) // Cached answer?
return mLinkContent? PR_TRUE: PR_FALSE;
nsCOMPtr<nsIContent> walkUpContent(do_QueryInterface(mDOMNode));
if (walkUpContent) {
nsCOMPtr<nsIContent> tempContent = walkUpContent;
while (walkUpContent) {
nsCOMPtr<nsILink> link(do_QueryInterface(walkUpContent));
if (link) {
mLinkContent = tempContent;
mIsALinkCached = PR_TRUE;
nsLinkState linkState;
link->GetLinkState(linkState);
if (linkState == eLinkState_Visited)
mIsLinkVisited = PR_TRUE;
return PR_TRUE;
}
walkUpContent->GetParent(*getter_AddRefs(tempContent));
walkUpContent = tempContent;
}
}
mIsALinkCached = PR_TRUE; // Cached that there is no link
return PR_FALSE;
}
// ------------
// nsMenuListenerAccessible
// ------------
NS_IMPL_ISUPPORTS_INHERITED1(nsMenuListenerAccessible, nsAccessible, nsIDOMXULListener)
nsMenuListenerAccessible::nsMenuListenerAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsAccessible(aDOMNode, aShell)
{
mRegistered = PR_FALSE;
mOpen = PR_FALSE;
}
nsMenuListenerAccessible::~nsMenuListenerAccessible()
{
if (mRegistered) {
nsCOMPtr<nsIDOMEventReceiver> eventReceiver(do_QueryInterface(mDOMNode));
if (eventReceiver)
eventReceiver->RemoveEventListener(NS_LITERAL_STRING("popupshowing"), this, PR_TRUE);
}
}
NS_IMETHODIMP nsMenuListenerAccessible::PopupShowing(nsIDOMEvent* aEvent)
{
mOpen = PR_TRUE;
/* TBD send state change event */
return NS_OK;
}
NS_IMETHODIMP nsMenuListenerAccessible::PopupHiding(nsIDOMEvent* aEvent)
{
mOpen = PR_FALSE;
/* TBD send state change event */
return NS_OK;
}
NS_IMETHODIMP nsMenuListenerAccessible::Close(nsIDOMEvent* aEvent)
{
mOpen = PR_FALSE;
/* TBD send state change event */
return NS_OK;
}
void
nsMenuListenerAccessible::SetupMenuListener()
{
// if not already one, register ourselves as a popup listener
if (!mRegistered) {
nsCOMPtr<nsIDOMEventReceiver> eventReceiver(do_QueryInterface(mDOMNode));
if (!eventReceiver) {
return;
}
nsresult rv = eventReceiver->AddEventListener(NS_LITERAL_STRING("popupshowing"), this, PR_TRUE);
if (NS_FAILED(rv)) {
return;
}
mRegistered = PR_TRUE;
}
}

View File

@@ -0,0 +1,148 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* John Gaunt (jgaunt@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsBaseWidgetAccessible_H_
#define _nsBaseWidgetAccessible_H_
#include "nsAccessible.h"
#include "nsCOMPtr.h"
#include "nsIContent.h"
#include "nsIDOMNode.h"
#include "nsIDOMXULListener.h"
/**
* This file contains a number of classes that are used as base
* classes for the different accessibility implementations of
* the HTML and XUL widget sets. --jgaunt
*/
/**
* Special Accessible that knows how to handle hit detection for flowing text
*/
class nsBlockAccessible : public nsAccessible
{
public:
nsBlockAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD AccGetAt(PRInt32 x, PRInt32 y, nsIAccessible **_retval);
};
/**
* Special Accessible that just contains other accessible objects
* no actions, no name, no state, no value
*/
class nsContainerAccessible : public nsAccessible
{
public:
nsContainerAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAWritableString& _retval);
NS_IMETHOD GetAccName(nsAWritableString& _retval);
};
/**
* Leaf version of DOM Accessible -- has no children
*/
class nsLeafAccessible : public nsAccessible
{
public:
nsLeafAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
};
/**
* A type of accessible for DOM nodes containing an href="" attribute.
* It knows how to report the state of the link ( traveled or not )
* and can activate ( click ) the link programmatically.
*/
class nsLinkableAccessible : public nsAccessible
{
public:
nsLinkableAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAWritableString& _retval);
protected:
PRBool IsALink();
PRBool mIsALinkCached; // -1 = unknown, 0 = not a link, 1 = is a link
nsCOMPtr<nsIContent> mLinkContent;
PRBool mIsLinkVisited;
};
/*
* A base class that can listen to menu events. Its used by selects so the
* button and the window accessibles can change their name and role
* depending on whether the drop down list is dropped down on not
*/
class nsMenuListenerAccessible : public nsAccessible, public nsIDOMXULListener
{
public:
NS_DECL_ISUPPORTS_INHERITED
nsMenuListenerAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsMenuListenerAccessible();
// popup listener
NS_IMETHOD PopupShowing(nsIDOMEvent* aEvent);
NS_IMETHOD PopupShown(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD PopupHiding(nsIDOMEvent* aEvent);
NS_IMETHOD PopupHidden(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD Close(nsIDOMEvent* aEvent);
NS_IMETHOD Command(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD Broadcast(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD CommandUpdate(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) { return NS_OK; }
virtual void SetupMenuListener();
PRBool mRegistered;
PRBool mOpen;
};
#endif

View File

@@ -0,0 +1,226 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* John Gaunt (jgaunt@netscape.com)
* Aaron Leventhal (aaronl@netscape.com)
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
// NOTE: alphabetically ordered
#include "nsFormControlAccessible.h"
#include "nsIDocument.h"
#include "nsIDOMHTMLFormElement.h"
#include "nsIDOMHTMLInputElement.h"
#include "nsIDOMHTMLLabelElement.h"
#include "nsIDOMNodeList.h"
#include "nsIDOMXULButtonElement.h"
#include "nsIDOMXULCheckboxElement.h"
#include "nsIDOMXULDocument.h"
#include "nsIDOMXULElement.h"
#include "nsIDOMXULLabelElement.h"
#include "nsIDOMXULSelectCntrlEl.h"
#include "nsIDOMXULSelectCntrlItemEl.h"
#include "nsReadableUtils.h"
#include "nsString.h"
/**
* nsFormControlAccessible
*/
nsFormControlAccessible::nsFormControlAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsAccessible(aNode, aShell)
{
}
/**
* XUL states: focused, unavailable(disabled), focusable, ?protected?
* HTML states: focused, unabailable(disabled), focusable, protected
*/
NS_IMETHODIMP nsFormControlAccessible::GetAccState(PRUint32 *_retval)
{
// Get the focused state from the nsAccessible
nsAccessible::GetAccState(_retval);
PRBool disabled = PR_FALSE;
nsresult rv = NS_ERROR_FAILURE;
nsCOMPtr<nsIDOMHTMLInputElement> htmlFormElement(do_QueryInterface(mDOMNode, &rv));
if (NS_SUCCEEDED(rv) && htmlFormElement) {
htmlFormElement->GetDisabled(&disabled);
nsAutoString typeString;
htmlFormElement->GetType(typeString);
if (typeString.EqualsIgnoreCase("password"))
*_retval |= STATE_PROTECTED;
}
else {
nsCOMPtr<nsIDOMXULControlElement> xulFormElement(do_QueryInterface(mDOMNode, &rv));
if (NS_SUCCEEDED(rv) && xulFormElement) {
xulFormElement->GetDisabled(&disabled);
/* XXX jgaunt do XUL elements support password fields? */
}
}
if (disabled)
*_retval |= STATE_UNAVAILABLE;
else
*_retval |= STATE_FOCUSABLE;
return NS_OK;
}
/**
* Will be called by both HTML and XUL elements, this method
* merely checks who is calling and then calls the appropriate
* protected method for the XUL or HTML element.
*/
NS_IMETHODIMP nsFormControlAccessible::GetAccName(nsAWritableString& _retval)
{
nsCOMPtr<nsIDOMXULElement> xulFormElement(do_QueryInterface(mDOMNode));
if (xulFormElement)
return GetXULAccName(_retval);
else
return GetHTMLAccName(_retval);
}
/**
* No Children
*/
NS_IMETHODIMP nsFormControlAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/**
* No Children
*/
NS_IMETHODIMP nsFormControlAccessible::GetAccLastChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/**
* No Children
*/
NS_IMETHODIMP nsFormControlAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 0;
return NS_OK;
}
// ------------
// Radio button
// ------------
nsRadioButtonAccessible::nsRadioButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsFormControlAccessible(aNode, aShell)
{
}
/**
*
*/
NS_IMETHODIMP nsRadioButtonAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
}
/**
*
*/
NS_IMETHODIMP nsRadioButtonAccessible::GetAccActionName(PRUint8 index, nsAWritableString& _retval)
{
if (index == eAction_Click) {
_retval = NS_LITERAL_STRING("select");
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
/**
*
*/
NS_IMETHODIMP nsRadioButtonAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_RADIOBUTTON;
return NS_OK;
}
// ------------
// Text Accessibles
// ------------
nsTextAccessible::nsTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
nsLinkableAccessible(aDomNode, aShell)
{
}
/**
* We are text
*/
NS_IMETHODIMP nsTextAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_TEXT;
return NS_OK;
}
/**
* No Children
*/
NS_IMETHODIMP nsTextAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/**
* No Children
*/
NS_IMETHODIMP nsTextAccessible::GetAccLastChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/**
* No Children
*/
NS_IMETHODIMP nsTextAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 0;
return NS_OK;
}

View File

@@ -0,0 +1,93 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Eric D Vaughan (evaughan@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsFormControlAccessible_H_
#define _nsFormControlAccessible_H_
#include "nsBaseWidgetAccessible.h"
/**
* This supports name and state information for both XUL and HTML
* widgets. Designed to be a base class for the impls of XUL
* and HTML form widget Accessibles
*/
class nsFormControlAccessible : public nsAccessible
{
public:
nsFormControlAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAWritableString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
};
/**
*
*/
class nsRadioButtonAccessible : public nsFormControlAccessible
{
public:
nsRadioButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _retval);
};
/**
* Text nodes have no children, but since double inheritance
* no-worky we have to re-impl the LeafAccessiblity blocks
* this way.
*/
class nsTextAccessible : public nsLinkableAccessible
{
public:
nsTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
};
#endif

View File

@@ -0,0 +1,243 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Eric Vaughan (evaughan@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsGenericAccessible.h"
#include "nsIFrame.h"
#include "nsCOMPtr.h"
#include "nsIWeakReference.h"
#include "nsReadableUtils.h"
#include "nsIContent.h"
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsGenericAccessible, nsIAccessible)
nsGenericAccessible::nsGenericAccessible()
{
NS_INIT_ISUPPORTS();
/* member initializers and constructor code */
}
nsGenericAccessible::~nsGenericAccessible()
{
/* destructor code */
}
/* nsIAccessible getAccParent (); */
NS_IMETHODIMP nsGenericAccessible::GetAccParent(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible getAccNextSibling (); */
NS_IMETHODIMP nsGenericAccessible::GetAccNextSibling(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible getAccPreviousSibling (); */
NS_IMETHODIMP nsGenericAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible getAccFirstChild (); */
NS_IMETHODIMP nsGenericAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible getAccLastChild (); */
NS_IMETHODIMP nsGenericAccessible::GetAccLastChild(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* long getAccChildCount (); */
NS_IMETHODIMP nsGenericAccessible::GetAccChildCount(PRInt32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* wstring getAccName (); */
NS_IMETHODIMP nsGenericAccessible::GetAccName(nsAWritableString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* wstring getAccValue (); */
NS_IMETHODIMP nsGenericAccessible::GetAccValue(nsAWritableString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void setAccName (in wstring name); */
NS_IMETHODIMP nsGenericAccessible::SetAccName(const nsAReadableString& name)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* wstring getAccDescription (); */
NS_IMETHODIMP nsGenericAccessible::GetAccDescription(nsAWritableString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* unsigned long getAccRole (); */
NS_IMETHODIMP nsGenericAccessible::GetAccRole(PRUint32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* wstring getAccState (); */
NS_IMETHODIMP nsGenericAccessible::GetAccState(PRUint32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* PRUint8 getAccNumActions (); */
NS_IMETHODIMP nsGenericAccessible::GetAccNumActions(PRUint8 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* wstring getAccActionName (in PRUint8 index); */
NS_IMETHODIMP nsGenericAccessible::GetAccActionName(PRUint8 index, nsAWritableString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void accDoAction (in PRUint8 index); */
NS_IMETHODIMP nsGenericAccessible::AccDoAction(PRUint8 index)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible getAccFocused(); */
NS_IMETHODIMP nsGenericAccessible::GetAccFocused(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* wstring getAccHelp (); */
NS_IMETHODIMP nsGenericAccessible::GetAccHelp(nsAWritableString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible accGetAt (in long x, in long y); */
NS_IMETHODIMP nsGenericAccessible::AccGetAt(PRInt32 x, PRInt32 y, nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible accNavigateRight (); */
NS_IMETHODIMP nsGenericAccessible::AccNavigateRight(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible accNavigateLeft (); */
NS_IMETHODIMP nsGenericAccessible::AccNavigateLeft(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible accNavigateUp (); */
NS_IMETHODIMP nsGenericAccessible::AccNavigateUp(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible accNavigateDown (); */
NS_IMETHODIMP nsGenericAccessible::AccNavigateDown(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void accGetBounds (out long x, out long y, out long width, out long height); */
NS_IMETHODIMP nsGenericAccessible::AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void accAddSelection (); */
NS_IMETHODIMP nsGenericAccessible::AccAddSelection()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void accRemoveSelection (); */
NS_IMETHODIMP nsGenericAccessible::AccRemoveSelection()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void accExtendSelection (); */
NS_IMETHODIMP nsGenericAccessible::AccExtendSelection()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void accTakeSelection (); */
NS_IMETHODIMP nsGenericAccessible::AccTakeSelection()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void accTakeFocus (); */
NS_IMETHODIMP nsGenericAccessible::AccTakeFocus()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* unsigned long getAccExtState (); */
NS_IMETHODIMP nsGenericAccessible::GetAccExtState(PRUint32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsGenericAccessible::AccGetDOMNode(nsIDOMNode **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsGenericAccessible::CacheOptimizations(nsIAccessible *aParent, PRInt32 aSiblingIndex, nsIDOMNodeList *aSiblingList)
{
return NS_ERROR_NOT_IMPLEMENTED;
}

View File

@@ -0,0 +1,67 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Eric D Vaughan (evaughan@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsGenericAccessible_H_
#define _nsGenericAccessible_H_
#include "nsISupports.h"
#include "nsIAccessible.h"
#include "nsIContent.h"
#include "nsIDOMNode.h"
#include "nsIPresShell.h"
#include "nsIPresContext.h"
#include "nsCOMPtr.h"
#include "nsIWeakReference.h"
/**
* Basic implementation
* supports nothing
*/
class nsGenericAccessible : public nsIAccessible
{
NS_DECL_ISUPPORTS
NS_DECL_NSIACCESSIBLE
public:
nsGenericAccessible();
virtual ~nsGenericAccessible();
};
#endif

View File

@@ -0,0 +1,169 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Aaron Leventhal (aaronl@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsGenericAccessible.h"
#include "nsHTMLAreaAccessible.h"
#include "nsReadableUtils.h"
#include "nsString.h"
#include "nsAccessible.h"
#include "nsIAccessibilityService.h"
#include "nsIServiceManager.h"
#include "nsIDOMElement.h"
#include "nsIDOMHTMLAreaElement.h"
// --- area -----
nsHTMLAreaAccessible::nsHTMLAreaAccessible(nsIDOMNode *aDomNode, nsIAccessible *aAccParent, nsIWeakReference* aShell):
nsLinkableAccessible(aDomNode, aShell), mAccParent(aAccParent)
{
}
/* wstring getAccName (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccName(nsAWritableString & _retval)
{
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(mDOMNode));
if (elt) {
nsAutoString hrefString;
elt->GetAttribute(NS_LITERAL_STRING("title"), _retval);
}
return NS_OK;
}
/* unsigned long getAccRole (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_LINK;
return NS_OK;
}
/* wstring getAccValue (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccValue(nsAWritableString& _retval)
{
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(mDOMNode));
if (elt)
elt->GetAttribute(NS_LITERAL_STRING("href"), _retval);
return NS_OK;
}
/* wstring getAccDescription (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccDescription(nsAWritableString& _retval)
{
// Still to do - follow IE's standard here
nsCOMPtr<nsIDOMHTMLAreaElement> area(do_QueryInterface(mDOMNode));
if (area)
area->GetShape(_retval);
return NS_OK;
}
/* nsIAccessible getAccFirstChild (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/* nsIAccessible getAccLastChild (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccLastChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/* long getAccChildCount (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 0;
return NS_OK;
}
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccParent(nsIAccessible * *aAccParent)
{
*aAccParent = mAccParent;
NS_IF_ADDREF(*aAccParent);
return NS_OK;
}
nsIAccessible *nsHTMLAreaAccessible::CreateAreaAccessible(nsIDOMNode *aDOMNode)
{
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
if (accService) {
nsIAccessible* acc = nsnull;
accService->CreateHTMLAreaAccessible(mPresShell, aDOMNode, mAccParent, &acc);
return acc;
}
return nsnull;
}
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccNextSibling(nsIAccessible * *aAccNextSibling)
{
*aAccNextSibling = nsnull;
nsCOMPtr<nsIDOMNode> nextNode;
mDOMNode->GetNextSibling(getter_AddRefs(nextNode));
if (nextNode)
*aAccNextSibling = CreateAreaAccessible(nextNode);
return NS_OK;
}
/* readonly attribute nsIAccessible accPreviousSibling; */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccPreviousSibling(nsIAccessible * *aAccPrevSibling)
{
*aAccPrevSibling = nsnull;
nsCOMPtr<nsIDOMNode> prevNode;
mDOMNode->GetPreviousSibling(getter_AddRefs(prevNode));
if (prevNode)
*aAccPrevSibling = CreateAreaAccessible(prevNode);
return NS_OK;
}
/* void accGetBounds (out long x, out long y, out long width, out long height); */
NS_IMETHODIMP nsHTMLAreaAccessible::AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height)
{
//nsIFrame *frame;
// Do a better job on this later - need to use GetRect on mAreas of nsImageMap from nsImageFrame
//return mAccParent->nsAccessible::AccGetBounds(x,y,width,height);
*x = *y = *width = *height = 0;
return NS_ERROR_NOT_IMPLEMENTED;
}

View File

@@ -0,0 +1,71 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Aaron Leventhal (aaronl@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsHTMLAreaAccessible_H_
#define _nsHTMLAreaAccessible_H_
#include "nsBaseWidgetAccessible.h"
#include "nsAccessible.h"
/* Accessible for image map areas - must be child of image
*/
class nsHTMLAreaAccessible : public nsLinkableAccessible
{
public:
nsHTMLAreaAccessible(nsIDOMNode *domNode, nsIAccessible *accParent, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAWritableString & _retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAWritableString& _retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccParent(nsIAccessible * *aAccParent);
NS_IMETHOD GetAccNextSibling(nsIAccessible * *aAccNextSibling);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible * *aAccPreviousSibling);
NS_IMETHOD GetAccDescription(nsAWritableString& _retval);
NS_IMETHOD AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height);
protected:
nsIAccessible *CreateAreaAccessible(nsIDOMNode *aDOMNode);
nsCOMPtr<nsIAccessible> mAccParent;
};
#endif

View File

@@ -0,0 +1,376 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Eric Vaughan (evaughan@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
// NOTE: alphabetically ordered
#include "nsAccessible.h"
#include "nsFormControlAccessible.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLFormControlAccessible.h"
#include "nsIDOMHTMLButtonElement.h"
#include "nsIDOMHTMLFormElement.h"
#include "nsIDOMHTMLInputElement.h"
#include "nsIDOMHTMLLabelElement.h"
#include "nsIDOMHTMLTextAreaElement.h"
#include "nsIDOMXULCheckboxElement.h"
#include "nsIDOMXULButtonElement.h"
#include "nsIDOMXULSelectCntrlItemEl.h"
#include "nsIDOMXULSelectCntrlEl.h"
#include "nsINameSpaceManager.h"
#include "nsIFrame.h"
#include "nsISelectionController.h"
#include "nsReadableUtils.h"
#include "nsWeakReference.h"
// --- checkbox -----
nsHTMLCheckboxAccessible::nsHTMLCheckboxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsFormControlAccessible(aNode, aShell)
{
}
NS_IMETHODIMP nsHTMLCheckboxAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_CHECKBUTTON;
return NS_OK;
}
NS_IMETHODIMP nsHTMLCheckboxAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
}
NS_IMETHODIMP nsHTMLCheckboxAccessible::GetAccActionName(PRUint8 index, nsAWritableString& _retval)
{
if (index == eAction_Click) { // 0 is the magic value for default action
// check or uncheck
PRUint32 state;
GetAccState(&state);
if (state & STATE_CHECKED)
_retval = NS_LITERAL_STRING("uncheck");
else
_retval = NS_LITERAL_STRING("check");
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTMLCheckboxAccessible::AccDoAction(PRUint8 index)
{
if (index == 0) { // 0 is the magic value for default action
nsCOMPtr<nsIDOMHTMLInputElement> htmlCheckboxElement(do_QueryInterface(mDOMNode));
PRBool checked = PR_FALSE;
if (htmlCheckboxElement) {
htmlCheckboxElement->GetChecked(&checked);
htmlCheckboxElement->SetChecked(!checked);
return NS_OK;
}
return NS_ERROR_FAILURE;
}
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTMLCheckboxAccessible::GetAccState(PRUint32 *_retval)
{
nsFormControlAccessible::GetAccState(_retval);
PRBool checked = PR_FALSE; // Radio buttons and check boxes can be checked
nsCOMPtr<nsIDOMHTMLInputElement> htmlCheckboxElement(do_QueryInterface(mDOMNode));
if (htmlCheckboxElement)
htmlCheckboxElement->GetChecked(&checked);
if (checked)
*_retval |= STATE_CHECKED;
return NS_OK;
}
//------ Radio button -------
nsHTMLRadioButtonAccessible::nsHTMLRadioButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsRadioButtonAccessible(aNode, aShell)
{
}
NS_IMETHODIMP nsHTMLRadioButtonAccessible::AccDoAction(PRUint8 index)
{
if (index == eAction_Click) {
nsCOMPtr<nsIDOMHTMLInputElement> element(do_QueryInterface(mDOMNode));
element->Click();
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTMLRadioButtonAccessible::GetAccState(PRUint32 *_retval)
{
nsFormControlAccessible::GetAccState(_retval);
PRBool checked = PR_FALSE; // Radio buttons and check boxes can be checked
nsCOMPtr<nsIDOMHTMLInputElement> htmlRadioElement(do_QueryInterface(mDOMNode));
if (htmlRadioElement)
htmlRadioElement->GetChecked(&checked);
if (checked)
*_retval |= STATE_CHECKED;
return NS_OK;
}
// ----- Button -----
nsHTMLButtonAccessible::nsHTMLButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsFormControlAccessible(aNode, aShell)
{
}
NS_IMETHODIMP nsHTMLButtonAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;;
}
NS_IMETHODIMP nsHTMLButtonAccessible::GetAccActionName(PRUint8 index, nsAWritableString& _retval)
{
if (index == eAction_Click) {
_retval = NS_LITERAL_STRING("press");
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTMLButtonAccessible::AccDoAction(PRUint8 index)
{
if (index == 0) {
nsCOMPtr<nsIDOMHTMLInputElement> element(do_QueryInterface(mDOMNode));
element->Click();
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTMLButtonAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_PUSHBUTTON;
return NS_OK;
}
NS_IMETHODIMP nsHTMLButtonAccessible::GetAccName(nsAWritableString& _retval)
{
nsCOMPtr<nsIDOMHTMLInputElement> button(do_QueryInterface(mDOMNode));
if (!button)
return NS_ERROR_FAILURE;
nsAutoString name;
button->GetValue(name);
name.CompressWhitespace();
_retval.Assign(name);
return NS_OK;
}
// ----- HTML 4 Button: can contain arbitrary HTML content -----
nsHTML4ButtonAccessible::nsHTML4ButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsBlockAccessible(aNode, aShell)
{
}
NS_IMETHODIMP nsHTML4ButtonAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;;
}
NS_IMETHODIMP nsHTML4ButtonAccessible::GetAccActionName(PRUint8 index, nsAWritableString& _retval)
{
if (index == eAction_Click) {
_retval = NS_LITERAL_STRING("press");
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTML4ButtonAccessible::AccDoAction(PRUint8 index)
{
if (index == 0) {
nsCOMPtr<nsIDOMHTMLInputElement> inputElement(do_QueryInterface(mDOMNode));
if ( inputElement )
{
inputElement->Click();
return NS_OK;
}
return NS_ERROR_FAILURE;
}
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTML4ButtonAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_PUSHBUTTON;
return NS_OK;
}
NS_IMETHODIMP nsHTML4ButtonAccessible::GetAccState(PRUint32 *_retval)
{
nsAccessible::GetAccState(_retval);
*_retval |= STATE_FOCUSABLE;
return NS_OK;
}
NS_IMETHODIMP nsHTML4ButtonAccessible::GetAccName(nsAWritableString& _retval)
{
nsresult rv = NS_ERROR_FAILURE;
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
nsAutoString name;
if (content)
rv = AppendFlatStringFromSubtree(content, &name);
if (NS_SUCCEEDED(rv)) {
// Temp var needed until CompressWhitespace built for nsAWritableString
name.CompressWhitespace();
_retval.Assign(name);
}
return rv;
}
// --- textfield -----
nsHTMLTextFieldAccessible::nsHTMLTextFieldAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsFormControlAccessible(aNode, aShell)
{
}
NS_IMETHODIMP nsHTMLTextFieldAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_TEXT;
return NS_OK;
}
NS_IMETHODIMP nsHTMLTextFieldAccessible::GetAccValue(nsAWritableString& _retval)
{
PRUint32 state;
GetAccState(&state);
if (state & STATE_PROTECTED) // Don't return password text!
return NS_ERROR_FAILURE;
nsCOMPtr<nsIDOMHTMLTextAreaElement> textArea(do_QueryInterface(mDOMNode));
if (textArea) {
textArea->GetValue(_retval);
return NS_OK;
}
nsCOMPtr<nsIDOMHTMLInputElement> inputElement(do_QueryInterface(mDOMNode));
if (inputElement) {
inputElement->GetValue(_retval);
return NS_OK;
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsHTMLTextFieldAccessible::GetAccState(PRUint32 *_retval)
{
// can be
// focusable, focused, protected. readonly, unavailable, selected
nsAccessible::GetAccState(_retval);
*_retval |= STATE_FOCUSABLE;
nsCOMPtr<nsIDOMHTMLTextAreaElement> textArea(do_QueryInterface(mDOMNode));
nsCOMPtr<nsIDOMHTMLInputElement> inputElement(do_QueryInterface(mDOMNode));
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(mDOMNode));
PRBool isReadOnly = PR_FALSE;
elt->HasAttribute(NS_LITERAL_STRING("readonly"), &isReadOnly);
if (isReadOnly)
*_retval |= STATE_READONLY;
// Get current selection and find out if current node is in it
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (!shell) {
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIPresContext> context;
shell->GetPresContext(getter_AddRefs(context));
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
nsIFrame *frame;
if (content && NS_SUCCEEDED(shell->GetPrimaryFrameFor(content, &frame))) {
nsCOMPtr<nsISelectionController> selCon;
frame->GetSelectionController(context,getter_AddRefs(selCon));
if (selCon) {
nsCOMPtr<nsISelection> domSel;
selCon->GetSelection(nsISelectionController::SELECTION_NORMAL, getter_AddRefs(domSel));
if (domSel) {
PRBool isCollapsed = PR_TRUE;
domSel->GetIsCollapsed(&isCollapsed);
if (!isCollapsed)
*_retval |=STATE_SELECTED;
}
}
}
if (!textArea) {
if (inputElement) {
/////// ====== Must be a password field, so it uses nsIDOMHTMLFormControl ==== ///////
PRUint32 moreStates = 0;
nsresult rv = nsFormControlAccessible::GetAccState(&moreStates);
*_retval |= moreStates;
return rv;
}
return NS_ERROR_FAILURE;
}
PRBool disabled = PR_FALSE;
textArea->GetDisabled(&disabled);
if (disabled)
*_retval |= STATE_UNAVAILABLE;
return NS_OK;
}

View File

@@ -0,0 +1,103 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Eric D Vaughan (evaughan@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsHTMLFormControlAccessible_H_
#define _nsHTMLFormControlAccessible_H_
#include "nsBaseWidgetAccessible.h"
#include "nsFormControlAccessible.h"
class nsICheckboxControlFrame;
class nsHTMLCheckboxAccessible : public nsFormControlAccessible
{
public:
nsHTMLCheckboxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccState(PRUint32 *_retval);
};
class nsHTMLRadioButtonAccessible : public nsRadioButtonAccessible
{
public:
nsHTMLRadioButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccState(PRUint32 *_retval);
};
class nsHTMLButtonAccessible : public nsFormControlAccessible
{
public:
nsHTMLButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccName(nsAWritableString& _retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
};
class nsHTML4ButtonAccessible : public nsBlockAccessible
{
public:
nsHTML4ButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccName(nsAWritableString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
};
class nsHTMLTextFieldAccessible : public nsFormControlAccessible
{
public:
nsHTMLTextFieldAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAWritableString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
};
#endif

View File

@@ -0,0 +1,207 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsHTMLIFrameRootAccessible.h"
#include "nsCOMPtr.h"
#include "nsIDocument.h"
#include "nsIPresShell.h"
#include "nsIContent.h"
#include "nsIFrame.h"
#include "nsIDOMDocument.h"
#include "nsReadableUtils.h"
NS_INTERFACE_MAP_BEGIN(nsHTMLIFrameRootAccessible)
NS_INTERFACE_MAP_END_INHERITING(nsRootAccessible)
NS_IMPL_ADDREF_INHERITED(nsHTMLIFrameRootAccessible, nsRootAccessible);
NS_IMPL_RELEASE_INHERITED(nsHTMLIFrameRootAccessible, nsRootAccessible);
NS_IMPL_ADDREF_INHERITED(nsHTMLIFrameAccessible, nsBlockAccessible);
NS_IMPL_RELEASE_INHERITED(nsHTMLIFrameAccessible, nsBlockAccessible);
NS_IMETHODIMP
nsHTMLIFrameAccessible::QueryInterface(const nsIID& aIID, void** aInstancePtr)
{
NS_ASSERTION(aInstancePtr, "QueryInterface requires a non-NULL destination!");
if ( !aInstancePtr )
return NS_ERROR_NULL_POINTER;
if (aIID.Equals(NS_GET_IID(nsIAccessibleDocument))) {
*aInstancePtr = (void*)(nsIAccessibleDocument*) this;
NS_IF_ADDREF(this);
return NS_OK;
}
return nsBlockAccessible::QueryInterface(aIID, aInstancePtr);
}
nsHTMLIFrameAccessible::nsHTMLIFrameAccessible(nsIDOMNode* aNode, nsIAccessible* aRoot, nsIWeakReference* aShell, nsIDocument *aDoc):
nsBlockAccessible(aNode, aShell), mRootAccessible(aRoot), nsDocAccessibleMixin(aDoc)
{
}
/* attribute wstring accName; */
NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccName(nsAWritableString& aAccName)
{
return GetTitle(aAccName);
}
NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccValue(nsAWritableString& aAccValue)
{
return GetURL(aAccValue);
}
/* nsIAccessible getAccFirstChild (); */
NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
return mRootAccessible->GetAccFirstChild(_retval);
}
/* nsIAccessible getAccLastChild (); */
NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccLastChild(nsIAccessible **_retval)
{
return mRootAccessible->GetAccLastChild(_retval);
}
/* long getAccChildCount (); */
NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccChildCount(PRInt32 *_retval)
{
return mRootAccessible->GetAccChildCount(_retval);
}
/* unsigned long getAccRole (); */
NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_PANE;
return NS_OK;
}
NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccState(PRUint32 *aAccState)
{
return nsAccessible::GetAccState(aAccState);
}
NS_IMETHODIMP nsHTMLIFrameAccessible::GetURL(nsAWritableString& aURL)
{
return nsDocAccessibleMixin::GetURL(aURL);
}
NS_IMETHODIMP nsHTMLIFrameAccessible::GetTitle(nsAWritableString& aTitle)
{
return nsDocAccessibleMixin::GetTitle(aTitle);
}
NS_IMETHODIMP nsHTMLIFrameAccessible::GetMimeType(nsAWritableString& aMimeType)
{
return nsDocAccessibleMixin::GetMimeType(aMimeType);
}
NS_IMETHODIMP nsHTMLIFrameAccessible::GetDocType(nsAWritableString& aDocType)
{
return nsDocAccessibleMixin::GetDocType(aDocType);
}
NS_IMETHODIMP nsHTMLIFrameAccessible::GetNameSpaceURIForID(PRInt16 aNameSpaceID, nsAWritableString& aNameSpaceURI)
{
return nsDocAccessibleMixin::GetNameSpaceURIForID(aNameSpaceID, aNameSpaceURI);
}
NS_IMETHODIMP nsHTMLIFrameAccessible::GetDocument(nsIDocument **doc)
{
return nsDocAccessibleMixin::GetDocument(doc);
}
//=============================//
// nsHTMLIFrameRootAccessible //
//=============================//
//-----------------------------------------------------
// construction
//-----------------------------------------------------
nsHTMLIFrameRootAccessible::nsHTMLIFrameRootAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
mOuterNode(aNode), nsRootAccessible(aShell)
{
}
//-----------------------------------------------------
// destruction
//-----------------------------------------------------
nsHTMLIFrameRootAccessible::~nsHTMLIFrameRootAccessible()
{
}
void nsHTMLIFrameRootAccessible::Init()
{
if (!mOuterAccessible) {
nsCOMPtr<nsIDOMDocument> domDoc;
mOuterNode->GetOwnerDocument(getter_AddRefs(domDoc));
nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
if (doc) {
nsCOMPtr<nsIPresShell> parentShell;
doc->GetShellAt(0, getter_AddRefs(parentShell));
if (parentShell) {
nsCOMPtr<nsIContent> content(do_QueryInterface(mOuterNode));
nsIFrame* frame = nsnull;
parentShell->GetPrimaryFrameFor(content, &frame);
NS_ASSERTION(frame, "No outer frame.");
frame->GetAccessible(getter_AddRefs(mOuterAccessible));
NS_ASSERTION(mOuterAccessible, "Something's wrong - there's no accessible for the outer parent of this frame.");
}
}
}
}
/* readonly attribute nsIAccessible accParent; */
NS_IMETHODIMP nsHTMLIFrameRootAccessible::GetAccParent(nsIAccessible * *_retval)
{
Init();
return mOuterAccessible->GetAccParent(_retval);
}
/* nsIAccessible getAccNextSibling (); */
NS_IMETHODIMP nsHTMLIFrameRootAccessible::GetAccNextSibling(nsIAccessible **_retval)
{
Init();
return mOuterAccessible->GetAccNextSibling(_retval);
}
NS_IMETHODIMP nsHTMLIFrameRootAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
{
Init();
return mOuterAccessible->GetAccPreviousSibling(_retval);
}

View File

@@ -0,0 +1,101 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsIFrameRootAccessible_H_
#define _nsIFrameRootAccessible_H_
#include "nsBaseWidgetAccessible.h"
#include "nsRootAccessible.h"
#include "nsAccessible.h"
#include "nsIAccessibleDocument.h"
class nsIWebShell;
class nsIWeakReference;
class nsHTMLIFrameAccessible : public nsBlockAccessible,
public nsIAccessibleDocument,
public nsDocAccessibleMixin
{
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLEDOCUMENT
public:
nsHTMLIFrameAccessible(nsIDOMNode* aNode, nsIAccessible* aRoot, nsIWeakReference* aShell, nsIDocument *doc);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccName(nsAWritableString& aAccName);
NS_IMETHOD GetAccValue(nsAWritableString& AccValue);
NS_IMETHOD GetAccRole(PRUint32 *aAccRole);
NS_IMETHOD GetAccState(PRUint32 *aAccState);
protected:
nsCOMPtr<nsIAccessible> mRootAccessible;
};
class nsHTMLIFrameRootAccessible : public nsRootAccessible
{
NS_DECL_ISUPPORTS_INHERITED
public:
nsHTMLIFrameRootAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
virtual ~nsHTMLIFrameRootAccessible();
/* attribute wstring accName; */
NS_IMETHOD GetAccParent(nsIAccessible * *aAccParent);
/* nsIAccessible getAccNextSibling (); */
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
/* nsIAccessible getAccPreviousSibling (); */
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
protected:
void Init();
// In these variable names, "outer" relates to the nsHTMLIFrameAccessible, as opposed to the
// nsHTMLIFrameRootAccessible which is "inner".
// The outer node is a <browser> or <iframe> tag, whereas the inner node corresponds to the inner document root.
nsCOMPtr<nsIDOMNode> mOuterNode;
nsCOMPtr<nsIAccessible> mOuterAccessible;
};
#endif

View File

@@ -0,0 +1,205 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Aaron Leventhal (aaronl@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsGenericAccessible.h"
#include "nsHTMLImageAccessible.h"
#include "nsReadableUtils.h"
#include "nsAccessible.h"
#include "nsIHTMLDocument.h"
#include "nsIDocument.h"
#include "nsIDOMHTMLCollection.h"
#include "nsIAccessibilityService.h"
#include "nsIServiceManager.h"
#include "imgIRequest.h"
#include "imgIContainer.h"
#include "nsIImageFrame.h"
// --- image -----
nsHTMLImageAccessible::nsHTMLImageAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsLinkableAccessible(aDOMNode, aShell)
{
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(aDOMNode));
nsCOMPtr<nsIDocument> doc;
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (!shell)
return;
shell->GetDocument(getter_AddRefs(doc));
nsAutoString mapElementName;
if (doc && element) {
nsCOMPtr<nsIHTMLDocument> htmlDoc(do_QueryInterface(doc));
element->GetAttribute(NS_LITERAL_STRING("usemap"),mapElementName);
if (htmlDoc && !mapElementName.IsEmpty()) {
if (mapElementName.CharAt(0) == '#')
mapElementName.Cut(0,1);
htmlDoc->GetImageMap(mapElementName, getter_AddRefs(mMapElement));
}
}
}
NS_IMETHODIMP nsHTMLImageAccessible::GetAccState(PRUint32 *_retval)
{
// The state is a bitfield, get our inherited state, then logically OR it with STATE_ANIMATED if this
// is an animated image.
nsLinkableAccessible::GetAccState(_retval);
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
nsIFrame *frame = nsnull;
if (content && shell)
shell->GetPrimaryFrameFor(content, &frame);
nsCOMPtr<nsIImageFrame> imageFrame(do_QueryInterface(frame));
nsCOMPtr<imgIRequest> imageRequest;
if (imageFrame)
imageFrame->GetImageRequest(getter_AddRefs(imageRequest));
nsCOMPtr<imgIContainer> imgContainer;
if (imageRequest)
imageRequest->GetImage(getter_AddRefs(imgContainer));
if (imgContainer) {
PRUint32 numFrames;
imgContainer->GetNumFrames(&numFrames);
if (numFrames > 1)
*_retval |= STATE_ANIMATED;
}
return NS_OK;
}
/* wstring getAccName (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetAccName(nsAWritableString& _retval)
{
nsresult rv = NS_ERROR_FAILURE;
nsCOMPtr<nsIContent> imageContent(do_QueryInterface(mDOMNode));
if (imageContent) {
nsAutoString name;
rv = AppendFlatStringFromContentNode(imageContent, &name);
if (NS_SUCCEEDED(rv)) {
// Temp var needed until CompressWhitespace built for nsAWritableString
name.CompressWhitespace();
_retval.Assign(name);
}
}
return rv;
}
/* wstring getAccRole (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_GRAPHIC;
return NS_OK;
}
nsIAccessible *nsHTMLImageAccessible::CreateAreaAccessible(PRUint32 areaNum)
{
if (!mMapElement)
return nsnull;
if (areaNum == -1) {
PRInt32 numAreaMaps;
GetAccChildCount(&numAreaMaps);
if (numAreaMaps<=0)
return nsnull;
areaNum = NS_STATIC_CAST(PRUint32,numAreaMaps-1);
}
nsIDOMHTMLCollection *mapAreas;
mMapElement->GetAreas(&mapAreas);
if (!mapAreas)
return nsnull;
nsIDOMNode *domNode = nsnull;
mapAreas->Item(areaNum,&domNode);
if (!domNode)
return nsnull;
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
if (!accService)
return nsnull;
if (accService) {
nsIAccessible* acc = nsnull;
accService->CreateHTMLAreaAccessible(mPresShell, domNode, this, &acc);
return acc;
}
return nsnull;
}
/* nsIAccessible getAccFirstChild (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
*_retval = CreateAreaAccessible(0);
return NS_OK;
}
/* nsIAccessible getAccLastChild (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetAccLastChild(nsIAccessible **_retval)
{
*_retval = CreateAreaAccessible(-1);
return NS_OK;
}
/* long getAccChildCount (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 0;
if (mMapElement) {
nsIDOMHTMLCollection *mapAreas;
mMapElement->GetAreas(&mapAreas);
if (mapAreas) {
PRUint32 length;
mapAreas->GetLength(&length);
*_retval = NS_STATIC_CAST(PRInt32, length);
}
}
return NS_OK;
}

View File

@@ -0,0 +1,71 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Aaron Leventhal (aaronl@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsHTMLImageAccessible_H_
#define _nsHTMLImageAccessible_H_
#include "nsAccessible.h"
#include "nsBaseWidgetAccessible.h"
#include "nsIFrame.h"
#include "nsIImageFrame.h"
#include "nsIDOMHTMLMapElement.h"
/* Accessible for supporting images
* supports:
* - gets name, role
* - support basic state
*/
class nsHTMLImageAccessible : public nsLinkableAccessible
{
public:
nsHTMLImageAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAWritableString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
protected:
nsIAccessible *CreateAreaAccessible(PRUint32 areaNum);
nsCOMPtr<nsIDOMHTMLMapElement> mMapElement;
};
#endif

View File

@@ -0,0 +1,79 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Aaron Leventhal (aaronl@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsHTMLLinkAccessible.h"
#include "nsWeakReference.h"
#include "nsIFrame.h"
#include "nsILink.h"
#include "nsILinkHandler.h"
#include "nsISelection.h"
#include "nsISelectionController.h"
#include "nsIPresContext.h"
#include "nsReadableUtils.h"
#include "nsIDOMElement.h"
nsHTMLLinkAccessible::nsHTMLLinkAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
nsLinkableAccessible(aDomNode, aShell)
{
}
/* wstring getAccName (); */
NS_IMETHODIMP nsHTMLLinkAccessible::GetAccName(nsAWritableString& _retval)
{
if (!IsALink()) // Also initializes private data members
return NS_ERROR_FAILURE;
nsAutoString name;
nsresult rv = AppendFlatStringFromSubtree(mLinkContent, &name);
if (NS_SUCCEEDED(rv)) {
// Temp var needed until CompressWhitespace built for nsAWritableString
name.CompressWhitespace();
_retval.Assign(name);
}
return rv;
}
/* unsigned long getAccRole (); */
NS_IMETHODIMP nsHTMLLinkAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_LINK;
return NS_OK;
}

View File

@@ -0,0 +1,55 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Aaron Leventhal (aaronl@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsHTMLLinkAccessible_H_
#define _nsHTMLLinkAccessible_H_
#include "nsAccessible.h"
#include "nsBaseWidgetAccessible.h"
class nsHTMLLinkAccessible : public nsLinkableAccessible
{
public:
nsHTMLLinkAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAWritableString& _retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
};
#endif

View File

@@ -0,0 +1,589 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Original Author: Eric Vaughan (evaughan@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsCOMPtr.h"
#include "nsHTMLSelectAccessible.h"
#include "nsIAccessibilityService.h"
#include "nsIFrame.h"
#include "nsIComboboxControlFrame.h"
#include "nsIDOMEventReceiver.h"
#include "nsIDOMHTMLCollection.h"
#include "nsIDOMHTMLInputElement.h"
#include "nsIDOMHTMLOptionElement.h"
#include "nsIDOMHTMLSelectElement.h"
#include "nsIListControlFrame.h"
#include "nsIServiceManager.h"
#include "nsLayoutAtoms.h"
/**
* Selects, Listboxes and Comboboxes, are made up of a number of different
* widgets, some of which are shared between the two. This file contains
* all of the widgets for both of the Selects, for HTML only. Some of them
* extend classes from nsSelectAccessible.cpp, which contains base classes
* that are also extended by the XUL Select Accessibility support.
*
* Listbox:
* - nsHTMLListboxAccessible
* - nsHTMLSelctListAccessible
* - nsHTMLSelectOptionAccessible
*
* Comboboxes:
* - nsHTMLComboboxAccessilbe
* - nsHTMLComboboxTextFieldAccessible
* - nsHTMLComboboxButtonAccessible
* - nsHTMLComboboxWindowAccessilbe
* - nsHTMLSelctListAccessible
* - nsHTMLSelectOptionAccessible
*/
/** ------------------------------------------------------ */
/** First, the common widgets */
/** ------------------------------------------------------ */
/** ----- nsHTMLSelectListAccessible ----- */
/** Default Constructor */
nsHTMLSelectListAccessible::nsHTMLSelectListAccessible(nsIAccessible* aParent,
nsIDOMNode* aDOMNode,
nsIWeakReference* aShell)
:nsSelectListAccessible(aParent, aDOMNode, aShell)
{
}
/**
* As a nsHTMLSelectListAccessible we can have the following states:
* STATE_MULTISELECTABLE
* STATE_EXTSELECTABLE
*/
NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccState(PRUint32 *_retval)
{
nsCOMPtr<nsIDOMHTMLSelectElement> select (do_QueryInterface(mDOMNode));
if ( select ) {
PRBool multiple;
select->GetMultiple(&multiple);
if ( multiple )
*_retval |= STATE_MULTISELECTABLE | STATE_EXTSELECTABLE;
}
return NS_OK;
}
/**
* Gets the last child of the DOM node and creates and returns
* a nsHTMLSelectOptionAccessible.
*/
NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccLastChild(nsIAccessible **_retval)
{
nsCOMPtr<nsIDOMNode> last;
mDOMNode->GetLastChild(getter_AddRefs(last));
*_retval = new nsHTMLSelectOptionAccessible(this, last, mPresShell);
if ( ! *_retval )
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/**
* Gets the First child of the DOM node and creates and returns
* a nsHTMLSelectOptionAccessible.
*/
NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
nsCOMPtr<nsIDOMNode> first;
mDOMNode->GetFirstChild(getter_AddRefs(first));
*_retval = new nsHTMLSelectOptionAccessible(this, first, mPresShell);
if ( ! *_retval )
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/** ----- nsHTMLSelectOptionAccessible ----- */
/** Default Constructor */
nsHTMLSelectOptionAccessible::nsHTMLSelectOptionAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsSelectOptionAccessible(aParent, aDOMNode, aShell)
{
}
/**
* Gets the next sibling of the DOM node and creates and returns
* a nsHTMLSelectOptionAccessible.
*/
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccNextSibling(nsIAccessible **_retval)
{
*_retval = nsnull;
nsCOMPtr<nsIDOMNode> next;
mDOMNode->GetNextSibling(getter_AddRefs(next));
if (next) {
*_retval = new nsHTMLSelectOptionAccessible(mParent, next, mPresShell);
if ( ! *_retval )
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
}
return NS_OK;
}
/**
* Gets the previous sibling of the DOM node and creates and returns
* a nsHTMLSelectOptionAccessible.
*/
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
{
*_retval = nsnull;
nsCOMPtr<nsIDOMNode> prev;
mDOMNode->GetPreviousSibling(getter_AddRefs(prev));
if (prev) {
*_retval = new nsHTMLSelectOptionAccessible(mParent, prev, mPresShell);
if ( ! *_retval )
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
}
return NS_OK;
}
/**
* As a nsHTMLSelectOptionAccessible we can have the following states:
* STATE_SELECTABLE
* STATE_SELECTED
* STATE_FOCUSED
* STATE_FOCUSABLE
* STATE_INVISIBLE -- not implemented yet
*/
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccState(PRUint32 *_retval)
{
*_retval = 0;
nsCOMPtr<nsIDOMNode> focusedOptionNode, parentNode;
mParent->AccGetDOMNode(getter_AddRefs(parentNode));
// find out if we are the focused node
GetFocusedOptionNode(mPresShell, parentNode, focusedOptionNode);
if (focusedOptionNode == mDOMNode)
*_retval |= STATE_FOCUSED;
// Are we selected?
nsCOMPtr<nsIDOMHTMLOptionElement> option (do_QueryInterface(mDOMNode));
if ( option ) {
PRBool isSelected = PR_FALSE;
option->GetSelected(&isSelected);
if ( isSelected )
*_retval |= STATE_SELECTED;
}
*_retval |= STATE_SELECTABLE | STATE_FOCUSABLE;
return NS_OK;
}
/**
* Helper method for getting the focused DOM Node from our parent(list) node. We
* need to use the frame to get the focused option because for some reason we
* weren't getting the proper notification when the focus changed using the DOM
*/
nsresult nsHTMLSelectOptionAccessible::GetFocusedOptionNode(nsIWeakReference *aPresShell,
nsIDOMNode *aListNode,
nsCOMPtr<nsIDOMNode>& aFocusedOptionNode)
{
NS_ASSERTION(aListNode, "Called GetFocusedOptionNode without a valid list node");
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(aPresShell));
if (!shell)
return NS_ERROR_FAILURE;
nsIFrame *frame = nsnull;
nsCOMPtr<nsIContent> content(do_QueryInterface(aListNode));
shell->GetPrimaryFrameFor(content, &frame);
nsresult rv;
nsCOMPtr<nsIListControlFrame> listFrame(do_QueryInterface(frame, &rv));
if (NS_FAILED(rv))
return rv; // How can list content not have a list frame?
NS_ASSERTION(listFrame, "We don't have a list frame, but rv returned a success code.");
// Get what's focused by asking frame for "selected item".
PRInt32 focusedOptionIndex = 0;
rv = listFrame->GetSelectedIndex(&focusedOptionIndex);
nsCOMPtr<nsIDOMHTMLCollection> options;
// Get options
if (NS_SUCCEEDED(rv)) {
nsCOMPtr<nsIDOMHTMLSelectElement> selectElement(do_QueryInterface(aListNode));
NS_ASSERTION(selectElement, "No select element where it should be");
rv = selectElement->GetOptions(getter_AddRefs(options));
}
// Either use options and focused index, or default to list node itself
if (NS_SUCCEEDED(rv) && options && focusedOptionIndex >= 0) // Something is focused
rv = options->Item(focusedOptionIndex, getter_AddRefs(aFocusedOptionNode));
else { // If no options in list or focusedOptionIndex <0, then we are not focused on an item
aFocusedOptionNode = aListNode; // return normal target content
rv = NS_OK;
}
return rv;
}
/** ------------------------------------------------------ */
/** Secondly, the Listbox widget */
/** ------------------------------------------------------ */
/** ----- nsHTMLListboxAccessible ----- */
/** Constructor */
nsHTMLListboxAccessible::nsHTMLListboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsListboxAccessible(aDOMNode, aShell)
{
}
/** Inherit the ISupports impl from nsAccessible, we handle nsIAccessibleSelectable */
NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLListboxAccessible, nsListboxAccessible, nsIAccessibleSelectable)
/**
* Our last (and only) child is an nsHTMLSelectListAccessible object
*/
NS_IMETHODIMP nsHTMLListboxAccessible::GetAccLastChild(nsIAccessible **_retval)
{
*_retval = new nsHTMLSelectListAccessible(this, mDOMNode, mPresShell);
if ( ! *_retval )
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/**
* Our first (and only) child is an nsHTMLSelectListAccessible object
*/
NS_IMETHODIMP nsHTMLListboxAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
*_retval = new nsHTMLSelectListAccessible(this, mDOMNode, mPresShell);
if ( ! *_retval )
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/**
* Our value is the value of our ( first ) selected child. nsIDOMHTMLSelectElement
* returns this by default with GetValue().
*/
NS_IMETHODIMP nsHTMLListboxAccessible::GetAccValue(nsAWritableString& _retval)
{
nsCOMPtr<nsIDOMHTMLSelectElement> select (do_QueryInterface(mDOMNode));
if ( select ) {
select->GetValue(_retval);
return NS_OK;
}
return NS_ERROR_FAILURE;
}
/**
* nsIAccessibleSelectable method.
* - gets from the Select DOMNode the list of all Select Options
* - iterates through all of the options looking for selected Options
* - creates IAccessible objects for selected Options
* - Returns the IAccessibles for selectd Options in the nsISupportsArray
*
* retval will be nsnull if:
* - there are no Options in the Select Element
* - there are Options but none are selected
* - the DOMNode is not a nsIDOMHTMLSelectElement ( shouldn't happen )
*/
NS_IMETHODIMP nsHTMLListboxAccessible::GetSelectedChildren(nsISupportsArray **_retval)
{
nsCOMPtr<nsIDOMHTMLSelectElement> select(do_QueryInterface(mDOMNode));
if(select) {
nsCOMPtr<nsIDOMHTMLCollection> options;
// get all the options in the select
select->GetOptions(getter_AddRefs(options));
if (options) {
// set up variables we need to get the selected options and to get their nsIAccessile objects
PRUint32 length;
options->GetLength(&length);
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
nsCOMPtr<nsISupportsArray> selectedAccessibles;
NS_NewISupportsArray(getter_AddRefs(selectedAccessibles));
if (!selectedAccessibles || !accService)
return NS_ERROR_FAILURE;
// find the selected options and get the accessible objects;
PRBool isSelected = PR_FALSE;
nsCOMPtr<nsIPresContext> context;
GetPresContext(context);
for (PRUint32 i = 0 ; i < length ; i++) {
nsCOMPtr<nsIDOMNode> tempNode;
options->Item(i,getter_AddRefs(tempNode));
if (tempNode) {
nsCOMPtr<nsIDOMHTMLOptionElement> tempOption(do_QueryInterface(tempNode));
if (tempOption)
tempOption->GetSelected(&isSelected);
if (isSelected) {
nsCOMPtr<nsIAccessible> tempAccess;
accService->CreateHTMLSelectOptionAccessible(tempOption, this, context, getter_AddRefs(tempAccess));
if ( tempAccess )
selectedAccessibles->AppendElement(tempAccess);
isSelected = PR_FALSE;
}
}
}
selectedAccessibles->Count(&length); // reusing length
if ( length != 0 ) { // length of nsISupportsArray containing selected options
*_retval = selectedAccessibles;
NS_IF_ADDREF(*_retval);
return NS_OK;
}
}
}
// no options, not a select or none of the options are selected
*_retval = nsnull;
return NS_OK;
}
/** ------------------------------------------------------ */
/** Finally, the Combobox widgets */
/** ------------------------------------------------------ */
/** ----- nsHTMLComboboxAccessible ----- */
/** Constructor */
nsHTMLComboboxAccessible::nsHTMLComboboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsComboboxAccessible(aDOMNode, aShell)
{
}
/**
* Our last child is an nsHTMLComboboxWindowAccessible object
*/
NS_IMETHODIMP nsHTMLComboboxAccessible::GetAccLastChild(nsIAccessible **_retval)
{
*_retval = new nsHTMLComboboxWindowAccessible(this, mDOMNode, mPresShell);
if (! *_retval)
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/**
* Our last child is an nsHTMLComboboxTextFieldAccessible object
*/
NS_IMETHODIMP nsHTMLComboboxAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
*_retval = new nsHTMLComboboxTextFieldAccessible(this, mDOMNode, mPresShell);
if (! *_retval)
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/**
* Our value is the value of our ( first ) selected child. nsIDOMHTMLSelectElement
* returns this by default with GetValue().
*/
NS_IMETHODIMP nsHTMLComboboxAccessible::GetAccValue(nsAWritableString& _retval)
{
nsCOMPtr<nsIDOMHTMLSelectElement> select (do_QueryInterface(mDOMNode));
if (select) {
select->GetValue(_retval);
return NS_OK;
}
return NS_ERROR_FAILURE;
}
/** ----- nsHTMLComboboxTextFieldAccessible ----- */
/** Constructor */
nsHTMLComboboxTextFieldAccessible::nsHTMLComboboxTextFieldAccessible(nsIAccessible* aParent,
nsIDOMNode* aDOMNode,
nsIWeakReference* aShell):
nsComboboxTextFieldAccessible(aParent, aDOMNode, aShell)
{
}
/**
* Our next sibling is an nsHTMLComboboxButtonAccessible object
*/
NS_IMETHODIMP nsHTMLComboboxTextFieldAccessible::GetAccNextSibling(nsIAccessible **_retval)
{
nsCOMPtr<nsIAccessible> parent;
GetAccParent(getter_AddRefs(parent));
*_retval = new nsHTMLComboboxButtonAccessible(parent, mDOMNode, mPresShell);
if (! *_retval)
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/** -----ComboboxButtonAccessible ----- */
/** Constructor -- cache our parent */
nsHTMLComboboxButtonAccessible::nsHTMLComboboxButtonAccessible(nsIAccessible* aParent,
nsIDOMNode* aDOMNode,
nsIWeakReference* aShell):
nsComboboxButtonAccessible(aParent, aDOMNode, aShell)
{
}
/**
* Programmaticaly click on the button, causing either the display or
* the hiding of the drop down box ( window ).
* Walks the Frame tree and checks for proper frames.
*/
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::AccDoAction(PRUint8 index)
{
nsIFrame* frame = nsAccessible::GetBoundsFrame();
nsCOMPtr<nsIPresContext> context;
GetPresContext(context);
if (!context)
return NS_ERROR_FAILURE;
frame->FirstChild(context, nsnull, &frame);
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::blockFrame))
return NS_ERROR_FAILURE;
#endif
frame->GetNextSibling(&frame);
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::gfxButtonControlFrame))
return NS_ERROR_FAILURE;
#endif
nsCOMPtr<nsIContent> content;
frame->GetContent(getter_AddRefs(content));
// We only have one action, click. Any other index is meaningless(wrong)
if (index == eAction_Click) {
nsCOMPtr<nsIDOMHTMLInputElement> element(do_QueryInterface(content));
if (element)
{
element->Click();
return NS_OK;
}
return NS_ERROR_FAILURE;
}
return NS_ERROR_INVALID_ARG;
}
/**
* Our next sibling is an nsHTMLComboboxWindowAccessible object
*/
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetAccNextSibling(nsIAccessible **_retval)
{
nsCOMPtr<nsIAccessible> parent;
GetAccParent(getter_AddRefs(parent));
*_retval = new nsHTMLComboboxWindowAccessible(parent, mDOMNode, mPresShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
/**
* Our next sibling is an nsHTMLComboboxTextFieldAccessible object
*/
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
{
nsCOMPtr<nsIAccessible> parent;
GetAccParent(getter_AddRefs(parent));
*_retval = new nsHTMLComboboxTextFieldAccessible(parent, mDOMNode, mPresShell);
if (! *_retval)
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/** ----- nsHTMLComboboxWindowAccessible ----- */
/**
* Constructor -- cache our parent
*/
nsHTMLComboboxWindowAccessible::nsHTMLComboboxWindowAccessible(nsIAccessible* aParent,
nsIDOMNode* aDOMNode,
nsIWeakReference* aShell):
nsComboboxWindowAccessible(aParent, aDOMNode, aShell)
{
}
/**
* Our previous sibling is a nsHTMLComboboxButtonAccessible object
*/
NS_IMETHODIMP nsHTMLComboboxWindowAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
{
nsCOMPtr<nsIAccessible> parent;
GetAccParent(getter_AddRefs(parent));
*_retval = new nsHTMLComboboxButtonAccessible(parent, mDOMNode, mPresShell);
if (! *_retval)
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/**
* We only have one child, a list
*/
NS_IMETHODIMP nsHTMLComboboxWindowAccessible::GetAccLastChild(nsIAccessible **_retval)
{
*_retval = new nsHTMLSelectListAccessible(this, mDOMNode, mPresShell);
if (! *_retval)
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/**
* We only have one child, a list
*/
NS_IMETHODIMP nsHTMLComboboxWindowAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
*_retval = new nsHTMLSelectListAccessible(this, mDOMNode, mPresShell);
if (! *_retval)
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}

View File

@@ -0,0 +1,209 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Original Author: Eric Vaughan (evaughan@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef __nsHTMLSelectAccessible_h__
#define __nsHTMLSelectAccessible_h__
#include "nsCOMPtr.h"
#include "nsIAccessibleSelectable.h"
#include "nsIDOMNode.h"
#include "nsIWeakReference.h"
#include "nsSelectAccessible.h"
/**
* Selects, Listboxes and Comboboxes, are made up of a number of different
* widgets, some of which are shared between the two. This file contains
* all of the widgets for both of the Selects, for HTML only. Some of them
* extend classes from nsSelectAccessible.cpp, which contains base classes
* that are also extended by the XUL Select Accessibility support.
*
* Listbox:
* - nsHTMLListboxAccessible
* - nsHTMLSelctListAccessible
* - nsHTMLSelectOptionAccessible
*
* Comboboxes:
* - nsHTMLComboboxAccessilbe
* - nsHTMLComboboxTextFieldAccessible
* - nsHTMLComboboxButtonAccessible
* - nsHTMLComboboxWindowAccessilbe
* - nsHTMLSelectListAccessible
* - nsHTMLSelectOptionAccessible(s)
*/
/** ------------------------------------------------------ */
/** First, the common widgets */
/** ------------------------------------------------------ */
/*
* The list that contains all the options in the select.
*/
class nsHTMLSelectListAccessible : public nsSelectListAccessible
{
public:
nsHTMLSelectListAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsHTMLSelectListAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
};
/*
* Options inside the select, contained within the list
*/
class nsHTMLSelectOptionAccessible : public nsSelectOptionAccessible
{
public:
nsHTMLSelectOptionAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsHTMLSelectOptionAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
static nsresult GetFocusedOptionNode(nsIWeakReference *aPresShell, nsIDOMNode *aListNode, nsCOMPtr<nsIDOMNode>& aFocusedOptionNode);
};
/** ------------------------------------------------------ */
/** Secondly, the Listbox widget */
/** ------------------------------------------------------ */
/*
* A class the represents the HTML Listbox widget.
*/
class nsHTMLListboxAccessible : public nsListboxAccessible,
public nsIAccessibleSelectable
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLESELECTABLE
nsHTMLListboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsHTMLListboxAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccValue(nsAWritableString& _retval);
};
/** ------------------------------------------------------ */
/** Finally, the Combobox widgets */
/** ------------------------------------------------------ */
/*
* A class the represents the HTML Combobox widget.
*/
class nsHTMLComboboxAccessible : public nsComboboxAccessible
{
public:
nsHTMLComboboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsHTMLComboboxAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccValue(nsAWritableString& _retval);
};
/*
* A class the represents the text field in the Select to the left
* of the drop down button
*/
class nsHTMLComboboxTextFieldAccessible : public nsComboboxTextFieldAccessible
{
public:
nsHTMLComboboxTextFieldAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsHTMLComboboxTextFieldAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
};
/**
* A class that represents the button inside the Select to the
* right of the text field
*/
class nsHTMLComboboxButtonAccessible : public nsComboboxButtonAccessible
{
public:
nsHTMLComboboxButtonAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsHTMLComboboxButtonAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD AccDoAction(PRUint8 index);
};
/*
* A class that represents the window that lives to the right
* of the drop down button inside the Select. This is the window
* that is made visible when the button is pressed.
*/
class nsHTMLComboboxWindowAccessible : public nsComboboxWindowAccessible
{
public:
nsHTMLComboboxWindowAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsHTMLComboboxWindowAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
};
#endif

View File

@@ -0,0 +1,67 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Aaron Leventhal (aaronl@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsHTMLTableAccessible.h"
#include "nsWeakReference.h"
#include "nsReadableUtils.h"
nsHTMLTableCellAccessible::nsHTMLTableCellAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
nsBlockAccessible(aDomNode, aShell)
{
}
/* unsigned long getAccRole (); */
NS_IMETHODIMP nsHTMLTableCellAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_CELL;
return NS_OK;
}
nsHTMLTableAccessible::nsHTMLTableAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
nsBlockAccessible(aDomNode, aShell)
{
}
/* unsigned long getAccRole (); */
NS_IMETHODIMP nsHTMLTableAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_TABLE;
return NS_OK;
}

View File

@@ -0,0 +1,61 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Aaron Leventhal (aaronl@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsHTMLTableAccessible_H_
#define _nsHTMLTableAccessible_H_
#include "nsAccessible.h"
#include "nsBaseWidgetAccessible.h"
class nsHTMLTableCellAccessible : public nsBlockAccessible
{
public:
nsHTMLTableCellAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
};
class nsHTMLTableAccessible : public nsBlockAccessible
{
public:
nsHTMLTableAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
};
#endif

View File

@@ -0,0 +1,51 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Eric Vaughan (evaughan@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsHTMLTextAccessible.h"
nsHTMLTextAccessible::nsHTMLTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
nsTextAccessible(aDomNode, aShell)
{
}
/* wstring getAccName (); */
NS_IMETHODIMP nsHTMLTextAccessible::GetAccName(nsAWritableString& _retval)
{
return mDOMNode->GetNodeValue(_retval);
}

View File

@@ -0,0 +1,54 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsHTMLTextAccessible_H_
#define _nsHTMLTextAccessible_H_
#include "nsFormControlAccessible.h"
class nsIWeakReference;
class nsHTMLTextAccessible : public nsTextAccessible
{
public:
nsHTMLTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAWritableString& _retval);
};
#endif

View File

@@ -0,0 +1,587 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsIAccessible.h"
#include "nsRootAccessible.h"
#include "nsCOMPtr.h"
#include "nsIDocument.h"
#include "nsIDOMNSDocument.h"
#include "nsIPresShell.h"
#include "nsIPresContext.h"
#include "nsIContent.h"
#include "nsIFrame.h"
#include "nsIDOMEventTarget.h"
#include "nsIDOMElement.h"
#include "nsIDOMEventReceiver.h"
#include "nsIDOMEventListener.h"
#include "nsReadableUtils.h"
#include "nsILink.h"
#include "nsHTMLFormControlAccessible.h"
#include "nsHTMLLinkAccessible.h"
#include "nsIURI.h"
#include "nsIDocShell.h"
#include "nsIDocShellTreeItem.h"
#include "nsIWebNavigation.h"
#include "nsIXULDocument.h"
#include "nsIDOMDocument.h"
#include "nsIDOMDocumentType.h"
#include "nsINameSpaceManager.h"
#include "nsIDOMNSHTMLSelectElement.h"
#include "nsIAccessibleSelectable.h"
#include "nsLayoutAtoms.h"
#include "nsString.h"
#include "nsXPIDLString.h"
#include "nsIAccessibilityService.h"
#include "nsIServiceManager.h"
#include "nsHTMLSelectAccessible.h"
#include "nsIDOMHTMLSelectElement.h"
#include "nsIWebProgress.h"
#include "nsCURILoader.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsIScriptGlobalObject.h"
NS_INTERFACE_MAP_BEGIN(nsRootAccessible)
NS_INTERFACE_MAP_ENTRY(nsIAccessibleDocument)
NS_INTERFACE_MAP_ENTRY(nsIAccessibleEventReceiver)
NS_INTERFACE_MAP_ENTRY(nsIDOMFocusListener)
NS_INTERFACE_MAP_ENTRY(nsIDOMFormListener)
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
NS_INTERFACE_MAP_ENTRY(nsITimerCallback)
NS_INTERFACE_MAP_ENTRY(nsIWebProgressListener)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMFormListener)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsIDOMEventListener, nsIDOMFormListener)
NS_INTERFACE_MAP_END_INHERITING(nsAccessible)
NS_IMPL_ADDREF_INHERITED(nsRootAccessible, nsAccessible);
NS_IMPL_RELEASE_INHERITED(nsRootAccessible, nsAccessible);
//-----------------------------------------------------
// construction
//-----------------------------------------------------
nsRootAccessible::nsRootAccessible(nsIWeakReference* aShell):nsAccessible(nsnull,aShell),
nsDocAccessibleMixin(aShell), mAccService(do_GetService("@mozilla.org/accessibilityService;1")),
mBusy(eBusyStateUninitialized)
{
mListener = nsnull;
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (shell) {
shell->GetDocument(getter_AddRefs(mDocument));
mDOMNode = do_QueryInterface(mDocument);
nsLayoutAtoms::AddRefAtoms();
}
}
//-----------------------------------------------------
// destruction
//-----------------------------------------------------
nsRootAccessible::~nsRootAccessible()
{
nsLayoutAtoms::ReleaseAtoms();
RemoveAccessibleEventListener();
}
/* attribute wstring accName; */
NS_IMETHODIMP nsRootAccessible::GetAccName(nsAWritableString& aAccName)
{
return GetTitle(aAccName);
}
// helpers
nsIFrame* nsRootAccessible::GetFrame()
{
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
nsIFrame* root = nsnull;
if (shell)
shell->GetRootFrame(&root);
return root;
}
void nsRootAccessible::GetBounds(nsRect& aBounds, nsIFrame** aRelativeFrame)
{
*aRelativeFrame = GetFrame();
(*aRelativeFrame)->GetRect(aBounds);
}
/* readonly attribute nsIAccessible accParent; */
NS_IMETHODIMP nsRootAccessible::GetAccParent(nsIAccessible * *aAccParent)
{
*aAccParent = nsnull;
return NS_OK;
}
/* readonly attribute unsigned long accRole; */
NS_IMETHODIMP nsRootAccessible::GetAccRole(PRUint32 *aAccRole)
{
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (!shell) {
*aAccRole = 0;
return NS_ERROR_FAILURE;
}
/*
// Commenting this out for now.
// It was requested that we always use pane objects instead of client objects.
// However, it might be asked that we put client objects back.
nsCOMPtr<nsIPresContext> context;
shell->GetPresContext(getter_AddRefs(context));
nsCOMPtr<nsISupports> container;
context->GetContainer(getter_AddRefs(container));
if (container) {
nsCOMPtr<nsIDocShellTreeItem> parentTreeItem, docTreeItem(do_QueryInterface(container));
if (docTreeItem) {
docTreeItem->GetSameTypeParent(getter_AddRefs(parentTreeItem));
// Basically, if this docshell has a parent of the same type, it's a frame
if (parentTreeItem) {
*aAccRole = ROLE_PANE;
return NS_OK;
}
}
}
*aAccRole = ROLE_CLIENT;
*/
*aAccRole = ROLE_PANE;
return NS_OK;
}
NS_IMETHODIMP nsRootAccessible::GetAccState(PRUint32 *aAccState)
{
*aAccState = STATE_FOCUSABLE;
if (mBusy == eBusyStateLoading)
*aAccState |= STATE_BUSY;
return NS_OK;
}
NS_IMETHODIMP nsRootAccessible::GetAccValue(nsAWritableString& aAccValue)
{
return GetURL(aAccValue);
}
void nsRootAccessible::Notify(nsITimer *timer)
{
// Short timer is finished
if (mBusy != eBusyStateDone) {
mBusy = eBusyStateDone;
if (mListener)
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, this);
}
}
NS_IMETHODIMP nsRootAccessible::StartDocReadyTimer()
{
nsresult rv;
if (!mTimer) {
mTimer = do_CreateInstance("@mozilla.org/timer;1", &rv);
if (NS_SUCCEEDED(rv)) {
const PRUint32 kUpdateTimerDelay = 1;
rv = mTimer->Init(NS_STATIC_CAST(nsITimerCallback*, this), kUpdateTimerDelay);
}
}
return rv;
}
/* void addAccessibleEventListener (in nsIAccessibleEventListener aListener); */
NS_IMETHODIMP nsRootAccessible::AddAccessibleEventListener(nsIAccessibleEventListener *aListener)
{
if (mListener)
return NS_OK;
mListener = aListener;
// add an event listener to the document
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (!shell)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIDocument> document;
shell->GetDocument(getter_AddRefs(document));
if (!document)
return NS_ERROR_FAILURE;
// use AddEventListener from the nsIDOMEventTarget interface
nsCOMPtr<nsIDOMEventTarget> target(do_QueryInterface(document));
if (target) {
// capture DOM focus events
nsresult rv = target->AddEventListener(NS_LITERAL_STRING("focus"), NS_STATIC_CAST(nsIDOMFocusListener*, this), PR_TRUE);
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
rv = target->AddEventListener(NS_LITERAL_STRING("blur"), NS_STATIC_CAST(nsIDOMFocusListener*, this), PR_TRUE);
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
// capture Form change events
rv = target->AddEventListener(NS_LITERAL_STRING("change"), NS_STATIC_CAST(nsIDOMFormListener*, this), PR_TRUE);
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
// add ourself as a CheckboxStateChange listener (custom event fired in nsHTMLInputElement.cpp)
rv = target->AddEventListener(NS_LITERAL_STRING("CheckboxStateChange"), NS_STATIC_CAST(nsIDOMFormListener*, this), PR_TRUE);
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
// add ourself as a RadiobuttonStateChange listener (custom event fired in nsHTMLInputElement.cpp)
rv = target->AddEventListener(NS_LITERAL_STRING("RadiobuttonStateChange"), NS_STATIC_CAST(nsIDOMFormListener*, this), PR_TRUE);
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
// Extremely short timer, after which we announce that pane is finished loading
// By waiting until after this short time, we know that the 3rd party accessibility software
// has received it's accessible, and can handle events on it.
StartDocReadyTimer();
}
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mPresShell));
if (presShell) {
nsCOMPtr<nsIPresContext> context;
presShell->GetPresContext(getter_AddRefs(context));
if (context) {
nsCOMPtr<nsISupports> container;
context->GetContainer(getter_AddRefs(container));
if (container) {
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(container));
if (docShell) {
nsCOMPtr<nsIWebProgress> webProgress(do_GetInterface(docShell));
if (webProgress) {
webProgress->AddProgressListener(this);
}
}
}
}
}
return NS_OK;
}
/* void removeAccessibleEventListener (); */
NS_IMETHODIMP nsRootAccessible::RemoveAccessibleEventListener()
{
if (mListener) {
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
nsCOMPtr<nsIDocument> document;
if (shell) {
shell->GetDocument(getter_AddRefs(document));
nsCOMPtr<nsIDOMEventReceiver> eventReceiver(do_QueryInterface(document));
if (eventReceiver) {
nsresult rv = eventReceiver->RemoveEventListenerByIID(NS_STATIC_CAST(nsIDOMFocusListener *, this), NS_GET_IID(nsIDOMFocusListener));
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to unregister listener");
rv = eventReceiver->RemoveEventListenerByIID(NS_STATIC_CAST(nsIDOMFormListener *, this), NS_GET_IID(nsIDOMFormListener));
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to unregister listener");
}
}
}
mListener = nsnull;
return NS_OK;
}
// --------------- nsIDOMEventListener Methods (3) ------------------------
NS_IMETHODIMP nsRootAccessible::HandleEvent(nsIDOMEvent* aEvent)
{
if (mListener) {
// optionTargetNode is set to current option for HTML selects
nsCOMPtr<nsIDOMNode> targetNode, optionTargetNode;
nsresult rv = GetTargetNode(aEvent, targetNode);
if (NS_FAILED(rv))
return rv;
// Check to see if it's a select element. If so, need the currently focused option
nsCOMPtr<nsIDOMHTMLSelectElement> selectElement(do_QueryInterface(targetNode));
if (selectElement) // ----- Target Node is an HTML <select> element ------
nsHTMLSelectOptionAccessible::GetFocusedOptionNode(mPresShell, targetNode, optionTargetNode);
nsAutoString eventType;
aEvent->GetType(eventType);
nsCOMPtr<nsIAccessible> accessible;
if (NS_SUCCEEDED(mAccService->GetAccessibleFor(targetNode, getter_AddRefs(accessible)))) {
if (eventType.EqualsIgnoreCase("focus")) {
if (mCurrentFocus != targetNode) {
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_FOCUS, accessible);
mCurrentFocus = targetNode;
}
}
else if (eventType.EqualsIgnoreCase("change")) {
if (optionTargetNode) { // Set to current option only for HTML selects
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_SELECTION, accessible);
if (mCurrentFocus != optionTargetNode &&
NS_SUCCEEDED(mAccService->GetAccessibleFor(optionTargetNode, getter_AddRefs(accessible)))) {
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_FOCUS, accessible);
mCurrentFocus = optionTargetNode;
}
}
else
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, accessible);
}
else if (eventType.EqualsIgnoreCase("CheckboxStateChange"))
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, accessible);
else if (eventType.EqualsIgnoreCase("RadiobuttonStateChange"))
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, accessible);
}
}
return NS_OK;
}
NS_IMETHODIMP nsRootAccessible::GetTargetNode(nsIDOMEvent *aEvent, nsCOMPtr<nsIDOMNode>& aTargetNode)
{
nsCOMPtr<nsIDOMEventTarget> domEventTarget;
aEvent->GetOriginalTarget(getter_AddRefs(domEventTarget));
nsresult rv;
aTargetNode = do_QueryInterface(domEventTarget, &rv);
return rv;
}
// ------- nsIDOMFocusListener Methods (1) -------------
NS_IMETHODIMP nsRootAccessible::Focus(nsIDOMEvent* aEvent)
{
return HandleEvent(aEvent);
}
NS_IMETHODIMP nsRootAccessible::Blur(nsIDOMEvent* aEvent) { return NS_OK; }
// ------- nsIDOMFormListener Methods (5) -------------
NS_IMETHODIMP nsRootAccessible::Submit(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHODIMP nsRootAccessible::Reset(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHODIMP nsRootAccessible::Change(nsIDOMEvent* aEvent)
{
// get change events when the form elements changes its state, checked->not,
// deleted text, new text, change in selection for list/combo boxes
// this may be the event that we have the individual Accessible objects
// handle themselves -- have list/combos figure out the change in selection
// have textareas and inputs fire a change of state etc...
return HandleEvent(aEvent);
}
// gets Select events when text is selected in a textarea or input
NS_IMETHODIMP nsRootAccessible::Select(nsIDOMEvent* aEvent) { return NS_OK; }
// gets Input events when text is entered or deleted in a textarea or input
NS_IMETHODIMP nsRootAccessible::Input(nsIDOMEvent* aEvent) { return NS_OK; }
// ------- nsIAccessibleDocument Methods (5) ---------------
NS_IMETHODIMP nsRootAccessible::GetURL(nsAWritableString& aURL)
{
return nsDocAccessibleMixin::GetURL(aURL);
}
NS_IMETHODIMP nsRootAccessible::GetTitle(nsAWritableString& aTitle)
{
return nsDocAccessibleMixin::GetTitle(aTitle);
}
NS_IMETHODIMP nsRootAccessible::GetMimeType(nsAWritableString& aMimeType)
{
return nsDocAccessibleMixin::GetMimeType(aMimeType);
}
NS_IMETHODIMP nsRootAccessible::GetDocType(nsAWritableString& aDocType)
{
return nsDocAccessibleMixin::GetDocType(aDocType);
}
NS_IMETHODIMP nsRootAccessible::GetNameSpaceURIForID(PRInt16 aNameSpaceID, nsAWritableString& aNameSpaceURI)
{
return nsDocAccessibleMixin::GetNameSpaceURIForID(aNameSpaceID, aNameSpaceURI);
}
NS_IMETHODIMP nsRootAccessible::GetDocument(nsIDocument **doc)
{
return nsDocAccessibleMixin::GetDocument(doc);
}
NS_IMETHODIMP nsRootAccessible::OnStateChange(nsIWebProgress *aWebProgress,
nsIRequest *aRequest, PRInt32 aStateFlags, PRUint32 aStatus)
{
return NS_OK;
}
/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */
NS_IMETHODIMP nsRootAccessible::OnProgressChange(nsIWebProgress *aWebProgress,
nsIRequest *aRequest, PRInt32 aCurSelfProgress, PRInt32 aMaxSelfProgress,
PRInt32 aCurTotalProgress, PRInt32 aMaxTotalProgress)
{
return NS_OK;
}
/* void onLocationChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsIURI location); */
NS_IMETHODIMP nsRootAccessible::OnLocationChange(nsIWebProgress *aWebProgress,
nsIRequest *aRequest, nsIURI *location)
{
// Load has been verified, it will occur, about to commence
if (mListener && mBusy != eBusyStateLoading) {
mBusy = eBusyStateLoading;
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, this);
StartDocReadyTimer();
}
return NS_OK;
}
/* void onStatusChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsresult aStatus, in wstring aMessage); */
NS_IMETHODIMP nsRootAccessible::OnStatusChange(nsIWebProgress *aWebProgress,
nsIRequest *aRequest, nsresult aStatus, const PRUnichar *aMessage)
{
return NS_OK;
}
/* void onSecurityChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long state); */
NS_IMETHODIMP nsRootAccessible::OnSecurityChange(nsIWebProgress *aWebProgress,
nsIRequest *aRequest, PRInt32 state)
{
return NS_OK;
}
nsDocAccessibleMixin::nsDocAccessibleMixin(nsIDocument *aDoc):mDocument(aDoc)
{
}
nsDocAccessibleMixin::nsDocAccessibleMixin(nsIWeakReference *aPresShell)
{
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(aPresShell));
if (shell)
shell->GetDocument(getter_AddRefs(mDocument));
}
nsDocAccessibleMixin::~nsDocAccessibleMixin()
{
}
NS_IMETHODIMP nsDocAccessibleMixin::GetURL(nsAWritableString& aURL)
{
nsCOMPtr<nsIPresShell> presShell;
mDocument->GetShellAt(0, getter_AddRefs(presShell));
NS_ASSERTION(presShell,"Shell is gone!!! What are we doing here?");
nsCOMPtr<nsIDocShell> docShell;
GetDocShellFromPS(presShell, getter_AddRefs(docShell));
nsCOMPtr<nsIWebNavigation> webNav(do_GetInterface(docShell));
nsXPIDLCString theURL;
if (webNav) {
nsCOMPtr<nsIURI> pURI;
webNav->GetCurrentURI(getter_AddRefs(pURI));
if (pURI)
pURI->GetSpec(getter_Copies(theURL));
}
//XXXaaronl Need to use CopyUTF8toUCS2(nsDependentCString(theURL), aURL); when it's written
aURL.Assign(NS_ConvertUTF8toUCS2(theURL).get());
return NS_OK;
}
NS_IMETHODIMP nsDocAccessibleMixin::GetTitle(nsAWritableString& aTitle)
{
// This doesn't leak - we don't own the const pointer that's returned
aTitle = *(mDocument->GetDocumentTitle());
return NS_OK;
}
NS_IMETHODIMP nsDocAccessibleMixin::GetMimeType(nsAWritableString& aMimeType)
{
nsCOMPtr<nsIDOMNSDocument> domnsDocument(do_QueryInterface(mDocument));
if (domnsDocument) {
return domnsDocument->GetContentType(aMimeType);
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsDocAccessibleMixin::GetDocType(nsAWritableString& aDocType)
{
nsCOMPtr<nsIXULDocument> xulDoc(do_QueryInterface(mDocument));
nsCOMPtr<nsIDOMDocument> domDoc(do_QueryInterface(mDocument));
nsCOMPtr<nsIDOMDocumentType> docType;
if (xulDoc) {
aDocType = NS_LITERAL_STRING("window"); // doctype not implemented for XUL at time of writing - causes assertion
return NS_OK;
}
else if (domDoc && NS_SUCCEEDED(domDoc->GetDoctype(getter_AddRefs(docType))) && docType) {
return docType->GetName(aDocType);
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsDocAccessibleMixin::GetNameSpaceURIForID(PRInt16 aNameSpaceID, nsAWritableString& aNameSpaceURI)
{
if (mDocument) {
nsCOMPtr<nsINameSpaceManager> nameSpaceManager;
if (NS_SUCCEEDED(mDocument->GetNameSpaceManager(*getter_AddRefs(nameSpaceManager))))
return nameSpaceManager->GetNameSpaceURI(aNameSpaceID, aNameSpaceURI);
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsDocAccessibleMixin::GetDocument(nsIDocument **doc)
{
*doc = mDocument;
if (mDocument) {
NS_IF_ADDREF(*doc);
return NS_OK;
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsDocAccessibleMixin::GetDocShellFromPS(nsIPresShell* aPresShell, nsIDocShell** aDocShell)
{
*aDocShell = nsnull;
if (aPresShell) {
nsCOMPtr<nsIDocument> doc;
aPresShell->GetDocument(getter_AddRefs(doc));
if (doc) {
nsCOMPtr<nsIScriptGlobalObject> scriptObj;
doc->GetScriptGlobalObject(getter_AddRefs(scriptObj));
if (scriptObj) {
scriptObj->GetDocShell(aDocShell);
if (*aDocShell)
return NS_OK;
}
}
}
return NS_ERROR_FAILURE;
}

View File

@@ -0,0 +1,140 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsRootAccessible_H_
#define _nsRootAccessible_H_
#include "nsAccessible.h"
#include "nsIAccessibleEventReceiver.h"
#include "nsIAccessibleEventListener.h"
#include "nsIAccessibleDocument.h"
#include "nsIDOMFormListener.h"
#include "nsIDOMFocusListener.h"
#include "nsIDocument.h"
#include "nsIAccessibilityService.h"
#include "nsIWebProgressListener.h"
#include "nsIWeakReference.h"
#include "nsITimer.h"
#include "nsITimerCallback.h"
class nsDocAccessibleMixin
{
public:
nsDocAccessibleMixin(nsIDocument *doc);
nsDocAccessibleMixin(nsIWeakReference *aShell);
virtual ~nsDocAccessibleMixin();
NS_DECL_NSIACCESSIBLEDOCUMENT
protected:
NS_IMETHOD GetDocShellFromPS(nsIPresShell* aPresShell, nsIDocShell** aDocShell);
PRBool mTopLevelDocument;
nsCOMPtr<nsIDocument> mDocument;
};
class nsRootAccessible : public nsAccessible,
public nsDocAccessibleMixin,
public nsIAccessibleDocument,
public nsIAccessibleEventReceiver,
public nsIDOMFocusListener,
public nsIDOMFormListener,
public nsIWebProgressListener,
public nsITimerCallback,
public nsSupportsWeakReference
{
NS_DECL_ISUPPORTS_INHERITED
public:
enum EBusyState {eBusyStateUninitialized, eBusyStateLoading, eBusyStateDone};
nsRootAccessible(nsIWeakReference* aShell);
virtual ~nsRootAccessible();
/* attribute wstring accName; */
NS_IMETHOD GetAccName(nsAWritableString& aAccName);
NS_IMETHOD GetAccValue(nsAWritableString& aAccValue);
NS_IMETHOD GetAccParent(nsIAccessible * *aAccParent);
NS_IMETHOD GetAccRole(PRUint32 *aAccRole);
NS_IMETHOD GetAccState(PRUint32 *aAccState);
// ----- nsIAccessibleEventReceiver -------------------
NS_IMETHOD AddAccessibleEventListener(nsIAccessibleEventListener *aListener);
NS_IMETHOD RemoveAccessibleEventListener();
// ----- nsIDOMEventListener --------------------------
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent);
// ----- nsIDOMFocusListener --------------------------
NS_IMETHOD Focus(nsIDOMEvent* aEvent);
NS_IMETHOD Blur(nsIDOMEvent* aEvent);
// ----- nsIDOMFormListener ---------------------------
NS_IMETHOD Submit(nsIDOMEvent* aEvent);
NS_IMETHOD Reset(nsIDOMEvent* aEvent);
NS_IMETHOD Change(nsIDOMEvent* aEvent);
NS_IMETHOD Select(nsIDOMEvent* aEvent);
NS_IMETHOD Input(nsIDOMEvent* aEvent);
NS_IMETHOD_(void) Notify(nsITimer *timer);
NS_IMETHOD StartDocReadyTimer();
NS_DECL_NSIACCESSIBLEDOCUMENT
NS_DECL_NSIWEBPROGRESSLISTENER
protected:
NS_IMETHOD GetTargetNode(nsIDOMEvent *aEvent, nsCOMPtr<nsIDOMNode>& aTargetNode);
virtual void GetBounds(nsRect& aRect, nsIFrame** aRelativeFrame);
virtual nsIFrame* GetFrame();
// mListener is not a com pointer. We don't own the listener
// it is the callers responsibility to remove the listener
// otherwise we will get into circular referencing problems
// We don't need a weak reference, because we're owned by this listener
nsIAccessibleEventListener *mListener;
nsCOMPtr<nsITimer> mTimer;
nsCOMPtr<nsIDOMNode> mCurrentFocus;
nsCOMPtr<nsIAccessibilityService> mAccService;
EBusyState mBusy;
};
#endif

View File

@@ -0,0 +1,680 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Original Author: Eric Vaughan (evaughan@netscape.com)
* Contributor(s): John Gaunt (jgaunt@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsCOMPtr.h"
#include "nsFormControlAccessible.h"
#include "nsIAtom.h"
#include "nsIComboboxControlFrame.h"
#include "nsIDOMEventReceiver.h"
#include "nsIDOMHTMLCollection.h"
#include "nsIDOMHTMLOptionElement.h"
#include "nsIDOMHTMLSelectElement.h"
#include "nsIFrame.h"
#include "nsIListControlFrame.h"
#include "nsISelectControlFrame.h"
#include "nsLayoutAtoms.h"
#include "nsRootAccessible.h"
#include "nsSelectAccessible.h"
/** ------------------------------------------------------ */
/** First, the common widgets */
/** ------------------------------------------------------ */
/** Constructor -- cache our parent */
nsSelectListAccessible::nsSelectListAccessible(nsIAccessible* aParent,
nsIDOMNode* aDOMNode,
nsIWeakReference* aShell)
:nsAccessible(aDOMNode, aShell)
{
mParent = aParent;
}
/** Return our parents bounds */
NS_IMETHODIMP nsSelectListAccessible::AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height)
{
return mParent->AccGetBounds(x,y,width,height);
}
/** Return our cached parent */
NS_IMETHODIMP nsSelectListAccessible::GetAccParent(nsIAccessible **_retval)
{
*_retval = mParent;
NS_ADDREF(*_retval);
return NS_OK;
}
/** We are a list */
NS_IMETHODIMP nsSelectListAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_LIST;
return NS_OK;
}
/** We are an only child */
NS_IMETHODIMP nsSelectListAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/** We are an only child */
NS_IMETHODIMP nsSelectListAccessible::GetAccNextSibling(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/**
* nsSelectOptionAccessible
*/
/** Constructor -- cache our parent */
nsSelectOptionAccessible::nsSelectOptionAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsLeafAccessible(aDOMNode, aShell)
{
mParent = aParent;
}
/** We are a ListItem */
NS_IMETHODIMP nsSelectOptionAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_LISTITEM;
return NS_OK;
}
/** Return our cached parent */
NS_IMETHODIMP nsSelectOptionAccessible::GetAccParent(nsIAccessible **_retval)
{
*_retval = mParent;
NS_IF_ADDREF(*_retval);
return NS_OK;
}
/**
* Get our Name from our Content's subtree
*/
NS_IMETHODIMP nsSelectOptionAccessible::GetAccName(nsAWritableString& _retval)
{
nsCOMPtr<nsIContent> content (do_QueryInterface(mDOMNode));
if (!content) {
return NS_ERROR_FAILURE;
}
nsAutoString option;
nsresult rv = AppendFlatStringFromSubtree(content, &option);
if (NS_SUCCEEDED(rv)) {
// Temp var needed until CompressWhitespace built for nsAWritableString
option.CompressWhitespace();
_retval.Assign(option);
}
return rv;
}
/** ------------------------------------------------------ */
/** Secondly, the Listbox widget */
/** ------------------------------------------------------ */
/** ----- nsListboxAccessible ----- */
/** Constructor */
nsListboxAccessible::nsListboxAccessible(nsIDOMNode* aDOMNode,
nsIWeakReference* aShell):
nsAccessible(aDOMNode, aShell)
{
}
/** We are a window, as far as MSAA is concerned */
NS_IMETHODIMP nsListboxAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_WINDOW;
return NS_OK;
}
/**
* We always have 1 child: a subclass of nsSelectListAccessible.
*/
NS_IMETHODIMP nsListboxAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 1;
return NS_OK;
}
/**
* As a nsHTMLListboxAccessible we can have the following states:
* STATE_FOCUSED
* STATE_READONLY
* STATE_FOCUSABLE
*/
NS_IMETHODIMP nsListboxAccessible::GetAccState(PRUint32 *_retval)
{
// Get focus status from base class
nsAccessible::GetAccState(_retval);
*_retval |= STATE_READONLY | STATE_FOCUSABLE;
return NS_OK;
}
/** ------------------------------------------------------ */
/** Finally, the Combobox widgets */
/** ------------------------------------------------------ */
/** ----- nsComboboxAccessible ----- */
/**
* Constructor -- set initial state - closed, register ourself
*/
nsComboboxAccessible::nsComboboxAccessible(nsIDOMNode* aDOMNode,
nsIWeakReference* aShell):
nsAccessible(aDOMNode, aShell)
{
mRegistered = PR_FALSE;
mOpen = PR_FALSE;
SetupMenuListener();
}
/**
* Destructor -- If we are registered, remove ourselves as a listener.
*/
nsComboboxAccessible::~nsComboboxAccessible()
{
if (mRegistered) {
nsCOMPtr<nsIDOMEventReceiver> eventReceiver(do_QueryInterface(mDOMNode));
if (eventReceiver)
eventReceiver->RemoveEventListener(NS_LITERAL_STRING("popupshowing"), this, PR_TRUE);
}
}
/**
* Inherit the ISupports impl from nsAccessible,
* handle nsIDOMXULListener and nsIAccessibleSelectable ourself
*/
NS_IMPL_ISUPPORTS_INHERITED2(nsComboboxAccessible, nsAccessible, nsIDOMXULListener, nsIAccessibleSelectable)
/**
* If we aren't already registered, register ourselves as a
* listener to "popupshowing" events on our DOM node. Set our
* state to registered, but don't notify MSAA as they
* don't need to know about this state.
*/
void
nsComboboxAccessible::SetupMenuListener()
{
// if not already registered as a popup listener, register ourself
if (!mRegistered) {
nsCOMPtr<nsIDOMEventReceiver> eventReceiver(do_QueryInterface(mDOMNode));
if (eventReceiver && NS_SUCCEEDED(eventReceiver->AddEventListener(NS_LITERAL_STRING("popupshowing"), this, PR_TRUE)))
mRegistered = PR_TRUE;
}
}
/** We are a combobox */
NS_IMETHODIMP nsComboboxAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_COMBOBOX;
return NS_OK;
}
/**
* We always have 3 children: TextField, Button, Window. In that order
*/
NS_IMETHODIMP nsComboboxAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 3;
return NS_OK;
}
/**
* nsIAccessibleSelectable method. No-op because our selection is returned through
* GetValue(). This _may_ change just to provide additional info for the vendors
* and another option for them to get at stuff. Despite the fact that we are
* single selection only.
*/
NS_IMETHODIMP nsComboboxAccessible::GetSelectedChildren(nsISupportsArray **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/**
* As a nsComboboxAccessible we can have the following states:
* STATE_FOCUSED
* STATE_READONLY
* STATE_FOCUSABLE
* STATE_HASPOPUP
* STATE_EXPANDED
* STATE_COLLAPSED
*/
NS_IMETHODIMP nsComboboxAccessible::GetAccState(PRUint32 *_retval)
{
// Get focus status from base class
nsAccessible::GetAccState(_retval);
if (mOpen)
*_retval |= STATE_EXPANDED;
else
*_retval |= STATE_COLLAPSED;
*_retval |= STATE_HASPOPUP | STATE_READONLY | STATE_FOCUSABLE;
return NS_OK;
}
/**
* Set our state to open and (TBD) fire an event to MSAA saying our state
* has changed.
*/
NS_IMETHODIMP nsComboboxAccessible::PopupShowing(nsIDOMEvent* aEvent)
{
mOpen = PR_TRUE;
/* TBD send state change event */
return NS_OK;
}
/**
* Set our state to not open and (TDB) fire an event to MSAA saying
* our state has changed.
*/
NS_IMETHODIMP nsComboboxAccessible::PopupHiding(nsIDOMEvent* aEvent)
{
mOpen = PR_FALSE;
/* TBD send state change event */
return NS_OK;
}
/**
* Set our state to not open and (TDB) fire an event to MSAA saying
* our state has changed.
*/
NS_IMETHODIMP nsComboboxAccessible::Close(nsIDOMEvent* aEvent)
{
mOpen = PR_FALSE;
/* TBD send state change event */
return NS_OK;
}
/** ----- nsComboboxTextFieldAccessible ----- */
/** Constructor */
nsComboboxTextFieldAccessible::nsComboboxTextFieldAccessible(nsIAccessible* aParent,
nsIDOMNode* aDOMNode,
nsIWeakReference* aShell):
nsLeafAccessible(aDOMNode, aShell)
{
mParent = aParent;
}
/**
* Currently gets the text from the first option, needs to check for selection
* and then return that text.
* Walks the Frame tree and checks for proper frames.
*/
NS_IMETHODIMP nsComboboxTextFieldAccessible::GetAccValue(nsAWritableString& _retval)
{
nsIFrame* frame = nsAccessible::GetBoundsFrame();
nsCOMPtr<nsIPresContext> context;
GetPresContext(context);
if (!frame || !context)
return NS_ERROR_FAILURE;
frame->FirstChild(context, nsnull, &frame);
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::blockFrame))
return NS_ERROR_FAILURE;
#endif
frame->FirstChild(context, nsnull, &frame);
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::textFrame))
return NS_ERROR_FAILURE;
#endif
nsCOMPtr<nsIContent> content;
frame->GetContent(getter_AddRefs(content));
if (!content)
return NS_ERROR_FAILURE;
AppendFlatStringFromSubtree(content, &_retval);
return NS_OK;
}
/**
* Gets the bounds for the BlockFrame.
* Walks the Frame tree and checks for proper frames.
*/
void nsComboboxTextFieldAccessible::GetBounds(nsRect& aBounds, nsIFrame** aBoundingFrame)
{
// get our first child's frame
nsIFrame* frame = nsAccessible::GetBoundsFrame();
nsCOMPtr<nsIPresContext> context;
GetPresContext(context);
if (!frame || !context)
return;
frame->FirstChild(context, nsnull, aBoundingFrame);
frame->FirstChild(context, nsnull, &frame);
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::blockFrame))
return;
#endif
frame->GetRect(aBounds);
}
/** Return our cached parent */
NS_IMETHODIMP nsComboboxTextFieldAccessible::GetAccParent(nsIAccessible **_retval)
{
*_retval = mParent;
NS_IF_ADDREF(*_retval);
return NS_OK;
}
/**
* We are the first child of our parent, no previous sibling
*/
NS_IMETHODIMP nsComboboxTextFieldAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/**
* Our role is currently only static text, but we should be able to have
* editable text here and we need to check that case.
*/
NS_IMETHODIMP nsComboboxTextFieldAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_STATICTEXT;
return NS_OK;
}
/**
* As a nsComboboxTextFieldAccessible we can have the following states:
* STATE_READONLY
* STATE_FOCUSED
* STATE_FOCUSABLE
*/
NS_IMETHODIMP nsComboboxTextFieldAccessible::GetAccState(PRUint32 *_retval)
{
// Get focus status from base class
nsAccessible::GetAccState(_retval);
*_retval |= STATE_READONLY | STATE_FOCUSABLE;
return NS_OK;
}
/** -----ComboboxButtonAccessible ----- */
/** Constructor -- cache our parent */
nsComboboxButtonAccessible::nsComboboxButtonAccessible(nsIAccessible* aParent,
nsIDOMNode* aDOMNode,
nsIWeakReference* aShell):
nsLeafAccessible(aDOMNode, aShell)
{
mParent = aParent;
}
/** Just one action ( click ). */
NS_IMETHODIMP nsComboboxButtonAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
}
/**
* Gets the bounds for the gfxButtonControlFrame.
* Walks the Frame tree and checks for proper frames.
*/
void nsComboboxButtonAccessible::GetBounds(nsRect& aBounds, nsIFrame** aBoundingFrame)
{
// get our second child's frame
nsIFrame* frame = nsAccessible::GetBoundsFrame();
nsCOMPtr<nsIPresContext> context;
GetPresContext(context);
if (!context)
return;
frame->FirstChild(context, nsnull, &frame);
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::blockFrame))
return;
#endif
frame->GetNextSibling(aBoundingFrame);
frame->GetNextSibling(&frame);
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::gfxButtonControlFrame))
return;
#endif
frame->GetRect(aBounds);
}
/** We are a button. */
NS_IMETHODIMP nsComboboxButtonAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_PUSHBUTTON;
return NS_OK;
}
/** Return our cached parent */
NS_IMETHODIMP nsComboboxButtonAccessible::GetAccParent(nsIAccessible **_retval)
{
*_retval = mParent;
NS_IF_ADDREF(*_retval);
return NS_OK;
}
/**
* Gets the name from GetAccActionName()
*/
NS_IMETHODIMP nsComboboxButtonAccessible::GetAccName(nsAWritableString& _retval)
{
return GetAccActionName(eAction_Click, _retval);
}
/**
* Our action name is the reverse of our state:
* if we are closed -> open is our name.
* if we are open -> closed is our name.
* Uses the frame to get the state, updated on every click
*/
NS_IMETHODIMP nsComboboxButtonAccessible::GetAccActionName(PRUint8 index, nsAWritableString& _retval)
{
PRBool isOpen = PR_FALSE;
nsIFrame *boundsFrame = GetBoundsFrame();
nsIComboboxControlFrame* comboFrame;
boundsFrame->QueryInterface(NS_GET_IID(nsIComboboxControlFrame), (void**)&comboFrame);
if (!comboFrame)
return NS_ERROR_FAILURE;
comboFrame->IsDroppedDown(&isOpen);
if (isOpen)
_retval = NS_LITERAL_STRING("Close");
else
_retval = NS_LITERAL_STRING("Open");
return NS_OK;
}
/**
* As a nsComboboxButtonAccessible we can have the following states:
* STATE_PRESSED
* STATE_FOCUSED
* STATE_FOCUSABLE
*/
NS_IMETHODIMP nsComboboxButtonAccessible::GetAccState(PRUint32 *_retval)
{
// Get focus status from base class
nsAccessible::GetAccState(_retval);
// we are open or closed --> pressed or not
PRBool isOpen = PR_FALSE;
nsIFrame *boundsFrame = GetBoundsFrame();
nsIComboboxControlFrame* comboFrame;
boundsFrame->QueryInterface(NS_GET_IID(nsIComboboxControlFrame), (void**)&comboFrame);
if (!comboFrame)
return NS_ERROR_FAILURE;
comboFrame->IsDroppedDown(&isOpen);
if (isOpen)
*_retval |= STATE_PRESSED;
*_retval |= STATE_FOCUSABLE;
return NS_OK;
}
/** ----- nsComboboxWindowAccessible ----- */
/**
* Constructor -- cache our parent
*/
nsComboboxWindowAccessible::nsComboboxWindowAccessible(nsIAccessible* aParent,
nsIDOMNode* aDOMNode,
nsIWeakReference* aShell):
nsAccessible(aDOMNode, aShell)
{
mParent = aParent;
}
/**
* As a nsComboboxWindowAccessible we can have the following states:
* STATE_FOCUSED
* STATE_FOCUSABLE
* STATE_INVISIBLE
* STATE_FLOATING
*/
NS_IMETHODIMP nsComboboxWindowAccessible::GetAccState(PRUint32 *_retval)
{
// Get focus status from base class
nsAccessible::GetAccState(_retval);
// we are open or closed
PRBool isOpen = PR_FALSE;
nsIFrame *boundsFrame = GetBoundsFrame();
nsIComboboxControlFrame* comboFrame = nsnull;
boundsFrame->QueryInterface(NS_GET_IID(nsIComboboxControlFrame), (void**)&comboFrame);
if (!comboFrame)
return NS_ERROR_FAILURE;
comboFrame->IsDroppedDown(&isOpen);
if (! isOpen)
*_retval |= STATE_INVISIBLE;
*_retval |= STATE_FOCUSABLE | STATE_FLOATING;
return NS_OK;
}
/** We are a window */
NS_IMETHODIMP nsComboboxWindowAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_WINDOW;
return NS_OK;
}
/** Return our cached parent */
NS_IMETHODIMP nsComboboxWindowAccessible::GetAccParent(nsIAccessible **_retval)
{
*_retval = mParent;
NS_IF_ADDREF(*_retval);
return NS_OK;
}
/**
* We are the last sibling of our parent.
*/
NS_IMETHODIMP nsComboboxWindowAccessible::GetAccNextSibling(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/**
* We only have one child, a list
*/
NS_IMETHODIMP nsComboboxWindowAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 1;
return NS_OK;
}
/**
* Gets the bounds for the areaFrame.
* Walks the Frame tree and checks for proper frames.
*/
void nsComboboxWindowAccessible::GetBounds(nsRect& aBounds, nsIFrame** aBoundingFrame)
{
// get our first option
nsCOMPtr<nsIDOMNode> child;
mDOMNode->GetFirstChild(getter_AddRefs(child));
// now get its frame
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (!shell) {
*aBoundingFrame = nsnull;
return;
}
nsIFrame* frame = nsnull;
nsCOMPtr<nsIContent> content(do_QueryInterface(child));
shell->GetPrimaryFrameFor(content, &frame);
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::blockFrame))
return;
#endif
frame->GetParent(aBoundingFrame);
frame->GetParent(&frame);
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::areaFrame))
return;
#endif
frame->GetRect(aBounds);
}

View File

@@ -0,0 +1,237 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Original Author: Eric Vaughan (evaughan@netscape.com)
* Contributor(s): John Gaunt (jgaunt@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef __nsSelectAccessible_h__
#define __nsSelectAccessible_h__
#include "nsBaseWidgetAccessible.h"
#include "nsIAccessibleSelectable.h"
#include "nsIDOMXULListener.h"
/** ------------------------------------------------------ */
/** First, the common widgets */
/** ------------------------------------------------------ */
/**
* The list that contains all the options in the select.
*/
class nsSelectListAccessible : public nsAccessible
{
public:
nsSelectListAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsSelectListAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height);
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
protected:
nsCOMPtr<nsIAccessible> mParent;
};
/**
* Options inside the select, contained within the list
*/
class nsSelectOptionAccessible : public nsLeafAccessible
{
public:
nsSelectOptionAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsSelectOptionAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccName(nsAWritableString& _retval);
protected:
nsCOMPtr<nsIAccessible> mParent;
};
/** ------------------------------------------------------ */
/** Secondly, the Listbox widget */
/** ------------------------------------------------------ */
/**
* A class that represents the Listbox widget.
*/
class nsListboxAccessible : public nsAccessible
{
public:
nsListboxAccessible (nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsListboxAccessible () {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
};
/** ------------------------------------------------------ */
/** Finally, the Combobox widgets */
/** ------------------------------------------------------ */
/**
* A class the represents the HTML Combobox widget.
*/
class nsComboboxAccessible : public nsAccessible,
public nsIAccessibleSelectable,
public nsIDOMXULListener
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLESELECTABLE
nsComboboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsComboboxAccessible();
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
/* ----- nsIDOMXULListener ----- */
NS_IMETHOD PopupShowing(nsIDOMEvent* aEvent);
NS_IMETHOD PopupShown(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD PopupHiding(nsIDOMEvent* aEvent);
NS_IMETHOD PopupHidden(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD Close(nsIDOMEvent* aEvent);
NS_IMETHOD Command(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD Broadcast(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD CommandUpdate(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) { return NS_OK; }
virtual void SetupMenuListener();
protected:
PRBool mRegistered;
PRBool mOpen;
};
/**
* A class the represents the text field in the Combobox to the left
* of the drop down button
*/
class nsComboboxTextFieldAccessible : public nsLeafAccessible
{
public:
nsComboboxTextFieldAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsComboboxTextFieldAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAWritableString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
virtual void GetBounds(nsRect& aBounds, nsIFrame** aBoundingFrame);
protected:
nsCOMPtr<nsIAccessible> mParent;
};
/**
* A class that represents the button inside the Select to the
* right of the text field
*/
class nsComboboxButtonAccessible : public nsLeafAccessible
{
public:
nsComboboxButtonAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsComboboxButtonAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccName(nsAWritableString& _retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
virtual void GetBounds(nsRect& aBounds, nsIFrame** aBoundingFrame);
protected:
nsCOMPtr<nsIAccessible> mParent;
};
/**
* A class that represents the window that lives to the right
* of the drop down button inside the Select. This is the window
* that is made visible when the button is pressed.
*/
class nsComboboxWindowAccessible : public nsAccessible
{
public:
nsComboboxWindowAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsComboboxWindowAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
virtual void GetBounds(nsRect& aBounds, nsIFrame** aBoundingFrame);
protected:
nsCOMPtr<nsIAccessible> mParent;
};
#endif

View File

@@ -0,0 +1,212 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: John Gaunt (jgaunt@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
// NOTE: alphabetically ordered
#include "nsIDocument.h"
#include "nsIDOMNodeList.h"
#include "nsIDOMXULButtonElement.h"
#include "nsIDOMXULCheckboxElement.h"
#include "nsIDOMXULDescriptionElement.h"
#include "nsIDOMXULDocument.h"
#include "nsIDOMXULLabelElement.h"
#include "nsIDOMXULSelectCntrlEl.h"
#include "nsIDOMXULSelectCntrlItemEl.h"
#include "nsReadableUtils.h"
#include "nsString.h"
#include "nsXULFormControlAccessible.h"
/**
* XUL Button: can contain arbitrary HTML content
*/
/**
* Default Constructor
*/
nsXULButtonAccessible::nsXULButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsFormControlAccessible(aNode, aShell)
{
}
/**
* Only one actions available
*/
NS_IMETHODIMP nsXULButtonAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;;
}
/**
* Return the name of our only action
*/
NS_IMETHODIMP nsXULButtonAccessible::GetAccActionName(PRUint8 index, nsAWritableString& _retval)
{
if (index == eAction_Click) {
_retval = NS_LITERAL_STRING("press");
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
/**
* Tell the button to do it's action
*/
NS_IMETHODIMP nsXULButtonAccessible::AccDoAction(PRUint8 index)
{
if (index == 0) {
nsCOMPtr<nsIDOMXULButtonElement> buttonElement(do_QueryInterface(mDOMNode));
if ( buttonElement )
{
buttonElement->DoCommand();
return NS_OK;
}
return NS_ERROR_FAILURE;
}
return NS_ERROR_INVALID_ARG;
}
/**
* We are a pushbutton
*/
NS_IMETHODIMP nsXULButtonAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_PUSHBUTTON;
return NS_OK;
}
/**
* Possible states: focused, focusable, unavailable(disabled)
*/
NS_IMETHODIMP nsXULButtonAccessible::GetAccState(PRUint32 *_retval)
{
// get focus and disable status from base class
nsFormControlAccessible::GetAccState(_retval);
*_retval |= STATE_FOCUSABLE;
return NS_OK;
}
/**
* XUL checkbox
*/
/**
* Default Constructor
*/
nsXULCheckboxAccessible::nsXULCheckboxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsFormControlAccessible(aNode, aShell)
{
}
/**
* We are a CheckButton
*/
NS_IMETHODIMP nsXULCheckboxAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_CHECKBUTTON;
return NS_OK;
}
/**
* Only one action available
*/
NS_IMETHODIMP nsXULCheckboxAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
}
/**
* Return the name of our only action
*/
NS_IMETHODIMP nsXULCheckboxAccessible::GetAccActionName(PRUint8 index, nsAWritableString& _retval)
{
if (index == eAction_Click) {
// check or uncheck
PRUint32 state;
GetAccState(&state);
if (state & STATE_CHECKED)
_retval = NS_LITERAL_STRING("uncheck");
else
_retval = NS_LITERAL_STRING("check");
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
/**
* Tell the checkbox to do its only action -- check( or uncheck) itself
*/
NS_IMETHODIMP nsXULCheckboxAccessible::AccDoAction(PRUint8 index)
{
if (index == eAction_Click) {
PRBool checked = PR_FALSE;
nsCOMPtr<nsIDOMXULCheckboxElement> xulCheckboxElement(do_QueryInterface(mDOMNode));
if (xulCheckboxElement) {
xulCheckboxElement->GetChecked(&checked);
xulCheckboxElement->SetChecked(!checked);
return NS_OK;
}
return NS_ERROR_FAILURE;
}
return NS_ERROR_INVALID_ARG;
}
/**
* Possible states: focused, focusable, unavailable(disabled), checked
*/
NS_IMETHODIMP nsXULCheckboxAccessible::GetAccState(PRUint32 *_retval)
{
// Get focus and disable status from base class
nsFormControlAccessible::GetAccState(_retval);
// Determine Checked state
PRBool checked = PR_FALSE;
nsCOMPtr<nsIDOMXULCheckboxElement> xulCheckboxElement(do_QueryInterface(mDOMNode));
if (xulCheckboxElement)
xulCheckboxElement->GetChecked(&checked);
if (checked)
*_retval |= STATE_CHECKED;
return NS_OK;
}

View File

@@ -0,0 +1,71 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: John Gaunt (jgaunt@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsXULFormControlAccessible_H_
#define _nsXULFormControlAccessible_H_
// NOTE: alphabetically ordered
#include "nsBaseWidgetAccessible.h"
#include "nsFormControlAccessible.h"
#include "nsHTMLFormControlAccessible.h"
class nsXULButtonAccessible : public nsFormControlAccessible
{
public:
nsXULButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
};
class nsXULCheckboxAccessible : public nsFormControlAccessible
{
public:
nsXULCheckboxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccState(PRUint32 *_retval);
};
#endif

View File

@@ -0,0 +1,62 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: John Gaunt (jgaunt@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
// NOTE: alphabetically ordered
#include "nsIDOMXULDescriptionElement.h"
#include "nsWeakReference.h"
#include "nsXULTextAccessible.h"
/**
* For XUL descriptions and labels
*/
nsXULTextAccessible::nsXULTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
nsTextAccessible(aDomNode, aShell)
{
}
/* wstring getAccName (); */
NS_IMETHODIMP nsXULTextAccessible::GetAccName(nsAWritableString& _retval)
{
nsCOMPtr<nsIDOMXULDescriptionElement> descriptionElement(do_QueryInterface(mDOMNode));
if (descriptionElement) {
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
return AppendFlatStringFromSubtree(content, &_retval);
}
return NS_ERROR_FAILURE;
}

View File

@@ -0,0 +1,55 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: John Gaunt (jgaunt@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsXULTextAccessible_H_
#define _nsXULTextAccessible_H_
#include "nsFormControlAccessible.h"
class nsIWeakReference;
class nsXULTextAccessible : public nsTextAccessible
{
public:
nsXULTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAWritableString& _retval);
};
#endif

View File

@@ -0,0 +1,212 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: John Gaunt (jgaunt@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
// NOTE: alphabetically ordered
#include "nsIDocument.h"
#include "nsIDOMNodeList.h"
#include "nsIDOMXULButtonElement.h"
#include "nsIDOMXULCheckboxElement.h"
#include "nsIDOMXULDescriptionElement.h"
#include "nsIDOMXULDocument.h"
#include "nsIDOMXULLabelElement.h"
#include "nsIDOMXULSelectCntrlEl.h"
#include "nsIDOMXULSelectCntrlItemEl.h"
#include "nsReadableUtils.h"
#include "nsString.h"
#include "nsXULFormControlAccessible.h"
/**
* XUL Button: can contain arbitrary HTML content
*/
/**
* Default Constructor
*/
nsXULButtonAccessible::nsXULButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsFormControlAccessible(aNode, aShell)
{
}
/**
* Only one actions available
*/
NS_IMETHODIMP nsXULButtonAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;;
}
/**
* Return the name of our only action
*/
NS_IMETHODIMP nsXULButtonAccessible::GetAccActionName(PRUint8 index, nsAWritableString& _retval)
{
if (index == eAction_Click) {
_retval = NS_LITERAL_STRING("press");
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
/**
* Tell the button to do it's action
*/
NS_IMETHODIMP nsXULButtonAccessible::AccDoAction(PRUint8 index)
{
if (index == 0) {
nsCOMPtr<nsIDOMXULButtonElement> buttonElement(do_QueryInterface(mDOMNode));
if ( buttonElement )
{
buttonElement->DoCommand();
return NS_OK;
}
return NS_ERROR_FAILURE;
}
return NS_ERROR_INVALID_ARG;
}
/**
* We are a pushbutton
*/
NS_IMETHODIMP nsXULButtonAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_PUSHBUTTON;
return NS_OK;
}
/**
* Possible states: focused, focusable, unavailable(disabled)
*/
NS_IMETHODIMP nsXULButtonAccessible::GetAccState(PRUint32 *_retval)
{
// get focus and disable status from base class
nsFormControlAccessible::GetAccState(_retval);
*_retval |= STATE_FOCUSABLE;
return NS_OK;
}
/**
* XUL checkbox
*/
/**
* Default Constructor
*/
nsXULCheckboxAccessible::nsXULCheckboxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsFormControlAccessible(aNode, aShell)
{
}
/**
* We are a CheckButton
*/
NS_IMETHODIMP nsXULCheckboxAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_CHECKBUTTON;
return NS_OK;
}
/**
* Only one action available
*/
NS_IMETHODIMP nsXULCheckboxAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
}
/**
* Return the name of our only action
*/
NS_IMETHODIMP nsXULCheckboxAccessible::GetAccActionName(PRUint8 index, nsAWritableString& _retval)
{
if (index == eAction_Click) {
// check or uncheck
PRUint32 state;
GetAccState(&state);
if (state & STATE_CHECKED)
_retval = NS_LITERAL_STRING("uncheck");
else
_retval = NS_LITERAL_STRING("check");
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
/**
* Tell the checkbox to do its only action -- check( or uncheck) itself
*/
NS_IMETHODIMP nsXULCheckboxAccessible::AccDoAction(PRUint8 index)
{
if (index == eAction_Click) {
PRBool checked = PR_FALSE;
nsCOMPtr<nsIDOMXULCheckboxElement> xulCheckboxElement(do_QueryInterface(mDOMNode));
if (xulCheckboxElement) {
xulCheckboxElement->GetChecked(&checked);
xulCheckboxElement->SetChecked(!checked);
return NS_OK;
}
return NS_ERROR_FAILURE;
}
return NS_ERROR_INVALID_ARG;
}
/**
* Possible states: focused, focusable, unavailable(disabled), checked
*/
NS_IMETHODIMP nsXULCheckboxAccessible::GetAccState(PRUint32 *_retval)
{
// Get focus and disable status from base class
nsFormControlAccessible::GetAccState(_retval);
// Determine Checked state
PRBool checked = PR_FALSE;
nsCOMPtr<nsIDOMXULCheckboxElement> xulCheckboxElement(do_QueryInterface(mDOMNode));
if (xulCheckboxElement)
xulCheckboxElement->GetChecked(&checked);
if (checked)
*_retval |= STATE_CHECKED;
return NS_OK;
}

View File

@@ -0,0 +1,71 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: John Gaunt (jgaunt@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsXULFormControlAccessible_H_
#define _nsXULFormControlAccessible_H_
// NOTE: alphabetically ordered
#include "nsBaseWidgetAccessible.h"
#include "nsFormControlAccessible.h"
#include "nsHTMLFormControlAccessible.h"
class nsXULButtonAccessible : public nsFormControlAccessible
{
public:
nsXULButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
};
class nsXULCheckboxAccessible : public nsFormControlAccessible
{
public:
nsXULCheckboxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccState(PRUint32 *_retval);
};
#endif

View File

@@ -0,0 +1,62 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: John Gaunt (jgaunt@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
// NOTE: alphabetically ordered
#include "nsIDOMXULDescriptionElement.h"
#include "nsWeakReference.h"
#include "nsXULTextAccessible.h"
/**
* For XUL descriptions and labels
*/
nsXULTextAccessible::nsXULTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
nsTextAccessible(aDomNode, aShell)
{
}
/* wstring getAccName (); */
NS_IMETHODIMP nsXULTextAccessible::GetAccName(nsAWritableString& _retval)
{
nsCOMPtr<nsIDOMXULDescriptionElement> descriptionElement(do_QueryInterface(mDOMNode));
if (descriptionElement) {
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
return AppendFlatStringFromSubtree(content, &_retval);
}
return NS_ERROR_FAILURE;
}

View File

@@ -0,0 +1,55 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: John Gaunt (jgaunt@netscape.com)
*
*
* 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 NPL, 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 NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsXULTextAccessible_H_
#define _nsXULTextAccessible_H_
#include "nsFormControlAccessible.h"
class nsIWeakReference;
class nsXULTextAccessible : public nsTextAccessible
{
public:
nsXULTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAWritableString& _retval);
};
#endif

15
mozilla/aclocal.m4 vendored Normal file
View File

@@ -0,0 +1,15 @@
dnl
dnl Local autoconf macros used with mozilla
dnl The contents of this file are under the Public Domain.
dnl
builtin(include, build/autoconf/glib.m4)dnl
builtin(include, build/autoconf/gtk.m4)dnl
builtin(include, build/autoconf/libIDL.m4)dnl
builtin(include, build/autoconf/nspr.m4)dnl
builtin(include, build/autoconf/libart.m4)dnl
builtin(include, build/autoconf/pkg.m4)dnl
dnl
define(MOZ_TOPSRCDIR,.)dnl MOZ_TOPSRCDIR is used in altoptions.m4
builtin(include, build/autoconf/altoptions.m4)dnl

1181
mozilla/allmakefiles.sh Executable file

File diff suppressed because it is too large Load Diff

39
mozilla/build/Makefile.in Normal file
View File

@@ -0,0 +1,39 @@
#
# The contents of this file are subject to the Netscape 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/NPL/
#
# 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 Communicator client code,
# released March 31, 1998.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
ifneq ($(MOZ_WIDGET_TOOLKIT),os2)
DIRS = unix
endif
include $(topsrcdir)/config/rules.mk
# Install bloaturls.txt file for tinderbox Bloaty test.
install:: bloaturls.txt
$(INSTALL) $< $(DIST)/bin

Some files were not shown because too many files have changed in this diff Show More