<?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>107365</bug_id>
          
          <creation_ts>2013-01-19 00:28:29 -0800</creation_ts>
          <short_desc>Simplify a list of negative PLATFORM() tests</short_desc>
          <delta_ts>2013-01-20 17:28:59 -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>Platform</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="Laszlo Gombos">laszlo.gombos</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>benjamin</cc>
    
    <cc>eric</cc>
    
    <cc>ojan.autocc</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>811339</commentid>
    <comment_count>0</comment_count>
    <who name="Laszlo Gombos">laszlo.gombos</who>
    <bug_when>2013-01-19 00:28:29 -0800</bug_when>
    <thetext>Document the list of ports that support Windows and use the documented list to simplify a serious of negative PLATFORM() tests into a simpler list of positive tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>811341</commentid>
    <comment_count>1</comment_count>
      <attachid>183609</attachid>
    <who name="Laszlo Gombos">laszlo.gombos</who>
    <bug_when>2013-01-19 00:36:01 -0800</bug_when>
    <thetext>Created attachment 183609
proposed change</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>811342</commentid>
    <comment_count>2</comment_count>
      <attachid>183609</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-01-19 00:41:11 -0800</bug_when>
    <thetext>Comment on attachment 183609
proposed change

Why should we do this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>811343</commentid>
    <comment_count>3</comment_count>
    <who name="Laszlo Gombos">laszlo.gombos</who>
    <bug_when>2013-01-19 00:48:25 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 183609 [details])
&gt; Why should we do this?

The change in Platform.h is basically an ASSERT for the build system. Self-documenting code.

The change in config.h IMHO makes the code more readable and maintainable. I would not feel comfortable making this change without the change in Platform.h.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>811344</commentid>
    <comment_count>4</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-01-19 00:50:04 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #2)
&gt; &gt; (From update of attachment 183609 [details] [details])
&gt; &gt; Why should we do this?
&gt; 
&gt; The change in Platform.h is basically an ASSERT for the build system. Self-documenting code.
&gt; 
&gt; The change in config.h IMHO makes the code more readable and maintainable. I would not feel comfortable making this change without the change in Platform.h.

The config.h change is r=me.  The Platform.h change is what I&apos;m confused by. :)  I&apos;m just not sure why it&apos;s important to have a list of ports which support windows.  We don&apos;t have the same for any other platform. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>811351</commentid>
    <comment_count>5</comment_count>
    <who name="Laszlo Gombos">laszlo.gombos</who>
    <bug_when>2013-01-19 01:15:27 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #3)
&gt; &gt; (In reply to comment #2)
&gt; &gt; &gt; (From update of attachment 183609 [details] [details] [details])

&gt; The Platform.h change is what I&apos;m confused by. :)  I&apos;m just not sure why it&apos;s important to have a list of ports which support windows.  

I do not really know the definite list of PLATFORM()s that support OS(WINDOWS) - I just made a best effort to list them. The only way to know is to run the test in Platform.h in all the bots/ports and see which one fails/who screams. I was thinking that perhaps we should leave this code in there so that the next guy making a similar change would not have this problem. If I made an error in my list of Windows ports than the change in config.h is wrong.

&gt; We don&apos;t have the same for any other platform. :)

I can add a list for other OS()s. 

Another example from Platform.h:

#if OS(DARWIN) &amp;&amp; !PLATFORM(GTK) &amp;&amp; !PLATFORM(QT)
#define ENABLE_PURGEABLE_MEMORY 1
#endif

I do not really know which ports would have ENABLE_PURGEABLE_MEMORY turned on. If I could replace the test with:

#if OS(DARWIN) &amp;&amp; (PLATFORM(MAC) || PLATFORM(WX))

than I would find the code more readable and maintainable. 


Not a big deal, I am OK either way, just wanted to make sure that I make my case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>811352</commentid>
    <comment_count>6</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-01-19 01:25:37 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #4)
