Closed Bug 74381 Opened 23 years ago Closed 23 years ago

Patch for styleSheets object exposed in xul a doc

Categories

(Core :: DOM: CSS Object Model, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: pete, Assigned: jst)

Details

Attachments

(6 files)

Hey Johnny, i'm filing this bug to track the patch to expose the styleSheets
object as a property in a xul document.

I need this property to continue development on Chameleon.

As soon as you review and i tighten up the code some, i will post the patch
here.

Thanks

--pete
After this patch is reviewed and checked in, i would really like to clean things
up a bit and get rid of the compiler `index' warnings.

Thanks

--pete
Attached file DIFF
Johnny can you `sv' this.

Thanks

--pete
Marking NEW so it will get looked at.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: patch, review
Hardware: Other → All
Final comments about the diff:

- Don't move the #include "nsDocument.h" in nsDocument.cpp.

- Extra whitespace added at line ~63 in nsDocument.cpp, remove.

- In nsDocument.cpp:

@@ -629,8 +555,10 @@
     NS_RELEASE(mListenerManager);
   }
 
-  NS_IF_RELEASE(mDOMStyleSheets);
   NS_IF_RELEASE(mNameSpaceManager);
+
+
mDOMStyleSheets = nsnull; // Release the stylesheets list.
+

  ^-- tab?

- nsDocument.cpp, line ~740, why rename psindex to psindx? That doesn't shadow
anything, does it?

- nsDocument.cpp:

@@ -751,10 +679,12 @@
   mStyleSheets.Clear();
 
   NS_IF_RELEASE(mListenerManager);
-  NS_IF_RELEASE(mDOMStyleSheets);
 
   NS_IF_RELEASE(mNameSpaceManager);
 
+
mDOMStyleSheets = nsnull; // Release the stylesheets list.
+
+
    ^--- More tabs?

- In nsXULDocument.h:

@@ -70,7 +72,7 @@
 
 class nsIAtom;
 class nsIElementFactory;
-class nsIDOMStyleSheetList;
+class nsDOMStyleSheetList;

There's no need to forward declare nsDOMStyleSheetList here, so removing the
nsIDOMStyleSheetList forward declaration is all you need to do here.

Change that, and check this in! r=pollmann@netscape.com, sr=jst@netscape.com

(You do have checkin rights, right? If not let me know and I'll check this in
for you).

Thanks!
I'll make the changes now and check it in.

Thanks Johnny!

--pete
Attached file final patch
Ok, checked in.

/tmp/cvsNxICG96615: 16 lines, 536 characters.
Checking in base/src/nsDocument.cpp;
/cvsroot/mozilla/content/base/src/nsDocument.cpp,v  <--  nsDocument.cpp
new revision: 3.289; previous revision: 3.288
done
Checking in base/src/nsDocument.h;
/cvsroot/mozilla/content/base/src/nsDocument.h,v  <--  nsDocument.h
new revision: 3.145; previous revision: 3.144
done
Checking in xul/document/src/nsXULDocument.cpp;
/cvsroot/mozilla/content/xul/document/src/nsXULDocument.cpp,v  <-- 
nsXULDocument.cpp
new revision: 1.398; previous revision: 1.397
done
Checking in xul/document/src/nsXULDocument.h;
/cvsroot/mozilla/content/xul/document/src/nsXULDocument.h,v  <-- 
nsXULDocument.h
new revision: 1.93; previous revision: 1.92
done


--pete
Marking FIXED.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Woo hoo! Thanks Pete!
Johnny, thank you bro!

;-)

--pete
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: