[SVG 1.1] Some issues in the definition of suspendRedraw/unsuspendRedraw/forceRedraw

I was looking into implementing the suspendRedraw/unsuspendRedraw/forceRedraw 
methods of SVGElement, and ran into a number of things that are underdefined in 
the specification.  Specifically:

1)  Is suspendRedraw a hint, or a requirement?  That is, if I call

   elt.suspendRedraw(2000);

is the UA prohibited from doing redraws for those 2 seconds even if other things 
request a redraw?  Or is this just a hint to the UA that it doesn't need to 
worry too much about redraw for 2 seconds?

2)  What redraws does the suspendRedraw call actually prevent?  Redraw of the 
<svg> element and its descendants?  Redraw of everything in the document in 
which the <svg> node is currently located?  What if the <svg> node is the root 
node of a document in an <iframe>?  Is redraw of the iframe's parent document 
also prevented?  Note that the parent document may be layering things on top of 
or below the iframe.

However this is clarified, the clarification should deal with what happens when 
the DOM is modified between the suspendRedraw and unsuspendRedraw calls.   For 
example, what if the <svg> node is moved to a different document?

3)  What does "redraw" mean in this context?  I do not see the term defined in 
either chapter 2 or chapter 3 (which would be reasonable places to define it). 
How does "redraw" interact with invalidates due to DOM manipulation, image 
animations (eg GIF images), movement of windows around in the OS windowing 
environment, etc?  Most importantly, does suspending redraw mean that when the 
area needs to be painted the paint should not happen, or does it mean that some 
cached bitmap of what should be painted in that area should be used?  If the 
latter, and depending on what the answer to #2 was, what happens if the area in 
which redraw is suspended has changed size?

4)  Is there a difference between calling suspendRedraw on an outermost <svg> 
element and and <svg> element that has an <svg> ancestor?  Will redraw be 
prevented for the same things in both cases?  If so, this should be explicitly 
stated.  If not, the differences should be described.

5)  If forceRedraw is called while redraw is suspended via suspendRedraw, what 
should happen?

I don't see how any implementation of these methods can be done without making 
assumptions about what the answers to these questions are, and statistically 
speaking that should lead to non-interoperable implementations (there are at 
least 2 possible answers to each of the first 4 questions, so that's at least 16 
different implementations right there).

Given that Mozilla's current implemenation makes rather unreasonable assumptions 
about how this should be implemented, I'm probably going to remove said 
implementation altogether until such a time as there is a clear specification of 
how these methods should behave...

-Boris

Received on Sunday, 6 February 2005 22:08:45 UTC