[Webkit-unassigned] [Bug 23816] Clean up RenderSVGRoot.cpp

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 9 11:10:51 PST 2009


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


eric at webkit.org changed:

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




------- Comment #2 from eric at webkit.org  2009-02-09 11:10 PDT -------
(From update of attachment 27445)
Looks fine.  You could even handle the hasSetContainerSize() case up front. 
That would result in more code, but might be cleaner.

if (svg-> hasSetContainerSize()) { 
   m_viewport = FloatRect(0, 0, width.value(svg), height.value(svg));
   return;
}

Then the rest could be a terinary:

w = (width.unitType() == LengthTypePercent) ? svg->relativeWidthValue() :
width.value(svg);
h = (height.unitType() == LengthTypePercent) ? svg->relativeHeightValue() :
height.value(svg);
m_viewport = FloatRect(0, 0, w, h);

I'm not sure if that's cleaner or not though.  Either way, looks great and
doesn't need any further review.


-- 
Configure bugmail: https://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