[webkit-reviews] review granted: [Bug 75434] getComputedStyle should return shorthands properties with the minimum number of sides possible. : [Attachment 120873] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 3 10:14:05 PST 2012


Tony Chang <tony at chromium.org> has granted Alexis Menard
<alexis.menard at openbossa.org>'s request for review:
Bug 75434: getComputedStyle should return shorthands properties with the
minimum number of sides possible.
https://bugs.webkit.org/show_bug.cgi?id=75434

Attachment 120873: Patch
https://bugs.webkit.org/attachment.cgi?id=120873&action=review

------- Additional Comments from Tony Chang <tony at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=120873&action=review


> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:2419
> +PassRefPtr<CSSValueList>
CSSComputedStyleDeclaration::getCSSProperty4ValuesForShorthandProperties(const
int* properties) const
> +{
> +    RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
> +    // Assume the properties are in the usual order top, right, bottom,
left.

I would try to make the name more clear that this function is for properties
that apply to each direction/side.  For example,
getCSSPropertyValuesForSidesShorthand or something.

>
LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-width-expected.tx
t:24
> +PASS computedStyle.getPropertyCSSValue('border-width').cssText is '10px 0px
0px'

In a follow up patch, maybe we should change 0px to 0 since the unit identifier
is optional on zero length units.
http://www.w3.org/TR/css3-values/#length-value


More information about the webkit-reviews mailing list