mirror of
https://github.com/servo/servo.git
synced 2025-08-11 08:25:32 +01:00
Implement filter for file-type input's accept attribute
This commit is contained in:
parent
881c02ec89
commit
74eb80dbd8
9 changed files with 78 additions and 45 deletions
|
@ -14,11 +14,11 @@ const TEST_PROVIDER: &'static TestProvider = &TestProvider;
|
|||
struct TestProvider;
|
||||
|
||||
impl UIProvider for TestProvider {
|
||||
fn open_file_dialog(&self, _: &str, _: Option<(&[&str], &str)>) -> Option<String> {
|
||||
fn open_file_dialog(&self, _path: &str, _patterns: Vec<FilterPattern>) -> Option<String> {
|
||||
Some("test.txt".to_string())
|
||||
}
|
||||
|
||||
fn open_file_dialog_multi(&self, _: &str, _: Option<(&[&str], &str)>) -> Option<Vec<String>> {
|
||||
fn open_file_dialog_multi(&self, _path: &str, _patterns: Vec<FilterPattern>) -> Option<Vec<String>> {
|
||||
Some(vec!["test.txt".to_string()])
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue