[Chromium] Let Android and Linux share WebFontRendering decl/impl.
authorwangxianzhu@chromium.org <wangxianzhu@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Jun 2012 03:28:12 +0000 (03:28 +0000)
committerwangxianzhu@chromium.org <wangxianzhu@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Jun 2012 03:28:12 +0000 (03:28 +0000)
https://bugs.webkit.org/show_bug.cgi?id=88802

Reviewed by Adam Barth.

* WebKit.gyp:
* public/linux/WebFontRendering.h: Temporarily forwards to the new file under linuxish.
* public/linuxish: Added.
* public/linuxish/WebFontRendering.h: Copied from chromium/public/linux/WebFontRendering.h.
* src/linux/WebFontRendering.cpp: Removed.
* src/linuxish: Added.
* src/linuxish/WebFontRendering.cpp: Copied from chromium/src/linux/WebFontRendering.cpp.

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

Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKit.gyp
Source/WebKit/chromium/public/linux/WebFontRendering.h
Source/WebKit/chromium/public/linuxish/WebFontRendering.h [new file with mode: 0644]
Source/WebKit/chromium/src/linuxish/WebFontRendering.cpp [moved from Source/WebKit/chromium/src/linux/WebFontRendering.cpp with 100% similarity]

index bb89789..e52fceb 100644 (file)
@@ -1,3 +1,18 @@
+2012-06-13  Xianzhu Wang  <wangxianzhu@chromium.org>
+
+        [Chromium] Let Android and Linux share WebFontRendering decl/impl.
+        https://bugs.webkit.org/show_bug.cgi?id=88802
+
+        Reviewed by Adam Barth.
+
+        * WebKit.gyp:
+        * public/linux/WebFontRendering.h: Temporarily forwards to the new file under linuxish.
+        * public/linuxish: Added.
+        * public/linuxish/WebFontRendering.h: Copied from chromium/public/linux/WebFontRendering.h.
+        * src/linux/WebFontRendering.cpp: Removed.
+        * src/linuxish: Added.
+        * src/linuxish/WebFontRendering.cpp: Copied from chromium/src/linux/WebFontRendering.cpp.
+
 2012-06-13  Ian Vollick  <vollick@chromium.org>
 
         [chromium] Certain settings in CCSettings could be global
index b19b3df..276c5a4 100644 (file)
                 'public/android/WebSandboxSupport.h',
                 'public/gtk/WebInputEventFactory.h',
                 'public/linux/WebFontRenderStyle.h',
-                'public/linux/WebFontRendering.h',
                 'public/linux/WebRenderTheme.h',
+                'public/linuxish/WebFontRendering.h',
                 'public/mac/WebInputEventFactory.h',
                 'public/mac/WebSandboxSupport.h',
                 'public/mac/WebScreenInfoFactory.h',
                 'src/PrerendererClientImpl.cpp',
                 'src/android/WebInputEventFactory.cpp',
                 'src/linux/WebFontInfo.cpp',
-                'src/linux/WebFontRendering.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',
                     'include_dirs': [
                         'public/x11',
                         'public/linux',
+                        'public/linuxish',
                     ],
                 }, { # else: use_x11 != 1
                     'sources/': [
                 ['OS=="android"', {
                     'include_dirs': [
                         'public/android',
+                        'public/linuxish',
                     ],
                 }, { # else: OS!="android"
                     'sources/': [
                         ['exclude', '/android/'],
                     ],
                 }],
+                # FIXME: Here and other places duplicate rules in Chromium's build/filename_rules.gypi.
+                # However without the duplication, gyp_webkit fails at least on chromium-win-release.
+                ['OS!="android" and OS!="linux" and OS!="openbsd" and OS!="freebsd"', {
+                    'sources/': [
+                        ['exclude', '/linuxish/'],
+                    ],
+                }],
                 # TODO: we exclude CG.cpp on both sides of the below conditional. Move elsewhere?
                 ['OS=="mac"', {
                     'include_dirs': [
index 172d3bd..715432c 100644 (file)
  * (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 setAntiAlias(bool);
-    WEBKIT_EXPORT static void setSubpixelGlyphs(bool); // DEPRECATED: use setSubpixelRendering instead
-    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
+// FIXME: Remove once http://codereview.chromium.org/10544103/ is landed.
+#include "../linuxish/WebFontRendering.h"
diff --git a/Source/WebKit/chromium/public/linuxish/WebFontRendering.h b/Source/WebKit/chromium/public/linuxish/WebFontRendering.h
new file mode 100644 (file)
index 0000000..172d3bd
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * 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 setAntiAlias(bool);
+    WEBKIT_EXPORT static void setSubpixelGlyphs(bool); // DEPRECATED: use setSubpixelRendering instead
+    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