[Webkit-unassigned] [Bug 66323] Rename FontGtk.cpp to FontPango.cpp

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


https://bugs.webkit.org/show_bug.cgi?id=66323


Martin Robinson <mrobinson at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #104898|                            |review-
               Flag|                            |




--- Comment #11 from Martin Robinson <mrobinson at webkit.org>  2011-08-23 16:46:00 PST ---
(From update of attachment 104898)
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.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list