[Chromium] Seperate GTK specific Gyp rules from X11 Gyp rules
authorfsamuel@chromium.org <fsamuel@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Sep 2011 17:36:03 +0000 (17:36 +0000)
committerfsamuel@chromium.org <fsamuel@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Sep 2011 17:36:03 +0000 (17:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=68936

Reviewed by Tony Chang.

Source/WebCore:

Chromium need to be built without Gtk for future version of ChromiumOS.

* WebCore.gyp/WebCore.gyp:

Source/WebKit/chromium:

* WebKit.gyp:
* public/gtk/WebFontInfo.h:
* public/linux/WebFontInfo.h: Copied from Source/WebKit/chromium/public/gtk/WebFontInfo.h.

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

Source/WebCore/ChangeLog
Source/WebCore/WebCore.gyp/WebCore.gyp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKit.gyp
Source/WebKit/chromium/public/gtk/WebFontInfo.h
Source/WebKit/chromium/public/linux/WebFontInfo.h [new file with mode: 0644]

index 614ddf6..4de3b19 100644 (file)
@@ -1,3 +1,14 @@
+2011-09-28  Fady Samuel  <fsamuel@chromium.org>
+
+        [Chromium] Seperate GTK specific Gyp rules from X11 Gyp rules
+        https://bugs.webkit.org/show_bug.cgi?id=68936
+
+        Reviewed by Tony Chang.
+
+        Chromium need to be built without Gtk for future version of ChromiumOS.
+
+        * WebCore.gyp/WebCore.gyp:
+
 2011-09-28  Tom Sepez  <tsepez@chromium.org>
 
         Revert change which broke displaying end script tags in view-source, instead
index c16855f..b30e711 100644 (file)
             '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
           ],
         }],
