<?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>112554</bug_id>
          
          <creation_ts>2013-03-18 03:53:30 -0700</creation_ts>
          <short_desc>Tests added in r141354 erroneously assume that spelling markers are not erased after a selection change</short_desc>
          <delta_ts>2013-04-30 02:56:31 -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>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>ASSIGNED</bug_status>
          <resolution></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>
          
          <blocked>108528</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Grzegorz Czajkowski">g.czajkowski</reporter>
          <assigned_to name="Grzegorz Czajkowski">g.czajkowski</assigned_to>
          <cc>a.moryc</cc>
    
    <cc>morrita</cc>
    
    <cc>rniwa</cc>
    
    <cc>rouslan+webkit</cc>
    
    <cc>tony</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>856965</commentid>
    <comment_count>0</comment_count>
    <who name="Grzegorz Czajkowski">g.czajkowski</who>
    <bug_when>2013-03-18 03:53:30 -0700</bug_when>
    <thetext>There&apos;s &apos;shouldEraseMarkersAfterChangeSelection&apos; setting which is exposed to port implementation whether we should erase markers after selection change or not. By default this setting is set on true.

Chromium and Mac (at least for wk2) prefer not erasing markers so they return false for this setting.

A newly added tests (checked for spelling-double-clicked-word.html) assume that selection (as a result of double click on misspelled word) doesn&apos;t erase spelling markers. Here is the code:

spellingMarkerRange = internals.markerRangeForNode(textNode, &quot;spelling&quot;, 0);    &lt;--- OK, marker exists
....
// Double-click the misspelled word
eventSender.mouseDown();
eventSender.mouseUp();
eventSender.mouseDown();
eventSender.mouseUp();

shouldBeEqualToString(&quot;window.getSelection().toString()&quot;, &quot;wellcome&quot;);          &lt;--- Ok, verifies selection after double click

spellingMarkerRange = internals.markerRangeForNode(textNode, &quot;spelling&quot;, 0);    &lt;--- spellingMarkerRange is NULL for platforms whose erase markers after selection change.

I&apos;d like to ask you what&apos;s the best way of fixing this issue for other Platforms?

It seems reasonably to check whether ports erase markers or not (we could just check spellingMarkerRange object). As a result we will have to deliver new baseline for other ports (at lest EFL).

Of course we could implement this behaviour similarly to Chromium and Mac but I am not familiar with it. I couldn&apos;t see any visual changes while editing misspelled word in MiniBrowser.

Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>857133</commentid>
    <comment_count>1</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2013-03-18 08:20:36 -0700</bug_when>
    <thetext>Why don&apos;t we set shouldEraseMarkersAfterChangeSelection to false in the test then?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>857196</commentid>
    <comment_count>2</comment_count>
    <who name="Rouslan Solomakhin">rouslan+webkit</who>
    <bug_when>2013-03-18 09:29:33 -0700</bug_when>
    <thetext>I think that this tests is checking for more things that necessary. I think that you can safely remove the failing assumption from the test and the expectation file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>857197</commentid>
    <comment_count>3</comment_count>
    <who name="Rouslan Solomakhin">rouslan+webkit</who>
    <bug_when>2013-03-18 09:30:09 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; Why don&apos;t we set shouldEraseMarkersAfterChangeSelection to false in the test then?

This works, too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>867521</commentid>
    <comment_count>4</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2013-04-01 21:02:55 -0700</bug_when>
    <thetext>Also see 113742.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>880636</commentid>
    <comment_count>5</comment_count>
    <who name="Artur Moryc">a.moryc</who>
    <bug_when>2013-04-24 08:37:40 -0700</bug_when>
    <thetext>&gt;I couldn&apos;t see any visual changes while editing misspelled word in MiniBrowser.

What I have noticed so far in MiniBrowser with respect to the returned value of shouldEraseMarkersAfterChangeSelection is:

1) true 

the marker for the misspelled word disappears while the mouse cursor is being navigated along the misspelled word


2) false 
 
the misspelled word remains underlined regardless the mouse cursor position</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>881104</commentid>
    <comment_count>6</comment_count>
    <who name="Grzegorz Czajkowski">g.czajkowski</who>
    <bug_when>2013-04-24 23:56:22 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; &gt;I couldn&apos;t see any visual changes while editing misspelled word in MiniBrowser.
&gt; 
&gt; What I have noticed so far in MiniBrowser with respect to the returned value of shouldEraseMarkersAfterChangeSelection is:
&gt; 
&gt; 1) true 
&gt; 
&gt; the marker for the misspelled word disappears while the mouse cursor is being navigated along the misspelled word
&gt; 
&gt; 
&gt; 2) false 
&gt; 
&gt; the misspelled word remains underlined regardless the mouse cursor position

Thanks Artur for checking the setting.
IMO it seems reasonable to implement &apos;shouldEraseMarkersAfterChangeSelection&apos; for EFL similarly to Mac (no to erase spelling markers after selection/cursor change).

  (In reply to comment #2)
&gt; I think that this tests is checking for more things that necessary. I think that you can safely remove the failing assumption from the test and the expectation file.

Agree. It will be helpful for ports that prefer default behaviour.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>882993</commentid>
    <comment_count>7</comment_count>
      <attachid>200094</attachid>
    <who name="Artur Moryc">a.moryc</who>
    <bug_when>2013-04-30 02:46:48 -0700</bug_when>
    <thetext>Created attachment 200094
Proposed patch for disappearing spelling marker</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>882996</commentid>
    <comment_count>8</comment_count>
      <attachid>200094</attachid>
    <who name="Artur Moryc">a.moryc</who>
    <bug_when>2013-04-30 02:56:31 -0700</bug_when>
    <thetext>Comment on attachment 200094
Proposed patch for disappearing spelling marker 

This patch should go to 115165</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>200094</attachid>
            <date>2013-04-30 02:46:48 -0700</date>
            <delta_ts>2013-04-30 02:56:30 -0700</delta_ts>
            <desc>Proposed patch for disappearing spelling marker </desc>
            <filename>SpellingMarkerDisappearingCorrection.patch</filename>
            <type>text/plain</type>
            <size>1746</size>
            <attacher name="Artur Moryc">a.moryc</attacher>
            
              <data encoding="base64">Y29tbWl0IGRmNTA3YTNlMTI1MGEyZGMxMGEwZGQzMDcwNDkwOTdjNTBhZDM2ZmUKQXV0aG9yOiBB
cnR1ciBNb3J5YyA8YS5tb3J5Y0BzYW1zdW5nLmNvbT4KRGF0ZTogICBNb24gQXByIDI5IDE2OjE2
OjIzIDIwMTMgKzAyMDAKCiAgICBkaXNhcHBlYXJpbmcgbWFya2VyIGZvciBtaXNzcGVsbGVkIHdv
cmRzIGNvcnJlY3Rpb24KICAgIAogICAgQ2hhbmdlLUlkOiBJODk4MjdmMGMzMWE1MGE0MjJhYmYw
ZGNiMGQyNjE2YWNmMTgwNGI1MAoKZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQyL0NoYW5nZUxv
ZyBiL1NvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZwppbmRleCA4ZjNhMTgwLi4wOTU3ZDU2IDEwMDY0
NAotLS0gYS9Tb3VyY2UvV2ViS2l0Mi9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYktpdDIvQ2hh
bmdlTG9nCkBAIC0xLDMgKzEsMTUgQEAKKzIwMTMtMDQtMjkgIEFydHVyIE1vcnljICA8YS5tb3J5
Y0BzYW1zdW5nLmNvbT4KKworICAgICAgICBbV0syXVtFRkxdIFNwZWxsa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