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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGUseElement.cpp

Issue 1840343002: Do not show display:none clipPath targets when referenced with <use> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « third_party/WebKit/LayoutTests/svg/clip-path/display-none-children-expected.html ('k') | no next file » | 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) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org> 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org>
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
5 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 5 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
6 * Copyright (C) 2012 University of Szeged 6 * Copyright (C) 2012 University of Szeged
7 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org> 7 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org>
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 || isSVGPolylineElement(element) 486 || isSVGPolylineElement(element)
487 || isSVGTextElement(element); 487 || isSVGTextElement(element);
488 } 488 }
489 489
490 void SVGUseElement::toClipPath(Path& path) const 490 void SVGUseElement::toClipPath(Path& path) const
491 { 491 {
492 ASSERT(path.isEmpty()); 492 ASSERT(path.isEmpty());
493 493
494 const SVGGraphicsElement* element = targetGraphicsElementForClipping(); 494 const SVGGraphicsElement* element = targetGraphicsElementForClipping();
495 495
496 if (!element) 496 if (!element || !element->layoutObject())
497 return; 497 return;
498 498
499 if (element->isSVGGeometryElement()) { 499 if (element->isSVGGeometryElement()) {
500 toSVGGeometryElement(*element).toClipPath(path); 500 toSVGGeometryElement(*element).toClipPath(path);
501 // FIXME: Avoid manual resolution of x/y here. Its potentially harmful. 501 // FIXME: Avoid manual resolution of x/y here. Its potentially harmful.
502 SVGLengthContext lengthContext(this); 502 SVGLengthContext lengthContext(this);
503 path.translate(FloatSize(m_x->currentValue()->value(lengthContext), m_y- >currentValue()->value(lengthContext))); 503 path.translate(FloatSize(m_x->currentValue()->value(lengthContext), m_y- >currentValue()->value(lengthContext)));
504 path.transform(calculateAnimatedLocalTransform()); 504 path.transform(calculateAnimatedLocalTransform());
505 } 505 }
506 } 506 }
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 751
752 if (m_resource) 752 if (m_resource)
753 m_resource->removeClient(this); 753 m_resource->removeClient(this);
754 754
755 m_resource = resource; 755 m_resource = resource;
756 if (m_resource) 756 if (m_resource)
757 m_resource->addClient(this); 757 m_resource->addClient(this);
758 } 758 }
759 759
760 } // namespace blink 760 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/clip-path/display-none-children-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698