Permalink
Browse files

Merge last PGO-green changeset of mozilla-inbound to mozilla-central

  • Loading branch information...
2 parents 2cc0890 + c792a70 commit 14a7b99c41a1b1c69d6373c43de8531b6f9828b9 @edmorley edmorley committed Oct 11, 2012
Showing 343 changed files with 3,595 additions and 2,901 deletions.
@@ -196,7 +196,7 @@ LogDocParent(nsIDocument* aDocumentNode)
static void
LogDocInfo(nsIDocument* aDocumentNode, DocAccessible* aDocument)
{
- printf(" DOM id: %p, acc id: %p\n ",
+ printf(" DOM document: %p, acc document: %p\n ",
static_cast<void*>(aDocumentNode), static_cast<void*>(aDocument));
// log document info
@@ -323,6 +323,20 @@ LogRequest(nsIRequest* aRequest)
}
static void
+LogDocAccState(DocAccessible* aDocument)
+{
+ printf("document acc state: ");
+ if (aDocument->HasLoadState(DocAccessible::eCompletelyLoaded))
+ printf("completely loaded;");
+ else if (aDocument->HasLoadState(DocAccessible::eReady))
+ printf("ready;");
+ else if (aDocument->HasLoadState(DocAccessible::eDOMLoaded))
+ printf("DOM loaded;");
+ else if (aDocument->HasLoadState(DocAccessible::eTreeConstructed))
+ printf("tree constructed;");
+}
+
+static void
GetDocLoadEventType(AccEvent* aEvent, nsACString& aEventType)
{
uint32_t type = aEvent->GetEventType();
@@ -407,6 +421,30 @@ logging::DocLoad(const char* aMsg, nsIDocument* aDocumentNode)
}
void
+logging::DocCompleteLoad(DocAccessible* aDocument, bool aIsLoadEventTarget)
+{
+ MsgBegin(sDocLoadTitle, "document loaded *completely*");
+
+ nsIDocument* docNode = aDocument->GetDocumentNode();
+ printf(" DOM document: %p, acc document: %p\n",
+ static_cast<void*>(aDocument->GetDocumentNode()),
+ static_cast<void*>(aDocument));
+
+ printf(" ");
+ LogDocURI(aDocument->GetDocumentNode());
+ printf("\n");
+
+ printf(" ");
+ LogDocAccState(aDocument);
+ printf("\n");
+
+ printf(" document is load event target: %s\n",
+ (aIsLoadEventTarget ? "true" : "false"));
+
+ MsgEnd();
+}
+
+void
logging::DocLoadEventFired(AccEvent* aEvent)
{
nsAutoCString strEventType;
@@ -56,6 +56,7 @@ bool IsEnabled(uint32_t aModules);
void DocLoad(const char* aMsg, nsIWebProgress* aWebProgress,
nsIRequest* aRequest, uint32_t aStateFlags);
void DocLoad(const char* aMsg, nsIDocument* aDocumentNode);
+void DocCompleteLoad(DocAccessible* aDocument, bool aIsLoadEventTarget);
/**
* Log that document load event was fired.
@@ -1469,6 +1469,14 @@ DocAccessible::ContentRemoved(nsIContent* aContainerNode,
void
DocAccessible::RecreateAccessible(nsIContent* aContent)
{
+#ifdef A11Y_LOG
+ if (logging::IsEnabled(logging::eTree)) {
+ logging::MsgBegin("TREE", "accessible recreated");
+ logging::Node("content", aContent);
+ logging::MsgEnd();
+ }
+#endif
+
// XXX: we shouldn't recreate whole accessible subtree, instead we should
// subclass hide and show events to handle them separately and implement their
// coalescence with normal hide and show events. Note, in this case they
@@ -1579,6 +1587,11 @@ DocAccessible::ProcessLoad()
{
mLoadState |= eCompletelyLoaded;
+#ifdef A11Y_LOG
+ if (logging::IsEnabled(logging::eDocLoad))
+ logging::DocCompleteLoad(this, IsLoadEventTarget());
+#endif
+
// Do not fire document complete/stop events for root chrome document
// accessibles and for frame/iframe documents because
// a) screen readers start working on focus event in the case of root chrome
@@ -2064,25 +2077,31 @@ bool
DocAccessible::IsLoadEventTarget() const
{
nsCOMPtr<nsISupports> container = mDocument->GetContainer();
- nsCOMPtr<nsIDocShellTreeItem> docShellTreeItem =
- do_QueryInterface(container);
- NS_ASSERTION(docShellTreeItem, "No document shell for document!");
+ nsCOMPtr<nsIDocShellTreeItem> treeItem = do_QueryInterface(container);
+ NS_ASSERTION(treeItem, "No document shell for document!");
nsCOMPtr<nsIDocShellTreeItem> parentTreeItem;
- docShellTreeItem->GetParent(getter_AddRefs(parentTreeItem));
+ treeItem->GetParent(getter_AddRefs(parentTreeItem));
- // Return true if it's not a root document (either tab document or
- // frame/iframe document) and its parent document is not in loading state.
- // Note: we can get notifications while document is loading (and thus
- // while there's no parent document yet).
+ // Not a root document.
if (parentTreeItem) {
+ // Return true if it's either:
+ // a) tab document;
+ nsCOMPtr<nsIDocShellTreeItem> rootTreeItem;
+ treeItem->GetRootTreeItem(getter_AddRefs(rootTreeItem));
+ if (parentTreeItem == rootTreeItem)
+ return true;
+
+ // b) frame/iframe document and its parent document is not in loading state
+ // Note: we can get notifications while document is loading (and thus
+ // while there's no parent document yet).
DocAccessible* parentDoc = ParentDocument();
return parentDoc && parentDoc->HasLoadState(eCompletelyLoaded);
}
// It's content (not chrome) root document.
int32_t contentType;
- docShellTreeItem->GetItemType(&contentType);
+ treeItem->GetItemType(&contentType);
return (contentType == nsIDocShellTreeItem::typeContent);
}
@@ -54,12 +54,12 @@ var Utils = {
get AndroidSdkVersion() {
if (!this._AndroidSdkVersion) {
- let shellVersion = Services.sysinfo.get('shellVersion') || '';
- let matches = shellVersion.match(/\((\d+)\)$/);
- if (matches)
- this._AndroidSdkVersion = parseInt(matches[1]);
- else
- this._AndroidSdkVersion = 15; // Most useful in desktop debugging.
+ if (Services.appinfo.OS == 'Android') {
+ this._AndroidSdkVersion = Services.sysinfo.getPropertyAsInt32('version');
+ } else {
+ // Most useful in desktop debugging.
+ this._AndroidSdkVersion = 15;
+ }
}
return this._AndroidSdkVersion;
},
@@ -271,7 +271,7 @@ nsXFormsEditableAccessible::GetEditor() const
nsXFormsSelectableAccessible::
nsXFormsSelectableAccessible(nsIContent* aContent, DocAccessible* aDoc) :
- nsXFormsEditableAccessible(aContent, aDoc), mIsSelect1Element(nullptr)
+ nsXFormsEditableAccessible(aContent, aDoc), mIsSelect1Element(false)
{
mIsSelect1Element =
mContent->NodeInfo()->Equals(nsGkAtoms::select1);
@@ -621,6 +621,7 @@ function prettyName(aIdentifier)
return " '" + aIdentifier + "' ";
}
+
////////////////////////////////////////////////////////////////////////////////
// Private
////////////////////////////////////////////////////////////////////////////////
@@ -99,12 +99,22 @@ function waitForEvent(aEventType, aTarget, aFunc, aContext, aArg1, aArg2)
}
/**
+ * Generate mouse move over image map what creates image map accessible (async).
+ * See waitForImageMap() function.
+ */
+function waveOverImageMap(aImageMapID)
+{
+ var imageMapNode = getNode(aImageMapID);
+ synthesizeMouse(imageMapNode, 10, 10, { type: "mousemove" },
+ imageMapNode.ownerDocument.defaultView);
+}
+
+/**
* Call the given function when the tree of the given image map is built.
*/
function waitForImageMap(aImageMapID, aTestFunc)
{
- synthesizeMouse(aImageMapID, 10, 10, { type: "mousemove" },
- aImageMapID.ownerDocument.defaultView);
+ waveOverImageMap(aImageMapID);
var imageMapAcc = getAccessible(aImageMapID);
if (imageMapAcc.firstChild)
@@ -19,8 +19,7 @@
<script type="application/javascript">
function doPreTest()
{
- var imgMap = document.getElementById("imgmap");
- waitForImageMap(imgMap, doTest);
+ waitForImageMap("imgmap", doTest);
}
function doTest()
@@ -60,8 +60,7 @@
//gA11yEventDumpToConsole = true; // debug stuff
function doPreTest()
{
- var imgMap = document.getElementById("imgmap");
- waitForImageMap(imgMap, doTest);
+ waitForImageMap("imgmap", doTest);
}
var gQueue = null;
@@ -44,8 +44,7 @@
//gA11yEventDumpToConsole = true;
function doPreTest()
{
- var imgMap = document.getElementById("imgmap");
- waitForImageMap(imgMap, doTest);
+ waitForImageMap("imgmap", doTest);
}
function doTest()
@@ -22,8 +22,7 @@
//gA11yEventDumpToConsole = true;
function doPreTest()
{
- var imgMap = document.getElementById("imagemap");
- waitForImageMap(imgMap, doTest);
+ waitForImageMap("imagemap", doTest);
}
function doTest()
@@ -21,7 +21,7 @@
src="../events.js"></script>
<script type="application/javascript">
- gA11yEventDumpToConsole = true; // debug stuff
+ //gA11yEventDumpToConsole = true; // debug stuff
function doTest()
{
@@ -50,7 +50,7 @@
// a: traversal state
testStates("link_traversed", 0, 0, STATE_TRAVERSED);
- enableLogging("docload");
+ //enableLogging("docload"); // debug stuff
registerA11yEventListener(EVENT_DOCUMENT_LOAD_COMPLETE,
traversedLinkTester);
@@ -64,7 +64,7 @@
aEvent.accessible.rootDocument.window.close();
testStates("link_traversed", STATE_TRAVERSED);
- disableLogging();
+ //disableLogging();
SimpleTest.finish();
}
};
@@ -20,8 +20,6 @@
<![CDATA[
function doTest()
{
- disableLogging(); // a hack from failing test_link.html to stop logging.
-
// label with popup
testStates("labelWithPopup", STATE_HASPOPUP);
@@ -22,8 +22,7 @@
//gA11yEventDumpToConsole = true;
function doPreTest()
{
- var imgMap = document.getElementById("imagemap");
- waitForImageMap(imgMap, doTest);
+ waitForImageMap("imagemap", doTest);
}
function doTest()
@@ -21,8 +21,7 @@
//gA11yEventDumpToConsole = true;
function doPreTest()
{
- var imgMap = document.getElementById("imgmap");
- waitForImageMap(imgMap, doTest);
+ waitForImageMap("imgmap", doTest);
}
function doTest()
@@ -20,7 +20,7 @@ MOCHITEST_A11Y_FILES =\
test_doc.html \
test_gencontent.html \
test_hidden.html \
- $(warning test_imagemap.html temporarily disabled because of very frequent oranges, see bug 745788) \
+ test_imagemap.html \
test_list_editabledoc.html \
test_list.html \
test_listbox.xul \
@@ -228,6 +228,9 @@
{
this.imageMap = getAccessible(aImageMapID);
this.mapNode.setAttribute("name", "atoz_map");
+
+ // XXXhack: force repainting of the image (see bug 745788 for details).
+ waveOverImageMap(aImageMapID);
}
this.finalCheck = function removeNameOnMap_finalCheck()
@@ -324,10 +327,6 @@
map.appendChild(area);
this.containerNode.appendChild(map);
-
- // force repainting of the image
- // XXX this is a hack. Fix bug 745788.
- document.getElementById(aImageID).style.opacity = 0.8;
}
this.finalCheck = function insertMap_finalCheck()
@@ -382,11 +381,10 @@
}
}
- gA11yEventDumpToConsole = true;
+ //gA11yEventDumpToConsole = true; // debug stuff
function doPreTest()
{
- var imgMap = document.getElementById("imgmap");
- waitForImageMap(imgMap, doTest);
+ waitForImageMap("imgmap", doTest);
}
var gQueue = null;
@@ -403,6 +401,9 @@
gQueue.push(new insertMap("container", "imgmap"));
gQueue.push(new hideImageMap("container", "imgmap"));
+ //enableLogging("tree"); // debug stuff
+ //gQueue.onFinish = function() { disableLogging("tree"); }
+
gQueue.invoke(); // Will call SimpleTest.finish();
}
@@ -1,6 +1,6 @@
[
{
-"clang_version": "r163716"
+"clang_version": "r164411"
},
{
"size": 47,
@@ -9,8 +9,8 @@
"filename": "setup.sh"
},
{
-"size": 54033946,
-"digest": "50eb6fa636403f444bab10aee2370f1ac624a1e0105566639c7c266e784dbc6e4cd3901bbd11f53c4c63b2a6d2d07a603b3d9c333f5049bdc7a816b7d225631b",
+"size": 54336567,
+"digest": "f692fb99c0faae0e850d0fba1ea1905064c00b7c65c03367369fec685771511c4e97445139be8eaa1bb6380055594cebef1e23cc0fd0717203411cd8082f37fa",
"algorithm": "sha512",
"filename": "clang.tar.bz2"
}
@@ -221,10 +221,7 @@ pref("general.autoScroll", false);
pref("general.autoScroll", true);
#endif
-// Send aol.com the legacy build date instead of the version number in the UA's
-// Gecko token as a temporary measure against bug 778408 (mail.aol.com defaults
-// to basic web UI when accessed with a user agent without Gecko/20100101).
-pref("general.useragent.override.aol.com", "Gecko/[^ ]*#Gecko/20100101");
+pref("general.useragent.complexOverride.moodle", true); // bug 797703
// At startup, check if we're the default browser and prompt user if not.
pref("browser.shell.checkDefaultBrowser", true);
Oops, something went wrong.

0 comments on commit 14a7b99

Please sign in to comment.