<?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>287007</bug_id>
          
          <creation_ts>2025-02-04 02:28:14 -0800</creation_ts>
          <short_desc>block-axis inline box borders break caret placement in vertical-rl text</short_desc>
          <delta_ts>2025-04-17 06:43:51 -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>Layout and Rendering</component>
          <version>WebKit Local 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>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>48541</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="fantasai">fantasai.bugs</reporter>
          <assigned_to name="fantasai">fantasai.bugs</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2091774</commentid>
    <comment_count>0</comment_count>
    <who name="fantasai">fantasai.bugs</who>
    <bug_when>2025-02-04 02:28:14 -0800</bug_when>
    <thetext>Overview:

Something about block-axis borders on inline boxes breaks caret placement in vertical-rl text.

Steps to Reproduce:

1. Open testcase.
2. Click in the padding before/after the start/end of the line.
3. Notice super wacky behavior where the cursor ends up on the wrong line or the wrong isde of the box.

Other notes:
The bug is triggered by block-axis borders (and not inline-axis borders), and only occurs in vertical-rl/sideways-rl modes (-lr modes are fine).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2091775</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-02-04 02:28:26 -0800</bug_when>
    <thetext>&lt;rdar://problem/144149255&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2091777</commentid>
    <comment_count>2</comment_count>
      <attachid>474134</attachid>
    <who name="fantasai">fantasai.bugs</who>
    <bug_when>2025-02-04 02:30:15 -0800</bug_when>
    <thetext>Created attachment 474134
testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2091778</commentid>
    <comment_count>3</comment_count>
    <who name="fantasai">fantasai.bugs</who>
    <bug_when>2025-02-04 02:35:32 -0800</bug_when>
    <thetext>Current suspicion is on contentStartInBlockDirection(), due to use of isBlockFlipped(), but it needs more investigation.
https://searchfox.org/wubkat/source/Source/WebCore/layout/integration/inline/InlineIteratorLineBoxInlines.h#39</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2101094</commentid>
    <comment_count>4</comment_count>
    <who name="fantasai">fantasai.bugs</who>
    <bug_when>2025-03-06 12:10:02 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/42026</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>474134</attachid>
            <date>2025-02-04 02:30:15 -0800</date>
            <delta_ts>2025-02-04 02:30:15 -0800</delta_ts>
            <desc>testcase</desc>
            <filename>test-vertical-rl.html</filename>
            <type>text/html</type>
            <size>379</size>
            <attacher name="fantasai">fantasai.bugs</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxwIHN0eWxlPSJoZWlnaHQ6IDdlbTsgIHBhZGRpbmc6IDFlbTsgYm9y
ZGVyOiBzb2xpZCBncmF5OyB3cml0aW5nLW1vZGU6IHZlcnRpY2FsLXJsIiBjb250ZW50ZWRpdGFi
bGU+VGhpcyA8c3BhbiBzdHlsZT0iYm9yZGVyOiBzb2xpZCI+aXMgc29tZSB2ZXJ0aWNhbCB0ZXh0
PC9zcGFuPiB0aGF0IHlvdSBjYW4gc2VsZWN0IGFuZCBlZGl0Cgo8cCBzdHlsZT0iaGVpZ2h0OiA3
ZW07ICBwYWRkaW5nOiAxZW07IGJvcmRlcjogc29saWQgZ3JheTsgd3JpdGluZy1tb2RlOiB2ZXJ0
aWNhbC1ybCIgY29udGVudGVkaXRhYmxlPlRoaXMgPHNwYW4+aXMgc29tZSB2ZXJ0aWNhbCB0ZXh0
PC9zcGFuPiB0aGF0IHlvdSBjYW4gc2VsZWN0IGFuZCBlZGl0Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>