<?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>103058</bug_id>
          
          <creation_ts>2012-11-22 05:10:25 -0800</creation_ts>
          <short_desc>It&apos;s confusing that return values of &apos;bool Node::dispatchEvent(...)&apos; and &apos;bool Node::dispatchMouseEvent(..)&apos; have the opposite meanings.</short_desc>
          <delta_ts>2013-01-29 00:38:02 -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>UI Events</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="Hayato Ito">hayato</reporter>
          <assigned_to name="Hayato Ito">hayato</assigned_to>
          <cc>ojan</cc>
    
    <cc>qinmin</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>773847</commentid>
    <comment_count>0</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2012-11-22 05:10:25 -0800</bug_when>
    <thetext>Every return values from &apos;bool dispatchXXXEvent(...)&apos; member functions should have the same meanings to avoid confusions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>773848</commentid>
    <comment_count>1</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2012-11-22 05:11:11 -0800</bug_when>
    <thetext>I think we should use enum, or struct, as a return value, but that might be a goal in the long term.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>773861</commentid>
    <comment_count>2</comment_count>
      <attachid>175653</attachid>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2012-11-22 05:27:31 -0800</bug_when>
    <thetext>Created attachment 175653
Make them return the same meaning bool.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>774823</commentid>
    <comment_count>3</comment_count>
      <attachid>175653</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-11-24 07:12:42 -0800</bug_when>
    <thetext>Comment on attachment 175653
Make them return the same meaning bool.

Clearing flags on attachment: 175653

Committed r135650: &lt;http://trac.webkit.org/changeset/135650&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>774824</commentid>
    <comment_count>4</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-11-24 07:12:45 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>817408</commentid>
    <comment_count>5</comment_count>
    <who name="Min Qin">qinmin</who>
    <bug_when>2013-01-27 13:18:13 -0800</bug_when>
    <thetext>I am having a hard time understanding this patch and it doesn&apos;t look correct to me.


after this patch, MouseEventDispatchMediator::dispatchEvent will return a true instead of false in case the event was not canceled. I am ok with that, but better add some comments in the header to indicate that.

This patch also tries to change the return value of EventHandler::dispatchMouseEvent(). However, this doesn&apos;t seem to cover all the paths in which swallowEvent is changed. For example, in some code paths there is swallowEvent = true and that is not changed. However, this patch will return !swallowEvent instead, isn&apos;t that changing the behavior of those cases?

What confuses me most is handleMousePressEvent(). Why we change the return value to be !swallowEvent?  What should be the return value of handleMousePressEvent()? Can you add a comment in the header? If this is to indicate whether the event was canceled or not, why not change the return value of handleMouseReleaseEvent? 

I think we need some documentation in eventhandler. And we definitely need some test here to see what is being changed and whether that is correct.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>817457</commentid>
    <comment_count>6</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2013-01-27 18:22:19 -0800</bug_when>
    <thetext>Thank you for the comment.

