|
846 | 846 | getW: function (span) {
|
847 | 847 | var W, H, w = (span.bbox||{}).w, start = span;
|
848 | 848 | if (span.bbox && span.bbox.exactW) {return w}
|
849 |
| - if ((span.bbox && w >= 0 && !this.initialSkipBug) || this.negativeBBoxes || !span.firstChild) { |
| 849 | + if ((span.bbox && w >= 0 && !this.initialSkipBug && !this.msieItalicWidthBug) || |
| 850 | + this.negativeBBoxes || !span.firstChild) { |
850 | 851 | W = span.offsetWidth; H = span.parentNode.offsetHeight;
|
851 | 852 | } else if (span.bbox && w < 0 && this.msieNegativeBBoxBug) {
|
852 | 853 | W = -span.offsetWidth, H = span.parentNode.offsetHeight;
|
853 | 854 | } else {
|
854 | 855 | // IE can't deal with a space at the beginning, so put something else first
|
855 |
| - if (this.initialSkipBug) { |
856 |
| - var position = span.style.position; span.style.position = "absolute"; |
857 |
| - start = this.startMarker; span.insertBefore(start,span.firstChild) |
858 |
| - } |
| 856 | + var position = span.style.position; span.style.position = "absolute"; |
| 857 | + start = this.startMarker; span.insertBefore(start,span.firstChild) |
859 | 858 | span.appendChild(this.endMarker);
|
860 | 859 | W = this.endMarker.offsetLeft - start.offsetLeft;
|
861 | 860 | span.removeChild(this.endMarker);
|
862 |
| - if (this.initialSkipBug) {span.removeChild(start); span.style.position = position} |
| 861 | + span.removeChild(start); span.style.position = position |
863 | 862 | }
|
864 | 863 | if (H != null) {span.parentNode.HH = H/this.em}
|
865 | 864 | return W/this.em;
|
|
2902 | 2901 | msieClipRectBug: !isIE8,
|
2903 | 2902 | msieNegativeSpaceBug: quirks,
|
2904 | 2903 | cloneNodeBug: (isIE8 && browser.version === "8.0"),
|
| 2904 | + msieItalicWidthBug: true, // can't measure boxes ending in italics correctly |
2905 | 2905 | initialSkipBug: (mode < 8), // confused by initial left-margin values
|
2906 | 2906 | msieNegativeBBoxBug: (mode >= 8), // negative bboxes have positive widths
|
2907 | 2907 | msieIE6: !isIE7,
|
|
0 commit comments