<?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>139480</bug_id>
          
          <creation_ts>2014-12-10 07:21:12 -0800</creation_ts>
          <short_desc>Caret navigation does not work well with MathML</short_desc>
          <delta_ts>2016-06-27 23:53:46 -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>MathML</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</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>
          <dependson>153991</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Frédéric Wang Nélar">fred.wang</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>alex</cc>
    
    <cc>jdiggs</cc>
    
    <cc>mrobinson</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1054137</commentid>
    <comment_count>0</comment_count>
      <attachid>243015</attachid>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2014-12-10 07:21:12 -0800</bug_when>
    <thetext>Created attachment 243015
Testcase

In the attached testcase:

- enable caret navigation
- place the caret on the first &quot;1&quot; (MathML section)
- press the down arrow key

Expected result: the caret should move to the &quot;3&quot; on the next line
Actual result: the caret moves to the &quot;2&quot; on the same line.

This is probably because each MathML token element contains an anonymous block flexbox, so the caret navigation code treats them as if they were on different line of text. You can compare with what happens for HTML.

(another problem is that the size of the caret in MathML may be very large compared to the actual text, because of all the anonymous flexboxes used for layout)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1205908</commentid>
    <comment_count>1</comment_count>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2016-06-27 23:53:46 -0700</bug_when>
    <thetext>Hopefully this will be fixed after bug 153991.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>243015</attachid>
            <date>2014-12-10 07:21:12 -0800</date>
            <delta_ts>2014-12-10 07:21:12 -0800</delta_ts>
            <desc>Testcase</desc>
            <filename>caret-navigation.html</filename>
            <type>text/html</type>
            <size>350</size>
            <attacher name="Frédéric Wang Nélar">fred.wang</attacher>
            
              <data encoding="base64">PCFkb2N0eXBlIGh0bWw+CjxodG1sPgogIDxoZWFkPgogICAgPHRpdGxlPkNhcmV0IG5hdmlnYXRp
b248L3RpdGxlPgogICAgPG1ldGEgY2hhcnNldD0idXRmLTgiLz4KICA8L2hlYWQ+CiAgPGJvZHk+
CgogICAgPHA+TWF0aE1MOjwvcD4KCiAgICA8cD48bWF0aD48bXJvdz48bW4+MTwvbW4+PG1uPjI8
L21uPjwvbXJvdz48L21hdGg+PC9wPgogICAgPHA+PG1hdGg+PG1yb3c+PG1uPjM8L21uPjwvbXJv
dz48L21hdGg+PC9wPgoKICAgIDxwPkhUTUw6PC9wPgoKICAgIDxwPjxzcGFuPjE8L3NwYW4+PHNw
YW4+Mjwvc3Bhbj48L3A+CiAgICA8cD48c3Bhbj4zPC9zcGFuPjwvcD4KICAgIAogIDwvYm9keT4K
PC9odG1sPgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>