haikuwebkit/LayoutTests/css3/masking/mask-svg-no-fragmentId-expe...

21 lines
782 B
HTML
Raw Permalink Normal View History

[SVG Masking] Enable the use of <mask> elements for -webkit-mask-image https://bugs.webkit.org/show_bug.cgi?id=139294 Reviewed by Simon Fraser. Source/WebCore: This patch links together all parts required for the functionality which improves the -webkit-mask-image property by allowing it to reference a <mask> element defined in an inline or external SVG document. Support for this new functionality has been added in a previous patch, under issue https://bugs.webkit.org/show_bug.cgi?id=139092. A more detailed description of how the new functionality works can be found in the ChangeLog for that commit. The containsSVGDocument in ScrollView has been removed because it was added in the previous patch but is no longer required. Tests: css3/masking/mask-base64.html css3/masking/mask-multiple-values.html css3/masking/mask-svg-clipped-fragmentId.html css3/masking/mask-svg-fragmentId.html css3/masking/mask-svg-inline-fragmentId.html css3/masking/mask-svg-inline-invalid-fragmentId.html css3/masking/mask-svg-invalid-fragmentId.html css3/masking/mask-svg-no-fragmentId-tiled.html css3/masking/mask-svg-no-fragmentId.html css3/masking/mask-svg-script-entire-svg-to-mask.html css3/masking/mask-svg-script-mask-to-entire-svg.html css3/masking/mask-svg-script-mask-to-none.html css3/masking/mask-svg-script-mask-to-png.html css3/masking/mask-svg-script-none-to-mask.html css3/masking/mask-svg-script-none-to-png.html css3/masking/mask-svg-script-png-to-mask.html css3/masking/mask-svg-script-png-to-none.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseFillShorthand): (WebCore::CSSParser::parseFillProperty): (WebCore::CSSParser::parseMaskImage): * css/CSSParser.h: * css/CSSValue.h: * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustStyleForMaskImages): (WebCore::StyleResolver::applyMatchedProperties): (WebCore::StyleResolver::applyProperty): (WebCore::StyleResolver::loadPendingSVGDocuments): (WebCore::StyleResolver::createMaskImageOperations): (WebCore::StyleResolver::loadPendingImages): * css/StyleResolver.h: * page/FrameView.cpp: (WebCore::FrameView::containsSVGDocument): Deleted. * page/FrameView.h: * page/animation/CSSPropertyAnimation.cpp: (WebCore::blendFunc): (WebCore::MaskImagePropertyWrapper::MaskImagePropertyWrapper): (WebCore::MaskImagePropertyWrapper::equals): (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * platform/ScrollView.h: (WebCore::ScrollView::containsSVGDocument): Deleted. * platform/graphics/MaskImageOperation.cpp: (WebCore::MaskImageOperation::~MaskImageOperation): (WebCore::MaskImageOperation::operator==): * platform/graphics/MaskImageOperation.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::maskClipRect): * rendering/RenderBox.h: * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): (WebCore::RenderBoxModelObject::calculateFillTileSize): (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): * rendering/RenderElement.cpp: (WebCore::RenderElement::~RenderElement): (WebCore::RenderElement::updateFillImages): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects): * rendering/RenderLayer.h: * rendering/RenderLayerMaskImageInfo.cpp: (WebCore::RenderLayer::MaskImageInfo::~MaskImageInfo): (WebCore::RenderLayer::MaskImageInfo::updateMaskImageClients): (WebCore::RenderLayer::MaskImageInfo::removeMaskImageClients): * rendering/RenderLayerMaskImageInfo.h: * rendering/style/FillLayer.cpp: (WebCore::FillLayer::hasImage): * rendering/style/FillLayer.h: (WebCore::FillLayer::image): (WebCore::FillLayer::imageOrMaskImage): Deleted. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::setMaskImage): * rendering/style/RenderStyle.h: LayoutTests: Added tests for different situations using URLs with fragment id for the -webkit-mask-image property. * css3/masking/mask-base64-expected.html: Copied from LayoutTests/css3/masking/mask-repeat-space-padding-expected.html. * css3/masking/mask-base64.html: Added. * css3/masking/mask-multiple-values-expected.html: Added. * css3/masking/mask-multiple-values.html: Added. * css3/masking/mask-repeat-space-padding-expected.html: * css3/masking/mask-repeat-space-padding.html: * css3/masking/mask-svg-clipped-fragmentId-expected.html: Added. * css3/masking/mask-svg-clipped-fragmentId.html: Added. * css3/masking/mask-svg-fragmentId-expected.html: Added. * css3/masking/mask-svg-fragmentId.html: Added. * css3/masking/mask-svg-inline-fragmentId-expected.html: Added. * css3/masking/mask-svg-inline-fragmentId.html: Added. * css3/masking/mask-svg-inline-invalid-fragmentId-expected.html: Added. * css3/masking/mask-svg-inline-invalid-fragmentId.html: Added. * css3/masking/mask-svg-invalid-fragmentId-expected.html: Added. * css3/masking/mask-svg-invalid-fragmentId.html: Added. * css3/masking/mask-svg-no-fragmentId-expected.html: Added. * css3/masking/mask-svg-no-fragmentId-tiled-expected.html: Added. * css3/masking/mask-svg-no-fragmentId-tiled.html: Added. * css3/masking/mask-svg-no-fragmentId.html: Added. * css3/masking/mask-svg-script-entire-svg-to-mask-expected.html: Added. * css3/masking/mask-svg-script-entire-svg-to-mask.html: Added. * css3/masking/mask-svg-script-mask-to-entire-svg-expected.html: Added. * css3/masking/mask-svg-script-mask-to-entire-svg.html: Added. * css3/masking/mask-svg-script-mask-to-none-expected.html: Added. * css3/masking/mask-svg-script-mask-to-none.html: Added. * css3/masking/mask-svg-script-mask-to-png-expected.html: Added. * css3/masking/mask-svg-script-mask-to-png.html: Added. * css3/masking/mask-svg-script-none-to-mask-expected.html: Added. * css3/masking/mask-svg-script-none-to-mask.html: Added. * css3/masking/mask-svg-script-none-to-png-expected.html: Added. * css3/masking/mask-svg-script-none-to-png.html: Added. * css3/masking/mask-svg-script-png-to-mask-expected.html: Added. * css3/masking/mask-svg-script-png-to-mask.html: Added. * css3/masking/mask-svg-script-png-to-none-expected.html: Added. * css3/masking/mask-svg-script-png-to-none.html: Added. * css3/masking/resources/masks.svg: Added. Canonical link: https://commits.webkit.org/157671@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177494 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-12-18 13:41:59 +00:00
<!DOCTYPE html>
<html>
<head>
<style>
p {
margin: 0px;
}
</style>
</head>
<body>
<p><a href="https://bugs.webkit.org/show_bug.cgi?id=129682">Bug 129682</a> - On success, you should see 4 green rectangles and no red.</p>
<p>This test references an external SVG without specifying a fragment id.</p>
<svg width="300px" height="400px">
<rect x="5px" y="45px" width="140px" height="140px" fill="green"/>
<rect x="155px" y="45px" width="140px" height="140px" fill="green"/>
<rect x="155px" y="215px" width="140px" height="140px" fill="green"/>
<rect x="5px" y="215px" width="140px" height="140px" fill="green"/>
</svg>
</body>
</html>