[CSS Masking/Background] Position property should be ignored when using repeat: space
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Sep 2013 14:41:36 +0000 (14:41 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Sep 2013 14:41:36 +0000 (14:41 +0000)
commit1f5aa864346ead0f47eddb71beef22fbe1709f9b
tree8623bbf658badc2f23adfc8b1f28cd945d06ebdc
parentef16066bd9a9f2dce258ef529082e1289fd1b852
[CSS Masking/Background] Position property should be ignored when using repeat: space
https://bugs.webkit.org/show_bug.cgi?id=120623

Source/WebCore:

The background/mask-position should be ignored when using repeat: space,
unless there is not enough space for two copies of the image. In that case,
only one image is placed and background/mask-position determines its position.

Patch by Andrei Parvu <parvu@adobe.com> on 2013-09-19
Reviewed by Dirk Schulze.

Test: css3/masking/mask-repeat-one-copy.html

* rendering/RenderBoxModelObject.cpp: Ignored position property if space value is positive, set no-repeat otherwise.
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):

LayoutTests:

Patch by Andrei Parvu <parvu@adobe.com> on 2013-09-19
Reviewed by Dirk Schulze.

* css3/masking/mask-repeat-one-copy-expected.html:
* css3/masking/mask-repeat-one-copy.html: Only one copy of the mask should be drawn, and background position should determine its position.
* css3/masking/mask-repeat-space-padding.html: Added a mask-position which should be ignored.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/css3/masking/mask-repeat-one-copy-expected.html [new file with mode: 0644]
LayoutTests/css3/masking/mask-repeat-one-copy.html [new file with mode: 0644]
LayoutTests/css3/masking/mask-repeat-space-padding.html
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBoxModelObject.cpp