imscJS icon indicating copy to clipboard operation
imscJS copied to clipboard

bugfix - textcombine

Open btsimonh opened this issue 3 years ago • 7 comments
trafficstars

fixes https://github.com/sandflow/imscJS/issues/232

btsimonh avatar Jul 15 '22 10:07 btsimonh

Does the test at https://github.com/w3c/imsc-tests/blob/main/imsc1_1/ttml/textCombine/textCombine001.ttml expose this behaviour?

nigelmegitt avatar Oct 10 '22 08:10 nigelmegitt

@nigelmegitt - gave a PR for imsc-tests to test this specific point. Images need re-rendering....

btsimonh avatar Oct 10 '22 10:10 btsimonh

What was wrong with your original proposal

I think @nigelmegitt wanted the code to highlight if _isd_element was not set, because it may clearly be an error? Hence the move of the test - but no logging in that fn, so console.error is the best I could do without a lot more mods?

btsimonh avatar Oct 11 '22 17:10 btsimonh

I think @nigelmegitt wanted the code to highlight if _isd_element was not set, because it may clearly be an error?

AFAIK _isd_element is set only on elements that are available for merging. Wasn't that the intent @nigelmegitt ?

palemieux avatar Oct 11 '22 17:10 palemieux

@palemieux Yes that was the intent, but I think we did not have test cases for textCombine and the code goes through a different path in that case.

It should not be the case that any elements that are candidates for merging do not have _isd_element so if that does happen we should have some mechanism for identifying it, like raising a console warning; at the same time we should fix those cases, and the elements that go through the textCombine path are one of the cases to be fixed, as I understand it.

nigelmegitt avatar Oct 12 '22 10:10 nigelmegitt

textCombine should not have _isd_element since it is not subject to span-per-character processing.

For the purpose of flagging things that should have _isd_element but do not have it, how would one differentiate an element that should have it but does not vs. an element that does not have because it should not have it.

palemieux avatar Oct 12 '22 17:10 palemieux

can you highlight a case of 'should not have it' where the recombine function would get called?

btsimonh avatar Oct 13 '22 06:10 btsimonh

Replaced by #239

palemieux avatar Nov 19 '22 22:11 palemieux