[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

joepeck at webkit.org joepeck at webkit.org
Thu Oct 29 20:38:44 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 3340969807a9096802d297625e7103670653f6c3
Author: joepeck at webkit.org <joepeck at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Oct 4 03:46:54 2009 +0000

    2009-10-03  Joseph Pecoraro  <joepeck at webkit.org>
    
            Reviewed by Timothy Hatcher.
    
            CSS Source View Should be Syntax Highlighted
            https://bugs.webkit.org/show_bug.cgi?id=14359
    
              Support for WebKit's CSS Variables @variables and var()
    
            * inspector/front-end/SourceFrame.js:
            (WebInspector.CSSSourceSyntaxHighligher):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49073 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e81b3d5..ce9f76f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,18 @@
 
         Reviewed by Timothy Hatcher.
 
+        CSS Source View Should be Syntax Highlighted
+        https://bugs.webkit.org/show_bug.cgi?id=14359
+
+          Support for WebKit's CSS Variables @variables and var()
+
+        * inspector/front-end/SourceFrame.js:
+        (WebInspector.CSSSourceSyntaxHighligher):
+
+2009-10-03  Joseph Pecoraro  <joepeck at webkit.org>
+
+        Reviewed by Timothy Hatcher.
+
         Inspector should remember preferences for docked/undocked etc
         https://bugs.webkit.org/show_bug.cgi?id=29089
 
diff --git a/WebCore/inspector/front-end/SourceFrame.js b/WebCore/inspector/front-end/SourceFrame.js
index 7929806..28f78a4 100644
--- a/WebCore/inspector/front-end/SourceFrame.js
+++ b/WebCore/inspector/front-end/SourceFrame.js
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2009 Joseph Pecoraro
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -813,7 +814,7 @@ WebInspector.CSSSourceSyntaxHighligher = function(table, sourceFrame) {
 
     this.findNumber = this.generateFinder(/^((-?(\d+|\d*\.\d+))|^(#[a-fA-F0-9]{3,6}))(?:\D|$)/, 1, "webkit-css-number");
     this.findUnits = this.generateFinder(/^(px|em|pt|in|cm|mm|pc|ex)(?:\W|$)/, 1, "webkit-css-unit");
-    this.findKeyword = this.generateFinder(/^(rgba?|hsla?)(?:\W|$)/, 1, "webkit-css-keyword");
+    this.findKeyword = this.generateFinder(/^(rgba?|hsla?|var)(?:\W|$)/, 1, "webkit-css-keyword");
     this.findSingleLineString = this.generateFinder(/^"(?:[^"\\]|\\.)*"|^'([^'\\]|\\.)*'/, 0, "webkit-css-string"); // " this quote keeps Xcode happy
     this.findSingleLineComment = this.generateFinder(/^\/\*.*?\*\//, 0, "webkit-css-comment");
     this.findMultilineCommentStart = this.generateFinder(/^\/\*.*$/, 0, "webkit-css-comment");
@@ -953,12 +954,13 @@ WebInspector.CSSSourceSyntaxHighligher.prototype = {
             }
 
             if (token) {
-                if (currChar === '@') {
+                if (currChar === "@") {
                     atRuleStarted = true;
 
-                    // The @font-face at-rule does not contain selectors like other at-rules
+                    // The @font-face, @page, and @variables at-rules do not contain selectors like other at-rules
                     // instead it acts as a selector and contains properties and values.
-                    atRuleIsSelector = /font-face/.test(token.textContent);
+                    var text = token.textContent;
+                    atRuleIsSelector = /font-face/.test(text) || /page/.test(text) || /variables/.test(text);
                 }
 
                 if (tmp !== i)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list