Ticket #17136: html.mode.2.diff

File html.mode.2.diff, 40.5 KB (added by koopersmith, 2 years ago)
Line 
1Index: wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js
2===================================================================
3--- wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js      (revision 17732)
4+++ wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js      (working copy)
5@@ -9,7 +9,7 @@
6                riverBottomThreshold: 5,
7                keySensitivity: 100,
8                lastSearch: '',
9-               textarea: edCanvas,
10+               textarea: function() { return edCanvas; },
11 
12                init : function() {
13                        inputs.dialog = $('#wp-link');
14@@ -49,7 +49,7 @@
15                        wpLink.range = null;
16 
17                        if ( ! wpLink.isMCE() && document.selection ) {
18-                               wpLink.textarea.focus();
19+                               wpLink.textarea().focus();
20                                wpLink.range = document.selection.createRange();
21                        }
22                },
23@@ -127,7 +127,7 @@
24 
25                onClose: function() {
26                        if ( ! wpLink.isMCE() ) {
27-                               wpLink.textarea.focus();
28+                               wpLink.textarea().focus();
29                                if ( wpLink.range ) {
30                                        wpLink.range.moveToBookmark( wpLink.range.getBookmark() );
31                                        wpLink.range.select();
32@@ -152,7 +152,7 @@
33 
34                htmlUpdate : function() {
35                        var attrs, html, start, end, cursor,
36-                               textarea = wpLink.textarea;
37+                               textarea = wpLink.textarea();
38 
39                        if ( ! textarea )
40                                return;
41Index: wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.js
42===================================================================
43--- wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.js        (revision 17732)
44+++ wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.js        (working copy)
45@@ -1 +1 @@
46-(function(){tinymce.create("tinymce.plugins.wpFullscreenPlugin",{init:function(a,c){var d=this,g=0,e={},f=tinymce.DOM;a.addCommand("wpFullScreenClose",function(){if(a.getParam("wp_fullscreen_is_enabled")){f.win.setTimeout(function(){tinyMCE.remove(a);f.remove("wp_mce_fullscreen_parent");tinyMCE.settings=tinyMCE.oldSettings},10)}});a.addCommand("wpFullScreenSave",function(){var h=tinyMCE.get("wp_mce_fullscreen"),i;h.focus();i=tinyMCE.get(h.getParam("wp_fullscreen_editor_id"));i.setContent(h.getContent({format:"raw"}),{format:"raw"})});a.addCommand("wpFullScreenSaveContent",function(){a.execCommand("wpFullScreenSave");tinyMCE.triggerSave()});a.addCommand("wpFullScreenOpen",function(){var i=a.getDoc(),h=i.body;tinyMCE.oldSettings=tinyMCE.settings;tinymce.each(a.settings,function(j,k){e[k]=j});e.id="wp_mce_fullscreen";e.wp_fullscreen_is_enabled=true;e.wp_fullscreen_editor_id=a.id;e.theme_advanced_resizing=false;e.theme_advanced_toolbar_location="external";e.theme_advanced_statusbar_location="none";e.content_css=e.wp_fullscreen_content_css||"";e.height=tinymce.isIE?h.scrollHeight:h.offsetHeight;e.save_onsavecallback=function(){a.setContent(tinyMCE.get(e.id).getContent({format:"raw"}),{format:"raw"});a.execCommand("mceSave")};tinymce.each(a.getParam("wp_fullscreen_settings"),function(l,j){e[j]=l});d.fullscreenEditor=new tinymce.Editor("wp_mce_fullscreen",e);d.fullscreenEditor.onInit.add(function(){d.fullscreenEditor.setContent(a.getContent());d.fullscreenEditor.focus()});fullscreen.on();d.fullscreenEditor.render()});a.addButton("fullscreen",{title:"fullscreen.desc",cmd:"wpFullScreenOpen"});if(a.getParam("fullscreen_is_enabled")||!a.getParam("wp_fullscreen_is_enabled")){return}function b(){var k=a.getDoc(),h=k.body,m=k.documentElement,j=tinymce.DOM,l,i;if(tinymce.isIE){i=h.scrollHeight}else{if(tinymce.isWebKit){i=h.offsetHeight}else{i=m.offsetHeight}}l=(i>300)?i:300;if(g!=l){g=l;j.setStyle(j.get(a.id+"_ifr"),"height",l+"px")}}a.onInit.add(function(i,h){i.onChange.add(b);i.onSetContent.add(b);i.onPaste.add(b);i.onKeyUp.add(b);i.onPostRender.add(b);i.getBody().style.overflowY="hidden";i.dom.setStyle(i.getBody(),"paddingBottom",i.getParam("autoresize_bottom_margin",50)+"px")});if(a.getParam("autoresize_on_init",true)){a.onLoadContent.add(function(i,h){setTimeout(function(){b()},1200)})}a.addCommand("mceAutoResize",b)},getInfo:function(){return{longname:"WP Fullscreen",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}});tinymce.PluginManager.add("wpfullscreen",tinymce.plugins.wpFullscreenPlugin)})();
47\ No newline at end of file
48+(function(){tinymce.create("tinymce.plugins.wpFullscreenPlugin",{init:function(a,c){var d=this,g=0,e={},f=tinymce.DOM;a.addCommand("wpFullScreenClose",function(){if(a.getParam("wp_fullscreen_is_enabled")){f.win.setTimeout(function(){tinyMCE.remove(a);f.remove("wp_mce_fullscreen_parent");tinyMCE.settings=tinyMCE.oldSettings;tinyMCE.activeEditor.execCommand("wpFullScreenClosed")},10)}});a.addCommand("wpFullScreenClosed",function(){d.fullscreenEditor=null});a.addCommand("wpFullScreenSave",function(){var h=tinyMCE.get("wp_mce_fullscreen"),i;h.focus();i=tinyMCE.get(h.getParam("wp_fullscreen_editor_id"));i.setContent(h.getContent({format:"raw"}),{format:"raw"})});a.addCommand("wpFullScreenSaveContent",function(){a.execCommand("wpFullScreenSave");tinyMCE.triggerSave()});a.addCommand("wpFullScreenInit",function(){if(d.fullscreenEditor||a.id=="wp_mce_fullscreen"){return}var i=a.getDoc(),h=i.body;tinyMCE.oldSettings=tinyMCE.settings;tinymce.each(a.settings,function(j,k){e[k]=j});e.id="wp_mce_fullscreen";e.wp_fullscreen_is_enabled=true;e.wp_fullscreen_editor_id=a.id;e.theme_advanced_resizing=false;e.theme_advanced_toolbar_location="external";e.theme_advanced_statusbar_location="none";e.content_css=e.wp_fullscreen_content_css||"";e.height=tinymce.isIE?h.scrollHeight:h.offsetHeight;e.save_onsavecallback=function(){a.setContent(tinyMCE.get(e.id).getContent({format:"raw"}),{format:"raw"});a.execCommand("mceSave")};tinymce.each(a.getParam("wp_fullscreen_settings"),function(l,j){e[j]=l});d.fullscreenEditor=new tinymce.Editor("wp_mce_fullscreen",e);d.fullscreenEditor.onInit.add(function(){if(!fullscreen.visible&&fullscreen.mode()==="tinymce"){d.fullscreenEditor.setContent(a.getContent());d.fullscreenEditor.focus()}});d.fullscreenEditor.render()});a.addCommand("wpFullScreenOpen",function(){fullscreen.on("tinymce")});a.onInit.add(function(){if(!fullscreen.visible){return}if(a.id==="wp_mce_fullscreen"){fullscreen.mode("tinymce")}else{a.execCommand("wpFullScreenInit")}});if(a.id=="wp_mce_fullscreen"){setTimeout(function(){a.onNodeChange.add(function(j,h,k,i){tinymce.each(fullscreen.tinymce.commands,function(l,n){var o=h.get(n),m=fullscreen.Button(n);if(o){m.disabled(!!o.disabled);m.active(!!o.active)}})})},100)}a.addButton("fullscreen",{title:"fullscreen.desc",cmd:"wpFullScreenOpen"});if(a.getParam("fullscreen_is_enabled")||!a.getParam("wp_fullscreen_is_enabled")){return}function b(){var k=a.getDoc(),h=k.body,m=k.documentElement,j=tinymce.DOM,l,i;if(tinymce.isIE){i=h.scrollHeight}else{if(tinymce.isWebKit){i=h.offsetHeight}else{i=m.offsetHeight}}l=(i>300)?i:300;if(g!=l){g=l;j.setStyle(j.get(a.id+"_ifr"),"height",l+"px")}}a.onInit.add(function(i,h){i.onChange.add(b);i.onSetContent.add(b);i.onPaste.add(b);i.onKeyUp.add(b);i.onPostRender.add(b);i.getBody().style.overflowY="hidden";i.dom.setStyle(i.getBody(),"paddingBottom",i.getParam("autoresize_bottom_margin",50)+"px")});if(a.getParam("autoresize_on_init",true)){a.onLoadContent.add(function(i,h){setTimeout(function(){b()},1200)})}a.addCommand("mceAutoResize",b)},getInfo:function(){return{longname:"WP Fullscreen",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}});tinymce.PluginManager.add("wpfullscreen",tinymce.plugins.wpFullscreenPlugin)})();
49\ No newline at end of file
50Index: wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.dev.js
51===================================================================
52--- wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.dev.js    (revision 17732)
53+++ wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.dev.js    (working copy)
54@@ -18,10 +18,15 @@
55                                                tinyMCE.remove(ed);
56                                                DOM.remove('wp_mce_fullscreen_parent');
57                                                tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings
58+                                               tinyMCE.activeEditor.execCommand('wpFullScreenClosed');
59                                        }, 10);
60                                }
61                        });
62-                       
63+
64+                       ed.addCommand('wpFullScreenClosed', function() {
65+                               t.fullscreenEditor = null;
66+                       });
67+
68                        ed.addCommand('wpFullScreenSave', function() {
69                                var ed = tinyMCE.get('wp_mce_fullscreen'), edd;
70 
71@@ -30,13 +35,17 @@
72 
73                                edd.setContent( ed.getContent({format : 'raw'}), {format : 'raw'} );
74                        });
75-                       
76+
77                        ed.addCommand('wpFullScreenSaveContent', function() {
78                                ed.execCommand('wpFullScreenSave');
79                                tinyMCE.triggerSave();
80                        });
81-                       
82-                       ed.addCommand('wpFullScreenOpen', function() {
83+
84+                       ed.addCommand('wpFullScreenInit', function() {
85+                               // Only init the editor if necessary.
86+                               if ( t.fullscreenEditor || ed.id == 'wp_mce_fullscreen' )
87+                                       return;
88+
89                                var d = ed.getDoc(), b = d.body;
90 
91                                tinyMCE.oldSettings = tinyMCE.settings; // Store old settings
92@@ -64,17 +73,51 @@
93 
94                                t.fullscreenEditor = new tinymce.Editor('wp_mce_fullscreen', s);
95                                t.fullscreenEditor.onInit.add(function() {
96-                                       t.fullscreenEditor.setContent(ed.getContent());
97-                                       t.fullscreenEditor.focus();
98+                                       if ( ! fullscreen.visible && fullscreen.mode() === 'tinymce' ) {
99+                                               t.fullscreenEditor.setContent( ed.getContent() );
100+                                               t.fullscreenEditor.focus();
101+                                       }
102                                });
103 
104-                               fullscreen.on();
105                                t.fullscreenEditor.render();
106                        });
107 
108+                       ed.addCommand('wpFullScreenOpen', function() {
109+                               fullscreen.on('tinymce');
110+                       });
111+
112+                       ed.onInit.add( function() {
113+                               if ( ! fullscreen.visible )
114+                                       return;
115+
116+                               if ( ed.id === 'wp_mce_fullscreen' )
117+                                       fullscreen.mode('tinymce');
118+                               else
119+                                       ed.execCommand('wpFullScreenInit');
120+                       });
121+
122+                       if ( ed.id == 'wp_mce_fullscreen' ) {
123+                               // Ensure event is bound after theme events.
124+                               setTimeout( function() {
125+                                       // Keep external buttons in sync with tinymce buttons
126+                                       ed.onNodeChange.add( function( edi, cm, n, co ) {
127+                                               tinymce.each( fullscreen.tinymce.commands, function( v, key ) {
128+                                                       var control = cm.get( key ),
129+                                                               button  = fullscreen.Button( key );
130+
131+                                                       if ( control ) {
132+                                                               button.disabled( !! control.disabled );
133+                                                               button.active( !! control.active );
134+                                                       }
135+                                               });
136+                                       });
137+                               }, 100 );
138+                       }
139+
140                        // Register buttons
141                        ed.addButton('fullscreen', {title : 'fullscreen.desc', cmd : 'wpFullScreenOpen'});
142 
143+
144                        // END fullscreen
145 //----------------------------------------------------------------
146                        // START autoresize
147Index: wp-includes/js/quicktags.dev.js
148===================================================================
149--- wp-includes/js/quicktags.dev.js     (revision 17732)
150+++ wp-includes/js/quicktags.dev.js     (working copy)
151@@ -259,6 +259,7 @@
152        }
153        document.write('<input type="button" id="ed_spell" class="ed_button" onclick="edSpell(edCanvas);" title="' + quicktagsL10n.dictionaryLookup + '" value="' + quicktagsL10n.lookup + '" />');
154        document.write('<input type="button" id="ed_close" class="ed_button" onclick="edCloseAllTags();" title="' + quicktagsL10n.closeAllOpenTags + '" value="' + quicktagsL10n.closeTags + '" />');
155+       document.write('<input type="button" id="ed_fullscreen" class="ed_button" onclick="fullscreen.on(\'html\');return false;" title="' + quicktagsL10n.toggleFullscreen + '" value="' + quicktagsL10n.fullscreen + '" />');
156 //     edShowLinks(); // disabled by default
157        document.write('</div>');
158 }
159Index: wp-includes/script-loader.php
160===================================================================
161--- wp-includes/script-loader.php       (revision 17732)
162+++ wp-includes/script-loader.php       (working copy)
163@@ -86,6 +86,8 @@
164                'enterURL' => __('Enter the URL'),
165                'enterImageURL' => __('Enter the URL of the image'),
166                'enterImageDescription' => __('Enter a description of the image'),
167+               'fullscreen' => __('fullscreen'),
168+               'toggleFullscreen' => esc_attr( __('Toggle fullscreen mode') ),
169                'l10n_print_after' => 'try{convertEntities(quicktagsL10n);}catch(e){};'
170        ) );
171 
172@@ -93,9 +95,21 @@
173 
174        $scripts->add( 'editor', "/wp-admin/js/editor$suffix.js", array('utils','jquery'), '20110411' );
175        $scripts->add_data( 'editor', 'group', 1 );
176-       
177-       $scripts->add( 'wp-fullscreen', "/wp-admin/js/wp-fullscreen$suffix.js", array('jquery'), '20110425a' );
178+
179+       $scripts->add( 'wp-fullscreen', "/wp-admin/js/wp-fullscreen$suffix.js", array('jquery'), '20110428' );
180        $scripts->add_data( 'wp-fullscreen', 'group', 1 );
181+       $scripts->localize( 'wp-fullscreen', 'fullscreenL10n', array(
182+               'bold' => __('Bold (Ctrl + B)'),
183+               'italic' => __('Italic (Ctrl + I)'),
184+               'bullist' => __('Unordered list (Alt + Shift + U)'),
185+               'numlist' => __('Ordered list (Alt + Shift + O)'),
186+               'image' => __('Insert/edit image (Alt + Shift + M)'),
187+               'link' => __('Insert/edit link (Alt + Shift + A)'),
188+               'unlink' => __('Unlink (Alt + Shift + S)'),
189+               'html' => __('HTML'),
190+               'visual' => __('Visual'),
191+               'l10n_print_after' => 'try{convertEntities(fullscreenL10n);}catch(e){};',
192+       ) );
193 
194        $scripts->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6.1');
195 
196@@ -271,7 +285,7 @@
197        $scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", false, '20110131' );
198        $scripts->add_data( 'admin-bar', 'group', 1 );
199 
200-       $scripts->add( 'wplink', "/wp-includes/js/tinymce/plugins/wplink/js/wplink$suffix.js", array( 'jquery', 'wpdialogs' ), '20110421' );
201+       $scripts->add( 'wplink', "/wp-includes/js/tinymce/plugins/wplink/js/wplink$suffix.js", array( 'jquery', 'wpdialogs' ), '20110428' );
202        $scripts->add_data( 'wplink', 'group', 1 );
203        $scripts->localize( 'wplink', 'wpLinkL10n', array(
204                'title' => __('Insert/edit link'),
205Index: wp-admin/includes/post.php
206===================================================================
207--- wp-admin/includes/post.php  (revision 17732)
208+++ wp-admin/includes/post.php  (working copy)
209@@ -1725,80 +1725,33 @@
210        $width = isset($content_width) && 800 > $content_width ? $content_width : 800;
211        $width = $width + 10; // compensate for the padding
212        $save = $post->post_status == 'publish' ? __('Update') : __('Save');
213-?>
214+?>
215 <div id="wp-fullscreen-body">
216 <div id="fullscreen-topbar" class="fade-600">
217        <div id="wp-fullscreen-info">
218                <span id="wp-fullscreen-saved"> </span>
219                <span class="autosave-message">&nbsp;</span>
220-               <span id="wp-fullscreen-last-edit"> </span>
221+               <span id="wp-fullscreen-last-edit"> </span>
222        </div>
223 
224        <div id="wp-fullscreen-toolbar">
225-               <div id="wp-fullscreen-close"><a href="#" onclick="fullscreen.off();return false;"><?php _e('Back'); ?></a></div>
226-               <div id="wp-fullscreen-save"><input type="button" class="button-primary" value="<?php echo $save; ?>" onclick="fullscreen.save();" /></div>
227-               <div id="wp-fullscreen-buttons" style="width:<?php echo $width; ?>px;" class="wp_themeSkin">
228-                       <div>
229-                       <a title="<?php _e('Bold (Ctrl + B)'); ?>" aria-labelledby="wp_fs_bold_voice" onclick="fullscreen.b();return false;" class="mceButton mceButtonEnabled mce_bold" href="javascript:;" id="wp_fs_bold" role="button" tabindex="-1" aria-pressed="false">
230-                       <span class="mceIcon mce_bold"></span>
231-                       <span id="wp_fs_bold_voice" style="display: none;" class="mceVoiceLabel mceIconOnly"><?php _e('Bold (Ctrl + B)'); ?></span>
232-                       </a>
233+               <div id="wp-fullscreen-resources" style="display:none;">
234+                       <div id="wp-fullscreen-button-template" class="wp-fullscreen-button">
235+                               <a class="mceButton mceButtonEnabled" href="javascript:;" role="button" tabindex="-1" aria-pressed="false">
236+                                       <span class="mceIcon"></span>
237+                                       <span style="display: none;" class="mceVoiceLabel mceIconOnly"></span>
238+                               </a>
239                        </div>
240-
241-                       <div>
242-                       <a title="<?php _e('Italic (Ctrl + I)'); ?>" aria-labelledby="wp_fs_italic_voice" onclick="fullscreen.i();return false;" class="mceButton mceButtonEnabled mce_italic" href="javascript:;" id="wp_fs_italic" role="button" tabindex="-1" aria-pressed="false">
243-                       <span class="mceIcon mce_italic"></span>
244-                       <span id="wp_fs_italic_voice" style="display: none;" class="mceVoiceLabel mceIconOnly"><?php _e('Italic (Ctrl + I)'); ?></span>
245-                       </a>
246+                       <div class="wp-fullscreen-separator">
247+                               <span tabindex="-1" aria-orientation="vertical" role="separator" class="mceSeparator"></span>
248                        </div>
249+               </div>
250 
251-                       <div>
252-                       <span tabindex="-1" aria-orientation="vertical" role="separator" class="mceSeparator"></span>
253-                       </div>
254-
255-                       <div>
256-                       <a title="<?php _e('Unordered list (Alt + Shift + U)'); ?>" aria-labelledby="wp_fs_bullist_voice" onclick="fullscreen.ul();return false;" onmousedown="return false;" class="mceButton mceButtonEnabled mce_bullist" href="javascript:;" id="wp_fs_bullist" role="button" tabindex="-1" aria-pressed="false">
257-                       <span class="mceIcon mce_bullist"></span>
258-                       <span id="wp_fs_bullist_voice" style="display: none;" class="mceVoiceLabel mceIconOnly"><?php _e('Unordered list (Alt + Shift + U)'); ?></span>
259-                       </a>
260-                       </div>
261-
262-                       <div>
263-                       <a title="<?php _e('Ordered list (Alt + Shift + O)'); ?>" aria-labelledby="wp_fs_numlist_voice" onclick="fullscreen.ol();return false;" class="mceButton mceButtonEnabled mce_numlist" href="javascript:;" id="wp_fs_numlist" role="button" tabindex="-1" aria-pressed="false">
264-                       <span class="mceIcon mce_numlist"></span>
265-                       <span id="wp_fs_numlist_voice" style="display: none;" class="mceVoiceLabel mceIconOnly"><?php _e('Ordered list (Alt + Shift + O)'); ?></span>
266-                       </a>
267-                       </div>
268-
269-                       <div>
270-                       <span tabindex="-1" aria-orientation="vertical" role="separator" class="mceSeparator"></span>
271-                       </div>
272-
273-                       <div>
274-                       <a title="<?php _e('Insert/edit image (Alt + Shift + M)'); ?>" aria-labelledby="wp_fs_image_voice" onclick="jQuery('#add_image').click();return false;" class="mceButton mceButtonEnabled mce_image" href="javascript:;" id="wp_fs_image" role="button" tabindex="-1">
275-                       <span class="mceIcon mce_image"></span>
276-                       <span id="wp_fs_image_voice" style="display: none;" class="mceVoiceLabel mceIconOnly"><?php _e('Insert/edit image (Alt + Shift + M)'); ?></span>
277-                       </a>
278-                       </div>
279-
280-                       <div>
281-                       <span tabindex="-1" aria-orientation="vertical" role="separator" class="mceSeparator"></span>
282-                       </div>
283-
284-                       <div>
285-                       <a title="<?php _e('Insert/edit link (Alt + Shift + A)'); ?>" aria-labelledby="wp_fs_link_voice" onclick="fullscreen.link();return false;" class="mceButton mce_link mceButtonEnabled" href="javascript:;" id="wp_fs_link" role="button" tabindex="-1" aria-pressed="false">
286-                       <span class="mceIcon mce_link"></span>
287-                       <span id="wp_fs_link_voice" style="display: none;" class="mceVoiceLabel mceIconOnly"><?php _e('Insert/edit link (Alt + Shift + A)'); ?></span>
288-                       </a>
289-                       </div>
290-
291-                       <div>
292-                       <a title="<?php _e('Unlink (Alt + Shift + S)'); ?>" aria-labelledby="wp_fs_unlink_voice" onclick="fullscreen.unlink();return false;" class="mceButton mce_unlink mceButtonEnabled" href="javascript:;" id="wp_fs_unlink" role="button" tabindex="-1" aria-pressed="false">
293-                       <span class="mceIcon mce_unlink"></span>
294-                       <span id="wp_fs_unlink_voice" style="display: none;" class="mceVoiceLabel mceIconOnly"><?php _e('Unlink (Alt + Shift + S)'); ?></span>
295-                       </a>
296-                       </div>
297-
298+               <div id="wp-fullscreen-close"><a href="#" onclick="fullscreen.off();return false;"><?php _e('Back'); ?></a></div>
299+               <div id="wp-fullscreen-save"><input type="button" class="button-primary" value="<?php echo $save; ?>" onclick="fullscreen.save();" /></div>
300+               <div id="wp-fullscreen-central-toolbar" style="width:<?php echo $width; ?>px;">
301+                       <div id="wp-fullscreen-mode-bar"><div id="wp-fullscreen-modes"></div></div>
302+                       <div id="wp-fullscreen-button-bar"><div id="wp-fullscreen-buttons" class="wp_themeSkin"></div></div>
303                        <div id="wp-fullscreen-count"><?php _e('Word Count:'); ?> <span class="word-count">0</span></div>
304                </div>
305        </div>
306Index: wp-admin/js/wp-fullscreen.dev.js
307===================================================================
308--- wp-admin/js/wp-fullscreen.dev.js    (revision 17732)
309+++ wp-admin/js/wp-fullscreen.dev.js    (working copy)
310@@ -1,5 +1,8 @@
311 /**
312- * PubSub -- A lightweight publish/subscribe implementation. Private use only!
313+ * PUBSUB
314+ *
315+ * A lightweight publish/subscribe implementation.
316+ * Private use only!
317  */
318 var PubSub, fullscreen, wptitlehint;
319 
320@@ -38,7 +41,7 @@
321 };
322 
323 PubSub.prototype.publish = function( topic, args ) {
324-       var i, l,
325+       var i, l, broken,
326                topics = this.topics[ topic ];
327 
328        if ( ! topics )
329@@ -47,11 +50,18 @@
330        args = args || [];
331 
332        for ( i = 0, l = topics.length; i < l; i++ ) {
333-               topics[i].apply( null, args );
334+               broken = ( topics[i].apply( null, args ) === false || broken );
335        }
336+       return ! broken;
337 };
338 
339-// Distraction Free Writing (wp-fullscreen) access the API globally using the fullscreen variable.
340+/**
341+ * FULLSCREEN
342+ *
343+ * Distraction free writing.
344+ * Access the API globally using the fullscreen variable.
345+ */
346+
347 (function($){
348        var api, ps, bounder;
349 
350@@ -97,26 +107,119 @@
351        /**
352         * ON / OFF API
353         */
354-       api.on = function() {
355-               if ( ! api.ui.element )
356-                       api.ui.init();
357+       /**
358+        * on()
359+        *
360+        * Turns fullscreen on.
361+        *
362+        * @param string mode Optional. Switch to the given mode before opening.
363+        */
364+       api.on = function( mode ) {
365+               if ( api.visible )
366+                       return;
367 
368-               if ( ! api.visible )
369-                       api.ui.fade( 'show', 'showing', 'shown' );
370+               api.mode( mode );
371+               api.ui.fade( 'show', 'showing', 'shown' );
372        };
373 
374+       /**
375+        * off()
376+        *
377+        * Turns fullscreen off.
378+        */
379        api.off = function() {
380-               if ( api.ui.element && api.visible )
381-                       api.ui.fade( 'hide', 'hiding', 'hidden' );
382+               if ( ! api.visible )
383+                       return;
384+
385+               api.ui.fade( 'hide', 'hiding', 'hidden' );
386        };
387 
388        /**
389+        * MODE API
390+        */
391+       (function(){
392+               var mode = 'html';
393+
394+               /**
395+                * mode()
396+                *
397+                * @return string - The fullscreen mode.
398+                *
399+                * mode( to )
400+                *
401+                * @param string to - The fullscreen mode to switch to.
402+                * @event switchMode
403+                * @eventparam string to   - The new mode.
404+                * @eventparam string from - The old mode.
405+                */
406+               api.mode = function( to ) {
407+                       if ( ! to )
408+                               return mode;
409+
410+                       var from = mode;
411+
412+                       // Don't switch if the mode is the same.
413+                       if ( mode == to )
414+                               return;
415+
416+                       // Only fire the switch event when visible.
417+                       if ( ! api.visible || ps.publish( 'switchMode', [ to, from ] ) ) {
418+                               mode = to;
419+                               ps.publish( 'switchedMode', [ to, from ] );
420+                       }
421+               };
422+       })();
423+
424+       /**
425+        * MODE TOGGLE BUTTONS
426+        */
427+       api.modes = {
428+               order: 'tinymce html',
429+               labels: {
430+                       html: fullscreenL10n.html,
431+                       tinymce: fullscreenL10n.visual
432+               },
433+               refresh: function( slug, label ) {
434+                       var modes = $('#wp-fullscreen-modes'),
435+                               slugs = api.modes.order.split(' ');
436+
437+                       modes.detach().children().detach().removeClass('active');
438+
439+                       $.each( slugs, function( i, slug ) {
440+                               modes.append( api.modes.element( slug ) );
441+                       });
442+
443+                       api.modes.element( api.mode() ).addClass('active');
444+
445+                       modes.appendTo('#wp-fullscreen-mode-bar');
446+               },
447+               _elements: {},
448+               element: function( slug ) {
449+                       if ( api.modes._elements[ slug ] )
450+                               return api.modes._elements[ slug ];
451+
452+                       var label = api.modes.labels[ slug ] || slug;
453+                               mode = $('<a href="javascript:;">' + label + '</a>');
454+
455+                       mode.click( function( e ) {
456+                               api.mode( slug );
457+                               e.preventDefault();
458+                       });
459+
460+                       return api.modes._elements[ slug ] = mode;
461+               }
462+       }
463+
464+       /**
465         * GENERAL
466         */
467 
468        api.save = function() {
469                $('#title').val( $('#wp-fullscreen-title').val() );
470-               tinyMCE.execCommand('wpFullScreenSaveContent');
471+
472+               if ( api.mode() === 'tinymce' )
473+                       tinyMCE.execCommand('wpFullScreenSaveContent');
474+
475                $('#hiddenaction').val('wp-fullscreen-save-post');
476 
477                $.post( ajaxurl, $('form#post').serialize(), function(r){
478@@ -129,8 +232,8 @@
479                }, 'json');
480        }
481 
482-       set_title_hint = function(title) {
483-               if ( !title.val().length )
484+       set_title_hint = function( title ) {
485+               if ( ! title.val().length )
486                        title.siblings('label').css( 'visibility', '' );
487                else
488                        title.siblings('label').css( 'visibility', 'hidden' );
489@@ -164,80 +267,338 @@
490                        .bind( 'mousemove.fullscreen', function(e) { bounder( 'showToolbar', 'hideToolbar', 2500 ); } );
491        });
492 
493+
494+       // This event occurs before the overlay blocks the UI.
495        ps.subscribe( 'show', function() {
496+               var textarea;
497+
498+               if ( ! api.textarea ) {
499+                       textarea = $('#wp_mce_fullscreen');
500+                       api.textarea = textarea[0];
501+                       api.grow( textarea );
502+               }
503+
504+               if ( api.mode() === 'tinymce' ) {
505+                       // Initialize the editor.
506+                       api.tinymce.editor();
507+
508+               } else if ( api.mode() === 'html' ) {
509+                       // Copy the content from the editor's textarea.
510+                       api.textarea.value = edCanvas.value;
511+               }
512+
513+               // Map the textarea to edCanvas, store the old edCanvas.
514+               api._edCanvas = edCanvas;
515+               edCanvas = api.textarea;
516+       });
517+
518+       // This event occurs while the overlay blocks the UI.
519+       ps.subscribe( 'showing', function() {
520+               // Update the fullscreen fields
521                var title = $('#wp-fullscreen-title').val( $('#title').val() );
522-               this.set_title_hint(title);
523+               set_title_hint( title );
524+               $('#wp-fullscreen-last-edit').html( $('#last-edit').html() );
525+
526+               // Show the fullscreen UI
527+               $('#wp-fullscreen-body').show();
528+               $( document.body ).addClass( 'fullscreen-active' );
529+               api.buttons.refresh();
530+               api.modes.refresh();
531+
532+               // Bind toolbar fading events
533                $( document ).bind( 'mousemove.fullscreen', function(e) { bounder( 'showToolbar', 'hideToolbar', 2500 ); } );
534+               bounder( 'showToolbar', 'hideToolbar', 2500 );
535        });
536 
537+       // This event occurs after the overlay blocks the UI.
538+       ps.subscribe( 'shown', function() {
539+               api.visible = true;
540+       });
541+
542+       // This event occurs before the overlay blocks the UI.
543        ps.subscribe( 'hide', function() {
544-               var title = $('#title').val( $('#wp-fullscreen-title').val() );
545-               this.set_title_hint(title);
546-               tinyMCE.execCommand('wpFullScreenSave');
547+               if ( api.mode() === 'tinymce' )
548+                       tinyMCE.execCommand('wpFullScreenSave');
549+
550+               // Unbind all fullscreen events on the document (including mousemove)
551                $( document ).unbind( '.fullscreen' );
552        });
553 
554-       ps.subscribe( 'showing', function() {
555-               $('#wp-fullscreen-body').show();
556-               $( document.body ).addClass( 'fullscreen-active' );
557-               bounder( 'showToolbar', 'hideToolbar', 3000 );
558-               $('#wp-fullscreen-last-edit').html( $('#last-edit').html() );
559-       });
560+       // This event occurs while the overlay blocks the UI.
561+       ps.subscribe( 'hiding', function() {
562+               var mode, title;
563 
564-       ps.subscribe( 'hiding', function() {
565+               // Update the normal fields
566+               title = $('#title').val( $('#wp-fullscreen-title').val() );
567+               set_title_hint( title );
568+               $('#last-edit').html( $('#wp-fullscreen-last-edit').html() );
569+
570+               // Restore and update edCanvas.
571+               edCanvas = api._edCanvas;
572+               edCanvas.value = api.textarea.value;
573+
574+               // Hide the fullscreen UI
575                $('#wp-fullscreen-body').hide();
576                $( document.body ).removeClass( 'fullscreen-active' );
577-               $('#last-edit').html( $('#wp-fullscreen-last-edit').html() );
578-       });
579 
580-       ps.subscribe( 'shown', function() {
581-               api.visible = true;
582+               // Destroy the tinyMCE editor if it has been instantiated.
583+               if ( tinyMCE ) // This should be run regardless of mode.
584+                       tinyMCE.execCommand('wpFullScreenClose');
585+
586+               // Clear the textarea.
587+               api.textarea.value = '';
588+
589+               // Make sure the correct editor is displaying.
590+               mode = api.mode();
591+               if ( mode == 'tinymce' || mode == 'html' )
592+                       switchEditors.go( 'content', mode );
593        });
594 
595+       // This event occurs after the overlay blocks the UI.
596        ps.subscribe( 'hidden', function() {
597                api.visible = false;
598+
599                $('#wp_mce_fullscreen').removeAttr('style');
600-               tinyMCE.execCommand('wpFullScreenClose');
601        });
602 
603+       ps.subscribe( 'switchMode', function( to, from ) {
604+               var ed;
605+
606+               if ( to === 'tinymce' || from === 'tinymce' ) {
607+                       ed = api.tinymce.editor();
608+
609+                       // Don't switch modes if there was an error fetching the editor.
610+                       // If the editor is rendering, it will trigger the switch when initialized.
611+                       if ( ! ed )
612+                               return false;
613+               }
614+
615+               if ( from ==='html' && to === 'tinymce' ) {
616+                       api.textarea.value = switchEditors.wpautop( api.textarea.value );
617+                       ed.show();
618+               } else if ( from ==='tinymce' && to === 'html' ) {
619+                       ed.hide();
620+               }
621+       });
622+
623+       ps.subscribe( 'switchedMode', function( to, from ) {
624+               api.buttons.refresh();
625+               api.modes.refresh();
626+
627+               if ( to === 'html' )
628+                       api.grow.resize( api.textarea );
629+       });
630+
631+
632        /**
633-        * Buttons
634+        * BUTTONS
635         */
636-       api.b = function() {
637-               tinyMCE.execCommand('Bold');
638-       }
639+       api.Button = function( slug ) {
640+               if ( ! ( this instanceof api.Button ) ) {
641+                       // Get the instance and create a new one if necessary.
642+                       if ( ! api.Button.buttons[ slug ] )
643+                               api.Button.buttons[ slug ] = new api.Button( slug );
644+                       return api.Button.buttons[ slug ];
645+               }
646 
647-       api.i = function() {
648-               tinyMCE.execCommand('Italic');
649-       }
650+               this.slug   = slug;
651+               this.action = {};
652 
653-       api.ul = function() {
654-               tinyMCE.execCommand('InsertUnorderedList');
655-       }
656+               api.Button.buttons[ slug ] = this;
657+       };
658 
659-       api.ol = function() {
660-               tinyMCE.execCommand('InsertOrderedList');
661-       }
662+       api.Button.buttons = {};
663 
664-       api.link = function() {
665-               tinyMCE.execCommand('WP_Link');
666-       }
667+       $.extend( api.Button.prototype, {
668+               set: function( modes, callback ) {
669+                       var self = this;
670+                       if ( typeof modes === 'string' )
671+                               modes = [ modes ];
672+                       $.each( modes, function( i, mode ) {
673+                               self.action[ mode ] = callback;
674+                       });
675+               },
676+               get: function( mode ) {
677+                       return this.action[ mode ];
678+               },
679+               run: function() {
680+                       var callback = this.get( api.mode() );
681 
682-       api.unlink = function() {
683-               tinyMCE.execCommand('unlink');
684+                       if ( ! this.disabled() && callback )
685+                               return callback();
686+               },
687+               element: function( element ) {
688+                       var self = this;
689+                       if ( ! element ) {
690+                               if ( ! this._element )
691+                                       this.elementTemplate();
692+                               return this._element;
693+                       }
694+
695+                       this._element = element.detach();
696+                       // Ensure the proper classes are set.
697+                       $.each([ 'disabled', 'active' ], function( i, fn ) {
698+                               self[ fn ]( self[ fn ]() );
699+                       });
700+                       // Run when the element clicked.
701+                       element.click( function( e ) {
702+                               self.run();
703+                               e.preventDefault();
704+                       });
705+               },
706+
707+               elementTemplate: function() {
708+                       if ( ! api.Button.template || ! api.Button.template.length )
709+                               return;
710+
711+                       var slug  = this.slug,
712+                               el    = api.Button.template.clone(),
713+                               a     = el.children('a'),
714+                               label = fullscreenL10n[ slug ] || '';
715+
716+                       el.attr( 'id', 'wp-fs-button-' + slug );
717+                       a.addClass( 'mce_' + slug ).attr({
718+                               title: label,
719+                               'aria-labelledby': 'wp-fs-voice-' + slug
720+                       });
721+                       a.children('.mceIcon').addClass( 'mce_' + slug );
722+                       a.children('.mceVoiceLabel').attr( 'id', 'wp-fs-voice-' + slug ).text( label );
723+
724+                       this.element( el );
725+               }
726+       });
727+
728+       $(document).ready( function() {
729+               api.Button.template = $('#wp-fullscreen-button-template');
730+       });
731+
732+       /**
733+        * Create disabled and active functions.
734+        *
735+        * These functions act as getters/setters.
736+        * They also toggle the appropriate classnames on the element.
737+        */
738+       $.each([ 'disabled', 'active' ], function( i, fn ) {
739+               var key = '_' + fn;
740+
741+               api.Button.prototype[ fn ] = function( change ) {
742+                       if ( typeof change == 'undefined' )
743+                               return this[ key ];
744+
745+                       this[ key ] = !! change;
746+
747+                       if ( this.element() )
748+                               this.element().toggleClass( fn, this[ key ] );
749+               };
750+       });
751+
752+       api.buttons = {
753+               order: {
754+                       tinymce: 'bold italic | bullist numlist | image | link unlink',
755+                       html: 'image link'
756+               },
757+               refresh: function() {
758+                       var toolbar = $('#wp-fullscreen-buttons'),
759+                               sep     = $('#wp-fullscreen-resources .wp-fullscreen-separator'),
760+                               order   = api.buttons.order[ api.mode() ] || '',
761+                               slugs   = order.split(' ');
762+
763+                       if ( ! toolbar.length )
764+                               return;
765+
766+                       // Detach the toolbar from the DOM.
767+                       toolbar.detach();
768+                       // Remove separators
769+                       toolbar.children('.wp-fullscreen-separator').remove();
770+                       // Detach old buttons
771+                       toolbar.children().detach();
772+
773+                       // Arrange current buttons
774+                       $.each( slugs, function( i, slug ) {
775+                               var button;
776+
777+                               // A pipe indicates a separator
778+                               if ( slug == '|' ) {
779+                                       toolbar.append( sep.clone() );
780+                               // Otherwise attempt to fetch the element and append it.
781+                               } else {
782+                                       button = api.Button( slug );
783+                                       button.disabled( false );
784+                                       button.active( false );
785+
786+                                       if ( button.element() )
787+                                               toolbar.append( button.element() );
788+                               }
789+                       });
790+
791+                       // Add the toolbar back to the DOM
792+                       toolbar.prependTo('#wp-fullscreen-button-bar');
793+               }
794        }
795 
796        /**
797-        * UI elements (used for transitioning)
798+        * TINYMCE
799         */
800-       api.ui = {
801+       api.tinymce = {
802+
803                /**
804-                * Undefined api.ui properties:
805-                * element, topbar
806+                * editor()
807+                *
808+                * Fetches the fullscreen TinyMCE editor.
809+                *
810+                * Checks for errors.
811+                * Will initialize the editor if necessary.
812+                *
813+                * @return false | tinymce.Editor
814                 */
815+               editor: function() {
816+                       var ed;
817 
818+                       if ( ! tinyMCE )
819+                               return false;
820+
821+                       ed = tinyMCE.get('wp_mce_fullscreen');
822+
823+                       if ( ed ) {
824+                               return ed;
825+                       } else if ( tinyMCE.activeEditor ) {
826+                               tinyMCE.activeEditor.execCommand('wpFullScreenInit');
827+                       } else {
828+                               switchEditors.go( 'content', 'tinymce' );
829+                       }
830+
831+                       return false;
832+               },
833+
834+               commands: {
835+                       bold:    'Bold',
836+                       italic:  'Italic',
837+                       bullist: 'InsertUnorderedList',
838+                       numlist: 'InsertOrderedList',
839+                       link:    'WP_Link',
840+                       unlink:  'unlink'
841+               }
842+       };
843+
844+       $.each( api.tinymce.commands, function( key, command ) {
845+               api.Button( key ).set( 'tinymce', function() { tinyMCE.execCommand( command ); });
846+       });
847+
848+       api.Button('link').set( 'html', function() { wpLink.open(); });
849+       api.Button('image').set([ 'html', 'tinymce' ], function() {
850+               $('#add_image').click();
851+       });
852+
853+       /**
854+        * UI ELEMENTS
855+        *
856+        * Used for transitioning between states.
857+        *
858+        * Undeclared api.ui properties: element, topbar
859+        */
860+       api.ui = {
861                init: function() {
862-                       var topbar = api.ui.topbar  = $('#fullscreen-topbar');
863+                       var topbar = api.ui.topbar = $('#fullscreen-topbar');
864                        api.ui.element = $('#fullscreen-fader');
865 
866                        if ( wptitlehint )
867@@ -254,9 +615,13 @@
868                },
869 
870                fade: function( before, during, after ) {
871-                       if ( before )
872-                               ps.publish( before );
873+                       if ( ! api.ui.element )
874+                               api.ui.init();
875 
876+                       // If any callback bound to before returns false, bail.
877+                       if ( before && ! ps.publish( before ) )
878+                               return;
879+
880                        api.fade.In( api.ui.element, 600, function() {
881                                if ( during )
882                                        ps.publish( during );
883@@ -332,10 +697,70 @@
884                })()
885        };
886 
887-       /*
888-       api.editor = function() {
889-               return $('#content, #content_ifr').filter(':visible');
890+
891+       /**
892+        * GROW API
893+        *
894+        * Automatically updates textarea height.
895+        */
896+       api.grow = function( element ) {
897+               element = element.filter( 'textarea:not[.grow]' );
898+               element.addClass( 'grow' ).css({
899+                       overflow: 'hidden',
900+                       resize: 'none'
901+               });
902+               element.bind( 'keydown.grow keypress.grow focus.grow', api.grow.resizeEvent );
903+
904+               element.each( function() {
905+                       var t = $(this);
906+
907+                       // Ensure a minHeight is set. Default to the height.
908+                       if ( ! this.style.minHeight && this.style.minHeight !== 0 )
909+                               this.style.minHeight = this.style.height;
910+
911+                       t.bind( 'grow', function() {
912+                               // If the textarea causes the window's scrollbars, remember the offset.
913+                               // Otherwise, the scrollbars will jump when we revert to minHeight.
914+                               var scroll = api.grow.window.scrollTop();
915+
916+                               // Set to the minHeight so the textarea shrinks appropriately.
917+                               textarea.style.height = textarea.style.minHeight;
918+
919+                               if ( textarea.scrollHeight > textarea.clientHeight )
920+                                       textarea.style.height = textarea.scrollHeight + 'px';
921+
922+                               api.grow.window.scrollTop( scroll );
923+                       });
924+
925+                       // Initial resize.
926+                       if ( t.is(':visible') )
927+                               api.grow.resize( this );
928+               });
929+
930+               return element;
931        };
932-       */
933 
934+       api.grow.window = $(window);
935+
936+       api.grow.resizeEvent = function( e ) {
937+               var textarea = this;
938+               setTimeout( function() {
939+                       api.grow.resize( textarea );
940+               }, 1 );
941+       };
942+
943+       api.grow.resize = function( textarea ) {
944+               // If the textarea causes the window's scrollbars, remember the offset.
945+               // Otherwise, the scrollbars will jump when we revert to minHeight.
946+               var scroll = api.grow.window.scrollTop();
947+
948+               // Set to the minHeight so the textarea shrinks appropriately.
949+               textarea.style.height = textarea.style.minHeight;
950+
951+               if ( textarea.scrollHeight > textarea.clientHeight )
952+                       textarea.style.height = textarea.scrollHeight + 'px';
953+
954+               api.grow.window.scrollTop( scroll );
955+       };
956+
957 })(jQuery);
958Index: wp-admin/css/wp-admin.dev.css
959===================================================================
960--- wp-admin/css/wp-admin.dev.css       (revision 17732)
961+++ wp-admin/css/wp-admin.dev.css       (working copy)
962@@ -657,6 +657,11 @@
963        width: 100%;
964        min-height: 300px;
965        border: 0;
966+       background: transparent;
967+       line-height: 1.6em;
968+       padding: 0;
969+       outline: none;
970+       resize: none;
971 }
972 
973 /* =Top bar
974@@ -672,9 +677,9 @@
975        min-width: 800px;
976        width: 100%;
977        height: 62px;
978-       background: #d9d9d9;
979-       background: -moz-linear-gradient(bottom,  #d7d7d7,  #e4e4e4);
980-       background: -webkit-gradient(linear, left bottom, left top, from(#d7d7d7), to(#e4e4e4));
981+       background-color: #d9d9d9;
982+       background-image: -moz-linear-gradient(bottom,  #d7d7d7,  #e4e4e4);
983+       background-image: -webkit-gradient(linear, left bottom, left top, from(#d7d7d7), to(#e4e4e4));
984 }
985 
986 #wp-fullscreen-toolbar {
987@@ -682,12 +687,14 @@
988        clear: both;
989 }
990 
991+#wp-fullscreen-mode-bar,
992+#wp-fullscreen-button-bar,
993 #wp-fullscreen-close {
994        float: left;
995 }
996 
997 #wp-fullscreen-save,
998-#wp-fullscreen-buttons #wp-fullscreen-count {
999+#wp-fullscreen-count {
1000        float: right;
1001 }
1002 
1003@@ -701,7 +708,7 @@
1004        padding: 3px 10px;
1005 }
1006 
1007-#wp-fullscreen-buttons {
1008+#wp-fullscreen-central-toolbar {
1009        margin: auto;
1010        padding: 0;
1011 }
1012@@ -710,6 +717,66 @@
1013        float: left;
1014 }
1015 
1016+#wp-fullscreen-mode-bar {
1017+       padding-right: 14px;
1018+}
1019+#wp-fullscreen-modes a {
1020+       display: block;
1021+       font-size: 11px;
1022+       text-decoration: none;
1023+       float: left;
1024+       margin: 1px 0 0 0;
1025+       padding: 2px 6px 2px;
1026+       border-width: 1px 1px 1px 0;
1027+       border-style: solid;
1028+       border-color: #bbb;
1029+       color: #777;
1030+       text-shadow: 0 1px 0 #fff;
1031+       background-color: #f4f4f4;
1032+       background-image: -moz-linear-gradient(bottom,  #e4e4e4,  #f9f9f9);
1033+       background-image: -webkit-gradient(linear, left bottom, left top, from(#e4e4e4), to(#f9f9f9));
1034+}
1035+#wp-fullscreen-modes a:hover,
1036+#wp-fullscreen-modes .active {
1037+       color: #333;
1038+       border-color: #999;
1039+       background-color: #eee;
1040+       background-image: -moz-linear-gradient(bottom,  #f9f9f9,  #e0e0e0);
1041+       background-image: -webkit-gradient(linear, left bottom, left top, from(#f9f9f9), to(#e0e0e0));
1042+}
1043+#wp-fullscreen-modes a:first-child {
1044+       border-width: 1px;
1045+       -moz-border-radius: 4px 0 0 4px;
1046+       -webkit-border-top-left-radius: 4px;
1047+       -webkit-border-bottom-left-radius: 4px;
1048+       -khtml-border-top-left-radius: 4px;
1049+       -khtml-border-bottom-left-radius: 4px;
1050+       border-top-left-radius: 4px;
1051+       border-bottom-left-radius: 4px;
1052+}
1053+#wp-fullscreen-modes a:last-child {
1054+       -moz-border-radius: 0 4px 4px 0;
1055+       -webkit-border-top-right-radius: 4px;
1056+       -webkit-border-bottom-right-radius: 4px;
1057+       -khtml-border-top-right-radius: 4px;
1058+       -khtml-border-bottom-right-radius: 4px;
1059+       border-top-right-radius: 4px;
1060+       border-bottom-right-radius: 4px;
1061+}
1062+
1063+
1064+#wp-fullscreen-buttons .active a {
1065+       background: inherit;
1066+}
1067+
1068+#wp-fullscreen-buttons .hidden {
1069+       display: none;
1070+}
1071+
1072+#wp-fullscreen-buttons .disabled {
1073+       opacity: 0.5;
1074+}
1075+
1076 /* =Thickbox Adjustments
1077 -------------------------------------------------------------- */
1078 .fullscreen-active #TB_overlay {
1079@@ -4076,7 +4143,7 @@
1080        margin: 20px 0;
1081 }
1082 
1083-.pressthis a {
1084+.pressthis a {
1085        display: inline-block;
1086        width: 113px;
1087        position: relative;
1088@@ -4096,13 +4163,13 @@
1089                rgb(216,216,216) 77%
1090        );
1091        background-repeat: no-repeat;
1092-       background-image-position: 10px 8px;   
1093+       background-image-position: 10px 8px;
1094        border-radius: 5px;
1095        -webkit-border-radius: 5px;
1096        -moz-border-radius: 5px;
1097-       -o-border-radius: 5px; 
1098+       -o-border-radius: 5px;
1099        border: 1px #b4b4b4 solid;
1100-       font: normal normal normal 14px/16px Georgia, "Times New Roman", "Bitstream Charter", Times, serif;     
1101+       font: normal normal normal 14px/16px Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
1102        text-decoration: none;
1103        text-shadow: #fff 0 1px 0px;
1104        -webkit-text-shadow: #fff 0 1px 0px;
1105@@ -4119,33 +4186,33 @@
1106        transform: skew(20deg) rotate(9deg);
1107        -webkit-transform: skew(20deg) rotate(9deg);
1108        -moz-transform: skew(20deg) rotate(9deg);
1109-       box-shadow: 0 10px 8px rgba(0, 0, 0, 0.7);
1110-       -webkit-box-shadow: 0 10px 8px rgba(0, 0, 0, 0.7);
1111-       -moz-box-shadow: 0 10px 8px rgba(0, 0, 0, 0.7);
1112+       box-shadow: 0 10px 8px rgba(0, 0, 0, 0.7);
1113+       -webkit-box-shadow: 0 10px 8px rgba(0, 0, 0, 0.7);
1114+       -moz-box-shadow: 0 10px 8px rgba(0, 0, 0, 0.7);
1115 }
1116 
1117 .pressthis a span {
1118-       background: url(../images/press-this.png) no-repeat 10px 7px ;
1119+       background: url(../images/press-this.png) no-repeat 10px 7px ;
1120        padding: 8px 0 8px 32px;
1121        display: inline-block;
1122 }
1123 
1124-.pressthis a:after {
1125-       content: '';
1126-       width: 70%;
1127+.pressthis a:after {
1128+       content: '';
1129+       width: 70%;
1130        height: 55%;
1131-       z-index: -1;
1132-       position: absolute;
1133-       right: 10px;
1134-       bottom: 9px;
1135-       background: transparent; 
1136+       z-index: -1;
1137+       position: absolute;
1138+       right: 10px;
1139+       bottom: 9px;
1140+       background: transparent;
1141        transform: skew(20deg) rotate(6deg);
1142        -webkit-transform: skew(20deg) rotate(6deg);
1143        -moz-transform: skew(20deg) rotate(6deg);
1144-       box-shadow: 0 10px 8px rgba(0, 0, 0, 0.6);
1145-       -webkit-box-shadow: 0 10px 8px rgba(0, 0, 0, 0.6);
1146-       -moz-box-shadow: 0 10px 8px rgba(0, 0, 0, 0.6);
1147-}
1148+       box-shadow: 0 10px 8px rgba(0, 0, 0, 0.6);
1149+       -webkit-box-shadow: 0 10px 8px rgba(0, 0, 0, 0.6);
1150+       -moz-box-shadow: 0 10px 8px rgba(0, 0, 0, 0.6);
1151+}
1152 
1153 
1154 /*------------------------------------------------------------------------------