User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a4pre) Gecko/20070416 Minefield/3.0a4pre
This is for all 4 Rebuild(a), Recalculate(b), Rebuild(c), Refresh(d) as well as all together(e). These are all normative W3C test cases 10.1.1.(a-e)
Created attachment 261943 [details]
test case (for rebuild only)
see test suite link for all other scenarios
I pretty sure rebuild, recalculate, revalidate and refresh used
to work according to spec at some point. So is this a regression?
What does this actually mean: "This action causes the processing of xforms-rebuild to happen, bypassing the normal event flow"
What is the normal event flow?
Right now model->Rebuild(); is called, but should we just dispatch
xforms-rebuild to model?
My bad. I asked SteveS to open this bug. I looked at this last night and thought it was a bug since I know that even with deferred actions, when rebuild is called directly it executes right away. I forgot all about it being a direct action that bypassed the event flow.
(In reply to comment #4)
> What does this actually mean: "This action causes the processing of
> xforms-rebuild to happen, bypassing the normal event flow"
> What is the normal event flow?
according to the errata, this means: http://www.w3.org/2006/03/REC-xforms-20060314-errata.html#E5c
So looking at the errata: http://www.w3.org/2006/03/REC-xforms-20060314-errata.html#E5, there shouldn't even be an xforms-rebuild event dispatched in this testcase the way I read it. The xf:insert will defer a rebuild, but then the direct invocation of rebuild should cause the rebuild to happen without dispatching an event and clear the flag for the deferred rebuild.
Can someone else look at this and see if they read this the same way that I do? So in short I believe the testcase is wrong to say that there should be a rebuild and I think we are wrong since we do send a xforms-rebuild event.
ok, all of the logic in the code is correct for the most part. The issue is that when nsXFormsRebuildElement::HandleAction calls nsXFormsUtils::GetModel(mElement), it gets a different value back EVERY TIME. So when aParentAction->SetRebuild(model, PR_FALSE) is called, it is passing in a different value for model every time. So when action goes to look to see if that model has already had some deferred flags set on it, like DEFERRED_REBUILD, it won't find the model to clear the flag. That is why we are doing the deferred rebuild even though we don't need to.
Created attachment 262558 [details] [diff] [review]
fixed bug by qi'ing to nsISupports before storing, retrieving from mDeferredUpdates hashtable in nsXFormsActionElement.
checked into trunk
checked into 1.8 and 1.8.0 branches