<http://webkit.org/b/57239> Use forward class declaration instead of including header
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Mar 2011 17:07:44 +0000 (17:07 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Mar 2011 17:07:44 +0000 (17:07 +0000)
commit13529ff9c25bc98f291a7fc704c2035ebae9aa54
tree64802b0e440e2033bf18220a87ac345e0c263315
parentaca1a65915c491eac8d311553b8456cb87365f05
<webkit.org/b/57239> Use forward class declaration instead of including header

Reviewed by Dan Bernstein.

Adding a "using namespace WebCore;" statement in a header may
cause issues when <WebCore/Length.h> is included before
<CoreText/CoreText.h>.

Length.h defines the LengthType enum with a 'Fixed' value.
CoreText.h includes MacTypes.h, which has a
"typedef SInt32 Fixed;" statement, and then CoreText.h includes
other headers that also use 'Fixed', but expect the typedef to
be defined, not the enum.  If another header includes
"using namespace WebCore;" before CoreText.h, the
following compiler errors result (paths abbreviated):

    CoreText.framework/Headers/SFNTLayoutTypes.h:689: error: reference to 'Fixed' is ambiguous
    MacTypes.h:184: error: candidates are: typedef SInt32 Fixed
    Length.h:37: error:                 WebCore::LengthType WebCore::Fixed
    SFNTLayoutTypes.h:689: error: 'Fixed' does not name a type

* platform/mac/HTMLConverter.h: Use forward declaration of
DocumentLoader class instead of including header.  Remove the
unused "using namespace WebCore;" statement.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@82128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/mac/HTMLConverter.h