mStyleData->SetCRC32();
nsresult StyleContextImpl::ShareStyleData(void){  nsresult result = NS_OK;  // Enable flag: this is TRUE by default, however the env. var. moz_disable_style_sharing  // can be set to '1' to disable the sharing before the app is launched  static char *disableSharing = PR_GetEnv("moz_disable_style_sharing");  static PRBool bEnableSharing = (disableSharing == nsnull) ||                                  (*disableSharing != '1');#ifdef DEBUG  static PRBool bOnce = PR_FALSE;  if(!bOnce){    printf( "Style Data Sharing is %s\n", bEnableSharing ? "Enabled :)" : "Disabled :(" );    bOnce = PR_TRUE;  }#endif  PRBool bSharingSupported = PR_TRUE;  if (bEnableSharing) {    // NOTE: sharing of style data for the GfxScrollFrame is problematic    //       and is currently disabled. These pseudos indicate the use of a GfxScrollFrame    //       so we check for them and disallow sharing when any are found.    //       If you haen;t guessed it, this is a total hack until we can figure out    //       why the GfxScrollFrame is not happy having its style data shared...     //       (See bugzilla bug 39618 which also documents this problem)    if(mPseudoTag) {      if(mPseudoTag == nsLayoutAtoms::viewportPseudo ||         mPseudoTag == nsLayoutAtoms::canvasPseudo ||         mPseudoTag == nsLayoutAtoms::viewportScrollPseudo ||         mPseudoTag == nsLayoutAtoms::scrolledContentPseudo ||         mPseudoTag == nsLayoutAtoms::selectScrolledContentPseudo) {        bSharingSupported = PR_FALSE;      } else {        bSharingSupported = PR_TRUE;      }    }  }  if (bEnableSharing && bSharingSupported) {    // set the CRC    mStyleData->SetCRC32();    NS_ASSERTION(mStyleSet, "Expected to have a style set ref...");    nsIStyleContext *matchingSC = nsnull;    // check if there is a matching context...    result = mStyleSet->FindMatchingContext(this, &matchingSC);    if ((NS_SUCCEEDED(result)) &&         (nsnull != matchingSC)) {      ShareStyleDataFrom(matchingSC);#ifdef NOISY_DEBUG      printf("SC Data Shared :)\n");#endif      NS_IF_RELEASE(matchingSC);    } else {#ifdef NOISY_DEBUG      printf("Unique SC Data - Not Shared :(\n");#endif    }  }  return result;}