talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 6a7354fb350cf2c09c52b615dfb5ab5368b311d0
parent b35db77b68eba8e68edeb5cb53824123dad7764e
Author: Jonathan Boeing <jonathan@claws-mail.org>
Date:   Sun, 22 Oct 2023 02:23:38 -0700

Replace over_element() with upstream's get_over_element()

Diffstat:
Msrc/plugins/litehtml_viewer/lh_widget.cpp | 8++++----
Msrc/plugins/litehtml_viewer/lh_widget.h | 4++--
Msrc/plugins/litehtml_viewer/litehtml/document.h | 5-----
3 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/src/plugins/litehtml_viewer/lh_widget.cpp b/src/plugins/litehtml_viewer/lh_widget.cpp @@ -306,7 +306,7 @@ void lh_widget::clear() void lh_widget::set_cursor(const char *cursor) { - litehtml::element::ptr over_el = m_html->over_element(); + litehtml::element::const_ptr over_el = m_html->get_over_element(); if (m_showing_url && (over_el == NULL || over_el != m_over_element)) { @@ -348,9 +348,9 @@ void lh_widget::update_cursor(const char *cursor) } } -const char *lh_widget::get_href_at(litehtml::element::ptr element) const +const char *lh_widget::get_href_at(litehtml::element::const_ptr element) { - litehtml::element::ptr el; + litehtml::element::const_ptr el; if (element == NULL) return NULL; @@ -498,7 +498,7 @@ static gboolean button_press_event(GtkWidget *widget, GdkEventButton *event, /* Right-click */ if (event->button == 3) { - const char *url = w->get_href_at(w->m_html->over_element()); + const char *url = w->get_href_at(w->m_html->get_over_element()); if (url != NULL) w->popup_context_menu(url, event); diff --git a/src/plugins/litehtml_viewer/lh_widget.h b/src/plugins/litehtml_viewer/lh_widget.h @@ -59,7 +59,7 @@ class lh_widget : public container_linux void update_font(); void print(); - const char *get_href_at(litehtml::element::ptr element) const; + const char *get_href_at(litehtml::element::const_ptr element); void popup_context_menu(const char *url, GdkEventButton *event); const litehtml::string fullurl(const char *url) const; @@ -79,7 +79,7 @@ class lh_widget : public container_linux GtkWidget *m_viewport; GtkWidget *m_context_menu; gint m_height; - litehtml::element::ptr m_over_element; + litehtml::element::const_ptr m_over_element; gboolean m_showing_url; MimeInfo *m_partinfo; cairo_t *m_cairo_context; diff --git a/src/plugins/litehtml_viewer/litehtml/document.h b/src/plugins/litehtml_viewer/litehtml/document.h @@ -93,7 +93,6 @@ namespace litehtml bool on_mouse_leave(position::vector& redraw_boxes); element::ptr create_element(const char* tag_name, const string_map& attributes); element::ptr root(); - const element::ptr over_element() const; void get_fixed_boxes(position::vector& fixed_boxes); void add_fixed_box(const position& pos); void add_media_list(const media_query_list::ptr& list); @@ -122,10 +121,6 @@ namespace litehtml { return m_root; } - inline const element::ptr document::over_element() const - { - return m_over_element; - } inline void document::add_tabular(const std::shared_ptr<render_item>& el) { m_tabular_elements.push_back(el);