<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[29579] trunk/src: Editor scrolling: </title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/29579">29579</a></dd>
<dt>Author</dt> <dd>azaozz</dd>
<dt>Date</dt> <dd>2014-08-24 05:10:52 +0000 (Sun, 24 Aug 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Editor scrolling: 
- Pin the TinyMCE statusbar (elements path) to the bottom.
- Add support for pinning the menu when present.
- Add borders from CSS.
- Optimize getting most elements outerHeight.
Part props avryl, fixes <a href="http://core.trac.wordpress.org/ticket/29293">#29293</a>, see <a href="http://core.trac.wordpress.org/ticket/28328">#28328</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadmincsseditcss">trunk/src/wp-admin/css/edit.css</a></li>
<li><a href="#trunksrcwpadminjseditorexpandjs">trunk/src/wp-admin/js/editor-expand.js</a></li>
<li><a href="#trunksrcwpincludescsseditorcss">trunk/src/wp-includes/css/editor.css</a></li>
<li><a href="#trunksrcwpincludescssmediaviewscss">trunk/src/wp-includes/css/media-views.css</a></li>
<li><a href="#trunksrcwpincludesjsmceviewjs">trunk/src/wp-includes/js/mce-view.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadmincsseditcss"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/css/edit.css (29578 => 29579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/css/edit.css  2014-08-23 19:36:00 UTC (rev 29578)
+++ trunk/src/wp-admin/css/edit.css     2014-08-24 05:10:52 UTC (rev 29579)
</span><span class="lines">@@ -406,6 +406,38 @@
</span><span class="cx"> }
</span><span class="cx"> /* end editor-expand.js override */
</span><span class="cx"> 
</span><ins>+.wp-editor-expand #wp-content-editor-tools {
+       z-index: 1000;
+       border-bottom: 1px solid #e5e5e5;
+}
+
+.wp-editor-expand #wp-content-editor-container {
+       -webkit-box-shadow: none;
+       box-shadow: none;
+       margin-top: -1px;
+}
+
+.wp-editor-expand #wp-content-editor-container {
+       border-bottom: 0 none;
+}
+
+.wp-editor-expand div.mce-statusbar {
+       z-index: 1;
+}
+
+.wp-editor-expand #post-status-info {
+       border-top: 1px solid #e5e5e5;
+}
+
+.wp-editor-expand div.mce-toolbar-grp {
+       z-index: 999;
+}
+
+#wp-content-editor-tools {
+       background-color: #f1f1f1;
+       padding-top: 20px;
+}
+
</ins><span class="cx"> #poststuff #post-body.columns-2 #side-sortables {
</span><span class="cx">  width: 280px;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunksrcwpadminjseditorexpandjs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/js/editor-expand.js (29578 => 29579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/js/editor-expand.js   2014-08-23 19:36:00 UTC (rev 29578)
+++ trunk/src/wp-admin/js/editor-expand.js      2014-08-24 05:10:52 UTC (rev 29579)
</span><span class="lines">@@ -10,13 +10,14 @@
</span><span class="cx">          $wrap = $( '#postdivrich' ),
</span><span class="cx">          $contentWrap = $( '#wp-content-wrap' ),
</span><span class="cx">          $tools = $( '#wp-content-editor-tools' ),
</span><del>-               $visualTop,
-               $visualEditor,
</del><ins>+                $visualTop = $(),
+               $visualEditor = $(),
</ins><span class="cx">           $textTop = $( '#ed_toolbar' ),
</span><span class="cx">          $textEditor = $( '#content' ),
</span><span class="cx">          $textEditorClone = $( '<div id="content-textarea-clone"></div>' ),
</span><span class="cx">          $bottom = $( '#post-status-info' ),
</span><del>-               $statusBar,
</del><ins>+                $menuBar = $(),
+               $statusBar = $(),
</ins><span class="cx">           $sideSortables = $( '#side-sortables' ),
</span><span class="cx">          $postboxContainer = $( '#postbox-container-1' ),
</span><span class="cx">          $postBody = $('#post-body'),
</span><span class="lines">@@ -32,7 +33,20 @@
</span><span class="cx">          lastScrollPosition = 0,
</span><span class="cx">          pageYOffsetAtTop = 130,
</span><span class="cx">          pinnedToolsTop = 56,
</span><del>-               autoresizeMinHeight = 300;
</del><ins>+                autoresizeMinHeight = 300,
+               // These are corrected when adjust() runs, except on scrolling if already set.
+               heights = {
+                       windowHeight: 0,
+                       windowWidth: 0,
+                       adminBarHeight: 0,
+                       toolsHeight: 0,
+                       menuBarHeight: 0,
+                       visualTopHeight: 0,
+                       textTopHeight: 0,
+                       bottomHeight: 0,
+                       statusBarHeight: 0,
+                       sideSortablesHeight: 0
+               };
</ins><span class="cx"> 
</span><span class="cx">  $textEditorClone.insertAfter( $textEditor );
</span><span class="cx"> 
</span><span class="lines">@@ -44,6 +58,23 @@
</span><span class="cx">          'word-wrap': 'break-word'
</span><span class="cx">  } );
</span><span class="cx"> 
</span><ins>+       function getHeights() {
+               var windowWidth = $window.width();
+
+               heights = {
+                       windowHeight: $window.height(),
+                       windowWidth: windowWidth,
+                       adminBarHeight: ( windowWidth > 600 ? $adminBar.outerHeight() : 0 ),
+                       toolsHeight: $tools.outerHeight() || 0,
+                       menuBarHeight: $menuBar.outerHeight() || 0,
+                       visualTopHeight: $visualTop.outerHeight() || 0,
+                       textTopHeight: $textTop.outerHeight() || 0,
+                       bottomHeight: $bottom.outerHeight() || 0,
+                       statusBarHeight: $statusBar.outerHeight() || 0,
+                       sideSortablesHeight: $sideSortables.height() || 0
+               };
+       }
+
</ins><span class="cx">   function textEditorKeyup( event ) {
</span><span class="cx">          var VK = jQuery.ui.keyCode,
</span><span class="cx">                  key = event.keyCode,
</span><span class="lines">@@ -51,7 +82,6 @@
</span><span class="cx">                  selStart = $textEditor[0].selectionStart,
</span><span class="cx">                  selEnd = $textEditor[0].selectionEnd,
</span><span class="cx">                  textNode = $textEditorClone[0].firstChild,
</span><del>-                       windowHeight = $window.height(),
</del><span class="cx">                   buffer = 10,
</span><span class="cx">                  offset, cursorTop, cursorBottom, editorTop, editorBottom;
</span><span class="cx"> 
</span><span class="lines">@@ -73,8 +103,8 @@
</span><span class="cx"> 
</span><span class="cx">          cursorTop = offset.top - buffer;
</span><span class="cx">          cursorBottom = cursorTop + offset.height + buffer;
</span><del>-               editorTop = $adminBar.outerHeight() + $tools.outerHeight() + $textTop.outerHeight();
-               editorBottom = windowHeight - $bottom.outerHeight();
</del><ins>+                editorTop = heights.adminBarHeight + heights.toolsHeight + heights.textTopHeight;
+               editorBottom = heights.windowHeight - heights.bottomHeight;
</ins><span class="cx"> 
</span><span class="cx">          if ( cursorTop < editorTop && ( key === VK.UP || key === VK.LEFT || key === VK.BACKSPACE ) ) {
</span><span class="cx">                  window.scrollTo( window.pageXOffset, cursorTop + window.pageYOffset - editorTop );
</span><span class="lines">@@ -125,7 +155,8 @@
</span><span class="cx">          // Get the necessary UI elements.
</span><span class="cx">          $visualTop = $contentWrap.find( '.mce-toolbar-grp' );
</span><span class="cx">          $visualEditor = $contentWrap.find( '.mce-edit-area' );
</span><del>-               $statusBar = $contentWrap.find( '.mce-statusbar' ).filter( ':visible' );
</del><ins>+                $statusBar = $contentWrap.find( '.mce-statusbar' );
+               $menuBar = $contentWrap.find( '.mce-menubar' );
</ins><span class="cx"> 
</span><span class="cx">          function mceGetCursorOffset() {
</span><span class="cx">                  var node = editor.selection.getNode(),
</span><span class="lines">@@ -150,7 +181,6 @@
</span><span class="cx">                  var VK = tinymce.util.VK,
</span><span class="cx">                          key = event.keyCode,
</span><span class="cx">                          offset = mceGetCursorOffset(),
</span><del>-                               windowHeight = $window.height(),
</del><span class="cx">                           buffer = 10,
</span><span class="cx">                          cursorTop, cursorBottom, editorTop, editorBottom;
</span><span class="cx"> 
</span><span class="lines">@@ -158,12 +188,12 @@
</span><span class="cx">                          return;
</span><span class="cx">                  }
</span><span class="cx"> 
</span><del>-                       cursorTop = offset.top + editor.getContentAreaContainer().firstChild.getBoundingClientRect().top;
</del><ins>+                        cursorTop = offset.top + editor.iframeElement.getBoundingClientRect().top;
</ins><span class="cx">                   cursorBottom = cursorTop + offset.height;
</span><span class="cx">                  cursorTop = cursorTop - buffer;
</span><span class="cx">                  cursorBottom = cursorBottom + buffer;
</span><del>-                       editorTop = $adminBar.outerHeight() + $tools.outerHeight() + $visualTop.outerHeight();
-                       editorBottom = windowHeight - $bottom.outerHeight();
</del><ins>+                        editorTop = heights.adminBarHeight + heights.toolsHeight + heights.menuBarHeight + heights.visualTopHeight;
+                       editorBottom = heights.windowHeight - heights.bottomHeight - heights.statusBarHeight;
</ins><span class="cx"> 
</span><span class="cx">                  // Don't scroll if the node is taller than the visible part of the editor
</span><span class="cx">                  if ( editorBottom - editorTop < offset.height ) {
</span><span class="lines">@@ -219,35 +249,34 @@
</span><span class="cx">                  return;
</span><span class="cx">          }
</span><span class="cx"> 
</span><del>-               var bottomHeight = $bottom.outerHeight(),
-                       windowPos = $window.scrollTop(),
-                       windowHeight = $window.height(),
-                       windowWidth = $window.width(),
-                       adminBarHeight = windowWidth > 600 ? $adminBar.height() : 0,
</del><ins>+                var windowPos = $window.scrollTop(),
</ins><span class="cx">                   resize = type !== 'scroll',
</span><span class="cx">                  visual = ( mceEditor && ! mceEditor.isHidden() ),
</span><span class="cx">                  buffer = autoresizeMinHeight,
</span><span class="cx">                  postBodyTop = $postBody.offset().top,
</span><span class="cx">                  borderWidth = 1,
</span><span class="cx">                  contentWrapWidth = $contentWrap.width(),
</span><del>-                       sideSortablesHeight = $sideSortables.height(),
</del><span class="cx">                   $top, $editor, sidebarTop, footerTop, canPin,
</span><del>-                       toolsHeight, topPos, topHeight, editorPos, editorHeight, statusBarHeight;
</del><ins>+                        topPos, topHeight, editorPos, editorHeight;
</ins><span class="cx"> 
</span><ins>+               // Refresh the heights
+               if ( resize || ! heights.windowHeight ) {
+                       getHeights();
+               }
+
</ins><span class="cx">           if ( visual ) {
</span><span class="cx">                  $top = $visualTop;
</span><span class="cx">                  $editor = $visualEditor;
</span><ins>+                       topHeight = heights.visualTopHeight;
</ins><span class="cx">           } else {
</span><span class="cx">                  $top = $textTop;
</span><span class="cx">                  $editor = $textEditor;
</span><ins>+                       topHeight = heights.textTopHeight;
</ins><span class="cx">           }
</span><span class="cx"> 
</span><del>-               toolsHeight = $tools.outerHeight();
</del><span class="cx">           topPos = $top.parent().offset().top;
</span><del>-               topHeight = $top.outerHeight();
</del><span class="cx">           editorPos = $editor.offset().top;
</span><span class="cx">          editorHeight = $editor.outerHeight();
</span><del>-               statusBarHeight = visual ? $statusBar.outerHeight() : 0;
</del><span class="cx"> 
</span><span class="cx">          // Should we pin?
</span><span class="cx">          canPin = visual ? autoresizeMinHeight + topHeight : autoresizeMinHeight + 20; // 20px from textarea padding
</span><span class="lines">@@ -255,116 +284,138 @@
</span><span class="cx"> 
</span><span class="cx">          if ( ! canPin ) {
</span><span class="cx">                  if ( resize ) {
</span><del>-                               $top.css( {
</del><ins>+                                $tools.css( {
</ins><span class="cx">                                   position: 'absolute',
</span><span class="cx">                                  top: 0,
</span><del>-                                       borderTop: 'none',
-                                       width: contentWrapWidth - ( borderWidth * 2 ) - ( visual ? 0 : ( $top.outerWidth() - $top.width() ) )
</del><ins>+                                        width: contentWrapWidth
</ins><span class="cx">                           } );
</span><span class="cx"> 
</span><del>-                               $tools.css( {
</del><ins>+                                if ( visual && $menuBar.length ) {
+                                       $menuBar.css( {
+                                               position: 'absolute',
+                                               top: 0,
+                                               width: contentWrapWidth - ( borderWidth * 2 )
+                                       } );
+                               }
+
+                               $top.css( {
</ins><span class="cx">                                   position: 'absolute',
</span><del>-                                       top: 0,
-                                       width: contentWrapWidth
</del><ins>+                                        top: heights.menuBarHeight,
+                                       width: contentWrapWidth - ( borderWidth * 2 ) - ( visual ? 0 : ( $top.outerWidth() - $top.width() ) )
</ins><span class="cx">                           } );
</span><span class="cx"> 
</span><del>-                               $bottom.css( {
-                                       position: 'relative',
-                                       bottom: 'auto',
-                                       width: '100%',
-                                       borderTop: 'none'
-                               } );
</del><ins>+                                $statusBar.add( $bottom ).attr( 'style', '' );
</ins><span class="cx">                   }
</span><span class="cx">          } else {
</span><span class="cx">                  // Maybe pin the top.
</span><span class="cx">                  if ( ( ! fixedTop || resize ) &&
</span><span class="cx">                          // Handle scrolling down.
</span><del>-                               ( windowPos >= ( topPos - toolsHeight - adminBarHeight ) &&
</del><ins>+                                ( windowPos >= ( topPos - heights.toolsHeight - heights.adminBarHeight ) &&
</ins><span class="cx">                           // Handle scrolling up.
</span><del>-                               windowPos <= ( topPos - toolsHeight - adminBarHeight + editorHeight - buffer ) ) ) {
-
</del><ins>+                                windowPos <= ( topPos - heights.toolsHeight - heights.adminBarHeight + editorHeight - buffer ) ) ) {
</ins><span class="cx">                           fixedTop = true;
</span><span class="cx"> 
</span><del>-                               $top.css( {
</del><ins>+                                $tools.css( {
</ins><span class="cx">                                   position: 'fixed',
</span><del>-                                       top: adminBarHeight + toolsHeight,
-                                       width: contentWrapWidth - ( borderWidth * 2 ) - ( visual ? 0 : ( $top.outerWidth() - $top.width() ) ),
-                                       borderTop: '1px solid #e5e5e5'
</del><ins>+                                        top: heights.adminBarHeight,
+                                       width: contentWrapWidth
</ins><span class="cx">                           } );
</span><span class="cx"> 
</span><del>-                               $tools.css( {
</del><ins>+                                if ( visual && $menuBar.length ) {
+                                       $menuBar.css( {
+                                               position: 'fixed',
+                                               top: heights.adminBarHeight + heights.toolsHeight,
+                                               width: contentWrapWidth - ( borderWidth * 2 ) - ( visual ? 0 : ( $top.outerWidth() - $top.width() ) )
+                                       } );
+                               }
+
+                               $top.css( {
</ins><span class="cx">                                   position: 'fixed',
</span><del>-                                       top: adminBarHeight,
-                                       width: contentWrapWidth
</del><ins>+                                        top: heights.adminBarHeight + heights.toolsHeight + heights.menuBarHeight,
+                                       width: contentWrapWidth - ( borderWidth * 2 ) - ( visual ? 0 : ( $top.outerWidth() - $top.width() ) )
</ins><span class="cx">                           } );
</span><span class="cx">                  // Maybe unpin the top.
</span><span class="cx">                  } else if ( fixedTop || resize ) {
</span><span class="cx">                          // Handle scrolling up.
</span><del>-                               if ( windowPos <= ( topPos - toolsHeight - adminBarHeight ) ) {
</del><ins>+                                if ( windowPos <= ( topPos - heights.toolsHeight - heights.adminBarHeight ) ) {
</ins><span class="cx">                                   fixedTop = false;
</span><span class="cx"> 
</span><del>-                                       $top.css( {
-                                               position: 'absolute',
-                                               top: 0,
-                                               borderTop: 'none',
-                                               width: contentWrapWidth - ( borderWidth * 2 ) - ( visual ? 0 : ( $top.outerWidth() - $top.width() ) )
-                                       } );
-
</del><span class="cx">                                   $tools.css( {
</span><span class="cx">                                          position: 'absolute',
</span><span class="cx">                                          top: 0,
</span><span class="cx">                                          width: contentWrapWidth
</span><span class="cx">                                  } );
</span><del>-                               // Handle scrolling down.
-                               } else if ( windowPos >= ( topPos - toolsHeight - adminBarHeight + editorHeight - buffer ) ) {
-                                       fixedTop = false;
</del><span class="cx"> 
</span><ins>+                                       if ( visual && $menuBar.length ) {
+                                               $menuBar.css( {
+                                                       position: 'absolute',
+                                                       top: 0,
+                                                       width: contentWrapWidth - ( borderWidth * 2 )
+                                               } );
+                                       }
+
</ins><span class="cx">                                   $top.css( {
</span><span class="cx">                                          position: 'absolute',
</span><del>-                                               top: editorHeight - buffer,
</del><ins>+                                                top: heights.menuBarHeight,
</ins><span class="cx">                                           width: contentWrapWidth - ( borderWidth * 2 ) - ( visual ? 0 : ( $top.outerWidth() - $top.width() ) )
</span><span class="cx">                                  } );
</span><ins>+                               // Handle scrolling down.
+                               } else if ( windowPos >= ( topPos - heights.toolsHeight - heights.adminBarHeight + editorHeight - buffer ) ) {
+                                       fixedTop = false;
</ins><span class="cx"> 
</span><span class="cx">                                  $tools.css( {
</span><span class="cx">                                          position: 'absolute',
</span><del>-                                               top: editorHeight - buffer + borderWidth, // border
</del><ins>+                                                top: editorHeight - buffer,
</ins><span class="cx">                                           width: contentWrapWidth
</span><span class="cx">                                  } );
</span><ins>+
+                                       if ( visual && $menuBar.length ) {
+                                               $menuBar.css( {
+                                                       position: 'absolute',
+                                                       top: editorHeight - buffer,
+                                                       width: contentWrapWidth - ( borderWidth * 2 )
+                                               } );
+                                       }
+
+                                       $top.css( {
+                                               position: 'absolute',
+                                               top: editorHeight - buffer + heights.menuBarHeight,
+                                               width: contentWrapWidth - ( borderWidth * 2 ) - ( visual ? 0 : ( $top.outerWidth() - $top.width() ) )
+                                       } );
</ins><span class="cx">                           }
</span><span class="cx">                  }
</span><span class="cx"> 
</span><span class="cx">                  // Maybe adjust the bottom bar.
</span><span class="cx">                  if ( ( ! fixedBottom || resize ) &&
</span><span class="cx">                          // +[n] for the border around the .wp-editor-container.
</span><del>-                               ( windowPos + windowHeight ) <= ( editorPos + editorHeight + bottomHeight + statusBarHeight + borderWidth ) ) {
-
</del><ins>+                                ( windowPos + heights.windowHeight ) <= ( editorPos + editorHeight + heights.bottomHeight + heights.statusBarHeight + borderWidth ) ) {
</ins><span class="cx">                           fixedBottom = true;
</span><span class="cx"> 
</span><ins>+                               $statusBar.css( {
+                                       position: 'fixed',
+                                       bottom: heights.bottomHeight,
+                                       width: contentWrapWidth - ( borderWidth * 2 )
+                               } );
+
</ins><span class="cx">                           $bottom.css( {
</span><span class="cx">                                  position: 'fixed',
</span><span class="cx">                                  bottom: 0,
</span><del>-                                       width: contentWrapWidth,
-                                       borderTop: '1px solid #dedede'
</del><ins>+                                        width: contentWrapWidth
</ins><span class="cx">                           } );
</span><span class="cx">                  } else if ( ( fixedBottom || resize ) &&
</span><del>-                                       ( windowPos + windowHeight ) > ( editorPos + editorHeight + bottomHeight + statusBarHeight - borderWidth ) ) {
</del><ins>+                                        ( windowPos + heights.windowHeight ) > ( editorPos + editorHeight + heights.bottomHeight + heights.statusBarHeight - borderWidth ) ) {
</ins><span class="cx">                           fixedBottom = false;
</span><span class="cx"> 
</span><del>-                               $bottom.css( {
-                                       position: 'relative',
-                                       bottom: 'auto',
-                                       width: '100%',
-                                       borderTop: 'none'
-                               } );
</del><ins>+                                $statusBar.add( $bottom ).attr( 'style', '' );
</ins><span class="cx">                   }
</span><span class="cx">          }
</span><span class="cx"> 
</span><span class="cx">          // Sidebar pinning
</span><del>-               if ( $postboxContainer.width() < 300 && windowWidth > 600 && // sidebar position is changed with @media from CSS, make sure it is on the side
</del><ins>+                if ( $postboxContainer.width() < 300 && heights.windowWidth > 600 && // sidebar position is changed with @media from CSS, make sure it is on the side
</ins><span class="cx">                   $document.height() > ( $sideSortables.height() + postBodyTop + 120 ) && // the sidebar is not the tallest element
</span><del>-                       windowHeight < editorHeight ) { // the editor is taller than the viewport
</del><ins>+                        heights.windowHeight < editorHeight ) { // the editor is taller than the viewport
</ins><span class="cx"> 
</span><del>-                       if ( sideSortablesHeight > windowHeight || fixedSideTop || fixedSideBottom ) {
</del><ins>+                        if ( heights.sideSortablesHeight > heights.windowHeight || fixedSideTop || fixedSideBottom ) {
</ins><span class="cx">                           // Reset when scrolling to the top
</span><span class="cx">                          if ( windowPos + pinnedToolsTop <= postBodyTop ) {
</span><span class="cx">                                  $sideSortables.attr( 'style', '' );
</span><span class="lines">@@ -375,12 +426,12 @@
</span><span class="cx">                                          if ( fixedSideTop ) {
</span><span class="cx">                                                  // let it scroll
</span><span class="cx">                                                  fixedSideTop = false;
</span><del>-                                                       sidebarTop = $sideSortables.offset().top - adminBarHeight;
</del><ins>+                                                        sidebarTop = $sideSortables.offset().top - heights.adminBarHeight;
</ins><span class="cx">                                                   footerTop = $footer.offset().top;
</span><span class="cx"> 
</span><span class="cx">                                                  // don't get over the footer
</span><del>-                                                       if ( footerTop < sidebarTop + sideSortablesHeight + 20 ) {
-                                                               sidebarTop = footerTop - sideSortablesHeight - 20;
</del><ins>+                                                        if ( footerTop < sidebarTop + heights.sideSortablesHeight + 20 ) {
+                                                               sidebarTop = footerTop - heights.sideSortablesHeight - 20;
</ins><span class="cx">                                                   }
</span><span class="cx"> 
</span><span class="cx">                                                  $sideSortables.css({
</span><span class="lines">@@ -388,7 +439,7 @@
</span><span class="cx">                                                          top: sidebarTop,
</span><span class="cx">                                                          bottom: ''
</span><span class="cx">                                                  });
</span><del>-                                               } else if ( ! fixedSideBottom && sideSortablesHeight + $sideSortables.offset().top + 20 < windowPos + windowHeight ) {
</del><ins>+                                                } else if ( ! fixedSideBottom && heights.sideSortablesHeight + $sideSortables.offset().top + 20 < windowPos + heights.windowHeight ) {
</ins><span class="cx">                                                   // pin the bottom
</span><span class="cx">                                                  fixedSideBottom = true;
</span><span class="cx"> 
</span><span class="lines">@@ -407,8 +458,8 @@
</span><span class="cx">                                                  footerTop = $footer.offset().top;
</span><span class="cx"> 
</span><span class="cx">                                                  // don't get over the footer
</span><del>-                                                       if ( footerTop < sidebarTop + sideSortablesHeight + 20 ) {
-                                                               sidebarTop = footerTop - sideSortablesHeight - 20;
</del><ins>+                                                        if ( footerTop < sidebarTop + heights.sideSortablesHeight + 20 ) {
+                                                               sidebarTop = footerTop - heights.sideSortablesHeight - 20;
</ins><span class="cx">                                                   }
</span><span class="cx"> 
</span><span class="cx">                                                  $sideSortables.css({
</span><span class="lines">@@ -450,16 +501,16 @@
</span><span class="cx"> 
</span><span class="cx">          if ( resize ) {
</span><span class="cx">                  $contentWrap.css( {
</span><del>-                               paddingTop: $tools.outerHeight()
</del><ins>+                                paddingTop: heights.toolsHeight
</ins><span class="cx">                   } );
</span><span class="cx"> 
</span><span class="cx">                  if ( visual ) {
</span><span class="cx">                          $visualEditor.css( {
</span><del>-                                       paddingTop: $visualTop.outerHeight()
</del><ins>+                                        paddingTop: heights.visualTopHeight + heights.menuBarHeight
</ins><span class="cx">                           } );
</span><span class="cx">                  } else {
</span><span class="cx">                          $textEditor.css( {
</span><del>-                                       marginTop: $textTop.outerHeight()
</del><ins>+                                        marginTop: heights.textTopHeight
</ins><span class="cx">                           } );
</span><span class="cx"> 
</span><span class="cx">                          $textEditorClone.width( contentWrapWidth - 20 - ( borderWidth * 2 ) );
</span><span class="lines">@@ -554,7 +605,7 @@
</span><span class="cx">          fullscreen && fullscreen.pubsub.unsubscribe( 'hidden', fullscreenHide );
</span><span class="cx"> 
</span><span class="cx">          // Reset all css
</span><del>-               $.each( [ $visualTop, $textTop, $tools, $bottom, $contentWrap, $visualEditor, $textEditor, $sideSortables ], function( i, element ) {
</del><ins>+                $.each( [ $visualTop, $textTop, $tools, $menuBar, $bottom, $statusBar, $contentWrap, $visualEditor, $textEditor, $sideSortables ], function( i, element ) {
</ins><span class="cx">                   element && element.attr( 'style', '' );
</span><span class="cx">          });
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunksrcwpincludescsseditorcss"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/css/editor.css (29578 => 29579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/css/editor.css     2014-08-23 19:36:00 UTC (rev 29578)
+++ trunk/src/wp-includes/css/editor.css        2014-08-24 05:10:52 UTC (rev 29579)
</span><span class="lines">@@ -152,7 +152,6 @@
</span><span class="cx">  background: #f5f5f5;
</span><span class="cx">  padding: 0;
</span><span class="cx">  position: relative;
</span><del>-       z-index: 999;
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> div.mce-toolbar-grp > div {
</span><span class="lines">@@ -368,6 +367,8 @@
</span><span class="cx"> /* Menubar */
</span><span class="cx"> .mce-menubar {
</span><span class="cx">  border-color: #e5e5e5;
</span><ins>+       background: #fff;
+       border-width: 0px 0px 1px;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> .mce-menubar .mce-btn:focus {
</span><span class="lines">@@ -759,11 +760,9 @@
</span><span class="cx">  position: relative;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#wp-content-editor-tools {
-       background-color: #f1f1f1;
-       padding-top: 20px;
</del><ins>+.wp-editor-tools {
</ins><span class="cx">   position: relative;
</span><del>-       z-index: 1000;
</del><ins>+        z-index: 1;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> .wp-editor-tools:after {
</span></span></pre></div>
<a id="trunksrcwpincludescssmediaviewscss"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/css/media-views.css (29578 => 29579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/css/media-views.css        2014-08-23 19:36:00 UTC (rev 29578)
+++ trunk/src/wp-includes/css/media-views.css   2014-08-24 05:10:52 UTC (rev 29579)
</span><span class="lines">@@ -150,6 +150,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> .media-modal-close:active {
</span><ins>+       -webkit-box-shadow: none;
</ins><span class="cx">   box-shadow: none;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunksrcwpincludesjsmceviewjs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/mce-view.js (29578 => 29579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/mce-view.js     2014-08-23 19:36:00 UTC (rev 29578)
+++ trunk/src/wp-includes/js/mce-view.js        2014-08-24 05:10:52 UTC (rev 29579)
</span><span class="lines">@@ -592,7 +592,7 @@
</span><span class="cx">                  fail: function( error ) {
</span><span class="cx">                          if ( ! this.error ) {
</span><span class="cx">                                  if ( error ) {
</span><del>-                                               this.error = error
</del><ins>+                                                this.error = error;
</ins><span class="cx">                                   } else {
</span><span class="cx">                                          return;
</span><span class="cx">                                  }
</span></span></pre>
</div>
</div>

</body>
</html>