Bug 28282
Summary: | CSSMutableStyleDeclaration::setProperty does not parse color property | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> |
Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | abecsi, kling |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | All |
Ryosuke Niwa
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]
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |