Skip to content

Commit

Permalink
Renamed isPasteEventFreelyAvailable to isDataFreelyAvailableInPasteEv…
Browse files Browse the repository at this point in the history
…ent.
  • Loading branch information
Reinmar committed Sep 9, 2014
1 parent e17e918 commit cb61e5e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions plugins/clipboard/plugin.js
Expand Up @@ -476,7 +476,7 @@
function addPasteListenersToEditable() {
var editable = editor.editable();

if ( CKEDITOR.plugins.clipboard.isPasteEventFreelyAvailable ) {
if ( CKEDITOR.plugins.clipboard.isDataFreelyAvailableInPasteEvent ) {
var initOnCopyCut = function( evt ) {
clipboard.initPasteDataTransfer( evt, editor );
evt.data.preventDefault();
Expand Down Expand Up @@ -1476,10 +1476,10 @@
* @readonly
* @property {Boolean}
*/
isPasteEventFreelyAvailable: !CKEDITOR.env.ie,
isDataFreelyAvailableInPasteEvent: !CKEDITOR.env.ie,

/**
* True if the environment support MIME types and custom data types in dataTransfer/cliboardData getData/setData methods.
* True if the environment supports MIME types and custom data types in dataTransfer/cliboardData getData/setData methods.
*
* @since 4.5
* @readonly
Expand Down Expand Up @@ -1788,7 +1788,7 @@
* @returns {CKEDITOR.plugins.clipboard.dataTransfer} dataTransfer object
*/
initPasteDataTransfer: function( evt, sourceEditor ) {
if ( !this.isPasteEventFreelyAvailable ) {
if ( !this.isDataFreelyAvailableInPasteEvent ) {
return new this.dataTransfer( null, sourceEditor );
} else if ( evt && evt.data && evt.data.$ ) {
var dataTransfer = new this.dataTransfer( evt.data.$.clipboardData, sourceEditor );
Expand Down
4 changes: 2 additions & 2 deletions tests/plugins/clipboard/datatransfer.js
Expand Up @@ -597,7 +597,7 @@ bender.test( {
},

'test initPasteDataTransfer constructor': function() {
var isPasteEventFreelyAvailable = CKEDITOR.plugins.clipboard.isPasteEventFreelyAvailable,
var isDataFreelyAvailableInPasteEvent = CKEDITOR.plugins.clipboard.isDataFreelyAvailableInPasteEvent,
isCustomDataTypesSupported = CKEDITOR.plugins.clipboard.isCustomDataTypesSupported,
bot = this.bots.editor1,
editor = this.editors.editor1,
Expand All @@ -606,7 +606,7 @@ bender.test( {

bot.setHtmlWithSelection( '<p>x[x<b>foo</b>x]x</p>' );

if ( isPasteEventFreelyAvailable ) {
if ( isDataFreelyAvailableInPasteEvent ) {
evt.data.$.clipboardData.setData = function() {
assert.fail( 'Native setData should not be touched on IE.' );
};
Expand Down
16 changes: 8 additions & 8 deletions tests/plugins/clipboard/paste.js
Expand Up @@ -1010,7 +1010,7 @@

'editor.getClipboardData - successful': function() {
// We cannot test them in IE because this tcs will open security alert which will stop tests.
if ( !CKEDITOR.plugins.clipboard.isPasteEventFreelyAvailable )
if ( !CKEDITOR.plugins.clipboard.isDataFreelyAvailableInPasteEvent )
assert.ignore();

var tc = this,
Expand Down Expand Up @@ -1056,7 +1056,7 @@

'editor.getClipboardData - unsuccessful': function() {
// We cannot test them in IE because this tcs will open security alert which will stop tests.
if ( !CKEDITOR.plugins.clipboard.isPasteEventFreelyAvailable )
if ( !CKEDITOR.plugins.clipboard.isDataFreelyAvailableInPasteEvent )
assert.ignore();

var tc = this,
Expand Down Expand Up @@ -1098,7 +1098,7 @@

'editor.getClipboardData - canceled beforePaste': function() {
// We cannot test them in IE because this tcs will open security alert which will stop tests.
if ( !CKEDITOR.plugins.clipboard.isPasteEventFreelyAvailable )
if ( !CKEDITOR.plugins.clipboard.isDataFreelyAvailableInPasteEvent )
assert.ignore();

var tc = this,
Expand Down Expand Up @@ -1242,7 +1242,7 @@
},

'test cut': function() {
if ( !CKEDITOR.plugins.clipboard.isPasteEventFreelyAvailable )
if ( !CKEDITOR.plugins.clipboard.isDataFreelyAvailableInPasteEvent )
assert.ignore();

var editor = this.editor,
Expand All @@ -1260,7 +1260,7 @@
},

'test copy': function() {
if ( !CKEDITOR.plugins.clipboard.isPasteEventFreelyAvailable )
if ( !CKEDITOR.plugins.clipboard.isDataFreelyAvailableInPasteEvent )
assert.ignore();

var editor = this.editor,
Expand All @@ -1278,7 +1278,7 @@
},

'test cut and paste': function() {
if ( !CKEDITOR.plugins.clipboard.isPasteEventFreelyAvailable )
if ( !CKEDITOR.plugins.clipboard.isDataFreelyAvailableInPasteEvent )
assert.ignore();

var tc = this,
Expand Down Expand Up @@ -1316,7 +1316,7 @@
},

'test copy and paste': function() {
if ( !CKEDITOR.plugins.clipboard.isPasteEventFreelyAvailable )
if ( !CKEDITOR.plugins.clipboard.isDataFreelyAvailableInPasteEvent )
assert.ignore();

var tc = this,
Expand Down Expand Up @@ -1354,7 +1354,7 @@
},

'test paste if dataTransfer is not empty': function() {
if ( !CKEDITOR.plugins.clipboard.isPasteEventFreelyAvailable )
if ( !CKEDITOR.plugins.clipboard.isDataFreelyAvailableInPasteEvent )
assert.ignore();

var editor = this.editor;
Expand Down

0 comments on commit cb61e5e

Please sign in to comment.