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

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: Rebase 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
« no previous file with comments | « no previous file | Source/core/rendering/RenderLayerFilterInfo.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2361 matching lines...) Expand 10 before | Expand all | Expand 10 after
2372 ReferenceClipPathOperation* referenceClipPathOperation = static_cast <ReferenceClipPathOperation*>(style->clipPath()); 2372 ReferenceClipPathOperation* referenceClipPathOperation = static_cast <ReferenceClipPathOperation*>(style->clipPath());
2373 Document& document = renderer()->document(); 2373 Document& document = renderer()->document();
2374 // FIXME: It doesn't work with forward or external SVG references (h ttps://bugs.webkit.org/show_bug.cgi?id=90405) 2374 // FIXME: It doesn't work with forward or external SVG references (h ttps://bugs.webkit.org/show_bug.cgi?id=90405)
2375 Element* element = document.getElementById(referenceClipPathOperatio n->fragment()); 2375 Element* element = document.getElementById(referenceClipPathOperatio n->fragment());
2376 if (element && element->hasTagName(SVGNames::clipPathTag) && element ->renderer()) { 2376 if (element && element->hasTagName(SVGNames::clipPathTag) && element ->renderer()) {
2377 if (!rootRelativeBoundsComputed) { 2377 if (!rootRelativeBoundsComputed) {
2378 rootRelativeBounds = calculateLayerBounds(paintingInfo.rootL ayer, &offsetFromRoot, 0); 2378 rootRelativeBounds = calculateLayerBounds(paintingInfo.rootL ayer, &offsetFromRoot, 0);
2379 rootRelativeBoundsComputed = true; 2379 rootRelativeBoundsComputed = true;
2380 } 2380 }
2381 2381
2382 resourceClipper = toRenderSVGResourceClipper(element->renderer() ->toRenderSVGResourceContainer()); 2382 resourceClipper = toRenderSVGResourceClipper(toRenderSVGResource Container(element->renderer()));
2383 if (!resourceClipper->applyClippingToContext(renderer(), rootRel ativeBounds, 2383 if (!resourceClipper->applyClippingToContext(renderer(), rootRel ativeBounds,
2384 paintingInfo.paintDirtyRect, context, clipperContext)) { 2384 paintingInfo.paintDirtyRect, context, clipperContext)) {
2385 // No need to post-apply the clipper if this failed. 2385 // No need to post-apply the clipper if this failed.
2386 resourceClipper = 0; 2386 resourceClipper = 0;
2387 } 2387 }
2388 } 2388 }
2389 } 2389 }
2390 } 2390 }
2391 2391
2392 // Blending operations must be performed only with the nearest ancestor stac king context. 2392 // Blending operations must be performed only with the nearest ancestor stac king context.
(...skipping 2288 matching lines...) Expand 10 before | Expand all | Expand 10 after
4681 } 4681 }
4682 } 4682 }
4683 4683
4684 void showLayerTree(const WebCore::RenderObject* renderer) 4684 void showLayerTree(const WebCore::RenderObject* renderer)
4685 { 4685 {
4686 if (!renderer) 4686 if (!renderer)
4687 return; 4687 return;
4688 showLayerTree(renderer->enclosingLayer()); 4688 showLayerTree(renderer->enclosingLayer());
4689 } 4689 }
4690 #endif 4690 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/RenderLayerFilterInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698