WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-92127-20120725120124.patch (text/plain), 15.13 KB, created by
Kenichi Ishibashi
on 2012-07-24 20:01:34 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Kenichi Ishibashi
Created:
2012-07-24 20:01:34 PDT
Size:
15.13 KB
patch
obsolete
>Subversion Revision: 123533 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 8b693c64fc690d22dbadc184d47b8f99a84624b6..e3cc0c8ce61746d28f0cc33151143f43c860767b 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,31 @@ >+2012-07-24 Kenichi Ishibashi <bashi@chromium.org> >+ >+ [Chromium] Fix up includes in HarfBuzzNGFace.h >+ https://bugs.webkit.org/show_bug.cgi?id=92127 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Move constructors of FontPlatformData from headers to corresponding cpp files >+ so that we can use forward declaration for HarfBuzzNGFace instead of including HarfBuzzNGFace.h. >+ This way we can include hb.h in HarfBuzzNGFace.h. >+ >+ No new tests. No changes in behavior. >+ >+ * platform/graphics/FontPlatformData.cpp: >+ (WebCore::FontPlatformData::FontPlatformData): Moved from header file. >+ (WebCore): >+ * platform/graphics/FontPlatformData.h: >+ (WebCore): >+ (FontPlatformData): Moved to cpp file. >+ * platform/graphics/cocoa/FontPlatformDataCocoa.mm: Include HarfBuzzNGFace.h >+ * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: >+ (WebCore::FontPlatformData::FontPlatformData): Moved from header file. >+ (WebCore): >+ * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: >+ (WebCore): >+ (FontPlatformData): Moved to cpp file. >+ * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h: Include hb.h. >+ > 2012-07-24 Sheriff Bot <webkit.review.bot@gmail.com> > > Unreviewed, rolling out r123499. >diff --git a/Source/WebCore/platform/graphics/FontPlatformData.cpp b/Source/WebCore/platform/graphics/FontPlatformData.cpp >index a1d274aa89cf93403876dce4f545b3b6c7462ee7..22cf99ff0a2553ee586ac8e489de87f2be1623c1 100644 >--- a/Source/WebCore/platform/graphics/FontPlatformData.cpp >+++ b/Source/WebCore/platform/graphics/FontPlatformData.cpp >@@ -27,10 +27,112 @@ > #include <wtf/Vector.h> > #include <wtf/text/StringHash.h> > >+#if PLATFORM(CHROMIUM) && OS(DARWIN) >+#include "HarfBuzzNGFace.h" >+#endif >+ > using namespace std; > > namespace WebCore { > >+FontPlatformData::FontPlatformData(WTF::HashTableDeletedValueType) >+ : m_syntheticBold(false) >+ , m_syntheticOblique(false) >+ , m_orientation(Horizontal) >+ , m_textOrientation(TextOrientationVerticalRight) >+ , m_size(0) >+ , m_widthVariant(RegularWidth) >+#if PLATFORM(WIN) >+ , m_font(WTF::HashTableDeletedValue) >+#elif OS(DARWIN) >+ , m_font(hashTableDeletedFontValue()) >+#endif >+#if USE(CG) && PLATFORM(WIN) >+ , m_cgFont(0) >+#elif USE(CAIRO) >+ , m_scaledFont(hashTableDeletedFontValue()) >+#endif >+ , m_isColorBitmapFont(false) >+ , m_isCompositeFontReference(false) >+#if OS(DARWIN) >+ , m_isPrinterFont(false) >+#endif >+#if PLATFORM(WIN) >+ , m_useGDI(false) >+#endif >+{ >+} >+ >+FontPlatformData::FontPlatformData() >+ : m_syntheticBold(false) >+ , m_syntheticOblique(false) >+ , m_orientation(Horizontal) >+ , m_textOrientation(TextOrientationVerticalRight) >+ , m_size(0) >+ , m_widthVariant(RegularWidth) >+#if OS(DARWIN) >+ , m_font(0) >+#endif >+#if USE(CG) && PLATFORM(WIN) >+ , m_cgFont(0) >+#elif USE(CAIRO) >+ , m_scaledFont(0) >+#endif >+ , m_isColorBitmapFont(false) >+ , m_isCompositeFontReference(false) >+#if OS(DARWIN) >+ , m_isPrinterFont(false) >+#endif >+#if PLATFORM(WIN) >+ , m_useGDI(false) >+#endif >+{ >+} >+ >+FontPlatformData::FontPlatformData(float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation, TextOrientation textOrientation, FontWidthVariant widthVariant) >+ : m_syntheticBold(syntheticBold) >+ , m_syntheticOblique(syntheticOblique) >+ , m_orientation(orientation) >+ , m_textOrientation(textOrientation) >+ , m_size(size) >+ , m_widthVariant(widthVariant) >+#if OS(DARWIN) >+ , m_font(0) >+#endif >+#if USE(CG) && PLATFORM(WIN) >+ , m_cgFont(0) >+#elif USE(CAIRO) >+ , m_scaledFont(0) >+#endif >+ , m_isColorBitmapFont(false) >+ , m_isCompositeFontReference(false) >+#if OS(DARWIN) >+ , m_isPrinterFont(false) >+#endif >+#if PLATFORM(WIN) >+ , m_useGDI(false) >+#endif >+{ >+} >+ >+#if OS(DARWIN) && (USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)) >+FontPlatformData::FontPlatformData(CGFontRef cgFont, float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation, >+ TextOrientation textOrientation, FontWidthVariant widthVariant) >+ : m_syntheticBold(syntheticBold) >+ , m_syntheticOblique(syntheticOblique) >+ , m_orientation(orientation) >+ , m_textOrientation(textOrientation) >+ , m_size(size) >+ , m_widthVariant(widthVariant) >+ , m_font(0) >+ , m_cgFont(cgFont) >+ , m_isColorBitmapFont(false) >+ , m_isCompositeFontReference(false) >+ , m_isPrinterFont(false) >+{ >+} >+#endif >+ > FontPlatformData::FontPlatformData(const FontPlatformData& source) > : m_syntheticBold(source.m_syntheticBold) > , m_syntheticOblique(source.m_syntheticOblique) >diff --git a/Source/WebCore/platform/graphics/FontPlatformData.h b/Source/WebCore/platform/graphics/FontPlatformData.h >index 8b0dbed9b27c2bc6b4078c21894875e21dfa89cd..984f58c14c0c844a47de30fbeb08dfe6c637b9fd 100644 >--- a/Source/WebCore/platform/graphics/FontPlatformData.h >+++ b/Source/WebCore/platform/graphics/FontPlatformData.h >@@ -72,7 +72,6 @@ typedef const struct __CTFont* CTFontRef; > > #if PLATFORM(CHROMIUM) && OS(DARWIN) > #include "CrossProcessFontLoading.h" >-#include "HarfBuzzNGFace.h" > #endif > > #if PLATFORM(WIN) >@@ -94,114 +93,29 @@ namespace WebCore { > class FontDescription; > class SharedBuffer; > >+#if PLATFORM(CHROMIUM) && OS(DARWIN) >+class HarfBuzzNGFace; >+#endif >+ > #if OS(DARWIN) > inline CTFontRef toCTFontRef(NSFont *nsFont) { return reinterpret_cast<CTFontRef>(nsFont); } > #endif > > class FontPlatformData { > public: >- FontPlatformData(WTF::HashTableDeletedValueType) >- : m_syntheticBold(false) >- , m_syntheticOblique(false) >- , m_orientation(Horizontal) >- , m_textOrientation(TextOrientationVerticalRight) >- , m_size(0) >- , m_widthVariant(RegularWidth) >-#if PLATFORM(WIN) >- , m_font(WTF::HashTableDeletedValue) >-#elif OS(DARWIN) >- , m_font(hashTableDeletedFontValue()) >-#endif >-#if USE(CG) && PLATFORM(WIN) >- , m_cgFont(0) >-#elif USE(CAIRO) >- , m_scaledFont(hashTableDeletedFontValue()) >-#endif >- , m_isColorBitmapFont(false) >- , m_isCompositeFontReference(false) >-#if OS(DARWIN) >- , m_isPrinterFont(false) >-#endif >-#if PLATFORM(WIN) >- , m_useGDI(false) >-#endif >- { >- } >- >- FontPlatformData() >- : m_syntheticBold(false) >- , m_syntheticOblique(false) >- , m_orientation(Horizontal) >- , m_textOrientation(TextOrientationVerticalRight) >- , m_size(0) >- , m_widthVariant(RegularWidth) >-#if OS(DARWIN) >- , m_font(0) >-#endif >-#if USE(CG) && PLATFORM(WIN) >- , m_cgFont(0) >-#elif USE(CAIRO) >- , m_scaledFont(0) >-#endif >- , m_isColorBitmapFont(false) >- , m_isCompositeFontReference(false) >-#if OS(DARWIN) >- , m_isPrinterFont(false) >-#endif >-#if PLATFORM(WIN) >- , m_useGDI(false) >-#endif >- { >- } >- >+ FontPlatformData(WTF::HashTableDeletedValueType); >+ FontPlatformData(); > FontPlatformData(const FontPlatformData&); > FontPlatformData(const FontDescription&, const AtomicString& family); >- FontPlatformData(float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation = Horizontal, >- TextOrientation textOrientation = TextOrientationVerticalRight, FontWidthVariant widthVariant = RegularWidth) >- : m_syntheticBold(syntheticBold) >- , m_syntheticOblique(syntheticOblique) >- , m_orientation(orientation) >- , m_textOrientation(textOrientation) >- , m_size(size) >- , m_widthVariant(widthVariant) >-#if OS(DARWIN) >- , m_font(0) >-#endif >-#if USE(CG) && PLATFORM(WIN) >- , m_cgFont(0) >-#elif USE(CAIRO) >- , m_scaledFont(0) >-#endif >- , m_isColorBitmapFont(false) >- , m_isCompositeFontReference(false) >-#if OS(DARWIN) >- , m_isPrinterFont(false) >-#endif >-#if PLATFORM(WIN) >- , m_useGDI(false) >-#endif >- { >- } >+ FontPlatformData(float size, bool syntheticBold, bool syntheticOblique, FontOrientation = Horizontal, >+ TextOrientation = TextOrientationVerticalRight, FontWidthVariant = RegularWidth); > > #if OS(DARWIN) > FontPlatformData(NSFont*, float size, bool isPrinterFont = false, bool syntheticBold = false, bool syntheticOblique = false, > FontOrientation = Horizontal, TextOrientation = TextOrientationVerticalRight, FontWidthVariant = RegularWidth); > #if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM) >- FontPlatformData(CGFontRef cgFont, float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation, >- TextOrientation textOrientation, FontWidthVariant widthVariant) >- : m_syntheticBold(syntheticBold) >- , m_syntheticOblique(syntheticOblique) >- , m_orientation(orientation) >- , m_textOrientation(textOrientation) >- , m_size(size) >- , m_widthVariant(widthVariant) >- , m_font(0) >- , m_cgFont(cgFont) >- , m_isColorBitmapFont(false) >- , m_isCompositeFontReference(false) >- , m_isPrinterFont(false) >- { >- } >+ FontPlatformData(CGFontRef, float size, bool syntheticBold, bool syntheticOblique, FontOrientation, >+ TextOrientation, FontWidthVariant); > #endif > #endif > #if PLATFORM(WIN) >diff --git a/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm b/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm >index 4bb0951dae779d767f0a031dc3f585b43104e2da..8a0c32c4fc7a938043a304f5d924f152afe79bf0 100644 >--- a/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm >+++ b/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm >@@ -28,6 +28,10 @@ > #import "WebCoreSystemInterface.h" > #import <AppKit/NSFont.h> > >+#if PLATFORM(CHROMIUM) && OS(DARWIN) >+#import "HarfBuzzNGFace.h" >+#endif >+ > namespace WebCore { > > // These CoreText Text Spacing feature selectors are not defined in CoreText. >diff --git a/Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp b/Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp >index e6ff322b46059acdd89e3e0d919160ba78404fe0..63da5cc3dd9e1cf64f3c971a63005809d3d0af0f 100644 >--- a/Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp >+++ b/Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp >@@ -42,6 +42,12 @@ > > #include <wtf/text/StringImpl.h> > >+#if USE(HARFBUZZ_NG) >+#include "HarfBuzzNGFace.h" >+#else >+#include "HarfBuzzSkia.h" >+#endif >+ > namespace WebCore { > > static SkPaint::Hinting skiaHinting = SkPaint::kNormal_Hinting; >@@ -81,6 +87,39 @@ void FontPlatformData::setSubpixelPositioning(bool useSubpixelPositioning) > useSkiaSubpixelPositioning = useSubpixelPositioning; > } > >+FontPlatformData::FontPlatformData(WTF::HashTableDeletedValueType) >+ : m_typeface(hashTableDeletedFontValue()) >+ , m_textSize(0) >+ , m_emSizeInFontUnits(0) >+ , m_fakeBold(false) >+ , m_fakeItalic(false) >+ , m_orientation(Horizontal) >+ , m_textOrientation(TextOrientationVerticalRight) >+{ >+} >+ >+FontPlatformData::FontPlatformData() >+ : m_typeface(0) >+ , m_textSize(0) >+ , m_emSizeInFontUnits(0) >+ , m_fakeBold(false) >+ , m_fakeItalic(false) >+ , m_orientation(Horizontal) >+ , m_textOrientation(TextOrientationVerticalRight) >+{ >+} >+ >+FontPlatformData::FontPlatformData(float textSize, bool fakeBold, bool fakeItalic) >+ : m_typeface(0) >+ , m_textSize(textSize) >+ , m_emSizeInFontUnits(0) >+ , m_fakeBold(fakeBold) >+ , m_fakeItalic(fakeItalic) >+ , m_orientation(Horizontal) >+ , m_textOrientation(TextOrientationVerticalRight) >+{ >+} >+ > FontPlatformData::FontPlatformData(const FontPlatformData& src) > : m_typeface(src.m_typeface) > , m_family(src.m_family) >diff --git a/Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h b/Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h >index 5c6faa64aa4fb243798833b726f96d7abf22d9d6..2c2f64bbcebea91599303e486acb8382d895808b 100644 >--- a/Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h >+++ b/Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h >@@ -33,11 +33,6 @@ > > #include "FontOrientation.h" > #include "FontRenderStyle.h" >-#if USE(HARFBUZZ_NG) >-#include "HarfBuzzNGFace.h" >-#else >-#include "HarfBuzzSkia.h" >-#endif > #include "SkPaint.h" > #include "TextOrientation.h" > #include <wtf/Forward.h> >@@ -52,6 +47,12 @@ namespace WebCore { > > class FontDescription; > >+#if USE(HARFBUZZ_NG) >+class HarfBuzzNGFace; >+#else >+class HarfbuzzFace; >+#endif >+ > // ----------------------------------------------------------------------------- > // FontPlatformData is the handle which WebKit has on a specific face. A face > // is the tuple of (font, size, ...etc). Here we are just wrapping a Skia >@@ -64,36 +65,9 @@ public: > // to this "Deleted" one. It expects the Deleted one to be differentiable > // from the 0 one (created with the empty constructor), so we can't just > // set everything to 0. >- FontPlatformData(WTF::HashTableDeletedValueType) >- : m_typeface(hashTableDeletedFontValue()) >- , m_textSize(0) >- , m_emSizeInFontUnits(0) >- , m_fakeBold(false) >- , m_fakeItalic(false) >- , m_orientation(Horizontal) >- , m_textOrientation(TextOrientationVerticalRight) >- { } >- >- FontPlatformData() >- : m_typeface(0) >- , m_textSize(0) >- , m_emSizeInFontUnits(0) >- , m_fakeBold(false) >- , m_fakeItalic(false) >- , m_orientation(Horizontal) >- , m_textOrientation(TextOrientationVerticalRight) >- { } >- >- FontPlatformData(float textSize, bool fakeBold, bool fakeItalic) >- : m_typeface(0) >- , m_textSize(textSize) >- , m_emSizeInFontUnits(0) >- , m_fakeBold(fakeBold) >- , m_fakeItalic(fakeItalic) >- , m_orientation(Horizontal) >- , m_textOrientation(TextOrientationVerticalRight) >- { } >- >+ FontPlatformData(WTF::HashTableDeletedValueType); >+ FontPlatformData(); >+ FontPlatformData(float textSize, bool fakeBold, bool fakeItalic); > FontPlatformData(const FontPlatformData&); > FontPlatformData(SkTypeface*, const char* name, float textSize, bool fakeBold, bool fakeItalic, FontOrientation = Horizontal, TextOrientation = TextOrientationVerticalRight); > FontPlatformData(const FontPlatformData& src, float textSize); >diff --git a/Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h b/Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h >index 15fa536e365be45f119bcb67a6098c0a4c8552cb..cbc8f8ed4f359d575955ad95b367f99ad360f8aa 100644 >--- a/Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h >+++ b/Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h >@@ -31,15 +31,7 @@ > #ifndef HarfBuzzNGFace_h > #define HarfBuzzNGFace_h > >-#if PLATFORM(CHROMIUM) && OS(DARWIN) >-// TODO: Figure out why including <hb.h> fails on chromium. >-struct _hb_face_t; >-typedef _hb_face_t hb_face_t; >-struct _hb_font_t; >-typedef _hb_font_t hb_font_t; >-#else > #include <hb.h> >-#endif > > #include <wtf/PassRefPtr.h> > #include <wtf/RefCounted.h>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 92127
: 154227 |
154236