Summary: | CSS3 content:inherit doesn't work | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Anantha Keesara <anantha> | ||||
Component: | CSS | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | NEW --- | ||||||
Severity: | Normal | CC: | ahmad.saleem792, ap, bfulgham, emacemac7, emilio, hyatt, mitz, nicholas, rniwa, robert, simon.fraser, webkit-bug-importer, zalan | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
URL: | http://www.hixie.ch/tests/adhoc/css/inheritance/content/001.xml | ||||||
Attachments: |
|
Description
Anantha Keesara
2008-04-18 10:42:14 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. I have a partial patch. And no, it's not a single line tweak. ;) 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 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.
(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. 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. I am able to reproduce this bug in Safari Technology Preview 152 and Chrome Canary 107 using test case from URL and it does not show "PASSED" but in case of Firefox Nightly 106, it does show "PASSED" in green text. Thanks! |