RemexHtml/TreeBuilder/CachingStack.php
private function getScopeTypesToStack( $ns, $name ) {
		if ( $ns === HTMLData::NS_HTML ) {
			switch ( $name ) {
			case 'html':
			case 'table':
			case 'template':
				return self::$allScopes;

			case 'applet':
			case 'caption':
			case 'td':
			case 'th':
			case 'marquee':
			case 'object':
				return self::$nonTableScopes;

			case 'ol':
			case 'ul':
				return self::$listScopes;

			case 'button':
				return self::$buttonScopes;

			case 'option':
			case 'optgroup':
				return [];

			default:
				return self::$selectOnly;
			}
		} elseif ( $ns === HTMLData::NS_MATHML ) {
			if ( isset( self::$mathBreakers[$name] ) ) {
				return self::$nonTableScopes;
			} else {
				return self::$selectOnly;
			}
		} elseif ( $ns === HTMLData::NS_SVG ) {
			if ( isset( self::$svgBreakers[$name] ) ) {
				return self::$nonTableScopes;
			} else {
				return self::$selectOnly;
			}
		} else {
			return self::$selectOnly;
		}
	}
private function getScopeTypesToStack( $ns, $name ) {
		if ( $ns === HTMLData::NS_HTML ) {
			switch ( $name ) {
			case 'html':
			case 'table':
			case 'template':
				return self::$allScopes;

			case 'applet':
			case 'caption':
			case 'td':
			case 'th':
			case 'marquee':
			case 'object':
				return self::$nonTableScopes;

			case 'ol':
			case 'ul':
				return self::$listScopes;

			case 'button':
				return self::$buttonScopes;

			case 'option':
			case 'optgroup':
				return [];

			default:
				return self::$selectOnly;
			}
		} elseif ( $ns === HTMLData::NS_MATHML ) {
			if ( isset( self::$mathBreakers[$name] ) ) {
				return self::$nonTableScopes;
			} else {
				return self::$selectOnly;
			}
		} elseif ( $ns === HTMLData::NS_SVG ) {
			if ( isset( self::$svgBreakers[$name] ) ) {
				return self::$nonTableScopes;
			} else {
				return self::$selectOnly;
			}
		} else {
			return self::$selectOnly;
		}
	}
private function getScopeTypesToStack ( $ ns , $ name ) { if ( $ ns === HTMLData :: NS_HTML ) { switch ( $ name ) { case 'html' : case 'table' : case 'template' : return self :: $ allScopes ; case 'applet' : case 'caption' : case 'td' : case 'th' : case 'marquee' : case 'object' : return self :: $ nonTableScopes ; case 'ol' : case 'ul' : return self :: $ listScopes ; case 'button' : return self :: $ buttonScopes ; case 'option' : case 'optgroup' : return [ ] ; default : return self :: $ selectOnly ; } } elseif ( $ ns === HTMLData :: NS_MATHML ) { if ( isset ( self :: $ mathBreakers [ $ name ] ) ) { return self :: $ nonTableScopes ; } else { return self :: $ selectOnly ; } } elseif ( $ ns === HTMLData :: NS_SVG ) { if ( isset ( self :: $ svgBreakers [ $ name ] ) ) { return self :: $ nonTableScopes ; } else { return self :: $ selectOnly ; } } else { return self :: $ selectOnly ; } }
For a given namespace and element name, get the list of scopes
for which a new scope should be created and the old one needs to
be pushed onto the scope stack.
For a given namespace and element name get the list of scopes for which a new scope should be created and the old one needs to be pushed onto the scope stack .