mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Replace unsafe_blocks by unsafe_code.
This commit is contained in:
parent
4eb26065ac
commit
3479d3fa7f
53 changed files with 151 additions and 57 deletions
|
@ -52,16 +52,20 @@ impl HTMLTextAreaElementDerived for EventTarget {
|
|||
}
|
||||
|
||||
pub trait LayoutHTMLTextAreaElementHelpers {
|
||||
#[allow(unsafe_code)]
|
||||
unsafe fn get_value_for_layout(self) -> String;
|
||||
}
|
||||
|
||||
pub trait RawLayoutHTMLTextAreaElementHelpers {
|
||||
#[allow(unsafe_code)]
|
||||
unsafe fn get_cols_for_layout(&self) -> u32;
|
||||
#[allow(unsafe_code)]
|
||||
unsafe fn get_rows_for_layout(&self) -> u32;
|
||||
}
|
||||
|
||||
impl LayoutHTMLTextAreaElementHelpers for LayoutJS<HTMLTextAreaElement> {
|
||||
#[allow(unrooted_must_root)]
|
||||
#[allow(unsafe_code)]
|
||||
unsafe fn get_value_for_layout(self) -> String {
|
||||
(*self.unsafe_get()).textinput.borrow_for_layout().get_content()
|
||||
}
|
||||
|
@ -69,11 +73,13 @@ impl LayoutHTMLTextAreaElementHelpers for LayoutJS<HTMLTextAreaElement> {
|
|||
|
||||
impl RawLayoutHTMLTextAreaElementHelpers for HTMLTextAreaElement {
|
||||
#[allow(unrooted_must_root)]
|
||||
#[allow(unsafe_code)]
|
||||
unsafe fn get_cols_for_layout(&self) -> u32 {
|
||||
self.cols.get()
|
||||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
#[allow(unsafe_code)]
|
||||
unsafe fn get_rows_for_layout(&self) -> u32 {
|
||||
self.rows.get()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue