Diff
Modified: trunk/Source/WebCore/ChangeLog (120542 => 120543)
--- trunk/Source/WebCore/ChangeLog 2012-06-17 01:01:49 UTC (rev 120542)
+++ trunk/Source/WebCore/ChangeLog 2012-06-17 01:05:07 UTC (rev 120543)
@@ -1,5 +1,26 @@
2012-06-16 Sheriff Bot <[email protected]>
+ Unreviewed, rolling out r120536.
+ http://trac.webkit.org/changeset/120536
+ https://bugs.webkit.org/show_bug.cgi?id=89296
+
+ Does not compile on chromium-linux (Requested by abarth 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-16 Sheriff Bot <[email protected]>
+
Unreviewed, rolling out r120539.
http://trac.webkit.org/changeset/120539
https://bugs.webkit.org/show_bug.cgi?id=89295
Modified: trunk/Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp (120542 => 120543)
--- trunk/Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp 2012-06-17 01:01:49 UTC (rev 120542)
+++ trunk/Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp 2012-06-17 01:05:07 UTC (rev 120543)
@@ -40,13 +40,47 @@
#include "SkPaint.h"
#include "SkTypeface.h"
-#include <public/WebFontRendering.h>
-#include <wtf/text/StringImpl.h>
+#include <wtf/text/StringImpl.h>
-using WebKit::WebFontRendering;
-
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 @@
{
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 @@
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
Modified: trunk/Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h (120542 => 120543)
--- trunk/Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h 2012-06-17 01:01:49 UTC (rev 120542)
+++ trunk/Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h 2012-06-17 01:05:07 UTC (rev 120543)
@@ -130,6 +130,16 @@
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();
Modified: trunk/Source/WebKit/chromium/ChangeLog (120542 => 120543)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-06-17 01:01:49 UTC (rev 120542)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-06-17 01:05:07 UTC (rev 120543)
@@ -1,5 +1,30 @@
2012-06-16 Sheriff Bot <[email protected]>
+ Unreviewed, rolling out r120536.
+ http://trac.webkit.org/changeset/120536
+ https://bugs.webkit.org/show_bug.cgi?id=89296
+
+ Does not compile on chromium-linux (Requested by abarth 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-16 Sheriff Bot <[email protected]>
+
Unreviewed, rolling out r120539.
http://trac.webkit.org/changeset/120539
https://bugs.webkit.org/show_bug.cgi?id=89295
Modified: trunk/Source/WebKit/chromium/WebKit.gyp (120542 => 120543)
--- trunk/Source/WebKit/chromium/WebKit.gyp 2012-06-17 01:01:49 UTC (rev 120542)
+++ trunk/Source/WebKit/chromium/WebKit.gyp 2012-06-17 01:05:07 UTC (rev 120543)
@@ -155,7 +155,6 @@
'public/WebFont.h',
'public/WebFontCache.h',
'public/WebFontDescription.h',
- 'public/WebFontRendering.h',
'public/WebFormControlElement.h',
'public/WebFormElement.h',
'public/WebFrame.h',
@@ -286,6 +285,7 @@
'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',
@@ -430,6 +430,7 @@
'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',
@@ -527,7 +528,6 @@
'src/WebFontDescription.cpp',
'src/WebFontImpl.cpp',
'src/WebFontImpl.h',
- 'src/WebFontRendering.cpp',
'src/WebFormControlElement.cpp',
'src/WebFormElement.cpp',
'src/WebFrameImpl.cpp',
Deleted: trunk/Source/WebKit/chromium/public/WebFontRendering.h (120542 => 120543)
--- trunk/Source/WebKit/chromium/public/WebFontRendering.h 2012-06-17 01:01:49 UTC (rev 120542)
+++ trunk/Source/WebKit/chromium/public/WebFontRendering.h 2012-06-17 01:05:07 UTC (rev 120543)
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WebFontRendering_h
-#define WebFontRendering_h
-
-#include "platform/WebCommon.h"
-#include <SkFontHost.h>
-#include <SkPaint.h>
-
-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);
- WEBKIT_EXPORT static void setUseBitmaps(bool);
- WEBKIT_EXPORT static void setAntiAlias(bool);
- WEBKIT_EXPORT static void setSubpixelRendering(bool);
- 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
-
-#endif
Modified: trunk/Source/WebKit/chromium/public/linux/WebFontRendering.h (120542 => 120543)
--- trunk/Source/WebKit/chromium/public/linux/WebFontRendering.h 2012-06-17 01:01:49 UTC (rev 120542)
+++ trunk/Source/WebKit/chromium/public/linux/WebFontRendering.h 2012-06-17 01:05:07 UTC (rev 120543)
@@ -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"
Copied: trunk/Source/WebKit/chromium/public/linuxish/WebFontRendering.h (from rev 120542, trunk/Source/WebKit/chromium/public/WebFontRendering.h) (0 => 120543)
--- trunk/Source/WebKit/chromium/public/linuxish/WebFontRendering.h (rev 0)
+++ trunk/Source/WebKit/chromium/public/linuxish/WebFontRendering.h 2012-06-17 01:05:07 UTC (rev 120543)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebFontRendering_h
+#define WebFontRendering_h
+
+#include "../platform/WebCommon.h"
+#include <SkFontHost.h>
+#include <SkPaint.h>
+
+namespace WebKit {
+
+class WebFontRendering {
+public:
+ // Set global font renderering preferences.
+
+ WEBKIT_EXPORT static void setHinting(SkPaint::Hinting);
+ WEBKIT_EXPORT static void setAutoHint(bool);
+ WEBKIT_EXPORT static void setUseBitmaps(bool);
+ WEBKIT_EXPORT static void setAntiAlias(bool);
+ WEBKIT_EXPORT static void setSubpixelRendering(bool);
+ WEBKIT_EXPORT static void setSubpixelPositioning(bool);
+ WEBKIT_EXPORT static void setLCDOrder(SkFontHost::LCDOrder);
+ WEBKIT_EXPORT static void setLCDOrientation(SkFontHost::LCDOrientation);
+};
+
+} // namespace WebKit
+
+#endif
Deleted: trunk/Source/WebKit/chromium/src/WebFontRendering.cpp (120542 => 120543)
--- trunk/Source/WebKit/chromium/src/WebFontRendering.cpp 2012-06-17 01:01:49 UTC (rev 120542)
+++ trunk/Source/WebKit/chromium/src/WebFontRendering.cpp 2012-06-17 01:05:07 UTC (rev 120543)
@@ -1,138 +0,0 @@
-/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WebFontRendering.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;
-
-}
-
-namespace WebKit {
-
-// static
-void WebFontRendering::setHinting(SkPaint::Hinting hinting)
-{
- skiaHinting = hinting;
-}
-
-// static
-SkPaint::Hinting WebFontRendering::hinting()
-{
- return skiaHinting;
-}
-
-// static
-void WebFontRendering::setAutoHint(bool useAutoHint)
-{
- useSkiaAutoHint = useAutoHint;
-}
-
-// static
-bool WebFontRendering::autoHint()
-{
- return useSkiaAutoHint;
-}
-
-// static
-void WebFontRendering::setUseBitmaps(bool useBitmaps)
-{
- useSkiaBitmaps = useBitmaps;
-}
-
-// static
-bool WebFontRendering::useBitmaps()
-{
- return useSkiaBitmaps;
-}
-
-// static
-void WebFontRendering::setAntiAlias(bool useAntiAlias)
-{
- useSkiaAntiAlias = useAntiAlias;
-}
-
-// static
-bool WebFontRendering::antiAlias()
-{
- return useSkiaAntiAlias;
-}
-
-// static
-void WebFontRendering::setSubpixelRendering(bool useSubpixelRendering)
-{
- useSkiaSubpixelRendering = useSubpixelRendering;
-}
-
-// static
-bool WebFontRendering::subpixelRendering()
-{
- return useSkiaSubpixelRendering;
-}
-
-// static
-void WebFontRendering::setSubpixelPositioning(bool useSubpixelPositioning)
-{
- useSkiaSubpixelPositioning = useSubpixelPositioning;
-#if OS(LINUX)
- WebFontInfo::setSubpixelPositioning(useSubpixelPositioning);
-#endif
-}
-
-// static
-bool WebFontRendering::subpixelPositioning()
-{
- return useSkiaSubpixelPositioning;
-}
-
-// static
-void WebFontRendering::setLCDOrder(SkFontHost::LCDOrder order)
-{
- SkFontHost::SetSubpixelOrder(order);
-}
-
-// static
-void WebFontRendering::setLCDOrientation(SkFontHost::LCDOrientation orientation)
-{
- SkFontHost::SetSubpixelOrientation(orientation);
-}
-
-} // namespace WebKit
Copied: trunk/Source/WebKit/chromium/src/linuxish/WebFontRendering.cpp (from rev 120542, trunk/Source/WebKit/chromium/src/WebFontRendering.cpp) (0 => 120543)
--- trunk/Source/WebKit/chromium/src/linuxish/WebFontRendering.cpp (rev 0)
+++ trunk/Source/WebKit/chromium/src/linuxish/WebFontRendering.cpp 2012-06-17 01:05:07 UTC (rev 120543)
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebFontRendering.h"
+
+#include "FontPlatformData.h"
+
+#if OS(LINUX)
+#include "WebFontInfo.h"
+#endif
+
+using WebCore::FontPlatformData;
+
+namespace WebKit {
+
+// static
+void WebFontRendering::setHinting(SkPaint::Hinting hinting)
+{
+ FontPlatformData::setHinting(hinting);
+}
+
+// static
+void WebFontRendering::setAutoHint(bool useAutoHint)
+{
+ FontPlatformData::setAutoHint(useAutoHint);
+}
+
+// static
+void WebFontRendering::setUseBitmaps(bool useBitmaps)
+{
+ FontPlatformData::setUseBitmaps(useBitmaps);
+}
+
+// static
+void WebFontRendering::setAntiAlias(bool useAntiAlias)
+{
+ FontPlatformData::setAntiAlias(useAntiAlias);
+}
+
+// static
+void WebFontRendering::setSubpixelRendering(bool useSubpixelRendering)
+{
+ FontPlatformData::setSubpixelRendering(useSubpixelRendering);
+}
+
+// static
+void WebFontRendering::setSubpixelPositioning(bool useSubpixelPositioning)
+{
+ FontPlatformData::setSubpixelPositioning(useSubpixelPositioning);
+#if OS(LINUX)
+ WebFontInfo::setSubpixelPositioning(useSubpixelPositioning);
+#endif
+}
+
+// static
+void WebFontRendering::setLCDOrder(SkFontHost::LCDOrder order)
+{
+ SkFontHost::SetSubpixelOrder(order);
+}
+
+// static
+void WebFontRendering::setLCDOrientation(SkFontHost::LCDOrientation orientation)
+{
+ SkFontHost::SetSubpixelOrientation(orientation);
+}
+
+} // namespace WebKit
Modified: trunk/Tools/ChangeLog (120542 => 120543)
--- trunk/Tools/ChangeLog 2012-06-17 01:01:49 UTC (rev 120542)
+++ trunk/Tools/ChangeLog 2012-06-17 01:05:07 UTC (rev 120543)
@@ -1,3 +1,17 @@
+2012-06-16 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r120536.
+ http://trac.webkit.org/changeset/120536
+ https://bugs.webkit.org/show_bug.cgi?id=89296
+
+ Does not compile on chromium-linux (Requested by abarth on
+ #webkit).
+
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::reset):
+ (LayoutTestController::setTextSubpixelPositioning):
+ * DumpRenderTree/chromium/TestShellAndroid.cpp:
+
2012-06-16 Adam Barth <[email protected]>
layoutTestController.setBackingScaleFactor is redundant with (and less awesome than) internals.settings.setDeviceScaleFactor
Modified: trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp (120542 => 120543)
--- trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp 2012-06-17 01:01:49 UTC (rev 120542)
+++ trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp 2012-06-17 01:05:07 UTC (rev 120543)
@@ -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"
@@ -79,6 +78,10 @@
#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 @@
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::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();
}
Modified: trunk/Tools/DumpRenderTree/chromium/TestShellAndroid.cpp (120542 => 120543)
--- trunk/Tools/DumpRenderTree/chromium/TestShellAndroid.cpp 2012-06-17 01:01:49 UTC (rev 120542)
+++ trunk/Tools/DumpRenderTree/chromium/TestShellAndroid.cpp 2012-06-17 01:05:07 UTC (rev 120543)
@@ -31,7 +31,7 @@
#include "config.h"
#include "TestShell.h"
-#include "WebFontRendering.h"
+#include "linuxish/WebFontRendering.h"
#include <android/log.h>
#include <errno.h>
#include <fcntl.h>