On May 13, 2008, at 15:24, Vincent Hennebert wrote:
FWIW: The test should pass now. I'm not 100% certain whether the change is correct, but the element-list we get has the box we're looking for at position 3 (index 2), so I simply skipped the first two elements in thelist...I can’t help but think that something’s going wrong here. Was the test just modified so that it passes again, or does it really reflect the changes made in the code?
Both. What is probably still incomplete, is that the fo:wrapper generates a dummy InlineKnuthSequence, so that its id survives until area-tree generation.
Before the changes I made, this sequence would also result in an Inline area, which would cause a ClassCastException during the addAreas() phase. Instead, the check in FlowLM was put there to filter the InlineKnuthSequence out, and signal an error/warning if the fo:wrapper was a descendant of the fo:flow.
SEVERE: inline area not allowed under flow - ignoring
By ignoring the area, id references to the fo:wrapper were useless.ATM, the inline-sequence remains. The position is properly wrapped by the parent LM, due to the small change to BlockStackingLM.wrapPositionElements(), which can now also handle elements that are sequences themselves.
Are those 2 new elements at the beginning of the list now to be expected?
I did expect /some/ change. Seeing this inline-sequence in the meantime already got me looking into also overriding WrapperLM.getNextKnuthElements(), to generate a proper block-box in those cases, but the checks in the testcase would remain the same as they are now.
Also, the wrapper_block.xml testcase now gives the following message twice:SEVERE: Could not create block pointers. FOText w/o Block ancestor.
I'll look into this as well. Probably a result of white-spaces that are unnecessarily preserved.
I don’t want to sound too much negative, I don’t really follow the changes you’ve been doing in this area, but I’m slighty concerned. Mypoint simply is that if there’s something I don’t fully understand, I’drather not touch it.
No problem. You're obviously right about being cautious. OTOH, if you never touch it, you'll never fully understand it... ;-)
Cheers Andreas
