[Webkit-unassigned] [Bug 17172] Refactor platform checks in ScrollView.h

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 6 06:44:21 PST 2008


http://bugs.webkit.org/show_bug.cgi?id=17172


darin at apple.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #18957|review?                     |review+
               Flag|                            |




------- Comment #5 from darin at apple.com  2008-02-06 06:44 PDT -------
(From update of attachment 18957)
r=me

+IntRect ScrollView::contentsToWindow(const IntRect& rect) const
+{
+    return IntRect(contentsToWindow(rect.location()), rect.size());
+}
+
+IntRect ScrollView::windowToContents(const IntRect& rect) const
+{
+    return IntRect(windowToContents(rect.location()), rect.size());
+}

It's unfortunate we now have 3 copies of these functions. I would have
preferred a single copy either in a shared ScrollView.cpp file with a proper
ifdef or as an inline in the header file (not in the class definition, though).
I feel the same way about other copied and pasted code that's in multiple
platform files.

-    return &m_data->children;
+    return &(m_data->children);

I personally don't think this change is an improvement.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list