зеркало из https://github.com/mozilla/pjs.git
Remove unneeded nsIDOMNSHTMLSelectElement interface by merging it into nsIDOMHTMLSelectElement. (Bug 582303) r=jst
This commit is contained in:
Родитель
31a8d73291
Коммит
83ff4cd04a
|
@ -181,9 +181,8 @@ DOMCI_NODE_DATA(HTMLSelectElement, nsHTMLSelectElement)
|
|||
|
||||
// QueryInterface implementation for nsHTMLSelectElement
|
||||
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(nsHTMLSelectElement)
|
||||
NS_HTML_CONTENT_INTERFACE_TABLE3(nsHTMLSelectElement,
|
||||
NS_HTML_CONTENT_INTERFACE_TABLE2(nsHTMLSelectElement,
|
||||
nsIDOMHTMLSelectElement,
|
||||
nsIDOMNSHTMLSelectElement,
|
||||
nsISelectElement)
|
||||
NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(nsHTMLSelectElement,
|
||||
nsGenericHTMLFormElement)
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
#include "nsGenericHTMLElement.h"
|
||||
#include "nsISelectElement.h"
|
||||
#include "nsIDOMHTMLSelectElement.h"
|
||||
#include "nsIDOMNSHTMLSelectElement.h"
|
||||
#include "nsIDOMHTMLFormElement.h"
|
||||
#include "nsIDOMHTMLOptionElement.h"
|
||||
#include "nsIDOMHTMLOptionsCollection.h"
|
||||
|
@ -237,7 +236,6 @@ private:
|
|||
*/
|
||||
class nsHTMLSelectElement : public nsGenericHTMLFormElement,
|
||||
public nsIDOMHTMLSelectElement,
|
||||
public nsIDOMNSHTMLSelectElement,
|
||||
public nsISelectElement
|
||||
{
|
||||
public:
|
||||
|
@ -260,9 +258,6 @@ public:
|
|||
// nsIDOMHTMLSelectElement
|
||||
NS_DECL_NSIDOMHTMLSELECTELEMENT
|
||||
|
||||
// nsIDOMNSHTMLSelectElement
|
||||
NS_DECL_NSIDOMNSHTMLSELECTELEMENT
|
||||
|
||||
// nsIContent
|
||||
virtual nsresult PreHandleEvent(nsEventChainPreVisitor& aVisitor);
|
||||
|
||||
|
|
|
@ -298,7 +298,6 @@
|
|||
#include "nsIDOMHTMLPreElement.h"
|
||||
#include "nsIDOMHTMLQuoteElement.h"
|
||||
#include "nsIDOMHTMLScriptElement.h"
|
||||
#include "nsIDOMNSHTMLSelectElement.h"
|
||||
#include "nsIDOMHTMLStyleElement.h"
|
||||
#include "nsIDOMHTMLTableCaptionElem.h"
|
||||
#include "nsIDOMHTMLTableCellElement.h"
|
||||
|
@ -2664,7 +2663,6 @@ nsDOMClassInfo::Init()
|
|||
|
||||
DOM_CLASSINFO_MAP_BEGIN(HTMLSelectElement, nsIDOMHTMLSelectElement)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLSelectElement)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLSelectElement)
|
||||
DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
|
|
|
@ -129,7 +129,6 @@ XPIDLSRCS = \
|
|||
nsIDOMNSHTMLImageElement.idl \
|
||||
nsIDOMNSHTMLInputElement.idl \
|
||||
nsIDOMNSHTMLOptionCollectn.idl \
|
||||
nsIDOMNSHTMLSelectElement.idl \
|
||||
nsIDOMNSHTMLTextAreaElement.idl \
|
||||
$(NULL)
|
||||
|
||||
|
|
|
@ -48,28 +48,31 @@
|
|||
* http://www.w3.org/TR/DOM-Level-2-HTML/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(a6cf9090-15b3-11d2-932e-00805f8add32)]
|
||||
[scriptable, uuid(110a4b15-e0a2-48d7-8e59-d8d94ef510ad)]
|
||||
interface nsIDOMHTMLSelectElement : nsIDOMHTMLElement
|
||||
{
|
||||
readonly attribute DOMString type;
|
||||
attribute long selectedIndex;
|
||||
attribute DOMString value;
|
||||
// Modified in DOM Level 2:
|
||||
attribute unsigned long length;
|
||||
// raises(DOMException) on setting
|
||||
attribute boolean autofocus;
|
||||
attribute boolean disabled;
|
||||
readonly attribute nsIDOMHTMLFormElement form;
|
||||
attribute boolean multiple;
|
||||
attribute DOMString name;
|
||||
attribute long size;
|
||||
|
||||
readonly attribute DOMString type;
|
||||
|
||||
readonly attribute nsIDOMHTMLFormElement form;
|
||||
// Modified in DOM Level 2:
|
||||
readonly attribute nsIDOMHTMLOptionsCollection options;
|
||||
attribute boolean disabled;
|
||||
attribute boolean multiple;
|
||||
attribute DOMString name;
|
||||
attribute long size;
|
||||
attribute long tabIndex;
|
||||
attribute unsigned long length;
|
||||
nsIDOMNode item(in unsigned long index);
|
||||
nsIDOMNode namedItem(in DOMString name);
|
||||
void add(in nsIDOMHTMLElement element,
|
||||
in nsIDOMHTMLElement before)
|
||||
raises(DOMException);
|
||||
raises(DOMException);
|
||||
void remove(in long index);
|
||||
|
||||
attribute long selectedIndex;
|
||||
attribute DOMString value;
|
||||
|
||||
attribute long tabIndex;
|
||||
void blur();
|
||||
void focus();
|
||||
};
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2000
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Vidur Apparao <vidur@netscape.com> (original author)
|
||||
* Johnny Stenback <jst@netscape.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "domstubs.idl"
|
||||
|
||||
[scriptable, uuid(3212788d-fa20-44c4-b945-bd70bdc23ddf)]
|
||||
interface nsIDOMNSHTMLSelectElement : nsISupports
|
||||
{
|
||||
attribute boolean autofocus;
|
||||
nsIDOMNode item(in unsigned long index);
|
||||
nsIDOMNode namedItem(in DOMString name);
|
||||
};
|
|
@ -285,6 +285,7 @@ members = [
|
|||
'nsIDOMHTMLSelectElement.length',
|
||||
'nsIDOMHTMLSelectElement.remove',
|
||||
'nsIDOMHTMLSelectElement.selectedIndex',
|
||||
'nsIDOMHTMLSelectElement.item',
|
||||
'nsIDOMHTMLSelectElement.type',
|
||||
'nsIDOMHTMLSelectElement.options',
|
||||
'nsIDOMHTMLSelectElement.size',
|
||||
|
@ -350,7 +351,6 @@ members = [
|
|||
'nsIDOMNSHTMLInputElement.setSelectionRange',
|
||||
'nsIDOMNSHTMLOptionCollection.selectedIndex',
|
||||
'nsIDOMNSHTMLOptionCollection.add',
|
||||
'nsIDOMNSHTMLSelectElement.item',
|
||||
'nsIDOMNSHTMLTextAreaElement.setSelectionRange',
|
||||
'nsIDOMNSHTMLTextAreaElement.selectionStart',
|
||||
'nsIDOMNSHTMLTextAreaElement.selectionEnd',
|
||||
|
|
|
@ -50,8 +50,7 @@
|
|||
#include "nsIDOMHTMLCollection.h"
|
||||
#include "nsIDOMHTMLOptionsCollection.h"
|
||||
#include "nsIDOMNSHTMLOptionCollectn.h"
|
||||
#include "nsIDOMHTMLSelectElement.h"
|
||||
#include "nsIDOMNSHTMLSelectElement.h"
|
||||
#include "nsIDOMHTMLSelectElement.h"
|
||||
#include "nsIDOMHTMLOptionElement.h"
|
||||
#include "nsComboboxControlFrame.h"
|
||||
#include "nsIViewManager.h"
|
||||
|
@ -285,8 +284,8 @@ void nsListControlFrame::PaintFocus(nsIRenderingContext& aRC, nsPoint aPt)
|
|||
|
||||
nsCOMPtr<nsIContent> focusedContent;
|
||||
|
||||
nsCOMPtr<nsIDOMNSHTMLSelectElement> selectNSElement(do_QueryInterface(mContent));
|
||||
NS_ASSERTION(selectNSElement, "Can't be null");
|
||||
nsCOMPtr<nsIDOMHTMLSelectElement> selectDOMElement(do_QueryInterface(mContent));
|
||||
NS_ASSERTION(selectDOMElement, "Can't be null");
|
||||
|
||||
nsCOMPtr<nsISelectElement> selectElement(do_QueryInterface(mContent));
|
||||
NS_ASSERTION(selectElement, "Can't be null");
|
||||
|
@ -312,7 +311,7 @@ void nsListControlFrame::PaintFocus(nsIRenderingContext& aRC, nsPoint aPt)
|
|||
// find the first non-disabled item
|
||||
PRBool isDisabled = PR_TRUE;
|
||||
for (PRInt32 i=0;i<PRInt32(length) && isDisabled;i++) {
|
||||
if (NS_FAILED(selectNSElement->Item(i, getter_AddRefs(node))) || !node) {
|
||||
if (NS_FAILED(selectDOMElement->Item(i, getter_AddRefs(node))) || !node) {
|
||||
break;
|
||||
}
|
||||
if (NS_FAILED(selectElement->IsOptionDisabled(i, &isDisabled))) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче