[gtkhtml/gtk3] Bug #640533 - Incorrect rendering with inner frames
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkhtml/gtk3] Bug #640533 - Incorrect rendering with inner frames
- Date: Wed, 26 Jan 2011 16:03:11 +0000 (UTC)
commit 1020a142054ab21b7734d80b32d5d4f86bc87a49
Author: Milan Crha <mcrha redhat com>
Date: Wed Jan 26 17:02:18 2011 +0100
Bug #640533 - Incorrect rendering with inner frames
gtkhtml/htmlengine.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/gtkhtml/htmlengine.c b/gtkhtml/htmlengine.c
index 764e002..2b3f8c2 100644
--- a/gtkhtml/htmlengine.c
+++ b/gtkhtml/htmlengine.c
@@ -5135,10 +5135,30 @@ html_engine_draw_cb (HTMLEngine *e, cairo_t *cr)
bin_window = gtk_layout_get_bin_window (GTK_LAYOUT (e->widget));
if (bin_window) {
+ HTMLEngine *parent_engine;
+
gdk_window_get_position (bin_window, &e->x_offset, &e->y_offset);
e->x_offset = ABS (e->x_offset);
e->y_offset = ABS (e->y_offset);
+
+ /* also update parent frames, if any */
+ parent_engine = e;
+ while (parent_engine->widget->iframe_parent) {
+ GtkHTML *parent = GTK_HTML (parent_engine->widget->iframe_parent);
+
+ if (!parent)
+ break;
+
+ parent_engine = parent->engine;
+ bin_window = gtk_layout_get_bin_window (GTK_LAYOUT (parent_engine->widget));
+ if (!bin_window)
+ break;
+
+ gdk_window_get_position (bin_window, &parent_engine->x_offset, &parent_engine->y_offset);
+ parent_engine->x_offset = ABS (parent_engine->x_offset);
+ parent_engine->y_offset = ABS (parent_engine->y_offset);
+ }
}
if (html_engine_frozen (e))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]