Skip to content

Commit ab3a7e4

Browse files
committed
Always use start marker in IE (fixes sizes of background colors, see mphantom color test).
1 parent 0b4ee45 commit ab3a7e4

File tree

1 file changed

+6
-6
lines changed
  • unpacked/jax/output/HTML-CSS

1 file changed

+6
-6
lines changed

unpacked/jax/output/HTML-CSS/jax.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -846,20 +846,19 @@
846846
getW: function (span) {
847847
var W, H, w = (span.bbox||{}).w, start = span;
848848
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) {
850851
W = span.offsetWidth; H = span.parentNode.offsetHeight;
851852
} else if (span.bbox && w < 0 && this.msieNegativeBBoxBug) {
852853
W = -span.offsetWidth, H = span.parentNode.offsetHeight;
853854
} else {
854855
// 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)
859858
span.appendChild(this.endMarker);
860859
W = this.endMarker.offsetLeft - start.offsetLeft;
861860
span.removeChild(this.endMarker);
862-
if (this.initialSkipBug) {span.removeChild(start); span.style.position = position}
861+
span.removeChild(start); span.style.position = position
863862
}
864863
if (H != null) {span.parentNode.HH = H/this.em}
865864
return W/this.em;
@@ -2902,6 +2901,7 @@
29022901
msieClipRectBug: !isIE8,
29032902
msieNegativeSpaceBug: quirks,
29042903
cloneNodeBug: (isIE8 && browser.version === "8.0"),
2904+
msieItalicWidthBug: true, // can't measure boxes ending in italics correctly
29052905
initialSkipBug: (mode < 8), // confused by initial left-margin values
29062906
msieNegativeBBoxBug: (mode >= 8), // negative bboxes have positive widths
29072907
msieIE6: !isIE7,

0 commit comments

Comments
 (0)