[Webkit-unassigned] [Bug 118053] Parsing of MathML length

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 26 14:32:56 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=118053





--- Comment #9 from chris fleizach <cfleizach at apple.com>  2013-06-26 14:34:52 PST ---
(In reply to comment #8)
> > Yes I see that. the question is whether the function should return the result  or return success.
> > 
> > I think it could go either way, but I see that other methods return the result instead of success.
> > 
> 
> The point is that the default value is passed as input (as it is used for % and unitless) and replaced by the computed value. If you use it as a return value you need one additional parameter. For consistency, I've kept the same signature for ParseNamedSpace, although it does not use the default value.

Yes i understand. I think we're trying to achieve consistency with other code in WebKit in this instance in regards to result in pass-by-value or result in result.

> 
> > As to not checking the result value -- it obviously works, but it's possible someone in the future might set the value to zero on a failure and this might fail, so if the method returns a result you should probably check it for completeness
> 
> So that would mean doing a noop by setting the variable to the default value again. Well, I can do that if you really want but the point was to save some code since the default value is used by % and unitless anyway. Or I can also just remove the boolean success. In Mozilla it is used to display parsing errors in the console, but I'm not sure if I'll need it in WebKit at the moment.

It's probably sufficient to note in the comment that if parsing fails then value will not be altered

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list