-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugfix - textcombine #233
bugfix - textcombine #233
Conversation
src/main/js/html.js
Outdated
@@ -663,6 +664,7 @@ | |||
|
|||
if (first.tagName === "SPAN" && | |||
second.tagName === "SPAN" && | |||
first._isd_element && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line will mask the impact of upstream code not setting _isd_element
when we want that to happen, so possibly better not to add it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I'm not sure in what circumstances _isd_element would be unset, but almost certainly we'd not want to combine spans which had not come from the same source element. I think it adds robustness. If we just want to highlight errors as well as being robust, we could move the test inside the if, and console.error? no access to context.errorHandler there at the moment :(.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point @btsimonh , I hadn't thought of it like that.
Does the test at https://github.com/w3c/imsc-tests/blob/main/imsc1_1/ttml/textCombine/textCombine001.ttml expose this behaviour? |
Add consecutive textCombine elements. These should be displayed independently. Image needs to be regenerated using this PR: sandflow/imscJS#233
@nigelmegitt - gave a PR for imsc-tests to test this specific point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@btsimonh What was wrong with your original proposal #232 (comment) ?
I think @nigelmegitt wanted the code to highlight if _isd_element was not set, because it may clearly be an error? |
AFAIK |
@palemieux Yes that was the intent, but I think we did not have test cases for It should not be the case that any elements that are candidates for merging do not have |
For the purpose of flagging things that should have |
can you highlight a case of 'should not have it' where the recombine function would get called? |
Replaced by #239 |
fixes #232