diff --git a/components/editor/gtkhtml-color-combo.c b/components/editor/gtkhtml-color-combo.c
index 18cc6ac..5aba7f1 100644
--- a/components/editor/gtkhtml-color-combo.c
+++ b/components/editor/gtkhtml-color-combo.c
@@ -603,17 +603,6 @@ color_combo_dispose (GObject *object)
 }
 
 static void
-color_combo_size_request (GtkWidget *widget,
-                          GtkRequisition *requisition)
-{
-	GtkhtmlColorComboPrivate *priv;
-
-	priv = GTKHTML_COLOR_COMBO_GET_PRIVATE (widget);
-
-	gtk_widget_get_preferred_size (priv->toggle_button, requisition, NULL);
-}
-
-static void
 color_combo_size_allocate (GtkWidget *widget,
                            GtkAllocation *allocation)
 {
@@ -711,7 +700,6 @@ color_combo_class_init (GtkhtmlColorComboClass *class)
 	object_class->dispose = color_combo_dispose;
 
 	widget_class = GTK_WIDGET_CLASS (class);
-	widget_class->size_request = color_combo_size_request;
 	widget_class->size_allocate = color_combo_size_allocate;
 
 	class->popup = color_combo_popup;
diff --git a/components/editor/gtkhtml-color-swatch.c b/components/editor/gtkhtml-color-swatch.c
index 523e229..ff66764 100644
--- a/components/editor/gtkhtml-color-swatch.c
+++ b/components/editor/gtkhtml-color-swatch.c
@@ -137,17 +137,6 @@ color_swatch_dispose (GObject *object)
 }
 
 static void
-color_swatch_size_request (GtkWidget *widget,
-                           GtkRequisition *requisition)
-{
-	GtkhtmlColorSwatchPrivate *priv;
-
-	priv = GTKHTML_COLOR_SWATCH_GET_PRIVATE (widget);
-
-	gtk_widget_get_preferred_size (priv->frame, requisition, NULL);
-}
-
-static void
 color_swatch_size_allocate (GtkWidget *widget,
                             GtkAllocation *allocation)
 {
@@ -174,7 +163,6 @@ color_swatch_class_init (GtkhtmlColorSwatchClass *class)
 	object_class->dispose = color_swatch_dispose;
 
 	widget_class = GTK_WIDGET_CLASS (class);
-	widget_class->size_request = color_swatch_size_request;
 	widget_class->size_allocate = color_swatch_size_allocate;
 
 	g_object_class_install_property (
diff --git a/gtkhtml/gtkhtml-embedded.c b/gtkhtml/gtkhtml-embedded.c
index 31719e0..078d6d2 100644
--- a/gtkhtml/gtkhtml-embedded.c
+++ b/gtkhtml/gtkhtml-embedded.c
@@ -32,7 +32,8 @@
 static void gtk_html_embedded_class_init (GtkHTMLEmbeddedClass *class);
 static void gtk_html_embedded_init       (GtkHTMLEmbedded *gspaper);
 
-static void gtk_html_embedded_size_request (GtkWidget *widget, GtkRequisition *requisition);
+static void gtk_html_embedded_get_preferred_width (GtkWidget *widget, gint *minimum, gint *natural);
+static void gtk_html_embedded_get_preferred_height (GtkWidget *widget, gint *minimum, gint *natural);
 static void gtk_html_embedded_size_allocate (GtkWidget *widget, GtkAllocation *allocation);
 
 /* saved parent calls */
@@ -201,7 +202,8 @@ gtk_html_embedded_class_init (GtkHTMLEmbeddedClass *class)
 
 	object_class->finalize = gtk_html_embedded_finalize;
 
-	widget_class->size_request = gtk_html_embedded_size_request;
+        widget_class->get_preferred_width = gtk_html_embedded_get_preferred_width;
+        widget_class->get_preferred_height = gtk_html_embedded_get_preferred_height;
 	widget_class->size_allocate = gtk_html_embedded_size_allocate;
 
 	old_add = container_class->add;
@@ -211,23 +213,40 @@ gtk_html_embedded_class_init (GtkHTMLEmbeddedClass *class)
 }
 
 static void
-gtk_html_embedded_size_request (GtkWidget *widget, GtkRequisition *requisition)
+gtk_html_embedded_get_preferred_width (GtkWidget *widget, gint *minimum, gint *natural)
 {
 	GtkWidget *child;
 
 	g_return_if_fail (widget != NULL);
-	g_return_if_fail (requisition != NULL);
 
 	child = gtk_bin_get_child (GTK_BIN (widget));
 
 	if (child) {
-		gtk_widget_get_preferred_size (child, requisition, NULL);
+		gtk_widget_get_preferred_width (child, minimum, natural);
 	} else {
 		GtkRequisition self_requisition;
 
 		gtk_widget_get_requisition (widget, &self_requisition);
-		requisition->width = self_requisition.width;
-		requisition->height = self_requisition.height;
+                *minimum = *natural = self_requisition.width;
+	}
+}
+
+static void
+gtk_html_embedded_get_preferred_height (GtkWidget *widget, gint *minimum, gint *natural)
+{
+	GtkWidget *child;
+
+	g_return_if_fail (widget != NULL);
+
+	child = gtk_bin_get_child (GTK_BIN (widget));
+
+	if (child) {
+		gtk_widget_get_preferred_height (child, minimum, natural);
+	} else {
+		GtkRequisition self_requisition;
+
+		gtk_widget_get_requisition (widget, &self_requisition);
+                *minimum = *natural = self_requisition.height;
 	}
 }
 
diff --git a/gtkhtml/gtkhtml.c b/gtkhtml/gtkhtml.c
index 0ce2d42..011f779 100644
--- a/gtkhtml/gtkhtml.c
+++ b/gtkhtml/gtkhtml.c
@@ -426,8 +426,8 @@ gtk_html_adjust_cursor_position (GtkHTML *html)
 	    !html_engine_frozen (html->engine))
 		html_engine_make_cursor_visible (e);
 
