OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. |
3 * | 3 * |
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
5 * | 5 * |
6 * Other contributors: | 6 * Other contributors: |
7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 2023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2034 if (!rootRelativeBoundsComputed) { | 2034 if (!rootRelativeBoundsComputed) { |
2035 rootRelativeBounds = calculateLayerBounds(paintingInfo.rootLayer
, &offsetFromRoot, 0); | 2035 rootRelativeBounds = calculateLayerBounds(paintingInfo.rootLayer
, &offsetFromRoot, 0); |
2036 rootRelativeBoundsComputed = true; | 2036 rootRelativeBoundsComputed = true; |
2037 } | 2037 } |
2038 | 2038 |
2039 context->clipPath(clipPath->path(rootRelativeBounds), clipPath->wind
Rule()); | 2039 context->clipPath(clipPath->path(rootRelativeBounds), clipPath->wind
Rule()); |
2040 } else if (style->clipPath()->type() == ClipPathOperation::REFERENCE) { | 2040 } else if (style->clipPath()->type() == ClipPathOperation::REFERENCE) { |
2041 ReferenceClipPathOperation* referenceClipPathOperation = toReference
ClipPathOperation(style->clipPath()); | 2041 ReferenceClipPathOperation* referenceClipPathOperation = toReference
ClipPathOperation(style->clipPath()); |
2042 Document& document = renderer()->document(); | 2042 Document& document = renderer()->document(); |
2043 // FIXME: It doesn't work with forward or external SVG references (h
ttps://bugs.webkit.org/show_bug.cgi?id=90405) | 2043 // FIXME: It doesn't work with forward or external SVG references (h
ttps://bugs.webkit.org/show_bug.cgi?id=90405) |
2044 Element* element = document.getElementById(referenceClipPathOperatio
n->fragment()); | 2044 Element* element = document.getElementById(AtomicString(referenceCli
pPathOperation->fragment())); |
2045 if (element && element->hasTagName(SVGNames::clipPathTag) && element
->renderer()) { | 2045 if (element && element->hasTagName(SVGNames::clipPathTag) && element
->renderer()) { |
2046 if (!rootRelativeBoundsComputed) { | 2046 if (!rootRelativeBoundsComputed) { |
2047 rootRelativeBounds = calculateLayerBounds(paintingInfo.rootL
ayer, &offsetFromRoot, 0); | 2047 rootRelativeBounds = calculateLayerBounds(paintingInfo.rootL
ayer, &offsetFromRoot, 0); |
2048 rootRelativeBoundsComputed = true; | 2048 rootRelativeBoundsComputed = true; |
2049 } | 2049 } |
2050 | 2050 |
2051 resourceClipper = toRenderSVGResourceClipper(toRenderSVGResource
Container(element->renderer())); | 2051 resourceClipper = toRenderSVGResourceClipper(toRenderSVGResource
Container(element->renderer())); |
2052 if (!resourceClipper->applyClippingToContext(renderer(), rootRel
ativeBounds, | 2052 if (!resourceClipper->applyClippingToContext(renderer(), rootRel
ativeBounds, |
2053 paintingInfo.paintDirtyRect, context, clipperContext)) { | 2053 paintingInfo.paintDirtyRect, context, clipperContext)) { |
2054 // No need to post-apply the clipper if this failed. | 2054 // No need to post-apply the clipper if this failed. |
(...skipping 2137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4192 } | 4192 } |
4193 } | 4193 } |
4194 | 4194 |
4195 void showLayerTree(const WebCore::RenderObject* renderer) | 4195 void showLayerTree(const WebCore::RenderObject* renderer) |
4196 { | 4196 { |
4197 if (!renderer) | 4197 if (!renderer) |
4198 return; | 4198 return; |
4199 showLayerTree(renderer->enclosingLayer()); | 4199 showLayerTree(renderer->enclosingLayer()); |
4200 } | 4200 } |
4201 #endif | 4201 #endif |
OLD | NEW |