<?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>116926</bug_id>
          
          <creation_ts>2013-05-29 00:42:02 -0700</creation_ts>
          <short_desc>Node::lazyAttach shouldn&apos;t lie about being attached</short_desc>
          <delta_ts>2022-09-28 15:39:08 -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>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BlinkMergeCandidate</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>111494</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Ryosuke Niwa">rniwa</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>hyatt</cc>
    
    <cc>kling</cc>
    
    <cc>koivisto</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>894734</commentid>
    <comment_count>0</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2013-05-29 00:42:02 -0700</bug_when>
    <thetext>Consider merging https://chromium.googlesource.com/chromium/blink/+/727ede4b077539383452ab020184714e45a3f5a2

lazyAttach just needs to mark the node as needing a style recalc, there&apos;s no reason
to mark the node as attached, or mark all the descendants as being attached. We also
don&apos;t need to mark all descendants as needing a style recalc since Element::recalcStyle
is going to transform the StyleChange into a Force when it goes to descendants.

Now lazyAttach just marks you as needing a FullStyleChange and the later recalcStyle
will mark you as attached. This means that after this patch attached() is equivalent to
&quot;ever had style recalc&quot;. In a future patch we should rename that flag.

A benefit of this patch is that doing appendChild(divWithLotsOfDescendants); now does 2
fewer walks of the descendants because we don&apos;t need to mark them all as attached in
lazyAttach, and we don&apos;t need to run detach() in recalcStyle() when it calls reattach.

Another benefit is that Node::attach is no longer n^2 when you append many elements
without any whitespace between them because the loop to fix up whitespace can bail
out early when it sees !next-&gt;attached().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>898956</commentid>
    <comment_count>1</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2013-06-10 18:36:54 -0700</bug_when>
    <thetext>Reverted in https://chromium.googlesource.com/chromium/blink/+/5dcf89e40eccdc2d1ce6bd363a1affb056022822</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1901887</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-09-28 15:39:08 -0700</bug_when>
    <thetext>lazyAttach is not something Webkit has and removed long time ago.

Hence, this is not required.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>