Title: [132682] trunk
- Revision
- 132682
- Author
- k...@webkit.org
- Date
- 2012-10-26 12:06:00 -0700 (Fri, 26 Oct 2012)
Log Message
-webkit-clip-path property should just reference clipPath
https://bugs.webkit.org/show_bug.cgi?id=100531
Reviewed by Eric Seidel.
Source/WebCore:
The -webkit-clip-path property should just reference clipPath. Added a check for that.
Test: css3/masking/clip-path-reference-of-fake-clipPath.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents):
LayoutTests:
Check that anther SVG resource like mask can not be referenced as clipPath.
* css3/masking/clip-path-reference-of-fake-clipPath-expected.txt: Added.
* css3/masking/clip-path-reference-of-fake-clipPath.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (132681 => 132682)
--- trunk/LayoutTests/ChangeLog 2012-10-26 18:51:21 UTC (rev 132681)
+++ trunk/LayoutTests/ChangeLog 2012-10-26 19:06:00 UTC (rev 132682)
@@ -1,3 +1,15 @@
+2012-10-26 Dirk Schulze <k...@webkit.org>
+
+ -webkit-clip-path property should just reference clipPath
+ https://bugs.webkit.org/show_bug.cgi?id=100531
+
+ Reviewed by Eric Seidel.
+
+ Check that anther SVG resource like mask can not be referenced as clipPath.
+
+ * css3/masking/clip-path-reference-of-fake-clipPath-expected.txt: Added.
+ * css3/masking/clip-path-reference-of-fake-clipPath.html: Added.
+
2012-10-26 Raphael Kubo da Costa <raphael.kubo.da.co...@intel.com>
webkitpy: Pass the `Listen' Apache directive from webkitpy, not the httpd.conf files.
Added: trunk/LayoutTests/css3/masking/clip-path-reference-of-fake-clipPath-expected.txt (0 => 132682)
--- trunk/LayoutTests/css3/masking/clip-path-reference-of-fake-clipPath-expected.txt (rev 0)
+++ trunk/LayoutTests/css3/masking/clip-path-reference-of-fake-clipPath-expected.txt 2012-10-26 19:06:00 UTC (rev 132682)
@@ -0,0 +1,2 @@
+Passes if the test does not crash.
+
Added: trunk/LayoutTests/css3/masking/clip-path-reference-of-fake-clipPath.html (0 => 132682)
--- trunk/LayoutTests/css3/masking/clip-path-reference-of-fake-clipPath.html (rev 0)
+++ trunk/LayoutTests/css3/masking/clip-path-reference-of-fake-clipPath.html 2012-10-26 19:06:00 UTC (rev 132682)
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<body>
+Passes if the test does not crash.
+<svg><mask id="fake-clip-path"></mask></svg>
+<div style="-webkit-clip-path: url(#fake-clip-path)"></div>
+<script>
+if(window.testRunner)
+ testRunner.dumpAsText();
+</script>
+</body>
+</html>
\ No newline at end of file
Modified: trunk/Source/WebCore/ChangeLog (132681 => 132682)
--- trunk/Source/WebCore/ChangeLog 2012-10-26 18:51:21 UTC (rev 132681)
+++ trunk/Source/WebCore/ChangeLog 2012-10-26 19:06:00 UTC (rev 132682)
@@ -1,3 +1,17 @@
+2012-10-26 Dirk Schulze <k...@webkit.org>
+
+ -webkit-clip-path property should just reference clipPath
+ https://bugs.webkit.org/show_bug.cgi?id=100531
+
+ Reviewed by Eric Seidel.
+
+ The -webkit-clip-path property should just reference clipPath. Added a check for that.
+
+ Test: css3/masking/clip-path-reference-of-fake-clipPath.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::paintLayerContents):
+
2012-10-26 Aaron Colwell <acolw...@chromium.org>
Remove the circular reference between TextTrack and TextTrackCue
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (132681 => 132682)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2012-10-26 18:51:21 UTC (rev 132681)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2012-10-26 19:06:00 UTC (rev 132682)
@@ -3173,9 +3173,9 @@
ReferenceClipPathOperation* referenceClipPathOperation = static_cast<ReferenceClipPathOperation*>(style->clipPath());
Document* document = renderer()->document();
// FIXME: It doesn't work with forward or external SVG references (https://bugs.webkit.org/show_bug.cgi?id=90405)
- Element* clipPath = document ? document->getElementById(referenceClipPathOperation->fragment()) : 0;
- if (clipPath && clipPath->renderer() && clipPath->renderer()->isSVGResourceContainer())
- static_cast<RenderSVGResourceClipper*>(clipPath->renderer())->applyClippingToContext(renderer(), calculateLayerBounds(this, rootLayer, 0), paintDirtyRect, context);
+ Element* element = document ? document->getElementById(referenceClipPathOperation->fragment()) : 0;
+ if (element && element->hasTagName(SVGNames::clipPathTag) && element->renderer())
+ static_cast<RenderSVGResourceClipper*>(element->renderer())->applyClippingToContext(renderer(), calculateLayerBounds(this, rootLayer, 0), paintDirtyRect, context);
}
#endif
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes