[Webkit-unassigned] [Bug 23816] Clean up RenderSVGRoot.cpp
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Feb 9 12:55:59 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=23816
rwlbuis at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Comment #3 from rwlbuis at gmail.com 2009-02-09 12:55 PDT -------
Hi Eric,
(In reply to comment #2)
> (From update of attachment 27445 [review])
> 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.
Thanks for the thumbs up, I did try to clean it up that way in my final commit.
Cheers,
Rob.
--
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