Make sure parents of percentage-width elements have percentage widths.

This commit is contained in:
Davide P. Cervone 2015-08-24 13:11:47 -04:00
parent 5296f1111f
commit e59f6d6484

View File

@ -1333,6 +1333,7 @@
bbox.append(cbox);
if (cbox.ic) {bbox.ic = cbox.ic} else {delete bbox.ic}
if (cbox.skew) bbox.skew = cbox.skew;
if (cbox.pwidth) bbox.pwidth = cbox.pwidth;
}
} else if (options.forceChild) {cnode = HTML.addElement(node,"mjx-box")}
return cnode;
@ -1476,6 +1477,9 @@
BBOX.pwidth = this.data[0].CHTML.pwidth;
BBOX.mwidth = this.data[0].CHTML.mwidth;
style.width = "100%";
} else if (BBOX.pwidth) {
BBOX.mwidth = BBOX.w;
style.width = "100%";
}
if (!this.style) return;
// ### FIXME: adjust for width, height, vertical-align?