<?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>112857</bug_id>
          
          <creation_ts>2013-03-20 16:49:31 -0700</creation_ts>
          <short_desc>AXObjectCache::postNotification should use an enum instead of a bool</short_desc>
          <delta_ts>2013-09-26 11:22:28 -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>Accessibility</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>121504</dup_id>
          
          <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="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aboxhall</cc>
    
    <cc>dmazzoni</cc>
    
    <cc>samuel_white</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>859860</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-03-20 16:49:31 -0700</bug_when>
    <thetext>AXObjectCache::postNotification should use an enum instead of a bool (since it&apos;s a multi-argument function)

I&apos;m slowly trying to rid WebKit of this pattern, as it leads to very difficult to understand callsites:
    axObjectCache()-&gt;postNotification(node(), AXObjectCache::AXValueChanged, true);

At least:
    axObjectCache()-&gt;postNotification(node(), AXObjectCache::AXValueChanged, PostToElement);

would be clearer.  Although it&apos;s not yet clear to me what the &quot;postToElement&quot; bool is supposed to do. :)

Once I figure out what postToElement means, I can come up with nice names for a replacement enum.  Any suggestions would be most welcome. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>933611</commentid>
    <comment_count>1</comment_count>
    <who name="Samuel White">samuel_white</who>
    <bug_when>2013-09-26 11:22:28 -0700</bug_when>
    <thetext>(In reply to comment #0)
&gt; AXObjectCache::postNotification should use an enum instead of a bool (since it&apos;s a multi-argument function)
&gt; 
&gt; I&apos;m slowly trying to rid WebKit of this pattern, as it leads to very difficult to understand callsites:
&gt;     axObjectCache()-&gt;postNotification(node(), AXObjectCache::AXValueChanged, true);
&gt; 
&gt; At least:
&gt;     axObjectCache()-&gt;postNotification(node(), AXObjectCache::AXValueChanged, PostToElement);
&gt; 
&gt; would be clearer.  Although it&apos;s not yet clear to me what the &quot;postToElement&quot; bool is supposed to do. :)
&gt; 
&gt; Once I figure out what postToElement means, I can come up with nice names for a replacement enum.  Any suggestions would be most welcome. :)

I was given this same feedback (we should not use a bool) in response to another patch that I landed. I fixed this issue under:

https://bugs.webkit.org/show_bug.cgi?id=121504

before I saw this bug. Apologies.

Marking as dupe, but note that this bug was filed first. Not sure if there&apos;s a better way to indicate that. Thanks!

*** This bug has been marked as a duplicate of bug 121504 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>