<?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>183285</bug_id>
          
          <creation_ts>2018-03-02 04:55:32 -0800</creation_ts>
          <short_desc>[GTK] Switch to use always complex text code path</short_desc>
          <delta_ts>2019-10-28 21:15:54 -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>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=167557</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=203544</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Gtk</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Garcia Campos">cgarcia</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1403199</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2018-03-02 04:55:32 -0800</bug_when>
    <thetext>Now that we have branched for 2.20, it&apos;s a good time to try using complex text path always. We can simply force it for GTK+ port and see how it works for the whole release cycle and if we don&apos;t notice any issues or performance regressions we release 2.22 with complex text path forced. We can add a debug env variable to switch back to auto without having to recompile. We should also keep the auto mode for the layout tests to avoid having to rebaseline a lot of tests. After 2.22 is released we can make a final decision and remove the env variable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1403200</commentid>
    <comment_count>1</comment_count>
      <attachid>334892</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2018-03-02 05:00:11 -0800</bug_when>
    <thetext>Created attachment 334892
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1403228</commentid>
    <comment_count>2</comment_count>
      <attachid>334892</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-03-02 08:30:26 -0800</bug_when>
    <thetext>Comment on attachment 334892
Patch

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

&gt; Source/WebKit/UIProcess/gtk/WebProcessPoolGtk.cpp:96
&gt; +    const char* forceComplexText = getenv(&quot;WEBKIT_FORCE_COMPLEX_TEXT&quot;);

The semantics of this are backwards.

Should be either WEBKIT_FORCE_SIMPLE_TEXT=1 or WEBKIT_DISABLE_COMPLEX_TEXT=1.

Let&apos;s not check for 0.

&gt; Tools/ChangeLog:8
&gt; +        Keep the auto mode for the layout tests to avoid having to rebaseline a lot of tests.

I don&apos;t think this is a great idea... now we are not testing the code that users are actually running anymore. I would do a rebaseline at the same time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1403230</commentid>
    <comment_count>3</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2018-03-02 08:37:16 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #2)
&gt; Comment on attachment 334892 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=334892&amp;action=review
&gt; 
&gt; &gt; Source/WebKit/UIProcess/gtk/WebProcessPoolGtk.cpp:96
&gt; &gt; +    const char* forceComplexText = getenv(&quot;WEBKIT_FORCE_COMPLEX_TEXT&quot;);
&gt; 
&gt; The semantics of this are backwards.
&gt; 
&gt; Should be either WEBKIT_FORCE_SIMPLE_TEXT=1 or WEBKIT_DISABLE_COMPLEX_TEXT=1.

This doesn&apos;t force simple text and it doesn&apos;t disable complex text either. It either forces complex text or leaves the current auto where complex or simple is used depending on the context.

&gt; Let&apos;s not check for 0.

I don&apos;t see why.

&gt; &gt; Tools/ChangeLog:8
&gt; &gt; +        Keep the auto mode for the layout tests to avoid having to rebaseline a lot of tests.
&gt; 
&gt; I don&apos;t think this is a great idea... now we are not testing the code that
&gt; users are actually running anymore. I would do a rebaseline at the same time.

The default is auto, so complex test is still tested when required. Most of the changes that we will have to rebaseline are in text that doesn&apos;t affect the test at all, like text explaining what the test does, for example. The idea is to try it our during the next release cycle in the unstable releases, and once we make a decision we do the rebaseline. I don&apos;t want to waste the time doing a huge rebaseline to roll out the patch tomorrow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1403231</commentid>
    <comment_count>4</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2018-03-02 08:38:01 -0800</bug_when>
    <thetext>Note that my main concern is performance, and our layout tests don&apos;t help with that, but real usage does.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1403239</commentid>
    <comment_count>5</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2018-03-02 08:59:35 -0800</bug_when>
    <thetext>This is not different than GTK_OVERLAY_SCROLLING, for example, that defaults to enabled when not present or != &quot;0&quot; is used. You need to export GTK_OVERLAY_SCROLLING=0 to disable it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1403243</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-03-02 09:06:05 -0800</bug_when>
    <thetext>(In reply to Carlos Garcia Campos from comment #3)
&gt; This doesn&apos;t force simple text and it doesn&apos;t disable complex text either.
&gt; It either forces complex text or leaves the current auto where complex or
&gt; simple is used depending on the context.

Good point.

Other options:

WEBKIT_DO_NOT_FORCE_COMPLEX_TEXT=1
WEBKIT_ALLOW_SIMPLE_TEXT=1

&gt; &gt; Let&apos;s not check for 0.
&gt; 
&gt; I don&apos;t see why.

It&apos;s very confusing to have an environment variable that only works when set to 0.

&gt; Most of
&gt; the changes that we will have to rebaseline are in text that doesn&apos;t affect
&gt; the test at all, like text explaining what the test does, for example. The
&gt; idea is to try it our during the next release cycle in the unstable
&gt; releases, and once we make a decision we do the rebaseline. I don&apos;t want to
&gt; waste the time doing a huge rebaseline to roll out the patch tomorrow.

Fair enough, as long as you&apos;re confident you won&apos;t forget to complete this before 2.22.

One more thing. The most likely reason to revert this change would be if we notice performance problems. But we are not actually going to notice performance problems, not without real perf testing. We do have a perf bot that I never look at, but it won&apos;t be able to test this change because the environment variable will be set in the test runner. How do you plan to evaluate the performance impact?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1403244</commentid>
    <comment_count>7</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-03-02 09:07:43 -0800</bug_when>
    <thetext>(In reply to Carlos Garcia Campos from comment #5)
&gt; This is not different than GTK_OVERLAY_SCROLLING, for example, that defaults
&gt; to enabled when not present or != &quot;0&quot; is used. You need to export
&gt; GTK_OVERLAY_SCROLLING=0 to disable it.

True, but that seems bad to me. Let&apos;s not copy that example, when it is *simple* to avoid. ;) WEBKIT_ALLOW_SIMPLE_TEXT=1 is fine, right?

It&apos;s not a big deal, since we don&apos;t plan to keep this environment variable all the way until 2.22, but it would be nicer IMO.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1403245</commentid>
    <comment_count>8</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-03-02 09:09:03 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #6)
&gt; How do you plan to evaluate the performance impact?

Myles needs to do similar testing in https://bugs.webkit.org/show_bug.cgi?id=178960#c11, so we could ask him for advice.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1403524</commentid>
    <comment_count>9</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2018-03-04 02:18:24 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #6)
&gt; (In reply to Carlos Garcia Campos from comment #3)
&gt; &gt; This doesn&apos;t force simple text and it doesn&apos;t disable complex text either.
&gt; &gt; It either forces complex text or leaves the current auto where complex or
&gt; &gt; simple is used depending on the context.
&gt; 
&gt; Good point.
&gt; 
&gt; Other options:
&gt; 
&gt; WEBKIT_DO_NOT_FORCE_COMPLEX_TEXT=1
&gt; WEBKIT_ALLOW_SIMPLE_TEXT=1
&gt; 
&gt; &gt; &gt; Let&apos;s not check for 0.
&gt; &gt; 
&gt; &gt; I don&apos;t see why.
&gt; 
&gt; It&apos;s very confusing to have an environment variable that only works when set
&gt; to 0.

I don&apos;t thin it&apos;s confusing and it&apos;s consistent with other env vars like force AC where we also check for 0, the only difference is that in this case the default is disabled instead of enabled.
 
&gt; &gt; Most of
&gt; &gt; the changes that we will have to rebaseline are in text that doesn&apos;t affect
&gt; &gt; the test at all, like text explaining what the test does, for example. The
&gt; &gt; idea is to try it our during the next release cycle in the unstable
&gt; &gt; releases, and once we make a decision we do the rebaseline. I don&apos;t want to
&gt; &gt; waste the time doing a huge rebaseline to roll out the patch tomorrow.
&gt; 
&gt; Fair enough, as long as you&apos;re confident you won&apos;t forget to complete this
&gt; before 2.22.

Sure.

&gt; One more thing. The most likely reason to revert this change would be if we
&gt; notice performance problems. But we are not actually going to notice
&gt; performance problems, not without real perf testing. We do have a perf bot
&gt; that I never look at, but it won&apos;t be able to test this change because the
&gt; environment variable will be set in the test runner. How do you plan to
&gt; evaluate the performance impact?

I&apos;m not worried about a performance regression, it&apos;s not a problem if complex text is a bit slower. My concern is only if performance i really noticeable and affects real usage. If we think a particular website is too slow, we can try disabling the complex text force and see if there&apos;s any significant difference.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1403525</commentid>
    <comment_count>10</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2018-03-04 02:19:37 -0800</bug_when>
    <thetext>We can run the perf tests with complex text forced, note that WTR doesn&apos;t override the variable if present.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1413952</commentid>
    <comment_count>11</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2018-04-12 00:02:06 -0700</bug_when>
    <thetext>Committed r230559: &lt;https://trac.webkit.org/changeset/230559&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>334892</attachid>
            <date>2018-03-02 05:00:11 -0800</date>
            <delta_ts>2018-03-04 08:48:58 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>wkgtk-complex-text.diff</filename>
            <type>text/plain</type>
            <size>3329</size>
            <attacher name="Carlos Garcia Campos">cgarcia</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQvQ2hhbmdlTG9nIGIvU291cmNlL1dlYktpdC9DaGFu
Z2VMb2cKaW5kZXggYjY2NmE1MTVhYzIuLjUwY2NiNGNhZjViIDEwMDY0NAotLS0gYS9Tb3VyY2Uv
V2ViS2l0L0NoYW5nZUxvZworKysgYi9Tb3VyY2UvV2ViS2l0L0NoYW5nZUxvZwpAQCAtMSwzICsx
LDIwIEBACisyMDE4LTAzLTAyICBDYXJsb3MgR2FyY2lhIENhbXBvcyAgPGNnYXJjaWFAaWdhbGlh
LmNvbT4KKworICAgICAgICBbR1RLXSBTd2l0Y2ggdG8gdXNlIGFsd2F5cyBjb21wbGV4IHRleHQg
Y29kZSBwYXRoCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9p
ZD0xODMyODUKKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAg
ICBOb3cgdGhhdCB3ZSBoYXZlIGJyYW5jaGVkIGZvciAyLjIwLCBpdCdzIGEgZ29vZCB0aW1lIHRv
IHRyeSB1c2luZyBjb21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3QgdG8gdmFsaWRh
dGUgc2V0dGluZyBvZiBzZXJ2aWNlIHdvcmtlciBhbmQgY2FjaGUgc3RvcmFnZSBkaXJlY3Rvcmll
cwpkaWZmIC0tZ2l0IGEvVG9vbHMvV2ViS2l0VGVzdFJ1bm5lci9ndGsvbWFpbi5jcHAgYi9Ub29s
cy9XZWJLaXRUZXN0UnVubmVyL2d0ay9tYWluLmNwcAppbmRleCA3OTQ3Y2U1NWNkNS4uZTI5MTUy
NTNmMTggMTAwNjQ0Ci0tLSBhL1Rvb2xzL1dlYktpdFRlc3RSdW5uZXIvZ3RrL21haW4uY3BwCisr
KyBiL1Rvb2xzL1dlYktpdFRlc3RSdW5uZXIvZ3RrL21haW4uY3BwCkBAIC0zMiw2ICszMiw4IEBA
CiAKIGludCBtYWluKGludCBhcmdjLCBjaGFyKiogYXJndikKIHsKKyAgICBnX3NldGVudigiV0VC
S0lUX0ZPUkNFX0NPTVBMRVhfVEVYVCIsICIwIiwgRkFMU0UpOworCiAgICAgZ3RrX2luaXQoJmFy
Z2MsICZhcmd2KTsKIAogICAgIEdSZWZQdHI8R1B0ckFycmF5PiBsYW5ndWFnZXMgPSBhZG9wdEdS
ZWYoZ19wdHJfYXJyYXlfbmV3KCkpOwo=
</data>
<flag name="review"
          id="353598"
          type_id="1"
          status="+"
          setter="mcatanzaro"
    />
          </attachment>
      

    </bug>

</bugzilla>