Patch for styleSheets object exposed in xul a doc

RESOLVED FIXED

Status

()

RESOLVED FIXED
18 years ago
15 years ago

People

(Reporter: pete, Assigned: jst)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(6 attachments)

(Reporter)

Description

18 years ago
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
(Reporter)

Comment 1

18 years ago
Created attachment 29484 [details] [diff] [review]
Patch to fix this. Needs review.
(Reporter)

Comment 2

18 years ago
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
(Reporter)

Comment 3

18 years ago
Created attachment 29952 [details]
DIFF
(Reporter)

Comment 4

18 years ago
Johnny can you `sv' this.

Thanks

--pete

Comment 5

18 years ago
Marking NEW so it will get looked at.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: patch, review
Hardware: Other → All
(Reporter)

Comment 6

18 years ago
Created attachment 30421 [details] [diff] [review]
Latest Patch tested on two systems
(Reporter)

Comment 7

18 years ago
Created attachment 30443 [details]
a xul document test case
(Reporter)

Comment 8

18 years ago
Created attachment 30444 [details]
css file used in test case
(Assignee)

Comment 9

18 years ago
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!
(Reporter)

Comment 10

18 years ago
I'll make the changes now and check it in.

Thanks Johnny!

--pete
(Reporter)

Comment 11

18 years ago
Created attachment 30518 [details]
final patch
(Reporter)

Comment 12

18 years ago
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

Comment 13

18 years ago
Marking FIXED.
Status: NEW → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED
(Assignee)

Comment 14

18 years ago
Woo hoo! Thanks Pete!
(Reporter)

Comment 15

18 years ago
Johnny, thank you bro!

;-)

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