Ticket #5242: 5242_2.patch
File 5242_2.patch, 1.4 KB (added by , 14 years ago) |
---|
-
_source/plugins/styles/plugin.js
312 312 stylesDef = styleDefinition.styles; 313 313 314 314 // Builds the StyleText. 315 var stylesText = ( styleDefinition.attributes && styleDefinition.attributes[ 'style' ] ) || '', 316 specialStylesText = ''; 315 317 316 var stylesText = ( styleDefinition.attributes && styleDefinition.attributes[ 'style' ] ) || '';317 318 318 if ( stylesText.length ) 319 319 stylesText = stylesText.replace( semicolonFixRegex, ';' ); 320 320 321 321 for ( var style in stylesDef ) 322 stylesText += ( style + ':' + stylesDef[ style ] ).replace( semicolonFixRegex, ';' ); 322 { 323 var styleVal = stylesDef[ style ], 324 stylesText = ( style + ':' + styleVal ).replace( semicolonFixRegex, ';' ); 323 325 326 // Some browsers don't support 'inheirt' property value, leave them intact. (#5242) 327 if ( styleVal == 'inherit' ) 328 specialStylesText += stylesText; 329 else 330 stylesText += stylesText; 331 } 332 324 333 // Browsers make some changes to the style when applying them. So, here 325 334 // we normalize it to the browser format. 326 335 if ( stylesText.length ) 327 336 stylesText = normalizeCssText( stylesText ); 328 337 338 stylesText += specialStylesText; 339 329 340 // Return it, saving it to the next request. 330 341 return ( styleDefinition._ST = stylesText ); 331 342 };