Skip to content

Commit

Permalink
Removed unneeded pub annotations in HTMLInputElement #7897
Browse files Browse the repository at this point in the history
get_size method appeared to be never used so I removed it.
  • Loading branch information
Maciej Skrzypkowski committed Oct 7, 2015
1 parent 409fbaf commit 7a5390d
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions components/script/dom/htmlinputelement.rs
Expand Up @@ -396,27 +396,27 @@ fn in_same_group(other: &HTMLInputElement, owner: Option<&HTMLFormElement>,
}

impl HTMLInputElement {
pub fn force_relayout(&self) {
fn force_relayout(&self) {
let doc = document_from_node(self);
let node = NodeCast::from_ref(self);
doc.r().content_changed(node, NodeDamage::OtherNodeDamage)
}

pub fn radio_group_updated(&self, group: Option<&Atom>) {
fn radio_group_updated(&self, group: Option<&Atom>) {
if self.Checked() {
broadcast_radio_checked(self, group);
}
}

// https://html.spec.whatwg.org/multipage/#radio-button-group
pub fn get_radio_group_name(&self) -> Option<Atom> {
fn get_radio_group_name(&self) -> Option<Atom> {
//TODO: determine form owner
let elem = ElementCast::from_ref(self);
elem.get_attribute(&ns!(""), &atom!("name"))
.map(|name| name.value().as_atom().clone())
}

pub fn update_checked_state(&self, checked: bool, dirty: bool) {
fn update_checked_state(&self, checked: bool, dirty: bool) {
self.checked.set(checked);

if dirty {
Expand All @@ -432,16 +432,12 @@ impl HTMLInputElement {
//TODO: dispatch change event
}

pub fn get_size(&self) -> u32 {
self.size.get()
}

pub fn get_indeterminate_state(&self) -> bool {
self.indeterminate.get()
}

// https://html.spec.whatwg.org/multipage/#concept-fe-mutable
pub fn mutable(&self) -> bool {
fn mutable(&self) -> bool {
// https://html.spec.whatwg.org/multipage/#the-input-element:concept-fe-mutable
// https://html.spec.whatwg.org/multipage/#the-readonly-attribute:concept-fe-mutable
let node = NodeCast::from_ref(self);
Expand Down

0 comments on commit 7a5390d

Please sign in to comment.