[Webkit-unassigned] [Bug 119324] [CSS Masking] -webkit-mask-repeat: space does not work
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Aug 28 03:01:10 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=119324
--- Comment #13 from Dirk Schulze <krit at webkit.org> 2013-08-28 03:00:33 PST ---
(From update of attachment 208396)
View in context: https://bugs.webkit.org/attachment.cgi?id=208396&action=review
We had longer discussions how the Pattern class can be refactored to represent the spacing. We realize that there are some tradeoffs to make like storing more member variables in the frequently used Pattern class. On the other hand there are no benefits for the other ports that still need to modify the image buffers. CG provides spacing in the internal pattern logic, the other ports don't.
Because of that, I think it doesn't make sense to modify Pattern after all and just do the necessary changes in ImageCG.
Some nips:
> Source/WebCore/ChangeLog:11
> + [CSS Masking] -webkit-mask-repeat: space does not work
> + Added the space option to repeat property using the createPlatformPattern function.
> + The space mask-repeat repeats the mask as often as will fit within the background positioning
> + area without being clipped and then spaces the masks so that they fill the area.
> + Changed the Pattern class so that createPlatformPattern can be called from the ImageCG use-case.
> + https://bugs.webkit.org/show_bug.cgi?id=119324
> +
> + Reviewed by NOBODY (OOPS!).
> +
The format of the changelog is still a bit off.
s/repeat property/background-repeat and -webkit-mask-repeat properties/
The space mask-repeat...
With the property value 'space', the background or mask image gets repeated as often as it fits within the background positioning area. The repeated images are spaced equally to fill the unused area.
> Source/WebCore/ChangeLog:19
> + * WebCore.order: added the symbol for the new Pattern::create method
Sentences please.
> Source/WebCore/ChangeLog:22
> + * platform/graphics/Image.h: add space property to Image class
Ditto.
> Source/WebCore/ChangeLog:25
> + * platform/graphics/Pattern.cpp: added a new createPlatformPattern method to be called from ImageCG
Ditto.
> Source/WebCore/ChangeLog:29
> + * platform/graphics/cg/ImageCG.cpp: added the space values to createPlatformPattern
Ditto.
> Source/WebCore/ChangeLog:36
> + (WebCore::RenderBoxModelObject::paintFillLayerExtended): computed the space values on x and y axis
> + (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): passed the space values to the Image class
> + * rendering/RenderBoxModelObject.h: add space property to BackgroundImageGeometry class
Ditto.
s/computed/Compute/
s/passed/Pass/
> Source/WebCore/rendering/RenderBoxModelObject.cpp:1344
> + int nrTiles = positioningAreaSize.width() / fillTileSize.width();
Please rename nrTiles. Not sure, maybe to numberOfTiles.
> Source/WebCore/rendering/RenderBoxModelObject.cpp:1368
> + int nrTiles = positioningAreaSize.height() / fillTileSize.height();
Ditto.
> Source/WebCore/rendering/RenderBoxModelObject.cpp:1377
> + int actualHeight = geometry.tileSize().height();
> + if (nrTiles > 1) {
> + int space = roundToInt((float)(positioningAreaSize.height() - nrTiles * fillTileSize.height()) / (nrTiles - 1));
> + geometry.setSpaceSize(FloatSize(geometry.spaceSize().width(), space));
> +
> + actualHeight += space;
> + } else
> + geometry.setSpaceSize(FloatSize(geometry.spaceSize().width(), 0));
That may should go into an inline function and reused by both: width and height.
--
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