X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fcore%2F_bootstrap.js;h=f6ba4d6b9c412a5f18ace63934c1590b186ae24b;hb=039a051ccf3901311661022a30afd60fc38130c9;hp=9b9d081d4b85b9593fee3b53d4f915436d3a0236;hpb=c6e377a02b54abc07129d72b632763c727476a15;p=ckeditor.git diff --git a/_source/core/_bootstrap.js b/_source/core/_bootstrap.js index 9b9d081..f6ba4d6 100644 --- a/_source/core/_bootstrap.js +++ b/_source/core/_bootstrap.js @@ -9,13 +9,19 @@ For licensing, see LICENSE.html or http://ckeditor.com/license (function() { + // Disable HC detaction in WebKit. (#5429) + if ( CKEDITOR.env.webkit ) + { + CKEDITOR.env.hc = false; + return; + } + // Check is High Contrast is active by creating a temporary element with a // background image. var useSpacer = CKEDITOR.env.ie && CKEDITOR.env.version < 7, useBlank = CKEDITOR.env.ie && CKEDITOR.env.version == 7; - var backgroundImageUrl = useSpacer ? ( CKEDITOR.basePath + 'images/spacer.gif' ) : useBlank ? 'about:blank' : 'data:image/png;base64,'; @@ -36,6 +42,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license { CKEDITOR.env.hc = false; } + if ( CKEDITOR.env.hc ) CKEDITOR.env.cssClass += ' cke_hc'; @@ -59,9 +66,7 @@ CKEDITOR.plugins.load( CKEDITOR.config.corePlugins.split( ',' ), function() } }); -/* -TODO: Enable the following and check if effective. - +// Needed for IE6 to not request image (HTTP 200 or 304) for every CSS background. (#6187) if ( CKEDITOR.env.ie ) { // Remove IE mouse flickering on IE6 because of background images. @@ -75,7 +80,14 @@ if ( CKEDITOR.env.ie ) // line. For safety, let's just ignore errors. } } -*/ + +/** + * Indicates that CKEditor is running on a High Contrast environment. + * @name CKEDITOR.env.hc + * @example + * if ( CKEDITOR.env.hc ) + * alert( 'You're running on High Contrast mode. The editor interface will get adapted to provide you a better experience.' ); + */ /** * Fired when a CKEDITOR core object is fully loaded and ready for interaction.