mirror of
https://github.com/servo/servo.git
synced 2025-06-24 00:54:32 +01:00
Don't use the Untraceable fields outside the module they're defined in.
This pattern will become illegal with the next Rust upgrade.
This commit is contained in:
parent
af616dba58
commit
a15cac53bc
8 changed files with 23 additions and 9 deletions
|
@ -24,7 +24,7 @@ use extra::serialize::{Encoder, Encodable};
|
|||
#[deriving(Encodable)]
|
||||
pub struct HTMLImageElement {
|
||||
htmlelement: HTMLElement,
|
||||
extra: Untraceable,
|
||||
priv extra: Untraceable,
|
||||
}
|
||||
|
||||
struct Untraceable {
|
||||
|
@ -62,6 +62,10 @@ impl HTMLImageElement {
|
|||
}
|
||||
|
||||
impl HTMLImageElement {
|
||||
pub fn image<'a>(&'a self) -> &'a Option<Url> {
|
||||
&self.extra.image
|
||||
}
|
||||
|
||||
/// Makes the local `image` member match the status of the `src` attribute and starts
|
||||
/// prefetching the image. This method must be called after `src` is changed.
|
||||
fn update_image(&mut self, value: Option<DOMString>, url: Option<Url>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue