Closed Bug 896768 Opened 7 years ago Closed 7 years ago

Want to be able to style <textbox autocompletesearch="file"> results

Categories

(Toolkit :: Autocomplete, enhancement)

x86_64
Linux
enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: neil, Assigned: neil)

Details

Attachments

(2 files, 1 obsolete file)

SeaMonkey and DOM Inspector have autocomplete textboxes that complete from both history and (on Linux only) local files. History autocomplete provides favicons, however local autocomplete provides no autocomplete images or styles.

One option is to make the nsFileResult's GetImageAt return a -moz-icon for the file, this would affect all the consumers (XUL filepicker for Linux included).

Another option is to make the nsFileResult's GetStyleAt return two values (such as "directory" and "file", as per nsFileView::GetCellProperties). Consumers would have to provide their own styles if desired (in filepicker.css for the XUL filepicker).
Attached patch Possible patchSplinter Review
The filepicker.css changes are only for demonstration purposes unless you think that they are a good idea.

As a reminder the XUL filepicker is only available on Linux by setting the ui.allow_platform_file_picker preference to false.
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #779483 - Flags: review?(dtownsend+bugmail)
Comment on attachment 779483 [details] [diff] [review]
Possible patch

Review of attachment 779483 [details] [diff] [review]:
-----------------------------------------------------------------

Is this something we can easily test?
Attachment #779483 - Flags: review?(dtownsend+bugmail) → review+
Attached patch XPCShellTest (obsolete) — Splinter Review
This is the best I could come up with. The fifth test fails without the patch. Unfortunately I don't know an easy way of predicting the filesystem layout.
Attachment #780848 - Flags: review?(dtownsend+bugmail)
https://tbpl.mozilla.org/?tree=Try&rev=8572e12d55cb tests without patch (all failed)
https://tbpl.mozilla.org/?tree=Try&rev=412b37833a1a tests with patch (random orange)
(In reply to neil@parkwaycc.co.uk from comment #3)
> Created attachment 780848 [details] [diff] [review]
> XPCShellTest
> 
> This is the best I could come up with. The fifth test fails without the
> patch. Unfortunately I don't know an easy way of predicting the filesystem
> layout.

Can't we create a directory in the temporary profile and load it up with a predictable filesystem?
Comment on attachment 780848 [details] [diff] [review]
XPCShellTest

Review of attachment 780848 [details] [diff] [review]:
-----------------------------------------------------------------

Waiting on a reply to my last question.
Attachment #780848 - Flags: review?(dtownsend+bugmail)
Attached patch XPCShellTestSplinter Review
Attachment #780848 - Attachment is obsolete: true
Attachment #788362 - Flags: review?(dtownsend+bugmail)
Attachment #788362 - Flags: review?(dtownsend+bugmail) → review+
https://hg.mozilla.org/mozilla-central/rev/cf1c3a76352d
https://hg.mozilla.org/mozilla-central/rev/f3e583c68088
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.