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

Side by Side Diff: Source/core/css/SVGCSSComputedStyleDeclaration.cpp

Issue 23581008: Revert r154797: "Move isValid/isCurrentColor from Color to StyleColor" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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
OLDNEW
1 /* 1 /*
2 Copyright (C) 2007 Eric Seidel <eric@webkit.org> 2 Copyright (C) 2007 Eric Seidel <eric@webkit.org>
3 Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 3 Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 break; 76 break;
77 } 77 }
78 } while (paintorder >>= kPaintOrderBitwidth); 78 } while (paintorder >>= kPaintOrderBitwidth);
79 79
80 return list.release(); 80 return list.release();
81 } 81 }
82 82
83 PassRefPtr<SVGPaint> CSSComputedStyleDeclaration::adjustSVGPaintForCurrentColor( PassRefPtr<SVGPaint> newPaint, RenderStyle* style) const 83 PassRefPtr<SVGPaint> CSSComputedStyleDeclaration::adjustSVGPaintForCurrentColor( PassRefPtr<SVGPaint> newPaint, RenderStyle* style) const
84 { 84 {
85 RefPtr<SVGPaint> paint = newPaint; 85 RefPtr<SVGPaint> paint = newPaint;
86 if (paint->paintType() == SVGPaint::SVG_PAINTTYPE_CURRENTCOLOR || paint->pai ntType() == SVGPaint::SVG_PAINTTYPE_URI_CURRENTCOLOR) { 86 if (paint->paintType() == SVGPaint::SVG_PAINTTYPE_CURRENTCOLOR || paint->pai ntType() == SVGPaint::SVG_PAINTTYPE_URI_CURRENTCOLOR)
87 // SVG handles currentColor itself, style->color() is guaranteed not to be currentColor. 87 paint->setColor(style->color());
88 ASSERT(!style->color().isCurrentColor());
89 paint->setColor(style->color().color());
90 }
91 return paint.release(); 88 return paint.release();
92 } 89 }
93 90
94 PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getSVGPropertyCSSValue(CSSProp ertyID propertyID, EUpdateLayout updateLayout) const 91 PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getSVGPropertyCSSValue(CSSProp ertyID propertyID, EUpdateLayout updateLayout) const
95 { 92 {
96 Node* node = m_node.get(); 93 Node* node = m_node.get();
97 if (!node) 94 if (!node)
98 return 0; 95 return 0;
99 96
100 // Make sure our layout is up to date before we allow a query on these attri butes. 97 // Make sure our layout is up to date before we allow a query on these attri butes.
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 default: 224 default:
228 // If you crash here, it's because you added a css property and are not handling it 225 // If you crash here, it's because you added a css property and are not handling it
229 // in either this switch statement or the one in CSSComputedStyleDelcara tion::getPropertyCSSValue 226 // in either this switch statement or the one in CSSComputedStyleDelcara tion::getPropertyCSSValue
230 ASSERT_WITH_MESSAGE(0, "unimplemented propertyID: %d", propertyID); 227 ASSERT_WITH_MESSAGE(0, "unimplemented propertyID: %d", propertyID);
231 } 228 }
232 LOG_ERROR("unimplemented propertyID: %d", propertyID); 229 LOG_ERROR("unimplemented propertyID: %d", propertyID);
233 return 0; 230 return 0;
234 } 231 }
235 232
236 } 233 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698