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

eric at webkit.org eric at webkit.org
Thu Apr 8 00:11:01 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 0dd54ad256cb9ee8be262875b6f525c630d21104
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 2 05:51:15 2009 +0000

    2009-12-01  Chris Jerdonek  <chris.jerdonek at gmail.com>
    
            Reviewed by Darin Adler.
    
            Added clarifications to the web site regarding coding style and
            code cleanup--
    
            https://bugs.webkit.org/show_bug.cgi?id=31618
    
            Changes include the following:
    
            - Expanded the style guidelines regarding "using" statements.
            - Made the style guidelines page validate as HTML.
            - Added that legacy WebKit components should not be cleaned up.
            - Added that it is more acceptable to update style when already
              touching code.
    
            * coding/coding-style.html:
            * coding/contributing.html:
            * projects/cleanup/index.html:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51587 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitSite/ChangeLog b/WebKitSite/ChangeLog
index 2c9d0f8..5955103 100644
--- a/WebKitSite/ChangeLog
+++ b/WebKitSite/ChangeLog
@@ -1,3 +1,24 @@
+2009-12-01  Chris Jerdonek  <chris.jerdonek at gmail.com>
+
+        Reviewed by Darin Adler.
+
+        Added clarifications to the web site regarding coding style and
+        code cleanup--
+
+        https://bugs.webkit.org/show_bug.cgi?id=31618
+
+        Changes include the following:
+
+        - Expanded the style guidelines regarding "using" statements.
+        - Made the style guidelines page validate as HTML.
+        - Added that legacy WebKit components should not be cleaned up.
+        - Added that it is more acceptable to update style when already
+          touching code.
+
+        * coding/coding-style.html:
+        * coding/contributing.html:
+        * projects/cleanup/index.html:
+
 2009-11-18  Eric Seidel  <eric at webkit.org>
 
         Reviewed by David Levin.
diff --git a/WebKitSite/coding/coding-style.html b/WebKitSite/coding/coding-style.html
index 4ec9883..6be0ae6 100644
--- a/WebKitSite/coding/coding-style.html
+++ b/WebKitSite/coding/coding-style.html
@@ -1,8 +1,7 @@
 <?php 
     $title="WebKit Coding Style Guidelines";
-    include("../header.inc"); 
-?>
-
+    
+    $extra_head_content = <<<END
 <style type="text/css">
 pre .code {
    background-color: #F2F2F2;
@@ -18,6 +17,11 @@ pre .code {
 </style>
 
 
+END;
+
+    include("../header.inc"); 
+?>
+
 <h2>WebKit Coding Style Guidelines</h2>
 <h3>Indentation</h3>
 
@@ -701,11 +705,76 @@ Don't bother to organize them in a logical order.
 </pre>
 </ol>
 
-<h3>"using namespace" Statements</h3>
+<h3>"using" Statements</h3>
 
 <ol>
 
-<li>Do not use "using namespace" statements in header files.
+<li>In header files, do not use "using" statements in global or 
+"namespace" scope.
+
+<h4 class="right">Right:</h4>
+<pre class="code">
+// wtf/Vector.h
+
+namespace WTF {
+
+class VectorBuffer {
+    using std::min;
+    ...
+};
+
+} // namespace WTF
+</pre>
+<h4 class="wrong">Wrong:</h4>
+<pre class="code">
+// wtf/Vector.h
+
+namespace WTF {
+
+using std::min;
+    
+class VectorBuffer {
+    ...
+};
+
+} // namespace WTF
+</pre>
+</li>
+
+<li>It is acceptable, however, to use "using" declarations at the end of 
+header files in the WTF sub-libary to include one or more names in 
+the WTF namespace into the global scope.
+
+<h4 class="right">Right:</h4>
+<pre class="code">
+// wtf/Vector.h
+
+namespace WTF {
+
+} // namespace WTF
+
+using WTF::Vector;
+</pre>
+<h4 class="wrong">Wrong:</h4>
+<pre class="code">
+// wtf/Vector.h
+
+namespace WTF {
+
+} // namespace WTF
+
+using namespace WTF;
+</pre>
+<h4 class="wrong">Wrong:</h4>
+<pre class="code">
+// runtime/UString.h
+
+namespace WTF {
+
+} // namespace WTF
+
+using WTF::PlacementNewAdopt;
+</pre>
 </li>
 
 <li>Any "using namespace" statements for a nested namespace whose parent namespace 
diff --git a/WebKitSite/coding/contributing.html b/WebKitSite/coding/contributing.html
index ca5154d..c9063cc 100644
--- a/WebKitSite/coding/contributing.html
+++ b/WebKitSite/coding/contributing.html
@@ -20,9 +20,11 @@ Once you have the code <a href="/building/checkout.html">checked out</a>, <a hre
 
 
 <h3>Code Style Guidelines</h3>
-<p>In order for your patch to be landed, it's necessary that it comply to the <a href="/coding/coding-style.html">code style guidelines</a>.
-There are some older parts of the codebase that do not always follow these guidelines. If you come across code like this,
-it's generally best to clean it up to comply with the new guidelines.</p>
+<p>Patches must comply with the <a href="/coding/coding-style.html">code style guidelines</a>.
+Some older parts of the codebase do not follow these guidelines.
+If you are modifying such code, it is generally best to clean it up
+to comply with the current guidelines. An exception is legacy components,
+which should not be cleaned up.</p>
 
 <h3>Regression tests</h3>
 <p>Once you have made your changes, you need to run the regression tests, which is done via the <tt>run-webkit-tests</tt> script.
diff --git a/WebKitSite/projects/cleanup/index.html b/WebKitSite/projects/cleanup/index.html
index 609428f..82622e3 100644
--- a/WebKitSite/projects/cleanup/index.html
+++ b/WebKitSite/projects/cleanup/index.html
@@ -16,6 +16,11 @@ framework to better refactor code or to make simplifications that will help make
 <dl>
 <dt>Follow the Coding Style Guidelines</dt>
 <dd>We welcome patches that clean up code to follow our coding style guidelines.
+We especially encourage contributors to clean up code that they are already
+working on. It is less common for contributors to update style without
+making substantive changes. If you would like to clean up code without
+making substantive changes, you are advised to check with project members
+first.</dd>
 
 <dt>Eliminate Redundant Code in WebKit and WebCore</dt>
 <dd>Now that WebKit and WebCore are both open source, there is less of a need for an artificial barrier between the two frameworks.  Much of the Objective-C code that

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list