servo: Merge #2829 - Remove the unused window field from ValidityState; r=Manishearth (from Ms2ger:validitystate-window)

Source-Repo: https://github.com/servo/servo
Source-Revision: 879aa9255084440548ca68c1462b1d9eff4fb8f4
This commit is contained in:
Ms2ger 2014-07-14 18:23:00 +02:00
Родитель 95503206ce
Коммит f507c2d27e
1 изменённых файлов: 3 добавлений и 6 удалений

Просмотреть файл

@ -3,29 +3,26 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::Bindings::ValidityStateBinding;
use dom::bindings::js::{JS, JSRef, Temporary};
use dom::bindings::js::{JSRef, Temporary};
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
use dom::window::Window;
use std::cell::Cell;
#[deriving(Encodable)]
pub struct ValidityState {
reflector_: Reflector,
window: Cell<JS<Window>>,
state: u8,
}
impl ValidityState {
pub fn new_inherited(window: &JSRef<Window>) -> ValidityState {
pub fn new_inherited() -> ValidityState {
ValidityState {
reflector_: Reflector::new(),
window: Cell::new(JS::from_rooted(window)),
state: 0,
}
}
pub fn new(window: &JSRef<Window>) -> Temporary<ValidityState> {
reflect_dom_object(box ValidityState::new_inherited(window),
reflect_dom_object(box ValidityState::new_inherited(),
window,
ValidityStateBinding::Wrap)
}