[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

levin at chromium.org levin at chromium.org
Thu Apr 8 00:10:02 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 1e35af71deff43dfc2eab6dc43095b000637965f
Author: levin at chromium.org <levin at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 2 01:26:54 2009 +0000

    check-webkit-style does not understand (Prefix)Foo(Custom|Gtk|CG|Mac).cpp including Foo.h
    https://bugs.webkit.org/show_bug.cgi?id=32033
    
    Reviewed by Eric Seidel.
    
    * Scripts/modules/cpp_style.py: Changed check for a possible primary header to use find
                                    instead of startswith.
    * Scripts/modules/cpp_style_unittest.py: Added a unit test for the new behavior.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51570 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 255c8a2..a163b7c 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,14 @@
+2009-12-01  David Levin  <levin at chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        check-webkit-style does not understand (Prefix)Foo(Custom|Gtk|CG|Mac).cpp including Foo.h
+        https://bugs.webkit.org/show_bug.cgi?id=32033
+
+        * Scripts/modules/cpp_style.py: Changed check for a possible primary header to use find
+                                        instead of startswith.
+        * Scripts/modules/cpp_style_unittest.py: Added a unit test for the new behavior.
+
 2009-12-01  Nikolas Zimmermann  <nzimmermann at rim.com>
 
         Not reviewed. Qt build almost fixed, DumpRenderTree should compile now as well.
diff --git a/WebKitTools/Scripts/modules/cpp_style.py b/WebKitTools/Scripts/modules/cpp_style.py
index 3207dba..990fcfe 100644
--- a/WebKitTools/Scripts/modules/cpp_style.py
+++ b/WebKitTools/Scripts/modules/cpp_style.py
@@ -2309,7 +2309,7 @@ def _classify_include(filename, include, is_system, include_state):
     include_base = FileInfo(include).base_name()
 
     # If we haven't encountered a primary header, then be lenient in checking.
-    if not include_state.visited_primary_section() and target_base.startswith(include_base):
+    if not include_state.visited_primary_section() and target_base.find(include_base) != -1:
         return _PRIMARY_HEADER
     # If we already encountered a primary header, perform a strict comparison.
     # In case the two filename bases are the same then the above lenient check
diff --git a/WebKitTools/Scripts/modules/cpp_style_unittest.py b/WebKitTools/Scripts/modules/cpp_style_unittest.py
index aa87588..7f5403f 100644
--- a/WebKitTools/Scripts/modules/cpp_style_unittest.py
+++ b/WebKitTools/Scripts/modules/cpp_style_unittest.py
@@ -2307,6 +2307,10 @@ class OrderOfIncludesTest(CppStyleTestBase):
                          classify_include('fooCustom.cpp',
                                           'foo.h',
                                           False, include_state))
+        self.assertEqual(cpp_style._PRIMARY_HEADER,
+                         classify_include('PrefixFooCustom.cpp',
+                                          'Foo.h',
+                                          False, include_state))
         # Tricky example where both includes might be classified as primary.
         self.assert_language_rules_check('ScrollbarThemeWince.cpp',
                                          '#include "config.h"\n'

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list