Ticket #8979: 8979.patch

File 8979.patch, 2.3 KB (added by Garry Yao, 12 years ago)
  • _source/plugins/font/plugin.js

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    8282                                                        var currentValue = this.getValue();
    8383
    8484                                                        var elementPath = ev.data.path,
    85                                                                 elements = elementPath.elements;
     85                                                                elements = elementPath.elements,
     86                                                                style;
    8687
    8788                                                        // For each element into the elements path.
    8889                                                        for ( var i = 0, element ; i < elements.length ; i++ )
     
    9394                                                                // the styles.
    9495                                                                for ( var value in styles )
    9596                                                                {
    96                                                                         if ( styles[ value ].checkElementRemovable( element, true ) )
     97                                                                        style = styles[ value ];
     98
     99                                                                        // Check if element style matches precisely.
     100                                                                        if ( style.checkElementRemovable( element, true ) == 1 )
    97101                                                                        {
    98102                                                                                if ( value != currentValue )
    99103                                                                                        this.setValue( value );
  • _source/plugins/styles/plugin.js

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    235235                        {
    236236                                // If no attributes are defined in the element.
    237237                                if ( !fullMatch && !element.hasAttributes() )
    238                                         return true;
     238                                        return 1;
    239239
    240240                                attribs = getAttributesForComparison( def );
    241241
     
    254254                                                        : attribs[ attName ] == elementAttr  )
    255255                                                {
    256256                                                        if ( !fullMatch )
    257                                                                 return true;
     257                                                                return 1;
    258258                                                }
    259259                                                else if ( fullMatch )
    260260                                                                return false;
    261261                                        }
    262262                                        if ( fullMatch )
    263                                                 return true;
     263                                                return 1;
    264264                                }
    265265                                else
    266                                         return true;
     266                                        return 1;
    267267                        }
    268268
    269269                        // Check if the element can be somehow overriden.
     
    272272                        {
    273273                                // If no attributes have been defined, remove the element.
    274274                                if ( !( attribs = override.attributes ) )
    275                                         return true;
     275                                        return 2;
    276276
    277277                                for ( var i = 0 ; i < attribs.length ; i++ )
    278278                                {
     
    291291                                                if ( attValue === null ||
    292292                                                                ( typeof attValue == 'string' && actualAttrValue == attValue ) ||
    293293                                                                attValue.test( actualAttrValue ) )
    294                                                         return true;
     294                                                        return 2;
    295295                                        }
    296296                                }
    297297                        }
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy