Only use parallel rendering in MathML mode
* It turned out that parallel rendering causes problems in the PNG rendering mode. * This change disables parallel rendering for all modes but MahtML for now. Bug: T127738 Change-Id: Ie0f7b391e89f53bac3490203e060c10c21d5e312
This commit is contained in:
parent
a4948c208a
commit
ac59fdcefc
|
@ -184,9 +184,6 @@ class MathHooks {
|
||||||
if ( trim( $content ) === '' ) { // bug 8372
|
if ( trim( $content ) === '' ) { // bug 8372
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
$marker = Parser::MARKER_PREFIX .
|
|
||||||
'-postMath-' . sprintf( '%08X', $n ++ ) .
|
|
||||||
Parser::MARKER_SUFFIX;
|
|
||||||
|
|
||||||
$mode = self::mathModeToString( $parser->getUser()->getOption( 'math' ) );
|
$mode = self::mathModeToString( $parser->getUser()->getOption( 'math' ) );
|
||||||
// Indicate that this page uses math.
|
// Indicate that this page uses math.
|
||||||
|
@ -194,14 +191,17 @@ class MathHooks {
|
||||||
$parser->getOptions()->optionUsed( 'math' );
|
$parser->getOptions()->optionUsed( 'math' );
|
||||||
$renderer = MathRenderer::getRenderer( $content, $attributes, $mode );
|
$renderer = MathRenderer::getRenderer( $content, $attributes, $mode );
|
||||||
|
|
||||||
self::$tags[$marker] = array( $renderer, $parser );
|
|
||||||
$parser->getOutput()->addModuleStyles( array( 'ext.math.styles' ) );
|
$parser->getOutput()->addModuleStyles( array( 'ext.math.styles' ) );
|
||||||
if ( $mode == 'mathml' ) {
|
if ( $mode == 'mathml' ) {
|
||||||
$parser->getOutput()->addModuleStyles( array( 'ext.math.desktop.styles' ) );
|
$parser->getOutput()->addModuleStyles( array( 'ext.math.desktop.styles' ) );
|
||||||
$parser->getOutput()->addModules( array( 'ext.math.scripts' ) );
|
$parser->getOutput()->addModules( array( 'ext.math.scripts' ) );
|
||||||
}
|
$marker = Parser::MARKER_PREFIX .
|
||||||
|
'-postMath-' . sprintf( '%08X', $n ++ ) .
|
||||||
|
Parser::MARKER_SUFFIX;
|
||||||
|
self::$tags[$marker] = array( $renderer, $parser );
|
||||||
return $marker;
|
return $marker;
|
||||||
|
}
|
||||||
|
return self::mathPostTagHook( $renderer, $parser );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue