Ticket #8979: 8979_3.patch

File 8979_3.patch, 1.7 KB (added by Frederico Caldeira Knabben, 12 years ago)
  • _source/plugins/font/plugin.js

     
    9393                                                                // the styles.
    9494                                                                for ( var value in styles )
    9595                                                                {
    96                                                                         if ( styles[ value ].checkElementRemovable( element, true ) )
     96                                                                        if ( styles[ value ].checkElementMatch( element, true ) )
    9797                                                                        {
    9898                                                                                if ( value != currentValue )
    9999                                                                                        this.setValue( value );
  • _source/plugins/styles/plugin.js

     
    218218                        return true;
    219219                },
    220220
    221                 // Checks if an element, or any of its attributes, is removable by the
    222                 // current style definition.
    223                 checkElementRemovable : function( element, fullMatch )
     221                // Check if the element matches the current style definition.
     222                checkElementMatch : function( element, fullMatch )
    224223                {
    225224                        var def = this._.definition;
    226225
     
    266265                                        return true;
    267266                        }
    268267
    269                         // Check if the element can be somehow overriden.
     268                        return false;
     269                },
     270
     271                // Checks if an element, or any of its attributes, is removable by the
     272                // current style definition.
     273                checkElementRemovable : function( element, fullMatch )
     274                {
     275                        // Check element matches the style itself.
     276                        if ( this.checkElementMatch( element, fullMatch ) )
     277                                return true;
     278
     279                        // Check if the element matches the style overrides.
    270280                        var override = getOverrides( this )[ element.getName() ] ;
    271281                        if ( override )
    272282                        {
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy