[Webkit-unassigned] [Bug 116926] New: Node::lazyAttach shouldn't lie about being attached
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed May 29 00:43:32 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=116926
Summary: Node::lazyAttach shouldn't lie about being attached
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Keywords: BlinkMergeCandidate
Severity: Normal
Priority: P2
Component: Layout and Rendering
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: rniwa at webkit.org
CC: hyatt at apple.com, koivisto at iki.fi,
simon.fraser at apple.com, akling at apple.com
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().
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list