Bug 345681: Remove the vestigial nsICheckboxControlFrame and nsIRadioControlFrame interfaces. r=roc

This commit is contained in:
Zack Weinberg 2010-02-09 14:06:37 -08:00
parent 172cc86c9d
commit 7fd5fe000b
10 changed files with 6 additions and 185 deletions

View File

@ -60,8 +60,6 @@
#include "nsIFormControl.h"
#include "nsIForm.h"
#include "nsIFormSubmission.h"
#include "nsITextControlFrame.h"
#include "nsIRadioControlFrame.h"
#include "nsIDocument.h"
#include "nsIPresShell.h"
#include "nsIFormControlFrame.h"
@ -81,7 +79,6 @@
#include "nsIDOMNSEvent.h"
#include "nsIDOMNodeList.h"
#include "nsIDOMHTMLCollection.h"
#include "nsICheckboxControlFrame.h"
#include "nsLinebreakConverter.h" //to strip out carriage returns
#include "nsReadableUtils.h"
#include "nsUnicharUtils.h"
@ -98,7 +95,6 @@
#include "nsRuleData.h"
// input type=radio
#include "nsIRadioControlFrame.h"
#include "nsIRadioGroupContainer.h"
// input type=file
@ -1368,20 +1364,10 @@ nsHTMLInputElement::SetCheckedInternal(PRBool aChecked, PRBool aNotify)
//
// Notify the frame
//
nsIFrame* frame = GetPrimaryFrame();
if (frame) {
nsPresContext *presContext = GetPresContext();
if (mType == NS_FORM_INPUT_CHECKBOX) {
nsICheckboxControlFrame* checkboxFrame = do_QueryFrame(frame);
if (checkboxFrame) {
checkboxFrame->OnChecked(presContext, aChecked);
}
} else if (mType == NS_FORM_INPUT_RADIO) {
nsIRadioControlFrame* radioFrame = do_QueryFrame(frame);
if (radioFrame) {
radioFrame->OnChecked(presContext, aChecked);
}
if (mType == NS_FORM_INPUT_CHECKBOX || mType == NS_FORM_INPUT_RADIO) {
nsIFrame* frame = GetPrimaryFrame();
if (frame) {
frame->InvalidateOverflowRect();
}
}

View File

@ -77,8 +77,6 @@
#include "nsIComboboxControlFrame.h"
#include "nsIListControlFrame.h"
#include "nsISelectControlFrame.h"
#include "nsIRadioControlFrame.h"
#include "nsICheckboxControlFrame.h"
#include "nsIDOMCharacterData.h"
#include "nsIDOMHTMLImageElement.h"
#include "nsPlaceholderFrame.h"

View File

@ -58,8 +58,6 @@ EXPORTS = \
nsIListControlFrame.h \
nsIComboboxControlFrame.h \
nsIFormControlFrame.h \
nsIRadioControlFrame.h \
nsICheckboxControlFrame.h \
nsISelectControlFrame.h \
nsITextControlFrame.h \
$(NULL)

View File

@ -119,11 +119,6 @@ nsGfxCheckboxControlFrame::~nsGfxCheckboxControlFrame()
{
}
NS_QUERYFRAME_HEAD(nsGfxCheckboxControlFrame)
NS_QUERYFRAME_ENTRY(nsICheckboxControlFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsFormControlFrame)
#ifdef ACCESSIBILITY
NS_IMETHODIMP
nsGfxCheckboxControlFrame::GetAccessible(nsIAccessible** aAccessible)
@ -140,15 +135,6 @@ nsGfxCheckboxControlFrame::GetAccessible(nsIAccessible** aAccessible)
}
#endif
//------------------------------------------------------------
NS_IMETHODIMP
nsGfxCheckboxControlFrame::OnChecked(nsPresContext* aPresContext,
PRBool aChecked)
{
InvalidateOverflowRect();
return NS_OK;
}
//------------------------------------------------------------
NS_IMETHODIMP
nsGfxCheckboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,

View File

@ -38,14 +38,12 @@
#define nsGfxCheckboxControlFrame_h___
#include "nsFormControlFrame.h"
#include "nsICheckboxControlFrame.h"
#ifdef ACCESSIBILITY
class nsIAccessible;
#endif
class nsGfxCheckboxControlFrame : public nsFormControlFrame,
public nsICheckboxControlFrame
class nsGfxCheckboxControlFrame : public nsFormControlFrame
{
public:
NS_DECL_FRAMEARENA_HELPERS
@ -67,11 +65,6 @@ public:
NS_IMETHOD GetAccessible(nsIAccessible** aAccessible);
#endif
//nsICheckboxControlFrame methods
NS_IMETHOD OnChecked(nsPresContext* aPresContext, PRBool aChecked);
NS_DECL_QUERYFRAME
protected:
PRBool IsChecked();

View File

@ -64,10 +64,6 @@ nsGfxRadioControlFrame::~nsGfxRadioControlFrame()
{
}
NS_QUERYFRAME_HEAD(nsGfxRadioControlFrame)
NS_QUERYFRAME_ENTRY(nsIRadioControlFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsFormControlFrame)
#ifdef ACCESSIBILITY
NS_IMETHODIMP
nsGfxRadioControlFrame::GetAccessible(nsIAccessible** aAccessible)
@ -126,11 +122,3 @@ nsGfxRadioControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
return aLists.Content()->AppendNewToTop(new (aBuilder)
nsDisplayGeneric(this, PaintCheckedRadioButton, "CheckedRadioButton"));
}
NS_IMETHODIMP
nsGfxRadioControlFrame::OnChecked(nsPresContext* aPresContext,
PRBool aChecked)
{
InvalidateOverflowRect();
return NS_OK;
}

View File

@ -39,7 +39,6 @@
#define nsGfxRadioControlFrame_h___
#include "nsFormControlFrame.h"
#include "nsIRadioControlFrame.h"
#ifdef ACCESSIBILITY
class nsIAccessible;
@ -47,21 +46,17 @@ class nsIAccessible;
// nsGfxRadioControlFrame
class nsGfxRadioControlFrame : public nsFormControlFrame,
public nsIRadioControlFrame
class nsGfxRadioControlFrame : public nsFormControlFrame
{
public:
nsGfxRadioControlFrame(nsStyleContext* aContext);
~nsGfxRadioControlFrame();
NS_DECL_QUERYFRAME
NS_DECL_FRAMEARENA_HELPERS
#ifdef ACCESSIBILITY
NS_IMETHOD GetAccessible(nsIAccessible** aAccessible);
#endif
NS_IMETHOD OnChecked(nsPresContext* aPresContext, PRBool aChecked);
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,

View File

@ -1,61 +0,0 @@
/* -*- Mode: C++; 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) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* 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 ***** */
#ifndef nsICheckControlFrame_h___
#define nsICheckControlFrame_h___
#include "nsQueryFrame.h"
class nsStyleContext;
class nsPresContext;
/**
* nsICheckControlFrame is the common interface radio buttons.
* @see nsFromControlFrame and its base classes for more info
*/
class nsICheckboxControlFrame
{
public:
NS_DECL_QUERYFRAME_TARGET(nsICheckboxControlFrame)
/**
* Called by content when checkbox "checked" changes
*/
NS_IMETHOD OnChecked(nsPresContext* aPresContext, PRBool aChecked) = 0;
};
#endif

View File

@ -1,60 +0,0 @@
/* -*- Mode: C++; 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) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* 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 ***** */
#ifndef nsIRadioControlFrame_h___
#define nsIRadioControlFrame_h___
#include "nsQueryFrame.h"
class nsStyleContext;
/**
* nsIRadioControlFrame is the common interface radio buttons.
* @see nsFormControlFrame and its base classes for more info
*/
class nsIRadioControlFrame
{
public:
NS_DECL_QUERYFRAME_TARGET(nsIRadioControlFrame)
/**
* Called by content when the radio button's state changes
*/
NS_IMETHOD OnChecked(nsPresContext* aPresContext, PRBool aChecked) = 0;
};
#endif

View File

@ -111,7 +111,6 @@ public:
nsHTMLScrollFrame_id,
nsIAnonymousContentCreator_id,
nsICSSPseudoComparator_id,
nsICheckboxControlFrame_id,
nsIComboboxControlFrame_id,
nsIFormControlFrame_id,
nsIFrame_id,
@ -123,7 +122,6 @@ public:
nsIObjectFrame_id,
nsIPageSequenceFrame_id,
nsIPercentHeightObserver_id,
nsIRadioControlFrame_id,
nsIRootBox_id,
nsISVGChildFrame_id,
nsISVGGlyphFragmentLeaf_id,