[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

apavlov at chromium.org apavlov at chromium.org
Wed Dec 22 16:26:09 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 3c0a5f65329ad7afa3f16d006ceef404468667ce
Author: apavlov at chromium.org <apavlov at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Nov 23 18:31:05 2010 +0000

    2010-11-23  Alexander Pavlov  <apavlov at chromium.org>
    
            Reviewed by Pavel Feldman.
    
            Web Inspector: [STYLES] invalid color values are not marked as such.
            https://bugs.webkit.org/show_bug.cgi?id=49960
    
            Properties having a valid structure but invalid values will also
            be marked as non-parsedOk in the Styles pane.
    
            WebCore:
            * css/CSSGrammar.y:
            * inspector/InspectorStyleSheet.cpp:
            (WebCore::InspectorStyle::populateObjectWithStyleProperties):
    
            LayoutTests:
            * inspector/resources/styles-new-API.css:
            (body):
            * inspector/styles-new-API-expected.txt:
            * inspector/styles-source-offsets-expected.txt:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72615 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index caf2477..3ad582c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-11-23  Alexander Pavlov  <apavlov at chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: [STYLES] invalid color values are not marked as such.
+        https://bugs.webkit.org/show_bug.cgi?id=49960
+
+        * inspector/resources/styles-new-API.css:
+        (body):
+        * inspector/styles-new-API-expected.txt:
+        * inspector/styles-source-offsets-expected.txt:
+
 2010-11-23  Ilya Tikhonovsky  <loislo at chromium.org>
 
         Unreviewed. Updated chromium expectations.
diff --git a/LayoutTests/inspector/resources/styles-new-API.css b/LayoutTests/inspector/resources/styles-new-API.css
index f4af03c..7993b03 100644
--- a/LayoutTests/inspector/resources/styles-new-API.css
+++ b/LayoutTests/inspector/resources/styles-new-API.css
@@ -13,6 +13,7 @@ body {
     height: 100% !important;
     colorz: "!important";
     important:!important;
+    color: yellow;
     color: "badcolor" ! important /* good property with strange value */;
 }
 
diff --git a/LayoutTests/inspector/styles-new-API-expected.txt b/LayoutTests/inspector/styles-new-API-expected.txt
index d6422cb..7ec36e3 100644
--- a/LayoutTests/inspector/styles-new-API-expected.txt
+++ b/LayoutTests/inspector/styles-new-API-expected.txt
@@ -29,7 +29,8 @@ body: []
 ['height':'100% !important' is-important] @[109-133] active
 ['colorz':'"!important"' non-parsed] @[138-159] active
 ['important':'!important' non-parsed] @[164-185] active
-['color':'"badcolor" ! important /* good property with strange value */' is-important] @[190-259] active
+['color':'yellow'] @[190-204] active
+['color':'"badcolor" ! important /* good property with strange value */' is-important non-parsed] @[209-278] active
 
 rule
 body.main1: []
@@ -103,6 +104,7 @@ body {
     height: 100% !important;
     colorz: "!important";
     important:!important;
+    color: yellow;
     color: "badcolor" ! important /* good property with strange value */;
 }
 
@@ -133,7 +135,8 @@ body: []
 ['height':'100% !important' is-important] @[109-133] active
 ['colorz':'"!important"' non-parsed] @[138-159] active
 ['important':'!important' non-parsed] @[164-185] active
-['color':'"badcolor" ! important /* good property with strange value */' is-important] @[190-259] active
+['color':'yellow'] @[190-204] active
+['color':'"badcolor" ! important /* good property with strange value */' is-important non-parsed] @[209-278] active
 
 rule
 body.main1: []
@@ -198,7 +201,7 @@ StyleSheet: 'body.mainpage {    text-decoration: strikethrough;    badproperty:
 
 rule
 body.mainpage: []
-['text-decoration':'strikethrough'] @[4-35] active
+['text-decoration':'strikethrough' non-parsed] @[4-35] active
 ['badproperty':'2badvalue2' non-parsed] @[39-63] active
 
 rule
@@ -211,7 +214,7 @@ StyleSheet: 'html *, body[foo="bar"] {    text-decoration: strikethrough;    bad
 
 rule
 html *, body[foo="bar"]: []
-['text-decoration':'strikethrough'] @[4-35] active
+['text-decoration':'strikethrough' non-parsed] @[4-35] active
 ['badproperty':'2badvalue2' non-parsed] @[39-63] active
 
 rule
@@ -263,7 +266,8 @@ body: []
 ['height':'100% !important' is-important] @[109-133] active
 ['colorz':'"!important"' non-parsed] @[138-159] active
 ['important':'!important' non-parsed] @[164-185] active
-['color':'"badcolor" ! important /* good property with strange value */' is-important] @[190-259] active
+['color':'yellow'] @[190-204] active
+['color':'"badcolor" ! important /* good property with strange value */' is-important non-parsed] @[209-278] active
 
 rule
 html *, body[foo="bar"]: []
diff --git a/LayoutTests/inspector/styles-source-offsets-expected.txt b/LayoutTests/inspector/styles-source-offsets-expected.txt
index beec728..3edd2ce 100644
--- a/LayoutTests/inspector/styles-source-offsets-expected.txt
+++ b/LayoutTests/inspector/styles-source-offsets-expected.txt
@@ -8,7 +8,7 @@ body: [0-4] [6-266]
 ['height':'100% !important' !important] @[109-133]
 ['colorz':'"!important"' non-parsed] @[138-159]
 ['important':'' non-parsed] @[164-174]
-['color':'"badcolor" ! important /* good property with strange value */' !important] @[190-259]
+['color':'"badcolor" ! important /* good property with strange value */' !important non-parsed] @[190-259]
 body.main1: [298-336] [337-418]
 ['color':'#F00BAA'] @[13-28]
 ['zoo':'moo /* not an !important unrecognized property */' non-parsed] @[28-81]
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 073b8d4..492d872 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-11-23  Alexander Pavlov  <apavlov at chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: [STYLES] invalid color values are not marked as such.
+        https://bugs.webkit.org/show_bug.cgi?id=49960
+
+        Properties having a valid structure but invalid values will also
+        be marked as non-parsedOk in the Styles pane.
+
+        * css/CSSGrammar.y:
+        * inspector/InspectorStyleSheet.cpp:
+        (WebCore::InspectorStyle::populateObjectWithStyleProperties):
+
 2010-11-23  Adam Bergkvist  <adam.bergkvist at ericsson.com>
 
         Reviewed by Martin Robinson.
diff --git a/WebCore/css/CSSGrammar.y b/WebCore/css/CSSGrammar.y
index 5c77340..c045335 100644
--- a/WebCore/css/CSSGrammar.y
+++ b/WebCore/css/CSSGrammar.y
@@ -1294,11 +1294,9 @@ declaration:
             p->m_valueList = p->sinkFloatingValueList($4);
             int oldParsedProperties = p->m_numParsedProperties;
             $$ = p->parseValue($1, $5);
-            if (!$$) {
-                if (static_cast<int>(p->m_numParsedProperties) == oldParsedProperties)
-                    isPropertyParsed = true;
+            if (!$$)
                 p->rollbackLastProperties(p->m_numParsedProperties - oldParsedProperties);
-            } else
+            else
                 isPropertyParsed = true;
             delete p->m_valueList;
             p->m_valueList = 0;
diff --git a/WebCore/inspector/InspectorStyleSheet.cpp b/WebCore/inspector/InspectorStyleSheet.cpp
index 9f4ca37..7936b76 100644
--- a/WebCore/inspector/InspectorStyleSheet.cpp
+++ b/WebCore/inspector/InspectorStyleSheet.cpp
@@ -444,12 +444,27 @@ void InspectorStyle::populateObjectWithStyleProperties(InspectorObject* result)
                 property->setNumber("startOffset", propertyEntry.range.start);
                 property->setNumber("endOffset", propertyEntry.range.end);
 
+                // Parsed property overrides any property with the same name. Non-parsed property overrides
+                // previous non-parsed property with the same name (if any).
+                bool shouldInactivate = false;
                 HashMap<String, RefPtr<InspectorObject> >::iterator activeIt = propertyNameToPreviousActiveProperty.find(name);
                 if (activeIt != propertyNameToPreviousActiveProperty.end()) {
+                    if (propertyEntry.parsedOk)
+                        shouldInactivate = true;
+                    else {
+                        bool previousParsedOk;
+                        bool success = activeIt->second->getBoolean("parsedOk", &previousParsedOk);
+                        if (success && !previousParsedOk)
+                            shouldInactivate = true;
+                    }
+                } else
+                    propertyNameToPreviousActiveProperty.set(name, property);
+
+                if (shouldInactivate) {
                     activeIt->second->setString("status", "inactive");
                     activeIt->second->setString("shorthandName", "");
+                    propertyNameToPreviousActiveProperty.set(name, property);
                 }
-                propertyNameToPreviousActiveProperty.set(name, property);
             } else {
                 property->setBoolean("implicit", m_style->isPropertyImplicit(name));
                 property->setString("status", "style");

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list