Bug 18587 - CSS3 content:inherit doesn't work
Summary: CSS3 content:inherit doesn't work
Status: NEW
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 10:42 PDT by Anantha Keesara
Modified: 2017-09-27 11:25 PDT (History)
6 users (show)

See Also:


Attachments
First pass at content: inherit (18.85 KB, patch)
2008-04-23 00:17 PDT, Eric Seidel (no email)
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 10:42:14 PDT
Steps –
Go to the URL http://www.hixie.ch/tests/adhoc/css/inheritance/content/001.xml

Issue - Test can not displayed " PASSES" Which is CSS inherited.

Expected - IT should display "PASSED".

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


Nightly tested: r31446
Comment 1 Eric Seidel (no email) 2008-04-18 10:54:05 PDT
Wow.  That's wild that you can inherit CSS generated content.  I imagine this isn't hard to fix.  Probably just a single line tweak to CSSStyleSelector.
Comment 2 Anantha Keesara 2008-04-18 11:23:09 PDT
one more tese: http://www.hixie.ch/tests/adhoc/css/inheritance/content/002.xml
Comment 3 Eric Seidel (no email) 2008-04-22 01:22:08 PDT
I have a partial patch.  And no, it's not a single line tweak. ;)
Comment 4 Eric Seidel (no email) 2008-04-23 00:17:28 PDT
Created attachment 20764 [details]
First pass at content: inherit

 LayoutTests/ChangeLog                              |   11 +++
 LayoutTests/hixie/README                           |    3 +
 .../hixie/adhoc/css/inheritance/content/001.xml    |   15 +++++
 .../hixie/adhoc/css/inheritance/content/002.xml    |   18 ++++++
 WebCore/ChangeLog                                  |   34 ++++++++++
 WebCore/css/CSSStyleSelector.cpp                   |   12 +---
 WebCore/html/HTMLBRElement.cpp                     |    2 +-
 WebCore/html/HTMLFrameSetElement.cpp               |    4 +-
 WebCore/html/HTMLImageElement.cpp                  |    2 +-
 WebCore/html/HTMLLegendElement.cpp                 |    2 +-
 WebCore/rendering/RenderContainer.cpp              |    2 +-
 WebCore/rendering/RenderObject.cpp                 |    2 +-
 WebCore/rendering/RenderStyle.cpp                  |   65 ++++++++++++++++----
 WebCore/rendering/RenderStyle.h                    |   18 ++++--
 14 files changed, 157 insertions(+), 33 deletions(-)
Comment 5 mitz 2008-04-28 16:09:54 PDT
Comment on attachment 20764 [details]
First pass at content: inherit

Unless I'm missing something:
1) This patch will make 'content' inherit by default.
2) 'content' should not inherit by default (i.e. only when 'content: inherit' is specified).

Flip back to r? if I got this wrong.
Comment 6 mitz 2008-04-28 16:16:44 PDT
(In reply to comment #5)
> Flip back to r? if I got this wrong.

Actually don't flip back to r? since the patch is also missing -expected.txt files.
Comment 7 Nicholas Wilson 2010-04-12 10:08:49 PDT
Please, do not commit this. It is a big mistake in behaviour.

CSS3 Generated Content is in a very incomplete form, with a lot missing. CSS2 GenCon has reasonably consistent implementations of the core features across browsers, but many, many differences as well.

In short, regarding CSS2: this patch is a regression on CSS2 compliance, which we are still a little way from in the details and proper handling of corner cases. FF and others are similarly patchy in CSS2 GenCon, so do not copy them if unsure about behaviour.

Regarding CSS3: the spec is rough, with lots of holes. It is changing rapidly. The test case by Hixie was last updated in 2001, and since then CSS3 has had content inherit removed entirely.

Could close as dup of bug 13097 anyway.