Index: popup.html
===================================================================
--- a/popup.html
+++ b/popup.html
@@ -65,6 +65,7 @@
       <div class="menu-item collapse" data-option="show_statsinpopup" data-collapsable="stats-container" role="button">
         <div class="icon"></div>
         <span class="i18n_stats_title"></span>
+        <div class="collapse-icon-placeholder safari-inline-block"></div>
         <div class="collapse-icon"></div>
       </div>
       <ul id="stats" class="collapsable">
Index: safari/ext/popup.js
===================================================================
--- a/safari/ext/popup.js
+++ b/safari/ext/popup.js
@@ -12,7 +12,7 @@
     {
       setTimeout(function()
       {
-        safari.self.width = document.body.offsetWidth;
+        safari.self.width = document.body.scrollWidth;
         safari.self.height = document.body.offsetHeight;
 
         resizingScheduled = false;
@@ -38,6 +38,16 @@
       document.addEventListener("DOMSubtreeModified", updateSize);
   });
 
+  // when using "white-space: nowrap", the overflown text overlaps the padding
+  // and neither clientWidth nor scrollWidth, we rely on when adjusting the size
+  // of the popover, inlcudes the overlapped area. So we have to use additional
+  // placeholders, in order to preserve padding. Since the dimensions of the
+  // popover are automatically correctly adjusted on Chrome, those placeholders
+  // would add extra empty space and therefore must only be rendered on Safari.
+  var style = document.createElement("style");
+  style.textContent = ".safari-inline-block { display: inline-block; }";
+  document.head.appendChild(style);
+
 
   // Safari will load the popover once, and then show it everytime the icon is
   // clicked. While Chrome loads it everytime you click the icon. So in order to
Index: skin/popup.css
===================================================================
--- a/skin/popup.css
+++ b/skin/popup.css
@@ -281,6 +281,12 @@
   padding-right: 25px;
 }
 
+.collapse-icon-placeholder
+{
+  display: none;
+  width: 45px;
+}
+
 .collapse-icon
 {
   display: inline-block;
