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 3556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3567 ReferenceClipPathOperation* referenceClipPathOperation = static_cast
<ReferenceClipPathOperation*>(style->clipPath()); | 3567 ReferenceClipPathOperation* referenceClipPathOperation = static_cast
<ReferenceClipPathOperation*>(style->clipPath()); |
3568 Document& document = renderer()->document(); | 3568 Document& document = renderer()->document(); |
3569 // FIXME: It doesn't work with forward or external SVG references (h
ttps://bugs.webkit.org/show_bug.cgi?id=90405) | 3569 // FIXME: It doesn't work with forward or external SVG references (h
ttps://bugs.webkit.org/show_bug.cgi?id=90405) |
3570 Element* element = document.getElementById(referenceClipPathOperatio
n->fragment()); | 3570 Element* element = document.getElementById(referenceClipPathOperatio
n->fragment()); |
3571 if (element && element->hasTagName(SVGNames::clipPathTag) && element
->renderer()) { | 3571 if (element && element->hasTagName(SVGNames::clipPathTag) && element
->renderer()) { |
3572 if (!rootRelativeBoundsComputed) { | 3572 if (!rootRelativeBoundsComputed) { |
3573 rootRelativeBounds = calculateLayerBounds(paintingInfo.rootL
ayer, &offsetFromRoot, 0); | 3573 rootRelativeBounds = calculateLayerBounds(paintingInfo.rootL
ayer, &offsetFromRoot, 0); |
3574 rootRelativeBoundsComputed = true; | 3574 rootRelativeBoundsComputed = true; |
3575 } | 3575 } |
3576 | 3576 |
3577 // FIXME: This should use a safer cast such as toRenderSVGResour
ceContainer(). | 3577 resourceClipper = toRenderSVGResourceClipper(element->renderer()
->toRenderSVGResourceContainer()); |
3578 resourceClipper = static_cast<RenderSVGResourceClipper*>(element
->renderer()); | |
3579 if (!resourceClipper->applyClippingToContext(renderer(), rootRel
ativeBounds, paintingInfo.paintDirtyRect, context)) { | 3578 if (!resourceClipper->applyClippingToContext(renderer(), rootRel
ativeBounds, paintingInfo.paintDirtyRect, context)) { |
3580 // No need to post-apply the clipper if this failed. | 3579 // No need to post-apply the clipper if this failed. |
3581 resourceClipper = 0; | 3580 resourceClipper = 0; |
3582 } | 3581 } |
3583 } | 3582 } |
3584 } | 3583 } |
3585 } | 3584 } |
3586 | 3585 |
3587 LayerPaintingInfo localPaintingInfo(paintingInfo); | 3586 LayerPaintingInfo localPaintingInfo(paintingInfo); |
3588 FilterEffectRendererHelper filterPainter(filterRenderer() && paintsWithFilte
rs()); | 3587 FilterEffectRendererHelper filterPainter(filterRenderer() && paintsWithFilte
rs()); |
(...skipping 2768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6357 } | 6356 } |
6358 } | 6357 } |
6359 | 6358 |
6360 void showLayerTree(const WebCore::RenderObject* renderer) | 6359 void showLayerTree(const WebCore::RenderObject* renderer) |
6361 { | 6360 { |
6362 if (!renderer) | 6361 if (!renderer) |
6363 return; | 6362 return; |
6364 showLayerTree(renderer->enclosingLayer()); | 6363 showLayerTree(renderer->enclosingLayer()); |
6365 } | 6364 } |
6366 #endif | 6365 #endif |
OLD | NEW |