/* More than one formsets may share the same browser storage, this function just get the first formset storage which share the browser storage. */
FORMSET_STORAGE* GetFstStgFromBrsStg(IN BROWSER_STORAGE *Storage)
/* More than one formsets may share the same browser storage, this function just get the first formset storage which share the browser storage. */
FORMSET_STORAGE* GetFstStgFromBrsStg(IN BROWSER_STORAGE *Storage)
{
  FORMSET_STORAGE       *FormsetStorage;
  LIST_ENTRY            *Link;
  LIST_ENTRY            *FormsetLink;
  FORM_BROWSER_FORMSET  *FormSet;
  BOOLEAN               Found;
  Found          = FALSE;
  FormsetStorage = NULL;
  FormsetLink = GetFirstNode (&gBrowserFormSetList);
  while (!IsNull (&gBrowserFormSetList, FormsetLink)) {
    FormSet     = FORM_BROWSER_FORMSET_FROM_LINK (FormsetLink);
    FormsetLink = GetNextNode (&gBrowserFormSetList, FormsetLink);
    Link = GetFirstNode (&FormSet->StorageListHead);
    while (!IsNull (&FormSet->StorageListHead, Link)) {
      FormsetStorage = FORMSET_STORAGE_FROM_LINK (Link);
      Link           = GetNextNode (&FormSet->StorageListHead, Link);
      if (FormsetStorage->BrowserStorage == Storage) {
        Found = TRUE;
        break;
      }
    }
    if (Found) {
      break;
    }
  }
  return Found ? FormsetStorage : NULL;
}