[Webkit-unassigned] [Bug 60609] Implement CSSPropertyMargin and CSSPropertyPadding in CSSStyleApplyProperty.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 11 18:49:25 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=60609





--- Comment #6 from Luke Macpherson <macpherson at chromium.org>  2011-05-11 18:49:25 PST ---
(In reply to comment #5)
> For reference, http://www.w3.org/TR/CSS21/box.html#propdef-padding says
> "Initial:      see individual properties"

It appears that because of the way these values are used, Length(AUTO) and Length(FIXED) are treated equivalently.

for example:
int RenderBoxModelObject::paddingLeft(bool) const
{
    int w = 0;
    Length padding = style()->paddingLeft();
    if (padding.isPercent())
        w = containingBlock()->availableLogicalWidth();
    return padding.calcMinValue(w);
}

Will return 0 for both. Using AUTO in RenderStyle means that we are depending on the w=0 above for correct behavior. RenderStyle would better reflect the CSS spec by using RenderStyle::initialPadding() for its initial value.

FYI, this is passing DRT and pixel tests for me, and I count 949 uses of "padding:" under LayoutTests/fast, so we already have good coverage there.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list