Bug 18584

Summary: css border-color: inherit doesn't work in Safari
Product: WebKit Reporter: Anantha Keesara <anantha>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aroben, mitz
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows XP   
URL: http://www.hixie.ch/tests/adhoc/css/inheritance/border-color/001.html
Attachments:
Description Flags
patch
hyatt: review+
patch (updated)
none
patch (updated 2) mitz: review+

Description Anantha Keesara 2008-04-18 09:41:44 PDT
Steps –
Go to the URL http://www.hixie.ch/tests/adhoc/css/inheritance/border-color/001.html

Issue - There is no green border.

Expected - There line should be in 20px size can easily readable like in Firefox.

Other browsers:
     IE 7 : not OK.
     FF 3.0b4: OK.
     Opera 9.26 Build 8835 :OK.
     Safari 3.1: not OK


Nightly tested: r31446
Comment 1 Anatoli Papirovski 2008-04-19 13:55:22 PDT
Created attachment 20691 [details]
patch

It's bit of a brute-force method, but the only other way is to set border-color for every element within a page and that would require pretty major modifications to the code, can't see any drawback to doing it this way, compared to not doing it at all.

(I'm a little confused about the -expected png image now being integrated in the txt file, but it seems to work fine, so I guess that's just the new way of doing it.)
Comment 2 mitz 2008-04-19 14:13:02 PDT
(In reply to comment #1)
> (I'm a little confused about the -expected png image now being integrated in
> the txt file, but it seems to work fine, so I guess that's just the new way of
> doing it.)

This is due to a recent regression in run-webkit-tests (or DumpRenderTree?). For now, I suggest rolling WebKitTools back to r32023 and generating the results.
Comment 3 mitz 2008-04-19 14:17:55 PDT
Comment on attachment 20691 [details]
patch

+#define HANDLE_INHERIT_COND_WITH_BACKUP(propID, prop, propAlt, Prop) \

I don't know if propAlt is necessary, because I don't think it can ever be anything other than 'color'.
Comment 4 Dave Hyatt 2008-04-19 19:33:37 PDT
Comment on attachment 20691 [details]
patch

r=me
Comment 5 Anatoli Papirovski 2008-04-20 00:02:26 PDT
(In reply to comment #3)
> I don't know if propAlt is necessary, because I don't think it can ever be
> anything other than 'color'.

Well, it was supposed to be re-usable, if ever needed for any other CSS properties. While there's nothing right now, there might be properties in the future that could take advantage of it. Just not a big fan of hardcoding stuff. I assume this is fine, since it was r+ by Dave?

I'll udpate the patch to include the test case in the proper format.
Comment 6 Anatoli Papirovski 2008-04-20 08:09:48 PDT
Created attachment 20697 [details]
patch (updated)

Updated the test case results to have the png and the checksum files.
Comment 7 Anatoli Papirovski 2008-04-21 08:10:47 PDT
Created attachment 20724 [details]
patch (updated 2)

Ok, this is now updated to include outline-color, column-rule-color, -webkit-text-fill-color, and -webkit-text-stroke-color, pert matz's suggestion.
Comment 8 mitz 2008-04-21 09:36:40 PDT
Comment on attachment 20724 [details]
patch (updated 2)

r=me

+        Fix border-color, outline-color, column-color, -webkit-text-stroke-color, and -webkit-text-fill-color inheritance to correctly use parent's color if the parent's corresponding (border, outline, etc.)-color property wasn't set.

The ChangeLog should be hand-wrapped to ~80 columns. Whoever lands the patch should do it.
Comment 9 mitz 2008-04-22 20:57:00 PDT
Landed in <http://trac.webkit.org/projects/webkit/changeset/32421>.