diff --git a/mozilla/layout/base/src/nsGalleyContext.cpp b/mozilla/layout/base/src/nsGalleyContext.cpp index 64c439dd275..6a14d1ec5df 100644 --- a/mozilla/layout/base/src/nsGalleyContext.cpp +++ b/mozilla/layout/base/src/nsGalleyContext.cpp @@ -36,7 +36,6 @@ GalleyContext::GalleyContext() GalleyContext::~GalleyContext() { - mDeviceContext->FlushFontCache(); } PRBool GalleyContext::IsPaginated() diff --git a/mozilla/layout/forms/nsFormControlFrame.cpp b/mozilla/layout/forms/nsFormControlFrame.cpp index 1cbf788ce71..4998674b5c1 100644 --- a/mozilla/layout/forms/nsFormControlFrame.cpp +++ b/mozilla/layout/forms/nsFormControlFrame.cpp @@ -34,7 +34,6 @@ #include "nsRepository.h" #include "nsGUIEvent.h" #include "nsDOMEvent.h" -#include "nsIFontCache.h" #include "nsIFontMetrics.h" #include "nsIFormControl.h" #include "nsIDeviceContext.h" @@ -587,11 +586,9 @@ nsFormControlFrame::GetTextSize(nsIPresContext& aPresContext, nsFormControlFrame aFrame->GetFont(&aPresContext, font); //printf("\n GetTextSize %s", aString.ToNewCString()); nsIDeviceContext* deviceContext = aPresContext.GetDeviceContext(); - nsIFontCache* fontCache; - deviceContext->GetFontCache(fontCache); nsIFontMetrics* fontMet; - fontCache->GetMetricsFor(font, fontMet); + deviceContext->GetMetricsFor(font, fontMet); fontMet->GetWidth(aString, aSize.width); fontMet->GetHeight(aSize.height); @@ -602,7 +599,6 @@ nsFormControlFrame::GetTextSize(nsIPresContext& aPresContext, nsFormControlFrame fontMet->GetWidth(char2, char2Width); NS_RELEASE(fontMet); - NS_RELEASE(fontCache); NS_RELEASE(deviceContext); return ((char1Width + char2Width) / 2) + 1; diff --git a/mozilla/layout/html/forms/src/nsButtonControlFrame.cpp b/mozilla/layout/html/forms/src/nsButtonControlFrame.cpp index ccdced66095..b4d0cca7609 100644 --- a/mozilla/layout/html/forms/src/nsButtonControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsButtonControlFrame.cpp @@ -35,7 +35,6 @@ #include "nsViewsCID.h" #include "nsWidgetsCID.h" #include "nsIDeviceContext.h" -#include "nsIFontCache.h" #include "nsIFontMetrics.h" #include "nsIFormControl.h" #include "nsIImage.h" diff --git a/mozilla/layout/html/forms/src/nsFormControlFrame.cpp b/mozilla/layout/html/forms/src/nsFormControlFrame.cpp index 1cbf788ce71..4998674b5c1 100644 --- a/mozilla/layout/html/forms/src/nsFormControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFormControlFrame.cpp @@ -34,7 +34,6 @@ #include "nsRepository.h" #include "nsGUIEvent.h" #include "nsDOMEvent.h" -#include "nsIFontCache.h" #include "nsIFontMetrics.h" #include "nsIFormControl.h" #include "nsIDeviceContext.h" @@ -587,11 +586,9 @@ nsFormControlFrame::GetTextSize(nsIPresContext& aPresContext, nsFormControlFrame aFrame->GetFont(&aPresContext, font); //printf("\n GetTextSize %s", aString.ToNewCString()); nsIDeviceContext* deviceContext = aPresContext.GetDeviceContext(); - nsIFontCache* fontCache; - deviceContext->GetFontCache(fontCache); nsIFontMetrics* fontMet; - fontCache->GetMetricsFor(font, fontMet); + deviceContext->GetMetricsFor(font, fontMet); fontMet->GetWidth(aString, aSize.width); fontMet->GetHeight(aSize.height); @@ -602,7 +599,6 @@ nsFormControlFrame::GetTextSize(nsIPresContext& aPresContext, nsFormControlFrame fontMet->GetWidth(char2, char2Width); NS_RELEASE(fontMet); - NS_RELEASE(fontCache); NS_RELEASE(deviceContext); return ((char1Width + char2Width) / 2) + 1;