Bug 18584 - css border-color: inherit doesn't work in Safari
Summary: css border-color: inherit doesn't work in Safari
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL: http://www.hixie.ch/tests/adhoc/css/i...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-18 09:41 PDT by Anantha Keesara
Modified: 2008-04-22 20:57 PDT (History)
2 users (show)

See Also:


Attachments
patch (10.43 KB, patch)
2008-04-19 13:55 PDT, Anatoli Papirovski
hyatt: review+
Details | Formatted Diff | Diff
patch (updated) (30.86 KB, patch)
2008-04-20 08:09 PDT, Anatoli Papirovski
no flags Details | Formatted Diff | Diff
patch (updated 2) (32.83 KB, patch)
2008-04-21 08:10 PDT, Anatoli Papirovski
mitz: review+
Details | Formatted Diff | Diff

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