From ae75dfe8d945dcfd64f43d2d556ac83361ca7d71 Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Mon, 13 Sep 2010 20:44:17 -0700 Subject: [PATCH] Backed out changeset 2e55203d7b80 to fix orange (test_bug508115.xul timing out). --- content/base/public/nsContentErrors.h | 4 ---- content/xbl/src/nsXBLService.cpp | 7 +++---- content/xbl/test/Makefile.in | 3 --- layout/base/nsCSSFrameConstructor.cpp | 30 +++++++++++++-------------- 4 files changed, 18 insertions(+), 26 deletions(-) diff --git a/content/base/public/nsContentErrors.h b/content/base/public/nsContentErrors.h index 4a16574a9f5..0351f46703a 100644 --- a/content/base/public/nsContentErrors.h +++ b/content/base/public/nsContentErrors.h @@ -91,8 +91,4 @@ #define NS_ERROR_CSP_FRAME_ANCESTOR_VIOLATION \ NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, 99) -/* Error codes for XBL */ -#define NS_ERROR_XBL_BLOCKED \ - NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_CONTENT, 15) - #endif // nsContentErrors_h___ diff --git a/content/xbl/src/nsXBLService.cpp b/content/xbl/src/nsXBLService.cpp index 84fdd25e3e5..fa7d4d0ad24 100644 --- a/content/xbl/src/nsXBLService.cpp +++ b/content/xbl/src/nsXBLService.cpp @@ -76,7 +76,6 @@ #include "nsIDOM3Node.h" #include "nsContentPolicyUtils.h" #include "nsTArray.h" -#include "nsContentErrors.h" #include "nsIPresShell.h" #include "nsIDocumentObserver.h" @@ -1108,7 +1107,7 @@ nsXBLService::LoadBindingDocumentInfo(nsIContent* aBoundElement, gAllowDataURIs, nsIContentPolicy::TYPE_XBL, aBoundDocument); - NS_ENSURE_SUCCESS(rv, NS_ERROR_XBL_BLOCKED); + NS_ENSURE_SUCCESS(rv, rv); if (!IsSystemOrChromeURLPrincipal(aOriginPrincipal)) { // Also make sure that we're same-origin with the bound document @@ -1117,12 +1116,12 @@ nsXBLService::LoadBindingDocumentInfo(nsIContent* aBoundElement, !SchemeIs(aBindingURI, "chrome")) { rv = aBoundDocument->NodePrincipal()->CheckMayLoad(aBindingURI, PR_TRUE); - NS_ENSURE_SUCCESS(rv, NS_ERROR_XBL_BLOCKED); + NS_ENSURE_SUCCESS(rv, rv); } // Finally check if this document is allowed to use XBL at all. NS_ENSURE_TRUE(aBoundDocument->AllowXULXBL(), - NS_ERROR_XBL_BLOCKED); + NS_ERROR_NOT_AVAILABLE); } } diff --git a/content/xbl/test/Makefile.in b/content/xbl/test/Makefile.in index b791a2e7a60..b770b67eb28 100644 --- a/content/xbl/test/Makefile.in +++ b/content/xbl/test/Makefile.in @@ -72,9 +72,6 @@ _TEST_FILES = \ file_bug481558.xbl \ test_bug526178.xhtml \ test_bug542406.xhtml \ - test_bug591198.html \ - file_bug591198_xbl.xml \ - file_bug591198_inner.html \ $(NULL) libs:: $(_TEST_FILES) diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index a3247bc7bc5..06c2033aafa 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -2341,7 +2341,7 @@ nsCSSFrameConstructor::ConstructDocElementFrame(Element* aDocEle display->mBinding->mOriginPrincipal, PR_FALSE, getter_AddRefs(binding), &resolveStyle); - if (NS_FAILED(rv) && rv != NS_ERROR_XBL_BLOCKED) + if (NS_FAILED(rv)) return NS_OK; // Binding will load asynchronously. if (binding) { @@ -2349,12 +2349,12 @@ nsCSSFrameConstructor::ConstructDocElementFrame(Element* aDocEle // after all of its kids' constructors. So tell the binding // manager about it right now. mDocument->BindingManager()->AddToAttachedQueue(binding); + } - if (resolveStyle) { - styleContext = mPresShell->StyleSet()->ResolveStyleFor(aDocElement, - nsnull); - display = styleContext->GetStyleDisplay(); - } + if (resolveStyle) { + styleContext = mPresShell->StyleSet()->ResolveStyleFor(aDocElement, + nsnull); + display = styleContext->GetStyleDisplay(); } } @@ -5095,22 +5095,22 @@ nsCSSFrameConstructor::AddFrameConstructionItemsInternal(nsFrameConstructorState PR_FALSE, getter_AddRefs(newPendingBinding->mBinding), &resolveStyle); - if (NS_FAILED(rv) && rv != NS_ERROR_XBL_BLOCKED) + if (NS_FAILED(rv)) return; if (newPendingBinding->mBinding) { pendingBinding = newPendingBinding; // aState takes over owning newPendingBinding aState.AddPendingBinding(newPendingBinding.forget()); - - if (resolveStyle) { - styleContext = ResolveStyleContext(styleContext->GetParent(), aContent); - display = styleContext->GetStyleDisplay(); - aStyleContext = styleContext; - } - - aTag = mDocument->BindingManager()->ResolveTag(aContent, &aNameSpaceID); } + + if (resolveStyle) { + styleContext = ResolveStyleContext(styleContext->GetParent(), aContent); + display = styleContext->GetStyleDisplay(); + aStyleContext = styleContext; + } + + aTag = mDocument->BindingManager()->ResolveTag(aContent, &aNameSpaceID); } PRBool isGeneratedContent = ((aFlags & ITEM_IS_GENERATED_CONTENT) != 0);