[Webkit-unassigned] [Bug 81408] visual word movement: using cache to decrease the number of collectLeafBoxesInLogicalOrder on RootInlineBox

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 16 14:58:12 PDT 2012


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





--- Comment #2 from Ryosuke Niwa <rniwa at webkit.org>  2012-03-16 14:58:12 PST ---
(From update of attachment 132385)
View in context: https://bugs.webkit.org/attachment.cgi?id=132385&action=review

> Source/WebCore/editing/visible_units.cpp:173
> +    const Vector<InlineBox*>& leafBoxesInLogicalOrder() const { return m_leafBoxes; }

Can we call these functions just "collect" and "boxes"? It's redundant to repeat it in the function names.

> Source/WebCore/editing/visible_units.cpp:174
> +    

We should probably add a function to find the index of a box in the vector.

> Source/WebCore/editing/visible_units.cpp:197
> +    const Vector<InlineBox*>&  leafBoxesInLogicalOrder = rootAndLeafBoxes.collectLeafBoxesInLogicalOrder(root);

It seems like this local variable is redundant.

> Source/WebCore/editing/visible_units.cpp:235
> +        if (!rootAndLeafBoxes.leafBoxesInLogicalOrder().size())

We should just add size() to simplify the expression here.

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