-	hadjustment = gtk_layout_get_hadjustment (GTK_LAYOUT (html));
-	vadjustment = gtk_layout_get_vadjustment (GTK_LAYOUT (html));
+	hadjustment = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (html));
+	vadjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (html));
 
 	gtk_adjustment_set_value (hadjustment, (gfloat) e->x_offset);
 	gtk_adjustment_set_value (vadjustment, (gfloat) e->y_offset);
@@ -616,33 +616,43 @@ horizontal_scroll_cb (GtkAdjustment *adjustment, gpointer data)
 }
 
 static void
-connect_adjustments (GtkHTML *html,
-		     GtkAdjustment *hadj,
-		     GtkAdjustment *vadj)
+connect_adjustment (GtkHTML *html,
+                    GtkOrientation orientation,
+                    GtkAdjustment *adj)
 {
-	GtkAdjustment *hadjustment;
-	GtkAdjustment *vadjustment;
-
-	hadjustment = gtk_layout_get_hadjustment (GTK_LAYOUT (html));
-	vadjustment = gtk_layout_get_vadjustment (GTK_LAYOUT (html));
-
-	if (html->hadj_connection != 0)
-		g_signal_handler_disconnect (hadjustment, html->hadj_connection);
+	GtkAdjustment *adjustment;
 
-	if (html->vadj_connection != 0)
-		g_signal_handler_disconnect (vadjustment, html->vadj_connection);
+        if (orientation == GTK_ORIENTATION_HORIZONTAL) {
+                adjustment = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (html));
+                if (html->hadj_connection != 0)
+                        g_signal_handler_disconnect (adjustment, html->hadj_connection);
 
-	if (vadj != NULL)
-		html->vadj_connection =
-			g_signal_connect (vadj, "value_changed", G_CALLBACK (vertical_scroll_cb), (gpointer) html);
-	else
-		html->vadj_connection = 0;
+                if (adj != NULL)
+                        html->hadj_connection =
+                                g_signal_connect (adj, "value_changed", G_CALLBACK (horizontal_scroll_cb), (gpointer) html);
+                else
+                        html->hadj_connection = 0;
+        }
+        else {
+                adjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (html));
+                if (html->vadj_connection != 0)
+                        g_signal_handler_disconnect (adjustment, html->vadj_connection);
+
+                if (adj != NULL)
+                        html->vadj_connection =
+                                g_signal_connect (adj, "value_changed", G_CALLBACK (vertical_scroll_cb), (gpointer) html);
+                else
+                        html->vadj_connection = 0;
+        }
+}
 
