[Webkit-unassigned] [Bug 36948] Refactoring: Position::primaryDirection() should be extracted.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 1 10:28:49 PDT 2010


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


Alexey Proskuryakov <ap at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ap at webkit.org,
                   |                            |mitz at webkit.org




--- Comment #6 from Alexey Proskuryakov <ap at webkit.org>  2010-04-01 10:28:48 PST ---
It's definitely a great change to extract this code into a function. But I'm
not sure if Position is a good place for it. Of all data members in Position,
this code only uses m_node, so I wonder if direction is conceptually a function
of position. It's also easy to confuse with VisiblePosition affinity.

On the other hand, it's only used in Position and VisiblePosition code. Hmm.

+    for (const RenderObject* r = node()->renderer(); r; r = r->parent()) {

We don't usually use accessor functions in class implementation, should
preferably be m_anchorNode->renderer().

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