зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1476611 - Part 1 - Remove unused listbox methods. r=bgrins
MozReview-Commit-ID: JDyuZFDPldV --HG-- extra : rebase_source : 3943daaaaecc28d9b488a98f5d3f436c73624fca
This commit is contained in:
Родитель
517256e365
Коммит
d225b61f3b
|
@ -213,14 +213,6 @@
|
|||
%include ../shared/toolbarbutton-icons.inc.css
|
||||
%include ../shared/menupanel.inc.css
|
||||
|
||||
/* Override OSX-specific toolkit findbar button styles */
|
||||
.findbar-button {
|
||||
background: none;
|
||||
box-shadow: none;
|
||||
border: none;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* On Mac, native buttons keep their full opacity when they become disabled
|
||||
* and only the glyph or text on top of them becomes less opaque. */
|
||||
:root:not([customizing]) #back-button[disabled="true"] {
|
||||
|
|
|
@ -91,12 +91,6 @@ toolbar[brighttext] {
|
|||
background-color: Highlight;
|
||||
}
|
||||
|
||||
.findbar-button {
|
||||
-moz-appearance: none;
|
||||
padding: 0;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
toolbar .toolbarbutton-1 {
|
||||
-moz-appearance: none;
|
||||
margin: 0;
|
||||
|
|
|
@ -31,12 +31,6 @@
|
|||
/** Return count of item elements */
|
||||
getRowCount()
|
||||
|
||||
/** Return count of visible item elements */
|
||||
getNumberOfVisibleRows()
|
||||
|
||||
/** Return index of first visible item element */
|
||||
getIndexOfFirstVisibleRow()
|
||||
|
||||
/** Return true if item of given index is visible
|
||||
* @param aIndex - index of item element
|
||||
*
|
||||
|
@ -449,45 +443,6 @@
|
|||
</method>
|
||||
|
||||
<!-- Private -->
|
||||
<method name="getNextItem">
|
||||
<parameter name="aStartItem"/>
|
||||
<parameter name="aDelta"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
while (aStartItem) {
|
||||
aStartItem = aStartItem.nextSibling;
|
||||
if (aStartItem && aStartItem instanceof
|
||||
Ci.nsIDOMXULSelectControlItemElement &&
|
||||
(!this._userSelecting || this._canUserSelect(aStartItem))) {
|
||||
--aDelta;
|
||||
if (aDelta == 0)
|
||||
return aStartItem;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="getPreviousItem">
|
||||
<parameter name="aStartItem"/>
|
||||
<parameter name="aDelta"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
while (aStartItem) {
|
||||
aStartItem = aStartItem.previousSibling;
|
||||
if (aStartItem && aStartItem instanceof
|
||||
Ci.nsIDOMXULSelectControlItemElement &&
|
||||
(!this._userSelecting || this._canUserSelect(aStartItem))) {
|
||||
--aDelta;
|
||||
if (aDelta == 0)
|
||||
return aStartItem;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="_moveByOffsetFromUserEvent">
|
||||
<parameter name="aOffset"/>
|
||||
<parameter name="aEvent"/>
|
||||
|
@ -658,8 +613,6 @@
|
|||
|
||||
<property name="value" onget="return this.getAttribute('value');"
|
||||
onset="this.setAttribute('value', val); return val;"/>
|
||||
<property name="label" onget="return this.getAttribute('label');"
|
||||
onset="this.setAttribute('label', val); return val;"/>
|
||||
|
||||
<property name="selected" onget="return this.getAttribute('selected') == 'true';">
|
||||
<setter><![CDATA[
|
||||
|
|
|
@ -25,22 +25,10 @@
|
|||
</field>
|
||||
<constructor>
|
||||
<![CDATA[
|
||||
// add a template build listener
|
||||
if (this.builder)
|
||||
this.builder.addListener(this._builderListener);
|
||||
else
|
||||
this._refreshSelection();
|
||||
this._refreshSelection();
|
||||
]]>
|
||||
</constructor>
|
||||
|
||||
<destructor>
|
||||
<![CDATA[
|
||||
// remove the template build listener
|
||||
if (this.builder)
|
||||
this.builder.removeListener(this._builderListener);
|
||||
]]>
|
||||
</destructor>
|
||||
|
||||
<!-- Overriding baselistbox -->
|
||||
<method name="_fireOnSelect">
|
||||
<body>
|
||||
|
@ -215,21 +203,6 @@
|
|||
</body>
|
||||
</method>
|
||||
|
||||
<method name="getNumberOfVisibleRows">
|
||||
<!-- returns the number of currently visible rows -->
|
||||
<!-- don't rely on this function, if the items' height can vary! -->
|
||||
<body>
|
||||
<![CDATA[
|
||||
var children = this.children;
|
||||
|
||||
for (var top = 0; top < children.length && !this._isItemVisible(children[top]); top++);
|
||||
for (var ix = top; ix < children.length && this._isItemVisible(children[ix]); ix++);
|
||||
|
||||
return ix - top;
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="getIndexOfFirstVisibleRow">
|
||||
<body>
|
||||
<![CDATA[
|
||||
|
@ -311,19 +284,6 @@
|
|||
</getter>
|
||||
</property>
|
||||
|
||||
<field name="_builderListener" readonly="true">
|
||||
<![CDATA[
|
||||
({
|
||||
mOuter: this,
|
||||
item: null,
|
||||
willRebuild(builder) { },
|
||||
didRebuild(builder) {
|
||||
this.mOuter._refreshSelection();
|
||||
}
|
||||
});
|
||||
]]>
|
||||
</field>
|
||||
|
||||
<method name="_refreshSelection">
|
||||
<body>
|
||||
<![CDATA[
|
||||
|
@ -430,17 +390,6 @@
|
|||
|
||||
<field name="_currentIndex">null</field>
|
||||
|
||||
<!-- For backwards-compatibility and for convenience.
|
||||
Use getIndexOfItem instead. -->
|
||||
<method name="getIndexOf">
|
||||
<parameter name="aElement"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
return this.getIndexOfItem(aElement);
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<!-- For backwards-compatibility and for convenience.
|
||||
Use ensureElementIsVisible instead -->
|
||||
<method name="ensureSelectedElementIsVisible">
|
||||
|
@ -450,30 +399,6 @@
|
|||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<!-- For backwards-compatibility and for convenience.
|
||||
Use moveByOffset instead. -->
|
||||
<method name="goUp">
|
||||
<body>
|
||||
<![CDATA[
|
||||
var index = this.currentIndex;
|
||||
this.moveByOffset(-1, true, false);
|
||||
return index != this.currentIndex;
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
<method name="goDown">
|
||||
<body>
|
||||
<![CDATA[
|
||||
var index = this.currentIndex;
|
||||
this.moveByOffset(1, true, false);
|
||||
return index != this.currentIndex;
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<!-- deprecated (is implied by currentItem and selectItem) -->
|
||||
<method name="fireActiveItemEvent"><body/></method>
|
||||
</implementation>
|
||||
|
||||
<handlers>
|
||||
|
|
|
@ -45,10 +45,10 @@ label.findbar-find-fast:-moz-lwtheme {
|
|||
|
||||
.findbar-button {
|
||||
-moz-appearance: none;
|
||||
border-width: @roundButtonBorderWidth@;
|
||||
margin-inline-end: 5px;
|
||||
padding: 2px 9px;
|
||||
border-radius: 10000px;
|
||||
padding: 0;
|
||||
color: inherit;
|
||||
background: none;
|
||||
}
|
||||
|
||||
.findbar-find-next:-moz-lwtheme,
|
||||
|
|
|
@ -42,6 +42,12 @@ findbar[noanim] {
|
|||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.findbar-button {
|
||||
-moz-appearance: none;
|
||||
padding: 0;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* Search field */
|
||||
|
||||
.findbar-textbox {
|
||||
|
|
Загрузка…
Ссылка в новой задаче