js/plugins/highchart/modules/exporting.src.js
/**
	 * Call this on all elements and recurse to children
	 */
Call this on all elements and recurse to children
Call this on all elements and recurse to children
function recurse(node) {
		var prop,
			styles,
			parentStyles,
			cssText = '',
			dummy,
			styleAttr,
			blacklisted,
			i;
		if (node.nodeType === 1 && unstyledElements.indexOf(node.nodeName) === -1) {
			styles = win.getComputedStyle(node, null);
			parentStyles = node.nodeName === 'svg' ? {} : win.getComputedStyle(node.parentNode, null);
			if (!defaultStyles[node.nodeName]) {
				if (!dummySVG) {
					dummySVG = doc.createElementNS(H.SVG_NS, 'svg');
					dummySVG.setAttribute('version', '1.1');
					doc.body.appendChild(dummySVG);
				}
				dummy = doc.createElementNS(node.namespaceURI, node.nodeName);
				dummySVG.appendChild(dummy);
				defaultStyles[node.nodeName] = merge(win.getComputedStyle(dummy, null)); 
				dummySVG.removeChild(dummy);
			}
			for (prop in styles) {
				blacklisted = false;
				i = blacklist.length;
				while (i-- && !blacklisted) {
					blacklisted = blacklist[i].test(prop) || typeof styles[prop] === 'function';
				}
				if (!blacklisted) {
					if (parentStyles[prop] !== styles[prop] && defaultStyles[node.nodeName][prop] !== styles[prop]) {
						if (inlineToAttributes.indexOf(prop) !== -1) {
							node.setAttribute(hyphenate(prop), styles[prop]);
						} else {
							cssText += hyphenate(prop) + ':' + styles[prop] + ';';
						}
					}
				}
			}
			if (cssText) {
				styleAttr = node.getAttribute('style');
				node.setAttribute('style', (styleAttr ? styleAttr + ';' : '') + cssText);
			}
			if (node.nodeName === 'text') {
				return;
			}
			each(node.children || node.childNodes, recurse);
		}
	}
function recurse ( node ) { var prop , styles , parentStyles , cssText = '' , dummy , styleAttr , blacklisted , i ; if ( node . nodeType === 1 && unstyledElements . indexOf ( node . nodeName ) === - 1 ) { styles = win . getComputedStyle ( node , null ) ; parentStyles = node . nodeName === 'svg' ? { } : win . getComputedStyle ( node . parentNode , null ) ; if ( ! defaultStyles [ node . nodeName ] ) { if ( ! dummySVG ) { dummySVG = doc . createElementNS ( H . SVG_NS , 'svg' ) ; dummySVG . setAttribute ( 'version' , '1.1' ) ; doc . body . appendChild ( dummySVG ) ; } dummy = doc . createElementNS ( node . namespaceURI , node . nodeName ) ; dummySVG . appendChild ( dummy ) ; defaultStyles [ node . nodeName ] = merge ( win . getComputedStyle ( dummy , null ) ) ; dummySVG . removeChild ( dummy ) ; } for ( prop in styles ) { blacklisted = false ; i = blacklist . length ; while ( i -- && ! blacklisted ) { blacklisted = blacklist [ i ] . test ( prop ) || typeof styles [ prop ] === 'function' ; } if ( ! blacklisted ) { if ( parentStyles [ prop ] !== styles [ prop ] && defaultStyles [ node . nodeName ] [ prop ] !== styles [ prop ] ) { if ( inlineToAttributes . indexOf ( prop ) !== - 1 ) { node . setAttribute ( hyphenate ( prop ) , styles [ prop ] ) ; } else { cssText += hyphenate ( prop ) + ':' + styles [ prop ] + ';' ; } } } } if ( cssText ) { styleAttr = node . getAttribute ( 'style' ) ; node . setAttribute ( 'style' , ( styleAttr ? styleAttr + ';' : '' ) + cssText ) ; } if ( node . nodeName === 'text' ) { return ; } each ( node . children || node . childNodes , recurse ) ; } }
Call this on all elements and recurse to children
Call this on all elements and recurse to children
// Get default styles from the browser so that we don't have to add these // Copy, so we can remove the node // Loop over all the computed styles and check whether they are in the  // white list for styles or atttributes. // Check against blacklist // If parent node has the same style, it gets inherited, no need to inline it // Attributes // Styles // Apply styles // Recurse