Bug 1540963 - Make nsIControllerCommandTable builtinclass and make its users use nsControllerCommandTable directly r=bzbarsky
`nsIControllerCommandTable` isn't implemented with JS even in comm-central nor BlueGriffon. Therefore, we can make it a builtinclass. Additionally, it's inherited only by nsControllerCommandTable. So, all users in C++ can treat the concrete class directly. Differential Revision: https://phabricator.services.mozilla.com/D25727
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "HTMLFormSubmissionConstants.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "nsIControllers.h"
|
||||
#include "nsBaseCommandController.h"
|
||||
#include "nsIStringBundle.h"
|
||||
#include "nsFocusManager.h"
|
||||
#include "nsColorControlFrame.h"
|
||||
@@ -109,7 +109,6 @@
|
||||
#include "nsIColorPicker.h"
|
||||
#include "nsIStringEnumerator.h"
|
||||
#include "HTMLSplitOnSpacesTokenizer.h"
|
||||
#include "nsIController.h"
|
||||
#include "nsIMIMEInfo.h"
|
||||
#include "nsFrameSelection.h"
|
||||
#include "nsBaseCommandController.h"
|
||||
@@ -5448,22 +5447,22 @@ nsIControllers* HTMLInputElement::GetControllers(ErrorResult& aRv) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIController> controller =
|
||||
RefPtr<nsBaseCommandController> commandController =
|
||||
nsBaseCommandController::CreateEditorController();
|
||||
if (!controller) {
|
||||
if (!commandController) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
mControllers->AppendController(controller);
|
||||
mControllers->AppendController(commandController);
|
||||
|
||||
controller = nsBaseCommandController::CreateEditingController();
|
||||
if (!controller) {
|
||||
commandController = nsBaseCommandController::CreateEditingController();
|
||||
if (!commandController) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
mControllers->AppendController(controller);
|
||||
mControllers->AppendController(commandController);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user