mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Remove unneeded nsIDOMNSHTMLInputElement interface by merging it into nsIDOMHTMLInputElement. (Bug 582303) r=jst
This commit is contained in:
parent
9f2162a376
commit
de6582a359
@ -44,7 +44,6 @@
|
||||
#include "nsTextEquivUtils.h"
|
||||
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMNSHTMLInputElement.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#include "nsIDOMNSHTMLElement.h"
|
||||
#include "nsIDOMNSEditableElement.h"
|
||||
@ -122,30 +121,23 @@ nsHTMLCheckboxAccessible::GetStateInternal(PRUint32 *aState,
|
||||
|
||||
*aState |= nsIAccessibleStates::STATE_CHECKABLE;
|
||||
|
||||
PRBool checked = PR_FALSE; // Radio buttons and check boxes can be checked
|
||||
PRBool mixed = PR_FALSE; // or mixed.
|
||||
PRBool state = PR_FALSE; // Radio buttons and check boxes can be checked or mixed
|
||||
|
||||
nsCOMPtr<nsIDOMNSHTMLInputElement> html5CheckboxElement =
|
||||
do_QueryInterface(mContent);
|
||||
|
||||
if (html5CheckboxElement) {
|
||||
html5CheckboxElement->GetIndeterminate(&mixed);
|
||||
|
||||
if (mixed) {
|
||||
*aState |= nsIAccessibleStates::STATE_MIXED;
|
||||
return NS_OK; // indeterminate can't be checked at the same time.
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLInputElement> htmlCheckboxElement =
|
||||
do_QueryInterface(mContent);
|
||||
|
||||
if (htmlCheckboxElement) {
|
||||
htmlCheckboxElement->GetChecked(&checked);
|
||||
|
||||
if (checked)
|
||||
*aState |= nsIAccessibleStates::STATE_CHECKED;
|
||||
}
|
||||
htmlCheckboxElement->GetIndeterminate(&state);
|
||||
|
||||
if (state) {
|
||||
*aState |= nsIAccessibleStates::STATE_MIXED;
|
||||
} else { // indeterminate can't be checked at the same time.
|
||||
htmlCheckboxElement->GetChecked(&state);
|
||||
|
||||
if (state)
|
||||
*aState |= nsIAccessibleStates::STATE_CHECKED;
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -552,7 +544,7 @@ NS_IMETHODIMP nsHTMLTextFieldAccessible::GetActionName(PRUint8 aIndex, nsAString
|
||||
NS_IMETHODIMP nsHTMLTextFieldAccessible::DoAction(PRUint8 index)
|
||||
{
|
||||
if (index == 0) {
|
||||
nsCOMPtr<nsIDOMNSHTMLElement> element(do_QueryInterface(mContent));
|
||||
nsCOMPtr<nsIDOMHTMLElement> element(do_QueryInterface(mContent));
|
||||
if ( element ) {
|
||||
return element->Focus();
|
||||
}
|
||||
|
@ -65,7 +65,6 @@
|
||||
#include "nsIDOMNSHTMLElement.h"
|
||||
#include "nsIDOMHTMLAnchorElement.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#include "nsIDOMNSHTMLInputElement.h"
|
||||
#include "nsIDOMHTMLLabelElement.h"
|
||||
#include "nsIDOMHTMLSelectElement.h"
|
||||
#include "nsIDOMHTMLTextAreaElement.h"
|
||||
|
@ -1276,6 +1276,19 @@ NS_NewHTML##_elementName##Element(already_AddRefed<nsINodeInfo> aNodeInfo, \
|
||||
NS_INTERFACE_TABLE_ENTRY(_class, _i6) \
|
||||
NS_OFFSET_AND_INTERFACE_TABLE_END
|
||||
|
||||
#define NS_HTML_CONTENT_INTERFACE_TABLE8(_class, _i1, _i2, _i3, _i4, _i5, \
|
||||
_i6, _i7, _i8) \
|
||||
NS_HTML_CONTENT_INTERFACE_TABLE_BEGIN(_class) \
|
||||
NS_INTERFACE_TABLE_ENTRY(_class, _i1) \
|
||||
NS_INTERFACE_TABLE_ENTRY(_class, _i2) \
|
||||
NS_INTERFACE_TABLE_ENTRY(_class, _i3) \
|
||||
NS_INTERFACE_TABLE_ENTRY(_class, _i4) \
|
||||
NS_INTERFACE_TABLE_ENTRY(_class, _i5) \
|
||||
NS_INTERFACE_TABLE_ENTRY(_class, _i6) \
|
||||
NS_INTERFACE_TABLE_ENTRY(_class, _i7) \
|
||||
NS_INTERFACE_TABLE_ENTRY(_class, _i8) \
|
||||
NS_OFFSET_AND_INTERFACE_TABLE_END
|
||||
|
||||
#define NS_HTML_CONTENT_INTERFACE_TABLE9(_class, _i1, _i2, _i3, _i4, _i5, \
|
||||
_i6, _i7, _i8, _i9) \
|
||||
NS_HTML_CONTENT_INTERFACE_TABLE_BEGIN(_class) \
|
||||
|
@ -37,7 +37,6 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#include "nsIDOMNSHTMLInputElement.h"
|
||||
#include "nsITextControlElement.h"
|
||||
#include "nsIFileControlElement.h"
|
||||
#include "nsIDOMNSEditableElement.h"
|
||||
@ -286,9 +285,8 @@ DOMCI_NODE_DATA(HTMLInputElement, nsHTMLInputElement)
|
||||
|
||||
// QueryInterface implementation for nsHTMLInputElement
|
||||
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(nsHTMLInputElement)
|
||||
NS_HTML_CONTENT_INTERFACE_TABLE9(nsHTMLInputElement,
|
||||
NS_HTML_CONTENT_INTERFACE_TABLE8(nsHTMLInputElement,
|
||||
nsIDOMHTMLInputElement,
|
||||
nsIDOMNSHTMLInputElement,
|
||||
nsITextControlElement,
|
||||
nsIFileControlElement,
|
||||
nsIPhonetic,
|
||||
|
@ -42,7 +42,6 @@
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "nsImageLoadingContent.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#include "nsIDOMNSHTMLInputElement.h"
|
||||
#include "nsITextControlElement.h"
|
||||
#include "nsIPhonetic.h"
|
||||
#include "nsIDOMNSEditableElement.h"
|
||||
@ -78,7 +77,6 @@ class nsDOMFileList;
|
||||
class nsHTMLInputElement : public nsGenericHTMLFormElement,
|
||||
public nsImageLoadingContent,
|
||||
public nsIDOMHTMLInputElement,
|
||||
public nsIDOMNSHTMLInputElement,
|
||||
public nsITextControlElement,
|
||||
public nsIPhonetic,
|
||||
public nsIDOMNSEditableElement,
|
||||
@ -104,9 +102,6 @@ public:
|
||||
// nsIDOMHTMLInputElement
|
||||
NS_DECL_NSIDOMHTMLINPUTELEMENT
|
||||
|
||||
// nsIDOMNSHTMLInputElement
|
||||
NS_DECL_NSIDOMNSHTMLINPUTELEMENT
|
||||
|
||||
// nsIPhonetic
|
||||
NS_DECL_NSIPHONETIC
|
||||
|
||||
|
@ -48,7 +48,7 @@
|
||||
#include "nsContentCreatorFunctions.h"
|
||||
#include "nsTextControlFrame.h"
|
||||
#include "nsIControllers.h"
|
||||
#include "nsIDOMNSHTMLInputElement.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#include "nsIDOMNSHTMLTextAreaElement.h"
|
||||
#include "nsITransactionManager.h"
|
||||
#include "nsIControllerContext.h"
|
||||
@ -726,7 +726,7 @@ DoCommandCallback(const char *aCommand, void *aData)
|
||||
nsIContent *content = frame->GetContent();
|
||||
|
||||
nsCOMPtr<nsIControllers> controllers;
|
||||
nsCOMPtr<nsIDOMNSHTMLInputElement> input = do_QueryInterface(content);
|
||||
nsCOMPtr<nsIDOMHTMLInputElement> input = do_QueryInterface(content);
|
||||
if (input) {
|
||||
input->GetControllers(getter_AddRefs(controllers));
|
||||
} else {
|
||||
@ -1170,7 +1170,7 @@ nsTextEditorState::PrepareEditor(const nsAString *aValue)
|
||||
|
||||
if (!SuppressEventHandlers(presContext)) {
|
||||
nsCOMPtr<nsIControllers> controllers;
|
||||
nsCOMPtr<nsIDOMNSHTMLInputElement> inputElement =
|
||||
nsCOMPtr<nsIDOMHTMLInputElement> inputElement =
|
||||
do_QueryInterface(mTextCtrlElement);
|
||||
if (inputElement) {
|
||||
rv = inputElement->GetControllers(getter_AddRefs(controllers));
|
||||
@ -1349,7 +1349,7 @@ nsTextEditorState::UnbindFromFrame(nsTextControlFrame* aFrame)
|
||||
if (!SuppressEventHandlers(mBoundFrame->PresContext()))
|
||||
{
|
||||
nsCOMPtr<nsIControllers> controllers;
|
||||
nsCOMPtr<nsIDOMNSHTMLInputElement> inputElement =
|
||||
nsCOMPtr<nsIDOMHTMLInputElement> inputElement =
|
||||
do_QueryInterface(mTextCtrlElement);
|
||||
if (inputElement)
|
||||
inputElement->GetControllers(getter_AddRefs(controllers));
|
||||
|
@ -55,7 +55,7 @@
|
||||
#include "nsIDOMNSUIEvent.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsIDOMNSHTMLTextAreaElement.h"
|
||||
#include "nsIDOMNSHTMLInputElement.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#include "nsIDOMText.h"
|
||||
#include "nsFocusManager.h"
|
||||
#include "nsIEventListenerManager.h"
|
||||
@ -561,7 +561,7 @@ nsXBLPrototypeHandler::GetController(nsPIDOMEventTarget* aTarget)
|
||||
}
|
||||
|
||||
if (!controllers) {
|
||||
nsCOMPtr<nsIDOMNSHTMLInputElement> htmlInputElement(do_QueryInterface(aTarget));
|
||||
nsCOMPtr<nsIDOMHTMLInputElement> htmlInputElement(do_QueryInterface(aTarget));
|
||||
if (htmlInputElement)
|
||||
htmlInputElement->GetControllers(getter_AddRefs(controllers));
|
||||
}
|
||||
|
@ -50,7 +50,6 @@
|
||||
#include "nsIDOMXULDocument.h"
|
||||
#include "nsIDOMHTMLDocument.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMNSHTMLInputElement.h"
|
||||
#include "nsIDOMNSHTMLTextAreaElement.h"
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
#include "nsIDOMXULElement.h"
|
||||
|
@ -275,7 +275,6 @@
|
||||
#include "nsIDOMHTMLIFrameElement.h"
|
||||
#include "nsIDOMHTMLImageElement.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#include "nsIDOMNSHTMLInputElement.h"
|
||||
#include "nsIDOMHTMLIsIndexElement.h"
|
||||
#include "nsIDOMHTMLLIElement.h"
|
||||
#include "nsIDOMHTMLLabelElement.h"
|
||||
@ -2553,7 +2552,6 @@ nsDOMClassInfo::Init()
|
||||
|
||||
DOM_CLASSINFO_MAP_BEGIN(HTMLInputElement, nsIDOMHTMLInputElement)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLInputElement)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLInputElement)
|
||||
DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
|
@ -56,7 +56,7 @@
|
||||
#include "nsGUIEvent.h"
|
||||
#include "nsGlobalWindow.h"
|
||||
#include "nsFocusManager.h"
|
||||
#include "nsIDOMNSHTMLInputElement.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#include "nsIDOMNSHTMLTextAreaElement.h"
|
||||
#include "nsIControllers.h"
|
||||
|
||||
@ -292,7 +292,7 @@ nsWindowRoot::GetControllers(nsIControllers** aResult)
|
||||
if (htmlTextArea)
|
||||
return htmlTextArea->GetControllers(aResult);
|
||||
|
||||
nsCOMPtr<nsIDOMNSHTMLInputElement> htmlInputElement =
|
||||
nsCOMPtr<nsIDOMHTMLInputElement> htmlInputElement =
|
||||
do_QueryInterface(focusedContent);
|
||||
if (htmlInputElement)
|
||||
return htmlInputElement->GetControllers(aResult);
|
||||
|
@ -121,7 +121,6 @@ XPIDLSRCS = \
|
||||
nsIDOMNSHTMLFormElement.idl \
|
||||
nsIDOMNSHTMLFrameElement.idl \
|
||||
nsIDOMNSHTMLHRElement.idl \
|
||||
nsIDOMNSHTMLInputElement.idl \
|
||||
nsIDOMNSHTMLOptionCollectn.idl \
|
||||
nsIDOMNSHTMLTextAreaElement.idl \
|
||||
$(NULL)
|
||||
|
@ -39,39 +39,74 @@
|
||||
|
||||
#include "nsIDOMHTMLElement.idl"
|
||||
|
||||
/**
|
||||
* The nsIDOMHTMLInputElement interface is the interface to a [X]HTML
|
||||
* input element.
|
||||
*
|
||||
* For more information on this interface please see
|
||||
* http://www.w3.org/TR/DOM-Level-2-HTML/
|
||||
*/
|
||||
interface nsIControllers;
|
||||
interface nsIDOMFileList;
|
||||
|
||||
[scriptable, uuid(a6cf9093-15b3-11d2-932e-00805f8add32)]
|
||||
/**
|
||||
* The nsIDOMHTMLInputElement interface is the interface to a [X]HTML
|
||||
* input element.
|
||||
*
|
||||
* For more information on this interface please see
|
||||
* http://www.w3.org/TR/DOM-Level-2-HTML/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(2480b6f0-094e-484f-8717-0c204ed23e69)]
|
||||
interface nsIDOMHTMLInputElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString defaultValue;
|
||||
attribute boolean defaultChecked;
|
||||
readonly attribute nsIDOMHTMLFormElement form;
|
||||
attribute DOMString accept;
|
||||
attribute DOMString accessKey;
|
||||
attribute DOMString align;
|
||||
attribute DOMString alt;
|
||||
|
||||
attribute boolean autofocus;
|
||||
attribute boolean defaultChecked;
|
||||
attribute boolean checked;
|
||||
attribute boolean disabled;
|
||||
readonly attribute nsIDOMHTMLFormElement form;
|
||||
|
||||
readonly attribute nsIDOMFileList files;
|
||||
|
||||
attribute boolean indeterminate;
|
||||
|
||||
attribute long maxLength;
|
||||
|
||||
attribute boolean multiple;
|
||||
attribute DOMString name;
|
||||
|
||||
attribute DOMString placeholder;
|
||||
attribute boolean readOnly;
|
||||
// Modified in DOM Level 2:
|
||||
|
||||
attribute DOMString accessKey;
|
||||
attribute DOMString align;
|
||||
|
||||
attribute unsigned long size;
|
||||
attribute DOMString src;
|
||||
attribute long tabIndex;
|
||||
// Modified in DOM Level 2:
|
||||
attribute DOMString type;
|
||||
attribute DOMString useMap;
|
||||
|
||||
attribute DOMString type;
|
||||
attribute DOMString defaultValue;
|
||||
attribute DOMString value;
|
||||
void blur();
|
||||
void focus();
|
||||
void select();
|
||||
void click();
|
||||
};
|
||||
|
||||
void select();
|
||||
attribute long selectionStart;
|
||||
attribute long selectionEnd;
|
||||
void setSelectionRange(in long selectionStart, in long selectionEnd);
|
||||
|
||||
|
||||
attribute long tabIndex;
|
||||
attribute DOMString useMap;
|
||||
readonly attribute nsIControllers controllers;
|
||||
readonly attribute long textLength;
|
||||
|
||||
void mozGetFileNameArray([optional] out unsigned long aLength,
|
||||
[array,size_is(aLength), retval] out wstring aFileNames);
|
||||
void mozSetFileNameArray([array,size_is(aLength)] in wstring aFileNames,
|
||||
in unsigned long aLength);
|
||||
|
||||
/**
|
||||
* This non-standard method prevents to check types manually to know if the
|
||||
* element is a text field.
|
||||
*/
|
||||
boolean mozIsTextField(in boolean aExcludePassword);
|
||||
|
||||
void blur();
|
||||
void focus();
|
||||
void click();
|
||||
};
|
@ -1,78 +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"
|
||||
|
||||
interface nsIControllers;
|
||||
interface nsIDOMFileList;
|
||||
|
||||
[scriptable, uuid(aa764da9-9046-4565-9e34-abd3c4da158e)]
|
||||
interface nsIDOMNSHTMLInputElement : nsISupports
|
||||
{
|
||||
attribute boolean autofocus;
|
||||
readonly attribute nsIControllers controllers;
|
||||
|
||||
readonly attribute long textLength;
|
||||
|
||||
attribute long selectionStart;
|
||||
attribute long selectionEnd;
|
||||
|
||||
readonly attribute nsIDOMFileList files;
|
||||
|
||||
attribute boolean indeterminate;
|
||||
|
||||
attribute boolean multiple;
|
||||
|
||||
attribute DOMString placeholder;
|
||||
|
||||
void mozGetFileNameArray([optional] out unsigned long aLength,
|
||||
[array,size_is(aLength), retval] out wstring aFileNames);
|
||||
void mozSetFileNameArray([array,size_is(aLength)] in wstring aFileNames,
|
||||
in unsigned long aLength);
|
||||
|
||||
/* convenience */
|
||||
void setSelectionRange(in long selectionStart,
|
||||
in long selectionEnd);
|
||||
|
||||
/**
|
||||
* This non-standard method prevents to check types manually to know if the
|
||||
* element is a text field.
|
||||
*/
|
||||
boolean mozIsTextField(in boolean aExcludePassword);
|
||||
};
|
@ -65,7 +65,6 @@
|
||||
#include "nsIContent.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIFormControl.h"
|
||||
#include "nsIDOMNSHTMLInputElement.h"
|
||||
#include "nsIDOMNSHTMLTextAreaElement.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#include "nsIDOMHTMLTextAreaElement.h"
|
||||
@ -270,7 +269,7 @@ EmbedContextMenuInfo::GetSelectedText()
|
||||
if (mCtxFormType != 0 && mEventNode) {
|
||||
PRInt32 TextLength = 0, selStart = 0, selEnd = 0;
|
||||
if (mCtxFormType == NS_FORM_INPUT_TEXT || mCtxFormType == NS_FORM_INPUT_FILE) {
|
||||
nsCOMPtr<nsIDOMNSHTMLInputElement> nsinput = do_QueryInterface(mEventNode, &rv);
|
||||
nsCOMPtr<nsIDOMHTMLInputElement> nsinput = do_QueryInterface(mEventNode, &rv);
|
||||
if (NS_SUCCEEDED(rv) && nsinput)
|
||||
nsinput->GetTextLength(&TextLength);
|
||||
if (TextLength > 0) {
|
||||
|
@ -270,6 +270,11 @@ members = [
|
||||
'nsIDOMHTMLInputElement.src',
|
||||
'nsIDOMHTMLInputElement.name',
|
||||
'nsIDOMHTMLInputElement.value',
|
||||
'nsIDOMHTMLInputElement.files',
|
||||
'nsIDOMHTMLInputElement.textLength',
|
||||
'nsIDOMHTMLInputElement.selectionStart',
|
||||
'nsIDOMHTMLInputElement.selectionEnd',
|
||||
'nsIDOMHTMLInputElement.setSelectionRange',
|
||||
'nsIDOMHTMLLinkElement.disabled',
|
||||
'nsIDOMHTMLOptionElement.index',
|
||||
'nsIDOMHTMLOptionElement.selected',
|
||||
@ -344,11 +349,6 @@ members = [
|
||||
'nsIDOMNSHTMLElement.offsetWidth',
|
||||
'nsIDOMNSHTMLElement.scrollIntoView',
|
||||
'nsIDOMNSHTMLFrameElement.contentWindow',
|
||||
'nsIDOMNSHTMLInputElement.files',
|
||||
'nsIDOMNSHTMLInputElement.textLength',
|
||||
'nsIDOMNSHTMLInputElement.selectionStart',
|
||||
'nsIDOMNSHTMLInputElement.selectionEnd',
|
||||
'nsIDOMNSHTMLInputElement.setSelectionRange',
|
||||
'nsIDOMNSHTMLOptionCollection.selectedIndex',
|
||||
'nsIDOMNSHTMLOptionCollection.add',
|
||||
'nsIDOMNSHTMLTextAreaElement.setSelectionRange',
|
||||
|
@ -112,7 +112,6 @@
|
||||
#include "nsIParser.h"
|
||||
#include "nsParserCIID.h"
|
||||
#include "nsFrameSelection.h"
|
||||
#include "nsIDOMNSHTMLInputElement.h" //optimization for ::DoXXX commands
|
||||
#include "nsIDOMNSHTMLTextAreaElement.h"
|
||||
#include "nsViewsCID.h"
|
||||
#include "nsPresArena.h"
|
||||
|
@ -56,7 +56,6 @@
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMMouseListener.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsISupportsPrimitives.h"
|
||||
#include "nsIComponentManager.h"
|
||||
@ -74,7 +73,7 @@
|
||||
#include "nsIDOMNSUIEvent.h"
|
||||
#include "nsIDOMEventGroup.h"
|
||||
#include "nsIDOM3EventTarget.h"
|
||||
#include "nsIDOMNSHTMLInputElement.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#ifdef ACCESSIBILITY
|
||||
#include "nsIAccessibilityService.h"
|
||||
#endif
|
||||
@ -441,7 +440,7 @@ nsFileControlFrame::CaptureMouseListener::MouseClick(nsIDOMEvent* aMouseEvent)
|
||||
|
||||
// Get parent nsIDOMWindowInternal object.
|
||||
nsIContent* content = mFrame->GetContent();
|
||||
nsCOMPtr<nsIDOMNSHTMLInputElement> inputElem = do_QueryInterface(content);
|
||||
nsCOMPtr<nsIDOMHTMLInputElement> inputElem = do_QueryInterface(content);
|
||||
nsCOMPtr<nsIFileControlElement> fileControl = do_QueryInterface(content);
|
||||
if (!content || !inputElem || !fileControl)
|
||||
return NS_ERROR_FAILURE;
|
||||
@ -538,7 +537,7 @@ nsFileControlFrame::BrowseMouseListener::MouseClick(nsIDOMEvent* aMouseEvent)
|
||||
|
||||
// Get parent nsIDOMWindowInternal object.
|
||||
nsIContent* content = mFrame->GetContent();
|
||||
nsCOMPtr<nsIDOMNSHTMLInputElement> inputElem = do_QueryInterface(content);
|
||||
nsCOMPtr<nsIDOMHTMLInputElement> inputElem = do_QueryInterface(content);
|
||||
nsCOMPtr<nsIFileControlElement> fileControl = do_QueryInterface(content);
|
||||
if (!content || !inputElem || !fileControl)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
@ -46,7 +46,7 @@
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#include "nsDisplayList.h"
|
||||
#include "nsCSSAnonBoxes.h"
|
||||
#include "nsIDOMNSHTMLInputElement.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
|
||||
static void
|
||||
PaintCheckMark(nsIFrame* aFrame,
|
||||
@ -173,7 +173,7 @@ nsGfxCheckboxControlFrame::IsChecked()
|
||||
PRBool
|
||||
nsGfxCheckboxControlFrame::IsIndeterminate()
|
||||
{
|
||||
nsCOMPtr<nsIDOMNSHTMLInputElement> elem(do_QueryInterface(mContent));
|
||||
nsCOMPtr<nsIDOMHTMLInputElement> elem(do_QueryInterface(mContent));
|
||||
PRBool retval = PR_FALSE;
|
||||
elem->GetIndeterminate(&retval);
|
||||
return retval;
|
||||
|
@ -41,7 +41,6 @@
|
||||
#include "nsTextControlFrame.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMNSHTMLTextAreaElement.h"
|
||||
#include "nsIDOMNSHTMLInputElement.h"
|
||||
#include "nsIFormControl.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsFrameSelection.h"
|
||||
|
@ -56,7 +56,6 @@
|
||||
#include "nsIDOMCompositionListener.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMNSHTMLInputElement.h"
|
||||
#include "nsIFormControl.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIContent.h"
|
||||
@ -411,27 +410,24 @@ nsFormFillController::SetTextValue(const nsAString & aTextValue)
|
||||
NS_IMETHODIMP
|
||||
nsFormFillController::GetSelectionStart(PRInt32 *aSelectionStart)
|
||||
{
|
||||
nsCOMPtr<nsIDOMNSHTMLInputElement> input = do_QueryInterface(mFocusedInput);
|
||||
if (input)
|
||||
input->GetSelectionStart(aSelectionStart);
|
||||
if (mFocusedInput)
|
||||
mFocusedInput->GetSelectionStart(aSelectionStart);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFormFillController::GetSelectionEnd(PRInt32 *aSelectionEnd)
|
||||
{
|
||||
nsCOMPtr<nsIDOMNSHTMLInputElement> input = do_QueryInterface(mFocusedInput);
|
||||
if (input)
|
||||
input->GetSelectionEnd(aSelectionEnd);
|
||||
if (mFocusedInput)
|
||||
mFocusedInput->GetSelectionEnd(aSelectionEnd);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFormFillController::SelectTextRange(PRInt32 aStartIndex, PRInt32 aEndIndex)
|
||||
{
|
||||
nsCOMPtr<nsIDOMNSHTMLInputElement> input = do_QueryInterface(mFocusedInput);
|
||||
if (input)
|
||||
input->SetSelectionRange(aStartIndex, aEndIndex);
|
||||
if (mFocusedInput)
|
||||
mFocusedInput->SetSelectionRange(aStartIndex, aEndIndex);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -1345,7 +1345,7 @@
|
||||
|
||||
var elt = document.commandDispatcher.focusedElement;
|
||||
if (elt) {
|
||||
if (elt instanceof NSHTMLInputElement && elt.mozIsTextField(false))
|
||||
if (elt instanceof HTMLInputElement && elt.mozIsTextField(false))
|
||||
return false;
|
||||
|
||||
if (elt instanceof HTMLTextAreaElement ||
|
||||
|
@ -133,7 +133,7 @@ function _onInputKeyPress (event, callback) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((target instanceof Ci.nsIDOMNSHTMLInputElement &&
|
||||
if ((target instanceof Ci.nsIDOMHTMLInputElement &&
|
||||
target.mozIsTextField(false)) ||
|
||||
target instanceof Ci.nsIDOMHTMLTextAreaElement) {
|
||||
|
||||
@ -230,7 +230,7 @@ function _onInputKeyPress (event, callback) {
|
||||
doc.defaultView.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils).focus(bestElementToFocus);
|
||||
|
||||
// if it is a text element, select all.
|
||||
if ((bestElementToFocus instanceof Ci.nsIDOMNSHTMLInputElement &&
|
||||
if ((bestElementToFocus instanceof Ci.nsIDOMHTMLInputElement &&
|
||||
bestElementToFocus.mozIsTextField(false)) ||
|
||||
bestElementToFocus instanceof Ci.nsIDOMHTMLTextAreaElement) {
|
||||
bestElementToFocus.selectionStart = 0;
|
||||
|
@ -59,7 +59,6 @@
|
||||
#include "nsIMenuFrame.h"
|
||||
#include "prlink.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#include "nsIDOMNSHTMLInputElement.h"
|
||||
#include "nsWidgetAtoms.h"
|
||||
#include "mozilla/Services.h"
|
||||
|
||||
|
@ -50,7 +50,6 @@
|
||||
#include "nsILookAndFeel.h"
|
||||
#include "nsThemeConstants.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIDOMNSHTMLInputElement.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
|
||||
nsNativeTheme::nsNativeTheme()
|
||||
@ -213,7 +212,7 @@ nsNativeTheme::GetIndeterminate(nsIFrame* aFrame)
|
||||
}
|
||||
|
||||
// Check for an HTML input element
|
||||
nsCOMPtr<nsIDOMNSHTMLInputElement> inputElt = do_QueryInterface(content);
|
||||
nsCOMPtr<nsIDOMHTMLInputElement> inputElt = do_QueryInterface(content);
|
||||
if (inputElt) {
|
||||
PRBool indeterminate;
|
||||
inputElt->GetIndeterminate(&indeterminate);
|
||||
|
Loading…
Reference in New Issue
Block a user