]> git.pld-linux.org Git - packages/firefox.git/commitdiff
- add patch for pango crash from #414239 (by raul raat)
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 13 Feb 2008 10:32:44 +0000 (10:32 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    mozilla-firefox-414239.patch -> 1.1

mozilla-firefox-414239.patch [new file with mode: 0644]

diff --git a/mozilla-firefox-414239.patch b/mozilla-firefox-414239.patch
new file mode 100644 (file)
index 0000000..62139b4
--- /dev/null
@@ -0,0 +1,40 @@
+Index: gfx/thebes/src/gfxPangoFonts.cpp
+===================================================================
+RCS file: /cvsroot/mozilla/gfx/thebes/src/gfxPangoFonts.cpp,v
+retrieving revision 1.128
+diff -u -p -U 8 -r1.128 gfxPangoFonts.cpp
+--- gfx/thebes/src/gfxPangoFonts.cpp   27 Jan 2008 10:27:08 -0000      1.128
++++ gfx/thebes/src/gfxPangoFonts.cpp   1 Feb 2008 20:07:47 -0000
+@@ -371,24 +371,28 @@ NewPangoFontDescription(const nsAString 
+ /* static */
+ already_AddRefed<gfxPangoFont>
+ gfxPangoFont::GetOrMakeFont(PangoFont *aPangoFont)
+ {
+     gfxPangoFont *font = static_cast<gfxPangoFont*>
+         (g_object_get_qdata(G_OBJECT(aPangoFont), GetFontQuark()));
+     if (!font) {
+-        PangoFontDescription *desc =
+-            pango_font_describe_with_absolute_size(aPangoFont);
++        // pango_font_describe_with_absolute_size requires Pango-1.14
++        PangoFontDescription *desc = pango_font_describe(aPangoFont);
++
++        PangoFcFont *fcfont = PANGO_FC_FONT(aPangoFont);
++        double size;
++        if (FcPatternGetDouble(fcfont->font_pattern, FC_PIXEL_SIZE, 0, &size)
++            != FcResultMatch)
++            size = pango_font_description_get_size(desc) / FLOAT_PANGO_SCALE;
+         // Shouldn't actually need to take too much care about the correct
+         // family or style, as size is the only thing expected to be
+         // important.
+-        gfxFloat size =
+-            pango_font_description_get_size(desc) / FLOAT_PANGO_SCALE;
+         PRUint8 style =
+             PangoStyleToThebesStyle(pango_font_description_get_style(desc));
+         PRUint16 weight = pango_font_description_get_weight(desc);
+         NS_NAMED_LITERAL_CSTRING(langGroup, "x-unicode");
+         gfxFontStyle fontStyle(style, weight, size, langGroup, 0.0,
+                                PR_TRUE, PR_FALSE);
+         // (The PangoFontDescription owns the family string)
This page took 0.052369 seconds and 4 git commands to generate.