background-size:0 shows as 1px instead of invisible
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Jun 2012 23:08:09 +0000 (23:08 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Jun 2012 23:08:09 +0000 (23:08 +0000)
commitfbace6d009c1d3daad6bf52014e8e8ca35f609ee
tree44313ad1b18d54e370544f73cd471d890bfdc772
parentf233750178ffa13d542b36646866e04d9d101ac6
background-size:0 shows as 1px instead of invisible
https://bugs.webkit.org/show_bug.cgi?id=86942

Patch by Joe Thomas <joethomas@motorola.com> on 2012-06-26
Reviewed by Eric Seidel.

As per the specification http://www.w3.org/TR/css3-background/#background-size, if the background image's width or height resolves to zero,
this causes the image not to be displayed. The effect should be the same as if it had been a transparent image.
This is also mentioned in http://www.w3.org/TR/2002/WD-css3-background-20020802/#background-size.

Source/WebCore:

Test: fast/backgrounds/zero-background-size.html

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateFillTileSize):

LayoutTests:

* fast/backgrounds/size/zero.html:
* fast/backgrounds/zero-background-size-expected.html: Added.
* fast/backgrounds/zero-background-size.html: Added.
* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/fast/backgrounds/size/zero-expected.png:
* platform/mac/fast/backgrounds/size/zero-expected.txt:
* platform/qt/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@121296 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/backgrounds/size/zero.html
LayoutTests/fast/backgrounds/zero-background-size-expected.html [new file with mode: 0644]
LayoutTests/fast/backgrounds/zero-background-size.html [new file with mode: 0644]
LayoutTests/platform/chromium/TestExpectations
LayoutTests/platform/efl/TestExpectations
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/mac/fast/backgrounds/size/zero-expected.png
LayoutTests/platform/mac/fast/backgrounds/size/zero-expected.txt
LayoutTests/platform/qt/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBoxModelObject.cpp