(measure)
| 636 | |
| 637 | var zwspSupported; |
| 638 | function zeroWidthElement(measure) { |
| 639 | if (zwspSupported == null) { |
| 640 | var test = elt("span", "\u200b"); |
| 641 | removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")])); |
| 642 | if (measure.firstChild.offsetHeight != 0) |
| 643 | { zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); } |
| 644 | } |
| 645 | var node = zwspSupported ? elt("span", "\u200b") : |
| 646 | elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px"); |
| 647 | node.setAttribute("cm-text", ""); |
| 648 | return node |
| 649 | } |
| 650 | |
| 651 | // Feature-detect IE's crummy client rect reporting for bidi text |
| 652 | var badBidiRects; |
no test coverage detected