-        ['toolkit_uses_gtk == 1', {
+        ['use_x11 == 1', {
           'dependencies': [
             '<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
-            '<(chromium_src_dir)/build/linux/system.gyp:gtk',
           ],
           'export_dependent_settings': [
             '<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
-            '<(chromium_src_dir)/build/linux/system.gyp:gtk',
           ],
           'direct_dependent_settings': {
             'cflags': [
             ],
           },
         }],
+        ['toolkit_uses_gtk == 1', {
+          'dependencies': [
+            '<(chromium_src_dir)/build/linux/system.gyp:gtk',
+          ],
+          'export_dependent_settings': [
+            '<(chromium_src_dir)/build/linux/system.gyp:gtk',
+          ],
+        }],
         ['OS=="linux"', {
           'direct_dependent_settings': {
             'defines': [
         ['exclude', 'platform/text/TextEncodingDetectorNone\\.cpp$'],
       ],
       'conditions': [
-        ['toolkit_uses_gtk == 1', {
+        ['use_x11 == 1', {
           'sources/': [
             # Cherry-pick files excluded by the broader regular expressions above.
-            ['include', 'platform/chromium/KeyCodeConversionGtk\\.cpp$'],
             ['include', 'platform/graphics/chromium/ComplexTextControllerLinux\\.cpp$'],
             ['include', 'platform/graphics/chromium/FontCacheLinux\\.cpp$'],
             ['include', 'platform/graphics/chromium/FontLinux\\.cpp$'],
             ['include', 'platform/graphics/chromium/FontPlatformDataLinux\\.cpp$'],
             ['include', 'platform/graphics/chromium/SimpleFontDataLinux\\.cpp$'],
           ],
+        }, { # use_x11==0
+          'sources/': [
+            ['exclude', 'Linux\\.cpp$'],
+            ['exclude', 'Harfbuzz[^/]+\\.(cpp|h)$'],
+          ],
         }],
-        ['toolkit_uses_gtk==1 or OS=="android"', {
+        ['toolkit_uses_gtk == 1', {
+          'sources/': [
+            # Cherry-pick files excluded by the broader regular expressions above.
+            ['include', 'platform/chromium/KeyCodeConversionGtk\\.cpp$'],
+          ],
+        }, { # toolkit_uses_gtk==0
+          'sources/': [
+            ['exclude', 'Gtk\\.cpp$'],
+          ],
+        }],
+        ['use_x11==1 or OS=="android"', {
           'dependencies': [
             '<(chromium_src_dir)/third_party/harfbuzz/harfbuzz.gyp:harfbuzz',
           ],
             ['exclude', 'platform/chromium/DragImageChromiumMac\\.cpp$'],
           ],
         }],
-        ['toolkit_uses_gtk == 0', {
-          'sources/': [
-            ['exclude', '(Gtk|Linux)\\.cpp$'],
-            ['exclude', 'Harfbuzz[^/]+\\.(cpp|h)$'],
-          ],
-        }],
-        ['toolkit_uses_gtk == 0 and (OS!="mac" or use_skia==0)', {
+        ['use_x11 == 0 and (OS!="mac" or use_skia==0)', {
           'sources/': [
             ['exclude', 'VDMX[^/]+\\.(cpp|h)$'],
           ],
           # warnings about uninitialized this.
           'cflags': ['-Wno-uninitialized'],
         }],
+        ['use_x11 == 0', {
+          'sources/': [
+            ['exclude', 'Linux\\.cpp$'],
+          ],
+        }],
         ['toolkit_uses_gtk == 0', {
           'sources/': [
-            ['exclude', '(Gtk|Linux)\\.cpp$'],
+            ['exclude', 'Gtk\\.cpp$'],
           ],
         }],
         ['OS!="mac"', {
           # warnings about uninitialized this.
           'cflags': ['-Wno-uninitialized'],
         }],
+        ['use_x11 == 0', {
+          'sources/': [
+            ['exclude', 'Linux\\.cpp$'],
+          ],
+        }],
         ['toolkit_uses_gtk == 0', {
           'sources/': [
-            ['exclude', '(Gtk|Linux)\\.cpp$'],
+            ['exclude', 'Gtk\\.cpp$'],
           ],
         }],
         ['OS!="mac"', {
index a113354..cb886ed 100644 (file)
@@ -1,3 +1,14 @@
+2011-09-28  Fady Samuel  <fsamuel@chromium.org>
+
+        [Chromium] Seperate GTK specific Gyp rules from X11 Gyp rules
+        https://bugs.webkit.org/show_bug.cgi?id=68936
+
+        Reviewed by Tony Chang.
+
+        * WebKit.gyp:
+        * public/gtk/WebFontInfo.h:
+        * public/linux/WebFontInfo.h: Copied from Source/WebKit/chromium/public/gtk/WebFontInfo.h.
+
 2011-09-27  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed.  Rolled DEPS.
index 030b713..8c49129 100644 (file)
                         }],
                     ],
                 }],
-                ['toolkit_uses_gtk == 1', {
+                ['use_x11 == 1', {
                     'dependencies': [
                         '<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
-                        '<(chromium_src_dir)/build/linux/system.gyp:gtk',
                         '<(chromium_src_dir)/build/linux/system.gyp:x11',
                     ],
                     'include_dirs': [
                         'public/x11',
-                        'public/gtk',
                         'public/linux',
                     ],
-                }, { # else: toolkit_uses_gtk != 1
+                }, { # else: use_x11 != 1
                     'sources/': [
-                        ['exclude', '/gtk/'],
                         ['exclude', '/x11/'],
                         ['exclude', '/linux/'],
                     ],
                 }],
+                ['toolkit_uses_gtk == 1', {
+                    'dependencies': [
+                        '<(chromium_src_dir)/build/linux/system.gyp:gtk',
+                    ],
+                    'include_dirs': [
+                        'public/gtk',
+                    ],
+                }, { # else: toolkit_uses_gtk != 1
+                    'sources/': [
+                        ['exclude', '/gtk/'],
+                    ],
+                }],
                 ['OS=="android"', {
                     'include_dirs': [
                         'public/android',
                         ['exclude', 'Mac\\.cpp$'],
                     ],
                 }],
-                ['toolkit_uses_gtk == 1', {
+                ['use_x11 == 1', {
                     'dependencies': [
                         '<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
-                        '<(chromium_src_dir)/build/linux/system.gyp:gtk',
-                    ],
-                    'include_dirs': [
-                        'public/gtk',
                     ],
                     'copies': [{
                         'destination': '<(PRODUCT_DIR)',
                             ],
                         }],
                     ],
+                },{ # use_x11 != 1
+                    'sources/': [
+                        ['exclude', 'Linux\\.cpp$']
+                    ]
+                }],
+                ['toolkit_uses_gtk == 1', {
+                    'dependencies': [
+                        '<(chromium_src_dir)/build/linux/system.gyp:gtk',
+                    ],
+                    'include_dirs': [
+                        'public/gtk',
+                    ],
                 },{ # toolkit_uses_gtk != 1
                     'sources/': [
-                        ['exclude', '(Gtk|Linux)\\.cpp$']
+                        ['exclude', 'Gtk\\.cpp$']
                     ]
                 }],
                 ['OS!="android"', {
index 5d52584..2fc00ba 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2011 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
  * (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 WebFontInfo_h
-#define WebFontInfo_h
-
-#include "../WebCString.h"
-#include "../linux/WebFontRenderStyle.h"
-
-#include <string.h>
-#include <unistd.h>
-
-namespace WebKit {
-
-class WebFontInfo {
-public:
-    // Return a font family which provides glyphs for the Unicode code points
-    // specified by |utf16|
-    //   characters: a native-endian UTF16 string
-    //   numCharacters: the number of 16-bit words in |utf16|
-    //   preferredLocale: preferred locale identifier for the |characters|
-    //                    (e.g. "en", "ja", "zh-CN")
-    //
-    // Returns: the font family or an empty string if the request could not be
-    // satisfied.
-    WEBKIT_EXPORT static WebCString familyForChars(const WebUChar* characters, size_t numCharacters, const char* preferredLocale);
-
-    // Fill out the given WebFontRenderStyle with the user's preferences for
-    // rendering the given font at the given size.
-    //   family: i.e. "Times New Roman"
-    //   sizeAndStyle:
-    //      3322222222221111111111
-    //      10987654321098765432109876543210
-    //     +--------------------------------+
-    //     |..............Size............IB|
-    //     +--------------------------------+
-    //     I: italic flag
-    //     B: bold flag
-    WEBKIT_EXPORT static void renderStyleForStrike(const char* family, int sizeAndStyle, WebFontRenderStyle* result);
-};
-
-} // namespace WebKit
-
-#endif
+// This file can be deleted once http://codereview.chromium.org/8054025/
+// gets committed in Chromium.
+#include "../linux/WebFontInfo.h"
diff --git a/Source/WebKit/chromium/public/linux/WebFontInfo.h b/Source/WebKit/chromium/public/linux/WebFontInfo.h
new file mode 100644 (file)
index 0000000..5d52584
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * 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 WebFontInfo_h
+#define WebFontInfo_h
+
+#include "../WebCString.h"
+#include "../linux/WebFontRenderStyle.h"
+
+#include <string.h>
+#include <unistd.h>
+
+namespace WebKit {
+
+class WebFontInfo {
+public:
+    // Return a font family which provides glyphs for the Unicode code points
+    // specified by |utf16|
+    //   characters: a native-endian UTF16 string
+    //   numCharacters: the number of 16-bit words in |utf16|
+    //   preferredLocale: preferred locale identifier for the |characters|
+    //                    (e.g. "en", "ja", "zh-CN")
+    //
+    // Returns: the font family or an empty string if the request could not be
+    // satisfied.
+    WEBKIT_EXPORT static WebCString familyForChars(const WebUChar* characters, size_t numCharacters, const char* preferredLocale);
+
+    // Fill out the given WebFontRenderStyle with the user's preferences for
+    // rendering the given font at the given size.
+    //   family: i.e. "Times New Roman"
+    //   sizeAndStyle:
+    //      3322222222221111111111
+    //      10987654321098765432109876543210
+    //     +--------------------------------+
+    //     |..............Size............IB|
+    //     +--------------------------------+
+    //     I: italic flag
+    //     B: bold flag
+    WEBKIT_EXPORT static void renderStyleForStrike(const char* family, int sizeAndStyle, WebFontRenderStyle* result);
+};
+
+} // namespace WebKit
+
+#endif