haikuwebkit/LayoutTests/css3/masking/mask-repeat-round-content.html

32 lines
782 B
HTML
Raw Permalink Normal View History

mask-repeat: round bug Source/WebCore: Added the round functionality to -webkit-mask-repeat and background-repeat. The tile size of the image is scaled so that the image can fit a whole number of times in the background. https://bugs.webkit.org/show_bug.cgi?id=119080 Patch by Andrei Parvu <parvu@adobe.com> on 2013-08-01 Reviewed by Dirk Schulze. Tests: css3/masking/mask-repeat-round-auto1.html css3/masking/mask-repeat-round-auto2.html css3/masking/mask-repeat-round-border.html css3/masking/mask-repeat-round-content.html css3/masking/mask-repeat-round-padding.html css3/background/background-repeat-round-auto1.html css3/background/background-repeat-round-auto2.html css3/background/background-repeat-round-border.html css3/background/background-repeat-round-content.html css3/background/background-repeat-round-padding.html * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): LayoutTests: Added tests for the -webkit-mask-repeat: round property. https://bugs.webkit.org/show_bug.cgi?id=119080 Patch by Andrei Parvu <parvu@adobe.com> on 2013-08-01 Reviewed by Dirk Schulze. * css3/masking/mask-repeat-round-auto1-expected.html: Added. * css3/masking/mask-repeat-round-auto1.html: Added. * css3/masking/mask-repeat-round-auto2-expected.html: Added. * css3/masking/mask-repeat-round-auto2.html: Added. * css3/masking/mask-repeat-round-border-expected.html: Added. * css3/masking/mask-repeat-round-border.html: Added. * css3/masking/mask-repeat-round-content-expected.html: Added. * css3/masking/mask-repeat-round-content.html: Added. * css3/masking/mask-repeat-round-padding-expected.html: Added. * css3/masking/mask-repeat-round-padding.html: Added. * css3/masking/resources/circle.png: Added. * css3/background/background-repeat-round-auto1-expected.html: Added. * css3/background/background-repeat-round-auto1.html: Added. * css3/background/background-repeat-round-auto2-expected.html: Added. * css3/background/background-repeat-round-auto2.html: Added. * css3/background/background-repeat-round-border-expected.html: Added. * css3/background/background-repeat-round-border.html: Added. * css3/background/background-repeat-round-content-expected.html: Added. * css3/background/background-repeat-round-content.html: Added. * css3/background/background-repeat-round-padding-expected.html: Added. * css3/background/background-repeat-round-padding.html: Added. * css3/background/resources/circle.png: Added. Canonical link: https://commits.webkit.org/137336@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153582 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-08-01 13:03:45 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<style>
#back {
width: 1000px;
height: 600px;
background-color: green;
}
#front {
width: 800px;
height: 400px;
background-color: red;
border: 50px solid blue;
padding: 50px;
-webkit-mask-image: url(resources/circle.png);
Subpixel rendering: Move background images to device pixel boundaries. https://bugs.webkit.org/show_bug.cgi?id=131144 Reviewed by Simon Fraser. Replace integral snapping with device pixel snapping. Background image geometry calculation uses LayoutUnits and we snap to device pixels right before painting. Source/WebCore: Tests: fast/backgrounds/hidpi-bitmap-background-on-subpixel-position.html fast/backgrounds/hidpi-bitmap-background-origin-on-subpixel-position.html fast/backgrounds/hidpi-bitmap-background-repeat-on-subpixel-position.html fast/backgrounds/hidpi-generated-gradient-background-on-subpixel-position.html * platform/graphics/GraphicsLayer.h: (WebCore::GraphicsLayer::setContentsTilePhase): (WebCore::GraphicsLayer::contentsTilePhase): (WebCore::GraphicsLayer::setContentsTileSize): (WebCore::GraphicsLayer::contentsTileSize): * platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::TextureMapperLayer::setContentsTileSize): (WebCore::TextureMapperLayer::setContentsTilePhase): * platform/graphics/texmap/TextureMapperLayer.h: * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::setContentsTileSize): (WebCore::CoordinatedGraphicsLayer::setContentsTilePhase): * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h: * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::repaintLayerRectsForImage): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): (WebCore::resolveWidthForRatio): (WebCore::resolveHeightForRatio): (WebCore::resolveAgainstIntrinsicWidthOrHeightAndRatio): (WebCore::resolveAgainstIntrinsicRatio): (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions): (WebCore::RenderBoxModelObject::calculateFillTileSize): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatX): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatY): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::useFixedAttachment): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::clip): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::relativePhase): (WebCore::getSpace): (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting): (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage): (WebCore::RenderBoxModelObject::paintNinePieceImage): (WebCore::applySubPixelHeuristicForTileSize): Deleted. * rendering/RenderBoxModelObject.h: (WebCore::RenderBoxModelObject::BackgroundImageGeometry::destOrigin): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setDestOrigin): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::destRect): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setDestRect): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::phase): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhase): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::tileSize): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setTileSize): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::spaceSize): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setSpaceSize): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhaseX): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhaseY): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage): * rendering/shapes/ShapeOutsideInfo.cpp: (WebCore::getShapeImageAndRect): LayoutTests: * css3/background/background-repeat-round-auto1-expected.html: * css3/background/background-repeat-round-auto1.html: * css3/background/background-repeat-round-auto2-expected.html: * css3/background/background-repeat-round-auto2.html: * css3/background/background-repeat-round-border-expected.html: * css3/background/background-repeat-round-border.html: * css3/background/background-repeat-round-content-expected.html: * css3/background/background-repeat-round-content.html: * css3/background/background-repeat-space-content-expected.html: * css3/background/background-repeat-space-content.html: * css3/background/background-repeat-space-padding-expected.html: * css3/background/background-repeat-space-padding.html: * css3/masking/mask-repeat-round-auto1-expected.html: * css3/masking/mask-repeat-round-auto1.html: * css3/masking/mask-repeat-round-auto2-expected.html: * css3/masking/mask-repeat-round-auto2.html: * css3/masking/mask-repeat-round-border-expected.html: * css3/masking/mask-repeat-round-border.html: * css3/masking/mask-repeat-round-content-expected.html: * css3/masking/mask-repeat-round-content.html: * css3/masking/mask-repeat-space-content-expected.html: * css3/masking/mask-repeat-space-content.html: * css3/masking/mask-repeat-space-padding-expected.html: * css3/masking/mask-repeat-space-padding.html: * fast/backgrounds/hidpi-bitmap-background-on-subpixel-position-expected.html: Added. * fast/backgrounds/hidpi-bitmap-background-on-subpixel-position.html: Added. * fast/backgrounds/hidpi-bitmap-background-origin-on-subpixel-position-expected.html: Added. * fast/backgrounds/hidpi-bitmap-background-origin-on-subpixel-position.html: Added. * fast/backgrounds/hidpi-bitmap-background-repeat-on-subpixel-position-expected.html: Added. * fast/backgrounds/hidpi-bitmap-background-repeat-on-subpixel-position.html: Added. * fast/backgrounds/hidpi-generated-gradient-background-on-subpixel-position-expected.html: Added. * fast/backgrounds/hidpi-generated-gradient-background-on-subpixel-position.html: Added. * fast/backgrounds/resources/black25x25.png: Added. Canonical link: https://commits.webkit.org/149276@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@166784 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-04-04 16:30:18 +00:00
-webkit-mask-size: 50px;
mask-repeat: round bug Source/WebCore: Added the round functionality to -webkit-mask-repeat and background-repeat. The tile size of the image is scaled so that the image can fit a whole number of times in the background. https://bugs.webkit.org/show_bug.cgi?id=119080 Patch by Andrei Parvu <parvu@adobe.com> on 2013-08-01 Reviewed by Dirk Schulze. Tests: css3/masking/mask-repeat-round-auto1.html css3/masking/mask-repeat-round-auto2.html css3/masking/mask-repeat-round-border.html css3/masking/mask-repeat-round-content.html css3/masking/mask-repeat-round-padding.html css3/background/background-repeat-round-auto1.html css3/background/background-repeat-round-auto2.html css3/background/background-repeat-round-border.html css3/background/background-repeat-round-content.html css3/background/background-repeat-round-padding.html * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): LayoutTests: Added tests for the -webkit-mask-repeat: round property. https://bugs.webkit.org/show_bug.cgi?id=119080 Patch by Andrei Parvu <parvu@adobe.com> on 2013-08-01 Reviewed by Dirk Schulze. * css3/masking/mask-repeat-round-auto1-expected.html: Added. * css3/masking/mask-repeat-round-auto1.html: Added. * css3/masking/mask-repeat-round-auto2-expected.html: Added. * css3/masking/mask-repeat-round-auto2.html: Added. * css3/masking/mask-repeat-round-border-expected.html: Added. * css3/masking/mask-repeat-round-border.html: Added. * css3/masking/mask-repeat-round-content-expected.html: Added. * css3/masking/mask-repeat-round-content.html: Added. * css3/masking/mask-repeat-round-padding-expected.html: Added. * css3/masking/mask-repeat-round-padding.html: Added. * css3/masking/resources/circle.png: Added. * css3/background/background-repeat-round-auto1-expected.html: Added. * css3/background/background-repeat-round-auto1.html: Added. * css3/background/background-repeat-round-auto2-expected.html: Added. * css3/background/background-repeat-round-auto2.html: Added. * css3/background/background-repeat-round-border-expected.html: Added. * css3/background/background-repeat-round-border.html: Added. * css3/background/background-repeat-round-content-expected.html: Added. * css3/background/background-repeat-round-content.html: Added. * css3/background/background-repeat-round-padding-expected.html: Added. * css3/background/background-repeat-round-padding.html: Added. * css3/background/resources/circle.png: Added. Canonical link: https://commits.webkit.org/137336@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153582 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-08-01 13:03:45 +00:00
-webkit-mask-repeat: round;
-webkit-mask-origin: content-box;
-webkit-mask-clip: content-box;
}
</style>
</head>
<body>
<div id="back">
<div id="front" />
</div>
</body>
</html>