<?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>62097</bug_id>
          
          <creation_ts>2011-06-04 13:53:29 -0700</creation_ts>
          <short_desc>regression(87771): ternary operator incorrectly identified as bitfield</short_desc>
          <delta_ts>2011-06-06 12:36:24 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alex Milowski">alex</reporter>
          <assigned_to name="Yong Li">yong.li.webkit</assigned_to>
          <cc>eric</cc>
    
    <cc>levin</cc>
    
    <cc>webkit.review.bot</cc>
    
    <cc>yong.li.webkit</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>415531</commentid>
    <comment_count>0</comment_count>
    <who name="Alex Milowski">alex</who>
    <bug_when>2011-06-04 13:53:29 -0700</bug_when>
    <thetext>After the patch for bug 54807 was applied, the style check now incorrectly identifies code like:

   int heightDiff = m_scripts ? (m_scripts-&gt;offsetHeight() - maxHeight) / 2 : 0;

as a bitfield.  I had to change the code to:


   int heightDiff = m_scripts ?
                (m_scripts-&gt;offsetHeight() - maxHeight) / 2 
                : 0;

to get it to pass the style check.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>415544</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-06-04 14:29:23 -0700</bug_when>
    <thetext>I remember seeing that change go by.  Guess it needs some tweaking.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>415545</commentid>
    <comment_count>2</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-06-04 14:30:24 -0700</bug_when>
    <thetext>I wouldn&apos;t bother changing your code to make it pass the style check.  the style checker just needs to be fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>415843</commentid>
    <comment_count>3</comment_count>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2011-06-06 08:13:52 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; I wouldn&apos;t bother changing your code to make it pass the style check.  the style checker just needs to be fixed.

I should have filtered out the ?: case...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>415845</commentid>
    <comment_count>4</comment_count>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2011-06-06 08:17:35 -0700</bug_when>
    <thetext>I&apos;m working on this now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>415855</commentid>
    <comment_count>5</comment_count>
      <attachid>96096</attachid>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2011-06-06 09:09:13 -0700</bug_when>
    <thetext>Created attachment 96096
the patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>415885</commentid>
    <comment_count>6</comment_count>
      <attachid>96096</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-06-06 10:37:05 -0700</bug_when>
    <thetext>Comment on attachment 96096
the patch

View in context: https://bugs.webkit.org/attachment.cgi?id=96096&amp;action=review

&gt; Tools/Scripts/webkitpy/style/checkers/cpp.py:2925
&gt; +    matched = re.match(r&apos;\s*((const|mutable)\s+)?(char|(short(\s+int)?)|int|long(\s+(long|int))?)\s+[a-zA-Z_][a-zA-Z0-9_]*\s*:\s*\d+\s*;&apos;, line)

seems you meant + not *, or?

Unfortunate that we don&apos;t have a nice constant for &quot;identifier&quot; since that long regexp you added may be used in other places?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>415931</commentid>
    <comment_count>7</comment_count>
      <attachid>96096</attachid>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2011-06-06 11:55:56 -0700</bug_when>
    <thetext>Comment on attachment 96096
the patch

View in context: https://bugs.webkit.org/attachment.cgi?id=96096&amp;action=review

&gt;&gt; Tools/Scripts/webkitpy/style/checkers/cpp.py:2925
&gt;&gt; +    matched = re.match(r&apos;\s*((const|mutable)\s+)?(char|(short(\s+int)?)|int|long(\s+(long|int))?)\s+[a-zA-Z_][a-zA-Z0-9_]*\s*:\s*\d+\s*;&apos;, line)
&gt; 
&gt; seems you meant + not *, or?
&gt; 
&gt; Unfortunate that we don&apos;t have a nice constant for &quot;identifier&quot; since that long regexp you added may be used in other places?

The first character cannot be digit, so there must be one [a-zA-Z_]. Then the left can be 0-multiple [a-zA-Z0-9_]. But you are right, [a-zA-Z0-9_]+ should be enough in this case, and it is used at line 2791. I&apos;m not sure if we prefer strict match or loose (for parsing speed?). Seems every places in the file are doing their own jobs. I tend to leave the refine to the future patches :-P</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>415949</commentid>
    <comment_count>8</comment_count>
      <attachid>96096</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-06-06 12:36:20 -0700</bug_when>
    <thetext>Comment on attachment 96096
the patch

Clearing flags on attachment: 96096

Committed r88179: &lt;http://trac.webkit.org/changeset/88179&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>415950</commentid>
    <comment_count>9</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-06-06 12:36:24 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>96096</attachid>
            <date>2011-06-06 09:09:13 -0700</date>
            <delta_ts>2011-06-06 12:36:19 -0700</delta_ts>
            <desc>the patch</desc>
            <filename>62097.patch</filename>
            <type>text/plain</type>
            <size>2164</size>
            <attacher name="Yong Li">yong.li.webkit</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1Rvb2xzL0NoYW5nZUxvZyBiL1Rvb2xzL0NoYW5nZUxvZwppbmRleCA0OTQ5
YmU1Li4yZjRmMDg0IDEwMDY0NAotLS0gYS9Ub29scy9DaGFuZ2VMb2cKKysrIGIvVG9vbHMvQ2hh
bmdlTG9nCkBAIC0xLDMgKzEsMTMgQEAKKzIwMTEtMDYtMDYgIFlvbmcgTGkgIDx5b2xpQHJpbS5j
b20+CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgaHR0
cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTYyMDk3CisgICAgICAgIEZpeCB0
aGUgcHJvYmxlbSB0aGF0IGludGVncmFsIGJpdGZpZWxkIGNoZWNrIGluY29ycmVjdGx5IGJhcmtl
ZCBhdCA/OiBleHByZXNzaW9ucy4KKworICAgICAgICAqIFNjcmlwdHMvd2Via2l0cHkvc3R5bGUv
Y2hlY2tlcnMvY3BwLnB5OgorICAgICAgICAqIFNjcmlwdHMvd2Via2l0cHkvc3R5bGUvY2hlY2tl
cnMvY3BwX3VuaXR0ZXN0LnB5OgorCiAyMDExLTAyLTIyICBZb25nIExpICA8eW9saUByaW0uY29t
PgogCiAgICAgICAgIFJldmlld2VkIGJ5IEVyaWMgU2VpZGVsLgpkaWZmIC0tZ2l0IGEvVG9vbHMv
U2NyaXB0cy93ZWJraXRweS9zdHlsZS9jaGVja2Vycy9jcHAucHkgYi9Ub29scy9TY3JpcHRzL3dl
YmtpdHB5L3N0eWxlL2NoZWNrZXJzL2NwcC5weQppbmRleCA3NTQyNTVhLi5jYTVkMWQ5IDEw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