WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
5153
deleteRule and insertRule do not work
https://bugs.webkit.org/show_bug.cgi?id=5153
Summary
deleteRule and insertRule do not work
Mihai Parparita
Reported
2005-09-27 11:15:06 PDT
The linked URL is a simple test case for inserting and deleting rules from a stylesheet object. Expected behavior (as observed in Firefox): - clicking on the "x.deleteRule(0)" link causes the red text to become purple - clicking on the "x.insertRule..." link causes the text to have a black border Observed behavior (as observed in Safari 312.3): - No visible changes occur (and no errors are reported in the JavaScript console)
Attachments
Fix
(11.38 KB, patch)
2006-01-12 09:09 PST
,
Anders Carlsson
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2006-01-03 16:02:48 PST
***
Bug 5511
has been marked as a duplicate of this bug. ***
Anders Carlsson
Comment 2
2006-01-12 09:09:31 PST
Created
attachment 5620
[details]
Fix
Darin Adler
Comment 3
2006-01-12 09:34:25 PST
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.
Anders Carlsson
Comment 4
2006-01-12 09:53:45 PST
(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. >
Anders Carlsson
Comment 5
2006-01-12 09:54:17 PST
Comment on
attachment 5620
[details]
Fix I'll mark it as ? again
Darin Adler
Comment 6
2006-01-12 10:21:54 PST
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.
Anders Carlsson
Comment 7
2006-01-12 13:46:52 PST
(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.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug