What does this PR do?
This PR resolves an edge case I've stumbled across while rendering pages in phantomjs where computed styles for a <tspan> element can end up in a situation where all property values are set as empty strings.
This results in the fontSize value below being NaN. The fix in place will ensure that NaN values at this point also fallback to the default font size of 10.
Notably, if node.firstChild doesn't not exist, fontSize should still fallback to the default as: isNaN(undefined) // true
What does this PR do? This PR resolves an edge case I've stumbled across while rendering pages in
phantomjs
where computed styles for a<tspan>
element can end up in a situation where all property values are set as empty strings.This results in the
fontSize
value below beingNaN
. The fix in place will ensure thatNaN
values at this point also fallback to the default font size of10
.Notably, if
node.firstChild
doesn't not exist,fontSize
should still fallback to the default as:isNaN(undefined) // true
What is the root cause here? I think that the issue I've observed might be related to something like this https://bugs.webkit.org/show_bug.cgi?id=14563 but am not 100% sure.
Who might be interested in this PR? @tomasAlabes