[TASK] RTE: Remove support for IE 8 and older 93/36193/2
authorStanislas Rolland <typo3@sjbr.ca>
Fri, 23 Jan 2015 03:25:49 +0000 (22:25 -0500)
committerStanislas Rolland <typo3@sjbr.ca>
Fri, 23 Jan 2015 06:07:34 +0000 (07:07 +0100)
Releases: master
Resolves: #64445
Change-Id: I527285ff64fb3f2202458d63d008781cf53bf129
Reviewed-on: http://review.typo3.org/36193
Reviewed-by: Stanislas Rolland <typo3@sjbr.ca>
Tested-by: Stanislas Rolland <typo3@sjbr.ca>
29 files changed:
typo3/sysext/rtehtmlarea/Classes/Extension/Abbreviation.php
typo3/sysext/rtehtmlarea/Classes/RteHtmlAreaBase.php
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/HTMLArea/CSS/Parser.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/HTMLArea/DOM/BookMark.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/HTMLArea/DOM/Node.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/HTMLArea/DOM/Selection.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/HTMLArea/DOM/Walker.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/HTMLArea/Editor/Iframe.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/HTMLArea/UserAgent/UserAgent.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/AboutEditor.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/BlockElements.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/CharacterMap.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/ContextMenu.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/CopyPaste.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/DefaultClean.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/DefaultImage.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/DefaultLink.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/DefinitionList.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/InlineElements.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/InsertSmiley.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/Language.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/MicrodataSchema.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/PlainText.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/SelectFont.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/TYPO3Color.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/TYPO3Link.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/TableOperations.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/TextStyle.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/UndoRedo.js

