Ticket #6609: 6609.patch

File 6609.patch, 1.4 KB (added by Garry Yao, 10 years ago)
  • _source/core/_bootstrap.js

     
    1616                return;
    1717        }
    1818
    19         // Check is High Contrast is active by creating a temporary element with a
    20         // background image.
    21 
    22         var useSpacer = CKEDITOR.env.ie && CKEDITOR.env.version < 7,
    23                 useBlank = CKEDITOR.env.ie && CKEDITOR.env.version == 7;
    24 
    25         var backgroundImageUrl = useSpacer ? ( CKEDITOR.basePath + 'images/spacer.gif' ) :
    26                                                          useBlank ? 'about:blank' : 'data:image/png;base64,';
    27 
     19        // Check whether high contrast is active by creating a colored border.
    2820        var hcDetect = CKEDITOR.dom.element.createFromHtml(
    29                 '<div style="width:0px;height:0px;' +
    30                         'position:absolute;left:-10000px;' +
    31                         'background-image:url(' + backgroundImageUrl + ')"></div>', CKEDITOR.document );
     21                '<div style="width:0px;height:0px;position:absolute;left:-10000px;' +
     22                        'border: 1px solid;border-color: red blue;"></div>', CKEDITOR.document );
    3223
    3324        hcDetect.appendTo( CKEDITOR.document.getHead() );
    3425
     
    3627        // Catch exception needed sometimes for FF. (#4230)
    3728        try
    3829        {
    39                 CKEDITOR.env.hc = ( hcDetect.getComputedStyle( 'background-image' ) == 'none' );
     30                CKEDITOR.env.hc = hcDetect.getComputedStyle( 'border-top-color' ) == hcDetect.getComputedStyle( 'border-right-color' );
    4031        }
    4132        catch (e)
    4233        {
© 2003 – 2021 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy