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

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

Issue 889563002: Make RenderObject::style() return a const object (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix a crashers (everything is building!) Created 5 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
Index: Source/core/svg/SVGLengthContext.cpp
diff --git a/Source/core/svg/SVGLengthContext.cpp b/Source/core/svg/SVGLengthContext.cpp
index 9c1a4d15c19902e297c787185e7235ac2ac2bef3..877b78e0fdc964ead37cd771c40e76d52af293db 100644
--- a/Source/core/svg/SVGLengthContext.cpp
+++ b/Source/core/svg/SVGLengthContext.cpp
@@ -216,7 +216,7 @@ float SVGLengthContext::convertValueFromPercentageToUserUnits(const SVGLength& v
return 0;
}
-static inline RenderStyle* renderStyleForLengthResolving(const SVGElement* context)
+static inline const RenderStyle* renderStyleForLengthResolving(const SVGElement* context)
{
if (!context)
return 0;
@@ -235,7 +235,7 @@ static inline RenderStyle* renderStyleForLengthResolving(const SVGElement* conte
float SVGLengthContext::convertValueFromUserUnitsToEMS(float value, ExceptionState& exceptionState) const
{
- RenderStyle* style = renderStyleForLengthResolving(m_context);
+ const RenderStyle* style = renderStyleForLengthResolving(m_context);
if (!style) {
exceptionState.throwDOMException(NotSupportedError, "No context could be found.");
return 0;
@@ -252,7 +252,7 @@ float SVGLengthContext::convertValueFromUserUnitsToEMS(float value, ExceptionSta
float SVGLengthContext::convertValueFromEMSToUserUnits(float value, ExceptionState& exceptionState) const
{
- RenderStyle* style = renderStyleForLengthResolving(m_context);
+ const RenderStyle* style = renderStyleForLengthResolving(m_context);
if (!style) {
exceptionState.throwDOMException(NotSupportedError, "No context could be found.");
return 0;
@@ -263,7 +263,7 @@ float SVGLengthContext::convertValueFromEMSToUserUnits(float value, ExceptionSta
float SVGLengthContext::convertValueFromUserUnitsToEXS(float value, ExceptionState& exceptionState) const
{
- RenderStyle* style = renderStyleForLengthResolving(m_context);
+ const RenderStyle* style = renderStyleForLengthResolving(m_context);
if (!style) {
exceptionState.throwDOMException(NotSupportedError, "No context could be found.");
return 0;
@@ -282,7 +282,7 @@ float SVGLengthContext::convertValueFromUserUnitsToEXS(float value, ExceptionSta
float SVGLengthContext::convertValueFromEXSToUserUnits(float value, ExceptionState& exceptionState) const
{
- RenderStyle* style = renderStyleForLengthResolving(m_context);
+ const RenderStyle* style = renderStyleForLengthResolving(m_context);
if (!style) {
exceptionState.throwDOMException(NotSupportedError, "No context could be found.");
return 0;

Powered by Google App Engine
This is Rietveld 408576698