<?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>70762</bug_id>
          
          <creation_ts>2011-10-24 14:32:24 -0700</creation_ts>
          <short_desc>Incorrect repaint during layout in flipped writing modes</short_desc>
          <delta_ts>2025-09-08 09:38:35 -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>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=279611</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>mitz</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>hyatt</cc>
    
    <cc>ntim</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>489646</commentid>
    <comment_count>0</comment_count>
      <attachid>112248</attachid>
    <who name="">mitz</who>
    <bug_when>2011-10-24 14:32:24 -0700</bug_when>
    <thetext>Created attachment 112248
Test case

In the test case, edit either line and notice that it does not repaint correctly. The reason is that RenderBox::computeRectForRepaint() calls flipForWritingMode() during layout, when the block’s height is still 0.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1942291</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-03-18 06:26:43 -0700</bug_when>
    <thetext>I am able to reproduce this bug in Safari Technology Preview 165 using attached test case and Safari show &apos;ipsum.Lorem&apos; in two lines with newlines in between and at top. While Chrome Canary 113 and Firefox Nightly 113 match each other. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1942301</commentid>
    <comment_count>2</comment_count>
    <who name="alan">zalan</who>
    <bug_when>2023-03-18 09:06:28 -0700</bug_when>
    <thetext>This is about horizontal-bt writing mode. Neither FF nor Chrome support this (non-standard) mode.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2060071</commentid>
    <comment_count>3</comment_count>
    <who name="alan">zalan</who>
    <bug_when>2024-09-13 11:54:59 -0700</bug_when>
    <thetext>While the test case has horizontal-bt, as the title says this is about flipped writing modes in block direction mostly impacting vertical-rl.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2060081</commentid>
    <comment_count>4</comment_count>
    <who name="alan">zalan</who>
    <bug_when>2024-09-13 12:10:55 -0700</bug_when>
    <thetext>The issue here is with flipped block direction an inflow child&apos;s final position (in absolute repaint coords) is unknown until its containing block finished sizing (unless containing block is the paint container). Our current repaint-after-layout logic runs descendants-first which is too early for such flipped writing modes.
In many cases though this is covered up by repaints issued _before_ layout initiated by style or content change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2141610</commentid>
    <comment_count>5</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2025-09-08 07:40:15 -0700</bug_when>
    <thetext>There&apos;s was a workaround added here for this issue: https://github.com/WebKit/WebKit/commit/8896aad97fa3f274318189a550b3e0abb25780ba#diff-905e44c8aef545da6266ae6086148ba389183bff128d9a4eb2bfd9e9987a02e8</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2141627</commentid>
    <comment_count>6</comment_count>
    <who name="">mitz</who>
    <bug_when>2025-09-08 09:38:35 -0700</bug_when>
    <thetext>Just for clarity, the workaround is specifically for some form controls rather than all possible manifestations of this issue, right?</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>112248</attachid>
            <date>2011-10-24 14:32:24 -0700</date>
            <delta_ts>2011-10-24 14:32:24 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>repaint-during-layout-in-flipped-block.html</filename>
            <type>text/html</type>
            <size>141</size>
            <attacher>mitz</attacher>
            
              <data encoding="base64">PGRpdiBzdHlsZT0iLXdlYmtpdC13cml0aW5nLW1vZGU6IGhvcml6b250YWwtYnQ7IC13ZWJraXQt
dXNlci1tb2RpZnk6IHJlYWQtd3JpdGU7Ij4KICAgIDxwPgogICAgICAgIExvcmVtPGJyPgogICAg
ICAgIGlwc3VtLgogICAgPC9wPgo8L2Rpdj4K
</data>

          </attachment>
      

    </bug>

</bugzilla>