mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #6890 - zmike:hashtag_tooltip, r=metajack
implement display_handler::on_status_message for cef r+? @jdm @larsbergstrom @metajack @pcwalton @anyone with r+ <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6890) <!-- Reviewable:end -->
This commit is contained in:
commit
42a9756df0
1 changed files with 18 additions and 1 deletions
|
@ -316,7 +316,24 @@ impl WindowMethods for Window {
|
|||
browser.downcast().favicons.borrow_mut().push(url.to_string().clone());
|
||||
}
|
||||
|
||||
fn status(&self, _: Option<String>) {
|
||||
fn status(&self, info: Option<String>) {
|
||||
let browser = self.cef_browser.borrow();
|
||||
let browser = match *browser {
|
||||
None => return,
|
||||
Some(ref browser) => browser,
|
||||
};
|
||||
let str = match info {
|
||||
Some(s) => {
|
||||
let utf16_chars: Vec<u16> = Utf16Encoder::new(s.chars()).collect();
|
||||
utf16_chars
|
||||
}
|
||||
None => vec![]
|
||||
};
|
||||
|
||||
if check_ptr_exist!(browser.get_host().get_client(), get_display_handler) &&
|
||||
check_ptr_exist!(browser.get_host().get_client().get_display_handler(), on_status_message) {
|
||||
browser.get_host().get_client().get_display_handler().on_status_message((*browser).clone(), str.as_slice());
|
||||
}
|
||||
}
|
||||
|
||||
fn load_start(&self, back: bool, forward: bool) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue