Unreviewed, rolling out r120511.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Jun 2012 00:49:35 +0000 (00:49 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Jun 2012 00:49:35 +0000 (00:49 +0000)
http://trac.webkit.org/changeset/120511
https://bugs.webkit.org/show_bug.cgi?id=89255

Breaks at least Android builder (Requested by wangxianzhu on
#webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-06-15

Source/WebCore:

* platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
(WebCore):
(WebCore::FontPlatformData::setHinting):
(WebCore::FontPlatformData::setAutoHint):
(WebCore::FontPlatformData::setUseBitmaps):
(WebCore::FontPlatformData::setAntiAlias):
(WebCore::FontPlatformData::setSubpixelRendering):
(WebCore::FontPlatformData::setSubpixelPositioning):
(WebCore::FontPlatformData::setupPaint):
* platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
(FontPlatformData):

Source/WebKit/chromium:

* WebKit.gyp:
* public/linux/WebFontRendering.h:
* public/linuxish/WebFontRendering.h: Renamed from Source/WebKit/chromium/public/WebFontRendering.h.
(WebKit):
(WebFontRendering):
* src/linuxish/WebFontRendering.cpp: Renamed from Source/WebKit/chromium/src/WebFontRendering.cpp.
(WebKit):
(WebKit::WebFontRendering::setHinting):
(WebKit::WebFontRendering::setAutoHint):
(WebKit::WebFontRendering::setUseBitmaps):
(WebKit::WebFontRendering::setAntiAlias):
(WebKit::WebFontRendering::setSubpixelRendering):
(WebKit::WebFontRendering::setSubpixelPositioning):
(WebKit::WebFontRendering::setLCDOrder):
(WebKit::WebFontRendering::setLCDOrientation):

Tools:

* DumpRenderTree/chromium/LayoutTestController.cpp:
(LayoutTestController::reset):
(LayoutTestController::setTextSubpixelPositioning):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@120513 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp
Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKit.gyp
Source/WebKit/chromium/public/linux/WebFontRendering.h
Source/WebKit/chromium/public/linuxish/WebFontRendering.h [moved from Source/WebKit/chromium/public/WebFontRendering.h with 85% similarity]
Source/WebKit/chromium/src/linuxish/WebFontRendering.cpp [moved from Source/WebKit/chromium/src/WebFontRendering.cpp with 71% similarity]
Tools/ChangeLog
Tools/DumpRenderTree/chromium/LayoutTestController.cpp

index 8a9ace3..0980018 100644 (file)
@@ -1,3 +1,24 @@
+2012-06-15  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r120511.
+        http://trac.webkit.org/changeset/120511
+        https://bugs.webkit.org/show_bug.cgi?id=89255
+
+        Breaks at least Android builder (Requested by wangxianzhu on
+        #webkit).
+
+        * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
+        (WebCore):
+        (WebCore::FontPlatformData::setHinting):
+        (WebCore::FontPlatformData::setAutoHint):
+        (WebCore::FontPlatformData::setUseBitmaps):
+        (WebCore::FontPlatformData::setAntiAlias):
+        (WebCore::FontPlatformData::setSubpixelRendering):
+        (WebCore::FontPlatformData::setSubpixelPositioning):
+        (WebCore::FontPlatformData::setupPaint):
+        * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
+        (FontPlatformData):
+
 2012-06-15  Xianzhu Wang  <wangxianzhu@chromium.org>
 
         [Chromium] Move chromium/public/linuxish/WebFontRendering.h out of linuxish directory
index c7d7ab8..54df770 100644 (file)
 #include "SkPaint.h"
 #include "SkTypeface.h"
 
-#include <public/WebFontRendering.h>
-#include <wtf/text/StringImpl.h>
-
-using WebKit::WebFontRendering;
+#include <wtf/text/StringImpl.h> 
 
 namespace WebCore {
 
+static SkPaint::Hinting skiaHinting = SkPaint::kNormal_Hinting;
+static bool useSkiaAutoHint = true;
+static bool useSkiaBitmaps = true;
+static bool useSkiaAntiAlias = true;
+static bool useSkiaSubpixelRendering = false;
+static bool useSkiaSubpixelPositioning = false;
+
+void FontPlatformData::setHinting(SkPaint::Hinting hinting)
+{
+    skiaHinting = hinting;
+}
+
+void FontPlatformData::setAutoHint(bool useAutoHint)
+{
+    useSkiaAutoHint = useAutoHint;
+}
+
+void FontPlatformData::setUseBitmaps(bool useBitmaps)
+{
+    useSkiaBitmaps = useBitmaps;
+}
+
+void FontPlatformData::setAntiAlias(bool useAntiAlias)
+{
+    useSkiaAntiAlias = useAntiAlias;
+}
+
+void FontPlatformData::setSubpixelRendering(bool useSubpixelRendering)
+{
+    useSkiaSubpixelRendering = useSubpixelRendering;
+}
+
+void FontPlatformData::setSubpixelPositioning(bool useSubpixelPositioning)
+{
+    useSkiaSubpixelPositioning = useSubpixelPositioning;
+}
+
 FontPlatformData::FontPlatformData(const FontPlatformData& src)
     : m_typeface(src.m_typeface)
     , m_family(src.m_family)
@@ -143,10 +177,10 @@ void FontPlatformData::setupPaint(SkPaint* paint) const
 {
     const float ts = m_textSize >= 0 ? m_textSize : 12;
 
-    paint->setAntiAlias(m_style.useAntiAlias == FontRenderStyle::NoPreference ? WebFontRendering::antiAlias() : m_style.useAntiAlias);
+    paint->setAntiAlias(m_style.useAntiAlias == FontRenderStyle::NoPreference ? useSkiaAntiAlias : m_style.useAntiAlias);
     switch (m_style.useHinting) {
     case FontRenderStyle::NoPreference:
-        paint->setHinting(WebFontRendering::hinting());
+        paint->setHinting(skiaHinting);
         break;
     case 0:
         paint->setHinting(SkPaint::kNo_Hinting);
@@ -156,16 +190,16 @@ void FontPlatformData::setupPaint(SkPaint* paint) const
         break;
     }
 
-    paint->setEmbeddedBitmapText(m_style.useBitmaps == FontRenderStyle::NoPreference ? WebFontRendering::useBitmaps() : m_style.useBitmaps);
+    paint->setEmbeddedBitmapText(m_style.useBitmaps == FontRenderStyle::NoPreference ? useSkiaBitmaps : m_style.useBitmaps);
     paint->setTextSize(SkFloatToScalar(ts));
     paint->setTypeface(m_typeface);
     paint->setFakeBoldText(m_fakeBold);
     paint->setTextSkewX(m_fakeItalic ? -SK_Scalar1 / 4 : 0);
-    paint->setAutohinted(m_style.useAutoHint == FontRenderStyle::NoPreference ? WebFontRendering::autoHint() : m_style.useAutoHint);
-    paint->setSubpixelText(m_style.useSubpixelPositioning == FontRenderStyle::NoPreference ? WebFontRendering::subpixelPositioning() : m_style.useSubpixelPositioning);
+    paint->setAutohinted(m_style.useAutoHint == FontRenderStyle::NoPreference ? useSkiaAutoHint : m_style.useAutoHint);
+    paint->setSubpixelText(m_style.useSubpixelPositioning == FontRenderStyle::NoPreference ? useSkiaSubpixelPositioning : m_style.useSubpixelPositioning);
 
-    if (m_style.useAntiAlias == 1 || (m_style.useAntiAlias == FontRenderStyle::NoPreference && WebFontRendering::antiAlias()))
-        paint->setLCDRenderText(m_style.useSubpixelRendering == FontRenderStyle::NoPreference ? WebFontRendering::subpixelRendering() : m_style.useSubpixelRendering);
+    if (m_style.useAntiAlias == 1 || (m_style.useAntiAlias == FontRenderStyle::NoPreference && useSkiaAntiAlias))
+        paint->setLCDRenderText(m_style.useSubpixelRendering == FontRenderStyle::NoPreference ? useSkiaSubpixelRendering : m_style.useSubpixelRendering);
 }
 
 SkFontID FontPlatformData::uniqueID() const
index 1a694f0..246a7a4 100644 (file)
@@ -130,6 +130,16 @@ public:
 
     HarfbuzzFace* harfbuzzFace() const;
 
+    // -------------------------------------------------------------------------
+    // Global font preferences...
+
+    static void setHinting(SkPaint::Hinting);
+    static void setAutoHint(bool);
+    static void setUseBitmaps(bool);
+    static void setAntiAlias(bool);
+    static void setSubpixelRendering(bool);
+    static void setSubpixelPositioning(bool);
+
 private:
     void querySystemForRenderStyle();
 
index b16ef1a..66011e9 100644 (file)
@@ -1,3 +1,28 @@
+2012-06-15  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r120511.
+        http://trac.webkit.org/changeset/120511
+        https://bugs.webkit.org/show_bug.cgi?id=89255
+
+        Breaks at least Android builder (Requested by wangxianzhu on
+        #webkit).
+
+        * WebKit.gyp:
+        * public/linux/WebFontRendering.h:
+        * public/linuxish/WebFontRendering.h: Renamed from Source/WebKit/chromium/public/WebFontRendering.h.
+        (WebKit):
+        (WebFontRendering):
+        * src/linuxish/WebFontRendering.cpp: Renamed from Source/WebKit/chromium/src/WebFontRendering.cpp.
+        (WebKit):
+        (WebKit::WebFontRendering::setHinting):
+        (WebKit::WebFontRendering::setAutoHint):
+        (WebKit::WebFontRendering::setUseBitmaps):
+        (WebKit::WebFontRendering::setAntiAlias):
+        (WebKit::WebFontRendering::setSubpixelRendering):
+        (WebKit::WebFontRendering::setSubpixelPositioning):
+        (WebKit::WebFontRendering::setLCDOrder):
+        (WebKit::WebFontRendering::setLCDOrientation):
+
 2012-06-15  Xianzhu Wang  <wangxianzhu@chromium.org>
 
         [Chromium] Move chromium/public/linuxish/WebFontRendering.h out of linuxish directory
index 69e2a86..276c5a4 100644 (file)
                 'public/WebFont.h',
                 'public/WebFontCache.h',
                 'public/WebFontDescription.h',
-                'public/WebFontRendering.h',
                 'public/WebFormControlElement.h',
                 'public/WebFormElement.h',
                 'public/WebFrame.h',
                 'public/gtk/WebInputEventFactory.h',
                 'public/linux/WebFontRenderStyle.h',
                 'public/linux/WebRenderTheme.h',
+                'public/linuxish/WebFontRendering.h',
                 'public/mac/WebInputEventFactory.h',
                 'public/mac/WebSandboxSupport.h',
                 'public/mac/WebScreenInfoFactory.h',
                 'src/linux/WebFontInfo.cpp',
                 'src/linux/WebFontRenderStyle.cpp',
                 'src/linux/WebRenderTheme.cpp',
+                'src/linuxish/WebFontRendering.cpp',
                 'src/x11/WebScreenInfoFactory.cpp',
                 'src/mac/WebInputEventFactory.mm',
                 'src/mac/WebScreenInfoFactory.mm',
                 'src/WebFontDescription.cpp',
                 'src/WebFontImpl.cpp',
                 'src/WebFontImpl.h',
-                'src/WebFontRendering.cpp',
                 'src/WebFormControlElement.cpp',
                 'src/WebFormElement.cpp',
                 'src/WebFrameImpl.cpp',
index 451c5e3..715432c 100644 (file)
@@ -28,4 +28,4 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 // FIXME: Remove once http://codereview.chromium.org/10544103/ is landed.
-#include "../WebFontRendering.h"
+#include "../linuxish/WebFontRendering.h"
@@ -31,7 +31,7 @@
 #ifndef WebFontRendering_h
 #define WebFontRendering_h
 
-#include "platform/WebCommon.h"
+#include "../platform/WebCommon.h"
 #include <SkFontHost.h>
 #include <SkPaint.h>
 
@@ -40,8 +40,6 @@ namespace WebKit {
 class WebFontRendering {
 public:
     // Set global font renderering preferences.
-    // Whether they work on particular platform depends on the implementation of
-    // Skia on the platform.
 
     WEBKIT_EXPORT static void setHinting(SkPaint::Hinting);
     WEBKIT_EXPORT static void setAutoHint(bool);
@@ -51,15 +49,6 @@ public:
     WEBKIT_EXPORT static void setSubpixelPositioning(bool);
     WEBKIT_EXPORT static void setLCDOrder(SkFontHost::LCDOrder);
     WEBKIT_EXPORT static void setLCDOrientation(SkFontHost::LCDOrientation);
-
-#if WEBKIT_IMPLEMENTATION
-    static SkPaint::Hinting hinting();
-    static bool autoHint();
-    static bool useBitmaps();
-    static bool antiAlias();
-    static bool subpixelRendering();
-    static bool subpixelPositioning();
-#endif
 };
 
 } // namespace WebKit
 #include "config.h"
 #include "WebFontRendering.h"
 
+#include "FontPlatformData.h"
+
 #if OS(LINUX)
 #include "WebFontInfo.h"
 #endif
 
-namespace {
-
-SkPaint::Hinting skiaHinting = SkPaint::kNormal_Hinting;
-bool useSkiaAutoHint = true;
-bool useSkiaBitmaps = true;
-bool useSkiaAntiAlias = true;
-bool useSkiaSubpixelRendering = false;
-bool useSkiaSubpixelPositioning = false;
-
-}
+using WebCore::FontPlatformData;
 
 namespace WebKit {
 
 // static
 void WebFontRendering::setHinting(SkPaint::Hinting hinting)
 {
-    skiaHinting = hinting;
-}
-
-// static
-SkPaint::Hinting WebFontRendering::hinting()
-{
-    return skiaHinting;
+    FontPlatformData::setHinting(hinting);
 }
 
 // static
 void WebFontRendering::setAutoHint(bool useAutoHint)
 {
-    useSkiaAutoHint = useAutoHint;
-}
-
-// static
-bool WebFontRendering::autoHint()
-{
-    return useSkiaAutoHint;
+    FontPlatformData::setAutoHint(useAutoHint);
 }
 
 // static
 void WebFontRendering::setUseBitmaps(bool useBitmaps)
 {
-    useSkiaBitmaps = useBitmaps;
-}
-
-// static
-bool WebFontRendering::useBitmaps()
-{
-    return useSkiaBitmaps;
+    FontPlatformData::setUseBitmaps(useBitmaps);
 }
 
 // static
 void WebFontRendering::setAntiAlias(bool useAntiAlias)
 {
-    useSkiaAntiAlias = useAntiAlias;
-}
-
-// static
-bool WebFontRendering::antiAlias()
-{
-    return useSkiaAntiAlias;
+    FontPlatformData::setAntiAlias(useAntiAlias);
 }
 
 // static
 void WebFontRendering::setSubpixelRendering(bool useSubpixelRendering)
 {
-    useSkiaSubpixelRendering = useSubpixelRendering;
-}
-
-// static
-bool WebFontRendering::subpixelRendering()
-{
-    return useSkiaSubpixelRendering;
+    FontPlatformData::setSubpixelRendering(useSubpixelRendering);
 }
 
 // static
 void WebFontRendering::setSubpixelPositioning(bool useSubpixelPositioning)
 {
-    useSkiaSubpixelPositioning = useSubpixelPositioning;
+    FontPlatformData::setSubpixelPositioning(useSubpixelPositioning);
 #if OS(LINUX)
     WebFontInfo::setSubpixelPositioning(useSubpixelPositioning);
 #endif
 }
 
 // static
-bool WebFontRendering::subpixelPositioning()
-{
-    return useSkiaSubpixelPositioning;
-}
-
-// static
 void WebFontRendering::setLCDOrder(SkFontHost::LCDOrder order)
 {
     SkFontHost::SetSubpixelOrder(order);
index d87fa5b..e3c5a11 100644 (file)
@@ -1,3 +1,16 @@
+2012-06-15  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r120511.
+        http://trac.webkit.org/changeset/120511
+        https://bugs.webkit.org/show_bug.cgi?id=89255
+
+        Breaks at least Android builder (Requested by wangxianzhu on
+        #webkit).
+
+        * DumpRenderTree/chromium/LayoutTestController.cpp:
+        (LayoutTestController::reset):
+        (LayoutTestController::setTextSubpixelPositioning):
+
 2012-06-15  Xianzhu Wang  <wangxianzhu@chromium.org>
 
         [Chromium] Move chromium/public/linuxish/WebFontRendering.h out of linuxish directory
index 869c9b9..1f64d65 100644 (file)
@@ -46,7 +46,6 @@
 #include "WebDocument.h"
 #include "WebElement.h"
 #include "WebFindOptions.h"
-#include "WebFontRendering.h"
 #include "WebFrame.h"
 #include "WebGeolocationClientMock.h"
 #include "WebIDBFactory.h"
 #include <wtf/OwnArrayPtr.h>
 #endif
 
+#if OS(LINUX) || OS(ANDROID)
+#include "linuxish/WebFontRendering.h"
+#endif
+
 using namespace WebCore;
 using namespace WebKit;
 using namespace std;
@@ -698,7 +701,9 @@ void LayoutTestController::reset()
     m_taskList.revokeAll();
     m_shouldStayOnPageAfterHandlingBeforeUnload = false;
     m_hasCustomFullScreenBehavior = false;
+#if OS(LINUX) || OS(ANDROID)
     WebFontRendering::setSubpixelPositioning(false);
+#endif
 }
 
 void LayoutTestController::locationChangeDone()
@@ -2189,10 +2194,12 @@ void LayoutTestController::deliverWebIntent(const CppArgumentList& arguments, Cp
 
 void LayoutTestController::setTextSubpixelPositioning(const CppArgumentList& arguments, CppVariant* result)
 {
+#if OS(LINUX) || OS(ANDROID)
     // Since FontConfig doesn't provide a variable to control subpixel positioning, we'll fall back
     // to setting it globally for all fonts.
     if (arguments.size() > 0 && arguments[0].isBool())
         WebFontRendering::setSubpixelPositioning(arguments[0].value.boolValue);
+#endif
     result->setNull();
 }