зеркало из https://github.com/mozilla/pjs.git
Bug 309292: tab-drop-indicator shouldn't use IDs, patch by Dorando <bugzilla-mozilla@dorando.at>, r=mconnor
This commit is contained in:
Родитель
c4966a22d7
Коммит
12c5eb55dc
|
@ -59,8 +59,8 @@
|
||||||
<xul:stringbundle src="chrome://global/locale/tabbrowser.properties"/>
|
<xul:stringbundle src="chrome://global/locale/tabbrowser.properties"/>
|
||||||
<xul:tabbox flex="1" eventnode="document" xbl:inherits="handleCtrlPageUpDown"
|
<xul:tabbox flex="1" eventnode="document" xbl:inherits="handleCtrlPageUpDown"
|
||||||
onselect="if (!('updateCurrentBrowser' in this.parentNode) || event.target.localName != 'tabpanels') return; this.parentNode.updateCurrentBrowser();">
|
onselect="if (!('updateCurrentBrowser' in this.parentNode) || event.target.localName != 'tabpanels') return; this.parentNode.updateCurrentBrowser();">
|
||||||
<xul:hbox id="tab-drop-indicator-bar">
|
<xul:hbox class="tab-drop-indicator-bar">
|
||||||
<xul:hbox id="tab-drop-indicator"/>
|
<xul:hbox class="tab-drop-indicator"/>
|
||||||
</xul:hbox>
|
</xul:hbox>
|
||||||
<xul:hbox class="tabbrowser-strip" collapsed="true" tooltip="_child" context="_child"
|
<xul:hbox class="tabbrowser-strip" collapsed="true" tooltip="_child" context="_child"
|
||||||
ondraggesture="nsDragAndDrop.startDrag(event, this.parentNode.parentNode); event.stopPropagation();"
|
ondraggesture="nsDragAndDrop.startDrag(event, this.parentNode.parentNode); event.stopPropagation();"
|
||||||
|
@ -133,6 +133,9 @@
|
||||||
<field name="mTabBox">
|
<field name="mTabBox">
|
||||||
document.getAnonymousNodes(this)[1]
|
document.getAnonymousNodes(this)[1]
|
||||||
</field>
|
</field>
|
||||||
|
<field name="mTabDropIndicatorBar">
|
||||||
|
this.mTabBox.childNodes[0]
|
||||||
|
</field>
|
||||||
<field name="mStrip">
|
<field name="mStrip">
|
||||||
this.mTabBox.childNodes[1]
|
this.mTabBox.childNodes[1]
|
||||||
</field>
|
</field>
|
||||||
|
@ -1470,8 +1473,8 @@
|
||||||
if (aDragSession.canDrop && aDragSession.sourceNode.parentNode == this.mTabContainer) {
|
if (aDragSession.canDrop && aDragSession.sourceNode.parentNode == this.mTabContainer) {
|
||||||
var newIndex = this.getNewIndex(aEvent);
|
var newIndex = this.getNewIndex(aEvent);
|
||||||
|
|
||||||
var ib = document.getElementById('tab-drop-indicator-bar');
|
var ib = this.mTabDropIndicatorBar;
|
||||||
var ind = document.getElementById('tab-drop-indicator');
|
var ind = ib.firstChild;
|
||||||
ib.setAttribute('dragging','true');
|
ib.setAttribute('dragging','true');
|
||||||
|
|
||||||
if (window.getComputedStyle(this.parentNode, null).direction == "ltr") {
|
if (window.getComputedStyle(this.parentNode, null).direction == "ltr") {
|
||||||
|
@ -1538,8 +1541,7 @@
|
||||||
<parameter name="aDragSession"/>
|
<parameter name="aDragSession"/>
|
||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
var ib = document.getElementById('tab-drop-indicator-bar');
|
this.mTabDropIndicatorBar.setAttribute('dragging','false');
|
||||||
ib.setAttribute('dragging','false');
|
|
||||||
]]>
|
]]>
|
||||||
</body>
|
</body>
|
||||||
</method>
|
</method>
|
||||||
|
|
|
@ -163,14 +163,14 @@ tabbrowser > tabbox > tabpanels {
|
||||||
-moz-appearance: none !important;
|
-moz-appearance: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tab-drop-indicator-bar {
|
.tab-drop-indicator-bar {
|
||||||
display:none;
|
display:none;
|
||||||
height: 9px;
|
height: 9px;
|
||||||
margin-top: -9px;
|
margin-top: -9px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tab-drop-indicator {
|
.tab-drop-indicator {
|
||||||
height: 9px;
|
height: 9px;
|
||||||
width: 9px;
|
width: 9px;
|
||||||
margin-bottom: -5px;
|
margin-bottom: -5px;
|
||||||
|
@ -178,7 +178,7 @@ tabbrowser > tabbox > tabpanels {
|
||||||
background: url('chrome://global/skin/tabDragDrop/tabDragIndicator.png') 50% 50% no-repeat;
|
background: url('chrome://global/skin/tabDragDrop/tabDragIndicator.png') 50% 50% no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tab-drop-indicator-bar[dragging="true"] {
|
.tab-drop-indicator-bar[dragging="true"] {
|
||||||
display: -moz-box;
|
display: -moz-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,14 +46,14 @@ tab {
|
||||||
margin-bottom: 1px;
|
margin-bottom: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tab-drop-indicator-bar {
|
.tab-drop-indicator-bar {
|
||||||
display:none;
|
display:none;
|
||||||
height: 9px;
|
height: 9px;
|
||||||
margin-top: -9px;
|
margin-top: -9px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tab-drop-indicator {
|
.tab-drop-indicator {
|
||||||
height: 9px;
|
height: 9px;
|
||||||
width: 9px;
|
width: 9px;
|
||||||
margin-bottom: -5px;
|
margin-bottom: -5px;
|
||||||
|
@ -61,7 +61,7 @@ tab {
|
||||||
background: url('chrome://global/skin/tabDragDrop/tabDragIndicator.png') 50% 50% no-repeat;
|
background: url('chrome://global/skin/tabDragDrop/tabDragIndicator.png') 50% 50% no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tab-drop-indicator-bar[dragging="true"] {
|
.tab-drop-indicator-bar[dragging="true"] {
|
||||||
display: -moz-box;
|
display: -moz-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче