Пример #1
0
void
URL::SetSearchParams(URLSearchParams* aSearchParams)
{
  if (!aSearchParams) {
    return;
  }

  if (!aSearchParams->HasURLAssociated()) {
    MOZ_ASSERT(aSearchParams->IsValid());

    mSearchParams = aSearchParams;
    mSearchParams->SetObserver(this);
  } else {
    CreateSearchParamsIfNeeded();
    mSearchParams->CopyFromURLSearchParams(*aSearchParams);
  }

  nsAutoString search;
  mSearchParams->Serialize(search);
  SetSearchInternal(search);
}
Пример #2
0
URLSearchParams*
Link::SearchParams()
{
  CreateSearchParamsIfNeeded();
  return mSearchParams;
}
Пример #3
0
URLSearchParams*
URL::GetSearchParams()
{
  CreateSearchParamsIfNeeded();
  return mSearchParams;
}