RESOLVED FIXED 8223
WebKit fails to update style on element via DOM when value contains !important
https://bugs.webkit.org/show_bug.cgi?id=8223
Summary WebKit fails to update style on element via DOM when value contains !important
James Cox
Reported 2006-04-06 17:14:12 PDT
Element style set via CSS, and later adapted via a JS DOM call to the style attribute (margin). The update does not take place and the element is not redrawn. Works as expected on ie 6 / ffox
Attachments
reduced cast (861 bytes, text/html)
2006-04-06 17:14 PDT, James Cox
no flags
First attempt (2.87 KB, patch)
2006-05-26 14:17 PDT, Rob Buis
no flags
Now with testcase (4.49 KB, patch)
2006-05-28 07:32 PDT, Rob Buis
hyatt: review+
James Cox
Comment 1 2006-04-06 17:14:56 PDT
Created attachment 7548 [details] reduced cast
Rob Buis
Comment 2 2006-05-26 14:17:27 PDT
Created attachment 8559 [details] First attempt This patch fixes the problem with !important parsing. I can make a testcase if the code gets okayed. Cheers, Rob.
Rob Buis
Comment 3 2006-05-28 07:32:11 PDT
Created attachment 8577 [details] Now with testcase I added a simple, but hopefully correct testcase. Cheers, Rob.
Dave Hyatt
Comment 4 2006-05-31 00:22:41 PDT
Comment on attachment 8577 [details] Now with testcase The Obj-C bindings need fixing too. They all have the same bug (repeated over and over again). - (void)setBackgroundRepeat:(NSString *)backgroundRepeat { [self setProperty:@"background-repeat" :backgroundRepeat :@""]; } The empty string is passed for priority. You need to make an Obj-C method for your new setProperty call and then change all the callers to use that instead.
Dave Hyatt
Comment 5 2006-05-31 00:25:32 PDT
Comment on attachment 8577 [details] Now with testcase I changed my mind. These CSS bindings in Obj-C are horribly broken anyway, including properties we don't even support in the engine and leaving out ones that we do. I think this issue should just be punted until auto-generation can fix it for us.
Darin Adler
Comment 6 2006-06-02 09:51:03 PDT
(In reply to comment #5) > These CSS bindings in Obj-C are horribly broken anyway, > including properties we don't even support in the engine and leaving out ones > that we do. The list of methods to set CSS properties comes from the DOM specification verbatim. It was not intended to match the list of properties we support. On the other hand, maybe that should change.
Timothy Hatcher
Comment 7 2006-06-02 17:47:47 PDT
Landed in r14700.
Alexey Proskuryakov
Comment 8 2011-12-07 11:35:33 PST
This will likely be undone in bug 73941.
Note You need to log in before you can comment on or make changes to this bug.