Skip to content

Commit

Permalink
Merge m-c to b-s.
Browse files Browse the repository at this point in the history
  • Loading branch information
khuey committed Jan 31, 2012
2 parents b85f3e9 + 96d8504 commit edafa5e
Show file tree
Hide file tree
Showing 42 changed files with 1,051 additions and 186 deletions.
3 changes: 3 additions & 0 deletions .hgtags
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,6 @@ c0983049bcaa9551e5f276d5a77ce154c151e0b0 AURORA_BASE_20110927
54bfd8bf682e295ffd7f22fa921ca343957b6c1c AURORA_BASE_20111108
a8506ab2c65480cf2f85f54e203ea746522c62bb AURORA_BASE_20111220
462c726144bc1fb45b61e774f64ac5d61b4e047c UPDATE_PACKAGING_R16
bbc7014db2de49e2301680d2a86be8a53108a88a AURORA_BASE_20120131
bbc7014db2de49e2301680d2a86be8a53108a88a AURORA_BASE_20120131
0000000000000000000000000000000000000000 AURORA_BASE_20120131
78 changes: 18 additions & 60 deletions accessible/src/base/nsRootAccessible.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,74 +574,32 @@ nsRootAccessible::Shutdown()
nsDocAccessibleWrap::Shutdown();
}

// nsRootAccessible protected member
already_AddRefed<nsIDocShellTreeItem>
nsRootAccessible::GetContentDocShell(nsIDocShellTreeItem *aStart)
{
if (!aStart) {
return nsnull;
}

PRInt32 itemType;
aStart->GetItemType(&itemType);
if (itemType == nsIDocShellTreeItem::typeContent) {
nsDocAccessible *accDoc = nsAccUtils::GetDocAccessibleFor(aStart);

// Hidden documents don't have accessibles (like SeaMonkey's sidebar),
// they are of no interest for a11y.
if (!accDoc)
return nsnull;

// If ancestor chain of accessibles is not completely visible,
// don't use this one. This happens for example if it's inside
// a background tab (tabbed browsing)
nsAccessible* parent = accDoc->Parent();
while (parent) {
if (parent->State() & states::INVISIBLE)
return nsnull;

if (parent == this)
break; // Don't check past original root accessible we started with

parent = parent->Parent();
}

NS_ADDREF(aStart);
return aStart;
}
nsCOMPtr<nsIDocShellTreeNode> treeNode(do_QueryInterface(aStart));
if (treeNode) {
PRInt32 subDocuments;
treeNode->GetChildCount(&subDocuments);
for (PRInt32 count = 0; count < subDocuments; count ++) {
nsCOMPtr<nsIDocShellTreeItem> treeItemChild, contentTreeItem;
treeNode->GetChildAt(count, getter_AddRefs(treeItemChild));
NS_ENSURE_TRUE(treeItemChild, nsnull);
contentTreeItem = GetContentDocShell(treeItemChild);
if (contentTreeItem) {
NS_ADDREF(aStart = contentTreeItem);
return aStart;
}
}
}
return nsnull;
}

// nsIAccessible method
Relation
nsRootAccessible::RelationByType(PRUint32 aType)
{
if (!mDocument || aType != nsIAccessibleRelation::RELATION_EMBEDS)
return nsDocAccessibleWrap::RelationByType(aType);

nsCOMPtr<nsIDocShellTreeItem> treeItem =
nsCoreUtils::GetDocShellTreeItemFor(mDocument);
nsCOMPtr<nsIDocShellTreeItem> contentTreeItem = GetContentDocShell(treeItem);
// there may be no content area, so we need a null check
if (!contentTreeItem)
return Relation();
nsIDOMWindow* rootWindow = mDocument->GetWindow();
if (rootWindow) {
nsCOMPtr<nsIDOMWindow> contentWindow;
rootWindow->GetContent(getter_AddRefs(contentWindow));
if (contentWindow) {
nsCOMPtr<nsIDOMDocument> contentDOMDocument;
contentWindow->GetDocument(getter_AddRefs(contentDOMDocument));
nsCOMPtr<nsIDocument> contentDocumentNode =
do_QueryInterface(contentDOMDocument);
if (contentDocumentNode) {
nsDocAccessible* contentDocument =
GetAccService()->GetDocAccessible(contentDocumentNode);
if (contentDocument)
return Relation(contentDocument);
}
}
}

return Relation(nsAccUtils::GetDocAccessibleFor(contentTreeItem));
return Relation();
}

////////////////////////////////////////////////////////////////////////////////
Expand Down
3 changes: 1 addition & 2 deletions accessible/src/base/nsRootAccessible.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ class nsRootAccessible : public nsDocAccessibleWrap,

PRUint32 GetChromeFlags();
#endif
already_AddRefed<nsIDocShellTreeItem>
GetContentDocShell(nsIDocShellTreeItem *aStart);

nsRefPtr<nsCaretAccessible> mCaretAccessible;
};

Expand Down
1 change: 1 addition & 0 deletions accessible/tests/mochitest/relations/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ include $(topsrcdir)/config/rules.mk
# test_tabbrowser.xul disabled for misusing <tabbrowser> (bug 715857)

_TEST_FILES =\
test_embeds.xul \
test_general.html \
test_general.xul \
test_tree.xul \
Expand Down
152 changes: 152 additions & 0 deletions accessible/tests/mochitest/relations/test_embeds.xul
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
type="text/css"?>

<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="Embeds relation tests">

<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>

<script type="application/javascript"
src="../common.js"></script>
<script type="application/javascript"
src="../role.js"></script>
<script type="application/javascript"
src="../states.js"></script>
<script type="application/javascript"
src="../events.js"></script>
<script type="application/javascript"
src="../relations.js"></script>

<script type="application/javascript">
<![CDATA[
////////////////////////////////////////////////////////////////////////////
// Helpers
function tabBrowser()
{
return gBrowserWnd.gBrowser;
}
function currentBrowser()
{
return tabBrowser().selectedBrowser;
}
function currentTabDocument()
{
return currentBrowser().contentDocument;
}
////////////////////////////////////////////////////////////////////////////
// Invokers
function loadURI(aURI)
{
this.invoke = function loadURI_invoke()
{
tabBrowser().loadURI(aURI);
}
this.eventSeq = [
new invokerChecker(EVENT_REORDER, currentBrowser)
];
this.finalCheck = function loadURI_finalCheck()
{
testRelation(gBrowserWnd.document, RELATION_EMBEDS,
getAccessible(currentTabDocument()));
}
this.getID = function loadURI_getID()
{
return "load uri " + aURI;
}
}
function loadOneTab(aURI)
{
this.invoke = function loadOneTab_invoke()
{
tabBrowser().loadOneTab(aURI, null, null, null, false);
}
this.eventSeq = [
new invokerChecker(EVENT_REORDER, currentBrowser)
];
this.finalCheck = function loadURI_finalCheck()
{
testRelation(gBrowserWnd.document, RELATION_EMBEDS,
getAccessible(currentTabDocument()));
}
this.getID = function loadOneTab_getID()
{
return "load uri '" + aURI + "' in new tab";
}
}
////////////////////////////////////////////////////////////////////////////
// Testing
var gBrowserWnd = null;
function loadBrowser()
{
gBrowserWnd = window.openDialog("chrome://browser/content/", "_blank",
"chrome,all,dialog=no", "about:");
addA11yLoadEvent(startTests, gBrowserWnd);
}
function startTests()
{
// Wait for tab load.
var browser = currentBrowser();
addA11yLoadEvent(doTests, browser.contentWindow);
}
//gA11yEventDumpToConsole = true; // debug
var gQueue = null;
function doTests()
{
testRelation(gBrowserWnd.document, RELATION_EMBEDS,
getAccessible(currentTabDocument()));
gQueue = new eventQueue();
gQueue.push(new loadURI("about:about"));
gQueue.push(new loadOneTab("about:mozilla"));
gQueue.onFinish = function()
{
gBrowserWnd.close();
}
gQueue.invoke();
}
SimpleTest.waitForExplicitFinish();
addLoadEvent(loadBrowser);
]]>
</script>

<vbox flex="1" style="overflow: auto;">
<body xmlns="http://www.w3.org/1999/xhtml">
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=707654"
title="Embeds relation on root accessible can return not content document">
Mozilla Bug 707654
</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
</pre>
</body>
</vbox>
</window>
13 changes: 0 additions & 13 deletions accessible/tests/mochitest/relations/test_general.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,6 @@
testRelation("legend", RELATION_LABEL_FOR, "fieldset");
testRelation("fieldset", RELATION_LABELLED_BY, "legend");

// 'embeds' relation for root accessible
var docAcc = null;
var parentOfDocAcc = null;
var parentDocAcc = getAccessible(document);
do {
docAcc = parentDocAcc;
parentOfDocAcc = getAccessible(docAcc.parent, [nsIAccessNode]);
parentDocAcc = getAccessible(parentOfDocAcc.document,
[nsIAccessible]);
} while (getRole(parentDocAcc) != ROLE_CHROME_WINDOW)

testRelation(parentDocAcc, RELATION_EMBEDS, docAcc);

