diff --git a/content/html/style/src/nsHTMLStyleSheet.cpp b/content/html/style/src/nsHTMLStyleSheet.cpp
index 9208d40c0a4d..f789a9326286 100644
--- a/content/html/style/src/nsHTMLStyleSheet.cpp
+++ b/content/html/style/src/nsHTMLStyleSheet.cpp
@@ -1804,25 +1804,6 @@ HTMLStyleSheetImpl::ContentRemoved(nsIPresContext* aPresContext,
return rv;
}
-static void
-RemapStyleInTree(nsIPresContext* aPresContext,
- nsIFrame* aFrame)
-{
- nsIStyleContext* sc;
- aFrame->GetStyleContext(nsnull, sc);
- if (nsnull != sc) {
- sc->RemapStyle(aPresContext);
-
- // Update the children too...
- nsIFrame* kid;
- aFrame->FirstChild(kid);
- while (nsnull != kid) {
- RemapStyleInTree(aPresContext, kid);
- kid->GetNextSibling(kid);
- }
- }
-}
-
static void
ApplyStyleChangeToTree(nsIPresContext* aPresContext,
nsIFrame* aFrame)
@@ -1854,13 +1835,7 @@ ApplyStyleChangeToTree(nsIPresContext* aPresContext,
// Update the children too...
nsIFrame* kid;
aFrame->FirstChild(kid);
- if (onlyRemap) {
- while (nsnull != kid) {
- RemapStyleInTree(aPresContext, kid);
- kid->GetNextSibling(kid);
- }
- }
- else {
+ if (PR_FALSE == onlyRemap) { // remap already did children
while (nsnull != kid) {
ApplyStyleChangeToTree(aPresContext, kid);
kid->GetNextSibling(kid);
diff --git a/layout/html/style/src/nsHTMLStyleSheet.cpp b/layout/html/style/src/nsHTMLStyleSheet.cpp
index 9208d40c0a4d..f789a9326286 100644
--- a/layout/html/style/src/nsHTMLStyleSheet.cpp
+++ b/layout/html/style/src/nsHTMLStyleSheet.cpp
@@ -1804,25 +1804,6 @@ HTMLStyleSheetImpl::ContentRemoved(nsIPresContext* aPresContext,
return rv;
}
-static void
-RemapStyleInTree(nsIPresContext* aPresContext,
- nsIFrame* aFrame)
-{
- nsIStyleContext* sc;
- aFrame->GetStyleContext(nsnull, sc);
- if (nsnull != sc) {
- sc->RemapStyle(aPresContext);
-
- // Update the children too...
- nsIFrame* kid;
- aFrame->FirstChild(kid);
- while (nsnull != kid) {
- RemapStyleInTree(aPresContext, kid);
- kid->GetNextSibling(kid);
- }
- }
-}
-
static void
ApplyStyleChangeToTree(nsIPresContext* aPresContext,
nsIFrame* aFrame)
@@ -1854,13 +1835,7 @@ ApplyStyleChangeToTree(nsIPresContext* aPresContext,
// Update the children too...
nsIFrame* kid;
aFrame->FirstChild(kid);
- if (onlyRemap) {
- while (nsnull != kid) {
- RemapStyleInTree(aPresContext, kid);
- kid->GetNextSibling(kid);
- }
- }
- else {
+ if (PR_FALSE == onlyRemap) { // remap already did children
while (nsnull != kid) {
ApplyStyleChangeToTree(aPresContext, kid);
kid->GetNextSibling(kid);
diff --git a/layout/style/nsHTMLStyleSheet.cpp b/layout/style/nsHTMLStyleSheet.cpp
index 9208d40c0a4d..f789a9326286 100644
--- a/layout/style/nsHTMLStyleSheet.cpp
+++ b/layout/style/nsHTMLStyleSheet.cpp
@@ -1804,25 +1804,6 @@ HTMLStyleSheetImpl::ContentRemoved(nsIPresContext* aPresContext,
return rv;
}
-static void
-RemapStyleInTree(nsIPresContext* aPresContext,
- nsIFrame* aFrame)
-{
- nsIStyleContext* sc;
- aFrame->GetStyleContext(nsnull, sc);
- if (nsnull != sc) {
- sc->RemapStyle(aPresContext);
-
- // Update the children too...
- nsIFrame* kid;
- aFrame->FirstChild(kid);
- while (nsnull != kid) {
- RemapStyleInTree(aPresContext, kid);
- kid->GetNextSibling(kid);
- }
- }
-}
-
static void
ApplyStyleChangeToTree(nsIPresContext* aPresContext,
nsIFrame* aFrame)
@@ -1854,13 +1835,7 @@ ApplyStyleChangeToTree(nsIPresContext* aPresContext,
// Update the children too...
nsIFrame* kid;
aFrame->FirstChild(kid);
- if (onlyRemap) {
- while (nsnull != kid) {
- RemapStyleInTree(aPresContext, kid);
- kid->GetNextSibling(kid);
- }
- }
- else {
+ if (PR_FALSE == onlyRemap) { // remap already did children
while (nsnull != kid) {
ApplyStyleChangeToTree(aPresContext, kid);
kid->GetNextSibling(kid);