Bug 8223

Summary: WebKit fails to update style on element via DOM when value contains !important
Product: WebKit Reporter: James Cox <james>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, hyatt
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
URL: http://imajes.info/webkit-bug.html
Attachments:
Description Flags
reduced cast
none
First attempt
none
Now with testcase hyatt: review+

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.