Bug 55996

Summary: Some Gtk code uses defined(USE_FREETYPE) instead of just USE(FREETYPE)
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: alex, mrobinson, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Proposed patch none

Description Eric Seidel (no email) 2011-03-09 00:14:23 PST
Some Gtk code uses defined(USE_FREETYPE) instead of just USE(FREETYPE)

platform/graphics/cairo/OwnPtrCairo.cpp:#if defined(USE_FREETYPE)
platform/graphics/cairo/OwnPtrCairo.cpp:#if defined(USE_FREETYPE)
platform/graphics/cairo/OwnPtrCairo.h:#if defined(USE_FREETYPE)
platform/graphics/cairo/OwnPtrCairo.h:#if defined(USE_FREETYPE)
platform/graphics/cairo/RefPtrCairo.cpp:#if defined(USE_FREETYPE)
platform/graphics/cairo/RefPtrCairo.cpp:#if defined(USE_FREETYPE)
platform/graphics/cairo/RefPtrCairo.h:#if defined(USE_FREETYPE)
platform/graphics/cairo/RefPtrCairo.h:#if defined(USE_FREETYPE)
platform/graphics/gtk/FontGtk.cpp:#if defined(USE_FREETYPE)
platform/graphics/gtk/FontGtk.cpp:#if defined(USE_FREETYPE)
platform/graphics/gtk/FontGtk.cpp:#if defined(USE_FREETYPE)
platform/graphics/gtk/FontGtk.cpp:#if defined(USE_FREETYPE)
platform/graphics/gtk/FontGtk.cpp:#if defined(USE_FREETYPE)
platform/graphics/gtk/FontGtk.cpp:#if defined(USE_FREETYPE)

Seems like a typo/misunderstanding?
Comment 1 Eric Seidel (no email) 2011-03-09 00:40:32 PST
Actually, that would fail due to USE(FOO) assumes WTF_USE_FOO.  I wonder where we're getting USE_FREETYPE from.
Comment 2 Alejandro G. Castro 2011-03-10 11:58:47 PST
(In reply to comment #1)
> Actually, that would fail due to USE(FOO) assumes WTF_USE_FOO.  I wonder where we're getting USE_FREETYPE from.

It is defined in the Source/WebCore/GNUmakefile.am:

if USE_FREETYPE
webcoregtk_cppflags += \
        -DUSE_FREETYPE=1 \
        -I$(srcdir)/Source/WebCore/platform/graphics/freetype
...

I think it is just an oversight, I would say we should use the macro USE.
Comment 3 Alejandro G. Castro 2011-03-10 12:18:38 PST
Created attachment 85368 [details]
Proposed patch

I've added also the USE_PANGO define to the patch.
Comment 4 Martin Robinson 2011-03-10 12:28:41 PST
Comment on attachment 85368 [details]
Proposed patch

Great. Thanks for the cleanup.
Comment 5 Alejandro G. Castro 2011-03-10 12:33:13 PST
Comment on attachment 85368 [details]
Proposed patch

Clearing flags on attachment: 85368

Committed r80744: <http://trac.webkit.org/changeset/80744>
Comment 6 Alejandro G. Castro 2011-03-10 12:33:33 PST
All reviewed patches have been landed.  Closing bug.