// finish test
SimpleTest.finish();
}
Expand Down
13 changes: 0 additions & 13 deletions accessible/tests/mochitest/relations/test_general.xul
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,6 @@
// 'default button' relation
testRelation("textbox", RELATION_DEFAULT_BUTTON, "submit");
// 'embeds' relation for root accessible
var docAcc = null;
var parentOfDocAcc = null;
var parentDocAcc = getAccessible(document);
do {
docAcc = parentDocAcc;
parentOfDocAcc = getAccessible(docAcc.parent, [nsIAccessNode]);
parentDocAcc = getAccessible(parentOfDocAcc.document,
[nsIAccessible]);
} while (getRole(parentDocAcc) != ROLE_CHROME_WINDOW)
testRelation(parentDocAcc, RELATION_EMBEDS, docAcc);
// 'labelled by'/'label for' relation for xul:goupbox and xul:label of
// xul:caption
var groupboxAcc = getAccessible("groupbox");
Expand Down
5 changes: 0 additions & 5 deletions browser/app/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,6 @@ ifdef _MSC_VER
WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
endif

ifeq ($(OS_ARCH),WINNT)
OS_LIBS += $(call EXPAND_LIBNAME,comctl32 comdlg32 uuid shell32 ole32 oleaut32 version winspool)
OS_LIBS += $(call EXPAND_LIBNAME,usp10 msimg32)
endif

ifeq ($(OS_ARCH),WINNT)
RCINCLUDE = splash.rc
ifndef GNU_CC
Expand Down
3 changes: 3 additions & 0 deletions browser/config/mozconfigs/linux32/release
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ export MOZ_TELEMETRY_REPORTING=1

# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
ac_add_options --enable-warnings-as-errors

# Enable parallel compiling
mk_add_options MOZ_MAKE_FLAGS="-j4"
3 changes: 3 additions & 0 deletions browser/config/mozconfigs/linux64/release
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ export MOZ_TELEMETRY_REPORTING=1

# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
ac_add_options --enable-warnings-as-errors

# Enable parallel compiling
mk_add_options MOZ_MAKE_FLAGS="-j4"
3 changes: 3 additions & 0 deletions browser/config/mozconfigs/macosx-universal/release
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ export MOZ_TELEMETRY_REPORTING=1

# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
ac_add_options --enable-warnings-as-errors

# Enable parallel compiling
mk_add_options MOZ_MAKE_FLAGS="-j4"
2 changes: 1 addition & 1 deletion browser/config/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.0a1
13.0a1
16 changes: 16 additions & 0 deletions build/unix/build-toolchain/glibc-deterministic.patch
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ diff -ru a/csu/Makefile b/csu/Makefile
*) ;; \
esac; \
files="$(all-Banner-files)"; \
diff -ru a/Makerules b/Makerules
--- a/Makerules 2011-01-17 23:34:07.000000000 -0500
+++ b/Makerules 2012-01-30 08:47:56.565068903 -0500
@@ -992,9 +992,9 @@
echo ' Use the shared library, but some functions are only in';\
echo ' the static library, so try that secondarily. */';\
cat $<; \
- echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
- ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
+ echo 'GROUP ( libc.so$(libc.so-version)' \
+ '$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
+ ' AS_NEEDED (' $(rtld-installed-name) ') )' \
) > $@.new
mv -f $@.new $@

diff -ru a/nscd/nscd_stat.c b/nscd/nscd_stat.c
--- a/nscd/nscd_stat.c 2011-01-17 23:34:07.000000000 -0500
+++ b/nscd/nscd_stat.c 2012-01-23 15:54:45.231607606 -0500
Expand Down
2 changes: 1 addition & 1 deletion config/milestone.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
# hardcoded milestones in the tree from these two files.
#--------------------------------------------------------

12.0a1
13.0a1
5 changes: 0 additions & 5 deletions ipc/app/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,6 @@ ifdef _MSC_VER
WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
endif

ifeq ($(OS_ARCH),WINNT)
OS_LIBS += $(call EXPAND_LIBNAME,comctl32 comdlg32 uuid shell32 ole32 oleaut32 version winspool)
OS_LIBS += $(call EXPAND_LIBNAME,usp10 msimg32)
endif

include $(topsrcdir)/config/rules.mk

ifeq ($(OS_ARCH),WINNT)
Expand Down
2 changes: 1 addition & 1 deletion js/src/config/milestone.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
# hardcoded milestones in the tree from these two files.
#--------------------------------------------------------

12.0a1
13.0a1
Loading

0 comments on commit edafa5e

Please sign in to comment.