Bug 386475 - Should not flush when resolving em and ex units. r=tor,sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@229416 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
8eebb046a9
commit
2db0e271c8
@ -77,11 +77,9 @@
|
||||
#include "gfxMatrix.h"
|
||||
#include "gfxRect.h"
|
||||
#include "gfxImageSurface.h"
|
||||
#include "gfxMatrix.h"
|
||||
#include "nsStubMutationObserver.h"
|
||||
#include "gfxPlatform.h"
|
||||
#include "nsSVGForeignObjectFrame.h"
|
||||
#include "nsInspectorCSSUtils.h"
|
||||
#include "nsIFontMetrics.h"
|
||||
|
||||
class nsSVGPropertyBase : public nsStubMutationObserver {
|
||||
@ -487,20 +485,15 @@ nsSVGUtils::GetContextForContent(nsIContent* aContent)
|
||||
const nsStyleFont*
|
||||
nsSVGUtils::GetStyleFontForContent(nsIContent* aContent)
|
||||
{
|
||||
|
||||
nsIDocument *doc = aContent->GetCurrentDoc();
|
||||
|
||||
if (doc) {
|
||||
nsIPresShell *presShell = doc->GetPrimaryShell();
|
||||
if (presShell) {
|
||||
nsRefPtr<nsStyleContext> styleContext =
|
||||
nsInspectorCSSUtils::GetStyleContextForContent(aContent, nsnull,
|
||||
presShell);
|
||||
if (styleContext)
|
||||
return styleContext->GetStyleFont();
|
||||
nsIFrame* frame = nsGenericElement::GetPrimaryFrameFor(aContent, doc);
|
||||
if (frame) {
|
||||
return frame->GetStyleContext()->GetStyleFont();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user