Bug 38442 - Assignment to style.border causes border-style and border-color duplication
Summary: Assignment to style.border causes border-style and border-color duplication
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.6
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-02 15:54 PDT by Scott Andrews
Modified: 2010-05-02 15:56 PDT (History)
0 users

See Also:


Attachments
test case (911 bytes, text/html)
2010-05-02 15:56 PDT, Scott Andrews
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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