+
#define HTML_IMAGE_FACTORY(x) ((HTMLImageFactory *)(x))
#define HTML_IMAGE_POINTER(x) ((HTMLImagePointer *)(x))
#define HTML_IS_IMAGE(x) (HTML_CHECK_TYPE ((x), HTML_TYPE_IMAGE))
@@ -42,6 +47,12 @@
gint stall;
guint stall_timeout;
guint animation_timeout;
+
+ ExifLoader *exif_loader;
+ ExifData *exif_data;
+
+ size_t offset;
+ cmsHPROFILE profile;
};
#define HTML_IMAGE(x) ((HTMLImage *)(x))
Index: gtkhtml-3.10.0/src/tests/test1.html
===================================================================
--- gtkhtml-3.10.0/src/tests/test1.html (revision 8482)
+++ gtkhtml-3.10.0/src/tests/test1.html (working copy)
@@ -1,5 +1,6 @@
+
Some pre text to test stuff out
Line Feeds should be working.
Index: gtkhtml-3.10.0/src/tests/test.jpg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/jpeg
Index: gtkhtml-3.10.0/src/htmlengine.c
===================================================================
--- gtkhtml-3.10.0/src/htmlengine.c (revision 8482)
+++ gtkhtml-3.10.0/src/htmlengine.c (working copy)
@@ -4315,10 +4315,11 @@
pixbuf = gdk_pixbuf_animation_get_static_image (bgpixmap->animation);
}
+ /* fixme: pass exif data for background pixmap */
html_painter_draw_background (e->painter,
&html_colorset_get_color_allocated (e->settings->color_set,
e->painter, HTMLBgColor)->color,
- pixbuf, x, y, w, h, x, y);
+ pixbuf, NULL, x, y, w, h, x, y);
}
void
Index: gtkhtml-3.10.0/src/htmltable.c
===================================================================
--- gtkhtml-3.10.0/src/htmltable.c (revision 8482)
+++ gtkhtml-3.10.0/src/htmltable.c (working copy)
@@ -1182,11 +1182,15 @@
gint tx, gint ty)
{
GdkPixbuf *pixbuf = NULL;
+ HTMLImagePointer *ip = NULL;
GdkColor *color = table->bgColor;
HTMLObject *o = HTML_OBJECT (table);
- if (table->bgPixmap && table->bgPixmap->animation)
- pixbuf = gdk_pixbuf_animation_get_static_image (table->bgPixmap->animation);
+ if (table->bgPixmap) {
+ if (table->bgPixmap->animation)
+ pixbuf = gdk_pixbuf_animation_get_static_image (table->bgPixmap->animation);
+ ip = table->bgPixmap;
+ }
if (color)
html_painter_alloc_color (p, color);
@@ -1195,6 +1199,7 @@
html_painter_draw_background (p,
color,
pixbuf,
+ ip,
tx + paint->x,
ty + paint->y,
paint->width,
Index: gtkhtml-3.10.0/src/htmltablecell.c
===================================================================
--- gtkhtml-3.10.0/src/htmltablecell.c (revision 8482)
+++ gtkhtml-3.10.0/src/htmltablecell.c (working copy)
@@ -51,6 +51,7 @@
HTMLObject *o;
HTMLClueV *cluev;
GdkPixbuf *pixbuf = NULL;
+ ExifData *exif= NULL;
GdkColor *color = NULL;
int pixel_size = html_painter_get_pixel_size (p);
@@ -69,11 +70,13 @@
if (cell->bgPixmap->animation) {
pixbuf = gdk_pixbuf_animation_get_static_image (cell->bgPixmap->animation);
}
+ exif = cell->bgPixmap->exif_data;
}
if (!HTML_IS_PLAIN_PAINTER (p))
html_painter_draw_background (p,
color,
pixbuf,
+ exif,
tx + paint->x + pixel_size*cluev->border_width,
ty + paint->y + pixel_size*cluev->border_width,
paint->width - 2*pixel_size*cluev->border_width,
Index: gtkhtml-3.10.0/src/Makefile.am
===================================================================
--- gtkhtml-3.10.0/src/Makefile.am (revision 8482)
+++ gtkhtml-3.10.0/src/Makefile.am (working copy)
@@ -207,7 +207,7 @@
$(NULL)
libgtkhtml_3_8_la_LDFLAGS = -version-info $(GTKHTML_CURRENT):$(GTKHTML_REVISION):$(GTKHTML_AGE) -no-undefined
-libgtkhtml_3_8_la_LIBADD = $(GTKHTML_LIBS) ../a11y/libgtkhtml-a11y.la $(GAIL_LIBS) $(REGEX_LIBS)
+libgtkhtml_3_8_la_LIBADD = $(GTKHTML_LIBS) ../a11y/libgtkhtml-a11y.la $(GAIL_LIBS) $(REGEX_LIBS) -llcms -lexif
dist-hook:
mkdir $(distdir)/tests
@@ -226,13 +226,13 @@
#testgtkhtml_LDFLAGS = -static
testgtkhtml_LDADD = \
libgtkhtml-@GTKHTML_API_VERSION@.la \
- $(SOUP_LIBS)
+ $(SOUP_LIBS) -llcms -lexif
gtest_SOURCES = \
test.c
gtest_LDFLAGS =
gtest_LDADD = \
- libgtkhtml-@GTKHTML_API_VERSION@.la
+ libgtkhtml-@GTKHTML_API_VERSION@.la -llcms
%-@GTKHTML_API_VERSION@.pc: %.pc
cp $< $@
@@ -241,13 +241,13 @@
test-suite.c
test_suite_LDFLAGS =
test_suite_LDADD = \
- libgtkhtml-@GTKHTML_API_VERSION@.la
+ libgtkhtml-@GTKHTML_API_VERSION@.la -llcms
test_stress_SOURCES = \
test-stress.c
test_stress_LDFLAGS =
test_stress_LDADD = \
- libgtkhtml-@GTKHTML_API_VERSION@.la
+ libgtkhtml-@GTKHTML_API_VERSION@.la -llcms
pkgconfig_in_files = libgtkhtml.pc.in
pkgconfigdir = $(libdir)/pkgconfig
Index: gtkhtml-3.10.0/src/htmlplainpainter.c
===================================================================
--- gtkhtml-3.10.0/src/htmlplainpainter.c (revision 8482)
+++ gtkhtml-3.10.0/src/htmlplainpainter.c (working copy)
@@ -17,7 +17,7 @@
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-*/
+l*/
#include
#include
@@ -48,6 +48,7 @@
draw_background (HTMLPainter *painter,
GdkColor *color,
GdkPixbuf *pixbuf,
+ HTMLImagePointer *ip,
gint x, gint y,
gint width, gint height,
gint tile_x, gint tile_y)
@@ -87,6 +88,7 @@
static void
draw_pixmap (HTMLPainter *painter,
GdkPixbuf *pixbuf,
+ HTMLImagePointer *ip,
gint x, gint y,
gint scale_width, gint scale_height,
const GdkColor *color)
Index: gtkhtml-3.10.0/src/htmlcluev.c
===================================================================
--- gtkhtml-3.10.0/src/htmlcluev.c (revision 8482)
+++ gtkhtml-3.10.0/src/htmlcluev.c (working copy)
@@ -389,7 +389,7 @@
html_painter_alloc_color (p, &cluev->background_color->color);
html_painter_draw_background (p,
&cluev->background_color->color,
- NULL, tx + paint.x, ty + paint.y, paint.width, paint.height, 0, 0);
+ NULL, NULL, tx + paint.x, ty + paint.y, paint.width, paint.height, 0, 0);
}
HTML_OBJECT_CLASS (&html_clue_class)->draw (o,
Index: gtkhtml-3.10.0/src/htmlprinter.c
===================================================================
--- gtkhtml-3.10.0/src/htmlprinter.c (revision 8482)
+++ gtkhtml-3.10.0/src/htmlprinter.c (working copy)
@@ -447,6 +447,7 @@
draw_background (HTMLPainter *painter,
GdkColor *color,
GdkPixbuf *pixbuf,
+ HTMLImagePointer *ip,
gint ix, gint iy,
gint pix_width, gint pix_height,
gint tile_x, gint tile_y)
@@ -501,7 +502,7 @@
}
static void
-draw_pixmap (HTMLPainter *painter, GdkPixbuf *pixbuf, gint x, gint y, gint scale_width, gint scale_height, const GdkColor *color)
+draw_pixmap (HTMLPainter *painter, GdkPixbuf *pixbuf, HTMLImagePointer *ip, gint x, gint y, gint scale_width, gint scale_height, const GdkColor *color)
{
HTMLPrinter *printer;
double print_x, print_y;
Index: gtkhtml-3.10.0/src/gtkhtml.c
===================================================================
--- gtkhtml-3.10.0/src/gtkhtml.c (revision 8482)
+++ gtkhtml-3.10.0/src/gtkhtml.c (working copy)
@@ -3094,6 +3094,8 @@
html_class->cursor_move = cursor_move;
html_class->command = command;
+ html_class->sRGB_profile = cmsCreate_sRGBProfile ();
+
add_bindings (klass);
gtk_html_accessibility_init ();
Index: gtkhtml-3.10.0/src/gtkhtml.h
===================================================================
--- gtkhtml-3.10.0/src/gtkhtml.h (revision 8482)
+++ gtkhtml-3.10.0/src/gtkhtml.h (working copy)
@@ -28,6 +28,8 @@
#include
#include
+#include
+
#include "gtkhtml-types.h"
#include "gtkhtml-enums.h"
@@ -109,6 +111,9 @@
GtkHTMLClassProperties *properties;
GtkBindingSet *emacs_bindings;
gboolean use_emacs_bindings;
+
+ /* color management */
+ cmsHPROFILE sRGB_profile;
};
struct _GtkHTMLEditorAPI
Index: gtkhtml-3.10.0/src/htmlpainter.c
===================================================================
--- gtkhtml-3.10.0/src/htmlpainter.c (revision 8482)
+++ gtkhtml-3.10.0/src/htmlpainter.c (working copy)
@@ -688,6 +688,7 @@
void
html_painter_draw_pixmap (HTMLPainter *painter,
GdkPixbuf *pixbuf,
+ HTMLImagePointer *ip,
gint x, gint y,
gint scale_width, gint scale_height,
const GdkColor *color)
@@ -696,7 +697,7 @@
g_return_if_fail (HTML_IS_PAINTER (painter));
g_return_if_fail (pixbuf != NULL);
- (* HP_CLASS (painter)->draw_pixmap) (painter, pixbuf, x, y, scale_width, scale_height, color);
+ (* HP_CLASS (painter)->draw_pixmap) (painter, pixbuf, ip, x, y, scale_width, scale_height, color);
}
void
@@ -800,6 +801,7 @@
html_painter_draw_background (HTMLPainter *painter,
GdkColor *color,
GdkPixbuf *pixbuf,
+ HTMLImagePointer *ip,
gint x, gint y,
gint width, gint height,
gint tile_x, gint tile_y)
@@ -807,7 +809,7 @@
g_return_if_fail (painter != NULL);
g_return_if_fail (HTML_IS_PAINTER (painter));
- (* HP_CLASS (painter)->draw_background) (painter, color, pixbuf, x, y, width, height, tile_x, tile_y);
+ (* HP_CLASS (painter)->draw_background) (painter, color, pixbuf, ip, x, y, width, height, tile_x, tile_y);
}
guint
Index: gtkhtml-3.10.0/src/htmlpainter.h
===================================================================
--- gtkhtml-3.10.0/src/htmlpainter.h (revision 8482)
+++ gtkhtml-3.10.0/src/htmlpainter.h (working copy)
@@ -77,7 +77,7 @@
gint (* draw_glyphs) (HTMLPainter *painter, gint x, gint y, PangoItem *item, PangoGlyphString *glyphs, GdkColor *fg, GdkColor *bg);
gint (* draw_spell_error) (HTMLPainter *painter, int x, int y, int width);
void (* fill_rect) (HTMLPainter *painter, gint x, gint y, gint width, gint height);
- void (* draw_pixmap) (HTMLPainter *painter, GdkPixbuf *pixbuf,
+ void (* draw_pixmap) (HTMLPainter *painter, GdkPixbuf *pixbuf, HTMLImagePointer *ip,
gint x, gint y,
gint scale_width,
gint scale_height,
@@ -91,7 +91,7 @@
HTMLBorderStyle style, gint bordersize);
void (* set_clip_rectangle) (HTMLPainter *painter, gint x, gint y, gint width, gint height);
- void (* draw_background) (HTMLPainter *painter, GdkColor *color, GdkPixbuf *pixbuf,
+ void (* draw_background) (HTMLPainter *painter, GdkColor *color, GdkPixbuf *pixbuf, HTMLImagePointer *ip,
gint x, gint y, gint width, gint height, gint tile_x, gint tile_y);
guint (* get_pixel_size) (HTMLPainter *painter);
void (* draw_embedded) (HTMLPainter *painter, HTMLEmbedded *element, gint x, gint y);
@@ -203,6 +203,7 @@
gint height);
void html_painter_draw_pixmap (HTMLPainter *painter,
GdkPixbuf *pixbuf,
+ HTMLImagePointer *ip,
gint x,
gint y,
gint scale_width,
@@ -245,6 +246,7 @@
void html_painter_draw_background (HTMLPainter *painter,
GdkColor *color,
GdkPixbuf *pixbuf,
+ HTMLImagePointer *ip,
gint x,
gint y,
gint width,