-	if (hadj != NULL)
-		html->hadj_connection =
-			g_signal_connect (hadj, "value_changed", G_CALLBACK (horizontal_scroll_cb), (gpointer) html);
-	else
-		html->hadj_connection = 0;
+static void
+notify (GObject *object, GParamSpec *pspec)
+{
+        if (strcmp (pspec->name, "hadjustment") == 0)
+                connect_adjustment (GTK_HTML (object), GTK_ORIENTATION_HORIZONTAL, gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (object)));
+        else if (strcmp (pspec->name, "vadjustment") == 0)
+                connect_adjustment (GTK_HTML (object), GTK_ORIENTATION_VERTICAL, gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (object)));
 }
 
 
@@ -721,8 +731,8 @@ scroll_timeout_cb (gpointer data)
 		html_engine_select_region (engine, html->selection_x1, html->selection_y1,
 					   x + engine->x_offset, y + engine->y_offset);
 
-	hadjustment = gtk_layout_get_hadjustment (GTK_LAYOUT (widget));
-	vadjustment = gtk_layout_get_vadjustment (GTK_LAYOUT (widget));
+	hadjustment = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (widget));
+	vadjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (widget));
 
 	inc_adjustment (hadjustment, html_engine_get_doc_width (html->engine),
 			allocation.width, x_scroll);
@@ -781,7 +791,8 @@ dispose (GObject *object)
 		html->ibeam_cursor = NULL;
 	}
 
-	connect_adjustments (html, NULL, NULL);
+	connect_adjustment (html, GTK_ORIENTATION_HORIZONTAL, NULL);
+	connect_adjustment (html, GTK_ORIENTATION_VERTICAL, NULL);
 
 	if (html->priv) {
 		if (html->priv->idle_handler_id != 0) {
@@ -1165,8 +1176,8 @@ realize (GtkWidget *widget)
 	g_return_if_fail (GTK_IS_HTML (widget));
 
 	html = GTK_HTML (widget);
-	hadjustment = gtk_layout_get_hadjustment (GTK_LAYOUT (widget));
-	vadjustment = gtk_layout_get_vadjustment (GTK_LAYOUT (widget));
+	hadjustment = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (widget));
+	vadjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (widget));
 
 	if (GTK_WIDGET_CLASS (parent_class)->realize)
 		(* GTK_WIDGET_CLASS (parent_class)->realize) (widget);
@@ -1201,12 +1212,12 @@ realize (GtkWidget *widget)
 	 */
 	if (hadjustment == NULL) {
 		hadjustment = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
-		gtk_layout_set_hadjustment (GTK_LAYOUT (widget), hadjustment);
+		gtk_scrollable_set_hadjustment (GTK_SCROLLABLE (widget), hadjustment);
 	}
 
 	if (vadjustment == NULL) {
 		vadjustment = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
-		gtk_layout_set_vadjustment (GTK_LAYOUT (widget), vadjustment);
+		gtk_scrollable_set_vadjustment (GTK_SCROLLABLE (widget), vadjustment);
 	}
 
 	gtk_html_drag_dest_set (html);
@@ -1285,6 +1296,30 @@ gtk_html_size_request (GtkWidget *widget, GtkRequisition *requisition)
 }
 
 static void
+get_preferred_width (GtkWidget *widget,
+                     gint      *minimum,
+                     gint      *natural)
+{
+        GtkRequisition requisition;
+
+        gtk_html_size_request (widget, &requisition);
+
+        *minimum = *natural = requisition.width;
+}
+
+static void
+get_preferred_height (GtkWidget *widget,
+                      gint      *minimum,
+                      gint      *natural)
+{
+        GtkRequisition requisition;
+
+        gtk_html_size_request (widget, &requisition);
+
+        *minimum = *natural = requisition.height;
+}
+
+static void
 child_size_allocate (HTMLObject *o, HTMLEngine *e, gpointer data)
 {
 	if (html_object_is_embedded (o)) {
@@ -1353,7 +1388,7 @@ gtk_layout_faux_size_allocate (GtkWidget *widget,
 	 *     Not sure, so best refetch the size just to be safe. */
 	gtk_layout_get_size (layout, &width, &height);
 
-	adjustment = gtk_layout_get_hadjustment (layout);
+	adjustment = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (layout));
 	g_object_freeze_notify (G_OBJECT (adjustment));
 	gtk_adjustment_set_page_size (adjustment, allocation->width);
 	gtk_adjustment_set_page_increment (adjustment, allocation->width * 0.9);
@@ -1361,7 +1396,7 @@ gtk_layout_faux_size_allocate (GtkWidget *widget,
 	set_adjustment_upper (adjustment, MAX (allocation->width, width));
 	g_object_thaw_notify (G_OBJECT (adjustment));
 
-	adjustment = gtk_layout_get_vadjustment (layout);
+	adjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (layout));
 	g_object_freeze_notify (G_OBJECT (adjustment));
 	gtk_adjustment_set_page_size (adjustment, allocation->height);
 	gtk_adjustment_set_page_increment (adjustment, allocation->height * 0.9);
@@ -1412,11 +1447,11 @@ size_allocate (GtkWidget *widget, GtkAllocation *allocation)
 		gtk_html_private_calc_scrollbars (html, &changed_x, &changed_y);
 
 		if (changed_x) {
-			adjustment = gtk_layout_get_hadjustment (layout);
+			adjustment = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (layout));
 			gtk_adjustment_value_changed (adjustment);
 		}
 		if (changed_y) {
-			adjustment = gtk_layout_get_vadjustment (layout);
+			adjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (layout));
 			gtk_adjustment_value_changed (adjustment);
 		}
 	}
@@ -1954,7 +1989,7 @@ button_press_event (GtkWidget *widget,
 		gdouble page_size;
 		gdouble step_increment;
 
-		adjustment = gtk_layout_get_vadjustment (GTK_LAYOUT (widget));
+		adjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (widget));
 		adj_value = gtk_adjustment_get_value (adjustment);
 		lower = gtk_adjustment_get_lower (adjustment);
 		upper = gtk_adjustment_get_upper (adjustment);
@@ -2220,7 +2255,7 @@ goto_caret_anchor (GtkHTML *html)
 		html_engine_jump_at (html->engine, x, y);
 
 		layout = GTK_LAYOUT (html->engine->widget);
-		adjustment = gtk_layout_get_vadjustment (layout);
+		adjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (layout));
 		page_size = gtk_adjustment_get_page_size (adjustment);
 		value = gtk_adjustment_get_value (adjustment);
 
@@ -2444,19 +2479,6 @@ utf8_filter_out_bom (gchar *str) {
 	return str;
 }
 
-static void
-set_adjustments (GtkLayout     *layout,
-		 GtkAdjustment *hadj,
-		 GtkAdjustment *vadj)
-{
-	GtkHTML *html = GTK_HTML (layout);
-
-	connect_adjustments (html, hadj, vadj);
-
-	if (parent_class->set_scroll_adjustments)
-		(* parent_class->set_scroll_adjustments) (layout, hadj, vadj);
-}
-
 
 /* Initialization.  */
 static void
@@ -2547,13 +2569,13 @@ focus (GtkWidget *w, GtkDirectionType direction)
 		if (e->x_offset != xo) {
 			GtkAdjustment *adjustment;
 
-			adjustment = gtk_layout_get_hadjustment (GTK_LAYOUT (w));
+			adjustment = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (w));
 			gtk_adjustment_set_value (adjustment, (gfloat) e->x_offset);
 		}
 		if (e->y_offset != yo) {
 			GtkAdjustment *adjustment;
 
-			adjustment = gtk_layout_get_vadjustment (GTK_LAYOUT (w));
+			adjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (w));
 			gtk_adjustment_set_value (adjustment, (gfloat) e->y_offset);
 		}
 		/* printf ("engine pos: %d,%d x %d,%d\n",
@@ -3209,6 +3231,7 @@ gtk_html_class_init (GtkHTMLClass *klass)
 								     GDK_TYPE_COLOR,
 								     G_PARAM_READABLE));
 
+        object_class->notify = notify;
 	widget_class->realize = realize;
 	widget_class->unrealize = unrealize;
 	widget_class->style_set = style_set;
@@ -3219,7 +3242,8 @@ gtk_html_class_init (GtkHTMLClass *klass)
 #else
 	widget_class->expose_event = expose;
 #endif
-	widget_class->size_request = gtk_html_size_request;
+	widget_class->get_preferred_width = get_preferred_width;
+	widget_class->get_preferred_height = get_preferred_height;
 	widget_class->size_allocate = size_allocate;
 	widget_class->motion_notify_event = motion_notify_event;
 	widget_class->visibility_notify_event = visibility_notify_event;
@@ -3240,8 +3264,6 @@ gtk_html_class_init (GtkHTMLClass *klass)
 
 	container_class->set_focus_child = set_focus_child;
 
-	layout_class->set_scroll_adjustments = set_adjustments;
-
 	html_class->scroll            = scroll;
 	html_class->cursor_move       = cursor_move;
 	html_class->command           = command;
@@ -3936,8 +3958,8 @@ gtk_html_update_scrollbars_on_resize (GtkHTML *html,
 
 	/* printf ("update on resize\n"); */
 
-	hadj = gtk_layout_get_hadjustment (GTK_LAYOUT (html));
-	vadj = gtk_layout_get_vadjustment (GTK_LAYOUT (html));
+	hadj = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (html));
+	vadj = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (html));
 
 	doc_height = html_engine_get_doc_height (html->engine);
 	doc_width  = html_engine_get_doc_width (html->engine);
@@ -3982,8 +4004,8 @@ gtk_html_private_calc_scrollbars (GtkHTML *html, gboolean *changed_x, gboolean *
 	width = html_engine_get_doc_width (html->engine);
 
 	layout = GTK_LAYOUT (html);
-	hadj = gtk_layout_get_hadjustment (layout);
-	vadj = gtk_layout_get_vadjustment (layout);
+	hadj = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (layout));
+	vadj = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (layout));
 
 	gtk_adjustment_set_page_size (vadj, html->engine->height);
 	gtk_adjustment_set_step_increment (vadj, 14);  /* FIXME */
@@ -4794,8 +4816,8 @@ scroll (GtkHTML *html,
 		return;
 
 	adjustment = (orientation == GTK_ORIENTATION_VERTICAL) ?
-		gtk_layout_get_vadjustment (GTK_LAYOUT (html)) :
-		gtk_layout_get_hadjustment (GTK_LAYOUT (html));
+		gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (html)) :
+		gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (html));
 
 	value = gtk_adjustment_get_value (adjustment);
 	lower = gtk_adjustment_get_lower (adjustment);
@@ -4863,7 +4885,7 @@ scroll_command (GtkHTML *html,
 	if (html_engine_get_editable (html->engine))
 		return FALSE;
 
-	adjustment = gtk_layout_get_vadjustment (GTK_LAYOUT (html));
+	adjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (html));
 	value = gtk_adjustment_get_value (adjustment);
 	lower = gtk_adjustment_get_lower (adjustment);
 	upper = gtk_adjustment_get_upper (adjustment);
@@ -4912,7 +4934,7 @@ scroll_by_amount (GtkHTML *html, gint amount)
 	gdouble upper;
 	gdouble page_size;
 
-	adjustment = gtk_layout_get_vadjustment (GTK_LAYOUT (html));
+	adjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (html));
 	value = gtk_adjustment_get_value (adjustment);
 	lower = gtk_adjustment_get_lower (adjustment);
 	upper = gtk_adjustment_get_upper (adjustment);
@@ -5198,14 +5220,14 @@ command (GtkHTML *html, GtkHTMLCommandType com_type)
 		break;
 	case GTK_HTML_COMMAND_SCROLL_BOD:
 		if (!html_engine_get_editable (e) && !e->caret_mode)
-			gtk_adjustment_set_value (gtk_layout_get_vadjustment (GTK_LAYOUT (html)), 0);
+			gtk_adjustment_set_value (gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (html)), 0);
 		break;
 	case GTK_HTML_COMMAND_SCROLL_EOD:
 		if (!html_engine_get_editable (e) && !e->caret_mode) {
 			GtkAdjustment *adjustment;
 			gdouble upper, page_size;
 
-			adjustment = gtk_layout_get_vadjustment (GTK_LAYOUT (html));
+			adjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (html));
 			upper = gtk_adjustment_get_upper (adjustment);
 			page_size = gtk_adjustment_get_page_size (adjustment);
 			gtk_adjustment_set_value (adjustment, upper - page_size);
@@ -6125,8 +6147,8 @@ gtk_html_edit_make_cursor_visible (GtkHTML *html)
 
 	g_return_val_if_fail (GTK_IS_HTML (html), rv);
 
-	hadjustment = gtk_layout_get_hadjustment (GTK_LAYOUT (html));
-	vadjustment = gtk_layout_get_vadjustment (GTK_LAYOUT (html));
+	hadjustment = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (html));
+	vadjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (html));
 
 	html_engine_hide_cursor (html->engine);
 	if (html_engine_make_cursor_visible (html->engine)) {
diff --git a/gtkhtml/htmlengine-edit-cursor.c b/gtkhtml/htmlengine-edit-cursor.c
index 1ddfa1c..d61c1d5 100644
--- a/gtkhtml/htmlengine-edit-cursor.c
+++ b/gtkhtml/htmlengine-edit-cursor.c
@@ -327,8 +327,8 @@ html_engine_draw_cursor_in_area (HTMLEngine *engine,
         }
 
 	/* get scroll offset */
-	hadj = gtk_layout_get_hadjustment (GTK_LAYOUT (engine->widget));
-	vadj = gtk_layout_get_vadjustment (GTK_LAYOUT (engine->widget));
+	hadj = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (engine->widget));
+	vadj = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (engine->widget));
 	sc_x = (gint) gtk_adjustment_get_value (hadj);
 	sc_y = (gint) gtk_adjustment_get_value (vadj);
 
diff --git a/gtkhtml/htmlengine-search.c b/gtkhtml/htmlengine-search.c
index ed9421b..aec589c 100644
--- a/gtkhtml/htmlengine-search.c
+++ b/gtkhtml/htmlengine-search.c
@@ -116,11 +116,11 @@ move_to_found (HTMLSearch *info)
 	/* finally adjust them if they changed */
 	layout = GTK_LAYOUT (ep->widget);
 	if (ep->x_offset != nx) {
-		adjustment = gtk_layout_get_hadjustment (layout);
+		adjustment = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (layout));
 		gtk_adjustment_set_value (adjustment, nx);
 	}
 	if (ep->y_offset != ny) {
-		adjustment = gtk_layout_get_vadjustment (layout);
+		adjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (layout));
 		gtk_adjustment_set_value (adjustment, ny);
 	}
 }
diff --git a/gtkhtml/htmlengine.c b/gtkhtml/htmlengine.c
index 7f15555..685261d 100644
--- a/gtkhtml/htmlengine.c
+++ b/gtkhtml/htmlengine.c
@@ -4790,7 +4790,6 @@ update_embedded (GtkWidget *widget, gpointer data)
 static gboolean
 html_engine_update_event (HTMLEngine *e)
 {
-	GtkLayout *layout;
 	GtkAdjustment *hadjustment;
 	GtkAdjustment *vadjustment;
 
@@ -4798,9 +4797,8 @@ html_engine_update_event (HTMLEngine *e)
 
 	g_return_val_if_fail (HTML_IS_ENGINE (e), FALSE);
 
-	layout = GTK_LAYOUT (e->widget);
-	hadjustment = gtk_layout_get_hadjustment (layout);
-	vadjustment = gtk_layout_get_vadjustment (layout);
+	hadjustment = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (e->widget));
+	vadjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (e->widget));
 
 	e->updateTimer = 0;
 
@@ -4877,7 +4875,6 @@ html_engine_goto_anchor (HTMLEngine *e,
 			 const gchar *anchor)
 {
 	GtkAdjustment *vadjustment;
-	GtkLayout *layout;
 	HTMLAnchor *a;
 	gint x, y;
 	gdouble upper;
@@ -4896,8 +4893,7 @@ html_engine_goto_anchor (HTMLEngine *e,
 		return FALSE;
 	}
 
-	layout = GTK_LAYOUT (e->widget);
-	vadjustment = gtk_layout_get_vadjustment (layout);
+	vadjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (e->widget));
 	page_size = gtk_adjustment_get_page_size (vadjustment);
 	upper = gtk_adjustment_get_upper (vadjustment);
 
@@ -6995,15 +6991,13 @@ html_engine_opened_streams_set (HTMLEngine *e, gint value)
 	if (value == 0 && e->keep_scroll) {
 		GtkAdjustment *hadjustment;
 		GtkAdjustment *vadjustment;
-		GtkLayout *layout;
 
 		e->keep_scroll = FALSE;
 		/*html_engine_calc_size (e, FALSE);
 		  gtk_html_private_calc_scrollbars (e->widget, NULL, NULL);*/
 
-		layout = GTK_LAYOUT (e->widget);
-		hadjustment = gtk_layout_get_hadjustment (layout);
-		vadjustment = gtk_layout_get_vadjustment (layout);
+		hadjustment = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (e->widget));
+		vadjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (e->widget));
 
 		gtk_adjustment_set_value (hadjustment, e->x_offset);
 		gtk_adjustment_set_value (vadjustment, e->y_offset);
