haikuwebkit/LayoutTests/css3/masking/clip-path-reference-expecte...

22 lines
315 B
HTML
Raw Permalink Normal View History

-webkit-clip-path should parse IRIs https://bugs.webkit.org/show_bug.cgi?id=96381 Patch by Raul Hudea <rhudea@adobe.com> on 2012-10-06 Reviewed by Andreas Kling. Source/WebCore: Implemented the clipping via referencing a SVG clipPath. Currently it works only if the clipPath is defined before using it on an HTML element. The forward reference issue is tracked via https://bugs.webkit.org/show_bug.cgi?id=90405. Tests: css3/masking/clip-path-reference-userSpaceOnUse.html css3/masking/clip-path-reference.html fast/masking/parsing-clip-path-iri.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Add handling for SVG clipPath references. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Add handling for SVG clipPath references. * css/StyleBuilder.cpp: (WebCore::ApplyPropertyClipPath::applyValue): Add handling for SVG references. * rendering/ClipPathOperation.h: (ReferenceClipPathOperation): Added a new class corresponding to SVG referenced clipPath. (WebCore::ReferenceClipPathOperation::create): (WebCore::ReferenceClipPathOperation::url): (WebCore::ReferenceClipPathOperation::fragment): (WebCore::ReferenceClipPathOperation::operator==): (WebCore::ReferenceClipPathOperation::ReferenceClipPathOperation): (WebCore): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayerContents): Add handling for ReferenceClipPathOperation. * rendering/svg/RenderSVGResourceClipper.h: (RenderSVGResourceClipper): Made applyClippingToContext public as it needs to be called directly for HTML elements. LayoutTests: Tests for SVG referenced clipPath with both types of clipPathUnits: "userSpaceOnUse" and "objectBoundingBox". * css3/masking/clip-path-reference-expected.html: Added. * css3/masking/clip-path-reference-userSpaceOnUse-expected.html: Added. * css3/masking/clip-path-reference-userSpaceOnUse.html: Added. * css3/masking/clip-path-reference.html: Added. * fast/masking/parsing-clip-path-iri-expected.txt: Added. * fast/masking/parsing-clip-path-iri.html: Added. * platform/chromium/TestExpectations: Canonical link: https://commits.webkit.org/116582@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@130592 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-07 01:35:26 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<style>
#d {
width: 180px;
height: 180px;
border: 1px solid black;
}
#clip {
width: 32px;
height: 32px;
margin: 74px;
background-color: green;
}
</style>
</head>
<body>
<svg height="0"></svg>
<div id="d"><div id="clip"></div></div>
</body>
</html>