index fcc34f9..3dfc1b6 100644 (file)
@@ -129,21 +129,6 @@ class Abbreviation extends \TYPO3\CMS\Rtehtmlarea\RteHtmlAreaApi {
        }
 
        /**
-        * Return tranformed content
-        *
-        * @param string $content: The content that is about to be sent to the RTE
-        * @return string the transformed content
-        */
-       public function transformContent($content) {
-               // <abbr> was not supported by IE before version 7
-               if ($this->htmlAreaRTE->client['browser'] == 'msie' && $this->htmlAreaRTE->client['version'] < 7) {
-                       // change <abbr> to <acronym>
-                       $content = preg_replace('/<(\\/?)abbr/i', '<$1acronym', $content);
-               }
-               return $content;
-       }
-
-       /**
         * Return JS configuration of the htmlArea plugins registered by the extension
         *
         * @param int Relative id of the RTE editing area in the form
@@ -159,10 +144,6 @@ class Abbreviation extends \TYPO3\CMS\Rtehtmlarea\RteHtmlAreaApi {
                        }
                        $registerRTEinJavascriptString .= '
                        RTEarea[' . $RTEcounter . '].buttons.' . $button . '.abbreviationUrl = "' . $this->htmlAreaRTE->writeTemporaryFile('', ('abbreviation_' . $this->htmlAreaRTE->contentLanguageUid), 'js', $this->buildJSAbbreviationArray($this->htmlAreaRTE->contentLanguageUid)) . '";';
-                       // <abbr> was not supported by IE before version 7
-                       if ($this->htmlAreaRTE->client['browser'] == 'msie' && $this->htmlAreaRTE->client['version'] < 7) {
-                               $this->abbreviationIndex = 0;
-                       }
                        $registerRTEinJavascriptString .= '
                        RTEarea[' . $RTEcounter . '].buttons.' . $button . '.noAcronym = ' . ($this->acronymIndex ? 'false' : 'true') . ';
                        RTEarea[' . $RTEcounter . '].buttons.' . $button . '.noAbbr =  ' . ($this->abbreviationIndex ? 'false' : 'true') . ';';
index ca465fd..1436586 100644 (file)
@@ -34,7 +34,7 @@ class RteHtmlAreaBase extends \TYPO3\CMS\Backend\Rte\AbstractRte {
        public $conf_supported_browser = array(
                'msie' => array(
                        array(
-                               'version' => 6.0,
+                               'version' => 9.0,
                                'system' => array(
                                        'allowed' => array(
                                                'winNT',
index 2957e18..b4e5651 100644 (file)
@@ -153,25 +153,11 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/CSS/Parser',
                                this.error = 'Document.readyState not complete';
                        }
                } else {
-                       if (UserAgent.isIEBeforeIE9) {
-                               try {
-                                       var rules = this.editor.document.styleSheets[0].rules;
-                                       var imports = this.editor.document.styleSheets[0].imports;
-                                       if (!rules.length && !imports.length) {
-                                               this.cssLoaded = false;
-                                               this.error = 'Empty rules and imports arrays';
-                                       }
-                               } catch(e) {
-                                       this.cssLoaded = false;
-                                       this.error = e;
-                               }
-                       } else {
-                               try {
-                                       this.editor.document.styleSheets && this.editor.document.styleSheets[0] && this.editor.document.styleSheets[0].rules;
-                               } catch(e) {
-                                       this.cssLoaded = false;
-                                       this.error = e;
-                               }
+                       try {
+                               this.editor.document.styleSheets && this.editor.document.styleSheets[0] && this.editor.document.styleSheets[0].rules;
+                       } catch(e) {
+                               this.cssLoaded = false;
+                               this.error = e;
                        }
                }
                if (this.cssLoaded) {
@@ -181,23 +167,7 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/CSS/Parser',
                                for (var index = 0, n = styleSheets.length; index < n; index++) {
                                        try {
                                                var styleSheet = styleSheets[index];
-                                               if (UserAgent.isIEBeforeIE9) {
-                                                       var rules = styleSheet.rules;
-                                                       var imports = styleSheet.imports;
-                                                       if (!rules.length && !imports.length) {
-                                                               this.cssLoaded = false;
-                                                               this.error = 'Empty rules and imports arrays of styleSheets[' + index + ']';
-                                                               break;
-                                                       }
-                                                       if (styleSheet.imports) {
-                                                               this.parseIeRules(styleSheet.imports);
-                                                       }
-                                                       if (styleSheet.rules) {
-                                                               this.parseRules(styleSheet.rules);
-                                                       }
-                                               } else {
-                                                       this.parseRules(styleSheet.cssRules);
-                                               }
+                                               this.parseRules(styleSheet.cssRules);
                                        } catch (e) {
                                                this.error = e;
                                                this.cssLoaded = false;
index 5292224..346c15d 100644 (file)
@@ -56,19 +56,10 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/BookMark',
         */
        BookMark.prototype.get = function (range, nonIntrusive) {
                var bookMark;
-               if (UserAgent.isIEBeforeIE9) {
-                       // Bookmarking will not work on control ranges
-                       try {
-                               bookMark = range.getBookmark();
-                       } catch (e) {
-                               bookMark = null;
-                       }
+               if (nonIntrusive) {
+                       bookMark = this.getNonIntrusiveBookMark(range, true);
                } else {
-                       if (nonIntrusive) {
-                               bookMark = this.getNonIntrusiveBookMark(range, true);
-                       } else {
-                               bookMark = this.getIntrusiveBookMark(range);
-                       }
+                       bookMark = this.getIntrusiveBookMark(range);
                }
                return bookMark;
        };
@@ -248,16 +239,10 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/BookMark',
         */
        BookMark.prototype.moveTo = function (bookMark) {
                var range = this.selection.createRange();
-               if (UserAgent.isIEBeforeIE9) {
-                       if (bookMark) {
-                               range.moveToBookmark(bookMark);
-                       }
+               if (bookMark.nonIntrusive) {
+                       range = this.moveToNonIntrusiveBookMark(range, bookMark);
                } else {
-                       if (bookMark.nonIntrusive) {
-                               range = this.moveToNonIntrusiveBookMark(range, bookMark);
-                       } else {
-                               range = this.moveToIntrusiveBookMark(range, bookMark);
-                       }
+                       range = this.moveToIntrusiveBookMark(range, bookMark);
                }
                return range;
        };
index 40c3186..766f5be 100644 (file)
@@ -77,84 +77,19 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/Node',
         * @return      void
         */
        Node.prototype.wrapWithInlineElement = function (element, range) {
-               if (UserAgent.isIEBeforeIE9) {
-                       var nodeName = element.nodeName;
-                       var bookMark = this.bookMark.get(range);
-                       if (range.parentElement) {
-                               var parent = range.parentElement();
-                               var rangeStart = range.duplicate();
-                               rangeStart.collapse(true);
-                               var parentStart = rangeStart.parentElement();
-                               var rangeEnd = range.duplicate();
-                               rangeEnd.collapse(true);
-                               var newRange = this.selection.createRange();
-
-                               var parentEnd = rangeEnd.parentElement();
-                               var upperParentStart = parentStart;
-                               if (parentStart !== parent) {
-                                       while (upperParentStart.parentNode !== parent) {
-                                               upperParentStart = upperParentStart.parentNode;
-                                       }
-                               }
-
-                               element.innerHTML = range.htmlText;
-                                       // IE eats spaces on the start boundary
-                               if (range.htmlText.charAt(0) === '\x20') {
-                                       element.innerHTML = '&nbsp;' + element.innerHTML;
-                               }
-                               var elementClone = element.cloneNode(true);
-                               range.pasteHTML(element.outerHTML);
-                                       // IE inserts the element as the last child of the start container
-                               if (parentStart !== parent
-                                               && parentStart.lastChild
-                                               && parentStart.lastChild.nodeType === Dom.ELEMENT_NODE
-                                               && parentStart.lastChild.nodeName.toLowerCase() === nodeName) {
-                                       parent.insertBefore(elementClone, upperParentStart.nextSibling);
-                                       parentStart.removeChild(parentStart.lastChild);
-                                               // Sometimes an empty previous sibling was created
-                                       if (elementClone.previousSibling
-                                                       && elementClone.previousSibling.nodeType === Dom.ELEMENT_NODE
-                                                       && !elementClone.previousSibling.innerText) {
-                                               parent.removeChild(elementClone.previousSibling);
-                                       }
-                                               // The bookmark will not work anymore
-                                       newRange.moveToElementText(elementClone);
-                                       newRange.collapse(false);
-                                       newRange.select();
-                               } else {
-                                               // Working around IE boookmark bug
-                                       if (parentStart != parentEnd) {
-                                               var newRange = this.selection.createRange();
-                                               if (newRange.moveToBookmark(bookMark)) {
-                                                       newRange.collapse(false);
-                                                       newRange.select();
-                                               }
-                                       } else {
-                                               range.collapse(false);
-                                       }
-                               }
-                               parent.normalize();
-                       } else {
-                               var parent = range.item(0);
-                               element = parent.parentNode.insertBefore(element, parent);
-                               element.appendChild(parent);
-                               this.bookMark.moveTo(bookMark);
-                       }
-               } else {
-                       element.appendChild(range.extractContents());
-                       range.insertNode(element);
-                       element.normalize();
-                               // Sometimes Firefox inserts empty elements just outside the boundaries of the range
-                       var neighbour = element.previousSibling;
-                       if (neighbour && (neighbour.nodeType !== Dom.TEXT_NODE) && !/\S/.test(neighbour.textContent)) {
-                               Dom.removeFromParent(neighbour);
-                       }
-                       neighbour = element.nextSibling;
-                       if (neighbour && (neighbour.nodeType !== Dom.TEXT_NODE) && !/\S/.test(neighbour.textContent)) {
-                               Dom.removeFromParent(neighbour);
-                       }
-                       this.selection.selectNodeContents(element, false);
+               element.appendChild(range.extractContents());
+               range.insertNode(element);
+               element.normalize();
+               // Sometimes Firefox inserts empty elements just outside the boundaries of the range
+               var neighbour = element.previousSibling;
+               if (neighbour && (neighbour.nodeType !== Dom.TEXT_NODE) && !/\S/.test(neighbour.textContent)) {
+                       Dom.removeFromParent(neighbour);
+               }
+               neighbour = element.nextSibling;
+               if (neighbour && (neighbour.nodeType !== Dom.TEXT_NODE) && !/\S/.test(neighbour.textContent)) {
+                       Dom.removeFromParent(neighbour);
                }
+               this.selection.selectNodeContents(element, false);
        };
 
        /**
index 9565d44..14d97f5 100644 (file)
@@ -76,26 +76,21 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/Selection',
                var type = 'Text';
                this.get();
                if (typeof this.selection === 'object' && this.selection !== null) {
-                       if (typeof this.selection.getRangeAt === 'function') {
-                               // Check if the current selection is a Control
-                               if (this.selection && this.selection.rangeCount == 1) {
-                                       var range = this.selection.getRangeAt(0);
-                                       if (range.startContainer.nodeType === Dom.ELEMENT_NODE) {
-                                               if (
-                                                       // Gecko
-                                                       (range.startContainer == range.endContainer && (range.endOffset - range.startOffset) == 1) ||
-                                                       // Opera and WebKit
-                                                       (range.endContainer.nodeType === Dom.TEXT_NODE && range.endOffset == 0 && range.startContainer.childNodes[range.startOffset].nextSibling == range.endContainer)
-                                               ) {
-                                                       if (/^(img|hr|li|table|tr|td|embed|object|ol|ul|dl)$/i.test(range.startContainer.childNodes[range.startOffset].nodeName)) {
-                                                               type = 'Control';
-                                                       }
+                       // Check if the current selection is a Control
+                       if (this.selection && this.selection.rangeCount == 1) {
+                               var range = this.selection.getRangeAt(0);
+                               if (range.startContainer.nodeType === Dom.ELEMENT_NODE) {
+                                       if (
+                                               // Gecko
+                                               (range.startContainer == range.endContainer && (range.endOffset - range.startOffset) == 1) ||
+                                               // Opera and WebKit
+                                               (range.endContainer.nodeType === Dom.TEXT_NODE && range.endOffset == 0 && range.startContainer.childNodes[range.startOffset].nextSibling == range.endContainer)
+                                       ) {
+                                               if (/^(img|hr|li|table|tr|td|embed|object|ol|ul|dl)$/i.test(range.startContainer.childNodes[range.startOffset].nodeName)) {
+                                                       type = 'Control';
                                                }
                                        }
                                }
-                       } else {
-                               // IE8 or IE7
-                               type = this.selection.type;
                        }
                }
                return type;
@@ -112,7 +107,7 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/Selection',
                        if (typeof this.selection.removeAllRanges === 'function') {
                                this.selection.removeAllRanges();
                        } else {
-                               // IE8, IE7 or old version of WebKit
+                               // Old version of WebKit
                                this.selection.empty();
                        }
                        if (UserAgent.isOpera) {
@@ -131,21 +126,7 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/Selection',
                var isEmpty = true;
                this.get();
                if (typeof this.selection === 'object' && this.selection !== null) {
-                       if (UserAgent.isIEBeforeIE9) {
-                               switch (this.selection.type) {
-                                       case 'None':
-                                               isEmpty = true;
-                                               break;
-                                       case 'Text':
-                                               isEmpty = !this.createRange().text;
-                                               break;
-                                       default:
-                                               isEmpty = !this.createRange().htmlText;
-                                               break;
-                               }
-                       } else {
-                               isEmpty = this.selection.isCollapsed;
-                       }
+                       isEmpty = this.selection.isCollapsed;
                }
                return isEmpty;
        };
@@ -158,33 +139,29 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/Selection',
        Selection.prototype.createRange = function () {
                var range;
                this.get();
-               if (UserAgent.isIEBeforeIE9) {
-                       range = this.selection.createRange();
+               if (typeof this.selection !== 'object' || this.selection === null) {
+                       range = this.document.createRange();
                } else {
-                       if (typeof this.selection !== 'object' || this.selection === null) {
+                       // Older versions of WebKit did not support getRangeAt
+                       if (UserAgent.isWebKit && typeof this.selection.getRangeAt !== 'function') {
                                range = this.document.createRange();
-                       } else {
-                               // Older versions of WebKit did not support getRangeAt
-                               if (UserAgent.isWebKit && typeof this.selection.getRangeAt !== 'function') {
-                                       range = this.document.createRange();
-                                       if (this.selection.baseNode == null) {
-                                               range.setStart(this.document.body, 0);
-                                               range.setEnd(this.document.body, 0);
-                                       } else {
-                                               range.setStart(this.selection.baseNode, this.selection.baseOffset);
-                                               range.setEnd(this.selection.extentNode, this.selection.extentOffset);
-                                               if (range.collapsed != this.selection.isCollapsed) {
-                                                       range.setStart(this.selection.extentNode, this.selection.extentOffset);
-                                                       range.setEnd(this.selection.baseNode, this.selection.baseOffset);
-                                               }
-                                       }
+                               if (this.selection.baseNode == null) {
+                                       range.setStart(this.document.body, 0);
+                                       range.setEnd(this.document.body, 0);
                                } else {
-                                       try {
-                                               range = this.selection.getRangeAt(0);
-                                       } catch (e) {
-                                               range = this.document.createRange();
+                                       range.setStart(this.selection.baseNode, this.selection.baseOffset);
+                                       range.setEnd(this.selection.extentNode, this.selection.extentOffset);
+                                       if (range.collapsed != this.selection.isCollapsed) {
+                                               range.setStart(this.selection.extentNode, this.selection.extentOffset);
+                                               range.setEnd(this.selection.baseNode, this.selection.baseOffset);
                                        }
                                }
+                       } else {
+                               try {
+                                       range = this.selection.getRangeAt(0);
+                               } catch (e) {
+                                       range = this.document.createRange();
+                               }
                        }
                }
                return range;
@@ -198,7 +175,7 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/Selection',
        Selection.prototype.getRanges = function () {
                this.get();
                var ranges = [];
-               // Older versions of WebKit, IE7 and IE8 did not support getRangeAt
+               // Older versions of WebKit did not support getRangeAt
                if (typeof this.selection === 'object' && this.selection !== null && typeof this.selection.getRangeAt === 'function') {
                        for (var i = this.selection.rangeCount; --i >= 0;) {
                                ranges.push(this.selection.getRangeAt(i));
@@ -254,12 +231,7 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/Selection',
        Selection.prototype.selectRange = function (range) {
                this.get();
                if (typeof this.selection === 'object' && this.selection !== null) {
-                       if (typeof this.selection.getRangeAt === 'function') {
-                               this.empty().addRange(range);
-                       } else {
-                               // IE8 or IE7
-                               range.select();
-                       }
+                       this.empty().addRange(range);
                }
                return this;
        };
@@ -275,10 +247,7 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/Selection',
        Selection.prototype.selectNode = function (node, endPoint) {
                this.get();
                if (typeof this.selection === 'object' && this.selection !== null) {
-                       if (UserAgent.isIEBeforeIE9) {
-                               // IE8/7/6 cannot set this type of selection
-                               this.selectNodeContents(node, endPoint);
-                       } else if (UserAgent.isWebKit && /^(img)$/i.test(node.nodeName)) {
+                       if (UserAgent.isWebKit && /^(img)$/i.test(node.nodeName)) {
                                this.selection.setBaseAndExtent(node, 0, node, 1);
                        } else {
                                var range = this.document.createRange();
@@ -313,21 +282,16 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/Selection',
                var range;
                this.get();
                if (typeof this.selection === 'object' && this.selection !== null) {
-                       if (UserAgent.isIEBeforeIE9) {
-                               range = this.document.body.createTextRange();
-                               range.moveToElementText(node);
-                       } else {
-                               range = this.document.createRange();
-                               if (UserAgent.isWebKit) {
-                                       range.setStart(node, 0);
-                                       if (node.nodeType === Dom.TEXT_NODE || node.nodeType === Dom.COMMENT_NODE || node.nodeType === Dom.CDATA_SECTION_NODE) {
-                                               range.setEnd(node, node.textContent.length);
-                                       } else {
-                                               range.setEnd(node, node.childNodes.length);
-                                       }
+                       range = this.document.createRange();
+                       if (UserAgent.isWebKit) {
+                               range.setStart(node, 0);
+                               if (node.nodeType === Dom.TEXT_NODE || node.nodeType === Dom.COMMENT_NODE || node.nodeType === Dom.CDATA_SECTION_NODE) {
+                                       range.setEnd(node, node.textContent.length);
                                } else {
-                                       range.selectNodeContents(node);
+                                       range.setEnd(node, node.childNodes.length);
                                }
+                       } else {
+                               range.selectNodeContents(node);
                        }
                        if (typeof endPoint !== 'undefined') {
                                range.collapse(endPoint);
@@ -346,38 +310,17 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/Selection',
                var parentElement,
                        range;
                this.get();
-               if (UserAgent.isIEBeforeIE9) {
-                       range = this.createRange();
-                       switch (this.selection.type) {
-                               case 'Text':
-                               case 'None':
-                                       parentElement = range.parentElement();
-                                       if (/^(form)$/i.test(parentElement.nodeName)) {
-                                               parentElement = this.document.body;
-                                       } else if (/^(li)$/i.test(parentElement.nodeName) && range.htmlText.replace(/\s/g, '') == parentElement.parentNode.outerHTML.replace(/\s/g, '')) {
-                                               parentElement = parentElement.parentNode;
-                                       }
-                                       break;
-                               case 'Control':
-                                       parentElement = range.item(0);
-                                       break;
-                               default:
-                                       parentElement = this.document.body;
-                                       break;
-                       }
+               if (this.getType() === 'Control') {
+                       parentElement = this.getElement();
                } else {
-                       if (this.getType() === 'Control') {
-                               parentElement = this.getElement();
+                       range = this.createRange();
+                       parentElement = range.commonAncestorContainer;
+                               // Firefox 3 may report the document as commonAncestorContainer
+                       if (parentElement.nodeType === Dom.DOCUMENT_NODE) {
+                               parentElement = this.document.body;
                        } else {
-                               range = this.createRange();
-                               parentElement = range.commonAncestorContainer;
-                                       // Firefox 3 may report the document as commonAncestorContainer
-                               if (parentElement.nodeType === Dom.DOCUMENT_NODE) {
-                                       parentElement = this.document.body;
-                               } else {
-                                       while (parentElement && parentElement.nodeType === Dom.TEXT_NODE) {
-                                               parentElement = parentElement.parentNode;
-                                       }
+                               while (parentElement && parentElement.nodeType === Dom.TEXT_NODE) {
+                                       parentElement = parentElement.parentNode;
                                }
                        }
                }
@@ -481,11 +424,7 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/Selection',
                        var ancestors = this.getAllAncestors();
                        for (var i = 0, n = ancestors.length; i < n; i++) {
                                var ancestor = ancestors[i];
-                               if (UserAgent.isIEBeforeIE9) {
-                                       isFullySelected = (type !== 'Control' && ancestor.innerText == range.text) || (type === 'Control' && ancestor.innerText == range.item(0).text);
-                               } else {
-                                       isFullySelected = (ancestor.textContent == range.toString());
-                               }
+                               isFullySelected = (ancestor.textContent == range.toString());
                                if (isFullySelected) {
                                        node = ancestor;
                                        break;
@@ -512,26 +451,13 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/Selection',
                var range = this.createRange(),
                        parentStart,
                        parentEnd;
-               if (UserAgent.isIEBeforeIE9) {
-                       if (this.getType() === 'Control') {
-                               parentStart = range.item(0);
-                               parentEnd = parentStart;
-                       } else {
-                               var rangeEnd = range.duplicate();
-                               range.collapse(true);
-                               parentStart = range.parentElement();
-                               rangeEnd.collapse(false);
-                               parentEnd = rangeEnd.parentElement();
-                       }
-               } else {
-                       parentStart = range.startContainer;
-                       if (/^(body)$/i.test(parentStart.nodeName)) {
-                               parentStart = parentStart.firstChild;
-                       }
-                       parentEnd = range.endContainer;
-                       if (/^(body)$/i.test(parentEnd.nodeName)) {
-                               parentEnd = parentEnd.lastChild;
-                       }
+               parentStart = range.startContainer;
+               if (/^(body)$/i.test(parentStart.nodeName)) {
+                       parentStart = parentStart.firstChild;
+               }
+               parentEnd = range.endContainer;
+               if (/^(body)$/i.test(parentEnd.nodeName)) {
+                       parentEnd = parentEnd.lastChild;
                }
                while (parentStart && !Dom.isBlockElement(parentStart)) {
                        parentStart = parentStart.parentNode;
@@ -569,16 +495,7 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/Selection',
        Selection.prototype.getHtml = function () {
                var range = this.createRange(),
                        html = '';
-               if (UserAgent.isIEBeforeIE9) {
-                       if (this.getType() === 'Control') {
-                                       // We have a controlRange collection
-                               var bodyRange = this.document.body.createTextRange();
-                               bodyRange.moveToElementText(range(0));
-                               html = bodyRange.htmlText;
-                       } else {
-                               html = range.htmlText;
-                       }
-               } else if (!range.collapsed) {
+               if (!range.collapsed) {
                        var cloneContents = range.cloneContents();
                        if (!cloneContents) {
                                cloneContents = this.document.createDocumentFragment();
@@ -598,15 +515,11 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/Selection',
         * @return      object          this
         */
        Selection.prototype.insertNode = function (toBeInserted) {
-               if (UserAgent.isIEBeforeIE9) {
-                       this.insertHtml(toBeInserted.outerHTML);
-               } else {
-                       var range = this.createRange();
-                       range.deleteContents();
-                       toBeSelected = (toBeInserted.nodeType === Dom.DOCUMENT_FRAGMENT_NODE) ? toBeInserted.lastChild : toBeInserted;
-                       range.insertNode(toBeInserted);
-                       this.selectNodeContents(toBeSelected, false);
-               }
+               var range = this.createRange();
+               range.deleteContents();
+               toBeSelected = (toBeInserted.nodeType === Dom.DOCUMENT_FRAGMENT_NODE) ? toBeInserted.lastChild : toBeInserted;
+               range.insertNode(toBeInserted);
+               this.selectNodeContents(toBeSelected, false);
                return this;
        };
 
@@ -619,24 +532,14 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/Selection',
         * @return      object          this
         */
        Selection.prototype.insertHtml = function (html) {
-               if (UserAgent.isIEBeforeIE9) {
-                       this.get();
-                       if (this.getType() === 'Control') {
-                               this.selection.clear();
-                               this.get();
-                       }
-                       var range = this.createRange();
-                       range.pasteHTML(html);
-               } else {
-                       this.editor.focus();
-                       var fragment = this.document.createDocumentFragment();
-                       var div = this.document.createElement('div');
-                       div.innerHTML = html;
-                       while (div.firstChild) {
-                               fragment.appendChild(div.firstChild);
-                       }
-                       this.insertNode(fragment);
+               this.editor.focus();
+               var fragment = this.document.createDocumentFragment();
+               var div = this.document.createElement('div');
+               div.innerHTML = html;
+               while (div.firstChild) {
+                       fragment.appendChild(div.firstChild);
                }
+               this.insertNode(fragment);
                return this;
        };
 
@@ -682,107 +585,68 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/Selection',
         */
        Selection.prototype.handleBackSpace = function () {
                var range = this.createRange();
-               if (UserAgent.isIEBeforeIE9) {
-                       if (this.getType() === 'Control') {
-                                       // Deleting or backspacing on a control selection : delete the element
-                               var element = this.getParentElement();
-                               var parent = element.parentNode;
-                               parent.removeChild(el);
-                               return true;
-                       } else if (this.isEmpty()) {
-                                       // Check if deleting an empty block with a table as next sibling
-                               var element = this.getParentElement();
-                               if (!element.innerHTML && Dom.isBlockElement(element) && element.nextSibling && /^table$/i.test(element.nextSibling.nodeName)) {
-                                       var previous = element.previousSibling;
-                                       if (!previous) {
-                                               this.selectNodeContents(element.nextSibling.rows[0].cells[0], true);
-                                       } else if (/^table$/i.test(previous.nodeName)) {
-                                               this.selectNodeContents(previous.rows[previous.rows.length-1].cells[previous.rows[previous.rows.length-1].cells.length-1], false);
-                                       } else {
-                                               range.moveStart('character', -1);
-                                               range.collapse(true);
-                                               range.select();
+               var self = this;
+               window.setTimeout(function() {
+                       var range = self.createRange();
+                       var startContainer = range.startContainer;
+                       var startOffset = range.startOffset;
+                       // If the selection is collapsed...
+                       if (self.isEmpty()) {
+                               // ... and the cursor lies in a direct child of body...
+                               if (/^(body)$/i.test(startContainer.nodeName)) {
+                                       var node = startContainer.childNodes[startOffset-1];
+                               } else if (/^(body)$/i.test(startContainer.parentNode.nodeName)) {
+                                       var node = startContainer;
+                               // ... or, in Google, a span tag may have been inserted inside a heading element
+                               } else if (UserAgent.isWebKit && /^(#text)$/i.test(startContainer.nodeName)) {
+                                       var node = startContainer.parentNode;
+                                       if (/^(h[1-6])$/i.test(node.nodeName)) {
+                                               self.editor.getDomNode().cleanAppleStyleSpans(node);
+                                       } else if (node.parentNode && /^(h[1-6])$/i.test(node.parentNode.nodeName)) {
+                                               self.editor.getDomNode().cleanAppleStyleSpans(node.parentNode);
                                        }
-                                       el.parentNode.removeChild(element);
-                                       return true;
-                               }
-                       } else {
-                                       // Backspacing into a link
-                               var range2 = range.duplicate();
-                               range2.moveStart('character', -1);
-                               var a = range2.parentElement();
-                               if (a != range.parentElement() && /^a$/i.test(a.nodeName)) {
-                                       range2.collapse(true);
-                                       range2.moveEnd('character', 1);
-                                       range2.pasteHTML('');
-                                       range2.select();
-                                       return true;
-                               }
-                               return false;
-                       }
-               } else {
-                       var self = this;
-                       window.setTimeout(function() {
-                               var range = self.createRange();
-                               var startContainer = range.startContainer;
-                               var startOffset = range.startOffset;
-                               // If the selection is collapsed...
-                               if (self.isEmpty()) {
-                                       // ... and the cursor lies in a direct child of body...
-                                       if (/^(body)$/i.test(startContainer.nodeName)) {
-                                               var node = startContainer.childNodes[startOffset-1];
-                                       } else if (/^(body)$/i.test(startContainer.parentNode.nodeName)) {
-                                               var node = startContainer;
-                                       // ... or, in Google, a span tag may have been inserted inside a heading element
-                                       } else if (UserAgent.isWebKit && /^(#text)$/i.test(startContainer.nodeName)) {
-                                               var node = startContainer.parentNode;
-                                               if (/^(h[1-6])$/i.test(node.nodeName)) {
-                                                       self.editor.getDomNode().cleanAppleStyleSpans(node);
-                                               } else if (node.parentNode && /^(h[1-6])$/i.test(node.parentNode.nodeName)) {
-                                                       self.editor.getDomNode().cleanAppleStyleSpans(node.parentNode);
-                                               }
-                                               return false;
-                                       } else {
-                                               return false;
+                                       return false;
+                               } else {
+                                       return false;
+                               }
+                               // ... which is a br or text node containing no non-whitespace character...
+                               node.normalize();
+                               if (/^(br|#text)$/i.test(node.nodeName) && !/\S/.test(node.textContent)) {
+                                       // Get a meaningful previous sibling in which to reposition de cursor
+                                       var previousSibling = node.previousSibling;
+                                       while (previousSibling && /^(br|#text)$/i.test(previousSibling.nodeName) && !/\S/.test(previousSibling.textContent)) {
+                                               previousSibling = previousSibling.previousSibling;
                                        }
-                                       // ... which is a br or text node containing no non-whitespace character...
-                                       node.normalize();
-                                       if (/^(br|#text)$/i.test(node.nodeName) && !/\S/.test(node.textContent)) {
-                                               // Get a meaningful previous sibling in which to reposition de cursor
-                                               var previousSibling = node.previousSibling;
-                                               while (previousSibling && /^(br|#text)$/i.test(previousSibling.nodeName) && !/\S/.test(previousSibling.textContent)) {
-                                                       previousSibling = previousSibling.previousSibling;
-                                               }
-                                               // If there is no meaningful previous sibling, the cursor is at the start of body or the start of a direct child of body
-                                               if (previousSibling) {
-                                                       // Remove the node
-                                                       Dom.removeFromParent(node);
-                                                       // Position the cursor
-                                                       if (/^(ol|ul|dl)$/i.test(previousSibling.nodeName)) {
-                                                               self.selectNodeContents(previousSibling.lastChild, false);
-                                                       } else if (/^(table)$/i.test(previousSibling.nodeName)) {
-                                                               self.selectNodeContents(previousSibling.rows[previousSibling.rows.length-1].cells[previousSibling.rows[previousSibling.rows.length-1].cells.length-1], false);
-                                                       } else if (!/\S/.test(previousSibling.textContent) && previousSibling.firstChild) {
-                                                               self.selectNode(previousSibling.firstChild, true);
-                                                       } else {
-                                                               self.selectNodeContents(previousSibling, false);
-                                                       }
-                                               }
-                                       // ... or the only child of body and having no child (IE) or only a br child (FF)
-                                       } else if (
-                                                       /^(body)$/i.test(node.parentNode.nodeName)
-                                                       && !/\S/.test(node.parentNode.textContent)
-                                                       && (node.childNodes.length === 0 || (node.childNodes.length === 1 && /^(br)$/i.test(node.firstChild.nodeName)))
-                                               ) {
-                                               var parentNode = node.parentNode;
+                                       // If there is no meaningful previous sibling, the cursor is at the start of body or the start of a direct child of body
+                                       if (previousSibling) {
+                                               // Remove the node
                                                Dom.removeFromParent(node);
-                                               parentNode.innerHTML = '<br />';
-                                               self.selectNodeContents(parentNode, true);
+                                               // Position the cursor
+                                               if (/^(ol|ul|dl)$/i.test(previousSibling.nodeName)) {
+                                                       self.selectNodeContents(previousSibling.lastChild, false);
+                                               } else if (/^(table)$/i.test(previousSibling.nodeName)) {
+                                                       self.selectNodeContents(previousSibling.rows[previousSibling.rows.length-1].cells[previousSibling.rows[previousSibling.rows.length-1].cells.length-1], false);
+                                               } else if (!/\S/.test(previousSibling.textContent) && previousSibling.firstChild) {
+                                                       self.selectNode(previousSibling.firstChild, true);
+                                               } else {
+                                                       self.selectNodeContents(previousSibling, false);
+                                               }
                                        }
+                               // ... or the only child of body and having no child (IE) or only a br child (FF)
+                               } else if (
+                                               /^(body)$/i.test(node.parentNode.nodeName)
+                                               && !/\S/.test(node.parentNode.textContent)
+                                               && (node.childNodes.length === 0 || (node.childNodes.length === 1 && /^(br)$/i.test(node.firstChild.nodeName)))
+                                       ) {
+                                       var parentNode = node.parentNode;
+                                       Dom.removeFromParent(node);
+                                       parentNode.innerHTML = '<br />';
+                                       self.selectNodeContents(parentNode, true);
                                }
-                       }, 10);
-                       return false;
-               }
+                       }
+               }, 10);
+               return false;
+
        };
 
        /**
index 292631b..c83c927 100644 (file)
@@ -160,15 +160,10 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/Walker',
                                continue;
                        }
                        if (UserAgent.isIE) {
-                                       // IE before I9 fails to put style in attributes list.
-                               if (attributeName === 'style') {
-                                       if (UserAgent.isIEBeforeIE9) {
-                                               attributeValue = node.style.cssText;
-                                       }
-                                       // May need to strip the base url
-                               } else if (attributeName === 'href' || attributeName === 'src') {
+                               // May need to strip the base url
+                               if (attributeName === 'href' || attributeName === 'src') {
                                        attributeValue = this.stripBaseURL(attributeValue);
-                                       // Ignore value="0" reported by IE on all li elements
+                               // Ignore value="0" reported by IE on all li elements
                                } else if (attributeName === 'value' && /^li$/i.test(node.nodeName) && attributeValue == 0) {
                                        continue;
                                }
index 4be0f38..93efbc6 100644 (file)
@@ -76,13 +76,13 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/Editor/Iframe',
                                        var nestedElement = document.getElementById(this.nestedParentElements.sorted[i]);
                                        Event.on(
                                                nestedElement,
-                                               UserAgent.isIEBeforeIE9 ? 'propertychange' : 'DOMAttrModified',
+                                               'DOMAttrModified',
                                                function (event) { return self.onNestedShow(event); },
                                                options
                                        );
                                        Event.on(
                                                nestedElement.parentNode,
-                                               UserAgent.isIEBeforeIE9 ? 'propertychange' : 'DOMAttrModified',
+                                               'DOMAttrModified',
                                                function (event) { return self.onNestedShow(event); },
                                                options
                                        );
@@ -181,7 +181,6 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/Editor/Iframe',
                        } else {
                                this.document = iframe.contentWindow ? iframe.contentWindow.document : iframe.contentDocument;
                                this.getEditor().document = this.document;
-                               this.initializeCustomTags();
                                this.createHead();
                                // Style the document body
                                Dom.addClass(this.document.body, 'htmlarea-content-body');
@@ -218,20 +217,6 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/Editor/Iframe',
                },
 
                /**
-                * Create one of each of the configured custom tags so they are properly parsed by the walker when using IE
-                * See: http://en.wikipedia.org/wiki/HTML5_Shiv
-                *
-                * @return      void
-                */
-               initializeCustomTags: function () {
-                       if (UserAgent.isIEBeforeIE9) {
-                               for (var i = this.config.customTags.length; --i >= 0;) {
-                                       this.document.createElement(this.config.customTags[i]);
-                               }
-                       }
-               },
-
-               /**
                 * Build the iframe document head
                 */
                createHead: function () {
index cc51961..33d16bc 100644 (file)
@@ -55,7 +55,7 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/UserAgent/UserAgent', [], function () {
                 * @return boolean true if the client is supported
                 */
                isSupported: function () {
-                       return isGecko || isWebKit || isOpera || isIE;
+                       return isGecko || isWebKit || isOpera || (isIE && !isIEBeforeIE9);
                }
        };
 });
index c3d0b67..07414f0 100644 (file)
@@ -64,7 +64,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/AboutEditor',
                browsers: [
                         'Firefox 1.5+',
                         'Google Chrome 1.0+',
-                        'Internet Explorer 6.0+',
+                        'Internet Explorer 9.0+',
                         'Opera 9.62+',
                         'Safari 3.0.4+',
                         'SeaMonkey 1.0+'
@@ -154,7 +154,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/AboutEditor',
                                                + '<br />'
                                                + '&copy; 2002-2004 <a href="http://interactivetools.com" target="_blank">interactivetools.com, inc.</a><br />'
                                                + '&copy; 2003-2004 <a href="http://dynarch.com" target="_blank">dynarch.com LLC.</a><br />'
-                                               + '&copy; 2004-2014 <a href="http://www.sjbr.ca" target="_blank">Stanislas Rolland</a><br />'
+                                               + '&copy; 2004-2015 <a href="http://www.sjbr.ca" target="_blank">Stanislas Rolland</a><br />'
                                                + this.localize('All rights reserved.')
                                        + '</p>'
                        });
index be5d40b..ba5ed0e 100644 (file)
@@ -59,9 +59,6 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/BlockElements',
                                }
                        }
                        this.allowedAttributes = new Array('id', 'title', 'lang', 'xml:lang', 'dir', 'class', 'itemscope', 'itemtype', 'itemprop');
-                       if (UserAgent.isIEBeforeIE9) {
-                               this.addAllowedAttribute('className');
-                       }
                        this.indentedList = null;
                                // Standard block formating items
                        var standardElements = new Array('address', 'article', 'aside', 'blockquote', 'div', 'footer', 'header', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'nav', 'p', 'pre', 'section');
@@ -327,7 +324,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/BlockElements',
                                        }
                                }
                        }
-                       var fullNodeTextSelected = (!UserAgent.isIEBeforeIE9 && parentElement.textContent === range.toString()) || (UserAgent.isIEBeforeIE9 && parentElement.innerText === range.text);
+                       var fullNodeTextSelected = (parentElement.textContent === range.toString());
                        switch (buttonId) {
                                case "Indent" :
                                        if (/^(ol|ul)$/i.test(parentElement.nodeName) && !(fullNodeTextSelected && !/^(li)$/i.test(parentElement.parentNode.nodeName))) {
@@ -903,11 +900,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/BlockElements',
                        if (endElement) {
                                var parent = endElement.parentNode;
                                var paragraph = this.editor.document.createElement('p');
-                               if (UserAgent.isIEBeforeIE9) {
-                                       paragraph.innerHTML = '&nbsp';
-                               } else {
-                                       paragraph.appendChild(this.editor.document.createElement('br'));
-                               }
+                               paragraph.appendChild(this.editor.document.createElement('br'));
                                if (after && !endElement.nextSibling) {
                                        parent.appendChild(paragraph);
                                } else {
index a5b89cb..eee6821 100644 (file)
@@ -477,14 +477,10 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/CharacterMap',
                 * @return      void
                 */
                insertEntity: function (entity) {
-                       if (UserAgent.isIEBeforeIE9) {
-                               this.editor.getSelection().insertHtml(entity);
-                       } else {
-                               // Firefox, WebKit and IE convert '&nbsp;' to '&amp;nbsp;'
-                               var node = this.editor.document.createTextNode(((UserAgent.isGecko || UserAgent.isWebKit || UserAgent.isIE) && entity == '&nbsp;') ? '\xA0' : entity);
-                               this.editor.getSelection().insertNode(node);
-                               this.editor.getSelection().selectNode(node, false);
-                       }
+                       // Firefox, WebKit and IE convert '&nbsp;' to '&amp;nbsp;'
+                       var node = this.editor.document.createTextNode(((UserAgent.isGecko || UserAgent.isWebKit || UserAgent.isIE) && entity == '&nbsp;') ? '\xA0' : entity);
+                       this.editor.getSelection().insertNode(node);
+                       this.editor.getSelection().selectNode(node, false);
                },
 
                /**
index 50469c1..f37f3f6 100644 (file)
@@ -189,9 +189,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/ContextMenu',
                 */
                showMenu: function (target) {
                        this.showContextItems(target);
-                       if (!UserAgent.isIEBeforeIE9) {
-                               this.ranges = this.editor.getSelection().getRanges();
-                       }
+                       this.ranges = this.editor.getSelection().getRanges();
                        // Show the context menu
                        var targetPosition = Dom.getPosition(target);
                        var iframePosition = Dom.getPosition(this.editor.iframe.getEl());
@@ -251,9 +249,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/ContextMenu',
                 * Handler invoked when a menu item is clicked on
                 */
                onItemClick: function (item, event) {
-                       if (!UserAgent.isIEBeforeIE9) {
-                               this.editor.getSelection().setRanges(this.ranges);
-                       }
+                       this.editor.getSelection().setRanges(this.ranges);
                        var button = this.getButton(item.getItemId());
                        if (button) {
                                /**
index 222bf88..d043f27 100644 (file)
@@ -235,16 +235,12 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/CopyPaste',
                        if (/^(a)$/i.test(parent.nodeName)) {
                                parent.normalize();
                                if (!parent.innerHTML || (parent.childNodes.length == 1 && /^(br)$/i.test(parent.firstChild.nodeName))) {
-                                       if (!UserAgent.isIEBeforeIE9) {
-                                               var container = parent.parentNode;
-                                               this.editor.getDomNode().removeMarkup(parent);
-                                                       // Opera does not render empty list items
-                                               if (UserAgent.isOpera && /^(li)$/i.test(container.nodeName) && !container.firstChild) {
-                                                       container.innerHTML = '<br />';
-                                                       this.editor.getSelection().selectNodeContents(container, true);
-                                               }
-                                       } else {
-                                               Dom.removeFromParent(parent);
+                                       var container = parent.parentNode;
+                                       this.editor.getDomNode().removeMarkup(parent);
+                                               // Opera does not render empty list items
+                                       if (UserAgent.isOpera && /^(li)$/i.test(container.nodeName) && !container.firstChild) {
+                                               container.innerHTML = '<br />';
+                                               this.editor.getSelection().selectNodeContents(container, true);
                                        }
                                }
                        }
index 39342bb..f9318a3 100644 (file)
@@ -100,9 +100,6 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/DefaultClean',
                                        if (!/\S/.test(node.className)) {
                                                if (!UserAgent.isOpera) {
                                                        node.removeAttribute('class');
-                                                       if (UserAgent.isIEBeforeIE9) {
-                                                               node.removeAttribute('className');
-                                                       }
                                                } else {
                                                        node.className = '';
                                                }
@@ -110,7 +107,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/DefaultClean',
                                }
                        }
                        function clearStyle(node) {
-                               var style = UserAgent.isIEBeforeIE9 ? node.style.cssText : node.getAttribute('style');
+                               var style = node.getAttribute('style');
                                if (style) {
                                        var declarations = style.split(/\s*;\s*/);
                                        for (var i = declarations.length; --i >= 0;) {
@@ -122,13 +119,9 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/DefaultClean',
                                }
                        }
                        function stripTag(el) {
-                               if (UserAgent.isIEBeforeIE9) {
-                                       el.outerHTML = Util.htmlEncode(el.innerText);
-                               } else {
-                                       var txt = document.createTextNode(Dom.getInnerText(el));
-                                       el.parentNode.insertBefore(txt,el);
-                                       el.parentNode.removeChild(el);
-                               }
+                               var txt = document.createTextNode(Dom.getInnerText(el));
+                               el.parentNode.insertBefore(txt,el);
+                               el.parentNode.removeChild(el);
                        }
                        function checkEmpty(el) {
                                if (/^(span|b|strong|i|em|font)$/i.test(el.nodeName) && !el.firstChild) {
@@ -147,7 +140,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/DefaultClean',
                                        case Dom.TEXT_NODE:
                                        case Dom.DOCUMENT_NODE:
                                        case Dom.DOCUMENT_FRAGMENT_NODE:
-                                               if ((UserAgent.isIEBeforeIE9 && root.scopeName != 'HTML') || (!UserAgent.isIEBeforeIE9 && /:/.test(tag)) || /o:p/.test(tag)) {
+                                               if (/:/.test(tag)) {
                                                        stripTag(root);
                                                        return false;
                                                } else {
index c72f5fe..05ff018 100644 (file)
@@ -127,7 +127,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/DefaultImage',
                                        paddingRight:   isNaN(parseInt(this.image.style.paddingRight)) ? '' : parseInt(this.image.style.paddingRight),
                                        paddingBottom:  isNaN(parseInt(this.image.style.paddingBottom)) ? '' : parseInt(this.image.style.paddingBottom),
                                        paddingLeft:    isNaN(parseInt(this.image.style.paddingLeft)) ? '' : parseInt(this.image.style.paddingLeft),
-                                       cssFloat:       UserAgent.isIEBeforeIE9 ? this.image.style.styleFloat : this.image.style.cssFloat
+                                       cssFloat:       this.image.style.cssFloat
                                };
                        } else {
                                this.parameters = {
@@ -447,19 +447,11 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/DefaultImage',
                                if (UserAgent.isWebKit) {
                                        this.editor.getDomNode().cleanAppleStyleSpans(this.editor.document.body);
                                }
-                               if (UserAgent.isIEBeforeIE9) {
-                                       image = range.parentElement();
-                                       if (!/^img$/i.test(image.nodeName)) {
-                                               image = image.previousSibling;
-                                       }
-                                       this.editor.getSelection().selectNode(image);
-                               } else {
-                                       var range = this.editor.getSelection().createRange();
-                                       image = range.startContainer;
-                                       image = image.lastChild;
-                                       while (image && !/^img$/i.test(image.nodeName)) {
-                                               image = image.previousSibling;
-                                       }
+                               var range = this.editor.getSelection().createRange();
+                               image = range.startContainer;
+                               image = image.lastChild;
+                               while (image && !/^img$/i.test(image.nodeName)) {
+                                       image = image.previousSibling;
                                }
                        } else {
                                image.src = this.parameters.url;
@@ -495,11 +487,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/DefaultImage',
                                                        }
                                                        break;
                                                case 'cssFloat':
-                                                       if (UserAgent.isIEBeforeIE9) {
-                                                               image.style.styleFloat = value;
-                                                       } else {
-                                                               image.style.cssFloat = value;
-                                                       }
+                                                       image.style.cssFloat = value;
                                                        break;
                                        }
                                }
index 15a242a..311f5da 100644 (file)
@@ -320,7 +320,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/DefaultLink',
                                this.restoreSelection();
                                this.editor.getSelection().execCommand('CreateLink', false, href);
                                a = this.editor.getSelection().getParentElement();
-                               if (!UserAgent.isIEBeforeIE9 && !/^a$/i.test(a.nodeName)) {
+                               if (!/^a$/i.test(a.nodeName)) {
                                        var range = this.editor.getSelection().createRange();
                                        if (range.startContainer.nodeType !== Dom.TEXT_NODE) {
                                                a = range.startContainer.childNodes[range.startOffset];
index bf05025..bdb33bf 100644 (file)
@@ -166,23 +166,6 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/DefinitionList',
                                attributeValue = node.getAttribute(attributeName);
                                if (attributeValue) newNode.setAttribute(attributeName, attributeValue);
                        }
-                       // In IE, the above fails to update the classname and style attributes.
-                       if (UserAgent.isIEBeforeIE9) {
-                               if (node.style.cssText) {
-                                       newNode.style.cssText = node.style.cssText;
-                               }
-                               if (node.className) {
-                                       newNode.setAttribute('class', node.className);
-                                       if (!newNode.className) {
-                                               // IE before IE8
-                                               newNode.setAttribute('className', node.className);
-                                       }
-                               } else {
-                                       newNode.removeAttribute('class');
-                                       newNode.removeAttribute('className');
-                               }
-                       }
-
                        if (this.tags && this.tags[nodeName] && this.tags[nodeName].allowedClasses) {
                                if (newNode.className && /\S/.test(newNode.className)) {
                                        var allowedClasses = this.tags[nodeName].allowedClasses;
@@ -238,14 +221,10 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/DefinitionList',
                        if (this.editor.getSelection().isEmpty() && /^dd$/i.test(parentElement.nodeName)) {
                                var list = parentElement.appendChild(this.editor.document.createElement('dl'));
                                var term = list.appendChild(this.editor.document.createElement('dt'));
-                               if (!UserAgent.isIEBeforeIE9) {
-                                       if (UserAgent.isWebKit) {
-                                               term.innerHTML = '<br />';
-                                       } else {
-                                               term.appendChild(this.editor.document.createTextNode(''));
-                                       }
+                               if (UserAgent.isWebKit) {
+                                       term.innerHTML = '<br />';
                                } else {
-                                       term.innerHTML = '\x20';
+                                       term.appendChild(this.editor.document.createTextNode(''));
                                }
                                this.editor.getSelection().selectNodeContents(term, false);
                                return true;
index caa5fff..74260e5 100644 (file)
@@ -37,9 +37,6 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/InlineElements',
                                this.allowedAttributes = this.getPluginInstance('TextStyle').allowedAttributes;
                        } else {
                                this.allowedAttributes = new Array('id', 'title', 'lang', 'xml:lang', 'dir', 'class', 'itemscope', 'itemtype', 'itemprop');
-                               if (UserAgent.isIEBeforeIE9) {
-                                       this.addAllowedAttribute('className');
-                               }
                        }
                        // Getting tags configuration for inline elements
                        if (this.buttonsConfiguration.textstyle) {
@@ -220,10 +217,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/InlineElements',
                        var ancestors = editor.getSelection().getAllAncestors();
                        var elementIsAncestor = false;
                        var fullNodeSelected = false;
-                       if (UserAgent.isIEBeforeIE9) {
-                               var bookmark = editor.getBookMark().get(range);
-                       }
-                               // Check if the chosen element is among the ancestors
+                       // Check if the chosen element is among the ancestors
                        for (var i = 0; i < ancestors.length; ++i) {
                                if ((ancestors[i].nodeType === Dom.ELEMENT_NODE) && (ancestors[i].nodeName.toLowerCase() == element)) {
                                        elementIsAncestor = true;
@@ -244,41 +238,20 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/InlineElements',
                                        if (element === "bdo") {
                                                newElement.setAttribute("dir", "rtl");
                                        }
-                                       if (!UserAgent.isIEBeforeIE9) {
-                                               if (fullNodeSelected && statusBarSelection) {
-                                                       if (UserAgent.isWebKit) {
-                                                               newElement = parent.parentNode.insertBefore(newElement, statusBarSelection);
-                                                               newElement.appendChild(statusBarSelection);
-                                                               newElement.normalize();
-                                                       } else {
-                                                               range.selectNode(parent);
-                                                               editor.getDomNode().wrapWithInlineElement(newElement, range);
-                                                       }
-                                                       editor.getSelection().selectNodeContents(newElement.lastChild, false);
+                                       if (fullNodeSelected && statusBarSelection) {
+                                               if (UserAgent.isWebKit) {
+                                                       newElement = parent.parentNode.insertBefore(newElement, statusBarSelection);
+                                                       newElement.appendChild(statusBarSelection);
+                                                       newElement.normalize();
                                                } else {
+                                                       range.selectNode(parent);
                                                        editor.getDomNode().wrapWithInlineElement(newElement, range);
                                                }
-                                               range.detach();
+                                               editor.getSelection().selectNodeContents(newElement.lastChild, false);
                                        } else {
-                                               var tagopen = "<" + element + ">";
-                                               var tagclose = "</" + element + ">";
-                                               if (fullNodeSelected) {
-                                                       if (!statusBarSelection) {
-                                                               parent.innerHTML = tagopen + parent.innerHTML + tagclose;
-                                                               if (element === "bdo") {
-                                                                       parent.firstChild.setAttribute("dir", "rtl");
-                                                               }
-                                                               editor.getSelection().selectNodeContents(parent, false);
-                                                       } else {
-                                                               var content = parent.outerHTML;
-                                                               var newElement = this.remapMarkup(parent, element);
-                                                               newElement.innerHTML = content;
-                                                               editor.getSelection().selectNodeContents(newElement, false);
-                                                       }
-                                               } else {
-                                                       editor.getDomNode().wrapWithInlineElement(newElement, range);
-                                               }
+                                               editor.getDomNode().wrapWithInlineElement(newElement, range);
                                        }
+                                       range.detach();
                                } else {
                                                // A complete node is selected: remove the markup
                                        if (fullNodeSelected) {
@@ -323,24 +296,6 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/InlineElements',
                                        newElement.setAttribute(this.allowedAttributes[i], attributeValue);
                                }
                        }
-                       // In IE before IE9, the above fails to update the class and style attributes.
-                       if (UserAgent.isIEBeforeIE9) {
-                               if (element.style.cssText) {
-                                       newElement.style.cssText = element.style.cssText;
-                               }
-                               if (element.className) {
-                                       newElement.setAttribute("class", element.className);
-                                       if (!newElement.className) {
-                                               // IE before IE8
-                                               newElement.setAttribute("className", element.className);
-                                       }
-                               } else {
-                                       newElement.removeAttribute("class");
-                                       // IE before IE8
-                                       newElement.removeAttribute("className");
-                               }
-                       }
-
                        if (this.tags && this.tags[tagName] && this.tags[tagName].allowedClasses) {
                                if (newElement.className && /\S/.test(newElement.className)) {
                                        var allowedClasses = this.tags[tagName].allowedClasses;
index 60cfc44..5c1553b 100644 (file)
@@ -151,9 +151,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/InsertSmiley',
                        imgTag.setAttribute('alt', icon.parentNode.getAttribute('ext:qtitle'));
                        imgTag.setAttribute('title', icon.parentNode.getAttribute('ext:qtip'));
                        this.editor.getSelection().insertNode(imgTag);
-                       if (!UserAgent.isIEBeforeIE9) {
-                               this.editor.getSelection().selectNode(imgTag, false);
-                       }
+                       this.editor.getSelection().selectNode(imgTag, false);
                        this.close();
                        return false;
                },
index 9618e29..d5719af 100644 (file)
@@ -55,9 +55,6 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/Language',
                        }
                        if (!this.allowedAttributes) {
                                this.allowedAttributes = new Array('id', 'title', 'lang', 'xml:lang', 'dir', 'class');
-                               if (UserAgent.isIEBeforeIE9) {
-                                       this.allowedAttributes.push('className');
-                               }
                        }
 
                        /**
@@ -171,14 +168,10 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/Language',
                                        selector = 'body.htmlarea-show-language-marks *[' + 'lang="' + value + '"]:before';
                                        style = 'content: "' + value + ': ";';
                                        rule = selector + ' { ' + style + ' }';
-                                       if (!UserAgent.isIEBeforeIE9) {
-                                               try {
-                                                       styleSheet.insertRule(rule, styleSheet.cssRules.length);
-                                               } catch (e) {
-                                                       this.appendToLog('onGenerate', 'Error inserting css rule: ' + rule + ' Error text: ' + e, 'warn');
-                                               }
-                                       } else {
-                                               styleSheet.addRule(selector, style);
+                                       try {
+                                               styleSheet.insertRule(rule, styleSheet.cssRules.length);
+                                       } catch (e) {
+                                               this.appendToLog('onGenerate', 'Error inserting css rule: ' + rule + ' Error text: ' + e, 'warn');
                                        }
                                }
                        }
@@ -264,8 +257,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/Language',
                                if (endPointsInSameBlock) {
                                        var ancestors = this.editor.getSelection().getAllAncestors();
                                        for (var i = 0; i < ancestors.length; ++i) {
-                                               fullNodeSelected =  (!UserAgent.isIEBeforeIE9 && ((statusBarSelection === ancestors[i] && ancestors[i].textContent === range.toString()) || (!statusBarSelection && ancestors[i].textContent === range.toString())))
-                                                       || (UserAgent.isIEBeforeIE9 && statusBarSelection === ancestors[i] && ((this.editor.getSelection().getType() !== 'Control' && ancestors[i].innerText === range.text) || (this.editor.getSelection().getType() === 'Control' && ancestors[i].innerText === range.item(0).text)));
+                                               fullNodeSelected = ((statusBarSelection === ancestors[i] && ancestors[i].textContent === range.toString()) || (!statusBarSelection && ancestors[i].textContent === range.toString()));
                                                if (fullNodeSelected) {
                                                        parent = ancestors[i];
                                                        break;
@@ -291,9 +283,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/Language',
                                        var newElement = this.editor.document.createElement('span');
                                        this.setLanguageAttributes(newElement, language);
                                        this.editor.getDomNode().wrapWithInlineElement(newElement, range);
-                                       if (!UserAgent.isIEBeforeIE9) {
-                                               range.detach();
-                                       }
+                                       range.detach();
                                }
                        } else {
                                this.setLanguageAttributeOnBlockElements(language);
@@ -432,8 +422,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/Language',
                                                if (!selectionEmpty) {
                                                        if (endPointsInSameBlock) {
                                                                for (var i = 0; i < ancestors.length; ++i) {
-                                                                       fullNodeSelected =  (!UserAgent.isIEBeforeIE9 && ((statusBarSelection === ancestors[i] && ancestors[i].textContent === range.toString()) || (!statusBarSelection && ancestors[i].textContent === range.toString())))
-                                                                               || (UserAgent.isIEBeforeIE9 && statusBarSelection === ancestors[i] && ((this.editor.getSelection().getType() !== 'Control' && ancestors[i].innerText === range.text) || (this.editor.getSelection().getType() === 'Control' && ancestors[i].innerText === range.item(0).text)));
+                                                                       fullNodeSelected = (statusBarSelection === ancestors[i] && ancestors[i].textContent === range.toString()) || (!statusBarSelection && ancestors[i].textContent === range.toString());
                                                                        if (fullNodeSelected) {
                                                                                parent = ancestors[i];
                                                                                break;
index 19d0bfe..b1cd721 100644 (file)
@@ -140,14 +140,10 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/MicrodataSchema',
                                var selector = 'body.htmlarea-show-microdata *[' + store.storeId + '="' + option.get('name') + '"]:before';
                                var style = 'content: "' + option.get('label') + ': "; font-variant: small-caps;';
                                var rule = selector + ' { ' + style + ' }';
-                               if (!UserAgent.isIEBeforeIE9) {
-                                       try {
-                                               styleSheet.insertRule(rule, styleSheet.cssRules.length);
-                                       } catch (e) {
-                                               this.appendToLog('onGenerate', 'Error inserting css rule: ' + rule + ' Error text: ' + e, 'warn');
-                                       }
-                               } else {
-                                       styleSheet.addRule(selector, style);
+                               try {
+                                       styleSheet.insertRule(rule, styleSheet.cssRules.length);
+                               } catch (e) {
+                                       this.appendToLog('onGenerate', 'Error inserting css rule: ' + rule + ' Error text: ' + e, 'warn');
                                }
                                return true;
                        }, this);
index 660570b..1603028 100644 (file)
@@ -256,8 +256,8 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/PlainText',
                        if (!this.getButton('PasteToggle').inactive) {
                                switch (this.currentBehaviour) {
                                        case 'plainText':
-                                               // Only IE before IE9 and Chrome will allow access to the clipboard content by default, in plain text only however
-                                               if (UserAgent.isIEBeforeIE9 || UserAgent.isChrome) {
+                                               // Only Chrome will allow access to the clipboard content by default, in plain text only however
+                                               if (UserAgent.isChrome) {
                                                        var clipboardText = this.grabClipboardText(event);
                                                        if (clipboardText) {
                                                                this.editor.getSelection().insertHtml(clipboardText);
@@ -279,11 +279,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/PlainText',
                                                                        'PasteToggle'
                                                                )
                                                        );
-                                                       if (UserAgent.isIEBeforeIE9) {
-                                                               Event.getBrowserEvent(event).returnValue = false;
-                                                       } else {
-                                                               Event.stopEvent(event);
-                                                       }
+                                                       Event.stopEvent(event);
                                                        return false;
                                                } else {
                                                        // Redirect the paste operation to a hidden section
index 292578a..bb58e58 100644 (file)
@@ -49,9 +49,6 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/SelectFont',
                        }
                        if (!this.allowedAttributes) {
                                this.allowedAttributes = new Array('id', 'title', 'lang', 'xml:lang', 'dir', 'class', 'style');
-                               if (UserAgent.isIEBeforeIE9) {
-                                       this.allowedAttributes.push('className');
-                               }
                        }
 
                        /**
@@ -199,9 +196,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/SelectFont',
                                this.setStyle(element, select.itemId, param);
                                // Wrap the selection with span tag with the style attribute
                                editor.getDomNode().wrapWithInlineElement(element, range);
-                               if (!UserAgent.isIEBeforeIE9) {
-                                       range.detach();
-                               }
+                               range.detach();
                        }
                        return false;
                },
@@ -243,12 +238,8 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/SelectFont',
                                var parentElement = statusBarSelection ? statusBarSelection : editor.getSelection().getParentElement();
                                var value = parentElement.style[this.styleProperty[select.itemId]];
                                if (!value) {
-                                       if (!UserAgent.isIEBeforeIE9) {
-                                               if (editor.document.defaultView && editor.document.defaultView.getComputedStyle(parentElement, null)) {
-                                                       value = editor.document.defaultView.getComputedStyle(parentElement, null).getPropertyValue(this.cssProperty[select.itemId]);
-                                               }
-                                       } else {
-                                               value = parentElement.currentStyle[this.styleProperty[select.itemId]];
+                                       if (editor.document.defaultView && editor.document.defaultView.getComputedStyle(parentElement, null)) {
+                                               value = editor.document.defaultView.getComputedStyle(parentElement, null).getPropertyValue(this.cssProperty[select.itemId]);
                                        }
                                }
                                var index = -1;
index af32ede..57d9fc4 100644 (file)
@@ -52,9 +52,6 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/TYPO3Color',
                        }
                        if (!this.allowedAttributes) {
                                this.allowedAttributes = new Array('id', 'title', 'lang', 'xml:lang', 'dir', 'class', 'style');
-                               if (UserAgent.isIEBeforeIE9) {
-                                       this.allowedAttributes.push('className');
-                               }
                        }
                        /*
                         * Registering plugin "About" information
index f4047ad..13c6c65 100644 (file)
@@ -225,21 +225,15 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/TYPO3Link',
                                        // Update link attributes
                                this.setLinkAttributes(node, range, cur_target, cur_class, cur_title, imageNode, addIconAfterLink, additionalValues);
                        } else {
-                                       // Create new link
-                                       // Cleanup selected range
+                               // Create new link
+                               // Cleanup selected range
                                range = this.editor.getSelection().createRange();
-                                       // Clean existing anchors otherwise Mozilla may create nested anchors while IE may update existing link
-                               if (UserAgent.isIEBeforeIE9) {
-                                       this.cleanAllLinks(node, range, true);
-                                       this.editor.getSelection().execCommand('UnLink', false, null);
-                               } else {
-                                               // Selection may be lost when cleaning links
-                                               // Note: In IE6-8, the following procedure breaks the selection used by the execCommand
-                                       var bookMark = this.editor.getBookMark().get(range);
-                                       this.cleanAllLinks(node, range);
-                                       range = this.editor.getBookMark().moveTo(bookMark);
-                                       this.editor.getSelection().selectRange(range);
-                               }
+                               // Clean existing anchors otherwise Mozilla may create nested anchors
+                               // Selection may be lost when cleaning links
+                               var bookMark = this.editor.getBookMark().get(range);
+                               this.cleanAllLinks(node, range);
+                               range = this.editor.getBookMark().moveTo(bookMark);
+                               this.editor.getSelection().selectRange(range);
                                if (UserAgent.isGecko) {
                                        this.editor.getSelection().execCommand('CreateLink', false, encodeURI(theLink));
                                } else {
@@ -290,12 +284,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/TYPO3Link',
                        }
                        if (HTMLArea.classesAnchorSetup) {
                                var range = this.editor.getSelection().createRange();
-                               if (!UserAgent.isIEBeforeIE9) {
-                                       this.cleanAllLinks(node, range, false);
-                               } else {
-                                       this.cleanAllLinks(node, range, true);
-                                       this.editor.getSelection().execCommand('Unlink', false, '');
-                               }
+                               this.cleanAllLinks(node, range, false);
                        } else {
                                this.editor.getSelection().execCommand('Unlink', false, '');
                        }
@@ -320,19 +309,8 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/TYPO3Link',
                setLinkAttributes: function(node, range, cur_target, cur_class, cur_title, imageNode, addIconAfterLink, additionalValues) {
                        if (/^a$/i.test(node.nodeName)) {
                                var nodeInRange = false;
-                               if (!UserAgent.isIEBeforeIE9) {
-                                       this.editor.focus();
-                                       nodeInRange = Dom.rangeIntersectsNode(range, node);
-                               } else {
-                                       if (this.editor.getSelection().getType() === 'Control') {
-                                                       // we assume an image is selected
-                                               nodeInRange = true;
-                                       } else {
-                                               var nodeRange = this.editor.document.body.createTextRange();
-                                               nodeRange.moveToElementText(node);
-                                               nodeInRange = nodeRange.inRange(range) || range.inRange(nodeRange) || (range.compareEndPoints('StartToStart', nodeRange) == 0) || (range.compareEndPoints('EndToEnd', nodeRange) == 0);
-                                       }
-                               }
+                               this.editor.focus();
+                               nodeInRange = Dom.rangeIntersectsNode(range, node);
                                if (nodeInRange) {
                                        if (imageNode != null) {
                                                if (addIconAfterLink) {
@@ -351,9 +329,6 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/TYPO3Link',
                                        } else {
                                                if (!UserAgent.isOpera) {
                                                        node.removeAttribute('class');
-                                                       if (UserAgent.isIEBeforeIE9) {
-                                                               node.removeAttribute('className');
-                                                       }
                                                } else {
                                                        node.className = '';
                                                }
@@ -415,19 +390,8 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/TYPO3Link',
                cleanAllLinks: function(node, range, keepLinks) {
                        if (/^a$/i.test(node.nodeName)) {
                                var intersection = false;
-                               if (!UserAgent.isIEBeforeIE9) {
-                                       this.editor.focus();
-                                       intersection = Dom.rangeIntersectsNode(range, node);
-                               } else {
-                                       if (this.editor.getSelection().getType() === 'Control') {
-                                                       // we assume an image is selected
-                                               intersection = true;
-                                       } else {
-                                               var nodeRange = this.editor.document.body.createTextRange();
-                                               nodeRange.moveToElementText(node);
-                                               intersection = range.inRange(nodeRange) || ((range.compareEndPoints('StartToStart', nodeRange) > 0) && (range.compareEndPoints('StartToEnd', nodeRange) < 0)) || ((range.compareEndPoints('EndToStart', nodeRange) > 0) && (range.compareEndPoints('EndToEnd', nodeRange) < 0));
-                                       }
-                               }
+                               this.editor.focus();
+                               intersection = Dom.rangeIntersectsNode(range, node);
                                if (intersection) {
                                        this.cleanClassesAnchorImages(node);
                                        if (!keepLinks) {
index ca51136..b981a7c 100644 (file)
@@ -432,9 +432,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/TableOperations',
                                        tbody.appendChild(tr);
                                        for (var j = params.f_cols; --j >= 0;) {
                                                var td = doc.createElement('td');
-                                               if (!UserAgent.isIEBeforeIE9) {
-                                                       td.innerHTML = '<br />';
-                                               }
+                                               td.innerHTML = '<br />';
                                                tr.appendChild(td);
                                        }
                                }
@@ -536,14 +534,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/TableOperations',
                                }
                        }
                        if (this.dialog.arguments.buttonId === "InsertTable") {
-                               if (!UserAgent.isIEBeforeIE9) {
-                                       this.editor.getSelection().insertNode(table);
-                               } else {
-                                       table.id = "htmlarea_table_insert";
-                                       this.editor.getSelection().insertNode(table);
-                                       table = this.editor.document.getElementById(table.id);
-                                       table.removeAttribute("id");
-                               }
+                               this.editor.getSelection().insertNode(table);
                                this.editor.getSelection().selectNodeContents(table.rows[0].cells[0], true);
                                if (this.buttonsConfiguration.toggleborders && this.buttonsConfiguration.toggleborders.setOnTableCreation) {
                                        this.toggleBorders(true);
@@ -685,7 +676,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/TableOperations',
                        var buttonId = this.translateHotKey(id);
                        buttonId = buttonId ? buttonId : id;
 
-                       var mozbr = !UserAgent.isIEBeforeIE9 ? "<br />" : "";
+                       var mozbr = '<br />';
                        var tableParts = ["tfoot", "thead", "tbody"];
                        var tablePartsIndex = { tfoot : 0, thead : 1, tbody : 2 };
 
@@ -1568,24 +1559,6 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/TableOperations',
                                        }
                                }
                        }
-                               // In IE before IE9, the above fails to update the classname and style attributes.
-                       if (UserAgent.isIEBeforeIE9) {
-                               if (element.style.cssText) {
-                                       newCell.style.cssText = element.style.cssText;
-                               }
-                               if (element.className) {
-                                       newCell.setAttribute("class", element.className);
-                                       if (!newCell.className) {
-                                                       // IE before IE8
-                                               newCell.setAttribute("className", element.className);
-                                       }
-                               } else {
-                                       newCell.removeAttribute("class");
-                                               // IE before IE8
-                                       newCell.removeAttribute("className");
-                               }
-                       }
-
                        if (this.tags && this.tags[nodeName] && this.tags[nodeName].allowedClasses) {
                                if (newCell.className && /\S/.test(newCell.className)) {
                                        var allowedClasses = this.tags[nodeName].allowedClasses;
@@ -1629,11 +1602,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/TableOperations',
                 */
                processStyle: function (element, params) {
                        var style = element.style;
-                       if (UserAgent.isIEBeforeIE9) {
-                               style.styleFloat = "";
-                       } else {
-                               style.cssFloat = "";
-                       }
+                       style.cssFloat = '';
                        style.textAlign = "";
                        for (var i in params) {
                                if (params.hasOwnProperty(i)) {
@@ -2609,17 +2578,12 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/TableOperations',
                                parentElement = parentElement.parentNode;
                        }
                        if (/^(td|th)$/i.test(parentElement.nodeName)) {
-                               if (UserAgent.isIEBeforeIE9) {
-                                       range.pasteHTML('<br />');
-                                       range.select();
+                               var brNode = this.editor.document.createElement('br');
+                               this.editor.getSelection().insertNode(brNode);
+                               if (brNode.nextSibling) {
+                                       this.editor.getSelection().selectNodeContents(brNode.nextSibling, true);
                                } else {
-                                       var brNode = this.editor.document.createElement('br');
-                                       this.editor.getSelection().insertNode(brNode);
-                                       if (brNode.nextSibling) {
-                                               this.editor.getSelection().selectNodeContents(brNode.nextSibling, true);
-                                       } else {
-                                               this.editor.getSelection().selectNodeContents(brNode, false);
-                                       }
+                                       this.editor.getSelection().selectNodeContents(brNode, false);
                                }
                                Event.stopEvent(event);
                                return false;
index 6197e36..817ef3b 100644 (file)
@@ -56,9 +56,6 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/TextStyle',
 
                        // Allowed attributes on inline elements
                        this.allowedAttributes = new Array('id', 'title', 'lang', 'xml:lang', 'dir', 'class', 'itemscope', 'itemtype', 'itemprop');
-                       if (UserAgent.isIEBeforeIE9) {
-                               this.addAllowedAttribute('className');
-                       }
 
                        /**
                         * Registering plugin "About" information
@@ -141,8 +138,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/TextStyle',
                        if (!selectionEmpty) {
                                        // The selection is not empty
                                for (var i = 0; i < ancestors.length; ++i) {
-                                       fullNodeSelected = (UserAgent.isIEBeforeIE9 && ((statusBarSelection === ancestors[i] && ancestors[i].innerText === range.text) || (!statusBarSelection && ancestors[i].innerText === range.text)))
-                                                               || (!UserAgent.isIEBeforeIE9 && ((statusBarSelection === ancestors[i] && ancestors[i].textContent === range.toString()) || (!statusBarSelection && ancestors[i].textContent === range.toString())));
+                                       fullNodeSelected = (statusBarSelection === ancestors[i] && ancestors[i].textContent === range.toString()) || (!statusBarSelection && ancestors[i].textContent === range.toString());
                                        if (fullNodeSelected) {
                                                if (this.isInlineElement(ancestors[i])) {
                                                        parent = ancestors[i];
@@ -163,9 +159,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/TextStyle',
                                        var newElement = editor.document.createElement('span');
                                        Dom.addClass(newElement, className);
                                        editor.getDomNode().wrapWithInlineElement(newElement, range);
-                                       if (!UserAgent.isIEBeforeIE9) {
-                                               range.detach();
-                                       }
+                                       range.detach();
                                }
                        } else {
                                this.applyClassChange(parent, className);
@@ -274,8 +268,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/TextStyle',
                                var selectionEmpty = editor.getSelection().isEmpty();
                                if (!selectionEmpty) {
                                        for (var i = 0; i < ancestors.length; ++i) {
-                                               fullNodeSelected = (statusBarSelection === ancestors[i])
-                                                       && ((!UserAgent.isIEBeforeIE9 && ancestors[i].textContent === range.toString()) || (UserAgent.isIEBeforeIE9 && ancestors[i].innerText === range.text));
+                                               fullNodeSelected = (statusBarSelection === ancestors[i]) && ancestors[i].textContent === range.toString();
                                                if (fullNodeSelected) {
                                                        if (!Dom.isBlockElement(ancestors[i])) {
                                                                tagName = ancestors[i].nodeName.toLowerCase();
index 6f6251c..232cefd 100644 (file)
@@ -161,7 +161,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/UndoRedo',
                        var bookmark = null, bookmarkedText = null;
                                // Insert a bookmark
                        if (this.getEditorMode() === 'wysiwyg' && this.editor.isEditable()) {
-                               if ((!UserAgent.isIEBeforeIE9 && !(UserAgent.isOpera && navigator.userAgent.toLowerCase().indexOf('presto/2.1') != -1)) || (UserAgent.isIEBeforeIE9 && this.editor.getSelection().getType() !== 'Control')) {
+                               if (!(UserAgent.isOpera && navigator.userAgent.toLowerCase().indexOf('presto/2.1') !== -1)) {
                                                // Catch error in FF when the selection contains no usable range
                                        try {
                                                var range = this.editor.getSelection().createRange();
@@ -170,11 +170,6 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/UndoRedo',
                                                bookmark = null;
                                        }
                                }
-                                       // Get the bookmarked html text and remove the bookmark
-                               if (UserAgent.isIEBeforeIE9 && bookmark) {
-                                       bookmarkedText = this.editor.getInnerHTML();
-                                       this.editor.getBookMark().moveTo(bookmark);
-                               }
                        }
                        return {
                                text: this.editor.getInnerHTML(),
@@ -213,11 +208,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/UndoRedo',
                setContent: function (undoPosition) {
                        var bookmark = this.undoQueue[undoPosition].bookmark;
                        if (bookmark) {
-                               if (UserAgent.isIEBeforeIE9) {
-                                       this.editor.setHTML(this.undoQueue[undoPosition].bookmarkedText);
-                               } else {
-                                       this.editor.setHTML(this.undoQueue[undoPosition].text);
-                               }
+                               this.editor.setHTML(this.undoQueue[undoPosition].text);
                                this.editor.getSelection().selectRange(this.editor.getBookMark().moveTo(bookmark));
                                this.editor.scrollToCaret();
                        } else {