From kde-commits Sat Oct 06 23:38:28 2007 From: Germain Garand Date: Sat, 06 Oct 2007 23:38:28 +0000 To: kde-commits Subject: KDE/kdelibs/khtml/css Message-Id: <1191713908.668434.15346.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=119171391528162 SVN commit 722238 by ggarand: - rgb->rgba - patch by David Hyatt WC/#13103/r20570/ "getPropertyValue() returns null when element has display: none (affects Technorati.com)" M +7 -2 css_renderstyledeclarationimpl.cpp M +1 -1 cssparser.cpp --- trunk/KDE/kdelibs/khtml/css/css_renderstyledeclarationimpl.cpp #722237:722238 @@ -270,7 +270,7 @@ static CSSPrimitiveValueImpl* valueForColor(QColor color) { if (color.isValid()) - return new CSSPrimitiveValueImpl(color.rgb());//### KDE4: use rgba! + return new CSSPrimitiveValueImpl(color.rgba()); else return new CSSPrimitiveValueImpl(khtml::transparentColor); } @@ -374,8 +374,13 @@ } RenderObject *renderer = m_node->renderer(); - if (!renderer) + if (!renderer) { + // Handle display:none at the very least. By definition if we don't have a renderer + // we are considered to have no display. + if (propertyID == CSS_PROP_DISPLAY) + return new CSSPrimitiveValueImpl(CSS_VAL_NONE); return 0; + } RenderStyle *style = renderer->style(); if (!style) return 0; --- trunk/KDE/kdelibs/khtml/css/cssparser.cpp #722237:722238 @@ -2056,7 +2056,7 @@ QColor tc; tc.setNamedColor(name.toLower()); if ( tc.isValid() ) { - rgb = tc.rgb(); + rgb = tc.rgba(); return true; } }