Bug 944836 - Add -moz-window-dragging CSS styles. r=dao
authorMarkus Stange <mstange@themasta.com>
Thu, 18 Sep 2014 10:52:33 +0200
changeset 206030 71a8e9cb15c5
parent 206029 08f2238d29ee
child 206031 293162286fd2
push id27511
push userkwierso@gmail.com
push dateThu, 18 Sep 2014 22:38:08 +0000
treeherdermozilla-central@c8e325eee9e1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs944836
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 944836 - Add -moz-window-dragging CSS styles. r=dao
browser/themes/osx/browser.css
toolkit/content/widgets/general.xml
toolkit/themes/osx/global/global.css
--- a/browser/themes/osx/browser.css
+++ b/browser/themes/osx/browser.css
@@ -40,16 +40,20 @@
 
 #main-window {
   -moz-appearance: none;
   background-color: #eeeeee;
 }
 
 /** Begin titlebar **/
 
+#titlebar {
+  -moz-window-dragging: drag;
+}
+
 #titlebar-buttonbox > .titlebar-button {
   display: none;
 }
 
 /* NB: these would be -moz-margin-start/end if it wasn't for the fact that OS X
  * doesn't reverse the order of the items in the titlebar in RTL mode. */
 .titlebar-placeholder[type="caption-buttons"],
 #titlebar-buttonbox {
--- a/toolkit/content/widgets/general.xml
+++ b/toolkit/content/widgets/general.xml
@@ -130,34 +130,16 @@
   <binding id="statusbar" role="xul:statusbar">
     <content>
       <children/>
       <xul:statusbarpanel class="statusbar-resizerpanel">
         <xul:resizer dir="bottomend"/>
       </xul:statusbarpanel>
     </content>
   </binding>
-  
-  <binding id="statusbar-drag"
-           extends="chrome://global/content/bindings/general.xml#statusbar">
-    <implementation>
-      <field name="_dragBindingAlive">true</field>
-      <constructor>
-        if (!this._draggableStarted) {
-          this._draggableStarted = true;
-          try {
-            let tmp = {};
-            Components.utils.import("resource://gre/modules/WindowDraggingUtils.jsm", tmp);
-            let draghandle = new tmp.WindowDraggingElement(this);
-            draghandle.mouseDownCheck = function () this._dragBindingAlive;
-          } catch (e) {}
-        }
-      </constructor>
-    </implementation>
-  </binding>
 
   <binding id="statusbarpanel-iconic" display="xul:button" role="xul:button"
            extends="chrome://global/content/bindings/general.xml#statusbarpanel">
     <content>
       <xul:image class="statusbarpanel-icon" xbl:inherits="src,src=image"/>
     </content>
   </binding>
 
--- a/toolkit/themes/osx/global/global.css
+++ b/toolkit/themes/osx/global/global.css
@@ -11,26 +11,32 @@
 /* ::::: XBL bindings ::::: */
 
 menulist > menupopup {
   -moz-binding: url("chrome://global/content/bindings/popup.xml#popup-scrollbars");
 }
 
 /* ::::: draggable elements ::::: */
 
-toolbar:not([nowindowdrag="true"]) {
-  -moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbar-drag");
+titlebar,
+toolbar:not([nowindowdrag="true"]):not([customizing="true"]),
+statusbar:not([nowindowdrag="true"]),
+windowdragbox {
+  -moz-window-dragging: drag;
 }
 
-statusbar:not([nowindowdrag="true"]) {
-  -moz-binding: url("chrome://global/content/bindings/general.xml#statusbar-drag");
-}
-
-windowdragbox {
-  -moz-binding: url("chrome://global/content/bindings/general.xml#windowdragbox");
+/* The list below is non-comprehensive and will probably need some tweaking. */
+toolbarbutton,
+button,
+textbox,
+searchbar,
+tab,
+radio,
+splitter {
+  -moz-window-dragging: no-drag;
 }
 
 /* ::::: root elements ::::: */
 
 window,
 page,
 dialog,
 wizard,