[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
Mon Mar 19 11:28:17 PDT 2012


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





--- Comment #3 from Xiaomei Ji <xji at chromium.org>  2012-03-19 11:28:18 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.

changed to "collectBoxes". the other function is removed.

>> Source/WebCore/editing/visible_units.cpp:174
>> +    
> 
> We should probably add a function to find the index of a box in the vector.

done.

>> Source/WebCore/editing/visible_units.cpp:197
>> +    const Vector<InlineBox*>&  leafBoxesInLogicalOrder = rootAndLeafBoxes.collectLeafBoxesInLogicalOrder(root);
> 
> It seems like this local variable is redundant.

The code is changed. Most of the functionalities are encapsulate in CachedRootAndLeafBoxesInLogicalOrder now.

>> Source/WebCore/editing/visible_units.cpp:235
>> +        if (!rootAndLeafBoxes.leafBoxesInLogicalOrder().size())
> 
> We should just add size() to simplify the expression here.

done.

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