Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: Source/core/rendering/RenderLayer.cpp

Issue 27648002: Refine toRenderSVGResourceContainer() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2631 matching lines...) Expand 10 before | Expand all | Expand 10 after
2642 ReferenceClipPathOperation* referenceClipPathOperation = static_cast <ReferenceClipPathOperation*>(style->clipPath()); 2642 ReferenceClipPathOperation* referenceClipPathOperation = static_cast <ReferenceClipPathOperation*>(style->clipPath());
2643 Document& document = renderer()->document(); 2643 Document& document = renderer()->document();
2644 // FIXME: It doesn't work with forward or external SVG references (h ttps://bugs.webkit.org/show_bug.cgi?id=90405) 2644 // FIXME: It doesn't work with forward or external SVG references (h ttps://bugs.webkit.org/show_bug.cgi?id=90405)
2645 Element* element = document.getElementById(referenceClipPathOperatio n->fragment()); 2645 Element* element = document.getElementById(referenceClipPathOperatio n->fragment());
2646 if (element && element->hasTagName(SVGNames::clipPathTag) && element ->renderer()) { 2646 if (element && element->hasTagName(SVGNames::clipPathTag) && element ->renderer()) {
2647 if (!rootRelativeBoundsComputed) { 2647 if (!rootRelativeBoundsComputed) {
2648 rootRelativeBounds = calculateLayerBounds(paintingInfo.rootL ayer, &offsetFromRoot, 0); 2648 rootRelativeBounds = calculateLayerBounds(paintingInfo.rootL ayer, &offsetFromRoot, 0);
2649 rootRelativeBoundsComputed = true; 2649 rootRelativeBoundsComputed = true;
2650 } 2650 }
2651 2651
2652 resourceClipper = toRenderSVGResourceClipper(element->renderer() ->toRenderSVGResourceContainer()); 2652 resourceClipper = toRenderSVGResourceClipper(toRenderSVGResource Container(element->renderer()));
2653 if (!resourceClipper->applyClippingToContext(renderer(), rootRel ativeBounds, 2653 if (!resourceClipper->applyClippingToContext(renderer(), rootRel ativeBounds,
2654 paintingInfo.paintDirtyRect, context, clipperContext)) { 2654 paintingInfo.paintDirtyRect, context, clipperContext)) {
2655 // No need to post-apply the clipper if this failed. 2655 // No need to post-apply the clipper if this failed.
2656 resourceClipper = 0; 2656 resourceClipper = 0;
2657 } 2657 }
2658 } 2658 }
2659 } 2659 }
2660 } 2660 }
2661 2661
2662 LayerPaintingInfo localPaintingInfo(paintingInfo); 2662 LayerPaintingInfo localPaintingInfo(paintingInfo);
(...skipping 2709 matching lines...) Expand 10 before | Expand all | Expand 10 after
5372 } 5372 }
5373 } 5373 }
5374 5374
5375 void showLayerTree(const WebCore::RenderObject* renderer) 5375 void showLayerTree(const WebCore::RenderObject* renderer)
5376 { 5376 {
5377 if (!renderer) 5377 if (!renderer)
5378 return; 5378 return;
5379 showLayerTree(renderer->enclosingLayer()); 5379 showLayerTree(renderer->enclosingLayer());
5380 } 5380 }
5381 #endif 5381 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/RenderLayerFilterInfo.cpp » ('j') | Source/core/rendering/svg/SVGRenderTreeAsText.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698