<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>137620</bug_id>
          
          <creation_ts>2014-10-10 11:55:12 -0700</creation_ts>
          <short_desc>Web Inspector: Poor CSS warning message with missing spaces in calc() +/- operation</short_desc>
          <delta_ts>2026-01-12 09:03:53 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joseph Pecoraro">joepeck</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>benjamin</cc>
    
    <cc>graouts</cc>
    
    <cc>inspector-bugzilla-changes</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1040986</commentid>
    <comment_count>0</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2014-10-10 11:55:12 -0700</bug_when>
    <thetext>* TEST
div {
    background-size: calc(50%+1px);
}

* UNEXPECTED WARNING
[Warning] Unexpected CSS token: ) (style.css, line 2)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1040987</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2014-10-10 11:55:34 -0700</bug_when>
    <thetext>&lt;rdar://problem/18613467&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1040988</commentid>
    <comment_count>2</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2014-10-10 11:57:29 -0700</bug_when>
    <thetext>Err, I think this comes from the CSS parser (CSSParser::syntaxError).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1040989</commentid>
    <comment_count>3</comment_count>
      <attachid>239640</attachid>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2014-10-10 11:57:43 -0700</bug_when>
    <thetext>Created attachment 239640
[TEST] Reduction</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1040991</commentid>
    <comment_count>4</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2014-10-10 12:13:08 -0700</bug_when>
    <thetext>Heck, just calc(50px) emits the warning.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1041003</commentid>
    <comment_count>5</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2014-10-10 13:15:56 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; Heck, just calc(50px) emits the warning.

Nevermind, this seemed to work fine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1041004</commentid>
    <comment_count>6</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2014-10-10 13:18:58 -0700</bug_when>
    <thetext>Seems like this may be an issue with operators!

    background-size: calc(50% +1px); /* warning */
    background-size: calc(50% + 1px); /* okay */</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1041005</commentid>
    <comment_count>7</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2014-10-10 13:21:30 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; Seems like this may be an issue with operators!
&gt; 
&gt;     background-size: calc(50% +1px); /* warning */
&gt;     background-size: calc(50% + 1px); /* okay */

Well, this may be behaves correctly:

/*
 * The grammar requires spaces around binary ‘+’ and ‘-’ operators.
 * The &apos;*&apos; and &apos;/&apos; operators do not require spaces.
 * http://www.w3.org/TR/css3-values/#calc-syntax
 */

I&apos;m going to leave this bug open, as we should have a better warning in this case.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>239640</attachid>
            <date>2014-10-10 11:57:43 -0700</date>
            <delta_ts>2014-10-10 11:57:43 -0700</delta_ts>
            <desc>[TEST] Reduction</desc>
            <filename>reduction.html</filename>
            <type>text/html</type>
            <size>61</size>
            <attacher name="Joseph Pecoraro">joepeck</attacher>
            
              <data encoding="base64">PHN0eWxlPgpkaXYgewogICAgYmFja2dyb3VuZC1zaXplOiBjYWxjKDUwJSsxcHgpOwp9Cjwvc3R5
bGU+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>