Bug 47828 - style.border color comparison only returns true if the color is in rgb(r, g, b) format
Summary: style.border color comparison only returns true if the color is in rgb(r, g, ...
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: All Linux
: P2 Major
Assignee: Nobody
URL: http://www.google.co.uk/
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-18 09:34 PDT by Caner Altinbasak
Modified: 2012-05-03 03:52 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Caner Altinbasak 2010-10-18 09:34:27 PDT
This bug can be observed in Origyn Web Browser and Google Chrome on linux.

Open any web page. I'll use "http://www.google.co.uk/".

Open javascript console.

>document.getElementById('hplogo').style.border = '1px solid #d3c7a4'
>"1px solid #d3c7a4"
>document.getElementById('hplogo').style.border == '1px solid #d3c7a4'
>false
>document.getElementById('hplogo').style.border == '1px solid rgb(211, 199, 164)'
>true

if "#" format is used for style.border comparison, the comparison always fails. In firefox and opera both "#" format and rgb format works fine.
Comment 1 Pravin D 2012-05-03 03:52:17 PDT
(In reply to comment #0)
> This bug can be observed in Origyn Web Browser and Google Chrome on linux.
> 
> if "#" format is used for style.border comparison, the comparison always fails. In firefox and opera both "#" format and rgb format works fine.

I don't think they work properly for '#' format on FF and Opera too. 
The results are same as below in FF and Opera.

document.getElementById('hplogo').style.border == '1px solid #d3c7a4'
false

Not sure how '#' format comparison should work though.