Closed
Bug 79818
Opened 24 years ago
Closed 24 years ago
CSSNameSpaceRuleImpl and othes in nsCSSRules.cpp do not implement nsIDOMCSSRule
Categories
(Core :: DOM: CSS Object Model, defect)
Core
DOM: CSS Object Model
Tracking
()
RESOLVED
FIXED
People
(Reporter: bzbarsky, Assigned: jst)
References
Details
Attachments
(5 files)
(deleted),
text/html
|
Details | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review |
BUILD: 2001-05-09-08
We throw an exception if we try to use item() on the rule list of a stylesheet
to get a namespace declaration. Same for media rules.
Reporter | ||
Comment 1•24 years ago
|
||
OK. I have a patch for this. It works fine ... from chrome. When I try to use
.item() to get the rules from a CSSRuleList from JS in a webpage, I get:
JavaScript error:
line 0: uncaught exception: Permission denied to create wrapper for object
Looks like xpcdom trouble there.. not really sure how to fix it. Ccing Mitch.
Attaching testcase to test on and patch that implements the nsIDOMCSSRule
interface for all the various rules.
Reporter | ||
Comment 2•24 years ago
|
||
Reporter | ||
Comment 3•24 years ago
|
||
Assignee | ||
Comment 4•24 years ago
|
||
Hey, a patch, great! Here's a few comments:
In ::GetParentStyleSheet() (in all classes), change:
+ if (nsnull != mSheet) {
+ return mSheet->QueryInterface(NS_GET_IID(nsIDOMCSSStyleSheet), (void**)aSheet);
+ }
+ *aSheet = nsnull;
+ return NS_OK;
to:
+ if (mSheet) {
+ return CallQueryInterInterface(mSheet, aSheet);
+ }
+ *aSheet = nsnull;
+ return NS_OK;
Other than that the patch looks great! You wanna add classinfo to these classes
too? :-)
Assignee | ||
Comment 5•24 years ago
|
||
Adding classinfo would make these classes accessable from web content too, not
only from chrome. (look for NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO).
Reporter | ||
Comment 6•24 years ago
|
||
Reporter | ||
Comment 7•24 years ago
|
||
The new patch addresses jst's ::GetParentStyleSheet() comment, adds classinfo to
all the classes, and works from web content and chrome both. Reviews?
Assignee | ||
Comment 8•24 years ago
|
||
I still see:
if (nsnull != mSheet) {
...
in stead of simply:
if (mSheet) {
...
but I can live with that, change it if you want to :-)
sr=jst, great job!
Reporter | ||
Comment 9•24 years ago
|
||
Reporter | ||
Comment 10•24 years ago
|
||
Patch without the compares to nsnull attached. ccing jband for r=
Reporter | ||
Comment 11•24 years ago
|
||
Assignee | ||
Comment 12•24 years ago
|
||
Fix checked in, thanks for all the great work, Boris!
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 13•24 years ago
|
||
tweaking summary slightly to reflect what was actually implemented. Changing
nsIDOMCSSSTyleRule to nsIDOMCSSRule
Summary: CSSNameSpaceRuleImpl and othes in nsCSSRules.cpp do not implement nsIDOMCSSStyleRule → CSSNameSpaceRuleImpl and othes in nsCSSRules.cpp do not implement nsIDOMCSSRule
Reporter | ||
Comment 14•23 years ago
|
||
*** Bug 31059 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•