Bug 8223 - WebKit fails to update style on element via DOM when value contains !important
Summary: WebKit fails to update style on element via DOM when value contains !important
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://imajes.info/webkit-bug.html
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-06 17:14 PDT by James Cox
Modified: 2011-12-07 11:35 PST (History)
2 users (show)

See Also:


Attachments
reduced cast (861 bytes, text/html)
2006-04-06 17:14 PDT, James Cox
no flags Details
First attempt (2.87 KB, patch)
2006-05-26 14:17 PDT, Rob Buis
no flags Details | Formatted Diff | Diff
Now with testcase (4.49 KB, patch)
2006-05-28 07:32 PDT, Rob Buis
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Cox 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
Comment 1 James Cox 2006-04-06 17:14:56 PDT
Created attachment 7548 [details]
reduced cast
Comment 2 Rob Buis 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.
Comment 3 Rob Buis 2006-05-28 07:32:11 PDT
Created attachment 8577 [details]
Now with testcase

I added a simple, but hopefully correct testcase.
Cheers,

Rob.
Comment 4 Dave Hyatt 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.
Comment 5 Dave Hyatt 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.
Comment 6 Darin Adler 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.
Comment 7 Timothy Hatcher 2006-06-02 17:47:47 PDT
Landed in r14700.
Comment 8 Alexey Proskuryakov 2011-12-07 11:35:33 PST
This will likely be undone in bug 73941.