[webkit-reviews] review granted: [Bug 81408] visual word movement: using cache to decrease the number of collectLeafBoxesInLogicalOrder on RootInlineBox : [Attachment 132616] patch w/ layout test

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 21 11:50:07 PDT 2012


Ryosuke Niwa <rniwa at webkit.org> has granted Xiaomei Ji <xji at chromium.org>'s
request for review:
Bug 81408: visual word movement: using cache to decrease the number of
collectLeafBoxesInLogicalOrder on RootInlineBox
https://bugs.webkit.org/show_bug.cgi?id=81408

Attachment 132616: patch w/ layout test
https://bugs.webkit.org/attachment.cgi?id=132616&action=review

------- Additional Comments from Ryosuke Niwa <rniwa at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=132616&action=review


r=me provided numOfBoxes is renamed to something else.

> Source/WebCore/editing/visible_units.cpp:160
> +class CachedRootAndLeafBoxesInLogicalOrder {

It might be better to call it CachedLogicallyOrderedLeafBoxes since we're not
exactly caching root inline boxes.
We're caching leaf boxes under a particular root box.

> Source/WebCore/editing/visible_units.cpp:167
> +    size_t numOfBoxes() const { return m_leafBoxes.size(); }

Again, please don't use abbreviations like "num". Here, "size()" or "length()"
would suffice since the class is called CachedRootAndLeafBoxesInLogicalOrder.


More information about the webkit-reviews mailing list