<!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>[21014] trunk: Theme Customizer: Fix scrolling on iOS and Kindle Fire.</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, #logmsg > ol { margin-left: 0; 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/21014">21014</a></dd>
<dt>Author</dt> <dd>koopersmith</dd>
<dt>Date</dt> <dd>2012-06-06 21:45:17 +0000 (Wed, 06 Jun 2012)</dd>
</dl>

<h3>Log Message</h3>
<pre>Theme Customizer: Fix scrolling on iOS and Kindle Fire. props azaozz, helenyhou. fixes <a href="http://core.trac.wordpress.org/ticket/20805">#20805</a>.

Also fixes uploader UIs on iOS and Kindle Fire by improving wp.Uploader.
Adds mobile viewport specifications.
Moves scrollbar back to fixed positioning.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadmincsscustomizecontrolsdevcss">trunk/wp-admin/css/customize-controls.dev.css</a></li>
<li><a href="#trunkwpadmincsswpadminrtldevcss">trunk/wp-admin/css/wp-admin-rtl.dev.css</a></li>
<li><a href="#trunkwpadmincsswpadmindevcss">trunk/wp-admin/css/wp-admin.dev.css</a></li>
<li><a href="#trunkwpadmincustomizephp">trunk/wp-admin/customize.php</a></li>
<li><a href="#trunkwpadminincludesclasswpthemeinstalllisttablephp">trunk/wp-admin/includes/class-wp-theme-install-list-table.php</a></li>
<li><a href="#trunkwpadminjscustomizecontrolsdevjs">trunk/wp-admin/js/customize-controls.dev.js</a></li>
<li><a href="#trunkwpadminjsthemedevjs">trunk/wp-admin/js/theme.dev.js</a></li>
<li><a href="#trunkwpincludesclasswpcustomizecontrolphp">trunk/wp-includes/class-wp-customize-control.php</a></li>
<li><a href="#trunkwpincludesjscustomizeloaderdevjs">trunk/wp-includes/js/customize-loader.dev.js</a></li>
<li><a href="#trunkwpincludesjspluploadwppluploaddevjs">trunk/wp-includes/js/plupload/wp-plupload.dev.js</a></li>
<li><a href="#trunkwpincludesmediaphp">trunk/wp-includes/media.php</a></li>
<li><a href="#trunkwpincludesthemephp">trunk/wp-includes/theme.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadmincsscustomizecontrolsdevcss"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/css/customize-controls.dev.css (21013 => 21014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/customize-controls.dev.css        2012-06-06 21:24:22 UTC (rev 21013)
+++ trunk/wp-admin/css/customize-controls.dev.css        2012-06-06 21:45:17 UTC (rev 21014)
</span><span class="lines">@@ -402,10 +402,6 @@
</span><span class="cx">         text-align: right;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.customize-section .customize-control-image .actions a {
-        display: block;
-}
-
</del><span class="cx"> .customize-section .customize-control-image .library ul {
</span><span class="cx">         border-bottom: 1px solid #dfdfdf;
</span><span class="cx">         float: left;
</span><span class="lines">@@ -456,7 +452,7 @@
</span><span class="cx"> 
</span><span class="cx"> .customize-section .customize-control-image .library .thumbnail img {
</span><span class="cx">         display: block;
</span><del>-        max-width: 220px;
</del><ins>+        max-width: 90%;
</ins><span class="cx">         max-height: 80px;
</span><span class="cx"> 
</span><span class="cx">         margin: 5px auto;
</span><span class="lines">@@ -479,6 +475,7 @@
</span><span class="cx">         text-align: center;
</span><span class="cx">         color: #777;
</span><span class="cx">         position: relative;
</span><ins>+        cursor: default;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> .customize-section .customize-control-upload .upload-dropzone.supports-drag-drop,
</span><span class="lines">@@ -491,7 +488,29 @@
</span><span class="cx">         transition:         border-color 0.1s;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+.customize-section .customize-control-upload .library ul li,
+.customize-section .customize-control-image .library ul li {
+        cursor: pointer;
+}
+
</ins><span class="cx"> .customize-section .customize-control-upload .upload-dropzone.supports-drag-drop.drag-over,
</span><span class="cx"> .customize-section .customize-control-image .upload-dropzone.supports-drag-drop.drag-over {
</span><span class="cx">         border-color: #83b4d8;
</span><del>-}
</del><span class="cx">\ No newline at end of file
</span><ins>+}
+
+/**
+ * iOS can't scroll iframes,
+ * instead it expands the iframe size to match the size of the content
+ */
+.ios .wp-full-overlay {
+        position: relative;
+}
+
+.ios #customize-preview {
+        position: relative;
+}
+
+.ios #customize-controls .wp-full-overlay-sidebar-content {
+        -webkit-overflow-scrolling: touch;
+}
+
</ins></span></pre></div>
<a id="trunkwpadmincsswpadminrtldevcss"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/css/wp-admin-rtl.dev.css (21013 => 21014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/wp-admin-rtl.dev.css        2012-06-06 21:24:22 UTC (rev 21013)
+++ trunk/wp-admin/css/wp-admin-rtl.dev.css        2012-06-06 21:45:17 UTC (rev 21014)
</span><span class="lines">@@ -1566,19 +1566,10 @@
</span><span class="cx"> /*------------------------------------------------------------------------------
</span><span class="cx">   26.0 - Full Overlay w/ Sidebar
</span><span class="cx"> ------------------------------------------------------------------------------*/
</span><del>-.wp-full-overlay {
-        left: 0;
-        right: 300px;
-}
-
-.wp-full-overlay.collapsed {
-        right: 0 !important;
-}
-
</del><span class="cx"> .wp-full-overlay .wp-full-overlay-sidebar {
</span><span class="cx">         margin: 0;
</span><del>-        left: 100%;
-        right: auto;
</del><ins>+        left: auto;
+        right: 0;
</ins><span class="cx">         border-right: 0;
</span><span class="cx">         border-left: 1px solid rgba( 0, 0, 0, 0.2 );
</span><span class="cx"> }
</span><span class="lines">@@ -1589,6 +1580,21 @@
</span><span class="cx">         box-shadow: inset 5px 0 4px -4px rgba(0, 0, 0, 0.1);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+.wp-full-overlay.collapsed,
+.wp-full-overlay.expanded .wp-full-overlay-sidebar {
+        margin-right: 0 !important;
+}
+
+.wp-full-overlay.expanded {
+        margin-right: 300px;
+        margin-left: 0;
+}
+
+.wp-full-overlay.collapsed .wp-full-overlay-sidebar {
+        margin-right: -300px;
+        margin-left: 0;
+}
+
</ins><span class="cx"> /* Collapse Button */
</span><span class="cx"> .wp-full-overlay .collapse-sidebar {
</span><span class="cx">         right: 0;
</span></span></pre></div>
<a id="trunkwpadmincsswpadmindevcss"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/css/wp-admin.dev.css (21013 => 21014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/wp-admin.dev.css        2012-06-06 21:24:22 UTC (rev 21013)
+++ trunk/wp-admin/css/wp-admin.dev.css        2012-06-06 21:45:17 UTC (rev 21014)
</span><span class="lines">@@ -5255,27 +5255,23 @@
</span><span class="cx">         overflow: visible;
</span><span class="cx">         top: 0;
</span><span class="cx">         bottom: 0;
</span><del>-        left: 300px;
</del><ins>+        left: 0;
</ins><span class="cx">         right: 0;
</span><span class="cx">         height: 100%;
</span><span class="cx">         min-width: 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.wp-full-overlay.collapsed {
-        left: 0 !important;
-}
-
</del><span class="cx"> .wp-full-overlay-sidebar {
</span><span class="cx">         -webkit-box-sizing: border-box;
</span><span class="cx">         -moz-box-sizing:    border-box;
</span><span class="cx">         box-sizing:         border-box;
</span><span class="cx"> 
</span><del>-        position: absolute;
</del><ins>+        position: fixed;
</ins><span class="cx">         width: 300px;
</span><span class="cx">         height: 100%;
</span><span class="cx">         top: 0;
</span><span class="cx">         bottom: 0;
</span><del>-        right: 100%;
</del><ins>+        left: 0;
</ins><span class="cx">         padding: 0;
</span><span class="cx">         margin: 0;
</span><span class="cx">         z-index: 10;
</span><span class="lines">@@ -5288,6 +5284,19 @@
</span><span class="cx">         overflow: visible;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+.wp-full-overlay.collapsed,
+.wp-full-overlay.expanded .wp-full-overlay-sidebar {
+        margin-left: 0 !important;
+}
+
+.wp-full-overlay.expanded {
+        margin-left: 300px;
+}
+
+.wp-full-overlay.collapsed .wp-full-overlay-sidebar {
+        margin-left: -300px;
+}
+
</ins><span class="cx"> .wp-full-overlay-sidebar:after {
</span><span class="cx">         content: '';
</span><span class="cx">         display: block;
</span><span class="lines">@@ -5404,11 +5413,11 @@
</span><span class="cx"> .wp-full-overlay-sidebar,
</span><span class="cx"> .wp-full-overlay .collapse-sidebar,
</span><span class="cx"> .wp-full-overlay-main {
</span><del>-        -webkit-transition-property: left, right, top, bottom, width;
-        -moz-transition-property:    left, right, top, bottom, width;
-        -ms-transition-property:     left, right, top, bottom, width;
-        -o-transition-property:      left, right, top, bottom, width;
-        transition-property:         left, right, top, bottom, width;
</del><ins>+        -webkit-transition-property: left, right, top, bottom, width, margin;
+        -moz-transition-property:    left, right, top, bottom, width, margin;
+        -ms-transition-property:     left, right, top, bottom, width, margin;
+        -o-transition-property:      left, right, top, bottom, width, margin;
+        transition-property:         left, right, top, bottom, width, margin;
</ins><span class="cx"> 
</span><span class="cx">         -webkit-transition-duration: 0.2s;
</span><span class="cx">         -moz-transition-duration:    0.2s;
</span></span></pre></div>
<a id="trunkwpadmincustomizephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/customize.php (21013 => 21014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/customize.php        2012-06-06 21:24:22 UTC (rev 21013)
+++ trunk/wp-admin/customize.php        2012-06-06 21:45:17 UTC (rev 21014)
</span><span class="lines">@@ -34,6 +34,19 @@
</span><span class="cx"> wp_user_settings();
</span><span class="cx"> _wp_admin_html_begin();
</span><span class="cx"> 
</span><ins>+$body_class = '';
+
+if ( wp_is_mobile() ) :
+        $body_class .= ' mobile';
+
+        ?&gt;&lt;meta name=&quot;viewport&quot; id=&quot;viewport-meta&quot; content=&quot;width=device-width, initial-scale=0.8, minimum-scale=0.5, maximum-scale=1.2&quot;&gt;&lt;?php
+endif;
+
+$is_ios = wp_is_mobile() &amp;&amp; preg_match( '/iPad|iPod|iPhone/', $_SERVER['HTTP_USER_AGENT'] );
+
+if ( $is_ios )
+        $body_class .= ' ios';
+
</ins><span class="cx"> $admin_title = sprintf( __( '%1$s &amp;#8212; WordPress' ), strip_tags( sprintf( __( 'Customize %s' ), $wp_customize-&gt;theme()-&gt;display('Name') ) ) );
</span><span class="cx"> ?&gt;&lt;title&gt;&lt;?php echo $admin_title; ?&gt;&lt;/title&gt;&lt;?php
</span><span class="cx"> 
</span><span class="lines">@@ -41,7 +54,8 @@
</span><span class="cx"> do_action( 'customize_controls_print_scripts' );
</span><span class="cx"> ?&gt;
</span><span class="cx"> &lt;/head&gt;
</span><del>-&lt;body class=&quot;wp-full-overlay&quot;&gt;
</del><ins>+&lt;body class=&quot;&lt;?php echo esc_attr( $body_class ); ?&gt;&quot;&gt;
+&lt;div class=&quot;wp-full-overlay expanded&quot;&gt;
</ins><span class="cx">         &lt;form id=&quot;customize-controls&quot; class=&quot;wrap wp-full-overlay-sidebar&quot;&gt;
</span><span class="cx">                 &lt;?php wp_nonce_field( 'customize_controls-' . $wp_customize-&gt;get_stylesheet() ); ?&gt;
</span><span class="cx">                 &lt;div id=&quot;customize-header-actions&quot; class=&quot;wp-full-overlay-header&quot;&gt;
</span><span class="lines">@@ -140,6 +154,10 @@
</span><span class="cx">                         'isCrossDomain' =&gt; $cross_domain,
</span><span class="cx">                         'fallback'      =&gt; $fallback_url,
</span><span class="cx">                 ),
</span><ins>+                'browser'  =&gt; array(
+                        'mobile' =&gt; wp_is_mobile(),
+                        'ios'    =&gt; $is_ios,
+                ),
</ins><span class="cx">                 'settings' =&gt; array(),
</span><span class="cx">                 'controls' =&gt; array(),
</span><span class="cx">         );
</span><span class="lines">@@ -160,5 +178,6 @@
</span><span class="cx">         &lt;script type=&quot;text/javascript&quot;&gt;
</span><span class="cx">                 var _wpCustomizeSettings = &lt;?php echo json_encode( $settings ); ?&gt;;
</span><span class="cx">         &lt;/script&gt;
</span><ins>+&lt;/div&gt;
</ins><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkwpadminincludesclasswpthemeinstalllisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/class-wp-theme-install-list-table.php (21013 => 21014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/class-wp-theme-install-list-table.php        2012-06-06 21:24:22 UTC (rev 21013)
+++ trunk/wp-admin/includes/class-wp-theme-install-list-table.php        2012-06-06 21:45:17 UTC (rev 21014)
</span><span class="lines">@@ -250,7 +250,7 @@
</span><span class="cx">          */
</span><span class="cx">         function theme_installer() {
</span><span class="cx">                 ?&gt;
</span><del>-                &lt;div id=&quot;theme-installer&quot; class=&quot;wp-full-overlay&quot;&gt;
</del><ins>+                &lt;div id=&quot;theme-installer&quot; class=&quot;wp-full-overlay expanded&quot;&gt;
</ins><span class="cx">                         &lt;div class=&quot;wp-full-overlay-sidebar&quot;&gt;
</span><span class="cx">                                 &lt;div class=&quot;wp-full-overlay-header&quot;&gt;
</span><span class="cx">                                         &lt;a href=&quot;#&quot; class=&quot;close-full-overlay&quot;&gt;&lt;?php _e( '&amp;larr; Close' ); ?&gt;&lt;/a&gt;
</span></span></pre></div>
<a id="trunkwpadminjscustomizecontrolsdevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/customize-controls.dev.js (21013 => 21014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/customize-controls.dev.js        2012-06-06 21:24:22 UTC (rev 21013)
+++ trunk/wp-admin/js/customize-controls.dev.js        2012-06-06 21:45:17 UTC (rev 21014)
</span><span class="lines">@@ -148,6 +148,13 @@
</span><span class="cx">                                 success:   this.success
</span><span class="cx">                         }, this.uploader || {} );
</span><span class="cx"> 
</span><ins>+                        if ( this.uploader.supported ) {
+                                if ( control.params.context )
+                                        control.uploader.param( 'post_data[context]', this.params.context );
+
+                                control.uploader.param( 'post_data[theme]', api.settings.theme.stylesheet );
+                        }
+
</ins><span class="cx">                         this.uploader = new wp.Uploader( this.uploader );
</span><span class="cx"> 
</span><span class="cx">                         this.remover = this.container.find('.remove');
</span><span class="lines">@@ -159,11 +166,6 @@
</span><span class="cx">                         this.removerVisibility = $.proxy( this.removerVisibility, this );
</span><span class="cx">                         this.setting.bind( this.removerVisibility );
</span><span class="cx">                         this.removerVisibility( this.setting.get() );
</span><del>-
-                        if ( this.params.context )
-                                control.uploader.param( 'post_data[context]', this.params.context );
-
-                        control.uploader.param( 'post_data[theme]', api.settings.theme.stylesheet );
</del><span class="cx">                 },
</span><span class="cx">                 success: function( attachment ) {
</span><span class="cx">                         this.setting.set( attachment.url );
</span><span class="lines">@@ -182,7 +184,7 @@
</span><span class="cx">                                 init: function( up ) {
</span><span class="cx">                                         var fallback, button;
</span><span class="cx"> 
</span><del>-                                        if ( up.features.dragdrop )
</del><ins>+                                        if ( this.supports.dragdrop )
</ins><span class="cx">                                                 return;
</span><span class="cx"> 
</span><span class="cx">                                         // Maintain references while wrapping the fallback button.
</span><span class="lines">@@ -566,6 +568,7 @@
</span><span class="cx">                         return window.location = api.settings.url.fallback;
</span><span class="cx"> 
</span><span class="cx">                 var body = $( document.body ),
</span><ins>+                        overlay = body.children('.wp-full-overlay'),
</ins><span class="cx">                         query, previewer, parent;
</span><span class="cx"> 
</span><span class="cx">                 // Prevent the form from saving when enter is pressed.
</span><span class="lines">@@ -702,7 +705,7 @@
</span><span class="cx">                 });
</span><span class="cx"> 
</span><span class="cx">                 $('.collapse-sidebar').click( function( event ) {
</span><del>-                        body.toggleClass( 'collapsed' );
</del><ins>+                        overlay.toggleClass( 'collapsed' ).toggleClass( 'expanded' );
</ins><span class="cx">                         event.preventDefault();
</span><span class="cx">                 });
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpadminjsthemedevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/theme.dev.js (21013 => 21014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/theme.dev.js        2012-06-06 21:24:22 UTC (rev 21013)
+++ trunk/wp-admin/js/theme.dev.js        2012-06-06 21:45:17 UTC (rev 21014)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx">         });
</span><span class="cx"> 
</span><span class="cx">         preview.on( 'click', '.collapse-sidebar', function( event ) {
</span><del>-                preview.toggleClass('collapsed');
</del><ins>+                preview.toggleClass( 'collapsed' ).toggleClass( 'expanded' );
</ins><span class="cx">                 event.preventDefault();
</span><span class="cx">         });
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpincludesclasswpcustomizecontrolphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/class-wp-customize-control.php (21013 => 21014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/class-wp-customize-control.php        2012-06-06 21:24:22 UTC (rev 21013)
+++ trunk/wp-includes/class-wp-customize-control.php        2012-06-06 21:45:17 UTC (rev 21014)
</span><span class="lines">@@ -331,7 +331,7 @@
</span><span class="cx">                         $src = call_user_func( $this-&gt;get_url, $src );
</span><span class="cx"> 
</span><span class="cx">                 ?&gt;
</span><del>-                &lt;label class=&quot;customize-image-picker&quot;&gt;
</del><ins>+                &lt;div class=&quot;customize-image-picker&quot;&gt;
</ins><span class="cx">                         &lt;span class=&quot;customize-control-title&quot;&gt;&lt;?php echo esc_html( $this-&gt;label ); ?&gt;&lt;/span&gt;
</span><span class="cx"> 
</span><span class="cx">                         &lt;div class=&quot;customize-control-content&quot;&gt;
</span><span class="lines">@@ -366,7 +366,7 @@
</span><span class="cx">                         &lt;div class=&quot;actions&quot;&gt;
</span><span class="cx">                                 &lt;a href=&quot;#&quot; class=&quot;remove&quot;&gt;&lt;?php _e( 'Remove Image' ); ?&gt;&lt;/a&gt;
</span><span class="cx">                         &lt;/div&gt;
</span><del>-                &lt;/label&gt;
</del><ins>+                &lt;/div&gt;
</ins><span class="cx">                 &lt;?php
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -382,14 +382,20 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         public function tab_upload_new() {
</span><del>-                ?&gt;
-                &lt;div class=&quot;upload-dropzone&quot;&gt;
-                        &lt;?php _e('Drop a file here or &lt;a href=&quot;#&quot; class=&quot;upload&quot;&gt;select a file&lt;/a&gt;.'); ?&gt;
-                &lt;/div&gt;
-                &lt;div class=&quot;upload-fallback&quot;&gt;
-                        &lt;span class=&quot;button-secondary&quot;&gt;&lt;?php _e('Select File'); ?&gt;&lt;/span&gt;
-                &lt;/div&gt;
-                &lt;?php
</del><ins>+                if ( ! _device_can_upload() ) {
+                        ?&gt;
+                        &lt;p&gt;&lt;?php _e('The web browser on your device cannot be used to upload files. You may be able to use the &lt;a href=&quot;http://wordpress.org/extend/mobile/&quot;&gt;native app for your device&lt;/a&gt; instead.'); ?&gt;&lt;/p&gt;
+                        &lt;?php
+                } else {
+                        ?&gt;
+                        &lt;div class=&quot;upload-dropzone&quot;&gt;
+                                &lt;?php _e('Drop a file here or &lt;a href=&quot;#&quot; class=&quot;upload&quot;&gt;select a file&lt;/a&gt;.'); ?&gt;
+                        &lt;/div&gt;
+                        &lt;div class=&quot;upload-fallback&quot;&gt;
+                                &lt;span class=&quot;button-secondary&quot;&gt;&lt;?php _e('Select File'); ?&gt;&lt;/span&gt;
+                        &lt;/div&gt;
+                        &lt;?php
+                }
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         public function tab_uploaded() {
</span></span></pre></div>
<a id="trunkwpincludesjscustomizeloaderdevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/customize-loader.dev.js (21013 => 21014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/customize-loader.dev.js        2012-06-06 21:24:22 UTC (rev 21013)
+++ trunk/wp-includes/js/customize-loader.dev.js        2012-06-06 21:45:17 UTC (rev 21014)
</span><span class="lines">@@ -67,6 +67,10 @@
</span><span class="cx">                         if ( this.active )
</span><span class="cx">                                 return;
</span><span class="cx"> 
</span><ins>+                        // Load the full page on mobile devices.
+                        if ( Loader.settings.browser.mobile )
+                                return window.location = src;
+
</ins><span class="cx">                         this.active = true;
</span><span class="cx">                         this.body.addClass('customize-loading');
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpincludesjspluploadwppluploaddevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/plupload/wp-plupload.dev.js (21013 => 21014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/plupload/wp-plupload.dev.js        2012-06-06 21:24:22 UTC (rev 21013)
+++ trunk/wp-includes/js/plupload/wp-plupload.dev.js        2012-06-06 21:45:17 UTC (rev 21014)
</span><span class="lines">@@ -4,6 +4,9 @@
</span><span class="cx"> (function( exports, $ ) {
</span><span class="cx">         var Uploader;
</span><span class="cx"> 
</span><ins>+        if ( typeof _wpPluploadSettings === 'undefined' )
+                return;
+
</ins><span class="cx">         /*
</span><span class="cx">          * An object that helps create a WordPress uploader using plupload.
</span><span class="cx">          *
</span><span class="lines">@@ -27,8 +30,17 @@
</span><span class="cx">                         },
</span><span class="cx">                         key;
</span><span class="cx"> 
</span><ins>+                this.supports = {
+                        upload: Uploader.browser.supported
+                };
+
+                this.supported = this.supports.upload;
+
+                if ( ! this.supported )
+                        return;
+
</ins><span class="cx">                 // Use deep extend to ensure that multipart_params and other objects are cloned.
</span><del>-                this.plupload = $.extend( true, { multipart_params: {} }, wpPluploadDefaults );
</del><ins>+                this.plupload = $.extend( true, { multipart_params: {} }, Uploader.defaults );
</ins><span class="cx">                 this.container = document.body; // Set default container.
</span><span class="cx"> 
</span><span class="cx">                 // Extend the instance with options
</span><span class="lines">@@ -68,10 +80,10 @@
</span><span class="cx">                 this.param( this.params || {} );
</span><span class="cx">                 delete this.params;
</span><span class="cx"> 
</span><del>-                this.uploader.bind( 'Init', this.init );
-
</del><span class="cx">                 this.uploader.init();
</span><span class="cx"> 
</span><ins>+                this.supports.dragdrop = this.uploader.features.dragdrop &amp;&amp; ! Uploader.browser.mobile;
+
</ins><span class="cx">                 // Generate drag/drop helper classes.
</span><span class="cx">                 (function( dropzone, supported ) {
</span><span class="cx">                         var sensitivity = 50,
</span><span class="lines">@@ -99,7 +111,7 @@
</span><span class="cx">                                 active = false;
</span><span class="cx">                                 dropzone.removeClass('drag-over');
</span><span class="cx">                         });
</span><del>-                }( this.dropzone, this.uploader.features.dragdrop ));
</del><ins>+                }( this.dropzone, this.supports.dragdrop ));
</ins><span class="cx"> 
</span><span class="cx">                 this.browser.on( 'mouseenter', this.refresh );
</span><span class="cx"> 
</span><span class="lines">@@ -147,8 +159,13 @@
</span><span class="cx">                         up.refresh();
</span><span class="cx">                         up.start();
</span><span class="cx">                 });
</span><ins>+
+                this.init();
</ins><span class="cx">         };
</span><span class="cx"> 
</span><ins>+        // Adds the 'defaults' and 'browser' properties.
+        $.extend( Uploader, _wpPluploadSettings );
+
</ins><span class="cx">         Uploader.uuid = 0;
</span><span class="cx"> 
</span><span class="cx">         Uploader.errorMap = {
</span><span class="lines">@@ -200,4 +217,4 @@
</span><span class="cx">         });
</span><span class="cx"> 
</span><span class="cx">         exports.Uploader = Uploader;
</span><del>-})( wp, jQuery );
</del><span class="cx">\ No newline at end of file
</span><ins>+})( wp, jQuery );
</ins></span></pre></div>
<a id="trunkwpincludesmediaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/media.php (21013 => 21014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/media.php        2012-06-06 21:24:22 UTC (rev 21013)
+++ trunk/wp-includes/media.php        2012-06-06 21:45:17 UTC (rev 21014)
</span><span class="lines">@@ -1467,7 +1467,7 @@
</span><span class="cx"> 
</span><span class="cx">         $max_upload_size = wp_max_upload_size();
</span><span class="cx"> 
</span><del>-        $settings = array(
</del><ins>+        $defaults = array(
</ins><span class="cx">                 'runtimes'            =&gt; 'html5,silverlight,flash,html4',
</span><span class="cx">                 'file_data_name'      =&gt; 'async-upload', // key passed to $_FILE.
</span><span class="cx">                 'multiple_queues'     =&gt; true,
</span><span class="lines">@@ -1480,7 +1480,7 @@
</span><span class="cx">                 'urlstream_upload'    =&gt; true,
</span><span class="cx">         );
</span><span class="cx"> 
</span><del>-        $settings = apply_filters( 'plupload_default_settings', $settings );
</del><ins>+        $defaults = apply_filters( 'plupload_default_settings', $defaults );
</ins><span class="cx"> 
</span><span class="cx">         $params = array(
</span><span class="cx">                 'action' =&gt; 'upload-attachment',
</span><span class="lines">@@ -1488,10 +1488,18 @@
</span><span class="cx"> 
</span><span class="cx">         $params = apply_filters( 'plupload_default_params', $params );
</span><span class="cx">         $params['_wpnonce'] = wp_create_nonce( 'media-form' );
</span><del>-        $settings['multipart_params'] = $params;
</del><ins>+        $defaults['multipart_params'] = $params;
</ins><span class="cx"> 
</span><del>-        $script = 'var wpPluploadDefaults = ' . json_encode( $settings ) . ';';
</del><ins>+        $settings = array(
+                'defaults' =&gt; $defaults,
+                'browser'  =&gt; array(
+                        'mobile'    =&gt; wp_is_mobile(),
+                        'supported' =&gt; _device_can_upload(),
+                ),
+        );
</ins><span class="cx"> 
</span><ins>+        $script = 'var _wpPluploadSettings = ' . json_encode( $settings ) . ';';
+
</ins><span class="cx">         $data = $wp_scripts-&gt;get_data( 'wp-plupload', 'data' );
</span><span class="cx">         if ( $data )
</span><span class="cx">                 $script = &quot;$data\n$script&quot;;
</span></span></pre></div>
<a id="trunkwpincludesthemephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/theme.php (21013 => 21014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/theme.php        2012-06-06 21:24:22 UTC (rev 21013)
+++ trunk/wp-includes/theme.php        2012-06-06 21:45:17 UTC (rev 21014)
</span><span class="lines">@@ -1605,9 +1605,15 @@
</span><span class="cx">         $home_origin  = parse_url( home_url() );
</span><span class="cx">         $cross_domain = ( strtolower( $admin_origin[ 'host' ] ) != strtolower( $home_origin[ 'host' ] ) );
</span><span class="cx"> 
</span><ins>+        $browser = array(
+                'mobile' =&gt; wp_is_mobile(),
+                'ios'    =&gt; wp_is_mobile() &amp;&amp; preg_match( '/iPad|iPod|iPhone/', $_SERVER['HTTP_USER_AGENT'] ),
+        );
+
</ins><span class="cx">         $settings = array(
</span><span class="cx">                 'url'           =&gt; esc_url( admin_url( 'customize.php' ) ),
</span><span class="cx">                 'isCrossDomain' =&gt; $cross_domain,
</span><ins>+                'browser'       =&gt; $browser,
</ins><span class="cx">         );
</span><span class="cx"> 
</span><span class="cx">         $script = 'var _wpCustomizeLoaderSettings = ' . json_encode( $settings ) . ';';
</span></span></pre>
</div>
</div>

</body>
</html>