[webkit-reviews] review requested: [Bug 86942] background-size:0 shows as 1px instead of invisible : [Attachment 148868] Patch-Updated

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 21 12:52:46 PDT 2012


Joe Thomas <joethomas at motorola.com> has asked  for review:
Bug 86942: background-size:0 shows as 1px instead of invisible
https://bugs.webkit.org/show_bug.cgi?id=86942

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

------- Additional Comments from Joe Thomas <joethomas at motorola.com>
Patch rebaselined. Patch is still valid as per my comment #12

Checked the Webkit behavior for <div style="background-size: auto 8px;"></div>
in LayoutTests/fast/backgrounds/size/zero.html. 
Here the intrinsic size of the background image used is (2,32). Since the width
is defined as 'auto', Webkit tries to resolve the width by taking intrinsic
ratio and it computes to (2/32) * 8 = 0.5 and it will be rounded to 0 as the
size takes int. So showing empty square is correct eventhough it differs from
Firefox or Opera.

I am bit confused about the spec which says "An ‘auto’ value for one dimension
is resolved by using the image's intrinsic ratio and the size of the other
dimension, or failing that, using the image's intrinsic size, or failing that,
treating it as 100%." Does computing the width to 0 using intrinsic ratio can
be considered as a failure? If yes, we should take intrinsic width instead of 0
which results in showing blue squares and the behavior matches with other
browsers. Please advise.


More information about the webkit-reviews mailing list