Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Protected Attributes
nsCSSValue::Image Struct Reference

#include <nsCSSValue.h>

Inheritance diagram for nsCSSValue::Image:
Inheritance graph
Collaboration diagram for nsCSSValue::Image:
Collaboration graph

List of all members.

Public Member Functions

 Image (nsIURI *aURI, const PRUnichar *aString, nsIURI *aReferrer, nsIDocument *aDocument, PRBool aIsBGImage=PR_FALSE) NS_HIDDEN
 ~Image () NS_HIDDEN
void AddRef ()
void Release ()
PRBool operator== (const URL &aOther)

Public Attributes

nsCOMPtr< imgIRequestmRequest
nsCOMPtr< nsIURImReferrer

Protected Attributes

nsrefcnt mRefCnt

Detailed Description

Definition at line 435 of file nsCSSValue.h.

Constructor & Destructor Documentation

nsCSSValue::Image::Image ( nsIURI aURI,
const PRUnichar aString,
nsIURI aReferrer,
nsIDocument aDocument,
PRBool  aIsBGImage = PR_FALSE 

Definition at line 369 of file nsCSSValue.cpp.

  : URL(aURI, aString, aReferrer)

  // Check for failed mString allocation first
  if (!mString)

  // If the pref is enabled, force all background image loads to
  // complete before firing onload for the document.  Otherwise, background
  // image loads are special and don't block onload.
  PRInt32 loadFlag = (PRInt32)nsIRequest::LOAD_NORMAL;
  if (aIsBGImage) {
    static PRBool onloadAfterImageBackgroundLoads =
    if (!onloadAfterImageBackgroundLoads) {
      loadFlag = (PRInt32)nsIRequest::LOAD_BACKGROUND;

  if (mURI &&
      nsContentUtils::CanLoadImage(mURI, aDocument, aDocument)) {
    nsContentUtils::LoadImage(mURI, aDocument, aReferrer, nsnull,

Here is the call graph for this function:

Definition at line 401 of file nsCSSValue.cpp.

Member Function Documentation

Reimplemented from nsCSSValue::URL.

Definition at line 448 of file nsCSSValue.h.

{ ++mRefCnt; }
PRBool nsCSSValue::URL::operator== ( const URL aOther) [inline, inherited]

Definition at line 413 of file nsCSSValue.h.

      PRBool eq;
      return nsCRT::strcmp(mString, aOther.mString) == 0 &&
             (mURI == aOther.mURI || // handles null == null
              (mURI && aOther.mURI &&
               NS_SUCCEEDED(mURI->Equals(aOther.mURI, &eq)) &&

Reimplemented from nsCSSValue::URL.

Definition at line 449 of file nsCSSValue.h.

{ if (--mRefCnt == 0) delete this; }

Member Data Documentation

nsrefcnt nsCSSValue::URL::mRefCnt [protected, inherited]

Definition at line 430 of file nsCSSValue.h.

Definition at line 425 of file nsCSSValue.h.

Definition at line 445 of file nsCSSValue.h.

Definition at line 424 of file nsCSSValue.h.

Definition at line 423 of file nsCSSValue.h.

The documentation for this struct was generated from the following files: