(chars)
| 5555 | |
| 5556 | |
| 5557 | var buildCommon_tryCombineChars = function tryCombineChars(chars) { |
| 5558 | for (var i = 0; i < chars.length - 1; i++) { |
| 5559 | var prev = chars[i]; |
| 5560 | var next = chars[i + 1]; |
| 5561 | |
| 5562 | if (prev instanceof domTree_SymbolNode && next instanceof domTree_SymbolNode && buildCommon_canCombine(prev, next)) { |
| 5563 | prev.text += next.text; |
| 5564 | prev.height = Math.max(prev.height, next.height); |
| 5565 | prev.depth = Math.max(prev.depth, next.depth); // Use the last character's italic correction since we use |
| 5566 | // it to add padding to the right of the span created from |
| 5567 | // the combined characters. |
| 5568 | |
| 5569 | prev.italic = next.italic; |
| 5570 | chars.splice(i + 1, 1); |
| 5571 | i--; |
| 5572 | } |
| 5573 | } |
| 5574 | |
| 5575 | return chars; |
| 5576 | }; |
| 5577 | /** |
| 5578 | * Calculate the height, depth, and maxFontSize of an element based on its |
| 5579 | * children. |
nothing calls this directly
no test coverage detected