WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
116926
Node::lazyAttach shouldn't lie about being attached
https://bugs.webkit.org/show_bug.cgi?id=116926
Summary
Node::lazyAttach shouldn't lie about being attached
Ryosuke Niwa
Reported
2013-05-29 00:42:02 PDT
Consider merging
https://chromium.googlesource.com/chromium/blink/+/727ede4b077539383452ab020184714e45a3f5a2
lazyAttach just needs to mark the node as needing a style recalc, there's no reason to mark the node as attached, or mark all the descendants as being attached. We also don'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 "ever had style recalc". 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't need to mark them all as attached in lazyAttach, and we don'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->attached().
Attachments
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2013-06-10 18:36:54 PDT
Reverted in
https://chromium.googlesource.com/chromium/blink/+/5dcf89e40eccdc2d1ce6bd363a1affb056022822
Ahmad Saleem
Comment 2
2022-09-28 15:39:08 PDT
lazyAttach is not something Webkit has and removed long time ago. Hence, this is not required.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug