Bug 1207088 - Don't show the "Choose folder..." button for a directory picking <input> on platforms that don't have a directory picker. r=jfkthame
This commit is contained in:
@@ -127,9 +127,14 @@ nsFileControlFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
|
||||
{
|
||||
nsCOMPtr<nsIDocument> doc = mContent->GetComposedDoc();
|
||||
|
||||
#if defined(ANDROID) || defined(MOZ_B2G)
|
||||
bool isDirPicker = false;
|
||||
#else
|
||||
nsIContent* content = GetContent();
|
||||
bool isDirPicker = Preferences::GetBool("dom.input.dirpicker", false) &&
|
||||
content && content->HasAttr(kNameSpaceID_None, nsGkAtoms::directory);
|
||||
bool isDirPicker =
|
||||
Preferences::GetBool("dom.input.dirpicker", false) &&
|
||||
content && content->HasAttr(kNameSpaceID_None, nsGkAtoms::directory);
|
||||
#endif
|
||||
|
||||
RefPtr<HTMLInputElement> fileContent = HTMLInputElement::FromContentOrNull(mContent);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user