/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cssparser::RGBA;
use dom::attr::{Attr, AttrValue};
use dom::bindings::codegen::Bindings::HTMLTableCellElementBinding::HTMLTableCellElementMethods;
use dom::bindings::codegen::InheritTypes::{HTMLElementCast, HTMLTableCellElementDerived};
use dom::bindings::js::LayoutJS;
use dom::document::Document;
use dom::element::{AttributeMutation, ElementTypeId};
use dom::eventtarget::{EventTarget, EventTargetTypeId};
use dom::htmlelement::{HTMLElement, HTMLElementTypeId};
use dom::node::NodeTypeId;
use dom::virtualmethods::VirtualMethods;
use std::cell::Cell;
use std::cmp::max;
use string_cache::Atom;
use util::str::{self, DOMString, LengthOrPercentageOrAuto};
const DEFAULT_COLSPAN: u32 = 1;
#[derive(Copy, Clone, Debug)]
pub enum HTMLTableCellElementTypeId {
HTMLTableDataCellElement = 0,
HTMLTableHeaderCellElement = 1,
}
impl PartialEq for HTMLTableCellElementTypeId {
#[inline]
fn eq(&self, other: &HTMLTableCellElementTypeId) -> bool {
(*self as u8) == (*other as u8)
}
}
#[dom_struct]
pub struct HTMLTableCellElement {
htmlelement: HTMLElement,
background_color: Cell