Ticket #5018: 5018_4.patch
File 5018_4.patch, 2.4 KB (added by , 14 years ago) |
---|
-
_source/plugins/styles/plugin.js
937 937 for ( var attName in attributes ) 938 938 { 939 939 // The 'class' element value must match (#1318). 940 if ( attName == 'class' && element.getAttribute( attName ) != attributes[ attName ] ) 940 if ( ( attName == 'class' || style._.definition.fullMatch ) 941 && element.getAttribute( attName ) != normalizeProperty( attName, attributes[ attName ] ) ) 941 942 continue; 942 943 removeEmpty = element.hasAttribute( attName ); 943 944 element.removeAttribute( attName ); … … 945 946 946 947 for ( var styleName in styles ) 947 948 { 949 // Full match style insist on having fully equivalence. (#5018) 950 if ( style._.definition.fullMatch 951 && element.getStyle( styleName ) != normalizeProperty( styleName, styles[ styleName ], true ) ) 952 continue; 953 948 954 removeEmpty = removeEmpty || !!element.getStyle( styleName ); 949 955 element.removeStyle( styleName ); 950 956 } … … 1209 1215 return overrides; 1210 1216 } 1211 1217 1218 function normalizeProperty( name, value, isStyle ) 1219 { 1220 var temp = new CKEDITOR.dom.element( 'span' ); 1221 temp [ isStyle ? 'setStyle' : 'setAttribute' ]( name, value ); 1222 return temp[ isStyle ? 'getStyle' : 'getAttribute' ]( name ); 1223 } 1224 1212 1225 function normalizeCssText( unparsedCssText, nativeNormalize ) 1213 1226 { 1214 1227 var styleText; -
_source/plugins/find/dialogs/find.js
67 67 68 68 var findDialog = function( editor, startupPage ) 69 69 { 70 // Style object for highlights. 71 var highlightStyle = new CKEDITOR.style( editor.config.find_highlight ); 70 // Style object for highlights: (#5018) 71 // 1. Defined as full match style to avoid compromising ordinary text color styles. 72 // 2. Must be apply onto inner-most text to avoid conflicting with ordinary text color styles visually. 73 var highlightStyle = new CKEDITOR.style( CKEDITOR.tools.extend( { fullMatch : true, childRule : function(){ return false; } }, 74 editor.config.find_highlight ) ); 72 75 73 76 /** 74 77 * Iterator which walk through the specified range char by char. By