Fix for 3481134, shorthand parsing in CSS does not fill in omitted values. The...
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Nov 2003 08:48:16 +0000 (08:48 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Nov 2003 08:48:16 +0000 (08:48 +0000)
commit346b1d4dc9b67ed4f3cd436d263211ebcc6a6723
treeb79ac8b16f896f9f92cfcb959d7d0d9815624fcc
parent8d1380a363b0a209f79bab9d8a6145cdf9d0ea01
Fix for 3481134, shorthand parsing in CSS does not fill in omitted values.  The fix is to implement
the CSS3 'initial' value for all properties (covered by 3481323), and then to fill in the omitted
values with the 'initial' value.

This patch also fixes two bugs in the style system: 3481324, collapsed borders with border-style: none
should always return a width of 0, and 3481322, 'clip' not inheriting properly in CSS when explicit
inheritance is used.

        Reviewed by mjs

        * khtml/css/css_valueimpl.cpp:
        (CSSInitialValueImpl::cssText):
        * khtml/css/css_valueimpl.h:
        (DOM::CSSInitialValueImpl::cssValueType):
        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue):
        (CSSParser::parseShortHand):
        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::applyRule):
        * khtml/css/cssvalues.c:
        (hash_val):
        (findValue):
        * khtml/css/cssvalues.h:
        * khtml/css/cssvalues.in:
        * khtml/dom/css_value.h:
        (DOM::CSSValue::):
        * khtml/rendering/render_style.cpp:
        (StyleBoxData::StyleBoxData):
        (StyleVisualData::StyleVisualData):
        (StyleBackgroundData::StyleBackgroundData):
        (StyleMarqueeData::StyleMarqueeData):
        (StyleFlexibleBoxData::StyleFlexibleBoxData):
        (opacity):
        (StyleInheritedData::StyleInheritedData):
        (RenderStyle::diff):
        * khtml/rendering/render_style.h:
        (khtml::BorderValue::BorderValue):
        (khtml::CollapsedBorderValue::width):
        (khtml::RenderStyle::InheritedFlags::operator==):
        (khtml::RenderStyle::setBitDefaults):
        (khtml::RenderStyle::resetBorderTop):
        (khtml::RenderStyle::resetBorderRight):
        (khtml::RenderStyle::resetBorderBottom):
        (khtml::RenderStyle::resetBorderLeft):
        (khtml::RenderStyle::resetOutline):
        (khtml::RenderStyle::setHasClip):
        (khtml::RenderStyle::resetMargin):
        (khtml::RenderStyle::resetPadding):
        (khtml::RenderStyle::setCursor):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@5461 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
LayoutTests/css1/units/urls-expected.txt
LayoutTests/fast/block/margin-collapse/021-expected.txt
LayoutTests/fast/block/margin-collapse/022-expected.txt
LayoutTests/fast/block/margin-collapse/024-expected.txt
LayoutTests/fast/block/margin-collapse/025-expected.txt
LayoutTests/fast/block/margin-collapse/032-expected.txt
LayoutTests/fast/block/margin-collapse/033-expected.txt
LayoutTests/fast/block/margin-collapse/034-expected.txt
LayoutTests/fast/block/margin-collapse/042-expected.txt
WebCore/ChangeLog-2005-08-23
WebCore/khtml/css/css_valueimpl.cpp
WebCore/khtml/css/css_valueimpl.h
WebCore/khtml/css/cssparser.cpp
WebCore/khtml/css/cssstyleselector.cpp
WebCore/khtml/css/cssvalues.c
WebCore/khtml/css/cssvalues.h
WebCore/khtml/css/cssvalues.in
WebCore/khtml/dom/css_value.h
WebCore/khtml/rendering/render_style.cpp
WebCore/khtml/rendering/render_style.h