Skip to content

Commit a841566

Browse files
author
Piotr Jasiun
committed
Merge branch 't/11422b' into major
2 parents 3e9c691 + e567071 commit a841566

File tree

28 files changed

+104
-309
lines changed

28 files changed

+104
-309
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ New Features:
99
* [#11536](http://dev.ckeditor.com/ticket/11536): Added CKEDITOR.tools.htmlDecode method.
1010
* [#11377](http://dev.ckeditor.com/ticket/11377): Unify internal representation of empty anchors using fake objects.
1111
* [#11225](http://dev.ckeditor.com/ticket/11225): Introduced the [`CKEDITOR.tools.transparentImageData`](http://localhost/cksource/ckeditor-docs/build/#!/api/CKEDITOR.tools-property-transparentImageData) property which contains transparent image data to be used in CSS or as images' source.
12+
* [#11422](http://dev.ckeditor.com/ticket/11422): Removed FF3.x, IE6 and Opera12.x leftovers in code.
1213

1314
## CKEditor 4.3.3
1415

core/dom/element.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
257257
* @param {Boolean} [force] Append filler regardless of the environment.
258258
*/
259259
appendBogus: function( force ) {
260-
if ( !force && !( CKEDITOR.env.needsBrFiller || CKEDITOR.env.opera ) )
260+
if ( !force && !CKEDITOR.env.needsBrFiller )
261261
return;
262262

263263
var lastChild = this.getLast();
@@ -266,7 +266,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
266266
while ( lastChild && lastChild.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tools.rtrim( lastChild.getText() ) )
267267
lastChild = lastChild.getPrevious();
268268
if ( !lastChild || !lastChild.is || !lastChild.is( 'br' ) ) {
269-
var bogus = CKEDITOR.env.opera ? this.getDocument().createText( '' ) : this.getDocument().createElement( 'br' );
269+
var bogus = this.getDocument().createElement( 'br' );
270270

271271
CKEDITOR.env.gecko && bogus.setAttribute( 'type', '_moz' );
272272

@@ -492,7 +492,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
492492
return this.$.getAttribute( name, 2 );
493493
};
494494

495-
if ( CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat ) ) {
495+
if ( CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks ) ) {
496496
return function( name ) {
497497
switch ( name ) {
498498
case 'class':
@@ -885,7 +885,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
885885

886886
// Webkit and Opera report non-zero offsetHeight despite that
887887
// element is inside an invisible iframe. (#4542)
888-
if ( isVisible && ( CKEDITOR.env.webkit || CKEDITOR.env.opera ) ) {
888+
if ( isVisible && CKEDITOR.env.webkit ) {
889889
elementWindow = this.getWindow();
890890

891891
if ( !elementWindow.equals( CKEDITOR.document.getWindow() ) && ( elementWindowFrame = elementWindow.$.frameElement ) )
@@ -931,7 +931,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
931931
* @method
932932
* @returns {Boolean} True if the element has attributes.
933933
*/
934-
hasAttributes: CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat ) ?
934+
hasAttributes: CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks ) ?
935935
function() {
936936
var attributes = this.$.attributes;
937937

@@ -1117,7 +1117,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
11171117
return this;
11181118
};
11191119

1120-
if ( CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat ) ) {
1120+
if ( CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks ) ) {
11211121
return function( name, value ) {
11221122
if ( name == 'class' )
11231123
this.$.className = value;
@@ -1194,7 +1194,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
11941194
this.$.removeAttribute( name );
11951195
};
11961196

1197-
if ( CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat ) ) {
1197+
if ( CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks ) ) {
11981198
return function( name ) {
11991199
if ( name == 'class' )
12001200
name = 'className';
@@ -1319,7 +1319,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
13191319
// For IE/Opera which doesn't support for the above CSS style,
13201320
// the unselectable="on" attribute only specifies the selection
13211321
// process cannot start in the element itself, and it doesn't inherit.
1322-
if ( CKEDITOR.env.ie || CKEDITOR.env.opera ) {
1322+
if ( CKEDITOR.env.ie ) {
13231323
this.setAttribute( 'unselectable', 'on' );
13241324

13251325
var element,

core/editable.js

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,7 @@
344344
// Set up the correct selection.
345345
selection.selectRanges( [ range ] );
346346

347-
// Do not scroll after inserting, because Opera may fail on certain element (e.g. iframe/iframe.html).
348-
afterInsert( this, CKEDITOR.env.opera );
347+
afterInsert( this );
349348
},
350349

351350
/**
@@ -491,16 +490,6 @@
491490

492491
// Update focus states.
493492
this.on( 'blur', function( evt ) {
494-
// Opera might raise undesired blur event on editable, check if it's
495-
// really blurred, otherwise cancel the event. (#9459)
496-
if ( CKEDITOR.env.opera ) {
497-
var active = CKEDITOR.document.getActive();
498-
if ( active.equals( this.isInline() ? this : this.getWindow().getFrame() ) ) {
499-
evt.cancel();
500-
return;
501-
}
502-
}
503-
504493
this.hasFocus = false;
505494
}, null, null, -1 );
506495

@@ -696,7 +685,7 @@
696685
CKEDITOR.env.ie && this.attachListener( this, 'click', blockInputClick );
697686

698687
// Gecko/Webkit need some help when selecting control type elements. (#3448)
699-
if ( !( CKEDITOR.env.ie || CKEDITOR.env.opera ) ) {
688+
if ( !CKEDITOR.env.ie ) {
700689
this.attachListener( this, 'mousedown', function( ev ) {
701690
var control = ev.data.getTarget();
702691
if ( control.is( 'img', 'hr', 'input', 'textarea', 'select' ) ) {
@@ -1784,11 +1773,11 @@
17841773
editable.editor.fire( 'saveSnapshot' );
17851774
}
17861775

1787-
function afterInsert( editable, noScroll ) {
1776+
function afterInsert( editable ) {
17881777
var editor = editable.editor;
17891778

17901779
// Scroll using selection, not ranges, to affect native pastes.
1791-
!noScroll && editor.getSelection().scrollIntoView();
1780+
editor.getSelection().scrollIntoView();
17921781

17931782
// Save snaps after the whole execution completed.
17941783
// This's a workaround for make DOM modification's happened after

core/editor.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -443,10 +443,6 @@
443443
*/
444444
editor.title = typeof configTitle == 'string' || configTitle === false ? configTitle : [ editor.lang.editor, editor.name ].join( ', ' );
445445

446-
// We're not able to support RTL in Firefox 2 at this time.
447-
if ( CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 && editor.lang.dir == 'rtl' )
448-
editor.lang.dir = 'ltr';
449-
450446
if ( !editor.config.contentsLangDirection ) {
451447
// Fallback to either the editable element direction or editor UI direction depending on creators.
452448
editor.config.contentsLangDirection = editor.elementMode == CKEDITOR.ELEMENT_MODE_INLINE ? editor.element.getDirection( 1 ) : editor.lang.dir;

core/env.js

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ if ( !CKEDITOR.env ) {
1717
*/
1818
CKEDITOR.env = ( function() {
1919
var agent = navigator.userAgent.toLowerCase();
20-
var opera = window.opera;
2120

2221
var env = {
2322
/**
@@ -30,16 +29,6 @@ if ( !CKEDITOR.env ) {
3029
*/
3130
ie: ( agent.indexOf( 'trident/' ) > -1 ),
3231

33-
/**
34-
* Indicates that CKEditor is running in Opera.
35-
*
36-
* if ( CKEDITOR.env.opera )
37-
* alert( 'I\'m running in Opera!' );
38-
*
39-
* @property {Boolean}
40-
*/
41-
opera: ( !!opera && opera.version ),
42-
4332
/**
4433
* Indicates that CKEditor is running in a WebKit-based browser, like Safari.
4534
*
@@ -149,7 +138,7 @@ if ( !CKEDITOR.env ) {
149138
*
150139
* @property {Boolean}
151140
*/
152-
env.gecko = ( navigator.product == 'Gecko' && !env.webkit && !env.opera && !env.ie );
141+
env.gecko = ( navigator.product == 'Gecko' && !env.webkit && !env.ie );
153142

154143
/**
155144
* Indicates that CKEditor is running in Chrome.
@@ -233,10 +222,6 @@ if ( !CKEDITOR.env ) {
233222
}
234223
}
235224

236-
// Opera 9.50+
237-
if ( env.opera )
238-
version = parseFloat( opera.version() );
239-
240225
// Adobe AIR 1.0+
241226
// Checked before Safari because AIR have the WebKit rich text editor
242227
// features from Safari 3.0.4, but the version reported is 420.
@@ -279,8 +264,7 @@ if ( !CKEDITOR.env ) {
279264
env.iOS && version >= 534 ||
280265
!env.mobile && (
281266
( env.ie && version > 6 ) ||
282-
( env.gecko && version >= 10801 ) ||
283-
( env.opera && version >= 9.5 ) ||
267+
( env.gecko && version >= 20000 ) ||
284268
( env.air && version >= 1 ) ||
285269
( env.webkit && version >= 522 ) ||
286270
false
@@ -323,24 +307,13 @@ if ( !CKEDITOR.env ) {
323307
*
324308
* @property {String}
325309
*/
326-
env.cssClass = 'cke_browser_' + ( env.ie ? 'ie' : env.gecko ? 'gecko' : env.opera ? 'opera' : env.webkit ? 'webkit' : 'unknown' );
310+
env.cssClass = 'cke_browser_' + ( env.ie ? 'ie' : env.gecko ? 'gecko' : env.webkit ? 'webkit' : 'unknown' );
327311

328312
if ( env.quirks )
329313
env.cssClass += ' cke_browser_quirks';
330314

331-
if ( env.ie ) {
332-
env.cssClass += ' cke_browser_ie' + ( env.quirks || env.version < 7 ? '6' : env.version );
333-
334-
if ( env.quirks )
335-
env.cssClass += ' cke_browser_iequirks';
336-
}
337-
338-
if ( env.gecko ) {
339-
if ( version < 10900 )
340-
env.cssClass += ' cke_browser_gecko18';
341-
else if ( version <= 11000 )
342-
env.cssClass += ' cke_browser_gecko19';
343-
}
315+
if ( env.ie )
316+
env.cssClass += ' cke_browser_ie' + ( env.quirks ? '6 cke_browser_iequirks' : env.version );
344317

345318
if ( env.air )
346319
env.cssClass += ' cke_browser_air';

core/htmldataprocessor.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,8 @@
310310

311311
cleanBogus( block );
312312

313-
// [Opera] it's mandatory for the filler to present inside of empty block when in WYSIWYG.
314-
if ( ( ( CKEDITOR.env.opera && !isOutput ) ||
315-
( typeof fillEmptyBlock == 'function' ? fillEmptyBlock( block ) !== false : fillEmptyBlock ) ) &&
316-
isEmptyBlockNeedFiller( block ) )
313+
if ( ( typeof fillEmptyBlock == 'function' ? fillEmptyBlock( block ) !== false : fillEmptyBlock ) &&
314+
isEmptyBlockNeedFiller( block ) )
317315
{
318316
block.add( createFiller( isOutput ) );
319317
}
@@ -812,7 +810,7 @@
812810
}
813811

814812
function protectPreFormatted( html ) {
815-
return CKEDITOR.env.opera ? html : html.replace( /(<pre\b[^>]*>)(\r\n|\n)/g, '$1$2$2' );
813+
return html.replace( /(<pre\b[^>]*>)(\r\n|\n)/g, '$1$2$2' );
816814
}
817815

818816
function protectRealComments( html ) {

core/keystrokehandler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ CKEDITOR.keystrokeHandler = function( editor ) {
8787

8888
// Some browsers instead, don't cancel key events in the keydown, but in the
8989
// keypress. So we must do a longer trip in those cases.
90-
if ( CKEDITOR.env.opera || ( CKEDITOR.env.gecko && CKEDITOR.env.mac ) )
90+
if ( CKEDITOR.env.gecko && CKEDITOR.env.mac )
9191
domObject.on( 'keypress', onKeyPress, this );
9292
}
9393
};

core/selection.js

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@
558558
// Browsers could loose the selection once the editable lost focus,
559559
// in such case we need to reproduce it by saving a locked selection
560560
// and restoring it upon focus gain.
561-
if ( CKEDITOR.env.ie || CKEDITOR.env.opera || isInline ) {
561+
if ( CKEDITOR.env.ie || isInline ) {
562562
// Save a cloned version of current selection.
563563
function saveSel() {
564564
lastSel = new CKEDITOR.dom.selection( editor.getSelection() );
@@ -722,11 +722,10 @@
722722
editor.selectionChange( 1 );
723723
} );
724724

725-
// #9699: On Webkit&Gecko in inline editor and on Opera in framed editor we have to check selection
726-
// when it was changed by dragging and releasing mouse button outside editable. Dragging (mousedown)
725+
// #9699: On Webkit&Gecko in inline editor we have to check selection when it was changed
726+
// by dragging and releasing mouse button outside editable. Dragging (mousedown)
727727
// has to be initialized in editable, but for mouseup we listen on document element.
728-
// On Opera, listening on document element, helps even if mouse button is released outside iframe.
729-
if ( isInline ? ( CKEDITOR.env.webkit || CKEDITOR.env.gecko ) : CKEDITOR.env.opera ) {
728+
if ( isInline && ( CKEDITOR.env.webkit || CKEDITOR.env.gecko ) ) {
730729
var mouseDown;
731730
editable.attachListener( editable, 'mousedown', function() {
732731
mouseDown = 1;
@@ -1889,14 +1888,6 @@
18891888
if ( !sel )
18901889
return;
18911890

1892-
// Opera: The above hack work around a *visually wrong* text selection that
1893-
// happens in certain situation. (#6874, #9447)
1894-
if ( CKEDITOR.env.opera ) {
1895-
var nativeRng = this.document.$.createRange();
1896-
nativeRng.selectNodeContents( this.root.$ );
1897-
sel.addRange( nativeRng );
1898-
}
1899-
19001891
this.removeAllRanges();
19011892

19021893
for ( var i = 0; i < ranges.length; i++ ) {
@@ -1932,23 +1923,6 @@
19321923
var nativeRange = this.document.$.createRange();
19331924
var startContainer = range.startContainer;
19341925

1935-
// In Opera, we have some cases when a collapsed text selection cursor will be moved out of the
1936-
// anchor node:
1937-
// 1. Inside of any empty inline. (#4657)
1938-
// 2. In adjacent to any inline element.
1939-
if ( CKEDITOR.env.opera && range.collapsed && startContainer.type == CKEDITOR.NODE_ELEMENT ) {
1940-
1941-
var leftSib = startContainer.getChild( range.startOffset - 1 ),
1942-
rightSib = startContainer.getChild( range.startOffset );
1943-
1944-
if ( !leftSib && !rightSib && startContainer.is( CKEDITOR.dtd.$removeEmpty ) ||
1945-
leftSib && leftSib.type == CKEDITOR.NODE_ELEMENT ||
1946-
rightSib && rightSib.type == CKEDITOR.NODE_ELEMENT ) {
1947-
range.insertNode( this.document.createText( '' ) );
1948-
range.collapse( 1 );
1949-
}
1950-
}
1951-
19521926
if ( range.collapsed && CKEDITOR.env.webkit && rangeRequiresFix( range ) ) {
19531927
// Append a zero-width space so WebKit will not try to
19541928
// move the selection by itself (#1272).

core/tools.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
cssVendorPrefix =
1414
CKEDITOR.env.gecko ? '-moz-' :
1515
CKEDITOR.env.webkit ? '-webkit-' :
16-
CKEDITOR.env.opera ? '-o-' :
1716
CKEDITOR.env.ie ? '-ms-' :
1817
'';
1918

plugins/a11yhelp/dialogs/a11yhelp.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,8 @@ CKEDITOR.dialog.add( 'a11yHelp', function( editor ) {
177177
'overflow-y:auto;' +
178178
'overflow-x:hidden;' +
179179
'}' +
180-
// Some adjustments are to be done for IE6 and Quirks to work "properly" (#5757)
180+
// Some adjustments are to be done for Quirks to work "properly" (#5757)
181181
'.cke_browser_quirks .cke_accessibility_legend,' +
182-
'.cke_browser_ie6 .cke_accessibility_legend' +
183182
'{' +
184183
'height:390px' +
185184
'}' +

0 commit comments

Comments
 (0)