[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00

zecke at webkit.org zecke at webkit.org
Wed Mar 17 18:27:47 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 1057ccad39bdfb723387f668a1bacb8d9601d9d7
Author: zecke at webkit.org <zecke at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Mar 8 08:16:54 2010 +0000

    [iexploder] Automatically update htmltags.in and htmlattrs.in too
    
    https://bugs.webkit.org/show_bug.cgi?id=33755
    
    Change the update-iexploder-cssproperites script to update
    the htmlattrs.in and htmltags.in of WebKitTools/iExploder/htdocs
    automatically as well.
    
    Change the reading and writing code to work with parameters
    and extend the method that is parsing the .in files to handle
    the HTMLTagNames.in and the HTMLAttributeNames.in files.
    
    Remove custom code to determine the revision of files with a
    utility of VCUtils.pm to determine the revision of the directory
    these files are located in. This will also work with git checkout.
    
    * Scripts/update-iexploder-cssproperties:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55658 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index a2da152..3dc4700 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,24 @@
+2010-03-08  Holger Hans Peter Freyther  <zecke at selfish.org>
+
+        Reviewed by Darin Adler.
+
+        [iexploder] Automatically update htmltags.in and htmlattrs.in too
+        https://bugs.webkit.org/show_bug.cgi?id=33755
+
+        Change the update-iexploder-cssproperites script to update
+        the htmlattrs.in and htmltags.in of WebKitTools/iExploder/htdocs
+        automatically as well.
+
+        Change the reading and writing code to work with parameters
+        and extend the method that is parsing the .in files to handle
+        the HTMLTagNames.in and the HTMLAttributeNames.in files.
+
+        Remove custom code to determine the revision of files with a
+        utility of VCUtils.pm to determine the revision of the directory
+        these files are located in. This will also work with git checkout.
+
+        * Scripts/update-iexploder-cssproperties:
+
 2010-03-07  Shinichiro Hamaji  <hamaji at chromium.org>
 
         Reviewed by Eric Seidel.
diff --git a/WebKitTools/Scripts/update-iexploder-cssproperties b/WebKitTools/Scripts/update-iexploder-cssproperties
index b7ae6cb..3fbcf83 100755
--- a/WebKitTools/Scripts/update-iexploder-cssproperties
+++ b/WebKitTools/Scripts/update-iexploder-cssproperties
@@ -1,6 +1,7 @@
 #!/usr/bin/perl
 
 # Copyright (C) 2007 Apple Inc.  All rights reserved.
+# Copyright (C) 2010 Holger Hans Peter Freyther
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -26,87 +27,103 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-# This script updates WebKitTools/iExploder/htdocs/cssproperties.in based on
-# WebCore/css/CSSPropertyNames.in.
+# This script updates WebKitTools/iExploder/htdocs/*.in based on
+# WebCore/css/CSSPropertyNames.in, WebCore/html/HTMLTagNames.in
+# and WebCore/html/HTMLAttributeNames.in
 
 use warnings;
 use strict;
 
 use FindBin;
 use lib $FindBin::Bin;
+use VCSUtils;
 use webkitdirs;
 
 use File::Spec;
 
-sub generateSectionFromCSSPropertyNamesFile();
-sub readiExploderFile();
-sub svnRevision($);
-sub writeiExploderFile();
+sub generateEntityListFromFile($);
+sub readiExploderFile($);
+sub update($$);
+sub writeiExploderFile($@);
 
-my $iExploderFile = File::Spec->catfile(sourceDir(), split("/", "WebKitTools/iExploder/htdocs/cssproperties.in"));
-my $cssPropertyNamesFile = File::Spec->catfile(sourceDir(), split("/", "WebCore/css/CSSPropertyNames.in"));
-
-my @sections = readiExploderFile();
-$sections[0] = generateSectionFromCSSPropertyNamesFile();
-writeiExploderFile();
-
-print `svn stat $iExploderFile`;
+update("cssproperties.in", "css/CSSPropertyNames.in");
+update("htmlattrs.in", "html/HTMLAttributeNames.in");
+update("htmltags.in", "html/HTMLTagNames.in");
 print "Successfully updated!\n";
 
 exit 0;
 
-sub generateSectionFromCSSPropertyNamesFile()
+sub generateEntityListFromFile($)
 {
-    my $revision = svnRevision($cssPropertyNamesFile);
-    my $path = File::Spec->abs2rel($cssPropertyNamesFile, sourceDir());
+    my ($filename) = @_;
+
+    my $revision = svnRevisionForDirectory(dirname($filename));
+    my $path = File::Spec->abs2rel($filename, sourceDir());
     my $result = "# From WebKit svn r" . $revision . " (" . $path . ")\n";
 
-    my @properties = ();
+    my @entities = ();
+    my $in_namespace = 0;
 
-    open(IN, $cssPropertyNamesFile) || die "$!";
+    open(IN, $filename) || die "$!";
     while (my $l = <IN>) {
         chomp $l;
+        if ($l =~ m/^namespace=\"/) {
+            $in_namespace = 1;
+        } elsif ($in_namespace && $l =~ m/^$/) {
+            $in_namespace = 0;
+        }
+
+        next if $in_namespace;
         next if $l =~ m/^\s*#/ || $l =~ m/^\s*$/;
-        push(@properties, $l);
+
+        # For HTML Tags that can have additional information
+        if ($l =~ m/ /) {
+            my @split = split / /, $l;
+            $l = $split[0]
+        }
+
+        push(@entities, $l);
     }
     close(IN);
 
-    $result .= join("\n", sort { $a cmp $b } @properties) . "\n\n";
+    $result .= join("\n", sort { $a cmp $b } @entities) . "\n\n";
 
     return $result;
 }
 
-sub readiExploderFile()
+sub readiExploderFile($)
 {
+    my ($filename) = @_;
+
     my @sections = ();
     local $/ = "\n\n";
 
-    open(IN, $iExploderFile) || die "$!";
+    open(IN, $filename) || die "$!";
     @sections = <IN>;
     close(IN);
 
     return @sections;
 }
 
-sub svnRevision($)
+sub update($$)
 {
-    my ($file) = @_;
-    my $revision = "";
+    my ($iexploderPath, $webcorePath) = @_;
 
-    open INFO, "svn info '$file' |" or die;
-    while (<INFO>) {
-        if (/^Revision: (.+)/) {
-            $revision = $1;
-        }
-    }
-    close INFO;
+    $iexploderPath = File::Spec->catfile(sourceDir(), "WebKitTools", "iExploder", "htdocs", split("/", $iexploderPath));
+    $webcorePath = File::Spec->catfile(sourceDir(), "WebCore", split("/", $webcorePath));
 
-    return $revision ? $revision : "UNKNOWN";
+    my @sections = readiExploderFile($iexploderPath);
+    $sections[0] = generateEntityListFromFile($webcorePath);
+    writeiExploderFile($iexploderPath, @sections);
 }
 
-sub writeiExploderFile()
+
+sub writeiExploderFile($@)
 {
-    open(OUT, "> $iExploderFile") || die "$!";
+    my ($filename, @sections) = @_;
+
+    open(OUT, "> $filename") || die "$!";
     print OUT join("", @sections);
     close(OUT);
 }
+

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list