[Webkit-unassigned] [Bug 46761] Remove calls to Document::updateStyleForAllDocuments()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 18 18:21:36 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=46761





--- Comment #13 from Eric Seidel <eric at webkit.org>  2011-01-18 18:21:35 PST ---
(In reply to comment #12)
> I thought making the HTML parser use lazyAttach() (bug 47316) would fix my issue. It didn't. This is because we end up with the following (partial) dom tree
> 
> *    #text    0x1059da2c0 "PASS"
>     BR    0x1059c2c90
>     #text    0x113ec25f0 "\n\n"
> 
> At this point all 3 nodes are attached via lazyAttach() but none have a renderer. We start by calculating style for the PASS element and we create its renderer. And then we come to Node::attach(). The loop in Node::attach() looks at the nodes siblings and decides to create the renderer for the empty text node. And since the BR node has not been created (i.e. its renderer is NULL), the optimization in Text::rendererIsNeeded() eludes us again. The order for creating renderers is 
> 
> - PASS text node
> - empty text node
> - BR node

It seems like the optimization in Text::rendererIsNeeded() is wrong and is thus being defeated here.

One "fix" would be to make that check require that style is resolved first (I'm not sure that's safe or a good idea though).  But I'm wondering why the check is needed in the first place.

Have we tested to see what Firefox's behavior here is?  Do they create an empty renderer?

I'm not sure this "regression" matters much in practice.  If this is the worse consequence of removing updateStyleForAllDocuments() I would just remove it. :)   However I also support further investigation.

-- 
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