Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions
nsSVGFeatures.cpp File Reference
#include "nsString.h"
#include "nsSVGUtils.h"
#include "nsSVGFeaturesList.h"

Go to the source code of this file.


#define SVG_SUPPORTED_FEATURE(str)   if (lstr.Equals(NS_LITERAL_STRING(str).get())) return PR_TRUE;


PRBool NS_SVG_TestFeature (const nsAString &fstr)
PRBool NS_SVG_TestFeatures (const nsAString &fstr)

Define Documentation

Function Documentation

PRBool NS_SVG_TestFeature ( const nsAString &  fstr)

Definition at line 45 of file nsSVGFeatures.cpp.

  if (!nsSVGUtils::SVGEnabled()) {
    return PR_FALSE;
  nsAutoString lstr(fstr);

#ifdef DEBUG_scooter
  NS_ConvertUTF16toUTF8 feature(lstr);
  printf("NS_SVG_TestFeature: testing for %s\n", feature.get());

#define SVG_SUPPORTED_FEATURE(str) if (lstr.Equals(NS_LITERAL_STRING(str).get())) return PR_TRUE;
#include "nsSVGFeaturesList.h"
  return PR_FALSE;

Here is the call graph for this function:

Here is the caller graph for this function:

PRBool NS_SVG_TestFeatures ( const nsAString &  fstr)

Definition at line 67 of file nsSVGFeatures.cpp.

  nsAutoString lstr(fstr);
  // Get an iterator on the string
  PRInt32 vbegin = 0;
  PRInt32 vlen = lstr.Length();
  while (vbegin < vlen) {
    PRInt32 vend = lstr.FindChar(PRUnichar(' '), vbegin);
    if (vend == kNotFound) {
      vend = vlen;
    if (NS_SVG_TestFeature(Substring(lstr, vbegin, vend-vbegin)) == PR_FALSE) {
      return PR_FALSE;
    vbegin = vend+1;
  return PR_TRUE;

Here is the call graph for this function: