Summary: | deleteRule and insertRule do not work | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Mihai Parparita <mihaip> | ||||
Component: | CSS | Assignee: | Anders Carlsson <andersca> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | sebastienboisvert | ||||
Priority: | P2 | ||||||
Version: | 312.x | ||||||
Hardware: | Mac | ||||||
OS: | OS X 10.3 | ||||||
URL: | http://www.quirksmode.org/dom/tests/stylesheet_change.html | ||||||
Attachments: |
|
Description
Mihai Parparita
2005-09-27 11:15:06 PDT
*** Bug 5511 has been marked as a duplicate of this bug. *** Created attachment 5620 [details]
Fix
Comment on attachment 5620 [details]
Fix
+ removeRule DOMCSSStyleSheet::RemoveRule DontDelete|Function 0
Number of parameters here should be 1, not 0.
This patch makes two fixes. One is about updating the disabled flag on style
sheets. That fix has no layout test. I think that fix should be landed
separately, but it might be OK to land them together if there was a test for
it.
Otherwise, looks great.
(In reply to comment #3) > (From update of attachment 5620 [details] [edit]) > + removeRule DOMCSSStyleSheet::RemoveRule DontDelete|Function 0 > > Number of parameters here should be 1, not 0. > Isn't the number the minimum required number? The MSDN documentation on removeRule says: iIndex Optional. Integer that specifies the index value of the rule to be deleted from the style sheet. If an index is not provided, the first rule in the rules collection is removed. > This patch makes two fixes. One is about updating the disabled flag on style > sheets. That fix has no layout test. I think that fix should be landed > separately, but it might be OK to land them together if there was a test for > it. It actually has a test: var s3 = document.getElementById('style3').sheet; s3.disabled = true; > > Otherwise, looks great. > Comment on attachment 5620 [details]
Fix
I'll mark it as ? again
Comment on attachment 5620 [details]
Fix
I still think the number of parameters for removeRule is wrong; we have to
check with WinIE. This patch is otherwise great.
I think I'll mark this review+ and let Anders investigate that one last part.
(In reply to comment #6) > (From update of attachment 5620 [details] [edit]) > I still think the number of parameters for removeRule is wrong; we have to > check with WinIE. This patch is otherwise great. > > I think I'll mark this review+ and let Anders investigate that one last part. > Apparently WinIE doesn't have a length property on the removeRule function. I changed it to 1 and landed the patch. |