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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 26 14:27:25 PDT 2013


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





--- Comment #8 from Frédéric Wang <fred.wang at free.fr>  2013-06-26 14:29:21 PST ---
> 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.

> 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.

-- 
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