diff options
author | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-12-15 02:54:49 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-12-15 02:54:49 +0000 |
commit | 3a4e7a3e73a40eecbb0a977a0e7421ff5743c353 (patch) | |
tree | 7a8a392f34967475ad54c929a8928e0a50a8211e /MdeModulePkg/Universal/SetupBrowserDxe | |
parent | 3531262f5f4afd8b3873fb8b592437b27f9db4c9 (diff) | |
download | edk2-platforms-3a4e7a3e73a40eecbb0a977a0e7421ff5743c353.tar.xz |
Per UEFI spec, on CallBack action EFI_BROWSER_ACTION_CHANGING, the return value of ActionRequest will be ignored, but on CallBack action EFI_BROWSER_ACTION_CHANGED, the return value of ActionRequest will be used.
But, EDKII browser still processes the got ActionRequest. And, all HII drivers in EDKII project also returns their expected ActionRequest value on action EFI_BROWSER_ACTION_CHANGING.
Now update the browser to follow the spec, and update all core Hii drivers to keep old working modal.
Update for MdeModulePkg.
Signed-off-by: ydong10
Reviewed-by: lgao4
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12865 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c | 71 |
1 files changed, 38 insertions, 33 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c index ba39f30253..2ba2165971 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c @@ -1248,45 +1248,50 @@ ProcessCallBackFunction ( &ActionRequest
);
if (!EFI_ERROR (Status)) {
- switch (ActionRequest) {
- case EFI_BROWSER_ACTION_REQUEST_RESET:
- gResetRequired = TRUE;
- Selection->Action = UI_ACTION_EXIT;
- break;
+ //
+ // Only for EFI_BROWSER_ACTION_CHANGED need to handle this ActionRequest.
+ //
+ if (Action == EFI_BROWSER_ACTION_CHANGED) {
+ switch (ActionRequest) {
+ case EFI_BROWSER_ACTION_REQUEST_RESET:
+ gResetRequired = TRUE;
+ Selection->Action = UI_ACTION_EXIT;
+ break;
- case EFI_BROWSER_ACTION_REQUEST_SUBMIT:
- SubmitFormIsRequired = TRUE;
- Selection->Action = UI_ACTION_EXIT;
- break;
+ case EFI_BROWSER_ACTION_REQUEST_SUBMIT:
+ SubmitFormIsRequired = TRUE;
+ Selection->Action = UI_ACTION_EXIT;
+ break;
- case EFI_BROWSER_ACTION_REQUEST_EXIT:
- Selection->Action = UI_ACTION_EXIT;
- break;
+ case EFI_BROWSER_ACTION_REQUEST_EXIT:
+ Selection->Action = UI_ACTION_EXIT;
+ break;
- case EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT:
- SubmitFormIsRequired = TRUE;
- SettingLevel = FormLevel;
- NeedExit = TRUE;
- break;
+ case EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT:
+ SubmitFormIsRequired = TRUE;
+ SettingLevel = FormLevel;
+ NeedExit = TRUE;
+ break;
- case EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT:
- DiscardFormIsRequired = TRUE;
- SettingLevel = FormLevel;
- NeedExit = TRUE;
- break;
+ case EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT:
+ DiscardFormIsRequired = TRUE;
+ SettingLevel = FormLevel;
+ NeedExit = TRUE;
+ break;
- case EFI_BROWSER_ACTION_REQUEST_FORM_APPLY:
- SubmitFormIsRequired = TRUE;
- SettingLevel = FormLevel;
- break;
+ case EFI_BROWSER_ACTION_REQUEST_FORM_APPLY:
+ SubmitFormIsRequired = TRUE;
+ SettingLevel = FormLevel;
+ break;
- case EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD:
- DiscardFormIsRequired = TRUE;
- SettingLevel = FormLevel;
- break;
+ case EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD:
+ DiscardFormIsRequired = TRUE;
+ SettingLevel = FormLevel;
+ break;
- default:
- break;
+ default:
+ break;
+ }
}
//
@@ -1555,7 +1560,7 @@ SetupBrowser ( }
}
- if ((Status == EFI_SUCCESS) && (Statement->Operand != EFI_IFR_REF_OP)) {
+ if (!EFI_ERROR (Status) && Statement->Operand != EFI_IFR_REF_OP) {
ProcessCallBackFunction(Selection, Statement, EFI_BROWSER_ACTION_CHANGED, FALSE);
}
}
|