Skip to content

Commit 5f9226c

Browse files
committed
Don't need to fix up width/height any more (fixed upstream in jsdom)
1 parent 27d251e commit 5f9226c

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

lib/mj-page.js

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -447,22 +447,6 @@ function AddError(prefix,message,nopush) {
447447
}
448448

449449

450-
/********************************************************************/
451-
452-
//
453-
// A bug in jsdom prevents explicit width and height from being
454-
// kept in the style information, so work around that.
455-
// WARNING: this depends on the internals of jsdom, and may need
456-
// to be adjusted in the future.
457-
//
458-
function SetWH(node,w,h) {
459-
if (!node.style.width) {
460-
var style = node.style;
461-
style[style._length] = "width"; style._length++; style._values.width = w;
462-
style[style._length] = "height"; style._length++; style._values.height = h;
463-
}
464-
}
465-
466450
/********************************************************************/
467451

468452
//
@@ -606,14 +590,6 @@ function AdjustSVG() {
606590
nodes = document.querySelectorAll(".MathJax_SVG[role=textbox], .MathJax_SVG_Display[role=textbox]");
607591
for (i = nodes.length-1; i >= 0; i--) nodes[i].setAttribute("role","math");
608592
//
609-
// Fix a problem with jsdom not setting width and height CSS.
610-
//
611-
nodes = document.querySelectorAll(".MathJax_SVG > span > span");
612-
for (i = nodes.length-1; i >= 0; i--) {
613-
var child = nodes[i].firstChild;
614-
SetWH(nodes[i],child.getAttribute("width"),child.getAttribute("height"));
615-
}
616-
//
617593
// Add speech text, if needed
618594
//
619595
if (data.speakText) {callback = GetSpeech()}

0 commit comments

Comments
 (0)