|
879 | 879 | delete jax.HTMLCSS;
|
880 | 880 | },
|
881 | 881 |
|
882 |
| - getHD: function (span) { |
883 |
| - if (span.bbox && this.config.noReflows) {return {h:span.bbox.h, d:span.bbox.d}} |
| 882 | + getHD: function (span,force) { |
| 883 | + if (span.bbox && this.config.noReflows && !force) {return {h:span.bbox.h, d:span.bbox.d}} |
884 | 884 | var position = span.style.position;
|
885 | 885 | span.style.position = "absolute";
|
886 | 886 | this.HDimg.style.height = "0px";
|
|
1096 | 1096 | createSpace: function (span,h,d,w,color,isSpace) {
|
1097 | 1097 | if (h < -d) {d = -h} // make sure h is above d
|
1098 | 1098 | var H = this.Em(h+d), D = this.Em(-d);
|
1099 |
| - if (this.msieInlineBlockAlignBug) {D = this.Em(HTMLCSS.getHD(span.parentNode).d-d)} |
| 1099 | + if (this.msieInlineBlockAlignBug) {D = this.Em(HTMLCSS.getHD(span.parentNode,true).d-d)} |
1100 | 1100 | if (span.isBox || isSpace) {
|
1101 | 1101 | var scale = (span.scale == null ? 1 : span.scale);
|
1102 | 1102 | span.bbox = {exactW: true, h: h*scale, d: d*scale, w: w*scale, rw: w*scale, lw: 0};
|
|
2860 | 2860 | // problem in strict HTML mode
|
2861 | 2861 | stack.style.fontSize = nobr.parentNode.style.fontSize; nobr.parentNode.style.fontSize = "";
|
2862 | 2862 | if (this.data[0] != null) {
|
2863 |
| - if (HTMLCSS.msieColorBug) { |
2864 |
| - if (this.background) {this.data[0].background = this.background; delete this.background} |
2865 |
| - if (this.mathbackground) {this.data[0].mathbackground = this.mathbackground; delete this.mathbackground} |
2866 |
| - } |
2867 | 2863 | MML.mbase.prototype.displayAlign = HUB.config.displayAlign;
|
2868 | 2864 | MML.mbase.prototype.displayIndent = HUB.config.displayIndent;
|
2869 | 2865 | if (String(HUB.config.displayIndent).match(/^0($|[a-z%])/i))
|
|
2942 | 2938 | //
|
2943 | 2939 | // Move the background color, of any
|
2944 | 2940 | //
|
2945 |
| - if (color) { |
2946 |
| - color.style.marginLeft = HTMLCSS.Em(parseFloat(color.style.marginLeft)+shift); |
2947 |
| - color.style.marginRight = |
2948 |
| - HTMLCSS.Em(parseFloat(color.style.marginRight)-shift |
2949 |
| - + (values.indentalign === "right" ? Math.min(0,span.bbox.w+shift) - span.bbox.w : 0)); |
2950 |
| - } |
| 2941 | + if (color) { |
| 2942 | + var L = parseFloat(color.style.marginLeft||"0")+shift, |
| 2943 | + R = parseFloat(color.style.marginRight||"0")-shift; |
| 2944 | + color.style.marginLeft = HTMLCSS.Em(L); |
| 2945 | + color.style.marginRight = |
| 2946 | + HTMLCSS.Em(R + (values.indentalign === "right" ? |
| 2947 | + Math.min(0,span.bbox.w+shift) - span.bbox.w : 0)); |
| 2948 | + if (HTMLCSS.msieColorBug && values.indentalign === "right") { |
| 2949 | + if (parseFloat(color.style.marginLeft) > 0) { |
| 2950 | + var padding = MathJax.HTML.addElement(color.parentNode,"span"); |
| 2951 | + padding.style.marginLeft = HTMLCSS.Em(R+Math.min(0,span.bbox.w+shift)); |
| 2952 | + color.nextSibling.style.marginRight = "0em"; |
| 2953 | + } |
| 2954 | + color.nextSibling.style.marginLeft = "0em"; |
| 2955 | + color.style.marginRight = color.style.marginLeft = "0em"; |
| 2956 | + } |
| 2957 | + } |
2951 | 2958 | }
|
2952 | 2959 | }
|
2953 | 2960 | }
|
|
3020 | 3027 | HTMLCSS.Augment({
|
3021 | 3028 | PaddingWidthBug: true,
|
3022 | 3029 | msieAccentBug: true,
|
3023 |
| - msieColorBug: true, |
| 3030 | + msieColorBug: (mode < 8), // negative margin-right doesn't work to position color |
3024 | 3031 | msieColorPositionBug: true, // needs position:relative to put color behind text
|
3025 | 3032 | msieRelativeWidthBug: quirks,
|
3026 | 3033 | msieDisappearingBug: (mode >= 8), // inline math disappears
|
|
0 commit comments