Bug 38442

Summary: Assignment to style.border causes border-style and border-color duplication
Product: WebKit Reporter: Scott Andrews <andrewss>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: UNCONFIRMED ---    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.6   
Attachments:
Description Flags
test case none

Description Scott Andrews 2010-05-02 15:54:54 PDT
When an element's style.border is set to "0", the border-style and border-color attributes are set implicitly.  Repeatedly calling style.border = "0" causes the implicitly border styles to be added to the element again, instead of updating the existing value.

For example, after setting border.style = "0" twice.  The value of the style attribute is:
border-style: initial; border-color: initial; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial;

The border-style and border-color attributes are listed twice, and will be listed again every time the style.border value is set.

A test case is attached.  This behavior is visible on Safari 4.0.5 and Chrome 5.0.342.9 beta on Mac OS 10.5 and 10.6
Comment 1 Scott Andrews 2010-05-02 15:56:11 PDT
Created attachment 54891 [details]
test case