JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.5.3
[ckeditor.git] / _source / core / _bootstrap.js
index fa470ff..1fa5f5e 100644 (file)
@@ -16,19 +16,10 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                return;\r
        }\r
 \r
-       // Check is High Contrast is active by creating a temporary element with a\r
-       // background image.\r
-\r
-       var useSpacer = CKEDITOR.env.ie && CKEDITOR.env.version < 7,\r
-               useBlank = CKEDITOR.env.ie && CKEDITOR.env.version == 7;\r
-\r
-       var backgroundImageUrl = useSpacer ? ( CKEDITOR.basePath + 'images/spacer.gif' ) :\r
-                                                        useBlank ? 'about:blank' : 'data:image/png;base64,';\r
-\r
+       // Check whether high contrast is active by creating a colored border.\r
        var hcDetect = CKEDITOR.dom.element.createFromHtml(\r
-               '<div style="width:0px;height:0px;' +\r
-                       'position:absolute;left:-10000px;' +\r
-                       'background-image:url(' + backgroundImageUrl + ')"></div>', CKEDITOR.document );\r
+               '<div style="width:0px;height:0px;position:absolute;left:-10000px;' +\r
+                       'border: 1px solid;border-color: red blue;"></div>', CKEDITOR.document );\r
 \r
        hcDetect.appendTo( CKEDITOR.document.getHead() );\r
 \r
@@ -36,7 +27,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
        // Catch exception needed sometimes for FF. (#4230)\r
        try\r
        {\r
-               CKEDITOR.env.hc = ( hcDetect.getComputedStyle( 'background-image' ) == 'none' );\r
+               CKEDITOR.env.hc = hcDetect.getComputedStyle( 'border-top-color' ) == hcDetect.getComputedStyle( 'border-right-color' );\r
        }\r
        catch (e)\r
        {\r