[webkit-reviews] review denied: [Bug 66323] Rename FontGtk.cpp to FontPango.cpp : [Attachment 104898] Add replacement functions for gdk ones.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 23 16:46:00 PDT 2011


Martin Robinson <mrobinson at webkit.org> has denied  review:
Bug 66323: Rename FontGtk.cpp to FontPango.cpp
https://bugs.webkit.org/show_bug.cgi?id=66323

Attachment 104898: Add replacement functions for gdk ones.
https://bugs.webkit.org/attachment.cgi?id=104898&action=review

------- Additional Comments from Martin Robinson <mrobinson at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=104898&action=review


> Source/WebCore/platform/graphics/pango/FontPango.cpp:50
> +#ifdef GTK_API_VERSION_2
>  #include <gdk/gdk.h>
> +#else
> +#include "PangoUtilities.h"
> +#endif

This should be split into a separate block.

> Source/WebCore/platform/graphics/pango/FontPango.cpp:246
> +#ifdef GTK_API_VERSION_2
>	   gdk_cairo_region(context, renderRegion);
> +#else
> +	   appendRegionToCairoContext(context, renderRegion);
> +#endif

This isn't correct, because it will have GTK+ 3.x use
appendRegionToCairoContext and I don't think that's what you want. If you can
use PLATFORM(GTK) or USE(GTK), that would be better.

> Source/WebCore/platform/graphics/pango/PangoUtilities.cpp:6
> +/*
> + * Copyright (C) 2000 Red Hat, Inc.
> + * Copyright (C) 2011 ProFUSION embedded systems
> + *
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public

Where is this code from. What license was it originally under?

> Source/WebCore/platform/graphics/pango/PangoUtilities.cpp:37
> +    PangoRectangle logical_rect;
> +    PangoLayoutLine* line = pango_layout_iter_get_line_readonly(iter);
> +    cairo_region_t* clip_region = cairo_region_create();
> +    pango_layout_iter_get_line_extents(iter, NULL, &logical_rect);
> +    int baseline = pango_layout_iter_get_baseline(iter);
> +
> +    int i = 0;
> +    while (i < n_ranges) {
> +	   int *pixel_ranges = NULL;
> +	   int n_pixel_ranges = 0;

This code isn't in WebKit style.

> Source/WebCore/platform/graphics/pango/PangoUtilities.h:27
> +#include <cairo.h>
> +#include <pango/pango.h>
> +

Typically we try to avoid system includes in headers if possible.

> Source/WebCore/platform/graphics/pango/PangoUtilities.h:30
> +cairo_region_t* pangoLayoutLineGetClipRegion(PangoLayoutLine* line, int
x_origin, int y_origin, const int* index_ranges, int n_ranges);

Usually for function names we try to have the verb first like,
getClipRegionFromPangoLayoutLine.


More information about the webkit-reviews mailing list