From 5d05a6a1301762dd1fea0355069bf02d1a4e62c1 Mon Sep 17 00:00:00 2001 From: Ekanan Ketunuti Date: Sat, 30 Jun 2012 23:56:18 +0700 Subject: [PATCH 01/12] Bug 769913 - TestTXMgr.cpp should use fail() from TestHarness.h; r=ehsan --- editor/txmgr/tests/TestTXMgr.cpp | 1245 +++++++++++++++--------------- 1 file changed, 622 insertions(+), 623 deletions(-) diff --git a/editor/txmgr/tests/TestTXMgr.cpp b/editor/txmgr/tests/TestTXMgr.cpp index 88b4d39deae..c10ab1d5d25 100644 --- a/editor/txmgr/tests/TestTXMgr.cpp +++ b/editor/txmgr/tests/TestTXMgr.cpp @@ -445,8 +445,8 @@ public: // of date. // if (sDestructorOrderArr && mVal != sDestructorOrderArr[sDestructorCount]) { - printf("ERROR: ~SimpleTransaction expected %d got %d.\n", - mVal, sDestructorOrderArr[sDestructorCount]); + fail("~SimpleTransaction expected %d got %d.\n", + mVal, sDestructorOrderArr[sDestructorCount]); exit(NS_ERROR_FAILURE); } @@ -468,8 +468,8 @@ public: // of date. // if (sDoOrderArr && mVal != sDoOrderArr[sDoCount]) { - printf("ERROR: DoTransaction expected %d got %d.\n", - mVal, sDoOrderArr[sDoCount]); + fail("DoTransaction expected %d got %d.\n", + mVal, sDoOrderArr[sDoCount]); exit(NS_ERROR_FAILURE); } @@ -491,8 +491,8 @@ public: // of date. // if (sUndoOrderArr && mVal != sUndoOrderArr[sUndoCount]) { - printf("ERROR: UndoTransaction expected %d got %d.\n", - mVal, sUndoOrderArr[sUndoCount]); + fail("UndoTransaction expected %d got %d.\n", + mVal, sUndoOrderArr[sUndoCount]); exit(NS_ERROR_FAILURE); } @@ -514,8 +514,8 @@ public: // of date. // if (sRedoOrderArr && mVal != sRedoOrderArr[sRedoCount]) { - printf("ERROR: RedoTransaction expected %d got %d.\n", - mVal, sRedoOrderArr[sRedoCount]); + fail("RedoTransaction expected %d got %d.\n", + mVal, sRedoOrderArr[sRedoCount]); exit(NS_ERROR_FAILURE); } @@ -603,8 +603,8 @@ public: nsresult result = SimpleTransaction::DoTransaction(); if (NS_FAILED(result)) { - // printf("ERROR: QueryInterface() failed for transaction level %d. (%d)\n", - // mLevel, result); + // fail("QueryInterface() failed for transaction level %d. (%d)\n", + // mLevel, result); return result; } @@ -642,8 +642,8 @@ public: mNumChildrenPerNode, flags); if (!tximpl) { - printf("ERROR: Failed to allocate AggregateTransaction %d, level %d. (%d)\n", - i, mLevel, result); + fail("Failed to allocate AggregateTransaction %d, level %d. (%d)\n", + i, mLevel, result); if (mFlags & BATCH_FLAG) mTXMgr->EndBatch(); @@ -654,8 +654,8 @@ public: nsITransaction *tx = 0; result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for transaction %d, level %d. (%d)\n", - i, mLevel, result); + fail("QueryInterface() failed for transaction %d, level %d. (%d)\n", + i, mLevel, result); if (mFlags & BATCH_FLAG) mTXMgr->EndBatch(); @@ -666,8 +666,8 @@ public: result = mTXMgr->DoTransaction(tx); if (NS_FAILED(result)) { - // printf("ERROR: Failed to execute transaction %d, level %d. (%d)\n", - // i, mLevel, result); + // fail("Failed to execute transaction %d, level %d. (%d)\n", + // i, mLevel, result); tx->Release(); if (mFlags & BATCH_FLAG) @@ -762,7 +762,7 @@ quick_test(TestTransactionFactory *factory) nsCOMPtr mgr = do_CreateInstance(NS_TRANSACTIONMANAGER_CONTRACTID, &result); if (NS_FAILED(result) || !mgr) { - printf("ERROR: Failed to create Transaction Manager instance.\n"); + fail("Failed to create Transaction Manager instance.\n"); return NS_ERROR_OUT_OF_MEMORY; } @@ -777,7 +777,7 @@ quick_test(TestTransactionFactory *factory) result = mgr->DoTransaction(0); if (result != NS_ERROR_NULL_POINTER) { - printf("ERROR: DoTransaction() returned unexpected error. (%d)\n", result); + fail("DoTransaction() returned unexpected error. (%d)\n", result); return result; } @@ -792,7 +792,7 @@ quick_test(TestTransactionFactory *factory) result = mgr->UndoTransaction(); if (NS_FAILED(result)) { - printf("ERROR: Undo on empty undo stack failed. (%d)\n", result); + fail("Undo on empty undo stack failed. (%d)\n", result); return result; } @@ -807,7 +807,7 @@ quick_test(TestTransactionFactory *factory) result = mgr->RedoTransaction(); if (NS_FAILED(result)) { - printf("ERROR: Redo on empty redo stack failed. (%d)\n", result); + fail("Redo on empty redo stack failed. (%d)\n", result); return result; } @@ -822,7 +822,7 @@ quick_test(TestTransactionFactory *factory) result = mgr->SetMaxTransactionCount(-1); if (NS_FAILED(result)) { - printf("ERROR: SetMaxTransactionCount(-1) failed. (%d)\n", result); + fail("SetMaxTransactionCount(-1) failed. (%d)\n", result); return result; } @@ -837,7 +837,7 @@ quick_test(TestTransactionFactory *factory) result = mgr->SetMaxTransactionCount(0); if (NS_FAILED(result)) { - printf("ERROR: SetMaxTransactionCount(0) failed. (%d)\n", result); + fail("SetMaxTransactionCount(0) failed. (%d)\n", result); return result; } @@ -852,7 +852,7 @@ quick_test(TestTransactionFactory *factory) result = mgr->SetMaxTransactionCount(10); if (NS_FAILED(result)) { - printf("ERROR: SetMaxTransactionCount(10) failed. (%d)\n", result); + fail("SetMaxTransactionCount(10) failed. (%d)\n", result); return result; } @@ -866,7 +866,7 @@ quick_test(TestTransactionFactory *factory) result = mgr->Clear(); if (NS_FAILED(result)) { - printf("ERROR: Clear on empty undo and redo stack failed. (%d)\n", result); + fail("Clear on empty undo and redo stack failed. (%d)\n", result); return result; } @@ -883,14 +883,14 @@ quick_test(TestTransactionFactory *factory) result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfUndoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -905,14 +905,14 @@ quick_test(TestTransactionFactory *factory) result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfRedoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -932,12 +932,12 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(tx); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: PeekUndoStack() on empty undo stack failed. (%d)\n", result); + fail("PeekUndoStack() on empty undo stack failed. (%d)\n", result); return result; } if (tx != 0) { - printf("ERROR: PeekUndoStack() on empty undo stack failed. (%d)\n", result); + fail("PeekUndoStack() on empty undo stack failed. (%d)\n", result); return NS_ERROR_FAILURE; } @@ -955,12 +955,12 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(tx); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: PeekRedoStack() on empty redo stack failed. (%d)\n", result); + fail("PeekRedoStack() on empty redo stack failed. (%d)\n", result); return result; } if (tx != 0) { - printf("ERROR: PeekRedoStack() on empty redo stack failed. (%d)\n", result); + fail("PeekRedoStack() on empty redo stack failed. (%d)\n", result); return NS_ERROR_FAILURE; } @@ -975,7 +975,7 @@ quick_test(TestTransactionFactory *factory) result = mgr->AddListener(0); if (result != NS_ERROR_NULL_POINTER) { - printf("ERROR: AddListener() returned unexpected error. (%d)\n", result); + fail("AddListener() returned unexpected error. (%d)\n", result); return result; } @@ -990,7 +990,7 @@ quick_test(TestTransactionFactory *factory) result = mgr->RemoveListener(0); if (result != NS_ERROR_NULL_POINTER) { - printf("ERROR: RemoveListener() returned unexpected error. (%d)\n", result); + fail("RemoveListener() returned unexpected error. (%d)\n", result); return result; } @@ -1013,7 +1013,7 @@ quick_test(TestTransactionFactory *factory) result = mgr->SetMaxTransactionCount(10); if (NS_FAILED(result)) { - printf("ERROR: SetMaxTransactionCount(10) failed. (%d)\n", result); + fail("SetMaxTransactionCount(10) failed. (%d)\n", result); return result; } @@ -1021,7 +1021,7 @@ quick_test(TestTransactionFactory *factory) tximpl = factory->create(mgr, MERGE_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate initial transaction.\n"); + fail("Failed to allocate initial transaction.\n"); return NS_ERROR_OUT_OF_MEMORY; } @@ -1030,15 +1030,15 @@ quick_test(TestTransactionFactory *factory) result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for initial transaction. (%d)\n", - result); + fail("QueryInterface() failed for initial transaction. (%d)\n", + result); return result; } result = mgr->DoTransaction(tx); if (NS_FAILED(result)) { - printf("ERROR: Failed to execute initial transaction. (%d)\n", result); + fail("Failed to execute initial transaction. (%d)\n", result); return result; } @@ -1051,12 +1051,12 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(u1); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Initial PeekUndoStack() failed. (%d)\n", result); + fail("Initial PeekUndoStack() failed. (%d)\n", result); return result; } if (u1 != tx) { - printf("ERROR: Top of undo stack is different!. (%d)\n", result); + fail("Top of undo stack is different!. (%d)\n", result); return NS_ERROR_FAILURE; } @@ -1065,7 +1065,7 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(r1); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Initial PeekRedoStack() failed. (%d)\n", result); + fail("Initial PeekRedoStack() failed. (%d)\n", result); return result; } @@ -1073,21 +1073,21 @@ quick_test(TestTransactionFactory *factory) tximpl = factory->create(mgr, NONE_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate transaction %d.\n", i); + fail("Failed to allocate transaction %d.\n", i); return NS_ERROR_OUT_OF_MEMORY; } tx = 0; result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for transaction %d. (%d)\n", - i, result); + fail("QueryInterface() failed for transaction %d. (%d)\n", + i, result); return result; } result = mgr->DoTransaction(tx); if (NS_FAILED(result)) { - printf("ERROR: Failed to execute transaction %d. (%d)\n", i, result); + fail("Failed to execute transaction %d. (%d)\n", i, result); return result; } @@ -1099,12 +1099,12 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(u2); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Second PeekUndoStack() failed. (%d)\n", result); + fail("Second PeekUndoStack() failed. (%d)\n", result); return result; } if (u1 != u2) { - printf("ERROR: Top of undo stack changed. (%d)\n", result); + fail("Top of undo stack changed. (%d)\n", result); return NS_ERROR_FAILURE; } @@ -1113,46 +1113,46 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(r2); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Second PeekRedoStack() failed. (%d)\n", result); + fail("Second PeekRedoStack() failed. (%d)\n", result); return result; } if (r1 != r2) { - printf("ERROR: Top of redo stack changed. (%d)\n", result); + fail("Top of redo stack changed. (%d)\n", result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", + result); return result; } if (numitems != 1) { - printf("ERROR: GetNumberOfUndoItems() expected 1 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 1 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfRedoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->Clear(); if (NS_FAILED(result)) { - printf("ERROR: Clear() failed. (%d)\n", result); + fail("Clear() failed. (%d)\n", result); return result; } @@ -1169,21 +1169,21 @@ quick_test(TestTransactionFactory *factory) tximpl = factory->create(mgr, NONE_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate transaction %d.\n", i); + fail("Failed to allocate transaction %d.\n", i); return NS_ERROR_OUT_OF_MEMORY; } tx = 0; result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for transaction %d. (%d)\n", - i, result); + fail("QueryInterface() failed for transaction %d. (%d)\n", + i, result); return result; } result = mgr->DoTransaction(tx); if (NS_FAILED(result)) { - printf("ERROR: Failed to execute transaction %d. (%d)\n", i, result); + fail("Failed to execute transaction %d. (%d)\n", i, result); return result; } @@ -1193,28 +1193,28 @@ quick_test(TestTransactionFactory *factory) result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 10 items failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 10 items failed. (%d)\n", + result); return result; } if (numitems != 10) { - printf("ERROR: GetNumberOfUndoItems() expected 10 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 10 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfRedoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -1234,7 +1234,7 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(u1); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Initial PeekUndoStack() failed. (%d)\n", result); + fail("Initial PeekUndoStack() failed. (%d)\n", result); return result; } @@ -1243,7 +1243,7 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(r1); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Initial PeekRedoStack() failed. (%d)\n", result); + fail("Initial PeekRedoStack() failed. (%d)\n", result); return result; } @@ -1251,21 +1251,21 @@ quick_test(TestTransactionFactory *factory) tximpl = factory->create(mgr, TRANSIENT_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate transaction %d.\n", i); + fail("Failed to allocate transaction %d.\n", i); return NS_ERROR_OUT_OF_MEMORY; } tx = 0; result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for transaction %d. (%d)\n", - i, result); + fail("QueryInterface() failed for transaction %d. (%d)\n", + i, result); return result; } result = mgr->DoTransaction(tx); if (NS_FAILED(result)) { - printf("ERROR: Failed to execute transaction %d. (%d)\n", i, result); + fail("Failed to execute transaction %d. (%d)\n", i, result); return result; } @@ -1277,12 +1277,12 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(u2); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Second PeekUndoStack() failed. (%d)\n", result); + fail("Second PeekUndoStack() failed. (%d)\n", result); return result; } if (u1 != u2) { - printf("ERROR: Top of undo stack changed. (%d)\n", result); + fail("Top of undo stack changed. (%d)\n", result); return NS_ERROR_FAILURE; } @@ -1291,40 +1291,40 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(r2); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Second PeekRedoStack() failed. (%d)\n", result); + fail("Second PeekRedoStack() failed. (%d)\n", result); return result; } if (r1 != r2) { - printf("ERROR: Top of redo stack changed. (%d)\n", result); + fail("Top of redo stack changed. (%d)\n", result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 10 items failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 10 items failed. (%d)\n", + result); return result; } if (numitems != 10) { - printf("ERROR: GetNumberOfUndoItems() expected 10 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 10 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfRedoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -1340,7 +1340,7 @@ quick_test(TestTransactionFactory *factory) for (i = 1; i <= 4; i++) { result = mgr->UndoTransaction(); if (NS_FAILED(result)) { - printf("ERROR: Failed to undo transaction %d. (%d)\n", i, result); + fail("Failed to undo transaction %d. (%d)\n", i, result); return result; } } @@ -1348,28 +1348,28 @@ quick_test(TestTransactionFactory *factory) result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 6 items failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 6 items failed. (%d)\n", + result); return result; } if (numitems != 6) { - printf("ERROR: GetNumberOfUndoItems() expected 6 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 6 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on redo stack with 4 items failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on redo stack with 4 items failed. (%d)\n", + result); return result; } if (numitems != 4) { - printf("ERROR: GetNumberOfRedoItems() expected 4 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 4 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -1385,7 +1385,7 @@ quick_test(TestTransactionFactory *factory) for (i = 1; i <= 2; ++i) { result = mgr->RedoTransaction(); if (NS_FAILED(result)) { - printf("ERROR: Failed to redo transaction %d. (%d)\n", i, result); + fail("Failed to redo transaction %d. (%d)\n", i, result); return result; } } @@ -1393,28 +1393,28 @@ quick_test(TestTransactionFactory *factory) result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 8 items failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 8 items failed. (%d)\n", + result); return result; } if (numitems != 8) { - printf("ERROR: GetNumberOfUndoItems() expected 8 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 8 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on redo stack with 2 items failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on redo stack with 2 items failed. (%d)\n", + result); return result; } if (numitems != 2) { - printf("ERROR: GetNumberOfRedoItems() expected 2 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 2 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -1429,7 +1429,7 @@ quick_test(TestTransactionFactory *factory) tximpl = factory->create(mgr, NONE_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate transaction.\n"); + fail("Failed to allocate transaction.\n"); return NS_ERROR_OUT_OF_MEMORY; } @@ -1438,13 +1438,13 @@ quick_test(TestTransactionFactory *factory) result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for transaction. (%d)\n", result); + fail("QueryInterface() failed for transaction. (%d)\n", result); return result; } result = mgr->DoTransaction(tx); if (NS_FAILED(result)) { - printf("ERROR: Failed to execute transaction. (%d)\n", result); + fail("Failed to execute transaction. (%d)\n", result); return result; } @@ -1453,28 +1453,28 @@ quick_test(TestTransactionFactory *factory) result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 9 items failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 9 items failed. (%d)\n", + result); return result; } if (numitems != 9) { - printf("ERROR: GetNumberOfUndoItems() expected 9 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 9 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfRedoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -1489,7 +1489,7 @@ quick_test(TestTransactionFactory *factory) for (i = 1; i <= 4; ++i) { result = mgr->UndoTransaction(); if (NS_FAILED(result)) { - printf("ERROR: Failed to undo transaction %d. (%d)\n", i, result); + fail("Failed to undo transaction %d. (%d)\n", i, result); return result; } } @@ -1497,63 +1497,62 @@ quick_test(TestTransactionFactory *factory) result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 5 items failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 5 items failed. (%d)\n", + result); return result; } if (numitems != 5) { - printf("ERROR: GetNumberOfUndoItems() expected 5 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 5 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on redo stack with 4 items failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on redo stack with 4 items failed. (%d)\n", + result); return result; } if (numitems != 4) { - printf("ERROR: GetNumberOfRedoItems() expected 4 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 4 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->Clear(); if (NS_FAILED(result)) { - printf("ERROR: Clear() failed. (%d)\n", - result); + fail("Clear() failed. (%d)\n", result); return result; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on cleared undo stack failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on cleared undo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfUndoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on cleared redo stack failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on cleared redo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfRedoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -1569,21 +1568,21 @@ quick_test(TestTransactionFactory *factory) tximpl = factory->create(mgr, NONE_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate transaction %d.\n", i); + fail("Failed to allocate transaction %d.\n", i); return NS_ERROR_OUT_OF_MEMORY; } tx = 0; result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for transaction %d. (%d)\n", - i, result); + fail("QueryInterface() failed for transaction %d. (%d)\n", + i, result); return result; } result = mgr->DoTransaction(tx); if (NS_FAILED(result)) { - printf("ERROR: Failed to execute transaction %d. (%d)\n", i, result); + fail("Failed to execute transaction %d. (%d)\n", i, result); return result; } @@ -1593,28 +1592,28 @@ quick_test(TestTransactionFactory *factory) result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 5 items failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 5 items failed. (%d)\n", + result); return result; } if (numitems != 5) { - printf("ERROR: GetNumberOfUndoItems() expected 5 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 5 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfRedoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -1629,7 +1628,7 @@ quick_test(TestTransactionFactory *factory) tximpl = factory->create(mgr, THROWS_DO_ERROR_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate transaction.\n"); + fail("Failed to allocate transaction.\n"); return NS_ERROR_OUT_OF_MEMORY; } @@ -1638,7 +1637,7 @@ quick_test(TestTransactionFactory *factory) result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for transaction. (%d)\n", result); + fail("QueryInterface() failed for transaction. (%d)\n", result); return result; } @@ -1649,7 +1648,7 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(u1); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Initial PeekUndoStack() failed. (%d)\n", result); + fail("Initial PeekUndoStack() failed. (%d)\n", result); return result; } @@ -1658,14 +1657,14 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(r1); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Initial PeekRedoStack() failed. (%d)\n", result); + fail("Initial PeekRedoStack() failed. (%d)\n", result); return result; } result = mgr->DoTransaction(tx); if (result != NS_ERROR_FAILURE) { - printf("ERROR: DoTransaction() returned unexpected error. (%d)\n", result); + fail("DoTransaction() returned unexpected error. (%d)\n", result); return result; } @@ -1676,12 +1675,12 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(u2); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Second PeekUndoStack() failed. (%d)\n", result); + fail("Second PeekUndoStack() failed. (%d)\n", result); return result; } if (u1 != u2) { - printf("ERROR: Top of undo stack changed. (%d)\n", result); + fail("Top of undo stack changed. (%d)\n", result); return NS_ERROR_FAILURE; } @@ -1690,40 +1689,40 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(r2); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Second PeekRedoStack() failed. (%d)\n", result); + fail("Second PeekRedoStack() failed. (%d)\n", result); return result; } if (r1 != r2) { - printf("ERROR: Top of redo stack changed. (%d)\n", result); + fail("Top of redo stack changed. (%d)\n", result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 5 items failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 5 items failed. (%d)\n", + result); return result; } if (numitems != 5) { - printf("ERROR: GetNumberOfUndoItems() expected 5 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 5 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on empty redo stack. (%d)\n", - result); + fail("GetNumberOfRedoItems() on empty redo stack. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfRedoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -1738,7 +1737,7 @@ quick_test(TestTransactionFactory *factory) tximpl = factory->create(mgr, THROWS_UNDO_ERROR_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate transaction.\n"); + fail("Failed to allocate transaction.\n"); return NS_ERROR_OUT_OF_MEMORY; } @@ -1747,14 +1746,14 @@ quick_test(TestTransactionFactory *factory) result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for transaction. (%d)\n", result); + fail("QueryInterface() failed for transaction. (%d)\n", result); return result; } result = mgr->DoTransaction(tx); if (NS_FAILED(result)) { - printf("ERROR: DoTransaction() returned unexpected error. (%d)\n", result); + fail("DoTransaction() returned unexpected error. (%d)\n", result); return result; } @@ -1767,7 +1766,7 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(u1); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Initial PeekUndoStack() failed. (%d)\n", result); + fail("Initial PeekUndoStack() failed. (%d)\n", result); return result; } @@ -1776,14 +1775,14 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(r1); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Initial PeekRedoStack() failed. (%d)\n", result); + fail("Initial PeekRedoStack() failed. (%d)\n", result); return result; } result = mgr->UndoTransaction(); if (result != NS_ERROR_FAILURE) { - printf("ERROR: UndoTransaction() returned unexpected error. (%d)\n", result); + fail("UndoTransaction() returned unexpected error. (%d)\n", result); return result; } @@ -1792,12 +1791,12 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(u2); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Second PeekUndoStack() failed. (%d)\n", result); + fail("Second PeekUndoStack() failed. (%d)\n", result); return result; } if (u1 != u2) { - printf("ERROR: Top of undo stack changed. (%d)\n", result); + fail("Top of undo stack changed. (%d)\n", result); return NS_ERROR_FAILURE; } @@ -1806,40 +1805,40 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(r2); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Second PeekRedoStack() failed. (%d)\n", result); + fail("Second PeekRedoStack() failed. (%d)\n", result); return result; } if (r1 != r2) { - printf("ERROR: Top of redo stack changed. (%d)\n", result); + fail("Top of redo stack changed. (%d)\n", result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 6 items failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 6 items failed. (%d)\n", + result); return result; } if (numitems != 6) { - printf("ERROR: GetNumberOfUndoItems() expected 6 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 6 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on empty redo stack. (%d)\n", - result); + fail("GetNumberOfRedoItems() on empty redo stack. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfRedoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -1854,7 +1853,7 @@ quick_test(TestTransactionFactory *factory) tximpl = factory->create(mgr, THROWS_REDO_ERROR_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate transaction.\n"); + fail("Failed to allocate transaction.\n"); return NS_ERROR_OUT_OF_MEMORY; } @@ -1863,15 +1862,15 @@ quick_test(TestTransactionFactory *factory) result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for RedoErrorTransaction. (%d)\n", - result); + fail("QueryInterface() failed for RedoErrorTransaction. (%d)\n", + result); return result; } result = mgr->DoTransaction(tx); if (NS_FAILED(result)) { - printf("ERROR: DoTransaction() returned unexpected error. (%d)\n", result); + fail("DoTransaction() returned unexpected error. (%d)\n", result); return result; } @@ -1884,7 +1883,7 @@ quick_test(TestTransactionFactory *factory) tximpl = factory->create(mgr, NONE_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate transaction.\n"); + fail("Failed to allocate transaction.\n"); return NS_ERROR_OUT_OF_MEMORY; } @@ -1893,14 +1892,14 @@ quick_test(TestTransactionFactory *factory) result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for transaction. (%d)\n", result); + fail("QueryInterface() failed for transaction. (%d)\n", result); return result; } result = mgr->DoTransaction(tx); if (NS_FAILED(result)) { - printf("ERROR: DoTransaction() returned unexpected error. (%d)\n", result); + fail("DoTransaction() returned unexpected error. (%d)\n", result); return result; } @@ -1913,7 +1912,7 @@ quick_test(TestTransactionFactory *factory) for (i = 1; i <= 2; ++i) { result = mgr->UndoTransaction(); if (NS_FAILED(result)) { - printf("ERROR: Failed to undo transaction %d. (%d)\n", i, result); + fail("Failed to undo transaction %d. (%d)\n", i, result); return result; } } @@ -1929,7 +1928,7 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(u1); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Initial PeekUndoStack() failed. (%d)\n", result); + fail("Initial PeekUndoStack() failed. (%d)\n", result); return result; } @@ -1938,14 +1937,14 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(r1); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Initial PeekRedoStack() failed. (%d)\n", result); + fail("Initial PeekRedoStack() failed. (%d)\n", result); return result; } result = mgr->RedoTransaction(); if (result != NS_ERROR_FAILURE) { - printf("ERROR: RedoTransaction() returned unexpected error. (%d)\n", result); + fail("RedoTransaction() returned unexpected error. (%d)\n", result); return result; } @@ -1954,12 +1953,12 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(u2); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Second PeekUndoStack() failed. (%d)\n", result); + fail("Second PeekUndoStack() failed. (%d)\n", result); return result; } if (u1 != u2) { - printf("ERROR: Top of undo stack changed. (%d)\n", result); + fail("Top of undo stack changed. (%d)\n", result); return NS_ERROR_FAILURE; } @@ -1968,40 +1967,40 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(r2); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Second PeekRedoStack() failed. (%d)\n", result); + fail("Second PeekRedoStack() failed. (%d)\n", result); return result; } if (r1 != r2) { - printf("ERROR: Top of redo stack changed. (%d)\n", result); + fail("Top of redo stack changed. (%d)\n", result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 6 items failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 6 items failed. (%d)\n", + result); return result; } if (numitems != 6) { - printf("ERROR: GetNumberOfUndoItems() expected 6 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 6 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on redo stack with 2 items failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on redo stack with 2 items failed. (%d)\n", + result); return result; } if (numitems != 2) { - printf("ERROR: GetNumberOfRedoItems() expected 2 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 2 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -2018,35 +2017,35 @@ quick_test(TestTransactionFactory *factory) result = mgr->SetMaxTransactionCount(0); if (NS_FAILED(result)) { - printf("ERROR: SetMaxTransactionCount(0) failed. (%d)\n", result); + fail("SetMaxTransactionCount(0) failed. (%d)\n", result); return result; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfUndoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfRedoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -2054,21 +2053,21 @@ quick_test(TestTransactionFactory *factory) tximpl = factory->create(mgr, NONE_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate transaction %d.\n", i); + fail("Failed to allocate transaction %d.\n", i); return NS_ERROR_OUT_OF_MEMORY; } tx = 0; result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for transaction %d. (%d)\n", - i, result); + fail("QueryInterface() failed for transaction %d. (%d)\n", + i, result); return result; } result = mgr->DoTransaction(tx); if (NS_FAILED(result)) { - printf("ERROR: Failed to execute transaction %d. (%d)\n", i, result); + fail("Failed to execute transaction %d. (%d)\n", i, result); return result; } @@ -2077,28 +2076,28 @@ quick_test(TestTransactionFactory *factory) result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfUndoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfRedoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } } @@ -2116,7 +2115,7 @@ quick_test(TestTransactionFactory *factory) result = mgr->SetMaxTransactionCount(-1); if (NS_FAILED(result)) { - printf("ERROR: SetMaxTransactionCount(-1) failed. (%d)\n", result); + fail("SetMaxTransactionCount(-1) failed. (%d)\n", result); return result; } @@ -2126,21 +2125,21 @@ quick_test(TestTransactionFactory *factory) tximpl = factory->create(mgr, NONE_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate transaction %d.\n", i); + fail("Failed to allocate transaction %d.\n", i); return NS_ERROR_OUT_OF_MEMORY; } tx = 0; result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for transaction %d. (%d)\n", - i, result); + fail("QueryInterface() failed for transaction %d. (%d)\n", + i, result); return result; } result = mgr->DoTransaction(tx); if (NS_FAILED(result)) { - printf("ERROR: Failed to execute transaction %d. (%d)\n", i, result); + fail("Failed to execute transaction %d. (%d)\n", i, result); return result; } @@ -2149,28 +2148,28 @@ quick_test(TestTransactionFactory *factory) result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with %d items failed. (%d)\n", - i, result); + fail("GetNumberOfUndoItems() on undo stack with %d items failed. (%d)\n", + i, result); return result; } if (numitems != i) { - printf("ERROR: GetNumberOfUndoItems() expected %d got %d. (%d)\n", - i, numitems, result); + fail("GetNumberOfUndoItems() expected %d got %d. (%d)\n", + i, numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfRedoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } } @@ -2179,35 +2178,35 @@ quick_test(TestTransactionFactory *factory) result = mgr->UndoTransaction(); if (NS_FAILED(result)) { - printf("ERROR: Failed to undo transaction %d. (%d)\n", i, result); + fail("Failed to undo transaction %d. (%d)\n", i, result); return result; } } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on empty undo stack with 10 items failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on empty undo stack with 10 items failed. (%d)\n", + result); return result; } if (numitems != 10) { - printf("ERROR: GetNumberOfUndoItems() expected 10 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 10 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on redo stack with 10 items failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on redo stack with 10 items failed. (%d)\n", + result); return result; } if (numitems != 10) { - printf("ERROR: GetNumberOfRedoItems() expected 10 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 10 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -2218,7 +2217,7 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(u1); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Initial PeekUndoStack() failed. (%d)\n", result); + fail("Initial PeekUndoStack() failed. (%d)\n", result); return result; } @@ -2227,14 +2226,14 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(r1); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Initial PeekRedoStack() failed. (%d)\n", result); + fail("Initial PeekRedoStack() failed. (%d)\n", result); return result; } result = mgr->SetMaxTransactionCount(25); if (NS_FAILED(result)) { - printf("ERROR: SetMaxTransactionCount(25) failed. (%d)\n", result); + fail("SetMaxTransactionCount(25) failed. (%d)\n", result); return result; } @@ -2243,12 +2242,12 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(u2); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Second PeekUndoStack() failed. (%d)\n", result); + fail("Second PeekUndoStack() failed. (%d)\n", result); return result; } if (u1 != u2) { - printf("ERROR: Top of undo stack changed. (%d)\n", result); + fail("Top of undo stack changed. (%d)\n", result); return NS_ERROR_FAILURE; } @@ -2257,40 +2256,40 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(r2); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Second PeekRedoStack() failed. (%d)\n", result); + fail("Second PeekRedoStack() failed. (%d)\n", result); return result; } if (r1 != r2) { - printf("ERROR: Top of redo stack changed. (%d)\n", result); + fail("Top of redo stack changed. (%d)\n", result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 10 items failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 10 items failed. (%d)\n", + result); return result; } if (numitems != 10) { - printf("ERROR: GetNumberOfUndoItems() expected 10 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 10 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on redo stack with 10 items failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on redo stack with 10 items failed. (%d)\n", + result); return result; } if (numitems != 10) { - printf("ERROR: GetNumberOfRedoItems() expected 10 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 10 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -2311,7 +2310,7 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(u1); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Initial PeekUndoStack() failed. (%d)\n", result); + fail("Initial PeekUndoStack() failed. (%d)\n", result); return result; } @@ -2320,14 +2319,14 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(r1); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Initial PeekRedoStack() failed. (%d)\n", result); + fail("Initial PeekRedoStack() failed. (%d)\n", result); return result; } result = mgr->SetMaxTransactionCount(15); if (NS_FAILED(result)) { - printf("ERROR: SetMaxTransactionCount(15) failed. (%d)\n", result); + fail("SetMaxTransactionCount(15) failed. (%d)\n", result); return result; } @@ -2336,12 +2335,12 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(u2); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Second PeekUndoStack() failed. (%d)\n", result); + fail("Second PeekUndoStack() failed. (%d)\n", result); return result; } if (u1 != u2) { - printf("ERROR: Top of undo stack changed. (%d)\n", result); + fail("Top of undo stack changed. (%d)\n", result); return NS_ERROR_FAILURE; } @@ -2350,40 +2349,40 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(r2); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Second PeekRedoStack() failed. (%d)\n", result); + fail("Second PeekRedoStack() failed. (%d)\n", result); return result; } if (r1 != r2) { - printf("ERROR: Top of redo stack changed. (%d)\n", result); + fail("Top of redo stack changed. (%d)\n", result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 5 items failed. (%d)\n", + fail("GetNumberOfUndoItems() on undo stack with 5 items failed. (%d)\n", result); return result; } if (numitems != 5) { - printf("ERROR: GetNumberOfUndoItems() expected 5 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 5 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on redo stack with 10 items failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on redo stack with 10 items failed. (%d)\n", + result); return result; } if (numitems != 10) { - printf("ERROR: GetNumberOfRedoItems() expected 10 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 10 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -2404,7 +2403,7 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(u1); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Initial PeekUndoStack() failed. (%d)\n", result); + fail("Initial PeekUndoStack() failed. (%d)\n", result); return result; } @@ -2413,14 +2412,14 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(r1); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Initial PeekRedoStack() failed. (%d)\n", result); + fail("Initial PeekRedoStack() failed. (%d)\n", result); return result; } result = mgr->SetMaxTransactionCount(5); if (NS_FAILED(result)) { - printf("ERROR: SetMaxTransactionCount(5) failed. (%d)\n", result); + fail("SetMaxTransactionCount(5) failed. (%d)\n", result); return result; } @@ -2429,12 +2428,12 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(u2); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Second PeekUndoStack() failed. (%d)\n", result); + fail("Second PeekUndoStack() failed. (%d)\n", result); return result; } if (u2) { - printf("ERROR: Unexpected item at top of undo stack. (%d)\n", result); + fail("Unexpected item at top of undo stack. (%d)\n", result); return NS_ERROR_FAILURE; } @@ -2443,40 +2442,40 @@ quick_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(r2); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Second PeekRedoStack() failed. (%d)\n", result); + fail("Second PeekRedoStack() failed. (%d)\n", result); return result; } if (r1 != r2) { - printf("ERROR: Top of redo stack changed. (%d)\n", result); + fail("Top of redo stack changed. (%d)\n", result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfUndoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on redo stack with 5 items failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on redo stack with 5 items failed. (%d)\n", + result); return result; } if (numitems != 5) { - printf("ERROR: GetNumberOfRedoItems() expected 5 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 5 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -2492,7 +2491,7 @@ quick_test(TestTransactionFactory *factory) result = mgr->SetMaxTransactionCount(-1); if (NS_FAILED(result)) { - printf("ERROR: SetMaxTransactionCount(-1) failed. (%d)\n", result); + fail("SetMaxTransactionCount(-1) failed. (%d)\n", result); return result; } @@ -2502,21 +2501,21 @@ quick_test(TestTransactionFactory *factory) tximpl = factory->create(mgr, NONE_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate transaction %d.\n", i); + fail("Failed to allocate transaction %d.\n", i); return NS_ERROR_OUT_OF_MEMORY; } tx = 0; result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for transaction %d. (%d)\n", - i, result); + fail("QueryInterface() failed for transaction %d. (%d)\n", + i, result); return result; } result = mgr->DoTransaction(tx); if (NS_FAILED(result)) { - printf("ERROR: Failed to execute transaction %d. (%d)\n", i, result); + fail("Failed to execute transaction %d. (%d)\n", i, result); return result; } @@ -2525,28 +2524,28 @@ quick_test(TestTransactionFactory *factory) result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with %d items failed. (%d)\n", - i, result); + fail("GetNumberOfUndoItems() on undo stack with %d items failed. (%d)\n", + i, result); return result; } if (numitems != i) { - printf("ERROR: GetNumberOfUndoItems() expected %d got %d. (%d)\n", - i, numitems, result); + fail("GetNumberOfUndoItems() expected %d got %d. (%d)\n", + i, numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfRedoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } } @@ -2555,41 +2554,41 @@ quick_test(TestTransactionFactory *factory) result = mgr->UndoTransaction(); if (NS_FAILED(result)) { - printf("ERROR: Failed to undo transaction %d. (%d)\n", i, result); + fail("Failed to undo transaction %d. (%d)\n", i, result); return result; } } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 10 items failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 10 items failed. (%d)\n", + result); return result; } if (numitems != 10) { - printf("ERROR: GetNumberOfUndoItems() expected 10 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 10 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on redo stack with 10 items failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on redo stack with 10 items failed. (%d)\n", + result); return result; } if (numitems != 10) { - printf("ERROR: GetNumberOfRedoItems() expected 10 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 10 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->Clear(); if (NS_FAILED(result)) { - printf("ERROR: Clear() failed. (%d)\n", result); + fail("Clear() failed. (%d)\n", result); return result; } @@ -2603,8 +2602,8 @@ quick_test(TestTransactionFactory *factory) *******************************************************************/ if (sConstructorCount != sDestructorCount) { - printf("ERROR: Transaction constructor count (%d) != destructor count (%d).\n", - sConstructorCount, sDestructorCount); + fail("Transaction constructor count (%d) != destructor count (%d).\n", + sConstructorCount, sDestructorCount); return NS_ERROR_FAILURE; } @@ -2690,7 +2689,7 @@ quick_batch_test(TestTransactionFactory *factory) nsCOMPtr mgr = do_CreateInstance(NS_TRANSACTIONMANAGER_CONTRACTID, &result); if (NS_FAILED(result) || !mgr) { - printf("ERROR: Failed to create Transaction Manager instance.\n"); + fail("Failed to create Transaction Manager instance.\n"); return NS_ERROR_OUT_OF_MEMORY; } @@ -2708,35 +2707,35 @@ quick_batch_test(TestTransactionFactory *factory) result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfUndoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->EndBatch(); if (result != NS_ERROR_FAILURE) { - printf("ERROR: EndBatch() returned unexpected status. (%d)\n", result); + fail("EndBatch() returned unexpected status. (%d)\n", result); return result; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfUndoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -2752,56 +2751,56 @@ quick_batch_test(TestTransactionFactory *factory) result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfUndoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->BeginBatch(); if (NS_FAILED(result)) { - printf("ERROR: BeginBatch() failed. (%d)\n", result); + fail("BeginBatch() failed. (%d)\n", result); return result; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfUndoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->EndBatch(); if (NS_FAILED(result)) { - printf("ERROR: EndBatch() failed. (%d)\n", result); + fail("EndBatch() failed. (%d)\n", result); return result; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfUndoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -2821,7 +2820,7 @@ quick_batch_test(TestTransactionFactory *factory) result = mgr->BeginBatch(); if (NS_FAILED(result)) { - printf("ERROR: BeginBatch() failed. (%d)\n", result); + fail("BeginBatch() failed. (%d)\n", result); return result; } @@ -2829,21 +2828,21 @@ quick_batch_test(TestTransactionFactory *factory) tximpl = factory->create(mgr, NONE_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate transaction %d.\n", i); + fail("Failed to allocate transaction %d.\n", i); return NS_ERROR_OUT_OF_MEMORY; } tx = 0; result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for transaction %d. (%d)\n", - i, result); + fail("QueryInterface() failed for transaction %d. (%d)\n", + i, result); return result; } result = mgr->DoTransaction(tx); if (NS_FAILED(result)) { - printf("ERROR: Failed to execute transaction %d. (%d)\n", i, result); + fail("Failed to execute transaction %d. (%d)\n", i, result); return result; } @@ -2853,35 +2852,35 @@ quick_batch_test(TestTransactionFactory *factory) result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfUndoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->EndBatch(); if (NS_FAILED(result)) { - printf("ERROR: EndBatch() failed. (%d)\n", result); + fail("EndBatch() failed. (%d)\n", result); return result; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", + result); return result; } if (numitems != 1) { - printf("ERROR: GetNumberOfUndoItems() expected 1 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 1 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -2904,7 +2903,7 @@ quick_batch_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(u1); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Initial PeekUndoStack() failed. (%d)\n", result); + fail("Initial PeekUndoStack() failed. (%d)\n", result); return result; } @@ -2913,14 +2912,14 @@ quick_batch_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(r1); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Initial PeekRedoStack() failed. (%d)\n", result); + fail("Initial PeekRedoStack() failed. (%d)\n", result); return result; } result = mgr->BeginBatch(); if (NS_FAILED(result)) { - printf("ERROR: BeginBatch() failed. (%d)\n", result); + fail("BeginBatch() failed. (%d)\n", result); return result; } @@ -2928,21 +2927,21 @@ quick_batch_test(TestTransactionFactory *factory) tximpl = factory->create(mgr, TRANSIENT_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate transaction %d.\n", i); + fail("Failed to allocate transaction %d.\n", i); return NS_ERROR_OUT_OF_MEMORY; } tx = 0; result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for transaction %d. (%d)\n", - i, result); + fail("QueryInterface() failed for transaction %d. (%d)\n", + i, result); return result; } result = mgr->DoTransaction(tx); if (NS_FAILED(result)) { - printf("ERROR: Failed to execute transaction %d. (%d)\n", i, result); + fail("Failed to execute transaction %d. (%d)\n", i, result); return result; } @@ -2952,7 +2951,7 @@ quick_batch_test(TestTransactionFactory *factory) result = mgr->EndBatch(); if (NS_FAILED(result)) { - printf("ERROR: EndBatch() failed. (%d)\n", result); + fail("EndBatch() failed. (%d)\n", result); return result; } @@ -2961,12 +2960,12 @@ quick_batch_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(u2); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Second PeekUndoStack() failed. (%d)\n", result); + fail("Second PeekUndoStack() failed. (%d)\n", result); return result; } if (u1 != u2) { - printf("ERROR: Top of undo stack changed. (%d)\n", result); + fail("Top of undo stack changed. (%d)\n", result); return NS_ERROR_FAILURE; } @@ -2975,40 +2974,40 @@ quick_batch_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(r2); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Second PeekRedoStack() failed. (%d)\n", result); + fail("Second PeekRedoStack() failed. (%d)\n", result); return result; } if (r1 != r2) { - printf("ERROR: Top of redo stack changed. (%d)\n", result); + fail("Top of redo stack changed. (%d)\n", result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", + result); return result; } if (numitems != 1) { - printf("ERROR: GetNumberOfUndoItems() expected 1 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 1 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfRedoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -3024,27 +3023,27 @@ quick_batch_test(TestTransactionFactory *factory) result = mgr->BeginBatch(); if (NS_FAILED(result)) { - printf("ERROR: BeginBatch() failed. (%d)\n", result); + fail("BeginBatch() failed. (%d)\n", result); return result; } tximpl = factory->create(mgr, NONE_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate transaction.\n"); + fail("Failed to allocate transaction.\n"); return NS_ERROR_OUT_OF_MEMORY; } tx = 0; result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for transaction. (%d)\n", result); + fail("QueryInterface() failed for transaction. (%d)\n", result); return result; } result = mgr->DoTransaction(tx); if (NS_FAILED(result)) { - printf("ERROR: Failed to execute transaction. (%d)\n", result); + fail("Failed to execute transaction. (%d)\n", result); return result; } @@ -3053,41 +3052,41 @@ quick_batch_test(TestTransactionFactory *factory) result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", + result); return result; } if (numitems != 1) { - printf("ERROR: GetNumberOfUndoItems() expected 1 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 1 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->BeginBatch(); if (NS_FAILED(result)) { - printf("ERROR: BeginBatch() failed. (%d)\n", result); + fail("BeginBatch() failed. (%d)\n", result); return result; } tximpl = factory->create(mgr, NONE_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate transaction.\n"); + fail("Failed to allocate transaction.\n"); return NS_ERROR_OUT_OF_MEMORY; } tx = 0; result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for transaction. (%d)\n", result); + fail("QueryInterface() failed for transaction. (%d)\n", result); return result; } result = mgr->DoTransaction(tx); if (NS_FAILED(result)) { - printf("ERROR: Failed to execute transaction. (%d)\n", result); + fail("Failed to execute transaction. (%d)\n", result); return result; } @@ -3096,41 +3095,41 @@ quick_batch_test(TestTransactionFactory *factory) result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", + result); return result; } if (numitems != 1) { - printf("ERROR: GetNumberOfUndoItems() expected 1 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 1 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->BeginBatch(); if (NS_FAILED(result)) { - printf("ERROR: BeginBatch() failed. (%d)\n", result); + fail("BeginBatch() failed. (%d)\n", result); return result; } tximpl = factory->create(mgr, NONE_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate transaction.\n"); + fail("Failed to allocate transaction.\n"); return NS_ERROR_OUT_OF_MEMORY; } tx = 0; result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for transaction. (%d)\n", result); + fail("QueryInterface() failed for transaction. (%d)\n", result); return result; } result = mgr->DoTransaction(tx); if (NS_FAILED(result)) { - printf("ERROR: Failed to execute transaction. (%d)\n", result); + fail("Failed to execute transaction. (%d)\n", result); return result; } @@ -3139,49 +3138,49 @@ quick_batch_test(TestTransactionFactory *factory) result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", + result); return result; } if (numitems != 1) { - printf("ERROR: GetNumberOfUndoItems() expected 1 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 1 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->EndBatch(); if (NS_FAILED(result)) { - printf("ERROR: EndBatch() failed. (%d)\n", result); + fail("EndBatch() failed. (%d)\n", result); return result; } result = mgr->EndBatch(); if (NS_FAILED(result)) { - printf("ERROR: EndBatch() failed. (%d)\n", result); + fail("EndBatch() failed. (%d)\n", result); return result; } result = mgr->EndBatch(); if (NS_FAILED(result)) { - printf("ERROR: EndBatch() failed. (%d)\n", result); + fail("EndBatch() failed. (%d)\n", result); return result; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 2 items failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 2 items failed. (%d)\n", + result); return result; } if (numitems != 2) { - printf("ERROR: GetNumberOfUndoItems() expected 2 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 2 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -3197,7 +3196,7 @@ quick_batch_test(TestTransactionFactory *factory) for (i = 1; i <= 2; ++i) { result = mgr->UndoTransaction(); if (NS_FAILED(result)) { - printf("ERROR: Failed to undo transaction %d. (%d)\n", i, result); + fail("Failed to undo transaction %d. (%d)\n", i, result); return result; } } @@ -3205,28 +3204,28 @@ quick_batch_test(TestTransactionFactory *factory) result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfUndoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on redo stack with 2 items failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on redo stack with 2 items failed. (%d)\n", + result); return result; } if (numitems != 2) { - printf("ERROR: GetNumberOfRedoItems() expected 2 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 2 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -3242,7 +3241,7 @@ quick_batch_test(TestTransactionFactory *factory) for (i = 1; i <= 2; ++i) { result = mgr->RedoTransaction(); if (NS_FAILED(result)) { - printf("ERROR: Failed to undo transaction %d. (%d)\n", i, result); + fail("Failed to undo transaction %d. (%d)\n", i, result); return result; } } @@ -3250,28 +3249,28 @@ quick_batch_test(TestTransactionFactory *factory) result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 2 items failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 2 items failed. (%d)\n", + result); return result; } if (numitems != 2) { - printf("ERROR: GetNumberOfUndoItems() expected 2 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 2 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfRedoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -3287,35 +3286,35 @@ quick_batch_test(TestTransactionFactory *factory) result = mgr->UndoTransaction(); if (NS_FAILED(result)) { - printf("ERROR: Failed to undo transaction. (%d)\n", result); + fail("Failed to undo transaction. (%d)\n", result); return result; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", + result); return result; } if (numitems != 1) { - printf("ERROR: GetNumberOfUndoItems() expected 1 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 1 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on stack with 1 item failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on stack with 1 item failed. (%d)\n", + result); return result; } if (numitems != 1) { - printf("ERROR: GetNumberOfRedoItems() expected 1 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 1 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -3331,35 +3330,35 @@ quick_batch_test(TestTransactionFactory *factory) result = mgr->EndBatch(); if (result != NS_ERROR_FAILURE) { - printf("ERROR: EndBatch() returned unexpected status. (%d)\n", result); + fail("EndBatch() returned unexpected status. (%d)\n", result); return result; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", + result); return result; } if (numitems != 1) { - printf("ERROR: GetNumberOfUndoItems() expected 1 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 1 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on stack with 1 item failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on stack with 1 item failed. (%d)\n", + result); return result; } if (numitems != 1) { - printf("ERROR: GetNumberOfRedoItems() expected 1 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 1 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -3376,70 +3375,70 @@ quick_batch_test(TestTransactionFactory *factory) result = mgr->BeginBatch(); if (NS_FAILED(result)) { - printf("ERROR: BeginBatch() failed. (%d)\n", result); + fail("BeginBatch() failed. (%d)\n", result); return result; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", + result); return result; } if (numitems != 1) { - printf("ERROR: GetNumberOfUndoItems() expected 1 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 1 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on stack with 1 item failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on stack with 1 item failed. (%d)\n", + result); return result; } if (numitems != 1) { - printf("ERROR: GetNumberOfRedoItems() expected 1 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 1 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->EndBatch(); if (NS_FAILED(result)) { - printf("ERROR: EndBatch() failed. (%d)\n", result); + fail("EndBatch() failed. (%d)\n", result); return result; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", + result); return result; } if (numitems != 1) { - printf("ERROR: GetNumberOfUndoItems() expected 1 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 1 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on stack with 1 item failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on stack with 1 item failed. (%d)\n", + result); return result; } if (numitems != 1) { - printf("ERROR: GetNumberOfRedoItems() expected 1 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 1 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -3454,7 +3453,7 @@ quick_batch_test(TestTransactionFactory *factory) result = mgr->BeginBatch(); if (NS_FAILED(result)) { - printf("ERROR: BeginBatch() failed. (%d)\n", result); + fail("BeginBatch() failed. (%d)\n", result); return result; } @@ -3462,21 +3461,21 @@ quick_batch_test(TestTransactionFactory *factory) tximpl = factory->create(mgr, NONE_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate transaction %d.\n", i); + fail("Failed to allocate transaction %d.\n", i); return NS_ERROR_OUT_OF_MEMORY; } tx = 0; result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for transaction %d. (%d)\n", - i, result); + fail("QueryInterface() failed for transaction %d. (%d)\n", + i, result); return result; } result = mgr->DoTransaction(tx); if (NS_FAILED(result)) { - printf("ERROR: Failed to execute transaction %d. (%d)\n", i, result); + fail("Failed to execute transaction %d. (%d)\n", i, result); return result; } @@ -3486,63 +3485,63 @@ quick_batch_test(TestTransactionFactory *factory) result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", + result); return result; } if (numitems != 1) { - printf("ERROR: GetNumberOfUndoItems() expected 1 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 1 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on redo stack with 1 item failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on redo stack with 1 item failed. (%d)\n", + result); return result; } if (numitems != 1) { - printf("ERROR: GetNumberOfRedoItems() expected 1 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 1 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->EndBatch(); if (NS_FAILED(result)) { - printf("ERROR: EndBatch() failed. (%d)\n", result); + fail("EndBatch() failed. (%d)\n", result); return result; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 2 items failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 2 items failed. (%d)\n", + result); return result; } if (numitems != 2) { - printf("ERROR: GetNumberOfUndoItems() expected 2 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 2 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfRedoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -3560,35 +3559,35 @@ quick_batch_test(TestTransactionFactory *factory) result = mgr->UndoTransaction(); if (NS_FAILED(result)) { - printf("ERROR: Failed to undo transaction. (%d)\n", result); + fail("Failed to undo transaction. (%d)\n", result); return result; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", + result); return result; } if (numitems != 1) { - printf("ERROR: GetNumberOfUndoItems() expected 1 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 1 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on redo stack with 1 item failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on redo stack with 1 item failed. (%d)\n", + result); return result; } if (numitems != 1) { - printf("ERROR: GetNumberOfRedoItems() expected 1 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 1 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -3603,7 +3602,7 @@ quick_batch_test(TestTransactionFactory *factory) tximpl = factory->create(mgr, THROWS_DO_ERROR_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate transaction.\n"); + fail("Failed to allocate transaction.\n"); return NS_ERROR_OUT_OF_MEMORY; } @@ -3612,7 +3611,7 @@ quick_batch_test(TestTransactionFactory *factory) result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for transaction. (%d)\n", result); + fail("QueryInterface() failed for transaction. (%d)\n", result); return result; } @@ -3623,7 +3622,7 @@ quick_batch_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(u1); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Initial PeekUndoStack() failed. (%d)\n", result); + fail("Initial PeekUndoStack() failed. (%d)\n", result); return result; } @@ -3632,21 +3631,21 @@ quick_batch_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(r1); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Initial PeekRedoStack() failed. (%d)\n", result); + fail("Initial PeekRedoStack() failed. (%d)\n", result); return result; } result = mgr->BeginBatch(); if (NS_FAILED(result)) { - printf("ERROR: BeginBatch() failed. (%d)\n", result); + fail("BeginBatch() failed. (%d)\n", result); return result; } result = mgr->DoTransaction(tx); if (result != NS_ERROR_FAILURE) { - printf("ERROR: DoTransaction() returned unexpected error. (%d)\n", result); + fail("DoTransaction() returned unexpected error. (%d)\n", result); return result; } @@ -3655,7 +3654,7 @@ quick_batch_test(TestTransactionFactory *factory) result = mgr->EndBatch(); if (NS_FAILED(result)) { - printf("ERROR: EndBatch() failed. (%d)\n", result); + fail("EndBatch() failed. (%d)\n", result); return result; } @@ -3664,12 +3663,12 @@ quick_batch_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(u2); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Second PeekUndoStack() failed. (%d)\n", result); + fail("Second PeekUndoStack() failed. (%d)\n", result); return result; } if (u1 != u2) { - printf("ERROR: Top of undo stack changed. (%d)\n", result); + fail("Top of undo stack changed. (%d)\n", result); return NS_ERROR_FAILURE; } @@ -3678,40 +3677,40 @@ quick_batch_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(r2); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Second PeekRedoStack() failed. (%d)\n", result); + fail("Second PeekRedoStack() failed. (%d)\n", result); return result; } if (r1 != r2) { - printf("ERROR: Top of redo stack changed. (%d)\n", result); + fail("Top of redo stack changed. (%d)\n", result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 1 item failed. (%d)\n", + result); return result; } if (numitems != 1) { - printf("ERROR: GetNumberOfUndoItems() expected 1 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 1 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on redo stack with 1 item failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on redo stack with 1 item failed. (%d)\n", + result); return result; } if (numitems != 1) { - printf("ERROR: GetNumberOfRedoItems() expected 1 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 1 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -3726,7 +3725,7 @@ quick_batch_test(TestTransactionFactory *factory) tximpl = factory->create(mgr, THROWS_UNDO_ERROR_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate transaction.\n"); + fail("Failed to allocate transaction.\n"); return NS_ERROR_OUT_OF_MEMORY; } @@ -3735,21 +3734,21 @@ quick_batch_test(TestTransactionFactory *factory) result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for transaction. (%d)\n", result); + fail("QueryInterface() failed for transaction. (%d)\n", result); return result; } result = mgr->BeginBatch(); if (NS_FAILED(result)) { - printf("ERROR: BeginBatch() failed. (%d)\n", result); + fail("BeginBatch() failed. (%d)\n", result); return result; } result = mgr->DoTransaction(tx); if (NS_FAILED(result)) { - printf("ERROR: DoTransaction() returned unexpected error. (%d)\n", result); + fail("DoTransaction() returned unexpected error. (%d)\n", result); return result; } @@ -3758,7 +3757,7 @@ quick_batch_test(TestTransactionFactory *factory) result = mgr->EndBatch(); if (NS_FAILED(result)) { - printf("ERROR: EndBatch() failed. (%d)\n", result); + fail("EndBatch() failed. (%d)\n", result); return result; } @@ -3769,7 +3768,7 @@ quick_batch_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(u1); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Initial PeekUndoStack() failed. (%d)\n", result); + fail("Initial PeekUndoStack() failed. (%d)\n", result); return result; } @@ -3778,14 +3777,14 @@ quick_batch_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(r1); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Initial PeekRedoStack() failed. (%d)\n", result); + fail("Initial PeekRedoStack() failed. (%d)\n", result); return result; } result = mgr->UndoTransaction(); if (result != NS_ERROR_FAILURE) { - printf("ERROR: UndoTransaction() returned unexpected error. (%d)\n", result); + fail("UndoTransaction() returned unexpected error. (%d)\n", result); return result; } @@ -3794,12 +3793,12 @@ quick_batch_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(u2); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Second PeekUndoStack() failed. (%d)\n", result); + fail("Second PeekUndoStack() failed. (%d)\n", result); return result; } if (u1 != u2) { - printf("ERROR: Top of undo stack changed. (%d)\n", result); + fail("Top of undo stack changed. (%d)\n", result); return NS_ERROR_FAILURE; } @@ -3808,40 +3807,40 @@ quick_batch_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(r2); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Second PeekRedoStack() failed. (%d)\n", result); + fail("Second PeekRedoStack() failed. (%d)\n", result); return result; } if (r1 != r2) { - printf("ERROR: Top of redo stack changed. (%d)\n", result); + fail("Top of redo stack changed. (%d)\n", result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 2 items failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 2 items failed. (%d)\n", + result); return result; } if (numitems != 2) { - printf("ERROR: GetNumberOfUndoItems() expected 2 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 2 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on empty redo stack. (%d)\n", - result); + fail("GetNumberOfRedoItems() on empty redo stack. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfRedoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -3856,7 +3855,7 @@ quick_batch_test(TestTransactionFactory *factory) tximpl = factory->create(mgr, THROWS_REDO_ERROR_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate transaction.\n"); + fail("Failed to allocate transaction.\n"); return NS_ERROR_OUT_OF_MEMORY; } @@ -3865,22 +3864,22 @@ quick_batch_test(TestTransactionFactory *factory) result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for RedoErrorTransaction. (%d)\n", - result); + fail("QueryInterface() failed for RedoErrorTransaction. (%d)\n", + result); return result; } result = mgr->BeginBatch(); if (NS_FAILED(result)) { - printf("ERROR: BeginBatch() failed. (%d)\n", result); + fail("BeginBatch() failed. (%d)\n", result); return result; } result = mgr->DoTransaction(tx); if (NS_FAILED(result)) { - printf("ERROR: DoTransaction() returned unexpected error. (%d)\n", result); + fail("DoTransaction() returned unexpected error. (%d)\n", result); return result; } @@ -3889,7 +3888,7 @@ quick_batch_test(TestTransactionFactory *factory) result = mgr->EndBatch(); if (NS_FAILED(result)) { - printf("ERROR: EndBatch() failed. (%d)\n", result); + fail("EndBatch() failed. (%d)\n", result); return result; } @@ -3900,7 +3899,7 @@ quick_batch_test(TestTransactionFactory *factory) tximpl = factory->create(mgr, NONE_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate transaction.\n"); + fail("Failed to allocate transaction.\n"); return NS_ERROR_OUT_OF_MEMORY; } @@ -3909,14 +3908,14 @@ quick_batch_test(TestTransactionFactory *factory) result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for transaction. (%d)\n", result); + fail("QueryInterface() failed for transaction. (%d)\n", result); return result; } result = mgr->DoTransaction(tx); if (NS_FAILED(result)) { - printf("ERROR: DoTransaction() returned unexpected error. (%d)\n", result); + fail("DoTransaction() returned unexpected error. (%d)\n", result); return result; } @@ -3929,7 +3928,7 @@ quick_batch_test(TestTransactionFactory *factory) for (i = 1; i <= 2; ++i) { result = mgr->UndoTransaction(); if (NS_FAILED(result)) { - printf("ERROR: Failed to undo transaction %d. (%d)\n", i, result); + fail("Failed to undo transaction %d. (%d)\n", i, result); return result; } } @@ -3945,7 +3944,7 @@ quick_batch_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(u1); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Initial PeekUndoStack() failed. (%d)\n", result); + fail("Initial PeekUndoStack() failed. (%d)\n", result); return result; } @@ -3954,14 +3953,14 @@ quick_batch_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(r1); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Initial PeekRedoStack() failed. (%d)\n", result); + fail("Initial PeekRedoStack() failed. (%d)\n", result); return result; } result = mgr->RedoTransaction(); if (result != NS_ERROR_FAILURE) { - printf("ERROR: RedoTransaction() returned unexpected error. (%d)\n", result); + fail("RedoTransaction() returned unexpected error. (%d)\n", result); return result; } @@ -3970,12 +3969,12 @@ quick_batch_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(u2); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Second PeekUndoStack() failed. (%d)\n", result); + fail("Second PeekUndoStack() failed. (%d)\n", result); return result; } if (u1 != u2) { - printf("ERROR: Top of undo stack changed. (%d)\n", result); + fail("Top of undo stack changed. (%d)\n", result); return NS_ERROR_FAILURE; } @@ -3984,40 +3983,40 @@ quick_batch_test(TestTransactionFactory *factory) TEST_TXMGR_IF_RELEASE(r2); // Don't hold onto any references! if (NS_FAILED(result)) { - printf("ERROR: Second PeekRedoStack() failed. (%d)\n", result); + fail("Second PeekRedoStack() failed. (%d)\n", result); return result; } if (r1 != r2) { - printf("ERROR: Top of redo stack changed. (%d)\n", result); + fail("Top of redo stack changed. (%d)\n", result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with 2 items failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on undo stack with 2 items failed. (%d)\n", + result); return result; } if (numitems != 2) { - printf("ERROR: GetNumberOfUndoItems() expected 2 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 2 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on redo stack with 2 items failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on redo stack with 2 items failed. (%d)\n", + result); return result; } if (numitems != 2) { - printf("ERROR: GetNumberOfRedoItems() expected 2 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 2 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -4034,35 +4033,35 @@ quick_batch_test(TestTransactionFactory *factory) result = mgr->SetMaxTransactionCount(0); if (NS_FAILED(result)) { - printf("ERROR: SetMaxTransactionCount(0) failed. (%d)\n", result); + fail("SetMaxTransactionCount(0) failed. (%d)\n", result); return result; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfUndoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfRedoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } @@ -4070,28 +4069,28 @@ quick_batch_test(TestTransactionFactory *factory) tximpl = factory->create(mgr, NONE_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate transaction %d.\n", i); + fail("Failed to allocate transaction %d.\n", i); return NS_ERROR_OUT_OF_MEMORY; } tx = 0; result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for transaction %d. (%d)\n", - i, result); + fail("QueryInterface() failed for transaction %d. (%d)\n", + i, result); return result; } result = mgr->BeginBatch(); if (NS_FAILED(result)) { - printf("ERROR: BeginBatch() failed. (%d)\n", result); + fail("BeginBatch() failed. (%d)\n", result); return result; } result = mgr->DoTransaction(tx); if (NS_FAILED(result)) { - printf("ERROR: Failed to execute transaction %d. (%d)\n", i, result); + fail("Failed to execute transaction %d. (%d)\n", i, result); return result; } @@ -4100,35 +4099,35 @@ quick_batch_test(TestTransactionFactory *factory) result = mgr->EndBatch(); if (NS_FAILED(result)) { - printf("ERROR: EndBatch() failed. (%d)\n", result); + fail("EndBatch() failed. (%d)\n", result); return result; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on empty undo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfUndoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfRedoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } } @@ -4145,7 +4144,7 @@ quick_batch_test(TestTransactionFactory *factory) result = mgr->SetMaxTransactionCount(-1); if (NS_FAILED(result)) { - printf("ERROR: SetMaxTransactionCount(0) failed. (%d)\n", result); + fail("SetMaxTransactionCount(0) failed. (%d)\n", result); return result; } @@ -4155,28 +4154,28 @@ quick_batch_test(TestTransactionFactory *factory) tximpl = factory->create(mgr, NONE_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate transaction %d.\n", i); + fail("Failed to allocate transaction %d.\n", i); return NS_ERROR_OUT_OF_MEMORY; } tx = 0; result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for transaction %d. (%d)\n", - i, result); + fail("QueryInterface() failed for transaction %d. (%d)\n", + i, result); return result; } result = mgr->BeginBatch(); if (NS_FAILED(result)) { - printf("ERROR: BeginBatch() failed. (%d)\n", result); + fail("BeginBatch() failed. (%d)\n", result); return result; } result = mgr->DoTransaction(tx); if (NS_FAILED(result)) { - printf("ERROR: Failed to execute transaction %d. (%d)\n", i, result); + fail("Failed to execute transaction %d. (%d)\n", i, result); return result; } @@ -4185,35 +4184,35 @@ quick_batch_test(TestTransactionFactory *factory) result = mgr->EndBatch(); if (NS_FAILED(result)) { - printf("ERROR: EndBatch() failed. (%d)\n", result); + fail("EndBatch() failed. (%d)\n", result); return result; } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on undo stack with %d items failed. (%d)\n", - i, result); + fail("GetNumberOfUndoItems() on undo stack with %d items failed. (%d)\n", + i, result); return result; } if (numitems != i) { - printf("ERROR: GetNumberOfUndoItems() expected %d got %d. (%d)\n", - i, numitems, result); + fail("GetNumberOfUndoItems() expected %d got %d. (%d)\n", + i, numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on empty redo stack failed. (%d)\n", + result); return result; } if (numitems != 0) { - printf("ERROR: GetNumberOfRedoItems() expected 0 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 0 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } } @@ -4222,41 +4221,41 @@ quick_batch_test(TestTransactionFactory *factory) result = mgr->UndoTransaction(); if (NS_FAILED(result)) { - printf("ERROR: Failed to undo transaction %d. (%d)\n", i, result); + fail("Failed to undo transaction %d. (%d)\n", i, result); return result; } } result = mgr->GetNumberOfUndoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfUndoItems() on empty undo stack with 10 items failed. (%d)\n", - result); + fail("GetNumberOfUndoItems() on empty undo stack with 10 items failed. (%d)\n", + result); return result; } if (numitems != 10) { - printf("ERROR: GetNumberOfUndoItems() expected 10 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfUndoItems() expected 10 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->GetNumberOfRedoItems(&numitems); if (NS_FAILED(result)) { - printf("ERROR: GetNumberOfRedoItems() on redo stack with 10 items failed. (%d)\n", - result); + fail("GetNumberOfRedoItems() on redo stack with 10 items failed. (%d)\n", + result); return result; } if (numitems != 10) { - printf("ERROR: GetNumberOfRedoItems() expected 10 got %d. (%d)\n", - numitems, result); + fail("GetNumberOfRedoItems() expected 10 got %d. (%d)\n", + numitems, result); return NS_ERROR_FAILURE; } result = mgr->Clear(); if (NS_FAILED(result)) { - printf("ERROR: Clear() failed. (%d)\n", result); + fail("Clear() failed. (%d)\n", result); return result; } @@ -4270,8 +4269,8 @@ quick_batch_test(TestTransactionFactory *factory) *******************************************************************/ if (sConstructorCount != sDestructorCount) { - printf("ERROR: Transaction constructor count (%d) != destructor count (%d).\n", - sConstructorCount, sDestructorCount); + fail("Transaction constructor count (%d) != destructor count (%d).\n", + sConstructorCount, sDestructorCount); return NS_ERROR_FAILURE; } @@ -4362,7 +4361,7 @@ stress_test(TestTransactionFactory *factory, PRInt32 iterations) nsCOMPtr mgr = do_CreateInstance(NS_TRANSACTIONMANAGER_CONTRACTID, &result); if (NS_FAILED(result) || !mgr) { - printf("ERROR: Failed to create Transaction Manager instance.\n"); + fail("Failed to create Transaction Manager instance.\n"); return NS_ERROR_OUT_OF_MEMORY; } @@ -4380,22 +4379,22 @@ stress_test(TestTransactionFactory *factory, PRInt32 iterations) TestTransaction *tximpl = factory->create(mgr, NONE_FLAG); if (!tximpl) { - printf("ERROR: Failed to allocate transaction %d-%d.\n", i, j); + fail("Failed to allocate transaction %d-%d.\n", i, j); return NS_ERROR_OUT_OF_MEMORY; } tx = 0; result = tximpl->QueryInterface(NS_GET_IID(nsITransaction), (void **)&tx); if (NS_FAILED(result)) { - printf("ERROR: QueryInterface() failed for transaction %d-%d. (%d)\n", - i, j, result); + fail("QueryInterface() failed for transaction %d-%d. (%d)\n", + i, j, result); return result; } result = mgr->DoTransaction(tx); if (NS_FAILED(result)) { - printf("ERROR: Failed to execute transaction %d-%d. (%d)\n", - i, j, result); + fail("Failed to execute transaction %d-%d. (%d)\n", + i, j, result); return result; } @@ -4411,7 +4410,7 @@ stress_test(TestTransactionFactory *factory, PRInt32 iterations) for (j = 1; j <= i; j++) { result = mgr->UndoTransaction(); if (NS_FAILED(result)) { - printf("ERROR: Failed to undo transaction %d-%d. (%d)\n", i, j, result); + fail("Failed to undo transaction %d-%d. (%d)\n", i, j, result); return result; } } @@ -4425,7 +4424,7 @@ stress_test(TestTransactionFactory *factory, PRInt32 iterations) for (j = 1; j <= i; j++) { result = mgr->RedoTransaction(); if (NS_FAILED(result)) { - printf("ERROR: Failed to redo transaction %d-%d. (%d)\n", i, j, result); + fail("Failed to redo transaction %d-%d. (%d)\n", i, j, result); return result; } } @@ -4441,7 +4440,7 @@ stress_test(TestTransactionFactory *factory, PRInt32 iterations) for (j = 1; j <= i; j++) { result = mgr->UndoTransaction(); if (NS_FAILED(result)) { - printf("ERROR: Failed to undo transaction %d-%d. (%d)\n", i, j, result); + fail("Failed to undo transaction %d-%d. (%d)\n", i, j, result); return result; } } @@ -4455,13 +4454,13 @@ stress_test(TestTransactionFactory *factory, PRInt32 iterations) result = mgr->Clear(); if (NS_FAILED(result)) { - printf("ERROR: Clear() failed. (%d)\n", result); + fail("Clear() failed. (%d)\n", result); return result; } if (sConstructorCount != sDestructorCount) { - printf("ERROR: Transaction constructor count (%d) != destructor count (%d).\n", - sConstructorCount, sDestructorCount); + fail("Transaction constructor count (%d) != destructor count (%d).\n", + sConstructorCount, sDestructorCount); return NS_ERROR_FAILURE; } From a7119598c98eb9bf11047eacc43a7c56e15f2872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hub=20Figui=C3=A8re?= Date: Sat, 30 Jun 2012 15:54:17 -0700 Subject: [PATCH 02/12] Bug 761589 - Part 2: implement accessibility.force_disabled for ATK. r=tbsaunde --- accessible/src/atk/ApplicationAccessibleWrap.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/accessible/src/atk/ApplicationAccessibleWrap.cpp b/accessible/src/atk/ApplicationAccessibleWrap.cpp index cf36891414c..76c1e9ba504 100644 --- a/accessible/src/atk/ApplicationAccessibleWrap.cpp +++ b/accessible/src/atk/ApplicationAccessibleWrap.cpp @@ -895,6 +895,10 @@ ShouldA11yBeEnabled() sChecked = true; + EPlatformDisabledState disabledState = PlatformDisabledState(); + if (disabledState == ePlatformIsDisabled) + return sShouldEnable = false; + // check if accessibility enabled/disabled by environment variable const char* envValue = PR_GetEnv(sAccEnv); if (envValue) From 714476eeac42adcb50b401c5a68f09a7542ef393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hub=20Figui=C3=A8re?= Date: Sat, 30 Jun 2012 22:16:54 -0700 Subject: [PATCH 03/12] Bug 769304 - Add accessibility platform status to about:support. r=dbolter,gavin --- toolkit/content/aboutSupport.js | 7 +++++++ toolkit/content/aboutSupport.xhtml | 10 +++++++++- toolkit/locales/en-US/chrome/global/aboutSupport.dtd | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/toolkit/content/aboutSupport.js b/toolkit/content/aboutSupport.js index 3a1e0df2e58..5855e5893a0 100644 --- a/toolkit/content/aboutSupport.js +++ b/toolkit/content/aboutSupport.js @@ -417,6 +417,13 @@ function populateAccessibilitySection() { } document.getElementById("a11y-activated").textContent = active ? "1" : "0"; + + var forceDisabled = 0; + forceDisabled = getPrefValue("accessibility.force_disabled").value; + + document.getElementById("a11y-force-disabled").textContent + = (forceDisabled == -1) ? "never" : + ((forceDisabled == 1) ? "1" : "0"); } function getPrefValue(aName) { diff --git a/toolkit/content/aboutSupport.xhtml b/toolkit/content/aboutSupport.xhtml index 2fab9adf0ae..6c0eb2bd917 100644 --- a/toolkit/content/aboutSupport.xhtml +++ b/toolkit/content/aboutSupport.xhtml @@ -254,7 +254,15 @@ - + + + &aboutSupport.a11yForceDisabled; + + + + + + diff --git a/toolkit/locales/en-US/chrome/global/aboutSupport.dtd b/toolkit/locales/en-US/chrome/global/aboutSupport.dtd index c41af16480f..7d1a53f8f37 100644 --- a/toolkit/locales/en-US/chrome/global/aboutSupport.dtd +++ b/toolkit/locales/en-US/chrome/global/aboutSupport.dtd @@ -53,6 +53,7 @@ variant of aboutSupport.showDir.label. --> + From 78160a18126d76ef1b0a013e621178e127b8423b Mon Sep 17 00:00:00 2001 From: Philip Chee Date: Mon, 2 Jul 2012 05:09:31 +0800 Subject: [PATCH 04/12] Bug 769737 Add nsIFocusManager to Services.jsm r=gavin. --- toolkit/content/Services.jsm | 3 ++- toolkit/content/tests/browser/browser_Services.js | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/toolkit/content/Services.jsm b/toolkit/content/Services.jsm index 6239a821cb0..0813bf3e74e 100644 --- a/toolkit/content/Services.jsm +++ b/toolkit/content/Services.jsm @@ -61,7 +61,8 @@ let initTable = [ ["startup", "@mozilla.org/toolkit/app-startup;1", "nsIAppStartup"], ["sysinfo", "@mozilla.org/system-info;1", "nsIPropertyBag2"], ["clipboard", "@mozilla.org/widget/clipboard;1", "nsIClipboard"], - ["DOMRequest", "@mozilla.org/dom/dom-request-service;1", "nsIDOMRequestService"] + ["DOMRequest", "@mozilla.org/dom/dom-request-service;1", "nsIDOMRequestService"], + ["focus", "@mozilla.org/focus-manager;1", "nsIFocusManager"], ]; initTable.forEach(function ([name, contract, intf]) diff --git a/toolkit/content/tests/browser/browser_Services.js b/toolkit/content/tests/browser/browser_Services.js index 728e4f9aa01..c48f8505d94 100644 --- a/toolkit/content/tests/browser/browser_Services.js +++ b/toolkit/content/tests/browser/browser_Services.js @@ -44,4 +44,13 @@ function checkServices() { checkService("telemetry", Ci.nsITelemetry); checkService("sysinfo", Ci.nsIPropertyBag2); checkService("clipboard", Ci.nsIClipboard); + checkService("console", Ci.nsIConsoleService); + checkService("startup", Ci.nsIAppStartup); + checkService("appShell", Ci.nsIAppShellService); + checkService("cache", Ci.nsICacheService); + checkService("scriptSecurityManager", Ci.nsIScriptSecurityManager); + checkService("domStorageManager", Ci.nsIDOMStorageManager); + checkService("DOMRequest", Ci.nsIDOMRequestService); + checkService("downloads", Ci.nsIDownloadManager); + checkService("focus", Ci.nsIFocusManager); } From 9e2f219430d074c227815538c6dfdc4cb9249ca7 Mon Sep 17 00:00:00 2001 From: David Zbarsky Date: Sun, 1 Jul 2012 16:45:59 -0700 Subject: [PATCH 05/12] Bug 763350 - Clean up some includes in content/ and dom/ r=smaug --- accessible/public/nsIAccessibilityService.h | 1 - accessible/src/base/AccEvent.cpp | 1 - .../src/base/nsAccessibilityService.cpp | 11 -------- .../src/generic/HyperTextAccessible.cpp | 3 -- accessible/src/generic/ImageAccessible.cpp | 1 - accessible/src/generic/RootAccessible.cpp | 1 - .../src/html/HTMLFormControlAccessible.cpp | 1 - accessible/src/msaa/AccessibleWrap.cpp | 1 - accessible/src/msaa/nsAccessNodeWrap.cpp | 1 - accessible/src/msaa/nsWinUtils.cpp | 2 ++ accessible/src/msaa/nsWinUtils.h | 6 ++-- .../shell/src/nsWindowsShellService.cpp | 1 - .../base/public/nsContentCreatorFunctions.h | 1 - content/base/public/nsContentUtils.h | 14 ++++------ content/base/public/nsIDocument.h | 8 +++--- .../base/public/nsIStyleSheetLinkingElement.h | 1 - content/base/src/Link.cpp | 1 - content/base/src/nsAttrValue.cpp | 2 -- content/base/src/nsAttrValue.h | 1 - content/base/src/nsCCUncollectableMarker.cpp | 1 - content/base/src/nsCSPService.cpp | 1 - content/base/src/nsCommentNode.cpp | 1 - content/base/src/nsContentAreaDragDrop.h | 1 - content/base/src/nsContentList.h | 1 - content/base/src/nsContentSink.cpp | 21 -------------- content/base/src/nsContentSink.h | 7 ----- content/base/src/nsContentUtils.cpp | 28 ++----------------- content/base/src/nsDOMAttributeMap.cpp | 1 - content/base/src/nsDOMAttributeMap.h | 1 - content/base/src/nsDOMDocumentType.cpp | 3 -- content/base/src/nsDOMFile.cpp | 1 - content/base/src/nsDOMLists.cpp | 1 - content/base/src/nsDOMSerializer.cpp | 3 -- content/base/src/nsDocument.cpp | 1 - content/base/src/nsDocumentFragment.cpp | 4 --- content/base/src/nsHTMLContentSerializer.cpp | 1 - .../src/nsNoDataProtocolContentPolicy.cpp | 4 --- content/base/src/nsRange.h | 2 +- content/base/src/nsReferencedElement.cpp | 1 - content/base/src/nsSyncLoadService.cpp | 2 +- content/base/src/nsTraversal.cpp | 3 +- content/base/src/nsTreeWalker.cpp | 1 - content/base/src/nsXHTMLContentSerializer.cpp | 1 - content/base/src/nsXMLHttpRequest.h | 1 - content/base/test/TestGetURL.cpp | 1 - content/canvas/src/CanvasUtils.cpp | 3 -- content/canvas/src/DocumentRendererChild.cpp | 2 -- content/canvas/src/WebGLContext.cpp | 1 + content/canvas/src/WebGLContext.h | 6 ---- content/canvas/src/WebGLContextUtils.cpp | 7 ----- content/canvas/src/WebGLContextValidate.cpp | 1 + .../canvas/src/nsCanvasRenderingContext2D.cpp | 1 - .../src/nsCanvasRenderingContext2DAzure.cpp | 1 - content/events/public/nsEventDispatcher.h | 2 -- content/events/public/nsMutationEvent.h | 2 -- content/events/src/nsAsyncDOMEvent.cpp | 1 - content/events/src/nsDOMBeforeUnloadEvent.cpp | 2 +- content/events/src/nsDOMCloseEvent.cpp | 2 +- content/events/src/nsDOMCommandEvent.cpp | 2 +- content/events/src/nsDOMCustomEvent.cpp | 2 +- .../events/src/nsDOMDataContainerEvent.cpp | 3 +- content/events/src/nsDOMDataTransfer.cpp | 1 + content/events/src/nsDOMDeviceLightEvent.cpp | 2 +- content/events/src/nsDOMDeviceMotionEvent.cpp | 4 +-- .../src/nsDOMDeviceOrientationEvent.cpp | 2 +- .../events/src/nsDOMDeviceProximityEvent.cpp | 2 +- content/events/src/nsDOMDragEvent.h | 2 -- content/events/src/nsDOMHashChangeEvent.cpp | 2 +- content/events/src/nsDOMKeyboardEvent.cpp | 2 +- content/events/src/nsDOMMouseEvent.h | 1 - content/events/src/nsDOMMouseScrollEvent.cpp | 4 +-- content/events/src/nsDOMMozTouchEvent.cpp | 3 +- content/events/src/nsDOMMutationEvent.cpp | 3 +- content/events/src/nsDOMMutationEvent.h | 2 -- .../events/src/nsDOMPageTransitionEvent.cpp | 2 +- content/events/src/nsDOMPopupBlockedEvent.cpp | 2 +- content/events/src/nsDOMProgressEvent.cpp | 3 +- content/events/src/nsDOMSettingsEvent.cpp | 2 +- .../events/src/nsDOMSimpleGestureEvent.cpp | 4 +-- content/events/src/nsDOMTextEvent.cpp | 1 - .../events/src/nsDOMUserProximityEvent.cpp | 2 +- content/events/src/nsDOMXULCommandEvent.cpp | 2 +- content/events/src/nsEventListenerManager.h | 1 - content/events/src/nsXMLEventsManager.cpp | 1 - .../html/content/public/nsHTMLCanvasElement.h | 2 -- content/html/content/public/nsIFormControl.h | 1 - .../html/content/public/nsIHTMLCollection.h | 1 - content/html/content/src/nsFormSubmission.cpp | 1 - .../html/content/src/nsGenericHTMLElement.cpp | 3 +- .../content/src/nsGenericHTMLFrameElement.cpp | 7 ----- .../html/content/src/nsHTMLAnchorElement.cpp | 2 -- .../html/content/src/nsHTMLAreaElement.cpp | 4 --- .../html/content/src/nsHTMLAudioElement.cpp | 22 --------------- .../html/content/src/nsHTMLBodyElement.cpp | 3 -- .../html/content/src/nsHTMLCanvasElement.cpp | 1 + .../html/content/src/nsHTMLFontElement.cpp | 1 - .../html/content/src/nsHTMLFrameElement.cpp | 4 +-- .../html/content/src/nsHTMLFrameSetElement.h | 2 -- .../html/content/src/nsHTMLIFrameElement.cpp | 2 -- .../html/content/src/nsHTMLImageElement.cpp | 1 - .../html/content/src/nsHTMLLabelElement.cpp | 1 - content/html/content/src/nsHTMLMapElement.cpp | 2 -- .../content/src/nsHTMLOptGroupElement.cpp | 1 - .../html/content/src/nsHTMLOptionElement.cpp | 1 - .../html/content/src/nsHTMLScriptElement.cpp | 1 - .../content/src/nsHTMLTableCellElement.cpp | 1 - .../content/src/nsHTMLTableSectionElement.cpp | 1 - .../html/content/src/nsHTMLTitleElement.cpp | 1 - .../html/content/src/nsHTMLVideoElement.cpp | 2 -- content/html/content/src/nsMediaError.cpp | 2 +- content/html/content/src/nsRadioVisitor.cpp | 1 - content/html/content/src/nsRadioVisitor.h | 2 -- content/html/content/src/nsTimeRanges.cpp | 2 +- .../content/src/nsMathMLElementFactory.cpp | 1 - content/media/MediaResource.cpp | 1 - content/smil/nsSMILAnimationController.cpp | 2 -- content/smil/nsSMILCSSProperty.h | 2 -- content/smil/nsSMILMappedAttribute.cpp | 2 -- content/smil/nsSMILTimeValueSpec.cpp | 1 - content/svg/content/src/SVGLengthList.cpp | 1 - content/svg/content/src/SVGPathData.cpp | 2 -- content/svg/content/src/SVGPathSegUtils.cpp | 8 ------ .../content/src/SVGTransformListParser.cpp | 2 -- content/svg/content/src/nsDOMSVGEvent.cpp | 2 +- content/svg/content/src/nsDOMSVGZoomEvent.cpp | 2 -- .../svg/content/src/nsSVGElementFactory.cpp | 1 - content/svg/content/src/nsSVGPathElement.cpp | 3 -- content/svg/content/src/nsSVGRect.cpp | 4 --- content/svg/content/src/nsSVGUseElement.cpp | 1 - content/svg/document/src/nsSVGDocument.cpp | 1 - content/xbl/src/nsXBLEventHandler.cpp | 3 -- content/xbl/src/nsXBLEventHandler.h | 1 - content/xbl/src/nsXBLInsertionPoint.cpp | 1 - content/xbl/src/nsXBLProtoImplField.cpp | 2 -- content/xbl/src/nsXBLProtoImplField.h | 1 - content/xbl/src/nsXBLProtoImplMember.h | 6 +--- content/xbl/src/nsXBLProtoImplProperty.cpp | 2 -- content/xbl/src/nsXBLPrototypeBinding.cpp | 1 + content/xbl/src/nsXBLPrototypeHandler.cpp | 1 - content/xbl/src/nsXBLPrototypeResources.h | 1 - content/xbl/src/nsXBLResourceLoader.h | 1 - content/xbl/src/nsXBLWindowKeyHandler.cpp | 1 - content/xml/content/src/nsXMLCDATASection.cpp | 2 -- .../content/src/nsXMLProcessingInstruction.h | 1 - .../document/src/nsXMLFragmentContentSink.cpp | 5 ---- content/xslt/public/nsIDocumentTransformer.h | 1 - content/xslt/src/base/txCore.h | 1 - content/xslt/src/base/txStringUtils.h | 1 + content/xslt/src/base/txURIUtils.cpp | 5 ---- content/xslt/src/xpath/nsXPathNSResolver.cpp | 1 - content/xslt/src/xpath/txRelationalExpr.cpp | 1 - content/xtf/src/nsXMLContentBuilder.cpp | 1 - .../document/src/nsXULCommandDispatcher.cpp | 2 -- content/xul/document/src/nsXULContentSink.cpp | 1 - .../xul/document/src/nsXULPrototypeDocument.h | 1 - content/xul/templates/src/nsRuleNetwork.cpp | 4 --- content/xul/templates/src/nsRuleNetwork.h | 2 -- .../xul/templates/src/nsXULContentUtils.cpp | 1 - .../xul/templates/src/nsXULSortService.cpp | 1 - .../src/nsXULTemplateQueryProcessorRDF.cpp | 3 +- .../src/nsXULTemplateQueryProcessorXML.cpp | 9 ++---- docshell/shistory/src/nsSHEntry.cpp | 3 +- dom/base/DOMRequest.cpp | 1 + dom/base/DOMRequest.h | 1 - dom/base/nsDOMClassInfo.cpp | 1 + dom/base/nsDOMClassInfo.h | 4 +-- dom/base/nsDOMNavigationTiming.cpp | 1 - dom/base/nsDOMNavigationTiming.h | 1 - dom/base/nsFocusManager.cpp | 2 -- dom/base/nsHistory.cpp | 1 - dom/base/nsIScriptGlobalObject.h | 1 - dom/base/nsJSUtils.cpp | 1 - dom/base/nsLocation.cpp | 1 - dom/base/nsMimeTypeArray.cpp | 1 - dom/base/nsPerformance.h | 1 - dom/base/nsPluginArray.cpp | 1 - dom/base/nsStructuredCloneContainer.cpp | 1 - dom/base/nsWindowRoot.cpp | 2 -- dom/bluetooth/BluetoothManager.cpp | 1 - dom/devicestorage/nsDeviceStorage.cpp | 1 + dom/file/FileHelper.cpp | 2 ++ dom/file/LockedFile.cpp | 2 ++ dom/indexedDB/FileManager.cpp | 1 - dom/indexedDB/IDBDatabase.cpp | 1 + dom/indexedDB/IDBEvents.cpp | 1 - dom/indexedDB/Key.cpp | 1 - dom/indexedDB/OpenDatabaseHelper.cpp | 2 +- dom/ipc/ContentParent.cpp | 1 - dom/ipc/TabChild.cpp | 2 -- dom/plugins/base/nsNPAPIPlugin.cpp | 1 - dom/plugins/base/nsPluginTags.cpp | 1 - dom/src/events/nsJSEventListener.cpp | 1 - dom/src/jsurl/nsJSProtocolHandler.cpp | 1 - dom/src/storage/nsDOMStorage.cpp | 1 - dom/telephony/Telephony.cpp | 1 - dom/workers/RuntimeService.cpp | 1 - editor/libeditor/base/CreateElementTxn.cpp | 1 - editor/libeditor/base/SetDocTitleTxn.cpp | 1 - editor/libeditor/base/nsEditor.cpp | 1 - editor/libeditor/html/nsHTMLAbsPosition.cpp | 1 - editor/libeditor/html/nsHTMLCSSUtils.cpp | 1 - editor/libeditor/html/nsTableEditor.cpp | 1 - .../browser/webBrowser/nsDocShellTreeOwner.h | 1 - embedding/browser/webBrowser/nsWebBrowser.cpp | 2 -- .../commandhandler/src/nsCommandManager.cpp | 1 - embedding/components/find/src/nsFind.cpp | 1 - extensions/cookie/nsCookiePermission.cpp | 1 - extensions/permissions/nsContentBlocker.cpp | 1 - .../spellcheck/src/mozInlineSpellChecker.cpp | 1 - js/ipc/ObjectWrapperChild.cpp | 1 - js/xpconnect/src/XPCComponents.cpp | 1 + layout/base/nsCSSRenderingBorders.cpp | 2 -- layout/base/nsFrameManager.cpp | 2 -- layout/base/nsImageLoader.cpp | 1 - layout/base/nsLayoutUtils.cpp | 1 - layout/base/nsPresContext.cpp | 1 - layout/forms/nsComboboxControlFrame.cpp | 1 + layout/forms/nsFileControlFrame.cpp | 1 - layout/forms/nsGfxButtonControlFrame.cpp | 1 + layout/forms/nsHTMLButtonControlFrame.cpp | 1 - layout/forms/nsMeterFrame.cpp | 1 + layout/forms/nsProgressFrame.cpp | 1 + layout/forms/nsTextControlFrame.cpp | 2 +- layout/generic/nsBulletFrame.cpp | 1 - layout/generic/nsGfxScrollFrame.cpp | 1 + layout/generic/nsLineLayout.cpp | 2 -- layout/generic/nsSelection.cpp | 1 + layout/generic/nsSubDocumentFrame.cpp | 1 - layout/generic/nsTextRunTransformations.cpp | 2 -- layout/inspector/src/inDOMView.cpp | 1 - layout/mathml/nsMathMLmactionFrame.cpp | 2 +- layout/printing/nsPrintEngine.cpp | 4 --- layout/style/nsDOMCSSDeclaration.cpp | 1 - layout/style/nsFontFaceLoader.cpp | 1 - layout/style/nsStyleSet.cpp | 1 - layout/style/nsStyleUtil.cpp | 2 -- .../layout-debug/src/nsRegressionTester.cpp | 3 -- layout/xul/base/src/nsBox.cpp | 1 - layout/xul/base/src/nsBoxFrame.cpp | 2 -- layout/xul/base/src/nsButtonBoxFrame.cpp | 2 -- layout/xul/base/src/nsDocElementBoxFrame.cpp | 1 + layout/xul/base/src/nsImageBoxFrame.cpp | 2 -- layout/xul/base/src/nsListBoxObject.cpp | 1 - layout/xul/base/src/nsMenuBarFrame.cpp | 1 - layout/xul/base/src/nsPopupBoxObject.cpp | 2 -- layout/xul/base/src/nsResizerFrame.cpp | 1 - layout/xul/base/src/nsRootBoxFrame.cpp | 1 - layout/xul/base/src/nsScrollBoxObject.cpp | 2 -- layout/xul/base/src/nsSliderFrame.cpp | 1 - layout/xul/base/src/nsSplitterFrame.cpp | 1 - layout/xul/base/src/nsTextBoxFrame.cpp | 2 -- layout/xul/base/src/nsTitleBarFrame.cpp | 1 - layout/xul/base/src/nsXULTooltipListener.cpp | 1 - .../xul/base/src/tree/src/nsTreeColFrame.cpp | 1 - .../xul/base/src/tree/src/nsTreeColumns.cpp | 1 - .../xul/base/src/tree/src/nsTreeSelection.cpp | 1 - netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp | 2 -- parser/html/nsHtml5Parser.cpp | 17 ----------- parser/html/nsHtml5Parser.h | 1 - parser/html/nsHtml5TreeBuilder.cpp | 1 - parser/html/nsHtml5TreeBuilder.h | 1 - parser/html/nsHtml5TreeBuilderCppSupplement.h | 1 - parser/html/nsHtml5TreeOpExecutor.cpp | 2 ++ parser/html/nsHtml5TreeOperation.cpp | 1 + parser/htmlparser/src/nsParser.cpp | 1 - rdf/base/public/nsIRDFContentSink.h | 1 - toolkit/components/places/Helpers.cpp | 1 - .../typeaheadfind/nsTypeAheadFind.cpp | 1 - .../exthandler/ExternalHelperAppParent.cpp | 1 - uriloader/prefetch/nsPrefetchService.cpp | 1 + uriloader/prefetch/nsPrefetchService.h | 1 - view/src/nsViewManager.cpp | 2 -- widget/cocoa/nsMenuBarX.h | 1 - widget/gtk2/nsNativeThemeGTK.cpp | 1 - widget/windows/nsNativeThemeWin.cpp | 1 - xpfe/appshell/src/nsWebShellWindow.h | 4 --- .../directory/nsDirectoryViewer.cpp | 1 - 277 files changed, 85 insertions(+), 497 deletions(-) diff --git a/accessible/public/nsIAccessibilityService.h b/accessible/public/nsIAccessibilityService.h index 250a03640a5..6ab615f4cc9 100644 --- a/accessible/public/nsIAccessibilityService.h +++ b/accessible/public/nsIAccessibilityService.h @@ -15,7 +15,6 @@ class Accessible; class nsINode; class nsIContent; -class nsIDocument; class nsIFrame; class nsIPresShell; class nsObjectFrame; diff --git a/accessible/src/base/AccEvent.cpp b/accessible/src/base/AccEvent.cpp index 40462ce458c..14799e2c5fc 100644 --- a/accessible/src/base/AccEvent.cpp +++ b/accessible/src/base/AccEvent.cpp @@ -13,7 +13,6 @@ #include "nsAccEvent.h" #include "States.h" -#include "nsIDOMDocument.h" #include "nsEventStateManager.h" #include "nsIServiceManager.h" #ifdef MOZ_XUL diff --git a/accessible/src/base/nsAccessibilityService.cpp b/accessible/src/base/nsAccessibilityService.cpp index 2981a0495c0..1da3ad4faa3 100644 --- a/accessible/src/base/nsAccessibilityService.cpp +++ b/accessible/src/base/nsAccessibilityService.cpp @@ -42,25 +42,14 @@ #include "Logging.h" #endif -#include "nsCURILoader.h" -#include "nsEventStates.h" -#include "nsIContentViewer.h" #include "nsIDOMDocument.h" -#include "nsIDOMHTMLAreaElement.h" -#include "nsIDOMHTMLLegendElement.h" #include "nsIDOMHTMLObjectElement.h" -#include "nsIDOMHTMLOptGroupElement.h" -#include "nsIDOMHTMLOptionElement.h" #include "nsIDOMXULElement.h" -#include "nsIHTMLDocument.h" #include "nsImageFrame.h" -#include "nsILink.h" #include "nsIObserverService.h" #include "nsLayoutUtils.h" #include "nsNPAPIPluginInstance.h" -#include "nsISupportsUtils.h" #include "nsObjectFrame.h" -#include "nsTextFragment.h" #include "mozilla/FunctionTimer.h" #include "mozilla/dom/Element.h" #include "mozilla/Preferences.h" diff --git a/accessible/src/generic/HyperTextAccessible.cpp b/accessible/src/generic/HyperTextAccessible.cpp index 064a20d39d3..a2c914e9e94 100644 --- a/accessible/src/generic/HyperTextAccessible.cpp +++ b/accessible/src/generic/HyperTextAccessible.cpp @@ -16,10 +16,7 @@ #include "nsIClipboard.h" #include "nsContentUtils.h" #include "nsFocusManager.h" -#include "nsIDOMCharacterData.h" -#include "nsIDOMDocument.h" #include "nsIDOMRange.h" -#include "nsIDOMXULDocument.h" #include "nsIEditingSession.h" #include "nsIEditor.h" #include "nsIFrame.h" diff --git a/accessible/src/generic/ImageAccessible.cpp b/accessible/src/generic/ImageAccessible.cpp index bcc0f5a7513..3d17b011f52 100644 --- a/accessible/src/generic/ImageAccessible.cpp +++ b/accessible/src/generic/ImageAccessible.cpp @@ -19,7 +19,6 @@ #include "nsIPresShell.h" #include "nsIServiceManager.h" #include "nsIDOMHTMLImageElement.h" -#include "nsIDOMDocument.h" #include "nsPIDOMWindow.h" using namespace mozilla::a11y; diff --git a/accessible/src/generic/RootAccessible.cpp b/accessible/src/generic/RootAccessible.cpp index 4b5f8635a5e..303d92d585f 100644 --- a/accessible/src/generic/RootAccessible.cpp +++ b/accessible/src/generic/RootAccessible.cpp @@ -43,7 +43,6 @@ #include "nsIDocument.h" #include "nsEventListenerManager.h" #include "nsIFrame.h" -#include "nsIHTMLDocument.h" #include "nsIInterfaceRequestorUtils.h" #include "nsISelectionPrivate.h" #include "nsIServiceManager.h" diff --git a/accessible/src/html/HTMLFormControlAccessible.cpp b/accessible/src/html/HTMLFormControlAccessible.cpp index f5e69c5f551..89e35e5877f 100644 --- a/accessible/src/html/HTMLFormControlAccessible.cpp +++ b/accessible/src/html/HTMLFormControlAccessible.cpp @@ -15,7 +15,6 @@ #include "nsContentList.h" #include "nsIAccessibleRelation.h" -#include "nsIDOMDocument.h" #include "nsIDOMHTMLInputElement.h" #include "nsIDOMNSEditableElement.h" #include "nsIDOMHTMLFormElement.h" diff --git a/accessible/src/msaa/AccessibleWrap.cpp b/accessible/src/msaa/AccessibleWrap.cpp index 5d51114f493..f88d76185ba 100644 --- a/accessible/src/msaa/AccessibleWrap.cpp +++ b/accessible/src/msaa/AccessibleWrap.cpp @@ -30,7 +30,6 @@ #endif #include "nsIMutableArray.h" -#include "nsIDOMDocument.h" #include "nsIFrame.h" #include "nsIScrollableFrame.h" #include "nsINameSpaceManager.h" diff --git a/accessible/src/msaa/nsAccessNodeWrap.cpp b/accessible/src/msaa/nsAccessNodeWrap.cpp index b3b002e7e4d..464fbd596f5 100644 --- a/accessible/src/msaa/nsAccessNodeWrap.cpp +++ b/accessible/src/msaa/nsAccessNodeWrap.cpp @@ -17,7 +17,6 @@ #include "Statistics.h" #include "nsAttrName.h" -#include "nsIDocument.h" #include "nsIDOMNodeList.h" #include "nsIDOMHTMLElement.h" #include "nsIFrame.h" diff --git a/accessible/src/msaa/nsWinUtils.cpp b/accessible/src/msaa/nsWinUtils.cpp index 6b1b215c89c..f85a44fce83 100644 --- a/accessible/src/msaa/nsWinUtils.cpp +++ b/accessible/src/msaa/nsWinUtils.cpp @@ -13,6 +13,8 @@ #include "mozilla/Preferences.h" #include "nsArrayUtils.h" +#include "nsIArray.h" +#include "nsIDocument.h" #include "nsIDocShellTreeItem.h" using namespace mozilla; diff --git a/accessible/src/msaa/nsWinUtils.h b/accessible/src/msaa/nsWinUtils.h index 6204dc5ecdc..b52bf28fb8c 100644 --- a/accessible/src/msaa/nsWinUtils.h +++ b/accessible/src/msaa/nsWinUtils.h @@ -9,9 +9,11 @@ #define nsWinUtils_h_ #include "Accessible2.h" +#include "nsIDOMCSSStyleDeclaration.h" +#include "nsCOMPtr.h" -#include "nsIArray.h" -#include "nsIDocument.h" +class nsIArray; +class nsIContent; const LPCWSTR kClassNameRoot = L"MozillaUIWindowClass"; const LPCWSTR kClassNameTabContent = L"MozillaContentWindowClass"; diff --git a/browser/components/shell/src/nsWindowsShellService.cpp b/browser/components/shell/src/nsWindowsShellService.cpp index 54387691687..715d55ae683 100644 --- a/browser/components/shell/src/nsWindowsShellService.cpp +++ b/browser/components/shell/src/nsWindowsShellService.cpp @@ -5,7 +5,6 @@ #include "imgIContainer.h" #include "imgIRequest.h" -#include "nsIDOMDocument.h" #include "nsIDOMElement.h" #include "nsIDOMHTMLImageElement.h" #include "nsIImageLoadingContent.h" diff --git a/content/base/public/nsContentCreatorFunctions.h b/content/base/public/nsContentCreatorFunctions.h index 47d41025c57..d97d303ff95 100644 --- a/content/base/public/nsContentCreatorFunctions.h +++ b/content/base/public/nsContentCreatorFunctions.h @@ -17,7 +17,6 @@ class nsAString; class nsIContent; -class nsIDocument; class nsINodeInfo; class imgIRequest; class nsNodeInfoManager; diff --git a/content/base/public/nsContentUtils.h b/content/base/public/nsContentUtils.h index abffc55e735..456c9ba0ffa 100644 --- a/content/base/public/nsContentUtils.h +++ b/content/base/public/nsContentUtils.h @@ -31,25 +31,16 @@ static fp_except_t oldmask = fpsetmask(~allmask); #include "nsAString.h" #include "nsIStatefulFrame.h" -#include "nsINodeInfo.h" #include "nsNodeInfoManager.h" -#include "nsContentList.h" #include "nsDOMClassInfoID.h" -#include "nsIXPCScriptable.h" #include "nsDataHashtable.h" -#include "nsIScriptRuntime.h" -#include "nsIScriptGlobalObject.h" #include "nsIDOMEvent.h" #include "nsTArray.h" -#include "nsTextFragment.h" #include "nsReadableUtils.h" #include "nsINode.h" -#include "nsHashtable.h" #include "nsIDOMNode.h" #include "nsHtml5StringParser.h" -#include "nsIParser.h" #include "nsIDocument.h" -#include "nsIFragmentContentSink.h" #include "nsContentSink.h" #include "nsMathUtils.h" #include "nsThreadUtils.h" @@ -70,9 +61,13 @@ class nsIDocument; class nsIDocumentObserver; class nsIDocShell; class nsINameSpaceManager; +class nsIFragmentContentSink; +class nsIScriptGlobalObject; class nsIScriptSecurityManager; +class nsTextFragment; class nsIJSContextStack; class nsIThreadJSContextStack; +class nsIParser; class nsIParserService; class nsIIOService; class nsIURI; @@ -95,6 +90,7 @@ class nsEventListenerManager; class nsIScriptContext; class nsIRunnable; class nsIInterfaceRequestor; +class nsINodeInfo; template class nsCOMArray; template class nsRefPtrHashtable; struct JSRuntime; diff --git a/content/base/public/nsIDocument.h b/content/base/public/nsIDocument.h index 3ac22b7360c..e8a1053709d 100644 --- a/content/base/public/nsIDocument.h +++ b/content/base/public/nsIDocument.h @@ -11,8 +11,6 @@ #include "nsCOMPtr.h" #include "nsCOMArray.h" #include "nsIURI.h" -#include "nsWeakPtr.h" -#include "nsIWeakReferenceUtils.h" #include "nsILoadGroup.h" #include "nsCRT.h" #include "mozFlushType.h" @@ -22,7 +20,6 @@ #include "nsTHashtable.h" #include "nsHashKeys.h" #include "nsNodeInfoManager.h" -#include "nsIStreamListener.h" #include "nsIVariant.h" #include "nsIObserver.h" #include "nsGkAtoms.h" @@ -34,9 +31,12 @@ #include "nsIFrameRequestCallback.h" #include "nsEventStates.h" #include "nsIStructuredCloneContainer.h" -#include "nsIBFCacheEntry.h" #include "nsILoadContext.h" +class nsIRequest; +class nsPIDOMWindow; +class nsIStreamListener; +class nsIBFCacheEntry; class nsIContent; class nsPresContext; class nsIPresShell; diff --git a/content/base/public/nsIStyleSheetLinkingElement.h b/content/base/public/nsIStyleSheetLinkingElement.h index 78a71b1d568..c822952f49c 100644 --- a/content/base/public/nsIStyleSheetLinkingElement.h +++ b/content/base/public/nsIStyleSheetLinkingElement.h @@ -8,7 +8,6 @@ #include "nsISupports.h" -class nsIDocument; class nsICSSLoaderObserver; class nsIURI; diff --git a/content/base/src/Link.cpp b/content/base/src/Link.cpp index 00e049b5269..576b09f5801 100644 --- a/content/base/src/Link.cpp +++ b/content/base/src/Link.cpp @@ -10,7 +10,6 @@ #include "nsIURL.h" #include "nsISizeOf.h" -#include "nsContentUtils.h" #include "nsEscape.h" #include "nsGkAtoms.h" #include "nsString.h" diff --git a/content/base/src/nsAttrValue.cpp b/content/base/src/nsAttrValue.cpp index d5eae04829a..6f39d08b06d 100644 --- a/content/base/src/nsAttrValue.cpp +++ b/content/base/src/nsAttrValue.cpp @@ -13,8 +13,6 @@ #include "nsUnicharUtils.h" #include "mozilla/css/StyleRule.h" #include "mozilla/css/Declaration.h" -#include "nsIHTMLDocument.h" -#include "nsIDocument.h" #include "nsContentUtils.h" #include "nsReadableUtils.h" #include "prprf.h" diff --git a/content/base/src/nsAttrValue.h b/content/base/src/nsAttrValue.h index fd963bb373d..a021dd685a0 100644 --- a/content/base/src/nsAttrValue.h +++ b/content/base/src/nsAttrValue.h @@ -23,7 +23,6 @@ typedef PRUptrdiff PtrBits; class nsAString; class nsIAtom; -class nsIDocument; template class nsTArray; struct nsTArrayDefaultAllocator; diff --git a/content/base/src/nsCCUncollectableMarker.cpp b/content/base/src/nsCCUncollectableMarker.cpp index e1e19347f1f..c456090969a 100644 --- a/content/base/src/nsCCUncollectableMarker.cpp +++ b/content/base/src/nsCCUncollectableMarker.cpp @@ -8,7 +8,6 @@ #include "nsIDocShell.h" #include "nsIDocShellTreeItem.h" #include "nsServiceManagerUtils.h" -#include "nsIDOMDocument.h" #include "nsIContentViewer.h" #include "nsIDocument.h" #include "nsIWindowMediator.h" diff --git a/content/base/src/nsCSPService.cpp b/content/base/src/nsCSPService.cpp index bdde5872029..18be0669787 100644 --- a/content/base/src/nsCSPService.cpp +++ b/content/base/src/nsCSPService.cpp @@ -9,7 +9,6 @@ #include "nsIURI.h" #include "nsIPrincipal.h" #include "nsIObserver.h" -#include "nsIDocument.h" #include "nsIContent.h" #include "nsCSPService.h" #include "nsIContentSecurityPolicy.h" diff --git a/content/base/src/nsCommentNode.cpp b/content/base/src/nsCommentNode.cpp index b48482cdad1..aa8f78fd007 100644 --- a/content/base/src/nsCommentNode.cpp +++ b/content/base/src/nsCommentNode.cpp @@ -11,7 +11,6 @@ #include "nsGenericDOMDataNode.h" #include "nsCOMPtr.h" -#include "nsIDocument.h" #include "nsGenericElement.h" // DOMCI_NODE_DATA class nsCommentNode : public nsGenericDOMDataNode, diff --git a/content/base/src/nsContentAreaDragDrop.h b/content/base/src/nsContentAreaDragDrop.h index 2434bc5b920..2e2eeb62f25 100644 --- a/content/base/src/nsContentAreaDragDrop.h +++ b/content/base/src/nsContentAreaDragDrop.h @@ -15,7 +15,6 @@ class nsIDOMNode; class nsIDOMWindow; -class nsIDOMDocument; class nsIDOMDragEvent; class nsISelection; class nsITransferable; diff --git a/content/base/src/nsContentList.h b/content/base/src/nsContentList.h index 45e1f5f269b..a2a1505aac7 100644 --- a/content/base/src/nsContentList.h +++ b/content/base/src/nsContentList.h @@ -41,7 +41,6 @@ typedef bool (*nsContentListMatchFunc)(nsIContent* aContent, typedef void (*nsContentListDestroyFunc)(void* aData); -class nsIDocument; namespace mozilla { namespace dom { class Element; diff --git a/content/base/src/nsContentSink.cpp b/content/base/src/nsContentSink.cpp index a8a81d04528..80681047e5c 100644 --- a/content/base/src/nsContentSink.cpp +++ b/content/base/src/nsContentSink.cpp @@ -14,9 +14,7 @@ #include "nsIDocument.h" #include "nsIDOMDocument.h" #include "mozilla/css/Loader.h" -#include "nsStyleConsts.h" #include "nsStyleLinkElement.h" -#include "nsINodeInfo.h" #include "nsIDocShell.h" #include "nsILoadContext.h" #include "nsIDocShellTreeItem.h" @@ -25,49 +23,30 @@ #include "nsNetUtil.h" #include "nsIHttpChannel.h" #include "nsIContent.h" -#include "nsIScriptElement.h" -#include "nsContentErrors.h" #include "nsIPresShell.h" #include "nsPresContext.h" #include "nsIViewManager.h" -#include "nsIContentViewer.h" #include "nsIAtom.h" #include "nsGkAtoms.h" #include "nsIDOMWindow.h" -#include "nsIPrincipal.h" -#include "nsIScriptGlobalObject.h" #include "nsNetCID.h" #include "nsIOfflineCacheUpdate.h" #include "nsIApplicationCache.h" #include "nsIApplicationCacheContainer.h" #include "nsIApplicationCacheChannel.h" #include "nsIScriptSecurityManager.h" -#include "nsIDOMLoadStatus.h" #include "nsICookieService.h" #include "nsIPrompt.h" -#include "nsServiceManagerUtils.h" #include "nsContentUtils.h" -#include "nsCRT.h" -#include "nsEscape.h" -#include "nsWeakReference.h" -#include "nsUnicharUtils.h" #include "nsNodeInfoManager.h" #include "nsIAppShell.h" #include "nsIWidget.h" #include "nsWidgetsCID.h" -#include "nsIRequest.h" -#include "nsNodeUtils.h" #include "nsIDOMNode.h" -#include "nsThreadUtils.h" -#include "nsPIDOMWindow.h" #include "mozAutoDocUpdate.h" #include "nsIWebNavigation.h" -#include "nsIDocumentLoader.h" -#include "nsICachingChannel.h" -#include "nsICacheEntryDescriptor.h" #include "nsGenericHTMLElement.h" #include "nsHTMLDNSPrefetch.h" -#include "nsISupportsPrimitives.h" #include "nsIObserverService.h" #include "mozilla/Preferences.h" #include "nsParserConstants.h" diff --git a/content/base/src/nsContentSink.h b/content/base/src/nsContentSink.h index d553ad8055b..57d0175e5d3 100644 --- a/content/base/src/nsContentSink.h +++ b/content/base/src/nsContentSink.h @@ -16,22 +16,15 @@ #include "nsICSSLoaderObserver.h" #include "nsWeakReference.h" #include "nsCOMPtr.h" -#include "nsCOMArray.h" #include "nsString.h" #include "nsAutoPtr.h" #include "nsGkAtoms.h" -#include "nsTHashtable.h" -#include "nsHashKeys.h" -#include "nsTArray.h" #include "nsITimer.h" #include "nsStubDocumentObserver.h" -#include "nsIParserService.h" #include "nsIContentSink.h" #include "prlog.h" -#include "nsIRequest.h" #include "nsCycleCollectionParticipant.h" #include "nsThreadUtils.h" -#include "nsIScriptElement.h" class nsIDocument; class nsIURI; diff --git a/content/base/src/nsContentUtils.cpp b/content/base/src/nsContentUtils.cpp index 36f754bb17c..87d097a000f 100644 --- a/content/base/src/nsContentUtils.cpp +++ b/content/base/src/nsContentUtils.cpp @@ -16,11 +16,8 @@ #include "nsCOMPtr.h" #include "nsAString.h" #include "nsPrintfCString.h" -#include "nsUnicharUtils.h" -#include "nsServiceManagerUtils.h" #include "nsIScriptGlobalObject.h" #include "nsIScriptContext.h" -#include "nsIDOMScriptObjectFactory.h" #include "nsDOMCID.h" #include "nsContentUtils.h" #include "nsIXPConnect.h" @@ -28,7 +25,6 @@ #include "mozilla/dom/Element.h" #include "nsIDocument.h" #include "nsINodeInfo.h" -#include "nsReadableUtils.h" #include "nsIIdleService.h" #include "nsIDOMDocument.h" #include "nsIDOMNodeList.h" @@ -37,7 +33,6 @@ #include "nsNetCID.h" #include "nsNetUtil.h" #include "nsIScriptSecurityManager.h" -#include "nsDOMError.h" #include "nsPIDOMWindow.h" #include "nsIJSContextStack.h" #include "nsIDocShell.h" @@ -46,21 +41,13 @@ #include "nsIParser.h" #include "nsIFragmentContentSink.h" #include "nsIContentSink.h" -#include "nsIHTMLContentSink.h" -#include "nsIXMLContentSink.h" -#include "nsHTMLParts.h" -#include "nsIServiceManager.h" -#include "nsIAttribute.h" #include "nsContentList.h" #include "nsIHTMLDocument.h" -#include "nsIDOMHTMLDocument.h" -#include "nsIDOMHTMLCollection.h" #include "nsIDOMHTMLFormElement.h" #include "nsIDOMHTMLElement.h" #include "nsIForm.h" #include "nsIFormControl.h" #include "nsGkAtoms.h" -#include "nsISupportsPrimitives.h" #include "imgIDecoderObserver.h" #include "imgIRequest.h" #include "imgIContainer.h" @@ -88,19 +75,14 @@ static NS_DEFINE_CID(kXTFServiceCID, NS_XTFSERVICE_CID); #include "nsUnicodeProperties.h" #include "harfbuzz/hb.h" #include "nsIJSRuntimeService.h" -#include "nsIDOMDocumentXBL.h" #include "nsBindingManager.h" #include "nsIURI.h" #include "nsIURL.h" -#include "nsXBLBinding.h" -#include "nsXBLPrototypeBinding.h" -#include "nsEscape.h" #include "nsICharsetConverterManager.h" #include "nsEventListenerManager.h" #include "nsAttrName.h" #include "nsIDOMUserDataHandler.h" #include "nsContentCreatorFunctions.h" -#include "nsGUIEvent.h" #include "nsMutationEvent.h" #include "nsIMEStateManager.h" #include "nsContentErrors.h" @@ -109,7 +91,6 @@ static NS_DEFINE_CID(kXTFServiceCID, NS_XTFSERVICE_CID); #include "nsIDOMNSEvent.h" #include "nsXULPopupManager.h" #include "nsIPermissionManager.h" -#include "nsIContentPrefService.h" #include "nsIScriptObjectPrincipal.h" #include "nsNullPrincipal.h" #include "nsIRunnable.h" @@ -124,16 +105,11 @@ static NS_DEFINE_CID(kXTFServiceCID, NS_XTFSERVICE_CID); #include "nsCPrefetchService.h" #include "nsIChromeRegistry.h" #include "nsEventDispatcher.h" -#include "nsIMIMEHeaderParam.h" #include "nsIDOMXULCommandEvent.h" -#include "nsIDOMDragEvent.h" #include "nsDOMDataTransfer.h" #include "nsHtml5Module.h" #include "nsPresContext.h" #include "nsLayoutStatics.h" -#include "nsLayoutUtils.h" -#include "nsFrameManager.h" -#include "BasicLayers.h" #include "nsFocusManager.h" #include "nsTextEditorState.h" #include "nsIPluginHost.h" @@ -143,6 +119,7 @@ static NS_DEFINE_CID(kXTFServiceCID, NS_XTFSERVICE_CID); #include "nsIDOMHTMLInputElement.h" #include "nsParserConstants.h" #include "nsIWebNavigation.h" +#include "nsTextFragment.h" #include "mozilla/Selection.h" #ifdef IBMBIDI @@ -167,7 +144,6 @@ static NS_DEFINE_CID(kXTFServiceCID, NS_XTFSERVICE_CID); #include "nsHTMLMediaElement.h" #endif #include "nsDOMTouchEvent.h" -#include "nsIScriptElement.h" #include "nsIContentViewer.h" #include "nsIObjectLoadingContent.h" #include "nsCCUncollectableMarker.h" @@ -182,6 +158,8 @@ static NS_DEFINE_CID(kXTFServiceCID, NS_XTFSERVICE_CID); #include "nsIEditor.h" #include "nsIEditorDocShell.h" #include "mozilla/Attributes.h" +#include "nsIParserService.h" +#include "nsIDOMScriptObjectFactory.h" #include "nsWrapperCacheInlines.h" diff --git a/content/base/src/nsDOMAttributeMap.cpp b/content/base/src/nsDOMAttributeMap.cpp index 4f27877d1d4..f96b796e1d8 100644 --- a/content/base/src/nsDOMAttributeMap.cpp +++ b/content/base/src/nsDOMAttributeMap.cpp @@ -11,7 +11,6 @@ #include "nsDOMAttribute.h" #include "nsIDOMDocument.h" #include "nsGenericElement.h" -#include "nsIContent.h" #include "nsIDocument.h" #include "nsINameSpaceManager.h" #include "nsDOMError.h" diff --git a/content/base/src/nsDOMAttributeMap.h b/content/base/src/nsDOMAttributeMap.h index 99006884eda..713f14e3670 100644 --- a/content/base/src/nsDOMAttributeMap.h +++ b/content/base/src/nsDOMAttributeMap.h @@ -17,7 +17,6 @@ #include "nsIDOMNode.h" class nsIAtom; -class nsIContent; class nsDOMAttribute; class nsINodeInfo; class nsIDocument; diff --git a/content/base/src/nsDOMDocumentType.cpp b/content/base/src/nsDOMDocumentType.cpp index 58e6e3ebd95..edb6993f72d 100644 --- a/content/base/src/nsDOMDocumentType.cpp +++ b/content/base/src/nsDOMDocumentType.cpp @@ -12,12 +12,9 @@ #include "nsIDOMNamedNodeMap.h" #include "nsGkAtoms.h" #include "nsCOMPtr.h" -#include "nsContentUtils.h" #include "nsDOMString.h" #include "nsNodeInfoManager.h" -#include "nsIDocument.h" #include "nsIXPConnect.h" -#include "nsIDOMDocument.h" #include "xpcpublic.h" #include "nsWrapperCacheInlines.h" diff --git a/content/base/src/nsDOMFile.cpp b/content/base/src/nsDOMFile.cpp index 9b94271c8c7..4cf84e38b21 100644 --- a/content/base/src/nsDOMFile.cpp +++ b/content/base/src/nsDOMFile.cpp @@ -14,7 +14,6 @@ #include "nsICharsetConverterManager.h" #include "nsIConverterInputStream.h" #include "nsIDocument.h" -#include "nsIDOMDocument.h" #include "nsIFileStreams.h" #include "nsIInputStream.h" #include "nsIIPCSerializable.h" diff --git a/content/base/src/nsDOMLists.cpp b/content/base/src/nsDOMLists.cpp index 103bcffe47b..e1adb367e7f 100644 --- a/content/base/src/nsDOMLists.cpp +++ b/content/base/src/nsDOMLists.cpp @@ -10,7 +10,6 @@ #include "nsDOMLists.h" #include "nsDOMError.h" #include "nsDOMClassInfoID.h" -#include "nsContentUtils.h" #include "nsINode.h" nsDOMStringList::nsDOMStringList() diff --git a/content/base/src/nsDOMSerializer.cpp b/content/base/src/nsDOMSerializer.cpp index 34104d4912c..b7f19b843c9 100644 --- a/content/base/src/nsDOMSerializer.cpp +++ b/content/base/src/nsDOMSerializer.cpp @@ -7,13 +7,10 @@ #include "nsIDOMNode.h" #include "nsDOMClassInfoID.h" #include "nsIOutputStream.h" -#include "nsINode.h" #include "nsIDocument.h" #include "nsIDOMDocument.h" #include "nsIDocumentEncoder.h" -#include "nsIContentSerializer.h" #include "nsString.h" -#include "nsReadableUtils.h" #include "nsContentCID.h" #include "nsContentUtils.h" #include "nsDOMError.h" diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index 9e397900032..43bb8994e8b 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -160,7 +160,6 @@ #include "nsHTMLCSSStyleSheet.h" #include "mozilla/dom/Link.h" -#include "nsIHTMLDocument.h" #include "nsXULAppAPI.h" #include "nsDOMTouchEvent.h" diff --git a/content/base/src/nsDocumentFragment.cpp b/content/base/src/nsDocumentFragment.cpp index e7bbfe61c47..3968a9c00a7 100644 --- a/content/base/src/nsDocumentFragment.cpp +++ b/content/base/src/nsDocumentFragment.cpp @@ -14,13 +14,9 @@ #include "nsINameSpaceManager.h" #include "nsINodeInfo.h" #include "nsNodeInfoManager.h" -#include "nsIDocument.h" -#include "nsIDOMDocument.h" -#include "nsIDOMAttr.h" #include "nsDOMError.h" #include "nsGkAtoms.h" #include "nsDOMString.h" -#include "nsIDOMUserDataHandler.h" #include "nsContentUtils.h" class nsDocumentFragment : public nsGenericElement, diff --git a/content/base/src/nsHTMLContentSerializer.cpp b/content/base/src/nsHTMLContentSerializer.cpp index 558297840a4..ae7484f771e 100644 --- a/content/base/src/nsHTMLContentSerializer.cpp +++ b/content/base/src/nsHTMLContentSerializer.cpp @@ -15,7 +15,6 @@ #include "nsIDOMElement.h" #include "nsIContent.h" #include "nsIDocument.h" -#include "nsIDOMDocument.h" #include "nsINameSpaceManager.h" #include "nsString.h" #include "nsUnicharUtils.h" diff --git a/content/base/src/nsNoDataProtocolContentPolicy.cpp b/content/base/src/nsNoDataProtocolContentPolicy.cpp index 8ac461409c4..29931280f8e 100644 --- a/content/base/src/nsNoDataProtocolContentPolicy.cpp +++ b/content/base/src/nsNoDataProtocolContentPolicy.cpp @@ -10,12 +10,8 @@ */ #include "nsNoDataProtocolContentPolicy.h" -#include "nsIDocument.h" -#include "nsINode.h" #include "nsIDOMWindow.h" -#include "nsIDOMDocument.h" #include "nsString.h" -#include "nsContentUtils.h" #include "nsIProtocolHandler.h" #include "nsIIOService.h" #include "nsIExternalProtocolHandler.h" diff --git a/content/base/src/nsRange.h b/content/base/src/nsRange.h index b4bacc78597..937d075aa46 100644 --- a/content/base/src/nsRange.h +++ b/content/base/src/nsRange.h @@ -13,7 +13,7 @@ #include "nsIDOMRange.h" #include "nsCOMPtr.h" #include "nsIDOMDocumentFragment.h" -#include "nsIContent.h" +#include "nsINode.h" #include "nsIDOMNode.h" #include "prmon.h" #include "nsStubMutationObserver.h" diff --git a/content/base/src/nsReferencedElement.cpp b/content/base/src/nsReferencedElement.cpp index 23f5315b173..042f804a0c2 100644 --- a/content/base/src/nsReferencedElement.cpp +++ b/content/base/src/nsReferencedElement.cpp @@ -11,7 +11,6 @@ #include "nsEscape.h" #include "nsXBLPrototypeBinding.h" #include "nsIDOMNode.h" -#include "nsIDOMDocument.h" #include "nsIDOMElement.h" #include "nsCycleCollectionParticipant.h" diff --git a/content/base/src/nsSyncLoadService.cpp b/content/base/src/nsSyncLoadService.cpp index f3dffbc0456..29c5d31bd95 100644 --- a/content/base/src/nsSyncLoadService.cpp +++ b/content/base/src/nsSyncLoadService.cpp @@ -17,7 +17,7 @@ #include "nsWeakReference.h" #include "nsIDocument.h" #include "nsIDOMDocument.h" -#include "nsIScriptSecurityManager.h" +#include "nsIPrincipal.h" #include "nsContentUtils.h" #include "nsThreadUtils.h" #include "nsNetUtil.h" diff --git a/content/base/src/nsTraversal.cpp b/content/base/src/nsTraversal.cpp index 35e4045f046..5e9b366c264 100644 --- a/content/base/src/nsTraversal.cpp +++ b/content/base/src/nsTraversal.cpp @@ -9,8 +9,7 @@ #include "nsIDOMNode.h" #include "nsIDOMNodeFilter.h" #include "nsDOMError.h" - -#include "nsIContent.h" +#include "nsINode.h" #include "nsGkAtoms.h" diff --git a/content/base/src/nsTreeWalker.cpp b/content/base/src/nsTreeWalker.cpp index 94993b810e4..9453643fa0c 100644 --- a/content/base/src/nsTreeWalker.cpp +++ b/content/base/src/nsTreeWalker.cpp @@ -14,7 +14,6 @@ #include "nsIDOMNodeFilter.h" #include "nsDOMError.h" #include "nsINode.h" -#include "nsIContent.h" #include "nsContentUtils.h" diff --git a/content/base/src/nsXHTMLContentSerializer.cpp b/content/base/src/nsXHTMLContentSerializer.cpp index 72b0237d173..2876461da2e 100644 --- a/content/base/src/nsXHTMLContentSerializer.cpp +++ b/content/base/src/nsXHTMLContentSerializer.cpp @@ -15,7 +15,6 @@ #include "nsIDOMElement.h" #include "nsIContent.h" #include "nsIDocument.h" -#include "nsIDOMDocument.h" #include "nsINameSpaceManager.h" #include "nsString.h" #include "nsUnicharUtils.h" diff --git a/content/base/src/nsXMLHttpRequest.h b/content/base/src/nsXMLHttpRequest.h index 8b46c95deb7..c0d87dbc191 100644 --- a/content/base/src/nsXMLHttpRequest.h +++ b/content/base/src/nsXMLHttpRequest.h @@ -9,7 +9,6 @@ #include "nsIXMLHttpRequest.h" #include "nsISupportsUtils.h" #include "nsString.h" -#include "nsIDOMDocument.h" #include "nsIURI.h" #include "nsIHttpChannel.h" #include "nsIDocument.h" diff --git a/content/base/test/TestGetURL.cpp b/content/base/test/TestGetURL.cpp index 2f31461e38e..a3908c00ef2 100644 --- a/content/base/test/TestGetURL.cpp +++ b/content/base/test/TestGetURL.cpp @@ -4,7 +4,6 @@ #include "TestHarness.h" -#include "nsIDOMDocument.h" #include "nsIPrincipal.h" #include "nsIScriptSecurityManager.h" #include "nsIXMLHttpRequest.h" diff --git a/content/canvas/src/CanvasUtils.cpp b/content/canvas/src/CanvasUtils.cpp index faf695ed7ef..d04c3e250e1 100644 --- a/content/canvas/src/CanvasUtils.cpp +++ b/content/canvas/src/CanvasUtils.cpp @@ -12,13 +12,10 @@ #include "nsIServiceManager.h" #include "nsIConsoleService.h" -#include "nsIDOMDocument.h" -#include "nsIDocument.h" #include "nsIDOMCanvasRenderingContext2D.h" #include "nsICanvasRenderingContextInternal.h" #include "nsHTMLCanvasElement.h" #include "nsIPrincipal.h" -#include "nsINode.h" #include "nsGfxCIID.h" diff --git a/content/canvas/src/DocumentRendererChild.cpp b/content/canvas/src/DocumentRendererChild.cpp index 02856a2b4bd..5c4ef71dddb 100644 --- a/content/canvas/src/DocumentRendererChild.cpp +++ b/content/canvas/src/DocumentRendererChild.cpp @@ -10,11 +10,9 @@ #include "gfxPattern.h" #include "nsPIDOMWindow.h" #include "nsIDOMWindow.h" -#include "nsIDOMDocument.h" #include "nsIDocShell.h" #include "nsIDocShellTreeNode.h" #include "nsIDocShellTreeItem.h" -#include "nsIDocument.h" #include "nsIInterfaceRequestorUtils.h" #include "nsComponentManagerUtils.h" #include "nsCSSParser.h" diff --git a/content/canvas/src/WebGLContext.cpp b/content/canvas/src/WebGLContext.cpp index 100c310c7e6..dad31815025 100644 --- a/content/canvas/src/WebGLContext.cpp +++ b/content/canvas/src/WebGLContext.cpp @@ -39,6 +39,7 @@ #include "mozilla/Telemetry.h" #include "nsIObserverService.h" +#include "mozilla/Services.h" #include "mozilla/dom/WebGLRenderingContextBinding.h" using namespace mozilla; diff --git a/content/canvas/src/WebGLContext.h b/content/canvas/src/WebGLContext.h index cb7c14e8ff5..f35cc41fa15 100644 --- a/content/canvas/src/WebGLContext.h +++ b/content/canvas/src/WebGLContext.h @@ -11,7 +11,6 @@ #include "nsTArray.h" #include "nsDataHashtable.h" -#include "nsRefPtrHashtable.h" #include "nsHashKeys.h" #include "nsIDocShell.h" @@ -19,19 +18,15 @@ #include "nsIDOMWebGLRenderingContext.h" #include "nsICanvasRenderingContextInternal.h" #include "nsHTMLCanvasElement.h" -#include "nsWeakReference.h" #include "nsIDOMHTMLElement.h" #include "nsIMemoryReporter.h" #include "nsIJSNativeInitializer.h" -#include "nsContentUtils.h" #include "nsWrapperCache.h" #include "nsIObserver.h" #include "GLContextProvider.h" #include "Layers.h" -#include "nsDataHashtable.h" - #include "mozilla/LinkedList.h" #include "mozilla/CheckedInt.h" #include "mozilla/dom/ImageData.h" @@ -65,7 +60,6 @@ #define MINVALUE_GL_MAX_RENDERBUFFER_SIZE 1024 // Different from the spec, which sets it to 1 on page 164 #define MINVALUE_GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 8 // Page 164 -class nsIDocShell; class nsIPropertyBag; namespace mozilla { diff --git a/content/canvas/src/WebGLContextUtils.cpp b/content/canvas/src/WebGLContextUtils.cpp index 19adab28c64..b51f2cf491d 100644 --- a/content/canvas/src/WebGLContextUtils.cpp +++ b/content/canvas/src/WebGLContextUtils.cpp @@ -15,19 +15,12 @@ #include "nsServiceManagerUtils.h" #include "nsIVariant.h" -#include "nsIDOMDocument.h" #include "nsIDOMEvent.h" #include "nsIDOMEventTarget.h" #include "nsIDOMDataContainerEvent.h" -#include "nsContentUtils.h" #include "mozilla/Preferences.h" -#if 0 -#include "nsIContentURIGrouper.h" -#include "nsIContentPrefService.h" -#endif - using namespace mozilla; void diff --git a/content/canvas/src/WebGLContextValidate.cpp b/content/canvas/src/WebGLContextValidate.cpp index 5e86c5c4a59..4cb1b661223 100644 --- a/content/canvas/src/WebGLContextValidate.cpp +++ b/content/canvas/src/WebGLContextValidate.cpp @@ -17,6 +17,7 @@ #include +#include "mozilla/Services.h" #include "nsIObserverService.h" using namespace mozilla; diff --git a/content/canvas/src/nsCanvasRenderingContext2D.cpp b/content/canvas/src/nsCanvasRenderingContext2D.cpp index 476d78db29e..80c0efe092f 100644 --- a/content/canvas/src/nsCanvasRenderingContext2D.cpp +++ b/content/canvas/src/nsCanvasRenderingContext2D.cpp @@ -16,7 +16,6 @@ #include "nsContentUtils.h" -#include "nsIDOMDocument.h" #include "nsIDocument.h" #include "nsIDOMCanvasRenderingContext2D.h" #include "nsICanvasRenderingContextInternal.h" diff --git a/content/canvas/src/nsCanvasRenderingContext2DAzure.cpp b/content/canvas/src/nsCanvasRenderingContext2DAzure.cpp index eb867e5ffe3..2de4293bbeb 100644 --- a/content/canvas/src/nsCanvasRenderingContext2DAzure.cpp +++ b/content/canvas/src/nsCanvasRenderingContext2DAzure.cpp @@ -16,7 +16,6 @@ #include "nsContentUtils.h" -#include "nsIDOMDocument.h" #include "nsIDocument.h" #include "nsHTMLCanvasElement.h" #include "nsSVGEffects.h" diff --git a/content/events/public/nsEventDispatcher.h b/content/events/public/nsEventDispatcher.h index a65dc0a873d..e9a49bf7c7b 100644 --- a/content/events/public/nsEventDispatcher.h +++ b/content/events/public/nsEventDispatcher.h @@ -10,8 +10,6 @@ #include "nsCOMPtr.h" #include "nsEvent.h" -class nsIContent; -class nsIDocument; class nsPresContext; class nsIDOMEvent; class nsIScriptGlobalObject; diff --git a/content/events/public/nsMutationEvent.h b/content/events/public/nsMutationEvent.h index d7528a4db1f..dea08627158 100644 --- a/content/events/public/nsMutationEvent.h +++ b/content/events/public/nsMutationEvent.h @@ -9,8 +9,6 @@ #include "nsGUIEvent.h" #include "nsIDOMNode.h" #include "nsIAtom.h" -#include "nsIDOMEventTarget.h" -#include "nsIContent.h" class nsMutationEvent : public nsEvent { diff --git a/content/events/src/nsAsyncDOMEvent.cpp b/content/events/src/nsAsyncDOMEvent.cpp index 7110500d83c..204456de8f0 100644 --- a/content/events/src/nsAsyncDOMEvent.cpp +++ b/content/events/src/nsAsyncDOMEvent.cpp @@ -5,7 +5,6 @@ #include "nsAsyncDOMEvent.h" #include "nsIDOMEvent.h" -#include "nsIDOMDocument.h" #include "nsIDOMEventTarget.h" #include "nsContentUtils.h" #include "nsEventDispatcher.h" diff --git a/content/events/src/nsDOMBeforeUnloadEvent.cpp b/content/events/src/nsDOMBeforeUnloadEvent.cpp index 6b676461b4e..3f7d8c2fe9f 100644 --- a/content/events/src/nsDOMBeforeUnloadEvent.cpp +++ b/content/events/src/nsDOMBeforeUnloadEvent.cpp @@ -3,8 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "nsDOMClassInfoID.h" #include "nsDOMBeforeUnloadEvent.h" -#include "nsContentUtils.h" NS_IMPL_ADDREF_INHERITED(nsDOMBeforeUnloadEvent, nsDOMEvent) NS_IMPL_RELEASE_INHERITED(nsDOMBeforeUnloadEvent, nsDOMEvent) diff --git a/content/events/src/nsDOMCloseEvent.cpp b/content/events/src/nsDOMCloseEvent.cpp index 72e6dd084b5..8be76d58e0d 100644 --- a/content/events/src/nsDOMCloseEvent.cpp +++ b/content/events/src/nsDOMCloseEvent.cpp @@ -3,8 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "nsDOMClassInfoID.h" #include "nsDOMCloseEvent.h" -#include "nsContentUtils.h" #include "DictionaryHelpers.h" NS_IMPL_ADDREF_INHERITED(nsDOMCloseEvent, nsDOMEvent) diff --git a/content/events/src/nsDOMCommandEvent.cpp b/content/events/src/nsDOMCommandEvent.cpp index 2bdeb08272c..99cff2183de 100644 --- a/content/events/src/nsDOMCommandEvent.cpp +++ b/content/events/src/nsDOMCommandEvent.cpp @@ -3,8 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "nsDOMClassInfoID.h" #include "nsDOMCommandEvent.h" -#include "nsContentUtils.h" nsDOMCommandEvent::nsDOMCommandEvent(nsPresContext* aPresContext, nsCommandEvent* aEvent) diff --git a/content/events/src/nsDOMCustomEvent.cpp b/content/events/src/nsDOMCustomEvent.cpp index b22772657c4..8b62b70fabb 100644 --- a/content/events/src/nsDOMCustomEvent.cpp +++ b/content/events/src/nsDOMCustomEvent.cpp @@ -3,8 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "nsDOMClassInfoID.h" #include "nsDOMCustomEvent.h" -#include "nsContentUtils.h" #include "DictionaryHelpers.h" NS_IMPL_CYCLE_COLLECTION_CLASS(nsDOMCustomEvent) diff --git a/content/events/src/nsDOMDataContainerEvent.cpp b/content/events/src/nsDOMDataContainerEvent.cpp index bfa35c95437..9ca80f1ef99 100644 --- a/content/events/src/nsDOMDataContainerEvent.cpp +++ b/content/events/src/nsDOMDataContainerEvent.cpp @@ -4,8 +4,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsDOMDataContainerEvent.h" - -#include "nsContentUtils.h" +#include "nsDOMClassInfoID.h" nsDOMDataContainerEvent::nsDOMDataContainerEvent(nsPresContext *aPresContext, nsEvent *aEvent) diff --git a/content/events/src/nsDOMDataTransfer.cpp b/content/events/src/nsDOMDataTransfer.cpp index e96c1628c41..d7f075c0172 100644 --- a/content/events/src/nsDOMDataTransfer.cpp +++ b/content/events/src/nsDOMDataTransfer.cpp @@ -26,6 +26,7 @@ #include "nsIScriptObjectPrincipal.h" #include "nsIWebNavigation.h" #include "nsIDocShellTreeItem.h" +#include "nsIScriptContext.h" using namespace mozilla; diff --git a/content/events/src/nsDOMDeviceLightEvent.cpp b/content/events/src/nsDOMDeviceLightEvent.cpp index 7a59ca0cef8..a5031e78133 100644 --- a/content/events/src/nsDOMDeviceLightEvent.cpp +++ b/content/events/src/nsDOMDeviceLightEvent.cpp @@ -2,8 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "nsDOMClassInfoID.h" #include "nsDOMDeviceLightEvent.h" -#include "nsContentUtils.h" #include "DictionaryHelpers.h" NS_IMPL_ADDREF_INHERITED(nsDOMDeviceLightEvent, nsDOMEvent) diff --git a/content/events/src/nsDOMDeviceMotionEvent.cpp b/content/events/src/nsDOMDeviceMotionEvent.cpp index 009bdb604ef..ca396db9fcc 100644 --- a/content/events/src/nsDOMDeviceMotionEvent.cpp +++ b/content/events/src/nsDOMDeviceMotionEvent.cpp @@ -2,10 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "nsDOMClassInfoID.h" #include "nsDOMDeviceMotionEvent.h" -#include "nsContentUtils.h" - - NS_IMPL_CYCLE_COLLECTION_CLASS(nsDOMDeviceMotionEvent) diff --git a/content/events/src/nsDOMDeviceOrientationEvent.cpp b/content/events/src/nsDOMDeviceOrientationEvent.cpp index 0744d964749..a3ce0ce9ffd 100644 --- a/content/events/src/nsDOMDeviceOrientationEvent.cpp +++ b/content/events/src/nsDOMDeviceOrientationEvent.cpp @@ -2,8 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "nsDOMClassInfoID.h" #include "nsDOMDeviceOrientationEvent.h" -#include "nsContentUtils.h" NS_IMPL_ADDREF_INHERITED(nsDOMDeviceOrientationEvent, nsDOMEvent) NS_IMPL_RELEASE_INHERITED(nsDOMDeviceOrientationEvent, nsDOMEvent) diff --git a/content/events/src/nsDOMDeviceProximityEvent.cpp b/content/events/src/nsDOMDeviceProximityEvent.cpp index 5e39adc210e..5a0f2e49041 100644 --- a/content/events/src/nsDOMDeviceProximityEvent.cpp +++ b/content/events/src/nsDOMDeviceProximityEvent.cpp @@ -2,8 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "nsDOMClassInfoID.h" #include "nsDOMDeviceProximityEvent.h" -#include "nsContentUtils.h" #include "DictionaryHelpers.h" NS_IMPL_ADDREF_INHERITED(nsDOMDeviceProximityEvent, nsDOMEvent) diff --git a/content/events/src/nsDOMDragEvent.h b/content/events/src/nsDOMDragEvent.h index 10d877fee95..7e78e99f872 100644 --- a/content/events/src/nsDOMDragEvent.h +++ b/content/events/src/nsDOMDragEvent.h @@ -8,9 +8,7 @@ #include "nsIDOMDragEvent.h" #include "nsDOMMouseEvent.h" -#include "nsIDOMDataTransfer.h" -class nsIContent; class nsEvent; class nsDOMDragEvent : public nsDOMMouseEvent, diff --git a/content/events/src/nsDOMHashChangeEvent.cpp b/content/events/src/nsDOMHashChangeEvent.cpp index 264d1bd6afe..ad04fe7f718 100644 --- a/content/events/src/nsDOMHashChangeEvent.cpp +++ b/content/events/src/nsDOMHashChangeEvent.cpp @@ -3,8 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "nsDOMClassInfoID.h" #include "nsDOMHashChangeEvent.h" -#include "nsContentUtils.h" #include "DictionaryHelpers.h" NS_IMPL_ADDREF_INHERITED(nsDOMHashChangeEvent, nsDOMEvent) diff --git a/content/events/src/nsDOMKeyboardEvent.cpp b/content/events/src/nsDOMKeyboardEvent.cpp index af9cc643029..ef024ca751e 100644 --- a/content/events/src/nsDOMKeyboardEvent.cpp +++ b/content/events/src/nsDOMKeyboardEvent.cpp @@ -4,7 +4,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsDOMKeyboardEvent.h" -#include "nsContentUtils.h" +#include "nsDOMClassInfoID.h" nsDOMKeyboardEvent::nsDOMKeyboardEvent(nsPresContext* aPresContext, nsKeyEvent* aEvent) diff --git a/content/events/src/nsDOMMouseEvent.h b/content/events/src/nsDOMMouseEvent.h index d425a22736f..21e298744b2 100644 --- a/content/events/src/nsDOMMouseEvent.h +++ b/content/events/src/nsDOMMouseEvent.h @@ -9,7 +9,6 @@ #include "nsIDOMMouseEvent.h" #include "nsDOMUIEvent.h" -class nsIContent; class nsEvent; class nsDOMMouseEvent : public nsDOMUIEvent, diff --git a/content/events/src/nsDOMMouseScrollEvent.cpp b/content/events/src/nsDOMMouseScrollEvent.cpp index 449f5ec23a7..6eef2337627 100644 --- a/content/events/src/nsDOMMouseScrollEvent.cpp +++ b/content/events/src/nsDOMMouseScrollEvent.cpp @@ -4,9 +4,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsDOMMouseScrollEvent.h" -#include "nsGUIEvent.h" -#include "nsIContent.h" -#include "nsContentUtils.h" +#include "nsDOMClassInfoID.h" nsDOMMouseScrollEvent::nsDOMMouseScrollEvent(nsPresContext* aPresContext, nsInputEvent* aEvent) diff --git a/content/events/src/nsDOMMozTouchEvent.cpp b/content/events/src/nsDOMMozTouchEvent.cpp index 141e036166f..b0914680328 100644 --- a/content/events/src/nsDOMMozTouchEvent.cpp +++ b/content/events/src/nsDOMMozTouchEvent.cpp @@ -3,9 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "nsDOMClassInfoID.h" #include "nsDOMMozTouchEvent.h" -#include "nsGUIEvent.h" -#include "nsContentUtils.h" nsDOMMozTouchEvent::nsDOMMozTouchEvent(nsPresContext* aPresContext, nsMozTouchEvent* aEvent) : nsDOMMouseEvent(aPresContext, aEvent ? aEvent : new nsMozTouchEvent(false, 0, nsnull, 0)) diff --git a/content/events/src/nsDOMMutationEvent.cpp b/content/events/src/nsDOMMutationEvent.cpp index bd08da49c98..072b2a9f6ba 100644 --- a/content/events/src/nsDOMMutationEvent.cpp +++ b/content/events/src/nsDOMMutationEvent.cpp @@ -4,9 +4,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsCOMPtr.h" +#include "nsDOMClassInfoID.h" #include "nsDOMMutationEvent.h" #include "nsMutationEvent.h" -#include "nsContentUtils.h" + class nsPresContext; diff --git a/content/events/src/nsDOMMutationEvent.h b/content/events/src/nsDOMMutationEvent.h index e78a3411149..ece43fe2b03 100644 --- a/content/events/src/nsDOMMutationEvent.h +++ b/content/events/src/nsDOMMutationEvent.h @@ -6,10 +6,8 @@ #ifndef nsDOMMutationEvent_h__ #define nsDOMMutationEvent_h__ -#include "nsCOMPtr.h" #include "nsIDOMMutationEvent.h" #include "nsDOMEvent.h" -#include "nsContentUtils.h" class nsDOMMutationEvent : public nsDOMEvent, public nsIDOMMutationEvent diff --git a/content/events/src/nsDOMPageTransitionEvent.cpp b/content/events/src/nsDOMPageTransitionEvent.cpp index c7db33727e3..041e28a620e 100644 --- a/content/events/src/nsDOMPageTransitionEvent.cpp +++ b/content/events/src/nsDOMPageTransitionEvent.cpp @@ -3,8 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "nsDOMClassInfoID.h" #include "nsDOMPageTransitionEvent.h" -#include "nsContentUtils.h" #include "DictionaryHelpers.h" DOMCI_DATA(PageTransitionEvent, nsDOMPageTransitionEvent) diff --git a/content/events/src/nsDOMPopupBlockedEvent.cpp b/content/events/src/nsDOMPopupBlockedEvent.cpp index c4fd1d579f8..1f9b2919056 100644 --- a/content/events/src/nsDOMPopupBlockedEvent.cpp +++ b/content/events/src/nsDOMPopupBlockedEvent.cpp @@ -3,9 +3,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "nsDOMClassInfoID.h" #include "nsDOMPopupBlockedEvent.h" #include "nsIURI.h" -#include "nsContentUtils.h" NS_IMPL_ADDREF_INHERITED(nsDOMPopupBlockedEvent, nsDOMEvent) NS_IMPL_RELEASE_INHERITED(nsDOMPopupBlockedEvent, nsDOMEvent) diff --git a/content/events/src/nsDOMProgressEvent.cpp b/content/events/src/nsDOMProgressEvent.cpp index f4edb802d13..2077ae10577 100644 --- a/content/events/src/nsDOMProgressEvent.cpp +++ b/content/events/src/nsDOMProgressEvent.cpp @@ -4,9 +4,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "nsDOMClassInfoID.h" #include "nsDOMProgressEvent.h" -#include "nsContentUtils.h" - DOMCI_DATA(ProgressEvent, nsDOMProgressEvent) diff --git a/content/events/src/nsDOMSettingsEvent.cpp b/content/events/src/nsDOMSettingsEvent.cpp index cee81bc5b4f..295839ed8f8 100644 --- a/content/events/src/nsDOMSettingsEvent.cpp +++ b/content/events/src/nsDOMSettingsEvent.cpp @@ -3,8 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "nsDOMClassInfoID.h" #include "nsDOMSettingsEvent.h" -#include "nsContentUtils.h" #include "DictionaryHelpers.h" NS_IMPL_CYCLE_COLLECTION_CLASS(nsDOMMozSettingsEvent) diff --git a/content/events/src/nsDOMSimpleGestureEvent.cpp b/content/events/src/nsDOMSimpleGestureEvent.cpp index dc0ad66cb12..bc01bb0702d 100644 --- a/content/events/src/nsDOMSimpleGestureEvent.cpp +++ b/content/events/src/nsDOMSimpleGestureEvent.cpp @@ -3,10 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "nsDOMClassInfoID.h" #include "nsDOMSimpleGestureEvent.h" -#include "nsGUIEvent.h" -#include "nsContentUtils.h" - nsDOMSimpleGestureEvent::nsDOMSimpleGestureEvent(nsPresContext* aPresContext, nsSimpleGestureEvent* aEvent) : nsDOMMouseEvent(aPresContext, aEvent ? aEvent : new nsSimpleGestureEvent(false, 0, nsnull, 0, 0.0)) diff --git a/content/events/src/nsDOMTextEvent.cpp b/content/events/src/nsDOMTextEvent.cpp index 56fda8dc0c6..d482ef6a640 100644 --- a/content/events/src/nsDOMTextEvent.cpp +++ b/content/events/src/nsDOMTextEvent.cpp @@ -5,7 +5,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsDOMTextEvent.h" -#include "nsContentUtils.h" #include "nsPrivateTextRange.h" nsDOMTextEvent::nsDOMTextEvent(nsPresContext* aPresContext, diff --git a/content/events/src/nsDOMUserProximityEvent.cpp b/content/events/src/nsDOMUserProximityEvent.cpp index 6f1ad1dd5d1..40cf450388e 100644 --- a/content/events/src/nsDOMUserProximityEvent.cpp +++ b/content/events/src/nsDOMUserProximityEvent.cpp @@ -2,8 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "nsDOMClassInfoID.h" #include "nsDOMUserProximityEvent.h" -#include "nsContentUtils.h" #include "DictionaryHelpers.h" NS_IMPL_ADDREF_INHERITED(nsDOMUserProximityEvent, nsDOMEvent) diff --git a/content/events/src/nsDOMXULCommandEvent.cpp b/content/events/src/nsDOMXULCommandEvent.cpp index 369b07d7450..cf6d95976ad 100644 --- a/content/events/src/nsDOMXULCommandEvent.cpp +++ b/content/events/src/nsDOMXULCommandEvent.cpp @@ -4,8 +4,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "nsDOMClassInfoID.h" #include "nsDOMXULCommandEvent.h" -#include "nsContentUtils.h" nsDOMXULCommandEvent::nsDOMXULCommandEvent(nsPresContext* aPresContext, nsInputEvent* aEvent) diff --git a/content/events/src/nsEventListenerManager.h b/content/events/src/nsEventListenerManager.h index 5f12605d3a2..f5876dbc134 100644 --- a/content/events/src/nsEventListenerManager.h +++ b/content/events/src/nsEventListenerManager.h @@ -29,7 +29,6 @@ class nsEventTargetChainItem; class nsPIDOMWindow; class nsCxPusher; class nsIEventListenerInfo; -class nsIDocument; typedef enum { diff --git a/content/events/src/nsXMLEventsManager.cpp b/content/events/src/nsXMLEventsManager.cpp index 99805840821..ec0480e45bf 100644 --- a/content/events/src/nsXMLEventsManager.cpp +++ b/content/events/src/nsXMLEventsManager.cpp @@ -7,7 +7,6 @@ #include "nsXMLEventsManager.h" #include "nsGkAtoms.h" #include "nsIDOMElement.h" -#include "nsIDOMDocument.h" #include "nsIDOMEventTarget.h" #include "nsNetUtil.h" #include "nsIURL.h" diff --git a/content/html/content/public/nsHTMLCanvasElement.h b/content/html/content/public/nsHTMLCanvasElement.h index e020373b50d..b88c5ec331f 100644 --- a/content/html/content/public/nsHTMLCanvasElement.h +++ b/content/html/content/public/nsHTMLCanvasElement.h @@ -11,8 +11,6 @@ #include "nsGkAtoms.h" #include "nsSize.h" #include "nsIFrame.h" -#include "nsIDocument.h" -#include "nsIDOMDocument.h" #include "nsDOMError.h" #include "nsNodeInfoManager.h" diff --git a/content/html/content/public/nsIFormControl.h b/content/html/content/public/nsIFormControl.h index e3c76674522..07231fbaeb7 100644 --- a/content/html/content/public/nsIFormControl.h +++ b/content/html/content/public/nsIFormControl.h @@ -8,7 +8,6 @@ #include "nsISupports.h" class nsIDOMHTMLFormElement; class nsPresState; -class nsIContent; class nsString; class nsIFormProcessor; class nsFormSubmission; diff --git a/content/html/content/public/nsIHTMLCollection.h b/content/html/content/public/nsIHTMLCollection.h index 4c2f84cc0db..a6e540c8d1a 100644 --- a/content/html/content/public/nsIHTMLCollection.h +++ b/content/html/content/public/nsIHTMLCollection.h @@ -9,7 +9,6 @@ #include "nsIDOMHTMLCollection.h" class nsINode; -class nsIContent; class nsWrapperCache; // IID for the nsIHTMLCollection interface diff --git a/content/html/content/src/nsFormSubmission.cpp b/content/html/content/src/nsFormSubmission.cpp index d79d0ff3fa3..9e38a21830c 100644 --- a/content/html/content/src/nsFormSubmission.cpp +++ b/content/html/content/src/nsFormSubmission.cpp @@ -13,7 +13,6 @@ #include "nsILinkHandler.h" #include "nsIDocument.h" #include "nsGkAtoms.h" -#include "nsIHTMLDocument.h" #include "nsIFormControl.h" #include "nsIDOMHTMLFormElement.h" #include "nsDOMError.h" diff --git a/content/html/content/src/nsGenericHTMLElement.cpp b/content/html/content/src/nsGenericHTMLElement.cpp index fa7e7266b4a..5a329c8c290 100644 --- a/content/html/content/src/nsGenericHTMLElement.cpp +++ b/content/html/content/src/nsGenericHTMLElement.cpp @@ -77,7 +77,6 @@ #include "nsIEditorIMESupport.h" #include "nsEventDispatcher.h" #include "nsLayoutUtils.h" -#include "nsContentCreatorFunctions.h" #include "mozAutoDocUpdate.h" #include "nsHtml5Module.h" #include "nsITextControlElement.h" @@ -85,7 +84,6 @@ #include "nsHTMLFieldSetElement.h" #include "nsHTMLMenuElement.h" #include "nsAsyncDOMEvent.h" -#include "nsIScriptError.h" #include "nsDOMMutationObserver.h" #include "mozilla/Preferences.h" #include "mozilla/dom/FromParser.h" @@ -95,6 +93,7 @@ #include "nsVariant.h" #include "nsDOMSettableTokenList.h" #include "nsThreadUtils.h" +#include "nsTextFragment.h" using namespace mozilla; using namespace mozilla::dom; diff --git a/content/html/content/src/nsGenericHTMLFrameElement.cpp b/content/html/content/src/nsGenericHTMLFrameElement.cpp index 3d60b9af6ef..9332403b52b 100644 --- a/content/html/content/src/nsGenericHTMLFrameElement.cpp +++ b/content/html/content/src/nsGenericHTMLFrameElement.cpp @@ -6,15 +6,8 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsGenericHTMLFrameElement.h" -#include "nsIWebProgress.h" -#include "nsIDOMCustomEvent.h" -#include "nsIVariant.h" #include "nsIInterfaceRequestorUtils.h" -#include "nsWeakPtr.h" -#include "nsVariant.h" #include "nsContentUtils.h" -#include "nsEventDispatcher.h" -#include "nsAsyncDOMEvent.h" #include "mozilla/Preferences.h" using namespace mozilla; diff --git a/content/html/content/src/nsHTMLAnchorElement.cpp b/content/html/content/src/nsHTMLAnchorElement.cpp index 2794c88e59a..4e72319a0f0 100644 --- a/content/html/content/src/nsHTMLAnchorElement.cpp +++ b/content/html/content/src/nsHTMLAnchorElement.cpp @@ -11,8 +11,6 @@ #include "nsCOMPtr.h" #include "nsContentUtils.h" -#include "nsReadableUtils.h" -#include "nsUnicharUtils.h" #include "nsGkAtoms.h" #include "nsIPresShell.h" #include "nsIDocument.h" diff --git a/content/html/content/src/nsHTMLAreaElement.cpp b/content/html/content/src/nsHTMLAreaElement.cpp index 1eb3d0d8c3f..6a7d6b4f6ea 100644 --- a/content/html/content/src/nsHTMLAreaElement.cpp +++ b/content/html/content/src/nsHTMLAreaElement.cpp @@ -4,14 +4,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsIDOMHTMLAreaElement.h" -#include "nsIDOMEventTarget.h" #include "nsGenericHTMLElement.h" #include "nsILink.h" #include "nsGkAtoms.h" -#include "nsStyleConsts.h" #include "nsIURL.h" -#include "nsNetUtil.h" -#include "nsReadableUtils.h" #include "nsIDocument.h" #include "Link.h" diff --git a/content/html/content/src/nsHTMLAudioElement.cpp b/content/html/content/src/nsHTMLAudioElement.cpp index 229f0c806b6..05dd963a8e8 100644 --- a/content/html/content/src/nsHTMLAudioElement.cpp +++ b/content/html/content/src/nsHTMLAudioElement.cpp @@ -4,33 +4,11 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsIDOMHTMLAudioElement.h" -#include "nsIDOMHTMLSourceElement.h" #include "nsHTMLAudioElement.h" #include "nsGenericHTMLElement.h" #include "nsGkAtoms.h" -#include "nsSize.h" -#include "nsIFrame.h" #include "nsIDocument.h" -#include "nsIDOMDocument.h" -#include "nsDOMError.h" -#include "nsNodeInfoManager.h" -#include "plbase64.h" -#include "nsNetUtil.h" -#include "prmem.h" -#include "nsXPCOMStrings.h" -#include "prlock.h" -#include "nsThreadUtils.h" - -#include "nsIScriptSecurityManager.h" -#include "nsIXPConnect.h" -#include "jsapi.h" #include "jsfriendapi.h" -#include "nsJSUtils.h" - -#include "nsITimer.h" - -#include "nsEventDispatcher.h" -#include "nsIDOMProgressEvent.h" #include "nsContentUtils.h" using namespace mozilla::dom; diff --git a/content/html/content/src/nsHTMLBodyElement.cpp b/content/html/content/src/nsHTMLBodyElement.cpp index 1e698fc710b..95dfdf9903a 100644 --- a/content/html/content/src/nsHTMLBodyElement.cpp +++ b/content/html/content/src/nsHTMLBodyElement.cpp @@ -8,16 +8,13 @@ #include "nscore.h" #include "nsCOMPtr.h" #include "nsIDOMHTMLBodyElement.h" -#include "nsIDOMEventTarget.h" #include "nsGenericHTMLElement.h" #include "nsGkAtoms.h" #include "nsStyleConsts.h" #include "nsPresContext.h" #include "nsIPresShell.h" #include "nsIDocument.h" -#include "nsIHTMLDocument.h" #include "nsHTMLStyleSheet.h" -#include "nsIContentViewer.h" #include "nsIMarkupDocumentViewer.h" #include "nsMappedAttributes.h" #include "nsRuleData.h" diff --git a/content/html/content/src/nsHTMLCanvasElement.cpp b/content/html/content/src/nsHTMLCanvasElement.cpp index 8defe617c09..a64015a8ccd 100644 --- a/content/html/content/src/nsHTMLCanvasElement.cpp +++ b/content/html/content/src/nsHTMLCanvasElement.cpp @@ -16,6 +16,7 @@ #include "nsIScriptSecurityManager.h" #include "nsIXPConnect.h" #include "jsapi.h" +#include "jsfriendapi.h" #include "nsContentUtils.h" #include "nsJSUtils.h" #include "nsMathUtils.h" diff --git a/content/html/content/src/nsHTMLFontElement.cpp b/content/html/content/src/nsHTMLFontElement.cpp index 617dafc5427..6bafa35e6b5 100644 --- a/content/html/content/src/nsHTMLFontElement.cpp +++ b/content/html/content/src/nsHTMLFontElement.cpp @@ -14,7 +14,6 @@ #include "nsPresContext.h" #include "nsMappedAttributes.h" #include "nsRuleData.h" -#include "nsIDocument.h" #include "nsAlgorithm.h" #include "nsContentUtils.h" diff --git a/content/html/content/src/nsHTMLFrameElement.cpp b/content/html/content/src/nsHTMLFrameElement.cpp index aba9d1692c9..dbb3b0c547b 100644 --- a/content/html/content/src/nsHTMLFrameElement.cpp +++ b/content/html/content/src/nsHTMLFrameElement.cpp @@ -8,10 +8,10 @@ #include "nsIDOMHTMLFrameElement.h" #include "nsGenericHTMLFrameElement.h" #include "nsGkAtoms.h" -#include "nsIDocument.h" -#include "nsIDOMDocument.h" #include "nsDOMError.h" +class nsIDOMDocument; + using namespace mozilla; using namespace mozilla::dom; diff --git a/content/html/content/src/nsHTMLFrameSetElement.h b/content/html/content/src/nsHTMLFrameSetElement.h index a04a5adf1e3..8d74eebd207 100644 --- a/content/html/content/src/nsHTMLFrameSetElement.h +++ b/content/html/content/src/nsHTMLFrameSetElement.h @@ -12,8 +12,6 @@ #include "nsGenericHTMLElement.h" #include "nsGkAtoms.h" #include "nsStyleConsts.h" -#include "nsIHTMLDocument.h" -#include "nsIDocument.h" /** * The nsFramesetUnit enum is used to denote the type of each entry diff --git a/content/html/content/src/nsHTMLIFrameElement.cpp b/content/html/content/src/nsHTMLIFrameElement.cpp index 4756f2db327..19dc8e1a529 100644 --- a/content/html/content/src/nsHTMLIFrameElement.cpp +++ b/content/html/content/src/nsHTMLIFrameElement.cpp @@ -6,10 +6,8 @@ #include "mozilla/Util.h" #include "nsHTMLIFrameElement.h" -#include "nsIDOMDocument.h" #include "nsIDOMSVGDocument.h" #include "nsGkAtoms.h" -#include "nsIDocument.h" #include "nsMappedAttributes.h" #include "nsDOMError.h" #include "nsRuleData.h" diff --git a/content/html/content/src/nsHTMLImageElement.cpp b/content/html/content/src/nsHTMLImageElement.cpp index cc611afd3c4..e59ce12a1c1 100644 --- a/content/html/content/src/nsHTMLImageElement.cpp +++ b/content/html/content/src/nsHTMLImageElement.cpp @@ -13,7 +13,6 @@ #include "nsMappedAttributes.h" #include "nsSize.h" #include "nsIDocument.h" -#include "nsIDOMDocument.h" #include "nsIScriptContext.h" #include "nsIURL.h" #include "nsIIOService.h" diff --git a/content/html/content/src/nsHTMLLabelElement.cpp b/content/html/content/src/nsHTMLLabelElement.cpp index 645d2646e24..c99ca542fa4 100644 --- a/content/html/content/src/nsHTMLLabelElement.cpp +++ b/content/html/content/src/nsHTMLLabelElement.cpp @@ -15,7 +15,6 @@ #include "nsPresContext.h" #include "nsIFormControl.h" #include "nsIForm.h" -#include "nsIDOMDocument.h" #include "nsIDocument.h" #include "nsGUIEvent.h" #include "nsEventDispatcher.h" diff --git a/content/html/content/src/nsHTMLMapElement.cpp b/content/html/content/src/nsHTMLMapElement.cpp index 513bd32d77b..bf9bc05ae67 100644 --- a/content/html/content/src/nsHTMLMapElement.cpp +++ b/content/html/content/src/nsHTMLMapElement.cpp @@ -8,8 +8,6 @@ #include "nsGkAtoms.h" #include "nsStyleConsts.h" #include "nsContentList.h" -#include "nsIDocument.h" -#include "nsIHTMLDocument.h" #include "nsCOMPtr.h" diff --git a/content/html/content/src/nsHTMLOptGroupElement.cpp b/content/html/content/src/nsHTMLOptGroupElement.cpp index c97732e6e45..fc833047acc 100644 --- a/content/html/content/src/nsHTMLOptGroupElement.cpp +++ b/content/html/content/src/nsHTMLOptGroupElement.cpp @@ -10,7 +10,6 @@ #include "nsIFrame.h" #include "nsIFormControlFrame.h" #include "nsEventStates.h" -#include "nsIDocument.h" #include "nsEventDispatcher.h" #include "nsHTMLSelectElement.h" diff --git a/content/html/content/src/nsHTMLOptionElement.cpp b/content/html/content/src/nsHTMLOptionElement.cpp index b5ebf0e80aa..8d996047f53 100644 --- a/content/html/content/src/nsHTMLOptionElement.cpp +++ b/content/html/content/src/nsHTMLOptionElement.cpp @@ -25,7 +25,6 @@ #include "nsNodeInfoManager.h" #include "nsCOMPtr.h" #include "nsEventStates.h" -#include "nsIDOMDocument.h" #include "nsContentCreatorFunctions.h" #include "mozAutoDocUpdate.h" diff --git a/content/html/content/src/nsHTMLScriptElement.cpp b/content/html/content/src/nsHTMLScriptElement.cpp index 5d7ebb644d9..394a85162a5 100644 --- a/content/html/content/src/nsHTMLScriptElement.cpp +++ b/content/html/content/src/nsHTMLScriptElement.cpp @@ -19,7 +19,6 @@ #include "nsIScriptGlobalObject.h" #include "nsIXPConnect.h" #include "nsServiceManagerUtils.h" -#include "nsIDOMDocument.h" #include "nsContentErrors.h" #include "nsIArray.h" #include "nsTArray.h" diff --git a/content/html/content/src/nsHTMLTableCellElement.cpp b/content/html/content/src/nsHTMLTableCellElement.cpp index 44d64bd5b65..408eb7a6cfc 100644 --- a/content/html/content/src/nsHTMLTableCellElement.cpp +++ b/content/html/content/src/nsHTMLTableCellElement.cpp @@ -17,7 +17,6 @@ #include "nsPresContext.h" #include "nsRuleData.h" #include "nsRuleWalker.h" -#include "nsIDocument.h" #include "celldata.h" using namespace mozilla; diff --git a/content/html/content/src/nsHTMLTableSectionElement.cpp b/content/html/content/src/nsHTMLTableSectionElement.cpp index ebf2d37c299..5c09fa40491 100644 --- a/content/html/content/src/nsHTMLTableSectionElement.cpp +++ b/content/html/content/src/nsHTMLTableSectionElement.cpp @@ -15,7 +15,6 @@ #include "nsContentList.h" #include "nsRuleData.h" #include "nsDOMError.h" -#include "nsIDocument.h" #include "nsContentUtils.h" using namespace mozilla; diff --git a/content/html/content/src/nsHTMLTitleElement.cpp b/content/html/content/src/nsHTMLTitleElement.cpp index f9e0041d052..f22a68a6019 100644 --- a/content/html/content/src/nsHTMLTitleElement.cpp +++ b/content/html/content/src/nsHTMLTitleElement.cpp @@ -7,7 +7,6 @@ #include "nsGenericHTMLElement.h" #include "nsStyleConsts.h" #include "nsIDocument.h" -#include "nsIDOMHTMLDocument.h" #include "nsContentUtils.h" class nsHTMLTitleElement : public nsGenericHTMLElement, diff --git a/content/html/content/src/nsHTMLVideoElement.cpp b/content/html/content/src/nsHTMLVideoElement.cpp index 72d03ae80e8..d44a4841563 100644 --- a/content/html/content/src/nsHTMLVideoElement.cpp +++ b/content/html/content/src/nsHTMLVideoElement.cpp @@ -13,8 +13,6 @@ #include "nsGkAtoms.h" #include "nsSize.h" #include "nsIFrame.h" -#include "nsIDocument.h" -#include "nsIDOMDocument.h" #include "nsDOMError.h" #include "nsNodeInfoManager.h" #include "plbase64.h" diff --git a/content/html/content/src/nsMediaError.cpp b/content/html/content/src/nsMediaError.cpp index be554aa1c7e..d14ce2d7da0 100644 --- a/content/html/content/src/nsMediaError.cpp +++ b/content/html/content/src/nsMediaError.cpp @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsMediaError.h" -#include "nsContentUtils.h" +#include "nsDOMClassInfoID.h" NS_IMPL_ADDREF(nsMediaError) NS_IMPL_RELEASE(nsMediaError) diff --git a/content/html/content/src/nsRadioVisitor.cpp b/content/html/content/src/nsRadioVisitor.cpp index f31d722b4cc..a7f4cade53a 100644 --- a/content/html/content/src/nsRadioVisitor.cpp +++ b/content/html/content/src/nsRadioVisitor.cpp @@ -7,7 +7,6 @@ #include "nsAutoPtr.h" #include "nsHTMLInputElement.h" #include "nsEventStates.h" -#include "nsIDocument.h" #include "nsIConstraintValidation.h" diff --git a/content/html/content/src/nsRadioVisitor.h b/content/html/content/src/nsRadioVisitor.h index 1c60333261d..ed4f387c208 100644 --- a/content/html/content/src/nsRadioVisitor.h +++ b/content/html/content/src/nsRadioVisitor.h @@ -9,8 +9,6 @@ #include "nsIRadioVisitor.h" class nsIFormControl; -class nsIDocument; - /** * nsRadioVisitor is the base class implementing nsIRadioVisitor and inherited diff --git a/content/html/content/src/nsTimeRanges.cpp b/content/html/content/src/nsTimeRanges.cpp index df980d7d225..28e9e44a9e4 100644 --- a/content/html/content/src/nsTimeRanges.cpp +++ b/content/html/content/src/nsTimeRanges.cpp @@ -5,8 +5,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsTimeRanges.h" +#include "nsDOMClassInfoID.h" #include "nsDOMError.h" -#include "nsContentUtils.h" NS_IMPL_ADDREF(nsTimeRanges) NS_IMPL_RELEASE(nsTimeRanges) diff --git a/content/mathml/content/src/nsMathMLElementFactory.cpp b/content/mathml/content/src/nsMathMLElementFactory.cpp index 4933f25bd20..3bd48068ff6 100644 --- a/content/mathml/content/src/nsMathMLElementFactory.cpp +++ b/content/mathml/content/src/nsMathMLElementFactory.cpp @@ -5,7 +5,6 @@ #include "nsContentCreatorFunctions.h" #include "nsGkAtoms.h" -#include "nsIDocument.h" #include "nsMathMLElement.h" // MathML Element Factory (declared in nsContentCreatorFunctions.h) diff --git a/content/media/MediaResource.cpp b/content/media/MediaResource.cpp index 37f8018280b..1bbb7157cf1 100644 --- a/content/media/MediaResource.cpp +++ b/content/media/MediaResource.cpp @@ -22,7 +22,6 @@ #include "nsIScriptSecurityManager.h" #include "nsCrossSiteListenerProxy.h" #include "nsHTMLMediaElement.h" -#include "nsIDocument.h" #include "nsDOMError.h" #include "nsICachingChannel.h" #include "nsURILoader.h" diff --git a/content/smil/nsSMILAnimationController.cpp b/content/smil/nsSMILAnimationController.cpp index aeca182c4d2..cf045b79ed4 100644 --- a/content/smil/nsSMILAnimationController.cpp +++ b/content/smil/nsSMILAnimationController.cpp @@ -7,9 +7,7 @@ #include "nsSMILCompositor.h" #include "nsSMILCSSProperty.h" #include "nsCSSProps.h" -#include "nsComponentManagerUtils.h" #include "nsITimer.h" -#include "nsIContent.h" #include "mozilla/dom/Element.h" #include "nsIDocument.h" #include "nsISMILAnimationElement.h" diff --git a/content/smil/nsSMILCSSProperty.h b/content/smil/nsSMILCSSProperty.h index 6a58518f06e..d5f25eaf2cd 100644 --- a/content/smil/nsSMILCSSProperty.h +++ b/content/smil/nsSMILCSSProperty.h @@ -13,8 +13,6 @@ #include "nsCSSProperty.h" #include "nsCSSValue.h" -class nsIContent; - namespace mozilla { namespace dom { class Element; diff --git a/content/smil/nsSMILMappedAttribute.cpp b/content/smil/nsSMILMappedAttribute.cpp index bf38ecd2b54..0881a646bfd 100644 --- a/content/smil/nsSMILMappedAttribute.cpp +++ b/content/smil/nsSMILMappedAttribute.cpp @@ -6,11 +6,9 @@ /* representation of a SMIL-animatable mapped attribute on an element */ #include "nsSMILMappedAttribute.h" #include "nsAttrValue.h" -#include "nsPropertyTable.h" #include "nsContentErrors.h" // For NS_PROPTABLE_PROP_OVERWRITTEN #include "nsSMILValue.h" #include "nsSMILCSSValueType.h" -#include "nsIContent.h" #include "nsIDocument.h" #include "nsIPresShell.h" #include "nsCSSProps.h" diff --git a/content/smil/nsSMILTimeValueSpec.cpp b/content/smil/nsSMILTimeValueSpec.cpp index 34a35df128f..a790cdb8759 100644 --- a/content/smil/nsSMILTimeValueSpec.cpp +++ b/content/smil/nsSMILTimeValueSpec.cpp @@ -11,7 +11,6 @@ #include "nsSMILInstanceTime.h" #include "nsSMILParserUtils.h" #include "nsISMILAnimationElement.h" -#include "nsContentUtils.h" #include "nsEventListenerManager.h" #include "nsGUIEvent.h" #include "nsIDOMTimeEvent.h" diff --git a/content/svg/content/src/SVGLengthList.cpp b/content/svg/content/src/SVGLengthList.cpp index 748d9702b05..b8ebbcd8d5f 100644 --- a/content/svg/content/src/SVGLengthList.cpp +++ b/content/svg/content/src/SVGLengthList.cpp @@ -8,7 +8,6 @@ #include "SVGLength.h" #include "nsSVGElement.h" #include "nsDOMError.h" -#include "nsContentUtils.h" #include "nsString.h" #include "nsSVGUtils.h" #include "nsCharSeparatedTokenizer.h" diff --git a/content/svg/content/src/SVGPathData.cpp b/content/svg/content/src/SVGPathData.cpp index e9678990a67..96ac049b1ba 100644 --- a/content/svg/content/src/SVGPathData.cpp +++ b/content/svg/content/src/SVGPathData.cpp @@ -4,11 +4,9 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "SVGPathData.h" -#include "SVGAnimatedPathSegList.h" #include "SVGPathSegUtils.h" #include "nsSVGElement.h" #include "nsDOMError.h" -#include "nsContentUtils.h" #include "nsString.h" #include "nsSVGUtils.h" #include "string.h" diff --git a/content/svg/content/src/SVGPathSegUtils.cpp b/content/svg/content/src/SVGPathSegUtils.cpp index cfedca4f334..6d13fa2bc6b 100644 --- a/content/svg/content/src/SVGPathSegUtils.cpp +++ b/content/svg/content/src/SVGPathSegUtils.cpp @@ -4,17 +4,9 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "SVGPathSegUtils.h" -#include "nsSVGElement.h" -#include "nsSVGSVGElement.h" #include "nsSVGPathDataParser.h" -#include "nsString.h" -#include "nsSVGUtils.h" #include "nsContentUtils.h" #include "nsTextFormatter.h" -#include "prdtoa.h" -#include -#include "nsMathUtils.h" -#include "prtypes.h" using namespace mozilla; diff --git a/content/svg/content/src/SVGTransformListParser.cpp b/content/svg/content/src/SVGTransformListParser.cpp index caa24b655b4..75e8aa011f0 100644 --- a/content/svg/content/src/SVGTransformListParser.cpp +++ b/content/svg/content/src/SVGTransformListParser.cpp @@ -11,9 +11,7 @@ #include "prdtoa.h" #include "nsDOMError.h" #include "nsGkAtoms.h" -#include "nsReadableUtils.h" #include "nsCRT.h" -#include "nsContentUtils.h" #include "nsDOMClassInfoID.h" #include "nsIAtom.h" diff --git a/content/svg/content/src/nsDOMSVGEvent.cpp b/content/svg/content/src/nsDOMSVGEvent.cpp index 717147f69b3..7062b55a8d6 100644 --- a/content/svg/content/src/nsDOMSVGEvent.cpp +++ b/content/svg/content/src/nsDOMSVGEvent.cpp @@ -3,8 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "nsDOMClassInfoID.h" #include "nsDOMSVGEvent.h" -#include "nsContentUtils.h" //---------------------------------------------------------------------- // Implementation diff --git a/content/svg/content/src/nsDOMSVGZoomEvent.cpp b/content/svg/content/src/nsDOMSVGZoomEvent.cpp index b0653172c84..8babe674352 100644 --- a/content/svg/content/src/nsDOMSVGZoomEvent.cpp +++ b/content/svg/content/src/nsDOMSVGZoomEvent.cpp @@ -4,12 +4,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsDOMSVGZoomEvent.h" -#include "nsContentUtils.h" #include "nsSVGRect.h" #include "DOMSVGPoint.h" #include "nsSVGSVGElement.h" #include "nsIDOMSVGSVGElement.h" -#include "nsIContent.h" #include "nsIPresShell.h" #include "nsIDocument.h" #include "mozilla/dom/Element.h" diff --git a/content/svg/content/src/nsSVGElementFactory.cpp b/content/svg/content/src/nsSVGElementFactory.cpp index 4f158767765..473729d1547 100644 --- a/content/svg/content/src/nsSVGElementFactory.cpp +++ b/content/svg/content/src/nsSVGElementFactory.cpp @@ -9,7 +9,6 @@ #include "nsINodeInfo.h" #include "nsGkAtoms.h" #include "nsContentDLF.h" -#include "nsContentUtils.h" #include "nsSVGUtils.h" #include "nsDebug.h" diff --git a/content/svg/content/src/nsSVGPathElement.cpp b/content/svg/content/src/nsSVGPathElement.cpp index 4830fc7b8fd..0d484240a9e 100644 --- a/content/svg/content/src/nsSVGPathElement.cpp +++ b/content/svg/content/src/nsSVGPathElement.cpp @@ -10,14 +10,11 @@ #include "DOMSVGPathSeg.h" #include "DOMSVGPathSegList.h" #include "nsCOMPtr.h" -#include "nsIFrame.h" #include "nsContentUtils.h" -#include "nsSVGPathDataParser.h" #include "nsSVGPathElement.h" #include "nsSVGUtils.h" #include "DOMSVGPoint.h" #include "gfxContext.h" -#include "gfxPlatform.h" using namespace mozilla; diff --git a/content/svg/content/src/nsSVGRect.cpp b/content/svg/content/src/nsSVGRect.cpp index e3b4c872d3c..57ede1764b5 100644 --- a/content/svg/content/src/nsSVGRect.cpp +++ b/content/svg/content/src/nsSVGRect.cpp @@ -4,12 +4,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsSVGRect.h" -#include "prdtoa.h" #include "nsTextFormatter.h" -#include "nsCRT.h" -#include "nsIDOMSVGLength.h" #include "nsContentUtils.h" -#include "nsDOMError.h" //---------------------------------------------------------------------- // implementation: diff --git a/content/svg/content/src/nsSVGUseElement.cpp b/content/svg/content/src/nsSVGUseElement.cpp index 3c13e4a8ad2..e10159ca98a 100644 --- a/content/svg/content/src/nsSVGUseElement.cpp +++ b/content/svg/content/src/nsSVGUseElement.cpp @@ -8,7 +8,6 @@ #include "nsSVGUseElement.h" #include "nsIDOMSVGGElement.h" #include "nsGkAtoms.h" -#include "nsIDOMDocument.h" #include "nsSVGSVGElement.h" #include "nsIDOMSVGSymbolElement.h" #include "nsIDocument.h" diff --git a/content/svg/document/src/nsSVGDocument.cpp b/content/svg/document/src/nsSVGDocument.cpp index f08271cba2c..cbc87c966a5 100644 --- a/content/svg/document/src/nsSVGDocument.cpp +++ b/content/svg/document/src/nsSVGDocument.cpp @@ -4,7 +4,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsSVGDocument.h" -#include "nsContentUtils.h" #include "nsString.h" #include "nsLiteralString.h" #include "nsIDOMSVGSVGElement.h" diff --git a/content/xbl/src/nsXBLEventHandler.cpp b/content/xbl/src/nsXBLEventHandler.cpp index 63984ef366c..aa3fdf9a336 100644 --- a/content/xbl/src/nsXBLEventHandler.cpp +++ b/content/xbl/src/nsXBLEventHandler.cpp @@ -5,17 +5,14 @@ #include "nsCOMPtr.h" #include "nsIAtom.h" -#include "nsIContent.h" #include "nsIDOMEventListener.h" #include "nsIDOMEventTarget.h" #include "nsIDOMKeyEvent.h" #include "nsIDOMMouseEvent.h" -#include "nsGkAtoms.h" #include "nsXBLPrototypeHandler.h" #include "nsIDOMNSEvent.h" #include "nsGUIEvent.h" #include "nsContentUtils.h" -#include "nsUnicharUtils.h" nsXBLEventHandler::nsXBLEventHandler(nsXBLPrototypeHandler* aHandler) : mProtoHandler(aHandler) diff --git a/content/xbl/src/nsXBLEventHandler.h b/content/xbl/src/nsXBLEventHandler.h index 0651d9b40c3..1242e911cdc 100644 --- a/content/xbl/src/nsXBLEventHandler.h +++ b/content/xbl/src/nsXBLEventHandler.h @@ -11,7 +11,6 @@ #include "nsTArray.h" class nsIAtom; -class nsIContent; class nsIDOMKeyEvent; class nsXBLPrototypeHandler; diff --git a/content/xbl/src/nsXBLInsertionPoint.cpp b/content/xbl/src/nsXBLInsertionPoint.cpp index a2c72ede3b5..a3f4e8b0da9 100644 --- a/content/xbl/src/nsXBLInsertionPoint.cpp +++ b/content/xbl/src/nsXBLInsertionPoint.cpp @@ -4,7 +4,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsXBLInsertionPoint.h" -#include "nsContentUtils.h" #include "nsXBLBinding.h" nsXBLInsertionPoint::nsXBLInsertionPoint(nsIContent* aParentElement, diff --git a/content/xbl/src/nsXBLProtoImplField.cpp b/content/xbl/src/nsXBLProtoImplField.cpp index 014f8338d5e..579994da0a8 100644 --- a/content/xbl/src/nsXBLProtoImplField.cpp +++ b/content/xbl/src/nsXBLProtoImplField.cpp @@ -6,13 +6,11 @@ #include "nsIAtom.h" #include "nsString.h" #include "jsapi.h" -#include "nsIContent.h" #include "nsUnicharUtils.h" #include "nsReadableUtils.h" #include "mozilla/FunctionTimer.h" #include "nsXBLProtoImplField.h" #include "nsIScriptContext.h" -#include "nsContentUtils.h" #include "nsIURI.h" #include "nsXBLSerialize.h" #include "nsXBLPrototypeBinding.h" diff --git a/content/xbl/src/nsXBLProtoImplField.h b/content/xbl/src/nsXBLProtoImplField.h index 75f3e73178c..28836cdc2de 100644 --- a/content/xbl/src/nsXBLProtoImplField.h +++ b/content/xbl/src/nsXBLProtoImplField.h @@ -9,7 +9,6 @@ #include "nsIAtom.h" #include "nsString.h" #include "jsapi.h" -#include "nsIContent.h" #include "nsString.h" #include "nsXBLProtoImplMember.h" diff --git a/content/xbl/src/nsXBLProtoImplMember.h b/content/xbl/src/nsXBLProtoImplMember.h index 9f4e4dbdeba..c13f4be11f5 100644 --- a/content/xbl/src/nsXBLProtoImplMember.h +++ b/content/xbl/src/nsXBLProtoImplMember.h @@ -9,17 +9,13 @@ #include "nsIAtom.h" #include "nsString.h" #include "jsapi.h" -#include "nsIContent.h" #include "nsString.h" -#include "nsIJSRuntimeService.h" #include "nsIServiceManager.h" -#include "nsReadableUtils.h" #include "nsContentUtils.h" #include "nsCycleCollectionParticipant.h" +class nsIContent; class nsIScriptContext; -struct JSRuntime; -class nsIJSRuntimeService; struct nsXBLTextWithLineNumber { diff --git a/content/xbl/src/nsXBLProtoImplProperty.cpp b/content/xbl/src/nsXBLProtoImplProperty.cpp index ed3c114e9a6..ef967e55950 100644 --- a/content/xbl/src/nsXBLProtoImplProperty.cpp +++ b/content/xbl/src/nsXBLProtoImplProperty.cpp @@ -7,13 +7,11 @@ #include "nsString.h" #include "jsapi.h" #include "nsIContent.h" -#include "nsIDocument.h" #include "nsXBLProtoImplProperty.h" #include "nsUnicharUtils.h" #include "nsReadableUtils.h" #include "nsIScriptContext.h" #include "nsIScriptGlobalObject.h" -#include "nsContentUtils.h" #include "nsXBLPrototypeBinding.h" #include "nsXBLSerialize.h" diff --git a/content/xbl/src/nsXBLPrototypeBinding.cpp b/content/xbl/src/nsXBLPrototypeBinding.cpp index 7ed5a9d9d41..7d1edfd0e32 100644 --- a/content/xbl/src/nsXBLPrototypeBinding.cpp +++ b/content/xbl/src/nsXBLPrototypeBinding.cpp @@ -35,6 +35,7 @@ #include "nsXBLProtoImpl.h" #include "nsCRT.h" #include "nsContentUtils.h" +#include "nsTextFragment.h" #include "nsIScriptContext.h" #include "nsIScriptError.h" diff --git a/content/xbl/src/nsXBLPrototypeHandler.cpp b/content/xbl/src/nsXBLPrototypeHandler.cpp index 5bd7c672214..9f33b8ade68 100644 --- a/content/xbl/src/nsXBLPrototypeHandler.cpp +++ b/content/xbl/src/nsXBLPrototypeHandler.cpp @@ -16,7 +16,6 @@ #include "nsINameSpaceManager.h" #include "nsIScriptContext.h" #include "nsIDocument.h" -#include "nsIDOMDocument.h" #include "nsIJSEventListener.h" #include "nsIController.h" #include "nsIControllers.h" diff --git a/content/xbl/src/nsXBLPrototypeResources.h b/content/xbl/src/nsXBLPrototypeResources.h index d5b4d5cb175..82e67945959 100644 --- a/content/xbl/src/nsXBLPrototypeResources.h +++ b/content/xbl/src/nsXBLPrototypeResources.h @@ -12,7 +12,6 @@ class nsIContent; class nsIAtom; -class nsIDocument; class nsIScriptContext; class nsSupportsHashtable; class nsXBLResourceLoader; diff --git a/content/xbl/src/nsXBLResourceLoader.h b/content/xbl/src/nsXBLResourceLoader.h index 75f1737ff25..a94e6ea8f29 100644 --- a/content/xbl/src/nsXBLResourceLoader.h +++ b/content/xbl/src/nsXBLResourceLoader.h @@ -11,7 +11,6 @@ class nsIContent; class nsIAtom; -class nsIDocument; class nsIScriptContext; class nsSupportsHashtable; class nsXBLPrototypeResources; diff --git a/content/xbl/src/nsXBLWindowKeyHandler.cpp b/content/xbl/src/nsXBLWindowKeyHandler.cpp index ba87fae28dc..f91ffe76eea 100644 --- a/content/xbl/src/nsXBLWindowKeyHandler.cpp +++ b/content/xbl/src/nsXBLWindowKeyHandler.cpp @@ -25,7 +25,6 @@ #include "nsNetUtil.h" #include "nsContentUtils.h" #include "nsXBLPrototypeBinding.h" -#include "nsIDOMDocument.h" #include "nsPIDOMWindow.h" #include "nsIDocShell.h" #include "nsIPresShell.h" diff --git a/content/xml/content/src/nsXMLCDATASection.cpp b/content/xml/content/src/nsXMLCDATASection.cpp index cb6fe623a44..a61c35f9b75 100644 --- a/content/xml/content/src/nsXMLCDATASection.cpp +++ b/content/xml/content/src/nsXMLCDATASection.cpp @@ -6,8 +6,6 @@ #include "nsIDOMCDATASection.h" #include "nsGenericDOMDataNode.h" #include "nsGkAtoms.h" -#include "nsIDocument.h" -#include "nsContentUtils.h" class nsXMLCDATASection : public nsGenericDOMDataNode, public nsIDOMCDATASection diff --git a/content/xml/content/src/nsXMLProcessingInstruction.h b/content/xml/content/src/nsXMLProcessingInstruction.h index 65b842edac3..e199d506e25 100644 --- a/content/xml/content/src/nsXMLProcessingInstruction.h +++ b/content/xml/content/src/nsXMLProcessingInstruction.h @@ -7,7 +7,6 @@ #define nsIXMLProcessingInstruction_h___ #include "nsIDOMProcessingInstruction.h" -#include "nsIDocument.h" #include "nsGenericDOMDataNode.h" #include "nsAString.h" diff --git a/content/xml/document/src/nsXMLFragmentContentSink.cpp b/content/xml/document/src/nsXMLFragmentContentSink.cpp index 9ab0388d785..90df3ffe410 100644 --- a/content/xml/document/src/nsXMLFragmentContentSink.cpp +++ b/content/xml/document/src/nsXMLFragmentContentSink.cpp @@ -14,15 +14,10 @@ #include "nsIContent.h" #include "nsGkAtoms.h" #include "nsINodeInfo.h" -#include "nsNodeInfoManager.h" -#include "nsNullPrincipal.h" #include "nsContentCreatorFunctions.h" #include "nsDOMError.h" #include "nsIConsoleService.h" #include "nsIScriptError.h" -#include "nsServiceManagerUtils.h" -#include "nsContentUtils.h" -#include "nsIScriptSecurityManager.h" #include "nsNetUtil.h" #include "nsTHashtable.h" #include "nsHashKeys.h" diff --git a/content/xslt/public/nsIDocumentTransformer.h b/content/xslt/public/nsIDocumentTransformer.h index 0f958c3d24a..0ee5e5be340 100644 --- a/content/xslt/public/nsIDocumentTransformer.h +++ b/content/xslt/public/nsIDocumentTransformer.h @@ -7,7 +7,6 @@ #include "nsISupports.h" -class nsIDOMDocument; class nsIDOMNode; class nsILoadGroup; class nsIURI; diff --git a/content/xslt/src/base/txCore.h b/content/xslt/src/base/txCore.h index 6310411252e..076fe2dec31 100644 --- a/content/xslt/src/base/txCore.h +++ b/content/xslt/src/base/txCore.h @@ -6,7 +6,6 @@ #ifndef __txCore_h__ #define __txCore_h__ -#include "nsContentUtils.h" #include "nscore.h" #include "nsDebug.h" #include "nsTraceRefcnt.h" diff --git a/content/xslt/src/base/txStringUtils.h b/content/xslt/src/base/txStringUtils.h index 73b33729964..1a277084aea 100644 --- a/content/xslt/src/base/txStringUtils.h +++ b/content/xslt/src/base/txStringUtils.h @@ -9,6 +9,7 @@ #include "nsAString.h" #include "nsIAtom.h" #include "nsUnicharUtils.h" +#include "nsContentUtils.h" typedef nsCaseInsensitiveStringComparator txCaseInsensitiveStringComparator; diff --git a/content/xslt/src/base/txURIUtils.cpp b/content/xslt/src/base/txURIUtils.cpp index fd9c91345a0..8d7ef950359 100644 --- a/content/xslt/src/base/txURIUtils.cpp +++ b/content/xslt/src/base/txURIUtils.cpp @@ -5,13 +5,8 @@ #include "txURIUtils.h" #include "nsNetUtil.h" -#include "nsIAttribute.h" -#include "nsIScriptSecurityManager.h" #include "nsIDocument.h" -#include "nsIDOMDocument.h" -#include "nsIContent.h" #include "nsIPrincipal.h" -#include "nsINodeInfo.h" /** * URIUtils diff --git a/content/xslt/src/xpath/nsXPathNSResolver.cpp b/content/xslt/src/xpath/nsXPathNSResolver.cpp index de36dc38858..7b53ae6f453 100644 --- a/content/xslt/src/xpath/nsXPathNSResolver.cpp +++ b/content/xslt/src/xpath/nsXPathNSResolver.cpp @@ -6,7 +6,6 @@ #include "nsXPathNSResolver.h" #include "nsDOMClassInfoID.h" #include "nsDOMString.h" -#include "nsContentUtils.h" NS_IMPL_CYCLE_COLLECTION_1(nsXPathNSResolver, mNode) diff --git a/content/xslt/src/xpath/txRelationalExpr.cpp b/content/xslt/src/xpath/txRelationalExpr.cpp index 9cbc0fd8a55..a47307fcc47 100644 --- a/content/xslt/src/xpath/txRelationalExpr.cpp +++ b/content/xslt/src/xpath/txRelationalExpr.cpp @@ -3,7 +3,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "nsContentUtils.h" #include "txExpr.h" #include "txNodeSet.h" #include "txIXPathContext.h" diff --git a/content/xtf/src/nsXMLContentBuilder.cpp b/content/xtf/src/nsXMLContentBuilder.cpp index 6abe074841d..67a074d76d5 100644 --- a/content/xtf/src/nsXMLContentBuilder.cpp +++ b/content/xtf/src/nsXMLContentBuilder.cpp @@ -7,7 +7,6 @@ #include "nsString.h" #include "nsIXMLContentBuilder.h" #include "nsINameSpaceManager.h" -#include "nsINodeInfo.h" #include "nsIContent.h" #include "nsIComponentManager.h" #include "nsIServiceManager.h" diff --git a/content/xul/document/src/nsXULCommandDispatcher.cpp b/content/xul/document/src/nsXULCommandDispatcher.cpp index 50fcdac2b1e..6f2749a67ed 100644 --- a/content/xul/document/src/nsXULCommandDispatcher.cpp +++ b/content/xul/document/src/nsXULCommandDispatcher.cpp @@ -14,8 +14,6 @@ #include "nsFocusManager.h" #include "nsIControllers.h" #include "nsIDOMDocument.h" -#include "nsIDOMXULDocument.h" -#include "nsIDOMHTMLDocument.h" #include "nsIDOMElement.h" #include "nsIDOMWindow.h" #include "nsIDOMXULElement.h" diff --git a/content/xul/document/src/nsXULContentSink.cpp b/content/xul/document/src/nsXULContentSink.cpp index d4be3d42d9d..3a81bd62a7d 100644 --- a/content/xul/document/src/nsXULContentSink.cpp +++ b/content/xul/document/src/nsXULContentSink.cpp @@ -17,7 +17,6 @@ #include "nsCOMPtr.h" #include "nsForwardReference.h" #include "nsIContentSink.h" -#include "nsIDOMDocument.h" #include "nsIDOMEventListener.h" #include "nsIDOMHTMLFormElement.h" #include "nsIDOMXULDocument.h" diff --git a/content/xul/document/src/nsXULPrototypeDocument.h b/content/xul/document/src/nsXULPrototypeDocument.h index f6bb90ffaac..f24fa6b0297 100644 --- a/content/xul/document/src/nsXULPrototypeDocument.h +++ b/content/xul/document/src/nsXULPrototypeDocument.h @@ -12,7 +12,6 @@ #include "nsTArray.h" #include "nsIScriptGlobalObjectOwner.h" #include "nsISerializable.h" -#include "nsIDocument.h" #include "nsCycleCollectionParticipant.h" class nsIAtom; diff --git a/content/xul/templates/src/nsRuleNetwork.cpp b/content/xul/templates/src/nsRuleNetwork.cpp index cfa81fe3852..e68494bf406 100644 --- a/content/xul/templates/src/nsRuleNetwork.cpp +++ b/content/xul/templates/src/nsRuleNetwork.cpp @@ -20,11 +20,7 @@ #include "nscore.h" #include "nsCOMPtr.h" -#include "nsCRT.h" -#include "nsIComponentManager.h" -#include "nsIContent.h" #include "plhash.h" -#include "nsReadableUtils.h" #include "prlog.h" #ifdef PR_LOGGING diff --git a/content/xul/templates/src/nsRuleNetwork.h b/content/xul/templates/src/nsRuleNetwork.h index 506d5bd2344..9776cbd4472 100644 --- a/content/xul/templates/src/nsRuleNetwork.h +++ b/content/xul/templates/src/nsRuleNetwork.h @@ -32,11 +32,9 @@ #include "nsCOMArray.h" #include "nsFixedSizeAllocator.h" #include "nsIAtom.h" -#include "nsIContent.h" #include "nsIDOMNode.h" #include "plhash.h" #include "pldhash.h" -#include "nsCRT.h" #include "nsIRDFNode.h" class nsIRDFResource; diff --git a/content/xul/templates/src/nsXULContentUtils.cpp b/content/xul/templates/src/nsXULContentUtils.cpp index df481342313..df40924752b 100644 --- a/content/xul/templates/src/nsXULContentUtils.cpp +++ b/content/xul/templates/src/nsXULContentUtils.cpp @@ -29,7 +29,6 @@ #include "nsCOMPtr.h" #include "nsIContent.h" -#include "nsINodeInfo.h" #include "nsIDocument.h" #include "nsIDOMElement.h" #include "nsIDOMXULCommandDispatcher.h" diff --git a/content/xul/templates/src/nsXULSortService.cpp b/content/xul/templates/src/nsXULSortService.cpp index 42f742ffbaa..b4ce1e02b6b 100644 --- a/content/xul/templates/src/nsXULSortService.cpp +++ b/content/xul/templates/src/nsXULSortService.cpp @@ -24,7 +24,6 @@ #include "nsIContent.h" #include "nsIDOMElement.h" #include "nsIDOMNode.h" -#include "nsIDocument.h" #include "nsINameSpaceManager.h" #include "nsIServiceManager.h" #include "nsGkAtoms.h" diff --git a/content/xul/templates/src/nsXULTemplateQueryProcessorRDF.cpp b/content/xul/templates/src/nsXULTemplateQueryProcessorRDF.cpp index 15ad2dec384..d72a6582c87 100644 --- a/content/xul/templates/src/nsXULTemplateQueryProcessorRDF.cpp +++ b/content/xul/templates/src/nsXULTemplateQueryProcessorRDF.cpp @@ -14,8 +14,7 @@ #include "nsIServiceManager.h" #include "nsINameSpaceManager.h" #include "nsGkAtoms.h" -#include "nsIDocument.h" -#include "nsIXULDocument.h" +#include "nsIDOMDocument.h" #include "nsAttrName.h" #include "rdf.h" #include "nsArrayUtils.h" diff --git a/content/xul/templates/src/nsXULTemplateQueryProcessorXML.cpp b/content/xul/templates/src/nsXULTemplateQueryProcessorXML.cpp index 14aa4a22252..88e727b6fdd 100644 --- a/content/xul/templates/src/nsXULTemplateQueryProcessorXML.cpp +++ b/content/xul/templates/src/nsXULTemplateQueryProcessorXML.cpp @@ -6,27 +6,22 @@ #include "nsCOMPtr.h" #include "nsAutoPtr.h" #include "nsIDOMDocument.h" -#include "nsIDOMXMLDocument.h" #include "nsIDOMNode.h" -#include "nsIDOMNodeList.h" #include "nsIDOMElement.h" #include "nsIDOMEvent.h" #include "nsIDOMEventTarget.h" #include "nsIDOMXPathNSResolver.h" #include "nsIDocument.h" #include "nsIContent.h" -#include "nsINameSpaceManager.h" +#include "nsComponentManagerUtils.h" #include "nsGkAtoms.h" -#include "nsIServiceManager.h" -#include "nsUnicharUtils.h" #include "nsIURI.h" #include "nsIArray.h" -#include "nsContentUtils.h" +#include "nsIScriptContext.h" #include "nsArrayUtils.h" #include "nsPIDOMWindow.h" #include "nsXULContentUtils.h" -#include "nsXULTemplateBuilder.h" #include "nsXULTemplateQueryProcessorXML.h" #include "nsXULTemplateResultXML.h" #include "nsXULSortService.h" diff --git a/docshell/shistory/src/nsSHEntry.cpp b/docshell/shistory/src/nsSHEntry.cpp index e9a6a1b9393..ac6f0fec742 100644 --- a/docshell/shistory/src/nsSHEntry.cpp +++ b/docshell/shistory/src/nsSHEntry.cpp @@ -9,8 +9,6 @@ #include "nsReadableUtils.h" #include "nsIDocShellLoadInfo.h" #include "nsIDocShellTreeItem.h" -#include "nsIDocument.h" -#include "nsIDOMDocument.h" #include "nsISHistory.h" #include "nsISHistoryInternal.h" #include "nsDocShellEditorData.h" @@ -18,6 +16,7 @@ #include "nsILayoutHistoryState.h" #include "nsIContentViewer.h" #include "nsISupportsArray.h" +#include "nsIStructuredCloneContainer.h" namespace dom = mozilla::dom; diff --git a/dom/base/DOMRequest.cpp b/dom/base/DOMRequest.cpp index a0c54a7b62e..82de953afb6 100644 --- a/dom/base/DOMRequest.cpp +++ b/dom/base/DOMRequest.cpp @@ -11,6 +11,7 @@ #include "DOMError.h" #include "nsEventDispatcher.h" #include "nsDOMEvent.h" +#include "nsContentUtils.h" using mozilla::dom::DOMRequest; using mozilla::dom::DOMRequestService; diff --git a/dom/base/DOMRequest.h b/dom/base/DOMRequest.h index ba32007c420..c43be4589f7 100644 --- a/dom/base/DOMRequest.h +++ b/dom/base/DOMRequest.h @@ -10,7 +10,6 @@ #include "nsIDOMDOMRequest.h" #include "nsIDOMDOMError.h" #include "nsDOMEventTargetHelper.h" -#include "nsContentUtils.h" #include "mozilla/Attributes.h" #include "nsCOMPtr.h" diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp index 0650da7cd4c..782544f4674 100644 --- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -107,6 +107,7 @@ #include "nsIDOMPerformanceNavigation.h" #include "nsIDOMPerformance.h" #include "nsClientRect.h" +#include "nsIDOMHTMLPropertiesCollection.h" // DOM core includes #include "nsDOMError.h" diff --git a/dom/base/nsDOMClassInfo.h b/dom/base/nsDOMClassInfo.h index ab87d49fbe2..4d3aa1afa23 100644 --- a/dom/base/nsDOMClassInfo.h +++ b/dom/base/nsDOMClassInfo.h @@ -14,7 +14,6 @@ #include "nsIScriptContext.h" #include "nsDOMJSUtils.h" // for GetScriptContextFromJSContext #include "nsIScriptGlobalObject.h" -#include "nsContentUtils.h" #include "xpcpublic.h" namespace mozilla { @@ -25,9 +24,10 @@ class DOMSVGPointList; class DOMSVGStringList; class DOMSVGTransformList; } + +class nsContentList; class nsGlobalWindow; class nsICanvasRenderingContextInternal; -class nsIDOMDocument; class nsIDOMHTMLOptionsCollection; class nsIDOMSVGLength; class nsIDOMSVGLengthList; diff --git a/dom/base/nsDOMNavigationTiming.cpp b/dom/base/nsDOMNavigationTiming.cpp index f7aba6d1935..737312916f0 100644 --- a/dom/base/nsDOMNavigationTiming.cpp +++ b/dom/base/nsDOMNavigationTiming.cpp @@ -10,7 +10,6 @@ #include "nsContentUtils.h" #include "nsIDOMEventTarget.h" -#include "nsIDocument.h" #include "nsIScriptSecurityManager.h" nsDOMNavigationTiming::nsDOMNavigationTiming() diff --git a/dom/base/nsDOMNavigationTiming.h b/dom/base/nsDOMNavigationTiming.h index d4f5c193570..f8c58d60896 100644 --- a/dom/base/nsDOMNavigationTiming.h +++ b/dom/base/nsDOMNavigationTiming.h @@ -15,7 +15,6 @@ #include "nsIURI.h" class nsDOMNavigationTimingClock; -class nsIDocument; class nsDOMNavigationTiming { diff --git a/dom/base/nsFocusManager.cpp b/dom/base/nsFocusManager.cpp index 06ae3047837..ac7305e3135 100644 --- a/dom/base/nsFocusManager.cpp +++ b/dom/base/nsFocusManager.cpp @@ -10,7 +10,6 @@ #include "nsIInterfaceRequestor.h" #include "nsIInterfaceRequestorUtils.h" #include "nsIServiceManager.h" -#include "nsIEnumerator.h" #include "nsGkAtoms.h" #include "nsContentUtils.h" #include "nsIDocument.h" @@ -25,7 +24,6 @@ #include "nsIDOMDocument.h" #include "nsIDOMRange.h" #include "nsIHTMLDocument.h" -#include "nsIFormControlFrame.h" #include "nsGenericHTMLElement.h" #include "nsIDocShell.h" #include "nsIEditorDocShell.h" diff --git a/dom/base/nsHistory.cpp b/dom/base/nsHistory.cpp index ff9b5b24860..9976c667d40 100644 --- a/dom/base/nsHistory.cpp +++ b/dom/base/nsHistory.cpp @@ -10,7 +10,6 @@ #include "nscore.h" #include "nsPIDOMWindow.h" #include "nsIScriptGlobalObject.h" -#include "nsIDOMDocument.h" #include "nsIDocument.h" #include "nsIPresShell.h" #include "nsPresContext.h" diff --git a/dom/base/nsIScriptGlobalObject.h b/dom/base/nsIScriptGlobalObject.h index 7167591ed10..ae2c6714bee 100644 --- a/dom/base/nsIScriptGlobalObject.h +++ b/dom/base/nsIScriptGlobalObject.h @@ -12,7 +12,6 @@ #include "nsIProgrammingLanguage.h" class nsIScriptContext; -class nsIDOMDocument; class nsIDOMEvent; class nsIScriptGlobalObjectOwner; class nsIArray; diff --git a/dom/base/nsJSUtils.cpp b/dom/base/nsJSUtils.cpp index 7ae2bcbd9d6..6cf83640926 100644 --- a/dom/base/nsJSUtils.cpp +++ b/dom/base/nsJSUtils.cpp @@ -21,7 +21,6 @@ #include "nsIServiceManager.h" #include "nsIXPConnect.h" #include "nsCOMPtr.h" -#include "nsContentUtils.h" #include "nsIScriptSecurityManager.h" #include "nsPIDOMWindow.h" diff --git a/dom/base/nsLocation.cpp b/dom/base/nsLocation.cpp index 85baa6353cb..7ff0ee6629e 100644 --- a/dom/base/nsLocation.cpp +++ b/dom/base/nsLocation.cpp @@ -35,7 +35,6 @@ #include "nsIProtocolHandler.h" #include "nsReadableUtils.h" #include "nsITextToSubURI.h" -#include "nsContentUtils.h" #include "nsJSUtils.h" #include "jsfriendapi.h" diff --git a/dom/base/nsMimeTypeArray.cpp b/dom/base/nsMimeTypeArray.cpp index 0585d6b9171..7b4258fc17a 100644 --- a/dom/base/nsMimeTypeArray.cpp +++ b/dom/base/nsMimeTypeArray.cpp @@ -5,7 +5,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsMimeTypeArray.h" -#include "nsContentUtils.h" #include "nsIScriptGlobalObject.h" #include "nsIDOMNavigator.h" #include "nsIDOMPluginArray.h" diff --git a/dom/base/nsPerformance.h b/dom/base/nsPerformance.h index 6bc372817b8..79eb762e3cc 100644 --- a/dom/base/nsPerformance.h +++ b/dom/base/nsPerformance.h @@ -13,7 +13,6 @@ #include "nsAutoPtr.h" #include "mozilla/Attributes.h" -class nsIDocument; class nsIURI; class nsDOMNavigationTiming; class nsITimedChannel; diff --git a/dom/base/nsPluginArray.cpp b/dom/base/nsPluginArray.cpp index 8a4674c538e..b261da32ad8 100644 --- a/dom/base/nsPluginArray.cpp +++ b/dom/base/nsPluginArray.cpp @@ -14,7 +14,6 @@ #include "nsIWebNavigation.h" #include "nsDOMClassInfoID.h" #include "nsPluginError.h" -#include "nsContentUtils.h" #include "nsPluginHost.h" using namespace mozilla; diff --git a/dom/base/nsStructuredCloneContainer.cpp b/dom/base/nsStructuredCloneContainer.cpp index 30ee4299a33..ee14e135f7e 100644 --- a/dom/base/nsStructuredCloneContainer.cpp +++ b/dom/base/nsStructuredCloneContainer.cpp @@ -8,7 +8,6 @@ #include "nsStructuredCloneContainer.h" #include "nsCOMPtr.h" -#include "nsIDocument.h" #include "nsIJSContextStack.h" #include "nsIScriptContext.h" #include "nsIVariant.h" diff --git a/dom/base/nsWindowRoot.cpp b/dom/base/nsWindowRoot.cpp index d13e18d791e..521f76e7d2b 100644 --- a/dom/base/nsWindowRoot.cpp +++ b/dom/base/nsWindowRoot.cpp @@ -6,8 +6,6 @@ #include "nsCOMPtr.h" #include "nsWindowRoot.h" #include "nsPIDOMWindow.h" -#include "nsIDOMDocument.h" -#include "nsIDocument.h" #include "nsEventListenerManager.h" #include "nsPresContext.h" #include "nsLayoutCID.h" diff --git a/dom/bluetooth/BluetoothManager.cpp b/dom/bluetooth/BluetoothManager.cpp index f9ed3ce48cd..dd7317a8487 100644 --- a/dom/bluetooth/BluetoothManager.cpp +++ b/dom/bluetooth/BluetoothManager.cpp @@ -10,7 +10,6 @@ #include "BluetoothAdapter.h" #include "BluetoothUtils.h" -#include "nsIDocument.h" #include "nsIURI.h" #include "nsIURL.h" #include "nsPIDOMWindow.h" diff --git a/dom/devicestorage/nsDeviceStorage.cpp b/dom/devicestorage/nsDeviceStorage.cpp index 2a877c60e54..50c8719d2d5 100644 --- a/dom/devicestorage/nsDeviceStorage.cpp +++ b/dom/devicestorage/nsDeviceStorage.cpp @@ -18,6 +18,7 @@ #include "nsJSUtils.h" #include "DictionaryHelpers.h" #include "mozilla/Attributes.h" +#include "nsContentUtils.h" using namespace mozilla::dom; diff --git a/dom/file/FileHelper.cpp b/dom/file/FileHelper.cpp index 712c6b68e40..6a96d2e1263 100644 --- a/dom/file/FileHelper.cpp +++ b/dom/file/FileHelper.cpp @@ -14,6 +14,8 @@ #include "FileHandle.h" #include "FileRequest.h" #include "FileService.h" +#include "nsIRequest.h" +#include "nsDOMError.h" USING_FILE_NAMESPACE diff --git a/dom/file/LockedFile.cpp b/dom/file/LockedFile.cpp index c6d219afa9a..c9307714b48 100644 --- a/dom/file/LockedFile.cpp +++ b/dom/file/LockedFile.cpp @@ -30,6 +30,8 @@ #include "FileStreamWrappers.h" #include "MemoryStreams.h" #include "MetadataHelper.h" +#include "nsDOMError.h" +#include "nsContentUtils.h" #define STREAM_COPY_BLOCK_SIZE 32768 diff --git a/dom/indexedDB/FileManager.cpp b/dom/indexedDB/FileManager.cpp index 43bfd02d914..f4b5d261280 100644 --- a/dom/indexedDB/FileManager.cpp +++ b/dom/indexedDB/FileManager.cpp @@ -13,7 +13,6 @@ #include "mozStorageCID.h" #include "mozStorageHelper.h" -#include "nsContentUtils.h" #include "FileInfo.h" #include "IndexedDatabaseManager.h" diff --git a/dom/indexedDB/IDBDatabase.cpp b/dom/indexedDB/IDBDatabase.cpp index e804439edfe..49da5605137 100644 --- a/dom/indexedDB/IDBDatabase.cpp +++ b/dom/indexedDB/IDBDatabase.cpp @@ -28,6 +28,7 @@ #include "IndexedDatabaseManager.h" #include "TransactionThreadPool.h" #include "DictionaryHelpers.h" +#include "nsContentUtils.h" #include "ipc/IndexedDBChild.h" diff --git a/dom/indexedDB/IDBEvents.cpp b/dom/indexedDB/IDBEvents.cpp index 909cb30764d..57f7885a459 100644 --- a/dom/indexedDB/IDBEvents.cpp +++ b/dom/indexedDB/IDBEvents.cpp @@ -6,7 +6,6 @@ #include "IDBEvents.h" -#include "nsContentUtils.h" #include "nsDOMClassInfoID.h" #include "nsDOMException.h" #include "nsJSON.h" diff --git a/dom/indexedDB/Key.cpp b/dom/indexedDB/Key.cpp index ef46f9d41f4..53a5e166192 100644 --- a/dom/indexedDB/Key.cpp +++ b/dom/indexedDB/Key.cpp @@ -10,7 +10,6 @@ #include "nsIStreamBufferAccess.h" #include "jsfriendapi.h" #include "nsAlgorithm.h" -#include "nsContentUtils.h" #include "nsJSUtils.h" #include "xpcpublic.h" diff --git a/dom/indexedDB/OpenDatabaseHelper.cpp b/dom/indexedDB/OpenDatabaseHelper.cpp index c0108e87bf2..045d71bddc0 100644 --- a/dom/indexedDB/OpenDatabaseHelper.cpp +++ b/dom/indexedDB/OpenDatabaseHelper.cpp @@ -7,12 +7,12 @@ #include "nsIFile.h" #include "mozilla/storage.h" -#include "nsContentUtils.h" #include "nsEscape.h" #include "nsThreadUtils.h" #include "snappy/snappy.h" #include "test_quota.h" +#include "nsIBFCacheEntry.h" #include "IDBEvents.h" #include "IDBFactory.h" #include "IndexedDatabaseManager.h" diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index b378cc59f6d..60cece0cfc5 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -17,7 +17,6 @@ #include "nsIWindowWatcher.h" #include "nsIDOMWindow.h" #include "nsIObserverService.h" -#include "nsContentUtils.h" #include "nsAutoPtr.h" #include "nsCOMPtr.h" #include "nsServiceManagerUtils.h" diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index 592bbae5851..3910108e7f6 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -46,8 +46,6 @@ #include "nsIScriptContext.h" #include "nsInterfaceHashtable.h" #include "nsPresContext.h" -#include "nsIDocument.h" -#include "nsIDOMDocument.h" #include "nsIScriptGlobalObject.h" #include "nsWeakReference.h" #include "nsISecureBrowserUI.h" diff --git a/dom/plugins/base/nsNPAPIPlugin.cpp b/dom/plugins/base/nsNPAPIPlugin.cpp index a5927897127..6013c33fc34 100644 --- a/dom/plugins/base/nsNPAPIPlugin.cpp +++ b/dom/plugins/base/nsNPAPIPlugin.cpp @@ -31,7 +31,6 @@ #include "nsIJSContextStack.h" #include "nsIDOMElement.h" -#include "nsIDOMDocument.h" #include "nsPIDOMWindow.h" #include "nsIDocument.h" #include "nsIContent.h" diff --git a/dom/plugins/base/nsPluginTags.cpp b/dom/plugins/base/nsPluginTags.cpp index 9f21abaa482..ebac2c07204 100644 --- a/dom/plugins/base/nsPluginTags.cpp +++ b/dom/plugins/base/nsPluginTags.cpp @@ -8,7 +8,6 @@ #include "prlink.h" #include "plstr.h" #include "nsIPluginInstanceOwner.h" -#include "nsIDocument.h" #include "nsServiceManagerUtils.h" #include "nsPluginsDir.h" #include "nsPluginHost.h" diff --git a/dom/src/events/nsJSEventListener.cpp b/dom/src/events/nsJSEventListener.cpp index 2d92d90d7e0..ae8cc70b0a0 100644 --- a/dom/src/events/nsJSEventListener.cpp +++ b/dom/src/events/nsJSEventListener.cpp @@ -5,7 +5,6 @@ #include "nsJSEventListener.h" #include "nsJSUtils.h" #include "nsString.h" -#include "nsReadableUtils.h" #include "nsIServiceManager.h" #include "nsIScriptSecurityManager.h" #include "nsIScriptContext.h" diff --git a/dom/src/jsurl/nsJSProtocolHandler.cpp b/dom/src/jsurl/nsJSProtocolHandler.cpp index a8f33cca981..f50b1e4a293 100644 --- a/dom/src/jsurl/nsJSProtocolHandler.cpp +++ b/dom/src/jsurl/nsJSProtocolHandler.cpp @@ -26,7 +26,6 @@ #include "nsIInterfaceRequestorUtils.h" #include "nsIWindowMediator.h" #include "nsPIDOMWindow.h" -#include "nsIDOMDocument.h" #include "nsIConsoleService.h" #include "nsXPIDLString.h" #include "prprf.h" diff --git a/dom/src/storage/nsDOMStorage.cpp b/dom/src/storage/nsDOMStorage.cpp index 20337244bc4..a3dde593246 100644 --- a/dom/src/storage/nsDOMStorage.cpp +++ b/dom/src/storage/nsDOMStorage.cpp @@ -16,7 +16,6 @@ using mozilla::dom::ContentChild; #include "nsDOMClassInfoID.h" #include "nsDOMJSUtils.h" #include "nsUnicharUtils.h" -#include "nsIDocument.h" #include "nsDOMStorage.h" #include "nsEscape.h" #include "nsContentUtils.h" diff --git a/dom/telephony/Telephony.cpp b/dom/telephony/Telephony.cpp index d47502419ef..f9e43a2b7bf 100644 --- a/dom/telephony/Telephony.cpp +++ b/dom/telephony/Telephony.cpp @@ -6,7 +6,6 @@ #include "Telephony.h" -#include "nsIDocument.h" #include "nsIURI.h" #include "nsIURL.h" #include "nsPIDOMWindow.h" diff --git a/dom/workers/RuntimeService.cpp b/dom/workers/RuntimeService.cpp index 87663d4e857..567cc4804b1 100644 --- a/dom/workers/RuntimeService.cpp +++ b/dom/workers/RuntimeService.cpp @@ -9,7 +9,6 @@ #include "RuntimeService.h" #include "nsIDOMChromeWindow.h" -#include "nsIDocument.h" #include "nsIEffectiveTLDService.h" #include "nsIObserverService.h" #include "nsIPlatformCharset.h" diff --git a/editor/libeditor/base/CreateElementTxn.cpp b/editor/libeditor/base/CreateElementTxn.cpp index 915b670de24..2e6030335b1 100644 --- a/editor/libeditor/base/CreateElementTxn.cpp +++ b/editor/libeditor/base/CreateElementTxn.cpp @@ -5,7 +5,6 @@ #include "CreateElementTxn.h" #include "nsEditor.h" -#include "nsIDOMDocument.h" #include "nsIDOMNodeList.h" #include "nsISelection.h" #include "nsIDOMElement.h" diff --git a/editor/libeditor/base/SetDocTitleTxn.cpp b/editor/libeditor/base/SetDocTitleTxn.cpp index 5cf9485ab2f..cbb338d8919 100644 --- a/editor/libeditor/base/SetDocTitleTxn.cpp +++ b/editor/libeditor/base/SetDocTitleTxn.cpp @@ -7,7 +7,6 @@ #include "nsIDOMNode.h" #include "nsIDOMNodeList.h" #include "nsIDOMDocument.h" -#include "nsIDOMHTMLDocument.h" #include "nsIDOMText.h" #include "nsIDOMElement.h" #include "mozilla/dom/Element.h" diff --git a/editor/libeditor/base/nsEditor.cpp b/editor/libeditor/base/nsEditor.cpp index 09f72a816e5..df9e520205f 100644 --- a/editor/libeditor/base/nsEditor.cpp +++ b/editor/libeditor/base/nsEditor.cpp @@ -71,7 +71,6 @@ #include "nsISelectionDisplay.h" #include "nsIInlineSpellChecker.h" #include "nsINameSpaceManager.h" -#include "nsIHTMLDocument.h" #include "nsIParserService.h" #include "nsITransferable.h" diff --git a/editor/libeditor/html/nsHTMLAbsPosition.cpp b/editor/libeditor/html/nsHTMLAbsPosition.cpp index 3425a0727f9..17c2349915b 100644 --- a/editor/libeditor/html/nsHTMLAbsPosition.cpp +++ b/editor/libeditor/html/nsHTMLAbsPosition.cpp @@ -7,7 +7,6 @@ #include "nsHTMLEditor.h" #include "nsIContent.h" -#include "nsIDocument.h" #include "nsIEditor.h" #include "nsIPresShell.h" diff --git a/editor/libeditor/html/nsHTMLCSSUtils.cpp b/editor/libeditor/html/nsHTMLCSSUtils.cpp index a05199ee752..fd7c3f1694a 100644 --- a/editor/libeditor/html/nsHTMLCSSUtils.cpp +++ b/editor/libeditor/html/nsHTMLCSSUtils.cpp @@ -10,7 +10,6 @@ #include "ChangeCSSInlineStyleTxn.h" #include "nsIDOMElement.h" #include "nsIDOMElementCSSInlineStyle.h" -#include "nsIDOMDocument.h" #include "nsIContent.h" #include "nsIAtom.h" #include "nsTextEditUtils.h" diff --git a/editor/libeditor/html/nsTableEditor.cpp b/editor/libeditor/html/nsTableEditor.cpp index 7ba4239b230..5b68a797954 100644 --- a/editor/libeditor/html/nsTableEditor.cpp +++ b/editor/libeditor/html/nsTableEditor.cpp @@ -4,7 +4,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nscore.h" -#include "nsIDOMDocument.h" #include "nsEditor.h" #include "nsIDOMElement.h" #include "nsIDOMNode.h" diff --git a/embedding/browser/webBrowser/nsDocShellTreeOwner.h b/embedding/browser/webBrowser/nsDocShellTreeOwner.h index 95f3d201047..ec18b266888 100644 --- a/embedding/browser/webBrowser/nsDocShellTreeOwner.h +++ b/embedding/browser/webBrowser/nsDocShellTreeOwner.h @@ -18,7 +18,6 @@ #include "nsIInterfaceRequestorUtils.h" #include "nsIWebBrowserChrome.h" #include "nsIDOMEventListener.h" -#include "nsIDOMDocument.h" #include "nsIEmbeddingSiteWindow.h" #include "nsIWebProgressListener.h" #include "nsWeakReference.h" diff --git a/embedding/browser/webBrowser/nsWebBrowser.cpp b/embedding/browser/webBrowser/nsWebBrowser.cpp index 58802485288..c538bb606de 100644 --- a/embedding/browser/webBrowser/nsWebBrowser.cpp +++ b/embedding/browser/webBrowser/nsWebBrowser.cpp @@ -13,9 +13,7 @@ //Interfaces Needed #include "nsReadableUtils.h" #include "nsIComponentManager.h" -#include "nsIDocument.h" #include "nsIDOMDocument.h" -#include "nsIDOMXULDocument.h" #include "nsIDOMWindow.h" #include "nsIDOMElement.h" #include "nsIInterfaceRequestor.h" diff --git a/embedding/components/commandhandler/src/nsCommandManager.cpp b/embedding/components/commandhandler/src/nsCommandManager.cpp index 6192722f38f..b3385849e5e 100644 --- a/embedding/components/commandhandler/src/nsCommandManager.cpp +++ b/embedding/components/commandhandler/src/nsCommandManager.cpp @@ -14,7 +14,6 @@ #include "nsServiceManagerUtils.h" #include "nsIScriptSecurityManager.h" -#include "nsIDOMDocument.h" #include "nsIDOMWindow.h" #include "nsPIDOMWindow.h" #include "nsPIWindowRoot.h" diff --git a/embedding/components/find/src/nsFind.cpp b/embedding/components/find/src/nsFind.cpp index c86ae410035..f1a6724bff8 100644 --- a/embedding/components/find/src/nsFind.cpp +++ b/embedding/components/find/src/nsFind.cpp @@ -17,7 +17,6 @@ #include "nsIFormControl.h" #include "nsIEditor.h" #include "nsIPlaintextEditor.h" -#include "nsIDocument.h" #include "nsTextFragment.h" #include "nsString.h" #include "nsIAtom.h" diff --git a/extensions/cookie/nsCookiePermission.cpp b/extensions/cookie/nsCookiePermission.cpp index ddeb3b25bf9..cd57815b947 100644 --- a/extensions/cookie/nsCookiePermission.cpp +++ b/extensions/cookie/nsCookiePermission.cpp @@ -17,7 +17,6 @@ #include "nsIChannel.h" #include "nsIHttpChannelInternal.h" #include "nsIDOMWindow.h" -#include "nsIDOMDocument.h" #include "nsIPrincipal.h" #include "nsString.h" #include "nsCRT.h" diff --git a/extensions/permissions/nsContentBlocker.cpp b/extensions/permissions/nsContentBlocker.cpp index ed3b5aa0987..b4e60718538 100644 --- a/extensions/permissions/nsContentBlocker.cpp +++ b/extensions/permissions/nsContentBlocker.cpp @@ -3,7 +3,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsContentBlocker.h" -#include "nsIDocument.h" #include "nsIContent.h" #include "nsIURI.h" #include "nsIServiceManager.h" diff --git a/extensions/spellcheck/src/mozInlineSpellChecker.cpp b/extensions/spellcheck/src/mozInlineSpellChecker.cpp index b8a191aeb7a..3c34fc60092 100644 --- a/extensions/spellcheck/src/mozInlineSpellChecker.cpp +++ b/extensions/spellcheck/src/mozInlineSpellChecker.cpp @@ -36,7 +36,6 @@ #include "mozISpellI18NManager.h" #include "nsCOMPtr.h" #include "nsCRT.h" -#include "nsIDocument.h" #include "nsIDOMNode.h" #include "nsIDOMDocument.h" #include "nsIDOMElement.h" diff --git a/js/ipc/ObjectWrapperChild.cpp b/js/ipc/ObjectWrapperChild.cpp index 1a428b34b32..f5aa9b44d66 100644 --- a/js/ipc/ObjectWrapperChild.cpp +++ b/js/ipc/ObjectWrapperChild.cpp @@ -15,7 +15,6 @@ #include "nsAutoPtr.h" #include "nsTArray.h" #include "nsContentUtils.h" -#include "nsIJSContextStack.h" #include "nsJSUtils.h" using namespace mozilla::jsipc; diff --git a/js/xpconnect/src/XPCComponents.cpp b/js/xpconnect/src/XPCComponents.cpp index 1672ee19842..117a7f4a228 100644 --- a/js/xpconnect/src/XPCComponents.cpp +++ b/js/xpconnect/src/XPCComponents.cpp @@ -31,6 +31,7 @@ #include "mozilla/Preferences.h" #include "nsPrincipal.h" #include "mozilla/Attributes.h" +#include "nsIScriptContext.h" using namespace mozilla; using namespace js; diff --git a/layout/base/nsCSSRenderingBorders.cpp b/layout/base/nsCSSRenderingBorders.cpp index 0674eb03698..49eeccd2063 100644 --- a/layout/base/nsCSSRenderingBorders.cpp +++ b/layout/base/nsCSSRenderingBorders.cpp @@ -15,7 +15,6 @@ #include "nsCSSAnonBoxes.h" #include "nsTransform2D.h" #include "nsIContent.h" -#include "nsIDocument.h" #include "nsIScrollableFrame.h" #include "imgIRequest.h" #include "imgIContainer.h" @@ -24,7 +23,6 @@ #include "nsITheme.h" #include "nsThemeConstants.h" #include "nsIServiceManager.h" -#include "nsIHTMLDocument.h" #include "nsLayoutUtils.h" #include "nsINameSpaceManager.h" #include "nsBlockFrame.h" diff --git a/layout/base/nsFrameManager.cpp b/layout/base/nsFrameManager.cpp index 96a7d96a5d6..803345c8869 100644 --- a/layout/base/nsFrameManager.cpp +++ b/layout/base/nsFrameManager.cpp @@ -42,8 +42,6 @@ #include "nsIDocument.h" #include "nsIScrollableFrame.h" -#include "nsIHTMLDocument.h" -#include "nsIDOMHTMLDocument.h" #include "nsIDOMNodeList.h" #include "nsIDOMHTMLCollection.h" #include "nsIFormControl.h" diff --git a/layout/base/nsImageLoader.cpp b/layout/base/nsImageLoader.cpp index cf986df57da..f41d9767b88 100644 --- a/layout/base/nsImageLoader.cpp +++ b/layout/base/nsImageLoader.cpp @@ -18,7 +18,6 @@ #include "nsIPresShell.h" #include "nsIFrame.h" #include "nsIContent.h" -#include "nsIDocument.h" #include "imgIContainer.h" diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 1ecd45c5e04..6ddc688c6bd 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -10,7 +10,6 @@ #include "nsIFormControlFrame.h" #include "nsPresContext.h" #include "nsIContent.h" -#include "nsIDOMDocument.h" #include "nsIDOMHTMLDocument.h" #include "nsIDOMHTMLElement.h" #include "nsFrameList.h" diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp index b965607127e..02d128af9ef 100644 --- a/layout/base/nsPresContext.cpp +++ b/layout/base/nsPresContext.cpp @@ -33,7 +33,6 @@ #include "nsIWeakReferenceUtils.h" #include "nsCSSRendering.h" #include "prprf.h" -#include "nsIDOMDocument.h" #include "nsAutoPtr.h" #include "nsEventStateManager.h" #include "nsThreadUtils.h" diff --git a/layout/forms/nsComboboxControlFrame.cpp b/layout/forms/nsComboboxControlFrame.cpp index 0599ab64b84..b0329b22b66 100644 --- a/layout/forms/nsComboboxControlFrame.cpp +++ b/layout/forms/nsComboboxControlFrame.cpp @@ -21,6 +21,7 @@ #include "nsIDOMHTMLOptionElement.h" #include "nsPIDOMWindow.h" #include "nsIPresShell.h" +#include "nsContentList.h" #include "nsIView.h" #include "nsIViewManager.h" #include "nsEventDispatcher.h" diff --git a/layout/forms/nsFileControlFrame.cpp b/layout/forms/nsFileControlFrame.cpp index 117052f0a7f..2f3dac7d439 100644 --- a/layout/forms/nsFileControlFrame.cpp +++ b/layout/forms/nsFileControlFrame.cpp @@ -18,7 +18,6 @@ #include "nsINameSpaceManager.h" #include "nsCOMPtr.h" #include "nsIDOMElement.h" -#include "nsIDOMDocument.h" #include "nsIDocument.h" #include "nsIPresShell.h" #include "nsXPCOM.h" diff --git a/layout/forms/nsGfxButtonControlFrame.cpp b/layout/forms/nsGfxButtonControlFrame.cpp index 3e8dac08b56..be3989aa5de 100644 --- a/layout/forms/nsGfxButtonControlFrame.cpp +++ b/layout/forms/nsGfxButtonControlFrame.cpp @@ -19,6 +19,7 @@ #include "nsContentUtils.h" // MouseEvent suppression in PP #include "nsGUIEvent.h" +#include "nsContentList.h" #include "nsContentCreatorFunctions.h" #include "nsNodeInfoManager.h" diff --git a/layout/forms/nsHTMLButtonControlFrame.cpp b/layout/forms/nsHTMLButtonControlFrame.cpp index c03d2ea195d..4bc242d04ee 100644 --- a/layout/forms/nsHTMLButtonControlFrame.cpp +++ b/layout/forms/nsHTMLButtonControlFrame.cpp @@ -21,7 +21,6 @@ #include "nsCSSAnonBoxes.h" #include "nsStyleConsts.h" #include "nsIComponentManager.h" -#include "nsIDocument.h" #include "nsButtonFrameRenderer.h" #include "nsFormControlFrame.h" #include "nsFrameManager.h" diff --git a/layout/forms/nsMeterFrame.cpp b/layout/forms/nsMeterFrame.cpp index 00bc191b696..d7b0034f9b3 100644 --- a/layout/forms/nsMeterFrame.cpp +++ b/layout/forms/nsMeterFrame.cpp @@ -19,6 +19,7 @@ #include "nsContentUtils.h" #include "nsFormControlFrame.h" #include "nsFontMetrics.h" +#include "nsContentList.h" #include "mozilla/dom/Element.h" diff --git a/layout/forms/nsProgressFrame.cpp b/layout/forms/nsProgressFrame.cpp index c8176315bfd..e5695c1f169 100644 --- a/layout/forms/nsProgressFrame.cpp +++ b/layout/forms/nsProgressFrame.cpp @@ -18,6 +18,7 @@ #include "nsContentCreatorFunctions.h" #include "nsContentUtils.h" #include "nsFormControlFrame.h" +#include "nsContentList.h" #include "nsFontMetrics.h" #include "mozilla/dom/Element.h" diff --git a/layout/forms/nsTextControlFrame.cpp b/layout/forms/nsTextControlFrame.cpp index a167f2ce04c..9890fcec78a 100644 --- a/layout/forms/nsTextControlFrame.cpp +++ b/layout/forms/nsTextControlFrame.cpp @@ -22,6 +22,7 @@ #include "nsGenericHTMLElement.h" #include "nsIEditorIMESupport.h" #include "nsIPhonetic.h" +#include "nsTextFragment.h" #include "nsIEditorObserver.h" #include "nsEditProperty.h" #include "nsIDOMHTMLTextAreaElement.h" @@ -40,7 +41,6 @@ #include "nsIViewManager.h" #include "nsIDOMHTMLInputElement.h" #include "nsIDOMElement.h" -#include "nsIDOMDocument.h" #include "nsIDOMHTMLElement.h" #include "nsIPresShell.h" diff --git a/layout/generic/nsBulletFrame.cpp b/layout/generic/nsBulletFrame.cpp index 281d95b8591..5885bcfc06a 100644 --- a/layout/generic/nsBulletFrame.cpp +++ b/layout/generic/nsBulletFrame.cpp @@ -26,7 +26,6 @@ #include "nsIServiceManager.h" #include "nsIComponentManager.h" -#include "nsContentUtils.h" #ifdef ACCESSIBILITY #include "nsAccessibilityService.h" diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index ad3ea9dc103..ac12e2f816b 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -16,6 +16,7 @@ #include "nsGfxScrollFrame.h" #include "nsGkAtoms.h" #include "nsINameSpaceManager.h" +#include "nsContentList.h" #include "nsIDocument.h" #include "nsFontMetrics.h" #include "nsIDocumentObserver.h" diff --git a/layout/generic/nsLineLayout.cpp b/layout/generic/nsLineLayout.cpp index 2232db4ee75..920346561bb 100644 --- a/layout/generic/nsLineLayout.cpp +++ b/layout/generic/nsLineLayout.cpp @@ -21,8 +21,6 @@ #include "nsRenderingContext.h" #include "nsGkAtoms.h" #include "nsPlaceholderFrame.h" -#include "nsIDocument.h" -#include "nsIHTMLDocument.h" #include "nsIContent.h" #include "nsTextFragment.h" #include "nsBidiUtils.h" diff --git a/layout/generic/nsSelection.cpp b/layout/generic/nsSelection.cpp index 5ce6a4bddd7..d11b0b8d83c 100644 --- a/layout/generic/nsSelection.cpp +++ b/layout/generic/nsSelection.cpp @@ -37,6 +37,7 @@ #include "nsCCUncollectableMarker.h" #include "nsIContentIterator.h" #include "nsIDocumentEncoder.h" +#include "nsTextFragment.h" // for IBMBIDI #include "nsFrameTraversal.h" diff --git a/layout/generic/nsSubDocumentFrame.cpp b/layout/generic/nsSubDocumentFrame.cpp index 10225d167c6..9a19953feac 100644 --- a/layout/generic/nsSubDocumentFrame.cpp +++ b/layout/generic/nsSubDocumentFrame.cpp @@ -44,7 +44,6 @@ #include "nsINameSpaceManager.h" #include "nsWeakReference.h" #include "nsIDOMWindow.h" -#include "nsIDOMDocument.h" #include "nsDisplayList.h" #include "nsUnicharUtils.h" #include "nsIScrollableFrame.h" diff --git a/layout/generic/nsTextRunTransformations.cpp b/layout/generic/nsTextRunTransformations.cpp index ac3102e8a5c..66c176b1999 100644 --- a/layout/generic/nsTextRunTransformations.cpp +++ b/layout/generic/nsTextRunTransformations.cpp @@ -12,8 +12,6 @@ #include "nsStyleConsts.h" #include "nsStyleContext.h" #include "gfxContext.h" -#include "nsContentUtils.h" -#include "nsUnicharUtils.h" #include "nsUnicodeProperties.h" #include "nsSpecialCasingData.h" diff --git a/layout/inspector/src/inDOMView.cpp b/layout/inspector/src/inDOMView.cpp index 38a7cb173a4..9707e3c0a28 100644 --- a/layout/inspector/src/inDOMView.cpp +++ b/layout/inspector/src/inDOMView.cpp @@ -18,7 +18,6 @@ #include "nsIDOMNodeList.h" #include "nsIDOMCharacterData.h" #include "nsIDOMAttr.h" -#include "nsIDOMDocument.h" #include "nsIDOMNamedNodeMap.h" #include "nsIDOMMutationEvent.h" #include "nsBindingManager.h" diff --git a/layout/mathml/nsMathMLmactionFrame.cpp b/layout/mathml/nsMathMLmactionFrame.cpp index 5e95b85e3a0..255031b0fbd 100644 --- a/layout/mathml/nsMathMLmactionFrame.cpp +++ b/layout/mathml/nsMathMLmactionFrame.cpp @@ -19,6 +19,7 @@ #include "nsIInterfaceRequestor.h" #include "nsIInterfaceRequestorUtils.h" #include "nsIDOMElement.h" +#include "nsTextFragment.h" #include "nsIDOMEventTarget.h" @@ -26,7 +27,6 @@ #include "nsAutoPtr.h" #include "nsStyleSet.h" #include "nsDisplayList.h" -#include "nsContentUtils.h" // // -- bind actions to a subexpression - implementation diff --git a/layout/printing/nsPrintEngine.cpp b/layout/printing/nsPrintEngine.cpp index c029a37063a..a58635b038f 100644 --- a/layout/printing/nsPrintEngine.cpp +++ b/layout/printing/nsPrintEngine.cpp @@ -73,13 +73,9 @@ static const char kPrintingPromptService[] = "@mozilla.org/embedcomp/printingpro // Misc #include "nsISupportsUtils.h" #include "nsIScriptContext.h" -#include "nsILinkHandler.h" #include "nsIDOMDocument.h" #include "nsISelectionListener.h" #include "nsISelectionPrivate.h" -#include "nsIDOMHTMLDocument.h" -#include "nsIDOMHTMLCollection.h" -#include "nsIDOMHTMLElement.h" #include "nsIDOMRange.h" #include "nsContentCID.h" #include "nsLayoutCID.h" diff --git a/layout/style/nsDOMCSSDeclaration.cpp b/layout/style/nsDOMCSSDeclaration.cpp index da1277565dd..50765aa0749 100644 --- a/layout/style/nsDOMCSSDeclaration.cpp +++ b/layout/style/nsDOMCSSDeclaration.cpp @@ -19,7 +19,6 @@ #include "nsReadableUtils.h" #include "nsIPrincipal.h" -#include "nsContentUtils.h" #include "mozAutoDocUpdate.h" namespace css = mozilla::css; diff --git a/layout/style/nsFontFaceLoader.cpp b/layout/style/nsFontFaceLoader.cpp index 17b8fbbba62..628267decd3 100644 --- a/layout/style/nsFontFaceLoader.cpp +++ b/layout/style/nsFontFaceLoader.cpp @@ -24,7 +24,6 @@ #include "nsPresContext.h" #include "nsIPresShell.h" -#include "nsIDocument.h" #include "nsIFrame.h" #include "nsIPrincipal.h" #include "nsIScriptSecurityManager.h" diff --git a/layout/style/nsStyleSet.cpp b/layout/style/nsStyleSet.cpp index 7b509e406c1..117d6bc45a4 100644 --- a/layout/style/nsStyleSet.cpp +++ b/layout/style/nsStyleSet.cpp @@ -23,7 +23,6 @@ #include "nsCSSRuleProcessor.h" #include "nsIContent.h" #include "nsIFrame.h" -#include "nsContentUtils.h" #include "nsRuleData.h" #include "nsRuleProcessorData.h" #include "nsTransitionManager.h" diff --git a/layout/style/nsStyleUtil.cpp b/layout/style/nsStyleUtil.cpp index 0f0c32f349b..3b3cfbb0e7c 100644 --- a/layout/style/nsStyleUtil.cpp +++ b/layout/style/nsStyleUtil.cpp @@ -13,12 +13,10 @@ #include "nsGkAtoms.h" #include "nsIContent.h" -#include "nsIDocument.h" #include "nsINameSpaceManager.h" #include "nsIURI.h" #include "nsNetUtil.h" #include "nsReadableUtils.h" -#include "nsContentUtils.h" #include "nsTextFormatter.h" #include "nsCSSProps.h" #include "nsRuleNode.h" diff --git a/layout/tools/layout-debug/src/nsRegressionTester.cpp b/layout/tools/layout-debug/src/nsRegressionTester.cpp index fbaaea39cbe..503f70a46f2 100644 --- a/layout/tools/layout-debug/src/nsRegressionTester.cpp +++ b/layout/tools/layout-debug/src/nsRegressionTester.cpp @@ -15,10 +15,7 @@ #include "nsIDocShellTreeNode.h" #include "nsPIDOMWindow.h" #include "nsIPresShell.h" -#include "nsIDocument.h" -#include "nsIDOMDocument.h" #include "nsIURI.h" -#include "nsIDOMHTMLDocument.h" #include "nsISimpleEnumerator.h" #include "nsIDocShell.h" #include "nsIContentViewer.h" diff --git a/layout/xul/base/src/nsBox.cpp b/layout/xul/base/src/nsBox.cpp index 9486fdf50c6..6258fc6f328 100644 --- a/layout/xul/base/src/nsBox.cpp +++ b/layout/xul/base/src/nsBox.cpp @@ -16,7 +16,6 @@ #include "nsIDOMNode.h" #include "nsIDOMNamedNodeMap.h" #include "nsIDOMAttr.h" -#include "nsIDocument.h" #include "nsITheme.h" #include "nsIServiceManager.h" #include "nsBoxLayout.h" diff --git a/layout/xul/base/src/nsBoxFrame.cpp b/layout/xul/base/src/nsBoxFrame.cpp index 3abe4d2f840..817b729a9d9 100644 --- a/layout/xul/base/src/nsBoxFrame.cpp +++ b/layout/xul/base/src/nsBoxFrame.cpp @@ -47,12 +47,10 @@ #include "nsIServiceManager.h" #include "nsBoxLayout.h" #include "nsSprocketLayout.h" -#include "nsIDocument.h" #include "nsIScrollableFrame.h" #include "nsWidgetsCID.h" #include "nsCSSAnonBoxes.h" #include "nsContainerFrame.h" -#include "nsIDOMDocument.h" #include "nsIDOMElement.h" #include "nsITheme.h" #include "nsTransform2D.h" diff --git a/layout/xul/base/src/nsButtonBoxFrame.cpp b/layout/xul/base/src/nsButtonBoxFrame.cpp index 6a9abffaeb6..9a25d69b5ea 100644 --- a/layout/xul/base/src/nsButtonBoxFrame.cpp +++ b/layout/xul/base/src/nsButtonBoxFrame.cpp @@ -5,8 +5,6 @@ #include "nsCOMPtr.h" #include "nsButtonBoxFrame.h" #include "nsIContent.h" -#include "nsIDocument.h" -#include "nsIDOMDocument.h" #include "nsIDOMNodeList.h" #include "nsIDOMXULButtonElement.h" #include "nsGkAtoms.h" diff --git a/layout/xul/base/src/nsDocElementBoxFrame.cpp b/layout/xul/base/src/nsDocElementBoxFrame.cpp index 496521c706d..ba9940dbbfb 100644 --- a/layout/xul/base/src/nsDocElementBoxFrame.cpp +++ b/layout/xul/base/src/nsDocElementBoxFrame.cpp @@ -20,6 +20,7 @@ #include "nsNodeInfoManager.h" #include "nsContentCreatorFunctions.h" #include "nsContentUtils.h" +#include "nsContentList.h" //#define DEBUG_REFLOW diff --git a/layout/xul/base/src/nsImageBoxFrame.cpp b/layout/xul/base/src/nsImageBoxFrame.cpp index 63d22392c6e..9c9bcc57d03 100644 --- a/layout/xul/base/src/nsImageBoxFrame.cpp +++ b/layout/xul/base/src/nsImageBoxFrame.cpp @@ -23,7 +23,6 @@ #include "nsLeafFrame.h" #include "nsIPresShell.h" #include "nsIDocument.h" -#include "nsIHTMLDocument.h" #include "nsImageMap.h" #include "nsILinkHandler.h" #include "nsIURL.h" @@ -35,7 +34,6 @@ #include "nsINameSpaceManager.h" #include "nsTextFragment.h" #include "nsIDOMHTMLMapElement.h" -#include "nsIDOMDocument.h" #include "nsTransform2D.h" #include "nsITheme.h" #include "nsIImageLoadingContent.h" diff --git a/layout/xul/base/src/nsListBoxObject.cpp b/layout/xul/base/src/nsListBoxObject.cpp index 2a1993b2585..b3c2b33edcc 100644 --- a/layout/xul/base/src/nsListBoxObject.cpp +++ b/layout/xul/base/src/nsListBoxObject.cpp @@ -7,7 +7,6 @@ #include "nsPIListBoxObject.h" #include "nsBoxObject.h" #include "nsIFrame.h" -#include "nsIDocument.h" #include "nsBindingManager.h" #include "nsIDOMElement.h" #include "nsIDOMNodeList.h" diff --git a/layout/xul/base/src/nsMenuBarFrame.cpp b/layout/xul/base/src/nsMenuBarFrame.cpp index b151312217d..6204f7d6b2e 100644 --- a/layout/xul/base/src/nsMenuBarFrame.cpp +++ b/layout/xul/base/src/nsMenuBarFrame.cpp @@ -19,7 +19,6 @@ #include "nsMenuPopupFrame.h" #include "nsGUIEvent.h" #include "nsUnicharUtils.h" -#include "nsIDOMDocument.h" #include "nsPIDOMWindow.h" #include "nsIInterfaceRequestorUtils.h" #include "nsCSSFrameConstructor.h" diff --git a/layout/xul/base/src/nsPopupBoxObject.cpp b/layout/xul/base/src/nsPopupBoxObject.cpp index df5b01acb4b..ae0d1115ff4 100644 --- a/layout/xul/base/src/nsPopupBoxObject.cpp +++ b/layout/xul/base/src/nsPopupBoxObject.cpp @@ -9,8 +9,6 @@ #include "nsIPresShell.h" #include "nsFrameManager.h" #include "nsIContent.h" -#include "nsIDocument.h" -#include "nsIDOMDocument.h" #include "nsIDOMElement.h" #include "nsIFrame.h" #include "nsINameSpaceManager.h" diff --git a/layout/xul/base/src/nsResizerFrame.cpp b/layout/xul/base/src/nsResizerFrame.cpp index 2358cda6946..72a68288495 100644 --- a/layout/xul/base/src/nsResizerFrame.cpp +++ b/layout/xul/base/src/nsResizerFrame.cpp @@ -8,7 +8,6 @@ #include "nsResizerFrame.h" #include "nsIContent.h" #include "nsIDocument.h" -#include "nsIDOMXULDocument.h" #include "nsIDOMNodeList.h" #include "nsGkAtoms.h" #include "nsINameSpaceManager.h" diff --git a/layout/xul/base/src/nsRootBoxFrame.cpp b/layout/xul/base/src/nsRootBoxFrame.cpp index 598ed710cce..751e533a82c 100644 --- a/layout/xul/base/src/nsRootBoxFrame.cpp +++ b/layout/xul/base/src/nsRootBoxFrame.cpp @@ -4,7 +4,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsHTMLParts.h" -#include "nsIDocument.h" #include "nsGUIEvent.h" #include "nsStyleConsts.h" #include "nsGkAtoms.h" diff --git a/layout/xul/base/src/nsScrollBoxObject.cpp b/layout/xul/base/src/nsScrollBoxObject.cpp index 29974600be0..945c28d038b 100644 --- a/layout/xul/base/src/nsScrollBoxObject.cpp +++ b/layout/xul/base/src/nsScrollBoxObject.cpp @@ -8,8 +8,6 @@ #include "nsBoxObject.h" #include "nsIPresShell.h" #include "nsIContent.h" -#include "nsIDocument.h" -#include "nsIDOMDocument.h" #include "nsIDOMElement.h" #include "nsPresContext.h" #include "nsIFrame.h" diff --git a/layout/xul/base/src/nsSliderFrame.cpp b/layout/xul/base/src/nsSliderFrame.cpp index adb37100e6a..7f5817f0388 100644 --- a/layout/xul/base/src/nsSliderFrame.cpp +++ b/layout/xul/base/src/nsSliderFrame.cpp @@ -23,7 +23,6 @@ #include "nsEventListenerManager.h" #include "nsIDOMEventTarget.h" #include "nsIDOMMouseEvent.h" -#include "nsIDocument.h" #include "nsScrollbarButtonFrame.h" #include "nsISliderListener.h" #include "nsIScrollbarMediator.h" diff --git a/layout/xul/base/src/nsSplitterFrame.cpp b/layout/xul/base/src/nsSplitterFrame.cpp index f0442bceb10..55c2162374e 100644 --- a/layout/xul/base/src/nsSplitterFrame.cpp +++ b/layout/xul/base/src/nsSplitterFrame.cpp @@ -14,7 +14,6 @@ #include "nsGkAtoms.h" #include "nsIDOMElement.h" #include "nsIDOMXULElement.h" -#include "nsIDOMDocument.h" #include "nsPresContext.h" #include "nsRenderingContext.h" #include "nsIDocument.h" diff --git a/layout/xul/base/src/nsTextBoxFrame.cpp b/layout/xul/base/src/nsTextBoxFrame.cpp index 4c96f0148b7..0f8b2368196 100644 --- a/layout/xul/base/src/nsTextBoxFrame.cpp +++ b/layout/xul/base/src/nsTextBoxFrame.cpp @@ -17,8 +17,6 @@ #include "nsMenuBarListener.h" #include "nsXPIDLString.h" #include "nsIServiceManager.h" -#include "nsIDocument.h" -#include "nsIDOMDocument.h" #include "nsIDOMElement.h" #include "nsIDOMXULLabelElement.h" #include "nsEventStateManager.h" diff --git a/layout/xul/base/src/nsTitleBarFrame.cpp b/layout/xul/base/src/nsTitleBarFrame.cpp index bbebecdb5aa..11ffc057584 100644 --- a/layout/xul/base/src/nsTitleBarFrame.cpp +++ b/layout/xul/base/src/nsTitleBarFrame.cpp @@ -7,7 +7,6 @@ #include "nsTitleBarFrame.h" #include "nsIContent.h" #include "nsIDocument.h" -#include "nsIDOMXULDocument.h" #include "nsIDOMNodeList.h" #include "nsGkAtoms.h" #include "nsIWidget.h" diff --git a/layout/xul/base/src/nsXULTooltipListener.cpp b/layout/xul/base/src/nsXULTooltipListener.cpp index f3fd2c2a69f..852121185cb 100644 --- a/layout/xul/base/src/nsXULTooltipListener.cpp +++ b/layout/xul/base/src/nsXULTooltipListener.cpp @@ -7,7 +7,6 @@ #include "nsIDOMMouseEvent.h" #include "nsIDOMEventTarget.h" -#include "nsIDOMDocument.h" #include "nsIDOMXULDocument.h" #include "nsIDOMXULElement.h" #include "nsIDocument.h" diff --git a/layout/xul/base/src/tree/src/nsTreeColFrame.cpp b/layout/xul/base/src/tree/src/nsTreeColFrame.cpp index bb5add2ed45..f688409e3c1 100644 --- a/layout/xul/base/src/tree/src/nsTreeColFrame.cpp +++ b/layout/xul/base/src/tree/src/nsTreeColFrame.cpp @@ -9,7 +9,6 @@ #include "nsIContent.h" #include "nsStyleContext.h" #include "nsINameSpaceManager.h" -#include "nsIDocument.h" #include "nsIBoxObject.h" #include "nsTreeBoxObject.h" #include "nsIDOMElement.h" diff --git a/layout/xul/base/src/tree/src/nsTreeColumns.cpp b/layout/xul/base/src/tree/src/nsTreeColumns.cpp index c95f65e625a..d57d9c72754 100644 --- a/layout/xul/base/src/tree/src/nsTreeColumns.cpp +++ b/layout/xul/base/src/tree/src/nsTreeColumns.cpp @@ -7,7 +7,6 @@ #include "nsGkAtoms.h" #include "nsIDOMElement.h" #include "nsIBoxObject.h" -#include "nsIDocument.h" #include "nsTreeColumns.h" #include "nsTreeUtils.h" #include "nsStyleContext.h" diff --git a/layout/xul/base/src/tree/src/nsTreeSelection.cpp b/layout/xul/base/src/tree/src/nsTreeSelection.cpp index 6d3cc4bd0db..fc613a5b406 100644 --- a/layout/xul/base/src/tree/src/nsTreeSelection.cpp +++ b/layout/xul/base/src/tree/src/nsTreeSelection.cpp @@ -12,7 +12,6 @@ #include "nsIDOMElement.h" #include "nsDOMClassInfoID.h" #include "nsIContent.h" -#include "nsIDocument.h" #include "nsGUIEvent.h" #include "nsINameSpaceManager.h" #include "nsGkAtoms.h" diff --git a/netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp b/netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp index d54073935aa..30d1194c5c8 100644 --- a/netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp +++ b/netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp @@ -10,11 +10,9 @@ #include "nsILoadGroup.h" #include "nsIScriptSecurityManager.h" #include "nsNetUtil.h" -#include "nsContentUtils.h" #include "nsICacheService.h" #include "nsICacheSession.h" #include "nsCharsetSource.h" -#include "nsThreadUtils.h" #include "nsProxyRelease.h" // Must release mChannel on the main thread diff --git a/parser/html/nsHtml5Parser.cpp b/parser/html/nsHtml5Parser.cpp index ae875bb762c..57ab42b3f3b 100644 --- a/parser/html/nsHtml5Parser.cpp +++ b/parser/html/nsHtml5Parser.cpp @@ -4,28 +4,11 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "nsCompatibility.h" -#include "nsScriptLoader.h" -#include "nsNetUtil.h" -#include "nsIStyleSheetLinkingElement.h" -#include "nsIWebShellServices.h" -#include "nsIDocShell.h" -#include "nsEncoderDecoderUtils.h" #include "nsContentUtils.h" -#include "nsICharsetDetector.h" -#include "nsIScriptElement.h" -#include "nsIMarkupDocumentViewer.h" -#include "nsIDocShellTreeItem.h" -#include "nsIContentViewer.h" -#include "nsIScriptGlobalObjectOwner.h" -#include "nsIScriptSecurityManager.h" -#include "nsHtml5DocumentMode.h" #include "nsHtml5Tokenizer.h" -#include "nsHtml5UTF16Buffer.h" #include "nsHtml5TreeBuilder.h" #include "nsHtml5Parser.h" #include "nsHtml5AtomTable.h" -#include "nsIDOMDocumentFragment.h" #include "nsHtml5DependentUTF16Buffer.h" NS_INTERFACE_TABLE_HEAD(nsHtml5Parser) diff --git a/parser/html/nsHtml5Parser.h b/parser/html/nsHtml5Parser.h index ba08dab9230..5d19c9b8c19 100644 --- a/parser/html/nsHtml5Parser.h +++ b/parser/html/nsHtml5Parser.h @@ -18,7 +18,6 @@ #include "nsIChannel.h" #include "nsCOMArray.h" #include "nsContentSink.h" -#include "nsIHTMLDocument.h" #include "nsCycleCollectionParticipant.h" #include "nsIInputStream.h" #include "nsDetectionConfident.h" diff --git a/parser/html/nsHtml5TreeBuilder.cpp b/parser/html/nsHtml5TreeBuilder.cpp index e6f4cc4861b..2263e610217 100644 --- a/parser/html/nsHtml5TreeBuilder.cpp +++ b/parser/html/nsHtml5TreeBuilder.cpp @@ -37,7 +37,6 @@ #include "nsString.h" #include "nsINameSpaceManager.h" #include "nsIContent.h" -#include "nsIDocument.h" #include "nsTraceRefcnt.h" #include "jArray.h" #include "nsHtml5DocumentMode.h" diff --git a/parser/html/nsHtml5TreeBuilder.h b/parser/html/nsHtml5TreeBuilder.h index 82f5ed46da8..2ea6f8fa437 100644 --- a/parser/html/nsHtml5TreeBuilder.h +++ b/parser/html/nsHtml5TreeBuilder.h @@ -38,7 +38,6 @@ #include "nsString.h" #include "nsINameSpaceManager.h" #include "nsIContent.h" -#include "nsIDocument.h" #include "nsTraceRefcnt.h" #include "jArray.h" #include "nsHtml5DocumentMode.h" diff --git a/parser/html/nsHtml5TreeBuilderCppSupplement.h b/parser/html/nsHtml5TreeBuilderCppSupplement.h index f964d634aca..13755425e55 100644 --- a/parser/html/nsHtml5TreeBuilderCppSupplement.h +++ b/parser/html/nsHtml5TreeBuilderCppSupplement.h @@ -9,7 +9,6 @@ #include "nsEvent.h" #include "nsGUIEvent.h" #include "nsEventDispatcher.h" -#include "nsContentUtils.h" #include "nsNodeUtils.h" #include "nsIFrame.h" diff --git a/parser/html/nsHtml5TreeOpExecutor.cpp b/parser/html/nsHtml5TreeOpExecutor.cpp index e6d95356b28..e63a37b95a4 100644 --- a/parser/html/nsHtml5TreeOpExecutor.cpp +++ b/parser/html/nsHtml5TreeOpExecutor.cpp @@ -27,7 +27,9 @@ #include "mozilla/Util.h" // DebugOnly #include "sampler.h" #include "nsIScriptError.h" +#include "nsIScriptContext.h" #include "mozilla/Preferences.h" +#include "nsIHTMLDocument.h" using namespace mozilla; diff --git a/parser/html/nsHtml5TreeOperation.cpp b/parser/html/nsHtml5TreeOperation.cpp index ab09563f041..7e5ed8c7b98 100644 --- a/parser/html/nsHtml5TreeOperation.cpp +++ b/parser/html/nsHtml5TreeOperation.cpp @@ -34,6 +34,7 @@ #include "nsIURI.h" #include "nsIProtocolHandler.h" #include "nsNetUtil.h" +#include "nsIHTMLDocument.h" namespace dom = mozilla::dom; diff --git a/parser/htmlparser/src/nsParser.cpp b/parser/htmlparser/src/nsParser.cpp index ad16f59e797..96457e79e73 100644 --- a/parser/htmlparser/src/nsParser.cpp +++ b/parser/htmlparser/src/nsParser.cpp @@ -31,7 +31,6 @@ #include "nsIFragmentContentSink.h" #include "nsStreamUtils.h" #include "nsHTMLTokenizer.h" -#include "nsIDocument.h" #include "nsNetUtil.h" #include "nsScriptLoader.h" #include "nsDataHashtable.h" diff --git a/rdf/base/public/nsIRDFContentSink.h b/rdf/base/public/nsIRDFContentSink.h index 02288aba4c1..293e8baadea 100644 --- a/rdf/base/public/nsIRDFContentSink.h +++ b/rdf/base/public/nsIRDFContentSink.h @@ -14,7 +14,6 @@ #define nsIRDFContentSink_h___ #include "nsIXMLContentSink.h" -class nsIDocument; class nsIRDFDataSource; class nsIURI; diff --git a/toolkit/components/places/Helpers.cpp b/toolkit/components/places/Helpers.cpp index f8dc37f1d0d..d499fb4db03 100644 --- a/toolkit/components/places/Helpers.cpp +++ b/toolkit/components/places/Helpers.cpp @@ -13,7 +13,6 @@ #if defined(XP_OS2) #include "nsIRandomGenerator.h" #endif -#include "nsContentUtils.h" // The length of guids that are used by history and bookmarks. #define GUID_LENGTH 12 diff --git a/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp b/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp index bfcf83e5071..127b6425c92 100644 --- a/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp +++ b/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp @@ -27,7 +27,6 @@ #include "mozilla/dom/Element.h" #include "nsIFrame.h" #include "nsFrameTraversal.h" -#include "nsIDOMDocument.h" #include "nsIImageDocument.h" #include "nsIDOMHTMLDocument.h" #include "nsIDOMHTMLElement.h" diff --git a/uriloader/exthandler/ExternalHelperAppParent.cpp b/uriloader/exthandler/ExternalHelperAppParent.cpp index 8673d21426e..f5202ec3c2c 100644 --- a/uriloader/exthandler/ExternalHelperAppParent.cpp +++ b/uriloader/exthandler/ExternalHelperAppParent.cpp @@ -6,7 +6,6 @@ #include "ExternalHelperAppParent.h" #include "nsIContent.h" -#include "nsIDocument.h" #include "nsCExternalHandlerService.h" #include "nsIExternalHelperAppService.h" #include "mozilla/dom/ContentParent.h" diff --git a/uriloader/prefetch/nsPrefetchService.cpp b/uriloader/prefetch/nsPrefetchService.cpp index 9b4c319d8d7..e373edec661 100644 --- a/uriloader/prefetch/nsPrefetchService.cpp +++ b/uriloader/prefetch/nsPrefetchService.cpp @@ -27,6 +27,7 @@ #include "nsIAsyncVerifyRedirectCallback.h" #include "mozilla/Preferences.h" #include "mozilla/Attributes.h" +#include "nsIDOMNode.h" using namespace mozilla; diff --git a/uriloader/prefetch/nsPrefetchService.h b/uriloader/prefetch/nsPrefetchService.h index 348286da93b..79d0882e779 100644 --- a/uriloader/prefetch/nsPrefetchService.h +++ b/uriloader/prefetch/nsPrefetchService.h @@ -13,7 +13,6 @@ #include "nsIStreamListener.h" #include "nsIChannel.h" #include "nsIURI.h" -#include "nsIDOMDocument.h" #include "nsIDOMLoadStatus.h" #include "nsWeakReference.h" #include "nsCOMPtr.h" diff --git a/view/src/nsViewManager.cpp b/view/src/nsViewManager.cpp index 04ec7da11f7..a86ece9c755 100644 --- a/view/src/nsViewManager.cpp +++ b/view/src/nsViewManager.cpp @@ -16,8 +16,6 @@ #include "nsRegion.h" #include "nsHashtable.h" #include "nsCOMArray.h" -#include "nsThreadUtils.h" -#include "nsContentUtils.h" #include "nsIPluginWidget.h" #include "nsXULPopupManager.h" #include "nsIPresShell.h" diff --git a/widget/cocoa/nsMenuBarX.h b/widget/cocoa/nsMenuBarX.h index 9e641f9f59d..6bdb4b596e6 100644 --- a/widget/cocoa/nsMenuBarX.h +++ b/widget/cocoa/nsMenuBarX.h @@ -19,7 +19,6 @@ class nsMenuX; class nsMenuItemX; class nsIWidget; class nsIContent; -class nsIDocument; // The native menu service for creating native menu bars. class nsNativeMenuServiceX : public nsINativeMenuService diff --git a/widget/gtk2/nsNativeThemeGTK.cpp b/widget/gtk2/nsNativeThemeGTK.cpp index a9d26d38fb6..c3fbb398a56 100644 --- a/widget/gtk2/nsNativeThemeGTK.cpp +++ b/widget/gtk2/nsNativeThemeGTK.cpp @@ -11,7 +11,6 @@ #include "nsIServiceManager.h" #include "nsIFrame.h" #include "nsIPresShell.h" -#include "nsIDocument.h" #include "nsIContent.h" #include "nsIViewManager.h" #include "nsINameSpaceManager.h" diff --git a/widget/windows/nsNativeThemeWin.cpp b/widget/windows/nsNativeThemeWin.cpp index e910d9580e1..b3cbcd6e7af 100644 --- a/widget/windows/nsNativeThemeWin.cpp +++ b/widget/windows/nsNativeThemeWin.cpp @@ -13,7 +13,6 @@ #include "nsIPresShell.h" #include "nsPresContext.h" #include "nsIContent.h" -#include "nsIDocument.h" #include "nsIFrame.h" #include "nsEventStates.h" #include "nsINameSpaceManager.h" diff --git a/xpfe/appshell/src/nsWebShellWindow.h b/xpfe/appshell/src/nsWebShellWindow.h index a5e71a403a5..a4cb5db0846 100644 --- a/xpfe/appshell/src/nsWebShellWindow.h +++ b/xpfe/appshell/src/nsWebShellWindow.h @@ -10,10 +10,6 @@ #include "nsEvent.h" #include "nsIWebProgressListener.h" #include "nsITimer.h" - -// can't use forward class decl's because of template bugs on Solaris -#include "nsIDOMDocument.h" - #include "nsCOMPtr.h" #include "nsXULWindow.h" diff --git a/xpfe/components/directory/nsDirectoryViewer.cpp b/xpfe/components/directory/nsDirectoryViewer.cpp index 9d95fb01280..526c065c039 100644 --- a/xpfe/components/directory/nsDirectoryViewer.cpp +++ b/xpfe/components/directory/nsDirectoryViewer.cpp @@ -44,7 +44,6 @@ #include "nsIProgressEventSink.h" #include "nsIDOMWindow.h" #include "nsIDOMWindowCollection.h" -#include "nsIDOMDocument.h" #include "nsIDOMElement.h" #include "nsIStreamConverterService.h" #include "nsICategoryManager.h" From 9186ad201c2fe89a668c5bdd3cbe51e492fbb560 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Mon, 2 Jul 2012 11:46:21 +1200 Subject: [PATCH 06/12] Bug 770001. When comparing clips, adjust for any change in the ThebesLayer coordinate system. When clips are different, try to accumulate differences intelligently, taking into account that changes in clips outside the bounds of the clipped display item don't matter. r=mattwoodrow --HG-- extra : rebase_source : d958c629307045f2592ffe658cd1a2e608713cbd --- layout/base/FrameLayerBuilder.cpp | 59 ++++++++++++++++++++----- layout/base/FrameLayerBuilder.h | 11 +++++ layout/base/nsDisplayListInvalidation.h | 2 +- 3 files changed, 61 insertions(+), 11 deletions(-) diff --git a/layout/base/FrameLayerBuilder.cpp b/layout/base/FrameLayerBuilder.cpp index 8993b8d2a7b..db605f8f5b3 100644 --- a/layout/base/FrameLayerBuilder.cpp +++ b/layout/base/FrameLayerBuilder.cpp @@ -1991,7 +1991,8 @@ ContainerState::InvalidateForLayerChange(nsDisplayItem* aItem, Layer* aNewLayer, ThebesDisplayItemLayerUserData* data = static_cast(t->GetUserData(&gThebesDisplayItemLayerUserData)); InvalidatePostTransformRegion(t, - oldGeometry->ComputeInvalidationRegion().ScaleToOutsidePixels(data->mXScale, data->mYScale, mAppUnitsPerDevPixel), + oldGeometry->ComputeInvalidationRegion(). + ScaleToOutsidePixels(data->mXScale, data->mYScale, mAppUnitsPerDevPixel), mLayerBuilder->GetLastPaintOffset(t)); } if (aNewLayer) { @@ -2000,7 +2001,8 @@ ContainerState::InvalidateForLayerChange(nsDisplayItem* aItem, Layer* aNewLayer, ThebesDisplayItemLayerUserData* data = static_cast(newThebesLayer->GetUserData(&gThebesDisplayItemLayerUserData)); InvalidatePostTransformRegion(newThebesLayer, - geometry->ComputeInvalidationRegion().ScaleToOutsidePixels(data->mXScale, data->mYScale, mAppUnitsPerDevPixel), + geometry->ComputeInvalidationRegion(). + ScaleToOutsidePixels(data->mXScale, data->mYScale, mAppUnitsPerDevPixel), GetTranslationForThebesLayer(newThebesLayer)); } } @@ -2028,27 +2030,27 @@ ContainerState::InvalidateForLayerChange(nsDisplayItem* aItem, Layer* aNewLayer, #ifdef DEBUG_INVALIDATIONS printf("Display item type %s(%p) added to layer %p!\n", aItem->Name(), f, aNewLayer); #endif - } else if (aItem->IsInvalid() || *oldClip != aClip) { - // Either layout marked item as needing repainting, or the clip on it changed, invalidate - // the entire old and new areas. - // TODO: We could be smarter about handling clip changes here instead of repainting everything. + } else if (aItem->IsInvalid()) { + // Layout marked item as needing repainting. Invalidate the entire old + // and new areas. combined.Or(geometry->ComputeInvalidationRegion(), oldGeometry->ComputeInvalidationRegion()); #ifdef DEBUG_INVALIDATIONS printf("Display item type %s(%p) (in layer %p) belongs to an invalidated frame!\n", aItem->Name(), f, aNewLayer); #endif } else { - // No obvious differences, so let the display item check for geometry changes and decide what needs to be - // repainted. - ThebesDisplayItemLayerUserData* data = - static_cast(newThebesLayer->GetUserData(&gThebesDisplayItemLayerUserData)); nsIntPoint paintOffset = GetTranslationForThebesLayer(newThebesLayer); nsPoint offset((paintOffset.x + data->mActiveScrolledRootPosition.x) * mAppUnitsPerDevPixel / data->mXScale, (paintOffset.y + data->mActiveScrolledRootPosition.y) * mAppUnitsPerDevPixel / data->mYScale); nsPoint prevOffset((oldGeometry->mPaintOffset.x + oldGeometry->mActiveScrolledRootPosition.x) * oldGeometry->mAppUnitsPerDevPixel / data->mXScale, (oldGeometry->mPaintOffset.y + oldGeometry->mActiveScrolledRootPosition.y) * oldGeometry->mAppUnitsPerDevPixel / data->mYScale); nsPoint shift = offset - prevOffset; + // Let the display item check for geometry changes and decide what needs to be + // repainted. oldGeometry->MoveBy(shift); aItem->ComputeInvalidationRegion(mBuilder, oldGeometry, &combined); + oldClip->AddOffsetAndComputeDifference(shift, oldGeometry->ComputeInvalidationRegion(), + aClip, geometry->ComputeInvalidationRegion(), + &combined); #ifdef DEBUG_INVALIDATIONS if (!combined.IsEmpty()) { printf("Display item type %s(%p) (in layer %p) changed geometry!\n", aItem->Name(), f, aNewLayer); @@ -3158,6 +3160,43 @@ FrameLayerBuilder::Clip::RemoveRoundedCorners() mRoundedClipRects.Clear(); } +static void +AccumulateRectDifference(const nsRect& aR1, const nsRect& aR2, nsRegion* aOut) +{ + if (aR1.IsEqualInterior(aR2)) + return; + nsRegion r; + r.Xor(aR1, aR2); + aOut->Or(*aOut, r); +} + +void +FrameLayerBuilder::Clip::AddOffsetAndComputeDifference(const nsPoint& aOffset, + const nsRect& aBounds, + const Clip& aOther, + const nsRect& aOtherBounds, + nsRegion* aDifference) +{ + if (mHaveClipRect != aOther.mHaveClipRect || + mRoundedClipRects.Length() != aOther.mRoundedClipRects.Length()) { + aDifference->Or(*aDifference, aBounds); + aDifference->Or(*aDifference, aOtherBounds); + return; + } + if (mHaveClipRect) { + AccumulateRectDifference((mClipRect + aOffset).Intersect(aBounds), + aOther.mClipRect.Intersect(aOtherBounds), + aDifference); + } + for (PRUint32 i = 0; i < mRoundedClipRects.Length(); ++i) { + if (mRoundedClipRects[i] + aOffset != aOther.mRoundedClipRects[i]) { + // The corners make it tricky so we'll just add both rects here. + aDifference->Or(*aDifference, mRoundedClipRects[i].mRect.Intersect(aBounds)); + aDifference->Or(*aDifference, aOther.mRoundedClipRects[i].mRect.Intersect(aOtherBounds)); + } + } +} + gfxRect CalculateBounds(nsTArray aRects, PRInt32 A2D) { diff --git a/layout/base/FrameLayerBuilder.h b/layout/base/FrameLayerBuilder.h index 72d3ed2409d..e39a1bf0654 100644 --- a/layout/base/FrameLayerBuilder.h +++ b/layout/base/FrameLayerBuilder.h @@ -398,6 +398,11 @@ public: // Indices into mRadii are the NS_CORNER_* constants in nsStyleConsts.h nscoord mRadii[8]; + RoundedRect operator+(const nsPoint& aOffset) const { + RoundedRect r = *this; + r.mRect += aOffset; + return r; + } bool operator==(const RoundedRect& aOther) const { if (!mRect.IsEqualInterior(aOther.mRect)) { return false; @@ -460,6 +465,12 @@ public: // Gets rid of any rounded corners in this clip. void RemoveRoundedCorners(); + // Adds the difference between Intersect(*this + aPoint, aBounds) and + // Intersect(aOther, aOtherBounds) to aDifference. + void AddOffsetAndComputeDifference(const nsPoint& aPoint, const nsRect& aBounds, + const Clip& aOther, const nsRect& aOtherBounds, + nsRegion* aDifference); + bool operator==(const Clip& aOther) const { return mHaveClipRect == aOther.mHaveClipRect && (!mHaveClipRect || mClipRect.IsEqualInterior(aOther.mClipRect)) && diff --git a/layout/base/nsDisplayListInvalidation.h b/layout/base/nsDisplayListInvalidation.h index 8600522f0d7..53b95764906 100644 --- a/layout/base/nsDisplayListInvalidation.h +++ b/layout/base/nsDisplayListInvalidation.h @@ -28,7 +28,7 @@ public: * Compute the area required to be invalidated if this * display item is removed. */ - nsRegion ComputeInvalidationRegion() { return mBounds; } + const nsRect& ComputeInvalidationRegion() { return mBounds; } /** * Shifts all retained areas of the nsDisplayItemGeometry by the given offset. From 997834631714d324fa8572db8083b28e3f775ae9 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Mon, 2 Jul 2012 11:46:32 +1200 Subject: [PATCH 07/12] Bug 768775. For linear gradients where the gradient line is parallel to an axis and runs from one edge of a background tile to the other, we can repeat the background by just repeating the gradient instead of drawing individual tiles. r=jrmuizel --HG-- extra : rebase_source : 81b9a7951ce78f60aa8eaeca4f66f62561133254 --- gfx/thebes/gfxContext.cpp | 2 +- layout/base/nsCSSRendering.cpp | 21 +++++++++++++++++---- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/gfx/thebes/gfxContext.cpp b/gfx/thebes/gfxContext.cpp index a4119113061..c14c6f1c7fc 100644 --- a/gfx/thebes/gfxContext.cpp +++ b/gfx/thebes/gfxContext.cpp @@ -2099,4 +2099,4 @@ gfxContext::ChangeTransform(const Matrix &aNewMatrix) } mDT->SetTransform(aNewMatrix); -} \ No newline at end of file +} diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp index 0350f8937fc..620182d748e 100644 --- a/layout/base/nsCSSRendering.cpp +++ b/layout/base/nsCSSRendering.cpp @@ -1997,6 +1997,7 @@ nsCSSRendering::PaintGradient(nsPresContext* aPresContext, // Create the gradient pattern. nsRefPtr gradientPattern; + bool forceRepeatToCoverTiles = false; if (aGradient->mShape == NS_STYLE_GRADIENT_SHAPE_LINEAR) { // Compute the actual gradient line ends we need to pass to cairo after // stops have been normalized. @@ -2015,6 +2016,16 @@ nsCSSRendering::PaintGradient(nsPresContext* aPresContext, gradientPattern = new gfxPattern(gradientStart.x, gradientStart.y, gradientEnd.x, gradientEnd.y); + + // When the gradient line is parallel to the x axis from the left edge + // to the right edge of a tile, then we can repeat by just repeating the + // gradient. + if ((gradientStart.y == gradientEnd.y && gradientStart.x == 0 && + gradientEnd.x == oneCellArea.width) || + (gradientStart.x == gradientEnd.x && gradientStart.y == 0 && + gradientEnd.y == oneCellArea.height)) { + forceRepeatToCoverTiles = true; + } } else { NS_ASSERTION(firstStop >= 0.0, "Negative stops not allowed for radial gradients"); @@ -2065,7 +2076,7 @@ nsCSSRendering::PaintGradient(nsPresContext* aPresContext, } // Set repeat mode. Default cairo extend mode is PAD. - if (aGradient->mRepeating) { + if (aGradient->mRepeating || forceRepeatToCoverTiles) { gradientPattern->SetExtend(gfxPattern::EXTEND_REPEAT); } @@ -2084,8 +2095,9 @@ nsCSSRendering::PaintGradient(nsPresContext* aPresContext, // xStart/yStart are the top-left corner of the top-left tile. nscoord xStart = FindTileStart(dirty.x, aOneCellArea.x, aOneCellArea.width); nscoord yStart = FindTileStart(dirty.y, aOneCellArea.y, aOneCellArea.height); - nscoord xEnd = dirty.XMost(); - nscoord yEnd = dirty.YMost(); + nscoord xEnd = forceRepeatToCoverTiles ? xStart + aOneCellArea.width : dirty.XMost(); + nscoord yEnd = forceRepeatToCoverTiles ? yStart + aOneCellArea.height : dirty.YMost(); + // x and y are the top-left corner of the tile to draw for (nscoord y = yStart; y < yEnd; y += aOneCellArea.height) { for (nscoord x = xStart; x < xEnd; x += aOneCellArea.width) { @@ -2095,7 +2107,8 @@ nsCSSRendering::PaintGradient(nsPresContext* aPresContext, appUnitsPerPixel); // The actual area to fill with this tile is the intersection of this // tile with the overall area we're supposed to be filling - gfxRect fillRect = tileRect.Intersect(areaToFill); + gfxRect fillRect = + forceRepeatToCoverTiles ? areaToFill : tileRect.Intersect(areaToFill); ctx->NewPath(); ctx->Translate(tileRect.TopLeft()); ctx->SetPattern(gradientPattern); From c90a266feaed36f48a0166dc7389988f5bbe7651 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Mon, 2 Jul 2012 11:49:34 +1200 Subject: [PATCH 08/12] Bug 768348. Avoid ExtCreatePen failures by avoiding rounding widths and dash lengths down to zero. r=jrmuizel --HG-- extra : rebase_source : 5231a02af67486dbd0e663d3756ad60fe1483157 --- gfx/cairo/README | 2 + .../cairo/src/cairo-win32-printing-surface.c | 21 ++++- gfx/cairo/win32-ExtCreatePen-zero-size.patch | 85 +++++++++++++++++++ 3 files changed, 106 insertions(+), 2 deletions(-) create mode 100644 gfx/cairo/win32-ExtCreatePen-zero-size.patch diff --git a/gfx/cairo/README b/gfx/cairo/README index 8d889a48961..1ee27c3582c 100644 --- a/gfx/cairo/README +++ b/gfx/cairo/README @@ -180,6 +180,8 @@ fix-build-with-Werror=return-type.patch: Fix builds with -Werror=return-type (bu avoid-extend-none.patch: Avoid incorrectly using EXTEND_NONE (bug 751668) +win32-ExtCreatePen-zero-size.patch: Don't pass zero width or dash lengths to ExtCreatePen (bug 768348) + ==== pixman patches ==== pixman-android-cpu-detect.patch: Add CPU detection support for Android, where we can't reliably access /proc/self/auxv. diff --git a/gfx/cairo/cairo/src/cairo-win32-printing-surface.c b/gfx/cairo/cairo/src/cairo-win32-printing-surface.c index fd580b5370e..be3856e263e 100644 --- a/gfx/cairo/cairo/src/cairo-win32-printing-surface.c +++ b/gfx/cairo/cairo/src/cairo-win32-printing-surface.c @@ -1256,12 +1256,14 @@ _cairo_win32_printing_surface_stroke (void *abstract_surface, COLORREF color; XFORM xform; DWORD pen_style; + DWORD pen_width; DWORD *dash_array; HGDIOBJ obj; unsigned int i; cairo_solid_pattern_t clear; cairo_matrix_t mat; double scale; + double scaled_width; status = _cairo_surface_clipper_set_clip (&surface->clipper, clip); if (status) @@ -1293,7 +1295,11 @@ _cairo_win32_printing_surface_stroke (void *abstract_surface, pen_style |= PS_USERSTYLE; dash_array = calloc (sizeof (DWORD), style->num_dashes); for (i = 0; i < style->num_dashes; i++) { - dash_array[i] = (DWORD) (scale * style->dash[i]); + DWORD dashes = (DWORD) (scale * style->dash[i]); + /* zero dash-lengths cause ExtCreatePen to fail. Make the dashes + * longer if necessary. + */ + dash_array[i] = MAX(1, dashes); } } else { pen_style |= PS_SOLID; @@ -1315,8 +1321,19 @@ _cairo_win32_printing_surface_stroke (void *abstract_surface, brush.lbHatch = 0; pen_style |= _cairo_win32_line_cap (style->line_cap); pen_style |= _cairo_win32_line_join (style->line_join); + scaled_width = scale * style->line_width; + if (scaled_width == 0.0) + return status; + pen_width = (DWORD)scaled_width; + if (pen_width == 0) { + /* ExtCreatePen will fail if passed zero width. We have to choose + * between drawing something too wide, or drawing nothing at all. + * Let's draw something. + */ + pen_width = 1; + } pen = ExtCreatePen(pen_style, - scale * style->line_width, + pen_width, &brush, style->num_dashes, dash_array); diff --git a/gfx/cairo/win32-ExtCreatePen-zero-size.patch b/gfx/cairo/win32-ExtCreatePen-zero-size.patch new file mode 100644 index 00000000000..3970015f705 --- /dev/null +++ b/gfx/cairo/win32-ExtCreatePen-zero-size.patch @@ -0,0 +1,85 @@ +From: Robert O'Callahan +Bug 768348. Avoid ExtCreatePen failures by avoiding rounding widths and dash lengths down to zero. r=jrmuizel + +diff --git a/gfx/cairo/cairo/src/cairo-win32-printing-surface.c b/gfx/cairo/cairo/src/cairo-win32-printing-surface.c +--- a/gfx/cairo/cairo/src/cairo-win32-printing-surface.c ++++ b/gfx/cairo/cairo/src/cairo-win32-printing-surface.c +@@ -1251,22 +1251,24 @@ static cairo_int_status_t + { + cairo_win32_surface_t *surface = abstract_surface; + cairo_int_status_t status; + HPEN pen; + LOGBRUSH brush; + COLORREF color; + XFORM xform; + DWORD pen_style; ++ DWORD pen_width; + DWORD *dash_array; + HGDIOBJ obj; + unsigned int i; + cairo_solid_pattern_t clear; + cairo_matrix_t mat; + double scale; ++ double scaled_width; + + status = _cairo_surface_clipper_set_clip (&surface->clipper, clip); + if (status) + return status; + + if (op == CAIRO_OPERATOR_CLEAR) { + _cairo_win32_printing_surface_init_clear_color (surface, &clear); + source = (cairo_pattern_t*) &clear; +@@ -1288,17 +1290,21 @@ static cairo_int_status_t + _cairo_matrix_factor_out_scale (&mat, &scale); + + pen_style = PS_GEOMETRIC; + dash_array = NULL; + if (style->num_dashes) { + pen_style |= PS_USERSTYLE; + dash_array = calloc (sizeof (DWORD), style->num_dashes); + for (i = 0; i < style->num_dashes; i++) { +- dash_array[i] = (DWORD) (scale * style->dash[i]); ++ DWORD dashes = (DWORD) (scale * style->dash[i]); ++ /* zero dash-lengths cause ExtCreatePen to fail. Make the dashes ++ * longer if necessary. ++ */ ++ dash_array[i] = MAX(1, dashes); + } + } else { + pen_style |= PS_SOLID; + } + + SetMiterLimit (surface->dc, (FLOAT) (style->miter_limit), NULL); + if (source->type == CAIRO_PATTERN_TYPE_SOLID) { + cairo_solid_pattern_t *solid = (cairo_solid_pattern_t *) source; +@@ -1310,18 +1316,29 @@ static cairo_int_status_t + /* Color not used as the pen will only be used by WidenPath() */ + color = RGB (0,0,0); + } + brush.lbStyle = BS_SOLID; + brush.lbColor = color; + brush.lbHatch = 0; + pen_style |= _cairo_win32_line_cap (style->line_cap); + pen_style |= _cairo_win32_line_join (style->line_join); ++ scaled_width = scale * style->line_width; ++ if (scaled_width == 0.0) ++ return status; ++ pen_width = (DWORD)scaled_width; ++ if (pen_width == 0) { ++ /* ExtCreatePen will fail if passed zero width. We have to choose ++ * between drawing something too wide, or drawing nothing at all. ++ * Let's draw something. ++ */ ++ pen_width = 1; ++ } + pen = ExtCreatePen(pen_style, +- scale * style->line_width, ++ pen_width, + &brush, + style->num_dashes, + dash_array); + if (pen == NULL) + return _cairo_win32_print_gdi_error ("_win32_surface_stroke:ExtCreatePen"); + obj = SelectObject (surface->dc, pen); + if (obj == NULL) + return _cairo_win32_print_gdi_error ("_win32_surface_stroke:SelectObject"); From 50720efda21dd65cbcbf92a55aec7303c2d104c5 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Mon, 2 Jul 2012 13:18:32 +1200 Subject: [PATCH 09/12] Mark gradient tests fuzzy for bug 768775 --- layout/reftests/image-element/reftest.list | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layout/reftests/image-element/reftest.list b/layout/reftests/image-element/reftest.list index 2714aee315e..0681bf26f71 100644 --- a/layout/reftests/image-element/reftest.list +++ b/layout/reftests/image-element/reftest.list @@ -35,8 +35,8 @@ random-if(d2d) == element-paint-transform-02.html element-paint-transform-02-ref random-if(!cocoaWidget) == gradient-html-03.html gradient-html-03-ref.svg == gradient-html-04.html gradient-html-04-ref.html == gradient-html-05.html gradient-html-05-ref.html -random-if(!cocoaWidget) == gradient-html-06a.html gradient-html-06b.html -random-if(!cocoaWidget) == gradient-html-06b.html gradient-html-06c.html +fuzzy(1,9627) random-if(!cocoaWidget) == gradient-html-06a.html gradient-html-06b.html +fuzzy(1,9627) random-if(!cocoaWidget) == gradient-html-06b.html gradient-html-06c.html == gradient-html-06c.html gradient-html-06d.html == gradient-html-06d.html gradient-html-06e.html random-if(!cocoaWidget) == gradient-html-07a.html gradient-html-07b.html From 0a9176c95862faa47e0d47463ea83df08794d787 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Sun, 1 Jul 2012 14:18:23 -0400 Subject: [PATCH 10/12] Bug 769881 - copyStringToClipboard Optional parameters should go at the end, also this will make it backward compatible for version bumped extensions; r=roc --- browser/base/content/urlbarBindings.xml | 2 +- browser/devtools/sourceeditor/source-editor-orion.jsm | 4 ++-- .../test/browser_bug695035_middle_click_paste.js | 4 ++-- browser/devtools/sourceeditor/test/head.js | 4 ++-- .../tests/chrome/test_autocomplete_delayOnPaste.xul | 2 +- widget/nsIClipboardHelper.idl | 4 ++-- widget/xpwidgets/nsClipboardHelper.cpp | 8 ++++---- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/browser/base/content/urlbarBindings.xml b/browser/base/content/urlbarBindings.xml index f000cab8b8a..02279da6ec4 100644 --- a/browser/base/content/urlbarBindings.xml +++ b/browser/base/content/urlbarBindings.xml @@ -753,7 +753,7 @@ Cc["@mozilla.org/widget/clipboardhelper;1"] .getService(Ci.nsIClipboardHelper) - .copyStringToClipboard(val, document, Ci.nsIClipboard.kSelectionClipboard); + .copyStringToClipboard(val, Ci.nsIClipboard.kSelectionClipboard, document); ]]> diff --git a/browser/devtools/sourceeditor/source-editor-orion.jsm b/browser/devtools/sourceeditor/source-editor-orion.jsm index 281b04fdd1f..ea92d30b042 100644 --- a/browser/devtools/sourceeditor/source-editor-orion.jsm +++ b/browser/devtools/sourceeditor/source-editor-orion.jsm @@ -763,8 +763,8 @@ SourceEditor.prototype = { } clipboardHelper.copyStringToClipboard(text, - this.parentElement.ownerDocument, - Ci.nsIClipboard.kSelectionClipboard); + Ci.nsIClipboard.kSelectionClipboard, + this.parentElement.ownerDocument); }, /** diff --git a/browser/devtools/sourceeditor/test/browser_bug695035_middle_click_paste.js b/browser/devtools/sourceeditor/test/browser_bug695035_middle_click_paste.js index b10f4904c51..40775a11c67 100644 --- a/browser/devtools/sourceeditor/test/browser_bug695035_middle_click_paste.js +++ b/browser/devtools/sourceeditor/test/browser_bug695035_middle_click_paste.js @@ -54,8 +54,8 @@ function editorLoaded() let clipboardHelper = Cc["@mozilla.org/widget/clipboardhelper;1"]. getService(Ci.nsIClipboardHelper); clipboardHelper.copyStringToClipboard(expectedString, - testWin.document, - Ci.nsIClipboard.kSelectionClipboard); + Ci.nsIClipboard.kSelectionClipboard, + testWin.document); }; let onCopy = function() { diff --git a/browser/devtools/sourceeditor/test/head.js b/browser/devtools/sourceeditor/test/head.js index 102835e22a4..326c7ef2258 100644 --- a/browser/devtools/sourceeditor/test/head.js +++ b/browser/devtools/sourceeditor/test/head.js @@ -96,8 +96,8 @@ function waitForSelection(aExpectedStringOrValidatorFn, aSetupFn, let clipboardHelper = Cc["@mozilla.org/widget/clipboardhelper;1"]. getService(Ci.nsIClipboardHelper); clipboardHelper.copyStringToClipboard(preExpectedVal, - document, - Ci.nsIClipboard.kSelectionClipboard); + Ci.nsIClipboard.kSelectionClipboard, + document); wait(function(aData) aData == preExpectedVal, function() { diff --git a/toolkit/content/tests/chrome/test_autocomplete_delayOnPaste.xul b/toolkit/content/tests/chrome/test_autocomplete_delayOnPaste.xul index 9305fdaba86..dd0217ee4c8 100644 --- a/toolkit/content/tests/chrome/test_autocomplete_delayOnPaste.xul +++ b/toolkit/content/tests/chrome/test_autocomplete_delayOnPaste.xul @@ -109,7 +109,7 @@ function runTest() { gACTimer = Date.now(); Components.classes["@mozilla.org/widget/clipboardhelper;1"] .getService(Components.interfaces.nsIClipboardHelper) - .copyStringToClipboard(SEARCH_STRING, document, Components.interfaces.nsIClipboard.kGlobalClipboard); + .copyStringToClipboard(SEARCH_STRING, Components.interfaces.nsIClipboard.kGlobalClipboard, document); }, cbCallback, cbCallback); } ]]> diff --git a/widget/nsIClipboardHelper.idl b/widget/nsIClipboardHelper.idl index ac0e6b2f0f4..62316e6ea05 100644 --- a/widget/nsIClipboardHelper.idl +++ b/widget/nsIClipboardHelper.idl @@ -17,7 +17,7 @@ interface nsIDOMDocument; * helper service for common uses of nsIClipboard. */ -[scriptable, uuid(836316a9-6834-45e7-92af-5a4b9bd01a31)] +[scriptable, uuid(c9d5a750-c3a8-11e1-9b21-0800200c9a66)] interface nsIClipboardHelper : nsISupports { @@ -29,7 +29,7 @@ interface nsIClipboardHelper : nsISupports * @param aClipboardID, the ID of the clipboard to copy to * (eg. kSelectionClipboard -- see nsIClipboard.idl) */ - void copyStringToClipboard(in AString aString, [optional] in nsIDOMDocument aDoc, in long aClipboardID); + void copyStringToClipboard(in AString aString, in long aClipboardID, [optional] in nsIDOMDocument aDoc); /** * copy string to (default) clipboard diff --git a/widget/xpwidgets/nsClipboardHelper.cpp b/widget/xpwidgets/nsClipboardHelper.cpp index c6bb14b16ce..ccbe966523d 100644 --- a/widget/xpwidgets/nsClipboardHelper.cpp +++ b/widget/xpwidgets/nsClipboardHelper.cpp @@ -39,8 +39,8 @@ nsClipboardHelper::~nsClipboardHelper() NS_IMETHODIMP nsClipboardHelper::CopyStringToClipboard(const nsAString& aString, - nsIDOMDocument* aDocument, - PRInt32 aClipboardID) + PRInt32 aClipboardID, + nsIDOMDocument* aDocument) { nsresult rv; @@ -108,7 +108,7 @@ nsClipboardHelper::CopyString(const nsAString& aString, nsIDOMDocument* aDocumen nsresult rv; // copy to the global clipboard. it's bad if this fails in any way. - rv = CopyStringToClipboard(aString, aDocument, nsIClipboard::kGlobalClipboard); + rv = CopyStringToClipboard(aString, nsIClipboard::kGlobalClipboard, aDocument); NS_ENSURE_SUCCESS(rv, rv); // unix also needs us to copy to the selection clipboard. this will @@ -120,7 +120,7 @@ nsClipboardHelper::CopyString(const nsAString& aString, nsIDOMDocument* aDocumen // if this fails in any way other than "not being unix", we'll get // the assertion we need in CopyStringToClipboard, and we needn't // assert again here. - CopyStringToClipboard(aString, aDocument, nsIClipboard::kSelectionClipboard); + CopyStringToClipboard(aString, nsIClipboard::kSelectionClipboard, aDocument); return NS_OK; } From 74e148fb5b77f65e605183a9861e01b0f6444885 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Mon, 2 Jul 2012 14:43:37 +1200 Subject: [PATCH 11/12] Backout bug 768775 for now --- gfx/thebes/gfxContext.cpp | 2 +- layout/base/nsCSSRendering.cpp | 21 ++++----------------- layout/reftests/image-element/reftest.list | 4 ++-- 3 files changed, 7 insertions(+), 20 deletions(-) diff --git a/gfx/thebes/gfxContext.cpp b/gfx/thebes/gfxContext.cpp index c14c6f1c7fc..a4119113061 100644 --- a/gfx/thebes/gfxContext.cpp +++ b/gfx/thebes/gfxContext.cpp @@ -2099,4 +2099,4 @@ gfxContext::ChangeTransform(const Matrix &aNewMatrix) } mDT->SetTransform(aNewMatrix); -} +} \ No newline at end of file diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp index 620182d748e..0350f8937fc 100644 --- a/layout/base/nsCSSRendering.cpp +++ b/layout/base/nsCSSRendering.cpp @@ -1997,7 +1997,6 @@ nsCSSRendering::PaintGradient(nsPresContext* aPresContext, // Create the gradient pattern. nsRefPtr gradientPattern; - bool forceRepeatToCoverTiles = false; if (aGradient->mShape == NS_STYLE_GRADIENT_SHAPE_LINEAR) { // Compute the actual gradient line ends we need to pass to cairo after // stops have been normalized. @@ -2016,16 +2015,6 @@ nsCSSRendering::PaintGradient(nsPresContext* aPresContext, gradientPattern = new gfxPattern(gradientStart.x, gradientStart.y, gradientEnd.x, gradientEnd.y); - - // When the gradient line is parallel to the x axis from the left edge - // to the right edge of a tile, then we can repeat by just repeating the - // gradient. - if ((gradientStart.y == gradientEnd.y && gradientStart.x == 0 && - gradientEnd.x == oneCellArea.width) || - (gradientStart.x == gradientEnd.x && gradientStart.y == 0 && - gradientEnd.y == oneCellArea.height)) { - forceRepeatToCoverTiles = true; - } } else { NS_ASSERTION(firstStop >= 0.0, "Negative stops not allowed for radial gradients"); @@ -2076,7 +2065,7 @@ nsCSSRendering::PaintGradient(nsPresContext* aPresContext, } // Set repeat mode. Default cairo extend mode is PAD. - if (aGradient->mRepeating || forceRepeatToCoverTiles) { + if (aGradient->mRepeating) { gradientPattern->SetExtend(gfxPattern::EXTEND_REPEAT); } @@ -2095,9 +2084,8 @@ nsCSSRendering::PaintGradient(nsPresContext* aPresContext, // xStart/yStart are the top-left corner of the top-left tile. nscoord xStart = FindTileStart(dirty.x, aOneCellArea.x, aOneCellArea.width); nscoord yStart = FindTileStart(dirty.y, aOneCellArea.y, aOneCellArea.height); - nscoord xEnd = forceRepeatToCoverTiles ? xStart + aOneCellArea.width : dirty.XMost(); - nscoord yEnd = forceRepeatToCoverTiles ? yStart + aOneCellArea.height : dirty.YMost(); - + nscoord xEnd = dirty.XMost(); + nscoord yEnd = dirty.YMost(); // x and y are the top-left corner of the tile to draw for (nscoord y = yStart; y < yEnd; y += aOneCellArea.height) { for (nscoord x = xStart; x < xEnd; x += aOneCellArea.width) { @@ -2107,8 +2095,7 @@ nsCSSRendering::PaintGradient(nsPresContext* aPresContext, appUnitsPerPixel); // The actual area to fill with this tile is the intersection of this // tile with the overall area we're supposed to be filling - gfxRect fillRect = - forceRepeatToCoverTiles ? areaToFill : tileRect.Intersect(areaToFill); + gfxRect fillRect = tileRect.Intersect(areaToFill); ctx->NewPath(); ctx->Translate(tileRect.TopLeft()); ctx->SetPattern(gradientPattern); diff --git a/layout/reftests/image-element/reftest.list b/layout/reftests/image-element/reftest.list index 0681bf26f71..2714aee315e 100644 --- a/layout/reftests/image-element/reftest.list +++ b/layout/reftests/image-element/reftest.list @@ -35,8 +35,8 @@ random-if(d2d) == element-paint-transform-02.html element-paint-transform-02-ref random-if(!cocoaWidget) == gradient-html-03.html gradient-html-03-ref.svg == gradient-html-04.html gradient-html-04-ref.html == gradient-html-05.html gradient-html-05-ref.html -fuzzy(1,9627) random-if(!cocoaWidget) == gradient-html-06a.html gradient-html-06b.html -fuzzy(1,9627) random-if(!cocoaWidget) == gradient-html-06b.html gradient-html-06c.html +random-if(!cocoaWidget) == gradient-html-06a.html gradient-html-06b.html +random-if(!cocoaWidget) == gradient-html-06b.html gradient-html-06c.html == gradient-html-06c.html gradient-html-06d.html == gradient-html-06d.html gradient-html-06e.html random-if(!cocoaWidget) == gradient-html-07a.html gradient-html-07b.html From 1ae77ce07a7f2b937e814a85797c034fcdae4b2f Mon Sep 17 00:00:00 2001 From: Mark Capella Date: Sun, 1 Jul 2012 23:42:45 -0400 Subject: [PATCH 12/12] Bug 767269 - ia2Accessible Text/EditableText QI shouldn't call QI for nsIAccessible Text/EditableText, r=tbsaunde --- .../src/msaa/HyperTextAccessibleWrap.cpp | 29 ++++++++++++++++--- .../src/msaa/ia2AccessibleEditableText.cpp | 19 ------------ .../src/msaa/ia2AccessibleEditableText.h | 3 -- .../src/msaa/ia2AccessibleHypertext.cpp | 19 ------------ accessible/src/msaa/ia2AccessibleHypertext.h | 3 -- accessible/src/msaa/ia2AccessibleText.cpp | 20 ------------- accessible/src/msaa/ia2AccessibleText.h | 3 -- 7 files changed, 25 insertions(+), 71 deletions(-) diff --git a/accessible/src/msaa/HyperTextAccessibleWrap.cpp b/accessible/src/msaa/HyperTextAccessibleWrap.cpp index f205f04e988..8a1f46642b4 100644 --- a/accessible/src/msaa/HyperTextAccessibleWrap.cpp +++ b/accessible/src/msaa/HyperTextAccessibleWrap.cpp @@ -12,10 +12,31 @@ NS_IMPL_ISUPPORTS_INHERITED0(HyperTextAccessibleWrap, HyperTextAccessible) -IMPL_IUNKNOWN_INHERITED2(HyperTextAccessibleWrap, - AccessibleWrap, - ia2AccessibleHypertext, - ia2AccessibleEditableText); +STDMETHODIMP +HyperTextAccessibleWrap::QueryInterface(REFIID aIID, void** aInstancePtr) +{ + if (!aInstancePtr) + return E_FAIL; + + *aInstancePtr = NULL; + + if (IsTextRole()) { + if (aIID == IID_IAccessibleText) + *aInstancePtr = + static_cast(static_cast(this)); + else if (aIID == IID_IAccessibleHypertext) + *aInstancePtr = static_cast(this); + else if (aIID == IID_IAccessibleEditableText) + *aInstancePtr = static_cast(this); + + if (*aInstancePtr) { + AddRef(); + return S_OK; + } + } + + return AccessibleWrap::QueryInterface(aIID, aInstancePtr); +} nsresult HyperTextAccessibleWrap::HandleAccEvent(AccEvent* aEvent) diff --git a/accessible/src/msaa/ia2AccessibleEditableText.cpp b/accessible/src/msaa/ia2AccessibleEditableText.cpp index 8d3ef34e620..cc8668f441d 100644 --- a/accessible/src/msaa/ia2AccessibleEditableText.cpp +++ b/accessible/src/msaa/ia2AccessibleEditableText.cpp @@ -13,25 +13,6 @@ #include "nsCOMPtr.h" #include "nsString.h" -// IUnknown - -STDMETHODIMP -ia2AccessibleEditableText::QueryInterface(REFIID iid, void** ppv) -{ - *ppv = NULL; - - if (IID_IAccessibleEditableText == iid) { - nsCOMPtr editTextAcc(do_QueryObject(this)); - if (!editTextAcc) - return E_NOINTERFACE; - *ppv = static_cast(this); - (reinterpret_cast(*ppv))->AddRef(); - return S_OK; - } - - return E_NOINTERFACE; -} - // IAccessibleEditableText STDMETHODIMP diff --git a/accessible/src/msaa/ia2AccessibleEditableText.h b/accessible/src/msaa/ia2AccessibleEditableText.h index 5d95a6045e5..bc3bc971d1c 100644 --- a/accessible/src/msaa/ia2AccessibleEditableText.h +++ b/accessible/src/msaa/ia2AccessibleEditableText.h @@ -17,9 +17,6 @@ class ia2AccessibleEditableText: public IAccessibleEditableText { public: - // IUnknown - STDMETHODIMP QueryInterface(REFIID, void**); - // IAccessibleEditableText virtual HRESULT STDMETHODCALLTYPE copyText( /* [in] */ long startOffset, diff --git a/accessible/src/msaa/ia2AccessibleHypertext.cpp b/accessible/src/msaa/ia2AccessibleHypertext.cpp index ccaa47333e3..c3f20761634 100644 --- a/accessible/src/msaa/ia2AccessibleHypertext.cpp +++ b/accessible/src/msaa/ia2AccessibleHypertext.cpp @@ -11,25 +11,6 @@ #include "HyperTextAccessibleWrap.h" -// IUnknown - -STDMETHODIMP -ia2AccessibleHypertext::QueryInterface(REFIID iid, void** ppv) -{ - *ppv = NULL; - if (IID_IAccessibleHypertext == iid) { - HyperTextAccessibleWrap* hyperAcc = static_cast(this); - if (hyperAcc->IsTextRole()) { - *ppv = static_cast(this); - (reinterpret_cast(*ppv))->AddRef(); - return S_OK; - } - return E_NOINTERFACE; - } - - return ia2AccessibleText::QueryInterface(iid, ppv); -} - // IAccessibleHypertext STDMETHODIMP diff --git a/accessible/src/msaa/ia2AccessibleHypertext.h b/accessible/src/msaa/ia2AccessibleHypertext.h index c352e9b23cd..bb98b3260a3 100644 --- a/accessible/src/msaa/ia2AccessibleHypertext.h +++ b/accessible/src/msaa/ia2AccessibleHypertext.h @@ -18,9 +18,6 @@ class ia2AccessibleHypertext : public ia2AccessibleText, { public: - // IUnknown - STDMETHODIMP QueryInterface(REFIID, void**); - // IAccessibleText FORWARD_IACCESSIBLETEXT(ia2AccessibleText) diff --git a/accessible/src/msaa/ia2AccessibleText.cpp b/accessible/src/msaa/ia2AccessibleText.cpp index e2b4b8dd7f0..71f39fe6fe2 100644 --- a/accessible/src/msaa/ia2AccessibleText.cpp +++ b/accessible/src/msaa/ia2AccessibleText.cpp @@ -14,26 +14,6 @@ #include "nsIPersistentProperties2.h" -// IUnknown - -STDMETHODIMP -ia2AccessibleText::QueryInterface(REFIID iid, void** ppv) -{ - *ppv = NULL; - - if (IID_IAccessibleText == iid) { - nsCOMPtr textAcc(do_QueryObject(this)); - if (!textAcc) { - return E_NOINTERFACE; - } - *ppv = static_cast(this); - (reinterpret_cast(*ppv))->AddRef(); - return S_OK; - } - - return E_NOINTERFACE; -} - // IAccessibleText STDMETHODIMP diff --git a/accessible/src/msaa/ia2AccessibleText.h b/accessible/src/msaa/ia2AccessibleText.h index bb47166c91e..954e6f23485 100644 --- a/accessible/src/msaa/ia2AccessibleText.h +++ b/accessible/src/msaa/ia2AccessibleText.h @@ -17,9 +17,6 @@ class ia2AccessibleText: public IAccessibleText { public: - // IUnknown - STDMETHODIMP QueryInterface(REFIID, void**); - // IAccessibleText virtual HRESULT STDMETHODCALLTYPE addSelection( /* [in] */ long startOffset,