[Webkit-unassigned] [Bug 60409] Convert x, y and width, height pairs to IntPoint and IntSize for RenderLayer

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 6 23:08:33 PDT 2011


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


Eric Seidel <eric at webkit.org> changed:

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




--- Comment #8 from Eric Seidel <eric at webkit.org>  2011-05-06 23:08:33 PST ---
(From update of attachment 92670)
View in context: https://bugs.webkit.org/attachment.cgi?id=92670&action=review

Looks great to me!  But I think we should leave Simon (or someone else familiar with layers) a day to comment if they care.

> Source/WebCore/rendering/RenderLayer.cpp:722
> +        m_relativeOffset.setWidth(0);
> +        m_relativeOffset.setHeight(0);

You could just do m_relativeOffset = IntSize(), no?  Or maybe intSize() has a clear() method?  I figure this can be expressed in one line regardless. :)

> Source/WebCore/rendering/RenderLayer.h:215
> +    int x() const { return m_topLeft.x(); }
> +    int y() const { return m_topLeft.y(); }

I feel like there was some concern brought up about using "topLeft" in the InlineBox patch I wrote like this... something about how things might not always be "top" or "left".   But that may not apply to layers... I think it was relating to vertical text.

> Source/WebCore/rendering/RenderLayer.h:219
> +        m_topLeft.setX(x);
> +        m_topLeft.setY(y);

I suspect there is a one-line equivalent.  m_topLeft = IntPoint(x, y); would be one way. :)

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