[Webkit-unassigned] [Bug 139750] Web Inspector: <body> shows unexpected UserAgent margin styles (one non-implicit, others implicit)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 6 16:32:21 PST 2015


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

--- Comment #6 from Joseph Pecoraro <joepeck at webkit.org> ---
(In reply to comment #4)
> The backend reporting "implicit" is correct here. The only value specified
> specifically is margin-top. The rest are implied from that one value.

I don't think that is true. The User-Agent styles are:

    /* Source/WebCore/css/html.css */
    body {
        display: block;
        margin: 8px
    }

margin-top is no more specified then margin-left or the others. In my opinion they should either all be implicit or not.

I guess I don't understand why WebKit says otherwise:

    var list = document.defaultView.getMatchedCSSRules(document.body);
    var rule = list[2];
    var decl = rule.style;
    rule.cssText; // "body { font-family: Verdana, Arial, Helvetica; font-size: 12px; padding: 0px 5px; margin: 0px; }"
    decl.isPropertyImplicit("margin"); // false
    decl.isPropertyImplicit("margin-top") // false
    decl.isPropertyImplicit("margin-left") // true
    decl.isPropertyImplicit("margin-right") // true
    decl.isPropertyImplicit("margin-bottom") // true

I guess I don't actually know why something is considered implicit, or there is a bug.


> For example: margin: 8px 4px; would yield margin-top and margin-right with
> 8px and 4px, and the margin-bottom and margin-left would be implicit.
> 
> What use to do was show the shorthand, with the long-hands expandable under
> it. I'm not sure we should do that again, and just show the shorthand by
> itself.

I agree with just showing the shorthand.

--

Here is an interesting case. Is there ever a case with ambiguity like this?

    div {
        margin: 5px;
        margin-right: 10px;
    }

If there is a case like this in non-author styles, I think we should be unambiguous, and probably list everything.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150107/e1592d19/attachment-0002.html>


More information about the webkit-unassigned mailing list