Don't make mspace use handleSize, since it doesn't need to have font-size set. This was causing problems with the change to px from em's in Chrome. Should resolve problems Fred found with issue #295.
This commit is contained in:
parent
6b87ad787d
commit
4594333277
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -302,7 +302,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
|
|||
// Set width/position based on the type of column
|
||||
//
|
||||
if (CWIDTH[j].match(/%$/)) {
|
||||
var pp = HTMLCSS.unEm(CWIDTH[j]) * Wf;
|
||||
var pp = parseFloat(CWIDTH[j]) * Wf;
|
||||
if (f === 0) {
|
||||
CjStyle.width = (wp + pp) + "%"; xp += wp + pp;
|
||||
Cj = HTMLCSS.createBox(Cj); HTMLCSS.addBox(Cj,C[j].firstChild);
|
||||
|
|
|
@ -904,17 +904,13 @@
|
|||
if (before) {span.insertBefore(space,span.firstChild)} else {span.appendChild(space)}
|
||||
return space;
|
||||
},
|
||||
createSpace: function (span,h,d,w,color) {
|
||||
createSpace: function (span,h,d,w,color,isSpace) {
|
||||
if (h < -d) {d = -h} // make sure h is above d
|
||||
var H = this.Em(h+d), D = this.Em(-d);
|
||||
if (this.msieInlineBlockAlignBug) {D = this.Em(HTMLCSS.getHD(span.parentNode).d-d)}
|
||||
if (span.isBox || span.className == "mspace") {
|
||||
var scale = (span.scale == null ? 1 : span.scale);
|
||||
span.bbox = {
|
||||
exactW: true,
|
||||
h: h*scale, d: d*scale,
|
||||
w: w*scale, rw: w*scale, lw: 0
|
||||
};
|
||||
if (span.isBox || isSpace) {
|
||||
var scale = (span.scale == null ? 1 : span.scale);
|
||||
span.bbox = {exactW: true, h: h*scale, d: d*scale, w: w*scale, rw: w*scale, lw: 0};
|
||||
span.style.height = H; span.style.verticalAlign = D;
|
||||
span.HH = (h+d)*scale;
|
||||
} else {
|
||||
|
@ -1066,7 +1062,7 @@
|
|||
var r = 0, c = -bbox.w/2, l = "50%";
|
||||
if (this.initialSkipBug) {r = bbox.w-bbox.rw-.1; c += bbox.lw}
|
||||
if (this.msieMarginScaleBug) {c = (c*this.em) + "px"} else {c = this.Em(c)}
|
||||
if (isRelative) {c = ""; l = (50 - HTMLCSS.unEm(bbox.width)/2) + "%"}
|
||||
if (isRelative) {c = ""; l = (50 - parseFloat(bbox.width)/2) + "%"}
|
||||
HUB.Insert(span.style,({
|
||||
right: {left:"", right: this.Em(r)},
|
||||
center: {left:l, marginLeft: c}
|
||||
|
@ -2113,15 +2109,15 @@
|
|||
|
||||
MML.mspace.Augment({
|
||||
toHTML: function (span) {
|
||||
span = this.HTMLhandleSize(this.HTMLcreateSpan(span));
|
||||
span = this.HTMLcreateSpan(span);
|
||||
var values = this.getValues("height","depth","width");
|
||||
var mu = this.HTMLgetMu(span);
|
||||
values.mathbackground = this.mathbackground;
|
||||
if (this.background && !this.mathbackground) {values.mathbackground = this.background}
|
||||
var h = HTMLCSS.length2em(values.height,mu) / span.scale,
|
||||
d = HTMLCSS.length2em(values.depth,mu) / span.scale,
|
||||
w = HTMLCSS.length2em(values.width,mu) / span.scale;
|
||||
HTMLCSS.createSpace(span,h,d,w,values.mathbackground);
|
||||
var h = HTMLCSS.length2em(values.height,mu),
|
||||
d = HTMLCSS.length2em(values.depth,mu),
|
||||
w = HTMLCSS.length2em(values.width,mu);
|
||||
HTMLCSS.createSpace(span,h,d,w,values.mathbackground,true);
|
||||
return span;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user