mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Implement basic media resource selection and fetching.
This commit is contained in:
parent
5918954edd
commit
eae27adc4a
107 changed files with 1722 additions and 9 deletions
|
@ -21,6 +21,7 @@ pub enum LoadType {
|
|||
Subframe(Url),
|
||||
Stylesheet(Url),
|
||||
PageSource(Url),
|
||||
Media(Url),
|
||||
}
|
||||
|
||||
impl LoadType {
|
||||
|
@ -30,6 +31,7 @@ impl LoadType {
|
|||
LoadType::Script(ref url) |
|
||||
LoadType::Subframe(ref url) |
|
||||
LoadType::Stylesheet(ref url) |
|
||||
LoadType::Media(ref url) |
|
||||
LoadType::PageSource(ref url) => url,
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +41,8 @@ impl LoadType {
|
|||
LoadType::Image(_) => LoadContext::Image,
|
||||
LoadType::Script(_) => LoadContext::Script,
|
||||
LoadType::Subframe(_) | LoadType::PageSource(_) => LoadContext::Browsing,
|
||||
LoadType::Stylesheet(_) => LoadContext::Style
|
||||
LoadType::Stylesheet(_) => LoadContext::Style,
|
||||
LoadType::Media(_) => LoadContext::AudioVideo,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue