<?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>95718</bug_id>
          
          <creation_ts>2012-09-04 01:08:39 -0700</creation_ts>
          <short_desc>[WK2][GTK] Add missing SPELLCHECK macro to TextCheckerGtk.cpp</short_desc>
          <delta_ts>2017-03-11 10:49:09 -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>WebKit2</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Grzegorz Czajkowski">g.czajkowski</reporter>
          <assigned_to name="Grzegorz Czajkowski">g.czajkowski</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
    
    <cc>mario</cc>
    
    <cc>mrobinson</cc>
    
    <cc>ravi.kasibhatla</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>710871</commentid>
    <comment_count>0</comment_count>
    <who name="Grzegorz Czajkowski">g.czajkowski</who>
    <bug_when>2012-09-04 01:08:39 -0700</bug_when>
    <thetext>WebKit-Gtk uses SPELLCHECK macro for files that implements spellchecking feature.
It is missing for TextCheckerGtk.cpp</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>710873</commentid>
    <comment_count>1</comment_count>
      <attachid>161983</attachid>
    <who name="Grzegorz Czajkowski">g.czajkowski</who>
    <bug_when>2012-09-04 01:10:31 -0700</bug_when>
    <thetext>Created attachment 161983
proposed patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>710942</commentid>
    <comment_count>2</comment_count>
    <who name="Mario Sanchez Prada">mario</who>
    <bug_when>2012-09-04 03:52:29 -0700</bug_when>
    <thetext>Hrm... I think this is not actually a bug and thus there&apos;s no need to add these macros in UIProcess/gtk/TextCheckerGtk.cpp since that file is at a very low level in the UIProcess, that should be (and it is, I think) independent of this kind of configuration options.

After all, the implementation of TextChecker&apos;s methods will rely on the API client (WKTextCheckerClient, in this case) provided for the specific platform, which should only be set if the SPELLCHECK feature is enabled, being this the correct place IMHO to use the macro.

For the sake of clarity, this is how we do it in WebKit2GTK:

 1. In WebKitWebContext.cpp, we create an instance of our internal class (not 
    exposed through the WK2GTK API) WebKitTextChecker:

     static gpointer createDefaultWebContext(gpointer)
     {
       [...]
     #if ENABLE(SPELLCHECK)
         webContext-&gt;priv-&gt;textChecker = WebKitTextChecker::create();
     #endif
         return webContext.get();
     }

 2. In the implementation of WebKitTextChecker::create(), we provide an implementation for the WKTextCheckerClient API client:

     WebKitTextChecker::WebKitTextChecker()
         : m_textChecker(WebCore::TextCheckerEnchant::create())
         , m_spellCheckingEnabled(false)
     {
         WKTextCheckerClient wkTextCheckerClient = {
             kWKTextCheckerClientCurrentVersion,
             this, // clientInfo
             0, // continuousSpellCheckingAllowed
             continuousSpellCheckingEnabledCallback,
             setContinuousSpellCheckingEnabledCallback,
             [...]
         };
         [...]
     }

 3. Finally, also in WebKitTextChecker::create(), we set that one as the
    API client to be used from UIProcess/WebTextChecker.cpp, and also from
    UIProcess/gtk/TextCheckerGtk.cpp:

     WebKitTextChecker::WebKitTextChecker()
         : m_textChecker(WebCore::TextCheckerEnchant::create())
         , m_spellCheckingEnabled(false)
     {
         [...]
         WKTextCheckerSetClient(&amp;wkTextCheckerClient);
     }

So, if ENABLE(SPELLCHECK) macro returned false, we wouldn&apos;t have done any of this in the first place and so, all the calls in UIProcess/gtk/TextCheckerGtk.cpp would just do nothing, as they would finally execute methods of UIProcess/WebTextCheckerClient.cpp, like this one:


     void WebTextCheckerClient::checkSpellingOfString(uint64_t tag, const String&amp; text, int32_t&amp; misspellingLocation, int32_t&amp; misspellingLength)
     {
         if (!m_client.checkSpellingOfString)
             return;

         m_client.checkSpellingOfString(tag, toAPI(text.impl()), &amp;misspellingLocation, &amp;misspellingLength, m_client.clientInfo);
     }

Does all this rant make sense? Am I missing anything?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>711053</commentid>
    <comment_count>3</comment_count>
    <who name="Grzegorz Czajkowski">g.czajkowski</who>
    <bug_when>2012-09-04 06:28:58 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; Hrm... I think this is not actually a bug and thus there&apos;s no need to add these macros in UIProcess/gtk/TextCheckerGtk.cpp since that file is at a very low level in the UIProcess, that should be (and it is, I think) independent of this kind of configuration options.
&gt; 
&gt; After all, the implementation of TextChecker&apos;s methods will rely on the API client (WKTextCheckerClient, in this case) provided for the specific platform, which should only be set if the SPELLCHECK feature is enabled, being this the correct place IMHO to use the macro.

First of all thanks for very good review and nice explanations of WebKit2GTK design of spellchecking feature!

I&apos;ve found this issue while implementing TextCheckerEfl.cpp for WebKit2EFL (under review here https://bugs.webkit.org/show_bug.cgi?id=91854) which I can say, looks very similar to TextCheckerGtk and TextCheckerMac:)

&gt; 
&gt; For the sake of clarity, this is how we do it in WebKit2GTK:
&gt; 
&gt;  1. In WebKitWebContext.cpp, we create an instance of our internal class (not 
&gt;     exposed through the WK2GTK API) WebKitTextChecker:
&gt; 
&gt;      static gpointer createDefaultWebContext(gpointer)
&gt;      {
&gt;        [...]
&gt;      #if ENABLE(SPELLCHECK)
&gt;          webContext-&gt;priv-&gt;textChecker = WebKitTextChecker::create();
&gt;      #endif
&gt;          return webContext.get();
&gt;      }
&gt; 
&gt;  2. In the implementation of WebKitTextChecker::create(), we provide an implementation for the WKTextCheckerClient API client:
&gt; 
&gt;      WebKitTextChecker::WebKitTextChecker()
&gt;          : m_textChecker(WebCore::TextCheckerEnchant::create())
&gt;          , m_spellCheckingEnabled(false)
&gt;      {
&gt;          WKTextCheckerClient wkTextCheckerClient = {
&gt;              kWKTextCheckerClientCurrentVersion,
&gt;              this, // clientInfo
&gt;              0, // continuousSpellCheckingAllowed
&gt;              continuousSpellCheckingEnabledCallback,
&gt;              setContinuousSpellCheckingEnabledCallback,
&gt;              [...]
&gt;          };
&gt;          [...]
&gt;      }
&gt; 
&gt;  3. Finally, also in WebKitTextChecker::create(), we set that one as the
&gt;     API client to be used from UIProcess/WebTextChecker.cpp, and also from
&gt;     UIProcess/gtk/TextCheckerGtk.cpp:
&gt; 
&gt;      WebKitTextChecker::WebKitTextChecker()
&gt;          : m_textChecker(WebCore::TextCheckerEnchant::create())
&gt;          , m_spellCheckingEnabled(false)
&gt;      {
&gt;          [...]
&gt;          WKTextCheckerSetClient(&amp;wkTextCheckerClient);
&gt;      }
&gt; 
&gt; So, if ENABLE(SPELLCHECK) macro returned false, we wouldn&apos;t have done any of this in the first place and so, all the calls in UIProcess/gtk/TextCheckerGtk.cpp would just do nothing, as they would finally execute methods of UIProcess/WebTextCheckerClient.cpp, like this one:
&gt; 
&gt; 
&gt;      void WebTextCheckerClient::checkSpellingOfString(uint64_t tag, const String&amp; text, int32_t&amp; misspellingLocation, int32_t&amp; misspellingLength)
&gt;      {
&gt;          if (!m_client.checkSpellingOfString)
&gt;              return;
&gt; 
&gt;          m_client.checkSpellingOfString(tag, toAPI(text.impl()), &amp;misspellingLocation, &amp;misspellingLength, m_client.clientInfo);
&gt;      }
&gt; 
&gt; Does all this rant make sense? Am I missing anything?

I agree with you that TextChecker&apos;s methods just call client&apos;s methods defined by WKTextChecker&apos;s callbacks. If they are not set, it&apos;s safe to call them even SPELLCHECK macro is disabled (as you pointed out WebTextCheckerClient first checkc whether the client exists).

But wouldn&apos;t be better to add the SPELLCHECK macro for below reasons:
 - to just do not compile that part of the code, especially if we have possibility to implemented port specific feature and already have macro?
 - to increase source readability, if someone looks at the code it&apos;s not clear that the part of code works OK only if SPELLCHECK is ON,
 - to consistency with files that implement spellchecking (it looks like TextCheckerGtk makes an exception)

If you don&apos;t like this change just feel free and close this bug :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>711088</commentid>
    <comment_count>4</comment_count>
    <who name="Mario Sanchez Prada">mario</who>
    <bug_when>2012-09-04 07:03:17 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; [...]
&gt; First of all thanks for very good review and nice explanations of
&gt; WebKit2GTK design of spellchecking feature!

You&apos;re welcome. Glad to see you find it useful.

&gt; [...]
&gt; I agree with you that TextChecker&apos;s methods just call client&apos;s methods
&gt; defined by WKTextChecker&apos;s callbacks. If they are not set, it&apos;s safe to
&gt; call them even SPELLCHECK macro is disabled (as you pointed out 
&gt; WebTextCheckerClient first checkc whether the client exists).

Yes, and I think that&apos;s precisely one of the nice features of this kind of implementations (not only talking about the TextChecker, but more in general): to allow having the possibility of writing new platform-specific components in for specific features and &quot;plugging&quot; them into the generic implementation parts already provided in UIProcess.

&gt; But wouldn&apos;t be better to add the SPELLCHECK macro for below reasons:
&gt;  - to just do not compile that part of the code, especially if we have
&gt;    possibility to implemented port specific feature and already have macro?

I think you could achieve a similar effect by adding the right conditions in the makefile, so you just compile the files you need depending on the SPELLCHECK feature being enabled or not.

Actually, I think I did that in a preliminary version of my patch for GTK, but then I decided not to do it at some point, because I thought it was clearer.

&gt;  - to increase source readability, if someone looks at the code it&apos;s not 
&gt;    clear that the part of code works OK only if SPELLCHECK is ON,

I can&apos;t deny this. Of course having the SPELLCHECK macro used in TextCheckerGtk.cpp will make it clearer for readers looking at that file.

In the other hand, I also think that a reader really into knowing how spell checking works in a platform will at some point (probably even sooner) end up looking at UIProcess/API/&lt;platform&gt; and there (s)he will find the SPELLCHECK macro anyway.

Not an strong opinion though. Just trying to share my thoughts

&gt;  - to consistency with files that implement spellchecking (it looks 
&gt;    like TextCheckerGtk makes an exception)

Hrm.. I&apos;m not sure. If I grep for SPELLCHECK in WebKit2/ folder:

  ChangeLog:4569:        * GNUmakefile.am: Add flags to handle the SPELLCHECK feature.
  ChangeLog:5606:        * GNUmakefile.am: Add flags to handle the SPELLCHECK feature.
  GNUmakefile.am:188:if ENABLE_SPELLCHECK
  GNUmakefile.am:190:	-DENABLE_SPELLCHECK=1 \
  UIProcess/API/gtk/WebKitTextChecker.h:23:#if ENABLE(SPELLCHECK)
  UIProcess/API/gtk/WebKitTextChecker.h:59:#endif // ENABLE(SPELLCHECK)
  UIProcess/API/gtk/WebKitTextChecker.cpp:29:#if ENABLE(SPELLCHECK)
  UIProcess/API/gtk/WebKitTextChecker.cpp:162:#endif // ENABLE(SPELLCHECK)
  UIProcess/API/gtk/WebKitWebContext.cpp:104:#if ENABLE(SPELLCHECK)
  UIProcess/API/gtk/WebKitWebContext.cpp:162:#if ENABLE(SPELLCHECK)
  UIProcess/API/gtk/WebKitWebContext.cpp:470:#if ENABLE(SPELLCHECK)
  UIProcess/API/gtk/WebKitWebContext.cpp:488:#if ENABLE(SPELLCHECK)
  UIProcess/API/gtk/WebKitWebContext.cpp:510:#if ENABLE(SPELLCHECK)
  UIProcess/API/gtk/WebKitWebContext.cpp:539:#if ENABLE(SPELLCHECK)


... I don&apos;t see any usage of that macro out of UIProcess/API/gtk, which is right IMHO because it happens at the platform API level.

However this change your proposing happens at the level of WebKit2 UIProcess&apos;s implementation level (UIProcess), which should be as much agnostic of this kind of things as possible, I think.

&gt; If you don&apos;t like this change just feel free and close this bug :)

Oh, no! I won&apos;t do it :-)

I&apos;m just sharing my thoughts on this in order to help, not that I&apos;m 100% sure I&apos;m completely right or something. Actually, I could very well be perfectly wrong :-)

I would appreciate if someone else with experience in WebKit2GTK could drop some comments on this topic too. Martin? Carlos? ;-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>711116</commentid>
    <comment_count>5</comment_count>
    <who name="Grzegorz Czajkowski">g.czajkowski</who>
    <bug_when>2012-09-04 07:50:03 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #3)
&gt; &gt; But wouldn&apos;t be better to add the SPELLCHECK macro for below reasons:
&gt; &gt;  - to just do not compile that part of the code, especially if we have
&gt; &gt;    possibility to implemented port specific feature and already have macro?
&gt; 
&gt; I think you could achieve a similar effect by adding the right conditions in the makefile, so you just compile the files you need depending on the SPELLCHECK feature being enabled or not.
&gt; 
&gt; Actually, I think I did that in a preliminary version of my patch for GTK, but then I decided not to do it at some point, because I thought it was clearer.

As I understand TextChecker class takes responsibility of public interface for WebKit2 and its implementation is placed in port&apos;s specific files for example, {port}/TextChecker{Port}.cpp. 
In my opinion adding the right conditions (as I assume disabling TextCheckerGtk.cpp if SPELLCHECK is OGG) to the makefile probably won&apos;t work - undefined reference may occur while linking process . Please correct me if I am wrong.

&gt; 
&gt; &gt;  - to increase source readability, if someone looks at the code it&apos;s not 
&gt; &gt;    clear that the part of code works OK only if SPELLCHECK is ON,
&gt; 
&gt; I can&apos;t deny this. Of course having the SPELLCHECK macro used in TextCheckerGtk.cpp will make it clearer for readers looking at that file.
&gt; 
&gt; In the other hand, I also think that a reader really into knowing how spell checking works in a platform will at some point (probably even sooner) end up looking at UIProcess/API/&lt;platform&gt; and there (s)he will find the SPELLCHECK macro anyway.
&gt; 
&gt; Not an strong opinion though. Just trying to share my thoughts

There are a lot of files/classes in WebKi2 for spelling for example, TextChecker, WebTextChecker, WebKitTextChecker, WKTextChecker. I think it&apos;s a little annoying to browse them to finally find SPELLCHECK macro.

&gt; 
&gt; &gt;  - to consistency with files that implement spellchecking (it looks 
&gt; &gt;    like TextCheckerGtk makes an exception)
&gt; 
&gt; Hrm.. I&apos;m not sure. If I grep for SPELLCHECK in WebKit2/ folder:
&gt; 
&gt;   ChangeLog:4569:        * GNUmakefile.am: Add flags to handle the SPELLCHECK feature.
&gt;   ChangeLog:5606:        * GNUmakefile.am: Add flags to handle the SPELLCHECK feature.
&gt;   GNUmakefile.am:188:if ENABLE_SPELLCHECK
&gt;   GNUmakefile.am:190:    -DENABLE_SPELLCHECK=1 \
&gt;   UIProcess/API/gtk/WebKitTextChecker.h:23:#if ENABLE(SPELLCHECK)
&gt;   UIProcess/API/gtk/WebKitTextChecker.h:59:#endif // ENABLE(SPELLCHECK)
&gt;   UIProcess/API/gtk/WebKitTextChecker.cpp:29:#if ENABLE(SPELLCHECK)
&gt;   UIProcess/API/gtk/WebKitTextChecker.cpp:162:#endif // ENABLE(SPELLCHECK)
&gt;   UIProcess/API/gtk/WebKitWebContext.cpp:104:#if ENABLE(SPELLCHECK)
&gt;   UIProcess/API/gtk/WebKitWebContext.cpp:162:#if ENABLE(SPELLCHECK)
&gt;   UIProcess/API/gtk/WebKitWebContext.cpp:470:#if ENABLE(SPELLCHECK)
&gt;   UIProcess/API/gtk/WebKitWebContext.cpp:488:#if ENABLE(SPELLCHECK)
&gt;   UIProcess/API/gtk/WebKitWebContext.cpp:510:#if ENABLE(SPELLCHECK)
&gt;   UIProcess/API/gtk/WebKitWebContext.cpp:539:#if ENABLE(SPELLCHECK)
&gt; 
&gt; 
&gt; ... I don&apos;t see any usage of that macro out of UIProcess/API/gtk, which is right IMHO because it happens at the platform API level.

GNUmakefile.am disables at the compile time TextCheckerEnchant,cpp and WebKitTextChecker.cpp files that are placed outside UIProcess/API/gtk and as I mentioned above in my opinion we can not just that in case of TextCheckerGtk.cpp
Anyway I can find SPELLCHECK macro in TextCheckerEnchant{h.cpp} and WebKitTextChecker{h.cpp} but my sources may be out of date.

&gt; 
&gt; However this change your proposing happens at the level of WebKit2 UIProcess&apos;s implementation level (UIProcess), which should be as much agnostic of this kind of things as possible, I think.
&gt; 
&gt; &gt; If you don&apos;t like this change just feel free and close this bug :)
&gt; 
&gt; Oh, no! I won&apos;t do it :-)
&gt; 
&gt; I&apos;m just sharing my thoughts on this in order to help, not that I&apos;m 100% sure I&apos;m completely right or something. Actually, I could very well be perfectly wrong :-)
&gt; 
&gt; I would appreciate if someone else with experience in WebKit2GTK could drop some comments on this topic too. Martin? Carlos? ;-)

Ok. Anyway thanks for sharing your knowledge about spellchecking it&apos;s really precious for me as we are contributing spellchecking for WebKit2EFL.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>711944</commentid>
    <comment_count>6</comment_count>
    <who name="Mario Sanchez Prada">mario</who>
    <bug_when>2012-09-05 04:40:07 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt;[...]
&gt; As I understand TextChecker class takes responsibility of public interface
&gt; for WebKit2 and its implementation is placed in port&apos;s specific files for
&gt; example, {port}/TextChecker{Port}.cpp.

Well, actually TextChecker and WebTextChecker classes are at one level (the lowest level in WK2&apos;s UI process), then we have WKTextChecker at a higher level (the cross-platform C API) and finally we have WebKitTextChecker in the highest level (the platform-specific API). 

It&apos;s something like this, from lower to higher levels in WK2&apos;s UI Process:

 TextChecker / WebTextChecker &lt;---&gt; WKTextChecker &lt;---&gt; WebKitTextChecker
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^       ^^^^^^^^^^^^^       ^^^^^^^^^^^^^^^^^
     Implementation layer            C API layer       &lt;platform&gt; API layer


It&apos;s messy, I know (at least it was messy for me first time I got into it), but the point is that IMHO the ENABLE(SPELLCHECK) guards should happen only at the level of the &lt;platform&gt; API layer, which were you most likely will start working from when adding a new implementation for a different platform.
   
&gt; In my opinion adding the right conditions (as I assume disabling
&gt; TextCheckerGtk.cpp if SPELLCHECK is OGG) to the makefile probably won&apos;t
&gt; work - undefined reference may occur while linking process . 
&gt; Please correct me if I am wrong.

Yes, it won&apos;t simply work by just using some ifs in the makefiles, you probably would need to make more changes (even in the source code).

My point was that I would go that path only if I was really concerned about not compiling those generic hooks in the &quot;implementation layer&quot;. But I personally think it doesn&apos;t pays off and so that&apos;s why I finally didn&apos;t mess with that either for GTK.

&gt; [...]
&gt; There are a lot of files/classes in WebKi2 for spelling for example, 
&gt; TextChecker, WebTextChecker, WebKitTextChecker, WKTextChecker. 
&gt; I think it&apos;s a little annoying to browse them to finally find 
&gt; SPELLCHECK macro.

I agree there are a lot of similar related files in WK2 for this, and I also think that&apos;s a little bit annoying because it&apos;s a bit confusing, at least the first time you face them (at least it was for me).

But, in the other hand, if you think of them with the &quot;diagram&quot; I wrote above in mind, it&apos;s very clear that each of them respond to a very specific purpose in their very specific levels of abstraction, and also that the entry point for a platform is always the &lt;platform&gt; API layer (thus, &quot;WebKitTextChecker&quot;), which is where I would expect to find the macro in the first place.

&gt; &gt; &gt;  - to consistency with files that implement spellchecking (it looks 
&gt; &gt; &gt;    like TextCheckerGtk makes an exception)
&gt; &gt; 
&gt; &gt; Hrm.. I&apos;m not sure. If I grep for SPELLCHECK in WebKit2/ folder:
&gt; &gt; [...]
&gt; &gt; ... I don&apos;t see any usage of that macro out of UIProcess/API/gtk, 
&gt; &gt; which is right IMHO because it happens at the platform API level.
&gt; 
&gt; GNUmakefile.am disables at the compile time TextCheckerEnchant,cpp and
&gt; WebKitTextChecker.cpp files that are placed outside UIProcess/API/gtk
&gt; and as I mentioned above in my opinion we can not just that in case of 
&gt; TextCheckerGtk.cpp

For TextCheckerEnchant it makes sense not to even compile it when SPELLCHECK is not enabled, since for that to happen you need to have libenchant&apos;s development package installed on your system. So, if you don&apos;t have it there&apos;s nothing to do there.

But TextCheckerGtk.cpp is not at a so low level as TextCheckerEnchant.cpp, since the former is in WebKit2/UIProcess, which means as much generic and cross-platform code as possible, and the later is in WebCore/platform, which is 
obviously platform-dependant code in the lowest (almost!) level of the WebKit project: WebCore.

So, I think both files are not comparable in this regard.

&gt; Anyway I can find SPELLCHECK macro in TextCheckerEnchant{h.cpp} and
&gt; WebKitTextChecker{h.cpp} but my sources may be out of date.

...which, as I said, it&apos;s perfectly fine, since both files are located at platform-specific levels:

   TextCheckerEnchant{h.cpp}: WebCore/platform
    WebKitTextChecker{h.cpp}: WebKit2/UIProcess/API/gtk


&gt; &gt; I would appreciate if someone else with experience in WebKit2GTK could drop some comments on this topic too. Martin? Carlos? ;-)
&gt; 
&gt; Ok. Anyway thanks for sharing your knowledge about spellchecking it&apos;s
&gt; really precious for me as we are contributing spellchecking for WebKit2EFL.

Glad to be helpful. Let&apos;s see what others think, though. As I said, I must be wrong after all :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>711953</commentid>
    <comment_count>7</comment_count>
    <who name="Mario Sanchez Prada">mario</who>
    <bug_when>2012-09-05 04:50:59 -0700</bug_when>
    <thetext>I just realized my previous comment needs one clarification at least...

(In reply to comment #6)
&gt; [...]
&gt; But TextCheckerGtk.cpp is not at a so low level as TextCheckerEnchant.cpp,
&gt; since the former is in WebKit2/UIProcess, which means as much generic and
&gt; cross-platform code as possible, and the later is in WebCore/platform,
&gt; which is obviously platform-dependant code in the lowest (almost!) level
&gt; of the WebKit project: WebCore.
&gt; 
&gt; So, I think both files are not comparable in this regard.

I know that WebKit2/UIProcess/gtk/TextCheckerGtk.cpp is a GTK specific file, so that probably makes my comment a bit confusing since I&apos;m later saying this:

 &gt; &gt; Anyway I can find SPELLCHECK macro in TextCheckerEnchant{h.cpp} and
 &gt; &gt; WebKitTextChecker{h.cpp} but my sources may be out of date.
 &gt;
 &gt;...which, as I said, it&apos;s perfectly fine, since both files are located
 &gt; at platform-specific levels:
 &gt;
 &gt;   TextCheckerEnchant{h.cpp}: WebCore/platform
 &gt;    WebKitTextChecker{h.cpp}: WebKit2/UIProcess/API/gtk

When I say that I find the ENABLE(SPELLCHECK) in those cases because they are &quot;located at platform-specific levels&quot;, the important concept here from my point of view is &quot;level&quot;.

 - WebKitTextChecker{h.cpp} is in WebKit2/UIProcess/API/gtk, which 
   is the closest level to applications using WebKit2GTK.

 - TextCheckerEnchant{h.cpp} is in WebCore/platform/enchant, which is 
   the closest level to the spell-checking technologie behind used (enchant).

However, even if WebKit2/UIProcess/gtk/TextCheckerGtk.cpp is obviously a GTK specific file, it is not at the same kind of level than those other two files, since it&apos;s at WebKit2&apos;s UIProcess lowest level: what they call the cross-platform (well... almost!) implementation layer&quot;.

Hope now it&apos;s clearer</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>713013</commentid>
    <comment_count>8</comment_count>
    <who name="Grzegorz Czajkowski">g.czajkowski</who>
    <bug_when>2012-09-06 01:20:11 -0700</bug_when>
    <thetext>Thanks again for kind explanation and a big portion very useful information for us.
As a conclusion we can say that it&apos;s no good way using SPELLCHECK macro in TextChecker because it&apos;s some kind of violation of &quot;implementation layer&quot; mainly placed in TextChecker and WebTextChecker. This is fine for me especially if TextChecker&apos;s implementation in TextCheckerGtk is very generic and universal that there is no any issues when SPELLCHECK macro is OFF.

If you decide that this macro is not necessary in TextCheckerGtk.cpp please close this bug, then I am going to remove that one from TextCheckerEfl.cpp (https://bugs.webkit.org/show_bug.cgi?id=91854)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>713129</commentid>
    <comment_count>9</comment_count>
    <who name="Mario Sanchez Prada">mario</who>
    <bug_when>2012-09-06 03:27:18 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; Thanks again for kind explanation and a big portion very useful 
&gt; information for us.

Glad to help.

&gt; As a conclusion we can say that it&apos;s no good way using SPELLCHECK macro in 
&gt; TextChecker because it&apos;s some kind of violation of &quot;implementation layer&quot; 
&gt; mainly placed in TextChecker and WebTextChecker. This is fine for me especially 
&gt; if TextChecker&apos;s implementation in TextCheckerGtk is very generic and universal 
&gt; that there is no any issues when SPELLCHECK macro is OFF.

That would be my conclusion too, yes.

&gt; If you decide that this macro is not necessary in TextCheckerGtk.cpp please
&gt; close this bug, then I am going to remove that one from TextCheckerEfl.cpp
&gt; (https://bugs.webkit.org/show_bug.cgi?id=91854)

Sounds good to me, but I first would prefer someone else to double check this, just to be at least 99% sure :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>976966</commentid>
    <comment_count>10</comment_count>
      <attachid>161983</attachid>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2014-02-05 11:14:16 -0800</bug_when>
    <thetext>Comment on attachment 161983
proposed patch

Clearing review flag on patches from before 2014. If this patch is still relevant, please reset the r? flag.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>161983</attachid>
            <date>2012-09-04 01:10:31 -0700</date>
            <delta_ts>2014-02-05 11:14:14 -0800</delta_ts>
            <desc>proposed patch</desc>
            <filename>add_spellcheck_macro.patch</filename>
            <type>text/plain</type>
            <size>7134</size>
            <attacher name="Grzegorz Czajkowski">g.czajkowski</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQyL0No
YW5nZUxvZwppbmRleCBlYWFlN2Y4Li43OGUxNjA4IDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViS2l0
Mi9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYktpdDIvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMzQg
QEAKKzIwMTItMDktMDMgIEdyemVnb3J6IEN6YWprb3dza2kgIDxnLmN6YWprb3dza2lAc2Ftc3Vu
Zy5jb20+CisKKyAgICAgICAgW1dLMl1bR1RLXSBBZGQgbWlzc2luZyBTUEVMTENIRUNLIG1hY3Jv
IHRvIFRleHRDaGVja2VyR3RrLmNwcAorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9z
aG93X2J1Zy5jZ2k/aWQ9OTU3MTgKKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMh
KS4KKworICAgICAgICBBZGRzIFNQRUxMQ0hFQ0sgbWFjcm8gdG8gdGhlIGJvZHkgb2YgVGV4dENo
ZWNrZXIncyBtZXRob2RzLgorICAgICAgICBUaGUgVGV4dENoZWNrZXIgY2xhc3MgaXMgYW4gcHVi
bGljIGludGVyZmFjZSBtYWlubHkgdXNlZCBpbiBVSVByb2Nlc3MuCisgICAgICAgIEVhY2ggcG9y
dCBpbXBsZW1lbnRzIHRoZSBUZXh0Q2hlY2tlciB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