diff --git a/content/html/style/src/nsHTMLStyleSheet.cpp b/content/html/style/src/nsHTMLStyleSheet.cpp
index 284169f0972..2a33b017793 100644
--- a/content/html/style/src/nsHTMLStyleSheet.cpp
+++ b/content/html/style/src/nsHTMLStyleSheet.cpp
@@ -1617,8 +1617,7 @@ HTMLStyleSheetImpl::ConstructFrameByTag(nsIPresContext* aPresContext,
nsIHTMLContent *htmlContent;
// Ignore the tag if it's not HTML content
- rv = aContent->QueryInterface(kIHTMLContentIID, (void **)&htmlContent);
- if (NS_SUCCEEDED(rv)) {
+ if (NS_SUCCEEDED(aContent->QueryInterface(kIHTMLContentIID, (void **)&htmlContent))) {
// See if the element is absolutely positioned
const nsStylePosition* position = (const nsStylePosition*)
aStyleContext->GetStyleData(eStyleStruct_Position);
diff --git a/layout/html/style/src/nsHTMLStyleSheet.cpp b/layout/html/style/src/nsHTMLStyleSheet.cpp
index 284169f0972..2a33b017793 100644
--- a/layout/html/style/src/nsHTMLStyleSheet.cpp
+++ b/layout/html/style/src/nsHTMLStyleSheet.cpp
@@ -1617,8 +1617,7 @@ HTMLStyleSheetImpl::ConstructFrameByTag(nsIPresContext* aPresContext,
nsIHTMLContent *htmlContent;
// Ignore the tag if it's not HTML content
- rv = aContent->QueryInterface(kIHTMLContentIID, (void **)&htmlContent);
- if (NS_SUCCEEDED(rv)) {
+ if (NS_SUCCEEDED(aContent->QueryInterface(kIHTMLContentIID, (void **)&htmlContent))) {
// See if the element is absolutely positioned
const nsStylePosition* position = (const nsStylePosition*)
aStyleContext->GetStyleData(eStyleStruct_Position);
diff --git a/layout/style/nsHTMLStyleSheet.cpp b/layout/style/nsHTMLStyleSheet.cpp
index 284169f0972..2a33b017793 100644
--- a/layout/style/nsHTMLStyleSheet.cpp
+++ b/layout/style/nsHTMLStyleSheet.cpp
@@ -1617,8 +1617,7 @@ HTMLStyleSheetImpl::ConstructFrameByTag(nsIPresContext* aPresContext,
nsIHTMLContent *htmlContent;
// Ignore the tag if it's not HTML content
- rv = aContent->QueryInterface(kIHTMLContentIID, (void **)&htmlContent);
- if (NS_SUCCEEDED(rv)) {
+ if (NS_SUCCEEDED(aContent->QueryInterface(kIHTMLContentIID, (void **)&htmlContent))) {
// See if the element is absolutely positioned
const nsStylePosition* position = (const nsStylePosition*)
aStyleContext->GetStyleData(eStyleStruct_Position);