xmlgraphics-batik-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 42014] - baseVal cannot be initialized via DOM
Date Fri, 06 Apr 2007 00:58:42 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42014>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42014





------- Additional Comments From x00000000@freenet.de  2007-04-05 17:58 -------
(In reply to comment #5)
> > Note that the final validation will be bypassed if the *old* value was valid
> > (reset() inhibits the call of invalidate() in attrChanged()), i.e. this does
> > not throw an exception:
> 
> You're right.  I wonder why.

Probably this has been copied from simpler cases like
SVGOMAnimatedNumber.setBaseVal() without enough thinking. It assumes that
the value has just been validated resp. synced with the attribute, but that
isn't true here because revalidate() validates the *old* value.

> I think there is a case for throwing an exception here.  getValue() is meant to
> return the length value in user units.  If the unit type is invalid, because of
> a weird DOM attribute value (or doing a .newValueSpecifiedUnits() with an
> invalid unit type), there's no way to convert it to user units.  It's not clear
> whether some value should be returned or an exception should be thrown. 
> (Actually, the spec is clear that getValue() doesn't throw an exception, but I
> think it should either be changed to throw or clarified to say what value is
> returned.)

Ok, the spec also says: "It is invalid to attempt to define a new value of
this type". This might mean that anything could happen. And "attempt" may
imply that it won't succeed.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


Mime
View raw message