Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Functions
nsSVGClipPathFrame.h File Reference
#include "nsSVGDefsFrame.h"
#include "nsLayoutAtoms.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  nsSVGClipPathFrame

Defines

#define NS_SVGCLIPPATHFRAME_CID   {0xb497bbe2, 0x4434, 0x4d96, {0x9c, 0xe8, 0xf2, 0xad, 0xd1, 0x1f, 0x1d, 0x26}}

Typedefs

typedef nsSVGDefsFrame nsSVGClipPathFrameBase

Functions

nsresult NS_GetSVGClipPathFrame (nsSVGClipPathFrame **aResult, nsIURI *aURI, nsIContent *aContent)

Define Documentation

#define NS_SVGCLIPPATHFRAME_CID   {0xb497bbe2, 0x4434, 0x4d96, {0x9c, 0xe8, 0xf2, 0xad, 0xd1, 0x1f, 0x1d, 0x26}}

Definition at line 40 of file nsSVGClipPathFrame.h.


Typedef Documentation

Definition at line 43 of file nsSVGClipPathFrame.h.


Function Documentation

nsresult NS_GetSVGClipPathFrame ( nsSVGClipPathFrame **  aResult,
nsIURI aURI,
nsIContent aContent 
)

Definition at line 100 of file nsSVGClipPathFrame.cpp.

{
  *aResult = nsnull;

  // Get the PresShell
  nsIDocument *myDoc = aContent->GetCurrentDoc();
  if (!myDoc) {
    NS_WARNING("No document for this content!");
    return NS_ERROR_FAILURE;
  }
  nsIPresShell *aPresShell = myDoc->GetShellAt(0);

  // Get the URI Spec
  nsCAutoString uriSpec;
  aURI->GetSpec(uriSpec);

  // Find the referenced frame
  nsIFrame *cpframe;
  if (!NS_SUCCEEDED(nsSVGUtils::GetReferencedFrame(&cpframe, 
                                                   uriSpec, aContent, aPresShell)))
    return NS_ERROR_FAILURE;

  nsIAtom* frameType = cpframe->GetType();
  if (frameType != nsLayoutAtoms::svgClipPathFrame)
    return NS_ERROR_FAILURE;

  *aResult = (nsSVGClipPathFrame *)cpframe;
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function: