<?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>123338</bug_id>
          
          <creation_ts>2013-10-25 06:43:05 -0700</creation_ts>
          <short_desc>Re-enable simple line layout on non-Mac platforms</short_desc>
          <delta_ts>2014-02-06 09:25:03 -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>Layout and Rendering</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>
          <dependson>123388</dependson>
    
    <dependson>123402</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Antti Koivisto">koivisto</reporter>
          <assigned_to name="Csaba Osztrogonác">ossy</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>esprehn+autocc</cc>
    
    <cc>glenn</cc>
    
    <cc>kondapallykalyan</cc>
    
    <cc>ossy</cc>
    
    <cc>roger_fong</cc>
    
    <cc>svillar</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>943571</commentid>
    <comment_count>0</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2013-10-25 06:43:05 -0700</bug_when>
    <thetext>It hits

ASSERT(run.charactersLength() &gt;= run.length()) 

in textWidth().

for example:
http://build.webkit.org/builders/GTK%20Linux%2064-bit%20Debug%20WK1/builds/4983
http://build.webkit.org/builders/EFL%20Linux%2064-bit%20Release%20WK1/builds/2321</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>943576</commentid>
    <comment_count>1</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2013-10-25 06:48:37 -0700</bug_when>
    <thetext>Some</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>943577</commentid>
    <comment_count>2</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2013-10-25 06:49:30 -0700</bug_when>
    <thetext>It is not obvious from code what the difference is between Mac and other platforms.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>943691</commentid>
    <comment_count>3</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2013-10-25 12:28:28 -0700</bug_when>
    <thetext>Non-Mac platforms don&apos;t define ENABLE_8BIT_TEXTRUN to 1, so the TextRun constructor implicitly converts the character data to a WTF::String. The length parameter that&apos;s passed to the TextRun constructor is then ignored, and the length of the complete string is used.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>943876</commentid>
    <comment_count>4</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2013-10-26 05:34:16 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; The length parameter that&apos;s passed to the TextRun constructor is then ignored, and the length of the complete string is used.

The length parameter is actually used as the xpos value rather than the length.

Anyway, enabling the 8-bit text runs works for the GTK port. Modifying the TextRun construction in the textWidth function would likely work equally well.

The 8-bit TextRun was introduced in bug #96979, but was only enabled for the Mac port because code of other platforms needed additional modifications to properly support the introduced optimization.
https://bugs.webkit.org/show_bug.cgi?id=96979#c9

The GTK port doesn&apos;t seem affected when running the tests with the support for 8-bit text runs enabled, so simply enabling the feature define would work. I&apos;d also like to see people test out the feature on other ports and provide the proper changes so the define can be removed entirely.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>944080</commentid>
    <comment_count>5</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2013-10-28 07:54:50 -0700</bug_when>
    <thetext>Ah ok. Thanks for looking into this. We should really make String(const char*) explicit to avoid bugs like this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>977351</commentid>
    <comment_count>6</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2014-02-06 08:37:20 -0800</bug_when>
    <thetext>ENABLE_8BIT_TEXTRUN guards were removed by
https://trac.webkit.org/changeset/163478

So let&apos;s go ahead.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>977354</commentid>
    <comment_count>7</comment_count>
      <attachid>223334</attachid>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2014-02-06 08:39:13 -0800</bug_when>
    <thetext>Created attachment 223334
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>977378</commentid>
    <comment_count>8</comment_count>
      <attachid>223334</attachid>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2014-02-06 09:24:57 -0800</bug_when>
    <thetext>Comment on attachment 223334
Patch

Clearing flags on attachment: 223334

Committed r163537: &lt;http://trac.webkit.org/changeset/163537&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>977379</commentid>
    <comment_count>9</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2014-02-06 09:25:03 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>223334</attachid>
            <date>2014-02-06 08:39:13 -0800</date>
            <delta_ts>2014-02-06 09:24:57 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-123338-20140206173911.patch</filename>
            <type>text/plain</type>
            <size>1646</size>
            <attacher name="Csaba Osztrogonác">ossy</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTYzNTI5CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGF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