[Webkit-unassigned] [Bug 103510] Reduce the children repaints when moved multiple times during the layout

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 29 10:02:19 PST 2012


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





--- Comment #4 from Tony Chang <tony at chromium.org>  2012-11-29 10:04:34 PST ---
(From update of attachment 176463)
View in context: https://bugs.webkit.org/attachment.cgi?id=176463&action=review

> Source/WebCore/rendering/RenderFlexibleBox.cpp:385
> +        if (!selfNeedsLayout() && child->checkForRepaintDuringLayout())
> +            child->repaintDuringLayoutIfMoved(childrenOldRects.get(child));

We should also make sure that the old position is different from the current position before repainting.

>>> Source/WebCore/rendering/RenderFlexibleBox.h:81
>>> +    typedef WTF::HashMap<const RenderBox*, LayoutRect> ChildrenFrameRect;
>> 
>> Can we use a Vector<LayoutRect> instead of a HashMap?
> 
> I used a hash map, because I'm iterating the children using the flexbox order, I'm not sure if it's important to repaint in that order, though.

That's a good point, we have to iterate the children using the flexbox order.  The existing order-painting.html test might cover this?  Should be easy to test.

I guess we don't have the order iterator when you saved the child boxes. Hmm, I think we could save the child boxes right before layoutFlexItems() and I think this will still work.

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