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

Unified Diff: Source/core/svg/SVGLengthContext.cpp

Issue 135913002: Do refactor in collectGradientAttributes() and renderStyleForLengthResolve() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/svg/SVGLinearGradientElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGLengthContext.cpp
diff --git a/Source/core/svg/SVGLengthContext.cpp b/Source/core/svg/SVGLengthContext.cpp
index 0f4b7bee928b13745646bb2f76681146a8d0e94c..73b96e9f821d735c57afe46e0c598fa1150b2ad6 100644
--- a/Source/core/svg/SVGLengthContext.cpp
+++ b/Source/core/svg/SVGLengthContext.cpp
@@ -217,11 +217,11 @@ static inline RenderStyle* renderStyleForLengthResolving(const SVGElement* conte
return 0;
const ContainerNode* currentContext = context;
- while (currentContext) {
+ do {
if (currentContext->renderer())
return currentContext->renderer()->style();
currentContext = currentContext->parentNode();
- }
+ } while (currentContext);
// There must be at least a RenderSVGRoot renderer, carrying a style.
ASSERT_NOT_REACHED();
« no previous file with comments | « no previous file | Source/core/svg/SVGLinearGradientElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698