[Webkit-unassigned] [Bug 4334] REGRESSION: Flickering when css-hover should change opacity on floating elements

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Tue Jun 6 09:50:46 PDT 2006


http://bugzilla.opendarwin.org/show_bug.cgi?id=4334





------- Comment #14 from darin at apple.com  2006-06-06 09:50 PDT -------
(From update of attachment 8727)
This patch probably needs to be reviewed by Hyatt. I don't understand the
issues well enough to review its behavior.

+                RenderObject* o = parent();
+                while (o && (!lastBlock || !o->layer())) {
+                    if (o->isRenderBlock())
+                        lastBlock = o;
+                    o = o->parent();
+                }

I think this reads better as a for loop.  I'd also make lastBlock be a
RenderBlock* to put the cast to RenderBlock closer to the isRenderBlock call.

    for (RenderObject* o = parent(); o; o = o->parent()) {
        if (lastBlock && o->layer())
            break;
        if (o->isRenderBlock())
            lastBlock = static_cast<RenderBlock*>(o);
    }

For me, it's easier to see what the loop is doing in this form. And since this
code appears twice, I think it should be factored out into a helper function.
It probably doesn't need to be a member function.


-- 
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list