<?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>135106</bug_id>
          
          <creation_ts>2014-07-20 16:45:50 -0700</creation_ts>
          <short_desc>Inline box culling breaks node snapshotting</short_desc>
          <delta_ts>2025-04-02 16:02:31 -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>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>mitz</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>hyatt</cc>
    
    <cc>karlcow</cc>
    
    <cc>pangle</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>1023568</commentid>
    <comment_count>0</comment_count>
      <attachid>235193</attachid>
    <who name="">mitz</who>
    <bug_when>2014-07-20 16:45:50 -0700</bug_when>
    <thetext>Created attachment 235193
Test case

In the test case, when you drag the first span, the drag snapshot is correct. When you drag the second span, the snapshot is empty.

The reason is that the snapshots are made by setting PaintInfo’s subtreePaintRoot to span’s RenderInline, but since the second span doesn’t have inline boxes, we never hit the (subtreePaintRoot == renderer) case in PaintInfo::updateSubtreePaintRootForChildren() when it’s called from InlineFlowBox::paint, so the subtree root is never cleared and nothing paints.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1023575</commentid>
    <comment_count>1</comment_count>
    <who name="">mitz</who>
    <bug_when>2014-07-20 17:28:09 -0700</bug_when>
    <thetext>My idea for fixing this is to add another RenderObject* member to PaintInfo, which will contain the nearest ancestor of the subtreePaintRoot that isn’t a RenderInline with culled boxes, and whenever we are in that object’s subtree, do a more expensive shouldPaintWithinRoot() check.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1088003</commentid>
    <comment_count>2</comment_count>
    <who name="">mitz</who>
    <bug_when>2015-04-23 14:30:12 -0700</bug_when>
    <thetext>To see the bug you may need to undo the workaround from &lt;http://trac.webkit.org/r171284&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1770448</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-06-16 15:49:08 -0700</bug_when>
    <thetext>&lt;rdar://problem/79420098&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2108328</commentid>
    <comment_count>4</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2025-04-02 15:46:05 -0700</bug_when>
    <thetext>I can drag on STP 125 both boxes. 
but I can not drag them on Firefox and Chrome. Instead a selection is done. 

What is the expectation? Should they be draggable at all?

The testcase code relies on 
&lt;span style=&quot;-webkit-user-drag: element; vertical-align: bottom;&quot;&gt;Drag me, I have an inline box!&lt;/span&gt;

Ha this is a non documented safari only feature.
https://developer.mozilla.org/en-US/docs/Web/CSS/WebKit_Extensions


but fwiw with regards to this bug, the snapshot is happening on both cases. So this is &quot;fixed&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2108342</commentid>
    <comment_count>5</comment_count>
    <who name="">mitz</who>
    <bug_when>2025-04-02 16:02:31 -0700</bug_when>
    <thetext>&gt; I can drag on STP 125 both boxes. 

As noted in comment 3, this could be due to some form of the workaround from &lt;http://trac.webkit.org/r171284&gt; still being in place. However, that was undone in https://commits.webkit.org/241510@main, presumably along with fixing this bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>235193</attachid>
            <date>2014-07-20 16:45:50 -0700</date>
            <delta_ts>2014-07-20 16:45:50 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>scratch.html</filename>
            <type>text/html</type>
            <size>188</size>
            <attacher>mitz</attacher>
            
              <data encoding="base64">PHA+CiAgICA8c3BhbiBzdHlsZT0iLXdlYmtpdC11c2VyLWRyYWc6IGVsZW1lbnQ7IHZlcnRpY2Fs
LWFsaWduOiBib3R0b207Ij5EcmFnIG1lLCBJIGhhdmUgYW4gaW5saW5lIGJveCE8L3NwYW4+Cjwv
cD4KPHA+CiAgICA8c3BhbiBzdHlsZT0iLXdlYmtpdC11c2VyLWRyYWc6IGVsZW1lbnQ7Ij5EcmFn
IG1lITwvc3Bhbj4KPC9wPgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>