Make WordPress Core

Ticket #31895: 31895-dev-only.patch

File 31895-dev-only.patch, 4.0 KB (added by azaozz, 10 years ago)
  • src/wp-includes/js/tinymce/tinymce.js

     
    1 // 4.1.9 (2015-03-10)
     1// 4.1.10 (2015-03-xx)
    22
    33/**
    44 * Compiled inline version. (Library mode)
     
    27112711 */
    27122712define("tinymce/Env", [], function() {
    27132713        var nav = navigator, userAgent = nav.userAgent;
    2714         var opera, webkit, ie, ie11, gecko, mac, iDevice, android;
     2714        var opera, webkit, ie, ie11, ie12, gecko, mac, iDevice, android;
    27152715
    27162716        opera = window.opera && window.opera.buildNumber;
    27172717        android = /Android/.test(userAgent);
     
    27192719        ie = !webkit && !opera && (/MSIE/gi).test(userAgent) && (/Explorer/gi).test(nav.appName);
    27202720        ie = ie && /MSIE (\w+)\./.exec(userAgent)[1];
    27212721        ie11 = userAgent.indexOf('Trident/') != -1 && (userAgent.indexOf('rv:') != -1 || nav.appName.indexOf('Netscape') != -1) ? 11 : false;
    2722         ie = ie || ie11;
     2722        ie12 = (document.msElementsFromPoint && !ie && !ie11) ? 12 : false;
     2723        ie = ie || ie11 || ie12;
    27232724        gecko = !webkit && !ie11 && /Gecko/.test(userAgent);
    27242725        mac = userAgent.indexOf('Mac') != -1;
    27252726        iDevice = /(iPad|iPhone)/.test(userAgent);
    27262727
     2728        if (ie12) {
     2729                webkit = false;
     2730        }
     2731
    27272732        // Is a iPad/iPhone and not on iOS5 sniff the WebKit version since older iOS WebKit versions
    27282733        // says it has contentEditable support but there is no visible caret.
    27292734        var contentEditable = !iDevice || userAgent.match(/AppleWebKit\/(\d*)/)[1] >= 534;
     
    28332838                 * @property documentMode
    28342839                 * @type Number
    28352840                 */
    2836                 documentMode: ie ? (document.documentMode || 7) : 10
     2841                documentMode: ie && !ie12 ? (document.documentMode || 7) : 10
    28372842        };
    28382843});
    28392844
     
    1624216247
    1624316248                        // BlockFormat shortcuts keys
    1624416249                        for (var i = 1; i <= 6; i++) {
    16245                                 ed.addShortcut('meta+shift+' + i, '', ['FormatBlock', false, 'h' + i]);
     16250                                ed.addShortcut('access+' + i, '', ['FormatBlock', false, 'h' + i]);
    1624616251                        }
    1624716252
    16248                         ed.addShortcut('meta+shift+7', '', ['FormatBlock', false, 'p']);
    16249                         ed.addShortcut('meta+shift+8', '', ['FormatBlock', false, 'div']);
    16250                         ed.addShortcut('meta+shift+9', '', ['FormatBlock', false, 'address']);
     16253                        ed.addShortcut('access+7', '', ['FormatBlock', false, 'p']);
     16254                        ed.addShortcut('access+8', '', ['FormatBlock', false, 'div']);
     16255                        ed.addShortcut('access+9', '', ['FormatBlock', false, 'address']);
    1625116256                }
    1625216257
    1625316258                // Public functions
     
    2687826883                                return true;
    2687926884                        }
    2688026885
     26886                        function isSiblingsIgnoreWhiteSpace(node1, node2) {
     26887                                var node;
     26888
     26889                                for (node = node1.nextSibling; node && node != node2; node = node.nextSibling) {
     26890                                        if (node.nodeType == 3 && $.trim(node.data).length === 0) {
     26891                                                continue;
     26892                                        }
     26893
     26894                                        if (node !== node2) {
     26895                                                return false;
     26896                                        }
     26897                                }
     26898
     26899                                return node === node2;
     26900                        }
     26901
    2688126902                        function findCaretNode(node, forward, startNode) {
    2688226903                                var walker, current, nonEmptyElements;
    2688326904
     
    2698927010                                        return rng;
    2699027011                                }
    2699127012
    26992                                 if (textBlock != targetTextBlock) {
     27013                                if (targetTextBlock && textBlock != targetTextBlock) {
    2699327014                                        if (!isForward) {
     27015                                                if (!isSiblingsIgnoreWhiteSpace(targetTextBlock, textBlock)) {
     27016                                                        return rng;
     27017                                                }
     27018
    2699427019                                                if (targetCaretNode.nodeType == 1) {
    2699527020                                                        if (targetCaretNode.nodeName == "BR") {
    2699627021                                                                rng.setStartBefore(targetCaretNode);
     
    2700727032                                                        rng.setEndBefore(caretNode);
    2700827033                                                }
    2700927034                                        } else {
     27035                                                if (!isSiblingsIgnoreWhiteSpace(textBlock, targetTextBlock)) {
     27036                                                        return rng;
     27037                                                }
     27038
    2701027039                                                if (caretNode.nodeType == 1) {
    2701127040                                                        if (caretNode.nodeName == "BR") {
    2701227041                                                                rng.setStartBefore(caretNode);
     
    3128531314                 * @property minorVersion
    3128631315                 * @type String
    3128731316                 */
    31288                 minorVersion: '1.9',
     31317                minorVersion: '1.10',
    3128931318
    3129031319                /**
    3129131320                 * Release date of TinyMCE build.
     
    3129331322                 * @property releaseDate
    3129431323                 * @type String
    3129531324                 */
    31296                 releaseDate: '2015-03-10',
     31325                releaseDate: '2015-03-xx',
    3129731326
    3129831327                /**
    3129931328                 * Collection of editor instances.