<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[146781] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/146781">146781</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2013-03-25 09:28:29 -0700 (Mon, 25 Mar 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: Remove console warnings for *_ prefixed CSS styles
https://bugs.webkit.org/show_bug.cgi?id=113175

Patch by Sergey Ryazanov &lt;serya@chromium.org&gt; on 2013-03-25
Reviewed by Pavel Feldman.

Source/WebCore:

Added separate error message for syntax CSS error in declaration list when no property detected.
Added filter for messages starting with '*'.

* css/CSSGrammar.y.in:

LayoutTests:

* inspector/console/console-css-warnings-expected.txt:
* inspector/console/console-css-warnings.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsinspectorconsoleconsolecsswarningsexpectedtxt">trunk/LayoutTests/inspector/console/console-css-warnings-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorconsoleconsolecsswarningshtml">trunk/LayoutTests/inspector/console/console-css-warnings.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSGrammaryin">trunk/Source/WebCore/css/CSSGrammar.y.in</a></li>
<li><a href="#trunkSourceWebCorecssCSSParsercpp">trunk/Source/WebCore/css/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParserh">trunk/Source/WebCore/css/CSSParser.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorConsoleAgentcpp">trunk/Source/WebCore/inspector/InspectorConsoleAgent.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (146780 => 146781)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2013-03-25 16:16:25 UTC (rev 146780)
+++ trunk/LayoutTests/ChangeLog        2013-03-25 16:28:29 UTC (rev 146781)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2013-03-25  Sergey Ryazanov  &lt;serya@chromium.org&gt;
+
+        Web Inspector: Remove console warnings for *_ prefixed CSS styles
+        https://bugs.webkit.org/show_bug.cgi?id=113175
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/console/console-css-warnings-expected.txt:
+        * inspector/console/console-css-warnings.html:
+
</ins><span class="cx"> 2013-03-25  Jochen Eisinger  &lt;jochen@chromium.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Triage more test failures on content_shell
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorconsoleconsolecsswarningsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/console/console-css-warnings-expected.txt (146780 => 146781)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/console-css-warnings-expected.txt        2013-03-25 16:16:25 UTC (rev 146780)
+++ trunk/LayoutTests/inspector/console/console-css-warnings-expected.txt        2013-03-25 16:28:29 UTC (rev 146781)
</span><span class="lines">@@ -1,13 +1,15 @@
</span><span class="cx"> Tests CSS warnings are properly exposed.
</span><span class="cx"> 
</span><del>-Unexpected CSS token: # console-css-warnings.html:10
-Unexpected CSS token: { console-css-warnings.html:15
-Unexpected CSS token: # console-css-warnings.html:18
-Unexpected CSS token: # console-css-warnings.html:22
-Unexpected CSS token: # console-css-warnings.html:32
</del><ins>+Invalid CSS property declaration at: # console-css-warnings.html:10
+Invalid CSS property declaration at: { console-css-warnings.html:15
+Invalid CSS property declaration at: # console-css-warnings.html:18
+Invalid CSS property declaration at: # console-css-warnings.html:22
+Invalid CSS property declaration at: # console-css-warnings.html:32
+Unexpected CSS token: @ console-css-warnings.html:33
</ins><span class="cx"> Unexpected CSS token: { console-css-warnings.html:37
</span><span class="cx"> Unexpected CSS token: { console-css-warnings.html:38
</span><span class="cx"> Unexpected CSS token: { console-css-warnings.html:39
</span><span class="cx"> Unexpected CSS token: { console-css-warnings.html:40
</span><del>-Unexpected CSS token: * console-css-warnings.html:44
</del><ins>+Unexpected CSS token: @ console-css-warnings.html:45
+Unexpected CSS token: @ console-css-warnings.html:49
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorconsoleconsolecsswarningshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/console/console-css-warnings.html (146780 => 146781)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/console-css-warnings.html        2013-03-25 16:16:25 UTC (rev 146780)
+++ trunk/LayoutTests/inspector/console/console-css-warnings.html        2013-03-25 16:28:29 UTC (rev 146781)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> x {
</span><span class="cx">    color: red;
</span><span class="cx">    ###;
</span><del>-   color: #;
</del><ins>+   color: @;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> x {
</span><span class="lines">@@ -41,9 +41,14 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> x {
</span><del>-    color: *;  /* Test simple error to ensure parsing recovered. */
</del><ins>+    *zoom: @1;  /* IE hack. Ignored */
+    color: @;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+x {
+    color: @;  /* Test simple error to ensure parsing recovered. */
+}
+
</ins><span class="cx"> &lt;/style&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;script&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (146780 => 146781)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2013-03-25 16:16:25 UTC (rev 146780)
+++ trunk/Source/WebCore/ChangeLog        2013-03-25 16:28:29 UTC (rev 146781)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2013-03-25  Sergey Ryazanov  &lt;serya@chromium.org&gt;
+
+        Web Inspector: Remove console warnings for *_ prefixed CSS styles
+        https://bugs.webkit.org/show_bug.cgi?id=113175
+
+        Reviewed by Pavel Feldman.
+
+        Added separate error message for syntax CSS error in declaration list when no property detected.
+        Added filter for messages starting with '*'.
+
+        * css/CSSGrammar.y.in:
+
</ins><span class="cx"> 2013-03-25  Alexis Hetu  &lt;sugoi@chromium.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Integration of the Skia displacement mapping into WebKit
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSGrammaryin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSGrammar.y.in (146780 => 146781)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSGrammar.y.in        2013-03-25 16:16:25 UTC (rev 146780)
+++ trunk/Source/WebCore/css/CSSGrammar.y.in        2013-03-25 16:28:29 UTC (rev 146781)
</span><span class="lines">@@ -1551,19 +1551,19 @@
</span><span class="cx">         $$ = $1;
</span><span class="cx">     }
</span><span class="cx">     | errors invalid_block_list error {
</span><del>-        parser-&gt;syntaxError($1);
</del><ins>+        parser-&gt;syntaxError($1, CSSParser::PropertyDeclarationError);
</ins><span class="cx">         $$ = false;
</span><span class="cx">     }
</span><span class="cx">     | errors {
</span><del>-        parser-&gt;syntaxError($1);
</del><ins>+        parser-&gt;syntaxError($1, CSSParser::PropertyDeclarationError);
</ins><span class="cx">         $$ = false;
</span><span class="cx">     }
</span><span class="cx">     | decl_list errors {
</span><del>-        parser-&gt;syntaxError($2);
</del><ins>+        parser-&gt;syntaxError($2, CSSParser::PropertyDeclarationError);
</ins><span class="cx">         $$ = $1;
</span><span class="cx">     }
</span><span class="cx">     | decl_list error_location invalid_block_list {
</span><del>-        parser-&gt;syntaxError($2);
</del><ins>+        parser-&gt;syntaxError($2, CSSParser::PropertyDeclarationError);
</ins><span class="cx">         $$ = $1;
</span><span class="cx">     }
</span><span class="cx">     ;
</span><span class="lines">@@ -1582,12 +1582,12 @@
</span><span class="cx">         $$ = false;
</span><span class="cx">     }
</span><span class="cx">     | errors ';' maybe_space {
</span><del>-        parser-&gt;syntaxError($1);
</del><ins>+        parser-&gt;syntaxError($1, CSSParser::PropertyDeclarationError);
</ins><span class="cx">         parser-&gt;markPropertyStart();
</span><span class="cx">         $$ = false;
</span><span class="cx">     }
</span><span class="cx">     | errors invalid_block_list error ';' maybe_space {
</span><del>-        parser-&gt;syntaxError($1);
</del><ins>+        parser-&gt;syntaxError($1, CSSParser::PropertyDeclarationError);
</ins><span class="cx">         $$ = false;
</span><span class="cx">     }
</span><span class="cx">     | decl_list declaration ';' maybe_space {
</span><span class="lines">@@ -1597,12 +1597,12 @@
</span><span class="cx">             $$ = $2;
</span><span class="cx">     }
</span><span class="cx">     | decl_list errors ';' maybe_space {
</span><del>-        parser-&gt;syntaxError($2);
</del><ins>+        parser-&gt;syntaxError($2, CSSParser::PropertyDeclarationError);
</ins><span class="cx">         parser-&gt;markPropertyStart();
</span><span class="cx">         $$ = $1;
</span><span class="cx">     }
</span><span class="cx">     | decl_list errors invalid_block_list error ';' maybe_space {
</span><del>-        parser-&gt;syntaxError($2);
</del><ins>+        parser-&gt;syntaxError($2, CSSParser::PropertyDeclarationError);
</ins><span class="cx">         parser-&gt;markPropertyStart();
</span><span class="cx">         $$ = $1;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (146780 => 146781)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2013-03-25 16:16:25 UTC (rev 146780)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2013-03-25 16:28:29 UTC (rev 146781)
</span><span class="lines">@@ -11274,16 +11274,25 @@
</span><span class="cx">     return data.release();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CSSParser::syntaxError(Location location)
</del><ins>+void CSSParser::syntaxError(const Location&amp; location, SyntaxErrorType error)
</ins><span class="cx"> {
</span><span class="cx">     if (!isLoggingErrors())
</span><span class="cx">         return;
</span><span class="cx">     StringBuilder builder;
</span><del>-    builder.appendLiteral(&quot;Unexpected CSS token: &quot;);
</del><ins>+    switch (error) {
+    case PropertyDeclarationError:
+        builder.appendLiteral(&quot;Invalid CSS property declaration at: &quot;);
+        break;
+
+    default:
+        builder.appendLiteral(&quot;Unexpected CSS token: &quot;);
+    }
+
</ins><span class="cx">     if (location.token.is8Bit())
</span><span class="cx">         builder.append(location.token.characters8(), location.token.length());
</span><span class="cx">     else
</span><span class="cx">         builder.append(location.token.characters16(), location.token.length());
</span><ins>+
</ins><span class="cx">     logError(builder.toString(), location.lineNumber);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.h (146780 => 146781)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.h        2013-03-25 16:16:25 UTC (rev 146780)
+++ trunk/Source/WebCore/css/CSSParser.h        2013-03-25 16:28:29 UTC (rev 146781)
</span><span class="lines">@@ -76,6 +76,10 @@
</span><span class="cx"> 
</span><span class="cx"> public:
</span><span class="cx">     struct Location;
</span><ins>+    enum SyntaxErrorType {
+        PropertyDeclarationError,
+        GeneralSyntaxError
+    };
</ins><span class="cx"> 
</span><span class="cx">     CSSParser(const CSSParserContext&amp;);
</span><span class="cx"> 
</span><span class="lines">@@ -419,7 +423,7 @@
</span><span class="cx">     PassRefPtr&lt;CSSRuleSourceData&gt; popRuleData();
</span><span class="cx">     void resetPropertyRange() { m_propertyRange.start = m_propertyRange.end = UINT_MAX; }
</span><span class="cx">     bool isExtractingSourceData() const { return !!m_currentRuleDataStack; }
</span><del>-    void syntaxError(Location);
</del><ins>+    void syntaxError(const Location&amp;, SyntaxErrorType = GeneralSyntaxError);
</ins><span class="cx"> 
</span><span class="cx">     inline int lex(void* yylval) { return (this-&gt;*m_lexFunc)(yylval); }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorConsoleAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorConsoleAgent.cpp (146780 => 146781)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorConsoleAgent.cpp        2013-03-25 16:16:25 UTC (rev 146780)
+++ trunk/Source/WebCore/inspector/InspectorConsoleAgent.cpp        2013-03-25 16:28:29 UTC (rev 146781)
</span><span class="lines">@@ -188,6 +188,10 @@
</span><span class="cx">         clearMessages(&amp;error);
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    // Ignore errors like &quot;*property=value&quot;. This trick is used for IE7: http://stackoverflow.com/questions/4563651/what-does-an-asterisk-do-in-a-css-property-name
+    if (source == CSSMessageSource &amp;&amp; message.contains(&quot;: *&quot;))
+        return;
+
</ins><span class="cx">     bool canGenerateCallStack = !isWorkerAgent() &amp;&amp; m_frontend;
</span><span class="cx">     addConsoleMessage(adoptPtr(new ConsoleMessage(canGenerateCallStack, source, type, level, message, scriptId, lineNumber, state, requestIdentifier)));
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>