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

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

Issue 197283025: Use new is*Element() helper functions more in rendering code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderImage.cpp ('k') | Source/core/rendering/RenderListBox.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 2019 matching lines...) Expand 10 before | Expand all | Expand 10 after
2030 rootRelativeBounds = calculateLayerBounds(paintingInfo.rootLayer , &offsetFromRoot, 0); 2030 rootRelativeBounds = calculateLayerBounds(paintingInfo.rootLayer , &offsetFromRoot, 0);
2031 rootRelativeBoundsComputed = true; 2031 rootRelativeBoundsComputed = true;
2032 } 2032 }
2033 2033
2034 context->clipPath(clipPath->path(rootRelativeBounds), clipPath->wind Rule()); 2034 context->clipPath(clipPath->path(rootRelativeBounds), clipPath->wind Rule());
2035 } else if (style->clipPath()->type() == ClipPathOperation::REFERENCE) { 2035 } else if (style->clipPath()->type() == ClipPathOperation::REFERENCE) {
2036 ReferenceClipPathOperation* referenceClipPathOperation = toReference ClipPathOperation(style->clipPath()); 2036 ReferenceClipPathOperation* referenceClipPathOperation = toReference ClipPathOperation(style->clipPath());
2037 Document& document = renderer()->document(); 2037 Document& document = renderer()->document();
2038 // FIXME: It doesn't work with forward or external SVG references (h ttps://bugs.webkit.org/show_bug.cgi?id=90405) 2038 // FIXME: It doesn't work with forward or external SVG references (h ttps://bugs.webkit.org/show_bug.cgi?id=90405)
2039 Element* element = document.getElementById(referenceClipPathOperatio n->fragment()); 2039 Element* element = document.getElementById(referenceClipPathOperatio n->fragment());
2040 if (element && element->hasTagName(SVGNames::clipPathTag) && element ->renderer()) { 2040 if (isSVGClipPathElement(element) && element->renderer()) {
2041 if (!rootRelativeBoundsComputed) { 2041 if (!rootRelativeBoundsComputed) {
2042 rootRelativeBounds = calculateLayerBounds(paintingInfo.rootL ayer, &offsetFromRoot, 0); 2042 rootRelativeBounds = calculateLayerBounds(paintingInfo.rootL ayer, &offsetFromRoot, 0);
2043 rootRelativeBoundsComputed = true; 2043 rootRelativeBoundsComputed = true;
2044 } 2044 }
2045 2045
2046 resourceClipper = toRenderSVGResourceClipper(toRenderSVGResource Container(element->renderer())); 2046 resourceClipper = toRenderSVGResourceClipper(toRenderSVGResource Container(element->renderer()));
2047 if (!resourceClipper->applyClippingToContext(renderer(), rootRel ativeBounds, 2047 if (!resourceClipper->applyClippingToContext(renderer(), rootRel ativeBounds,
2048 paintingInfo.paintDirtyRect, context, clipperContext)) { 2048 paintingInfo.paintDirtyRect, context, clipperContext)) {
2049 // No need to post-apply the clipper if this failed. 2049 // No need to post-apply the clipper if this failed.
2050 resourceClipper = 0; 2050 resourceClipper = 0;
(...skipping 2013 matching lines...) Expand 10 before | Expand all | Expand 10 after
4064 } 4064 }
4065 } 4065 }
4066 4066
4067 void showLayerTree(const WebCore::RenderObject* renderer) 4067 void showLayerTree(const WebCore::RenderObject* renderer)
4068 { 4068 {
4069 if (!renderer) 4069 if (!renderer)
4070 return; 4070 return;
4071 showLayerTree(renderer->enclosingLayer()); 4071 showLayerTree(renderer->enclosingLayer());
4072 } 4072 }
4073 #endif 4073 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderImage.cpp ('k') | Source/core/rendering/RenderListBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698