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

Side by Side Diff: Source/core/svg/SVGStopElement.cpp

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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/svg/SVGSVGElement.cpp ('k') | Source/core/svg/SVGTextContentElement.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) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 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 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 void SVGStopElement::parseAttribute(const QualifiedName& name, const AtomicStrin g& value) 43 void SVGStopElement::parseAttribute(const QualifiedName& name, const AtomicStrin g& value)
44 { 44 {
45 parseAttributeNew(name, value); 45 parseAttributeNew(name, value);
46 } 46 }
47 47
48 void SVGStopElement::svgAttributeChanged(const QualifiedName& attrName) 48 void SVGStopElement::svgAttributeChanged(const QualifiedName& attrName)
49 { 49 {
50 if (attrName == SVGNames::offsetAttr) { 50 if (attrName == SVGNames::offsetAttr) {
51 SVGElement::InvalidationGuard invalidationGuard(this); 51 SVGElement::InvalidationGuard invalidationGuard(this);
52 52
53 if (renderer()) 53 if (layoutObject())
54 markForLayoutAndParentResourceInvalidation(renderer()); 54 markForLayoutAndParentResourceInvalidation(layoutObject());
55 return; 55 return;
56 } 56 }
57 57
58 SVGElement::svgAttributeChanged(attrName); 58 SVGElement::svgAttributeChanged(attrName);
59 } 59 }
60 60
61 LayoutObject* SVGStopElement::createLayoutObject(const LayoutStyle&) 61 LayoutObject* SVGStopElement::createLayoutObject(const LayoutStyle&)
62 { 62 {
63 return new LayoutSVGGradientStop(this); 63 return new LayoutSVGGradientStop(this);
64 } 64 }
65 65
66 bool SVGStopElement::layoutObjectIsNeeded(const LayoutStyle&) 66 bool SVGStopElement::layoutObjectIsNeeded(const LayoutStyle&)
67 { 67 {
68 return true; 68 return true;
69 } 69 }
70 70
71 Color SVGStopElement::stopColorIncludingOpacity() const 71 Color SVGStopElement::stopColorIncludingOpacity() const
72 { 72 {
73 LayoutStyle* style = renderer() ? renderer()->style() : 0; 73 LayoutStyle* style = layoutObject() ? layoutObject()->style() : 0;
74 // FIXME: This check for null style exists to address Bug WK 90814, a rare c rash condition in 74 // FIXME: This check for null style exists to address Bug WK 90814, a rare c rash condition in
75 // which the renderer or style is null. This entire class is scheduled for r emoval (Bug WK 86941) 75 // which the renderer or style is null. This entire class is scheduled for r emoval (Bug WK 86941)
76 // and we will tolerate this null check until then. 76 // and we will tolerate this null check until then.
77 if (!style) 77 if (!style)
78 return Color(Color::transparent); // Transparent black. 78 return Color(Color::transparent); // Transparent black.
79 79
80 const SVGLayoutStyle& svgStyle = style->svgStyle(); 80 const SVGLayoutStyle& svgStyle = style->svgStyle();
81 return svgStyle.stopColor().combineWithAlpha(svgStyle.stopOpacity()); 81 return svgStyle.stopColor().combineWithAlpha(svgStyle.stopOpacity());
82 } 82 }
83 83
84 } // namespace blink 84 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/svg/SVGSVGElement.cpp ('k') | Source/core/svg/SVGTextContentElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698