[Webkit-unassigned] [Bug 104167] Web Inspector: used values are displaying results that are unexpected

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 5 22:09:26 PST 2012


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





--- Comment #1 from Alexander Pavlov (apavlov) <apavlov at chromium.org>  2012-12-05 22:11:53 PST ---
(In reply to comment #0)
> The provided url makes use of a DIV container and a PARAGRAPH child element.
> The DIV width is set to 500px and the PARAGRAPH is given 100px MARGIN and is set to be 400px in WIDTH.  The expected result is that the right margin would become 0px, as this is the only way the Block Element formula is satisfied.

You are correct. The USED value of 'margin-right' would become 0px, which actually happens.

> Yet when viewing the calculated and layout within Firebug, the margin right displays the styled value, NOT the used value.

It is not quite clear to me why you are referencing the Firebug output in this context, but let's turn back to the Web Inspector (oh, and there is no notion of "styled" value. The "Computed Style" pane displays... well... the values from the computed style).

Let me quote the relevant paragraph from http://www.w3.org/TR/CSS21/visudet.html#blockwidth (item 10.3.3) first:

"If all of the above have a computed value other than 'auto', the values are said to be "over-constrained" and one of the used values will have to be different from its computed value. If the 'direction' property of the containing block has the value 'ltr', the specified value of 'margin-right' is ignored and the value is calculated so as to make the equality true. If the value of 'direction' is 'rtl', this happens to 'margin-left' instead."

Please note the phrase "...one of the used values will have to be different from its computed value." So, what you are actually observing is an exact result of this paragraph's requirement: the computed values for all margins are 100px, BUT "the specified value of 'margin-right' is ignored and the value is calculated so as to make the equality true". Thus, the 'margin-right' USED value is 0px, as opposed to its COMPUTED value of 100px.

Does this sound reasonable?

-- 
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