&gt; &gt; (In reply to comment #3)
&gt; &gt; &gt; (In reply to comment #2)
&gt; &gt; &gt; &gt; (From update of attachment 183609 [details] [details] [details] [details])

&gt; #if OS(DARWIN) &amp;&amp; !PLATFORM(GTK) &amp;&amp; !PLATFORM(QT)
&gt; #define ENABLE_PURGEABLE_MEMORY 1
&gt; #endif
&gt; 
&gt; I do not really know which ports would have ENABLE_PURGEABLE_MEMORY turned on. If I could replace the test with:

I agree.  This is a big (and growing) problem for WebKit.  That&apos;s part of what:
https://bugs.webkit.org/show_bug.cgi?id=85456
was about.

I&apos;m glad that others (yourself included) are looking into this, and trying to simplify our features system so that we can acxtually tell what&apos;s on/off for various ports!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>811695</commentid>
    <comment_count>7</comment_count>
      <attachid>183691</attachid>
    <who name="Laszlo Gombos">laszlo.gombos</who>
    <bug_when>2013-01-20 15:27:32 -0800</bug_when>
    <thetext>Created attachment 183691
remove the change in Platform.h</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>811696</commentid>
    <comment_count>8</comment_count>
      <attachid>183691</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-01-20 15:48:23 -0800</bug_when>
    <thetext>Comment on attachment 183691
remove the change in Platform.h

LGTM.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>811697</commentid>
    <comment_count>9</comment_count>
      <attachid>183691</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2013-01-20 16:13:11 -0800</bug_when>
    <thetext>Comment on attachment 183691
remove the change in Platform.h

Clearing flags on attachment: 183691

Committed r140283: &lt;http://trac.webkit.org/changeset/140283&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>811698</commentid>
    <comment_count>10</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2013-01-20 16:13:15 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>811699</commentid>
    <comment_count>11</comment_count>
      <attachid>183691</attachid>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2013-01-20 16:47:07 -0800</bug_when>
    <thetext>Comment on attachment 183691
remove the change in Platform.h

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

&gt; Source/WebCore/ChangeLog:11
&gt; +        No new tests as there is no new functionality.

Please don&apos;t say that.
Some people literally believe they do not need tests for bug fix, or make up excuses. This particular sentence is becoming a red flag.

I think we can be better examples in our changelogs regarding testing/not testing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>811707</commentid>
    <comment_count>12</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-01-20 17:25:00 -0800</bug_when>
    <thetext>(In reply to comment #11)
&gt; (From update of attachment 183691 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=183691&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/ChangeLog:11
&gt; &gt; +        No new tests as there is no new functionality.
&gt; 
&gt; Please don&apos;t say that.
&gt; Some people literally believe they do not need tests for bug fix, or make up excuses. This particular sentence is becoming a red flag.
&gt; 
&gt; I think we can be better examples in our changelogs regarding testing/not testing.

Perhaps you should start a Webkit-dev thread on the subject. I was not aware of the concen.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>811708</commentid>
    <comment_count>13</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-01-20 17:28:59 -0800</bug_when>
    <thetext>(In reply to comment #12)
&gt; (In reply to comment #11)
&gt; &gt; (From update of attachment 183691 [details] [details])
&gt; &gt; View in context: https://bugs.webkit.org/attachment.cgi?id=183691&amp;action=review
&gt; &gt; 
&gt; &gt; &gt; Source/WebCore/ChangeLog:11
&gt; &gt; &gt; +        No new tests as there is no new functionality.
&gt; &gt; 
&gt; &gt; Please don&apos;t say that.
&gt; &gt; Some people literally believe they do not need tests for bug fix, or make up excuses. This particular sentence is becoming a red flag.
&gt; &gt; 
&gt; &gt; I think we can be better examples in our changelogs regarding testing/not testing.
&gt; 
&gt; Perhaps you should start a Webkit-dev thread on the subject. I was not aware of the concen.

I failed to type my intended smilie. :)</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>183609</attachid>
            <date>2013-01-19 00:36:01 -0800</date>
            <delta_ts>2013-01-20 15:27:32 -0800</delta_ts>
            <desc>proposed change</desc>
            <filename>107365.patch</filename>
            <type>text/plain</type>
            <size>2608</size>
            <attacher name="Laszlo Gombos">laszlo.gombos</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XVEYvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFNvdXJjZS9XVEYvQ2hh
bmdlTG9nCShyZXZpc2lvbiAxNDAyMzgpCisrKyBTb3VyY2UvV1RGL0NoYW5nZUxv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</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>183691</attachid>
            <date>2013-01-20 15:27:32 -0800</date>
            <delta_ts>2013-01-20 16:47:07 -0800</delta_ts>
            <desc>remove the change in Platform.h</desc>
            <filename>107365.patch</filename>
            <type>text/plain</type>
            <size>1154</size>
            <attacher name="Laszlo Gombos">laszlo.gombos</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDE0MDIzOSkKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE3IEBACisyMDEzLTAxLTIwICBMYXN6bG8g
R29tYm9zICA8bC5nb21ib3NAc2Ftc3VuZy5jb20+CisKKyAgICAgICAgU2ltcGxpZnkgYSBsaXN0
IG9mIG5lZ2F0aXZlIFBMQVRGT1JNKCkgdGVzdHMKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtp
dC5vcmcvc2hvd19idWcuY2dpP2lkPTEwNzM2NQorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9E
WSAoT09QUyEpLgorCisgICAgICAgIFNpbXBsaWZ5IGEgbGlzdCBvZiBuZWdhdGl2ZSBQTEFURk9S
TSgpIHRlc3RzIGludG8gYSBzaW1wbGVyIGxpc3QKKyAgICAgICAgb2YgcG9zaXRpdmUgdGVzdHMg
Zm9yIGJldHRlciByZWFkYWJpbGl0eSBhbmQgbWFpbnRlbmFuY2UuCisKKyAgICAgICAgTm8gbmV3
IHRlc3RzIGFzIHRoZXJlIGlzIG5vIG5ldyBmdW5jdGlvbmFsaXR5LgorCisgICAgICAgICogY29u
ZmlnLmg6CisKIDIwMTMtMDEtMTkgIFphbiBEb2JlcnNlayAgPHpkb2JlcnNla0BpZ2FsaWEuY29t
PgogCiAgICAgICAgIFVucmV2aWV3ZWQgR1RLIGJ1aWxkIGZpeC4KSW5kZXg6IFNvdXJjZS9XZWJD
b3JlL2NvbmZpZy5oCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFNvdXJjZS9XZWJDb3JlL2NvbmZpZy5oCShyZXZp
c2lvbiAxNDAyMzkpCisrKyBTb3VyY2UvV2ViQ29yZS9jb25maWcuaAkod29ya2luZyBjb3B5KQpA
QCAtMjksNyArMjksNyBAQAogCiAjaW5jbHVkZSA8d3RmL1BsYXRmb3JtLmg+CiAKLSNpZiBPUyhX
SU5ET1dTKSAmJiAhT1MoV0lOQ0UpICYmICFQTEFURk9STShRVCkgJiYgIVBMQVRGT1JNKENIUk9N
SVVNKSAmJiAhUExBVEZPUk0oR1RLKSAmJiAhUExBVEZPUk0oV1gpCisjaWYgUExBVEZPUk0oV0lO
KSAmJiAhT1MoV0lOQ0UpCiAjaW5jbHVkZSA8V2ViQ29yZS9XZWJDb3JlSGVhZGVyRGV0ZWN0aW9u
Lmg+CiAjZW5kaWYKIAo=
</data>

          </attachment>
      

    </bug>

</bugzilla>