Bug 28282 - CSSMutableStyleDeclaration::setProperty does not parse color property
Summary: CSSMutableStyleDeclaration::setProperty does not parse color property
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-13 14:36 PDT by Ryosuke Niwa
Modified: 2011-05-22 23:03 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2009-08-13 14:36:19 PDT
CSSMutableStyleDeclaration::setProperty does not parse CSSPropertyColor property.  e.g. in /editing/execCommand/modifyForeColorByCharacter.html, we add green color but parsed color has the RGBA32 value 0.  Put a break point in executeApplyStyle (109 @ editing/EditorCommand.cpp).

Inserting the following code would reveal this behavior:
    RefPtr<CSSValue> value = style->getPropertyCSSValue(propertyID);
    ASSERT(value->isPrimitiveValue());
    CSSPrimitiveValue* pvalue = static_cast<CSSPrimitiveValue*>(value.get());
    fprintf(stderr, "rgba32[%x] cssText[%s]\n", pvalue->getRGBA32Value(), pvalue->cssText().ascii().data());

which prints
rgba32[0] cssText[green]