(In reply to comment #5)
&gt; I am having a hard time understanding this patch and it doesn&apos;t look correct to me.
&gt; 
&gt; 
&gt; after this patch, MouseEventDispatchMediator::dispatchEvent will return a true instead of false in case the event was not canceled. I am ok with that, but better add some comments in the header to indicate that.
&gt; 
&gt; This patch also tries to change the return value of EventHandler::dispatchMouseEvent(). However, this doesn&apos;t seem to cover all the paths in which swallowEvent is changed. For example, in some code paths there is swallowEvent = true and that is not changed. However, this patch will return !swallowEvent instead, isn&apos;t that changing the behavior of those cases?
&gt; 
&gt; What confuses me most is handleMousePressEvent(). Why we change the return value to be !swallowEvent?  What should be the return value of handleMousePressEvent()? Can you add a comment in the header? If this is to indicate whether the event was canceled or not, why not change the return value of handleMouseReleaseEvent? 

That was on my rader when I wrote this patch, but I gave up changing all at once. That requires a lot of changes. I don&apos;t know the historical reason, but dispatchXXXEvent and handleXXXEvent use bool as opposite meaning as far as I remember. This patch attacked only dispatchXXXEvent, without touching handleXXEvent.

I think using &apos;bool&apos; in both cases as a return value is the root cause of confusion. Actually I tried to introduce enum, but I was not confident whether using enum here is good or not since we have to change a lot of code.

&gt; 
&gt; I think we need some documentation in eventhandler. And we definitely need some test here to see what is being changed and whether that is correct.

Agreed. We have to resolve the current inconsistency usage of bool. That requires further patches.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>817463</commentid>
    <comment_count>7</comment_count>
    <who name="Min Qin">qinmin</who>
    <bug_when>2013-01-27 18:46:49 -0800</bug_when>
    <thetext>(In reply to comment #6)
&gt; Thank you for the comment.
&gt; 
&gt; (In reply to comment #5)
&gt; &gt; I am having a hard time understanding this patch and it doesn&apos;t look correct to me.
&gt; &gt; 
&gt; &gt; 
&gt; &gt; after this patch, MouseEventDispatchMediator::dispatchEvent will return a true instead of false in case the event was not canceled. I am ok with that, but better add some comments in the header to indicate that.
&gt; &gt; 
&gt; &gt; This patch also tries to change the return value of EventHandler::dispatchMouseEvent(). However, this doesn&apos;t seem to cover all the paths in which swallowEvent is changed. For example, in some code paths there is swallowEvent = true and that is not changed. However, this patch will return !swallowEvent instead, isn&apos;t that changing the behavior of those cases?
&gt; &gt; 
&gt; &gt; What confuses me most is handleMousePressEvent(). Why we change the return value to be !swallowEvent?  What should be the return value of handleMousePressEvent()? Can you add a comment in the header? If this is to indicate whether the event was canceled or not, why not change the return value of handleMouseReleaseEvent? 
&gt; 
&gt; That was on my rader when I wrote this patch, but I gave up changing all at once. That requires a lot of changes. I don&apos;t know the historical reason, but dispatchXXXEvent and handleXXXEvent use bool as opposite meaning as far as I remember. This patch attacked only dispatchXXXEvent, without touching handleXXEvent.


then we should not return !swallowevent in handlemousepressevent. that changes the previous behavior.

&gt; 
&gt; I think using &apos;bool&apos; in both cases as a return value is the root cause of confusion. Actually I tried to introduce enum, but I was not confident whether using enum here is good or not since we have to change a lot of code.
&gt; 
&gt; &gt; 
&gt; &gt; I think we need some documentation in eventhandler. And we definitely need some test here to see what is being changed and whether that is correct.
&gt; 
&gt; Agreed. We have to resolve the current inconsistency usage of bool. That requires further patches.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>817474</commentid>
    <comment_count>8</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2013-01-27 19:27:19 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; (In reply to comment #6)
&gt; &gt; Thank you for the comment.
&gt; &gt; 
&gt; &gt; (In reply to comment #5)
&gt; &gt; &gt; I am having a hard time understanding this patch and it doesn&apos;t look correct to me.
&gt; &gt; &gt; 
&gt; &gt; &gt; 
&gt; &gt; &gt; after this patch, MouseEventDispatchMediator::dispatchEvent will return a true instead of false in case the event was not canceled. I am ok with that, but better add some comments in the header to indicate that.
&gt; &gt; &gt; 
&gt; &gt; &gt; This patch also tries to change the return value of EventHandler::dispatchMouseEvent(). However, this doesn&apos;t seem to cover all the paths in which swallowEvent is changed. For example, in some code paths there is swallowEvent = true and that is not changed. However, this patch will return !swallowEvent instead, isn&apos;t that changing the behavior of those cases?
&gt; &gt; &gt; 
&gt; &gt; &gt; What confuses me most is handleMousePressEvent(). Why we change the return value to be !swallowEvent?  What should be the return value of handleMousePressEvent()? Can you add a comment in the header? If this is to indicate whether the event was canceled or not, why not change the return value of handleMouseReleaseEvent? 
&gt; &gt; 
&gt; &gt; That was on my rader when I wrote this patch, but I gave up changing all at once. That requires a lot of changes. I don&apos;t know the historical reason, but dispatchXXXEvent and handleXXXEvent use bool as opposite meaning as far as I remember. This patch attacked only dispatchXXXEvent, without touching handleXXEvent.
&gt; 
&gt; 
&gt; then we should not return !swallowevent in handlemousepressevent. that changes the previous behavior.

I understand that. That might not be my intention. Let me investigate the current code base and codebase when this patch was landed further.

In current code base, the only client which uses the return value of the EventHandler::handleMousePressed(const PlatformMouseEvent&amp;) looks EventHandler::handleGensutureTap().
Is that right?


&gt; 
&gt; &gt; 
&gt; &gt; I think using &apos;bool&apos; in both cases as a return value is the root cause of confusion. Actually I tried to introduce enum, but I was not confident whether using enum here is good or not since we have to change a lot of code.
&gt; &gt; 
&gt; &gt; &gt; 
&gt; &gt; &gt; I think we need some documentation in eventhandler. And we definitely need some test here to see what is being changed and whether that is correct.
&gt; &gt; 
&gt; &gt; Agreed. We have to resolve the current inconsistency usage of bool. That requires further patches.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>817506</commentid>
    <comment_count>9</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2013-01-27 21:27:32 -0800</bug_when>
    <thetext>I investigated. This change of line (!swallowEvent)  in handleMousePressEvent seems unnecessary as you mentioned.
The bad part is there isn&apos;t any test which catch that.

Let me revert the line in another patch. I&apos;ll add a layout test too.

Thank you for reporting. I missed that.


(In reply to comment #8)
&gt; (In reply to comment #7)
&gt; &gt; (In reply to comment #6)
&gt; &gt; &gt; Thank you for the comment.
&gt; &gt; &gt; 
&gt; &gt; &gt; (In reply to comment #5)
&gt; &gt; &gt; &gt; I am having a hard time understanding this patch and it doesn&apos;t look correct to me.
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; after this patch, MouseEventDispatchMediator::dispatchEvent will return a true instead of false in case the event was not canceled. I am ok with that, but better add some comments in the header to indicate that.
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; This patch also tries to change the return value of EventHandler::dispatchMouseEvent(). However, this doesn&apos;t seem to cover all the paths in which swallowEvent is changed. For example, in some code paths there is swallowEvent = true and that is not changed. However, this patch will return !swallowEvent instead, isn&apos;t that changing the behavior of those cases?
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; What confuses me most is handleMousePressEvent(). Why we change the return value to be !swallowEvent?  What should be the return value of handleMousePressEvent()? Can you add a comment in the header? If this is to indicate whether the event was canceled or not, why not change the return value of handleMouseReleaseEvent? 
&gt; &gt; &gt; 
&gt; &gt; &gt; That was on my rader when I wrote this patch, but I gave up changing all at once. That requires a lot of changes. I don&apos;t know the historical reason, but dispatchXXXEvent and handleXXXEvent use bool as opposite meaning as far as I remember. This patch attacked only dispatchXXXEvent, without touching handleXXEvent.
&gt; &gt; 
&gt; &gt; 
&gt; &gt; then we should not return !swallowevent in handlemousepressevent. that changes the previous behavior.
&gt; 
&gt; I understand that. That might not be my intention. Let me investigate the current code base and codebase when this patch was landed further.
&gt; 
&gt; In current code base, the only client which uses the return value of the EventHandler::handleMousePressed(const PlatformMouseEvent&amp;) looks EventHandler::handleGensutureTap().
&gt; Is that right?
&gt; 
&gt; 
&gt; &gt; 
&gt; &gt; &gt; 
&gt; &gt; &gt; I think using &apos;bool&apos; in both cases as a return value is the root cause of confusion. Actually I tried to introduce enum, but I was not confident whether using enum here is good or not since we have to change a lot of code.
&gt; &gt; &gt; 
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; I think we need some documentation in eventhandler. And we definitely need some test here to see what is being changed and whether that is correct.
&gt; &gt; &gt; 
&gt; &gt; &gt; Agreed. We have to resolve the current inconsistency usage of bool. That requires further patches.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>817507</commentid>
    <comment_count>10</comment_count>
      <attachid>175653</attachid>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2013-01-27 21:32:10 -0800</bug_when>
    <thetext>Comment on attachment 175653
Make them return the same meaning bool.

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

&gt; Source/WebCore/page/EventHandler.cpp:1691
&gt; +    return !swallowEvent;

I&apos;ll try to revert only this line. If you find any other things, please let me know.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>817513</commentid>
    <comment_count>11</comment_count>
    <who name="Min Qin">qinmin</who>
    <bug_when>2013-01-27 21:56:42 -0800</bug_when>
    <thetext>Thanks, this line should only affect HandleGestureTap()

(In reply to comment #9)
&gt; I investigated. This change of line (!swallowEvent)  in handleMousePressEvent seems unnecessary as you mentioned.
&gt; The bad part is there isn&apos;t any test which catch that.
&gt; 
&gt; Let me revert the line in another patch. I&apos;ll add a layout test too.
&gt; 
&gt; Thank you for reporting. I missed that.
&gt; 
&gt; 
&gt; (In reply to comment #8)
&gt; &gt; (In reply to comment #7)
&gt; &gt; &gt; (In reply to comment #6)
&gt; &gt; &gt; &gt; Thank you for the comment.
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; (In reply to comment #5)
&gt; &gt; &gt; &gt; &gt; I am having a hard time understanding this patch and it doesn&apos;t look correct to me.
&gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; after this patch, MouseEventDispatchMediator::dispatchEvent will return a true instead of false in case the event was not canceled. I am ok with that, but better add some comments in the header to indicate that.
&gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; This patch also tries to change the return value of EventHandler::dispatchMouseEvent(). However, this doesn&apos;t seem to cover all the paths in which swallowEvent is changed. For example, in some code paths there is swallowEvent = true and that is not changed. However, this patch will return !swallowEvent instead, isn&apos;t that changing the behavior of those cases?
&gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; What confuses me most is handleMousePressEvent(). Why we change the return value to be !swallowEvent?  What should be the return value of handleMousePressEvent()? Can you add a comment in the header? If this is to indicate whether the event was canceled or not, why not change the return value of handleMouseReleaseEvent? 
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; That was on my rader when I wrote this patch, but I gave up changing all at once. That requires a lot of changes. I don&apos;t know the historical reason, but dispatchXXXEvent and handleXXXEvent use bool as opposite meaning as far as I remember. This patch attacked only dispatchXXXEvent, without touching handleXXEvent.
&gt; &gt; &gt; 
&gt; &gt; &gt; 
&gt; &gt; &gt; then we should not return !swallowevent in handlemousepressevent. that changes the previous behavior.
&gt; &gt; 
&gt; &gt; I understand that. That might not be my intention. Let me investigate the current code base and codebase when this patch was landed further.
&gt; &gt; 
&gt; &gt; In current code base, the only client which uses the return value of the EventHandler::handleMousePressed(const PlatformMouseEvent&amp;) looks EventHandler::handleGensutureTap().
&gt; &gt; Is that right?
&gt; &gt; 
&gt; &gt; 
&gt; &gt; &gt; 
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; I think using &apos;bool&apos; in both cases as a return value is the root cause of confusion. Actually I tried to introduce enum, but I was not confident whether using enum here is good or not since we have to change a lot of code.
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; I think we need some documentation in eventhandler. And we definitely need some test here to see what is being changed and whether that is correct.
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; Agreed. We have to resolve the current inconsistency usage of bool. That requires further patches.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>817549</commentid>
    <comment_count>12</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2013-01-27 23:41:25 -0800</bug_when>
    <thetext>Thank you.

I&apos;ve tried to add a Layout test so we can catch the regresson in the future, but I could not find how to detect it from the LayoutTest layer.

I referred to LayoutTests/fast/events/touch/gesture/gesture-click.html, which hits EventHandler:handleGestureTap(), but I couldn&apos;t find any side effects caused by defaultPrevented value which is set in EventHandler:handleGestureTap.

I guess you have some ideas. I appreciate your feedbacks.

(In reply to comment #11)
&gt; Thanks, this line should only affect HandleGestureTap()
&gt; 
&gt; (In reply to comment #9)
&gt; &gt; I investigated. This change of line (!swallowEvent)  in handleMousePressEvent seems unnecessary as you mentioned.
&gt; &gt; The bad part is there isn&apos;t any test which catch that.
&gt; &gt; 
&gt; &gt; Let me revert the line in another patch. I&apos;ll add a layout test too.
&gt; &gt; 
&gt; &gt; Thank you for reporting. I missed that.
&gt; &gt; 
&gt; &gt; 
&gt; &gt; (In reply to comment #8)
&gt; &gt; &gt; (In reply to comment #7)
&gt; &gt; &gt; &gt; (In reply to comment #6)
&gt; &gt; &gt; &gt; &gt; Thank you for the comment.
&gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; (In reply to comment #5)
&gt; &gt; &gt; &gt; &gt; &gt; I am having a hard time understanding this patch and it doesn&apos;t look correct to me.
&gt; &gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; &gt; after this patch, MouseEventDispatchMediator::dispatchEvent will return a true instead of false in case the event was not canceled. I am ok with that, but better add some comments in the header to indicate that.
&gt; &gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; &gt; This patch also tries to change the return value of EventHandler::dispatchMouseEvent(). However, this doesn&apos;t seem to cover all the paths in which swallowEvent is changed. For example, in some code paths there is swallowEvent = true and that is not changed. However, this patch will return !swallowEvent instead, isn&apos;t that changing the behavior of those cases?
&gt; &gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; &gt; What confuses me most is handleMousePressEvent(). Why we change the return value to be !swallowEvent?  What should be the return value of handleMousePressEvent()? Can you add a comment in the header? If this is to indicate whether the event was canceled or not, why not change the return value of handleMouseReleaseEvent? 
&gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; That was on my rader when I wrote this patch, but I gave up changing all at once. That requires a lot of changes. I don&apos;t know the historical reason, but dispatchXXXEvent and handleXXXEvent use bool as opposite meaning as far as I remember. This patch attacked only dispatchXXXEvent, without touching handleXXEvent.
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; then we should not return !swallowevent in handlemousepressevent. that changes the previous behavior.
&gt; &gt; &gt; 
&gt; &gt; &gt; I understand that. That might not be my intention. Let me investigate the current code base and codebase when this patch was landed further.
&gt; &gt; &gt; 
&gt; &gt; &gt; In current code base, the only client which uses the return value of the EventHandler::handleMousePressed(const PlatformMouseEvent&amp;) looks EventHandler::handleGensutureTap().
&gt; &gt; &gt; Is that right?
&gt; &gt; &gt; 
&gt; &gt; &gt; 
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; I think using &apos;bool&apos; in both cases as a return value is the root cause of confusion. Actually I tried to introduce enum, but I was not confident whether using enum here is good or not since we have to change a lot of code.
&gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; &gt; I think we need some documentation in eventhandler. And we definitely need some test here to see what is being changed and whether that is correct.
&gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; Agreed. We have to resolve the current inconsistency usage of bool. That requires further patches.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>817735</commentid>
    <comment_count>13</comment_count>
    <who name="Min Qin">qinmin</who>
    <bug_when>2013-01-28 07:27:14 -0800</bug_when>
    <thetext>probably in webkit_unittests should be fine</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>818666</commentid>
    <comment_count>14</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2013-01-29 00:38:02 -0800</bug_when>
    <thetext>Thank you for suggestion. I&apos;ve never used webkit_unittests.

I&apos;d like to avoid using webkit_unittests here since this is rather a web facing feature and should be tested by LayoutTest for all ports.

Let me file another bug until we can find a way to test that.


(In reply to comment #13)
&gt; probably in webkit_unittests should be fine</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>175653</attachid>
            <date>2012-11-22 05:27:31 -0800</date>
            <delta_ts>2013-01-27 21:32:10 -0800</delta_ts>
            <desc>Make them return the same meaning bool.</desc>
            <filename>bug-103058-20121122222516.patch</filename>
            <type>text/plain</type>
            <size>10657</size>
            <attacher name="Hayato Ito">hayato</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTM1MzM5CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggMzg5NzhjMmZiNjkyZmM3
MmNlNmI4NDIzMTNmMTIyMTAzYzMzYzgzOC4uZWFhYTAwYjRjMzFhYWI3MDQ1MmVkZDExMWU1NzQw
NDFmODQ1YTQ3ZCAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDI4IEBACisyMDEyLTExLTIyICBIYXlh
dG8gSXRvICA8aGF5YXRvQGNocm9taXVtLm9yZz4KKworICAgICAgICBJdCdzIGNvbmZ1c2luZyB0
aGF0IHJldHVybiB2YWx1ZXMgb2YgJ2Jvb2wgTm9kZTo6ZGlzcGF0Y2hFdmVudCguLi4pJyBhbmQg
J2Jvb2wgTm9kZTo6ZGlzcGF0Y2hNb3VzZUV2ZW50KC4uKScgaGF2ZSB0aGUgb3Bwb3NpdGUgbWVh
bmluZ3MuCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0x
MDMwNTgKKworICAg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