[Webkit-unassigned] [Bug 52385] [GTK] Move progress bar painting out of gtk2drawing.c

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 18 21:32:54 PST 2011


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





--- Comment #2 from Daniel Bates <dbates at webkit.org>  2011-01-18 21:32:54 PST ---
(From update of attachment 79324)
View in context: https://bugs.webkit.org/attachment.cgi?id=79324&action=review

This won't compile when PROGRESS_TAG is disabled/undefined since calculateProgressRect() is only declared in RenderThemeGtk.h when PROGRESS_TAG is defined.

> Source/WebCore/platform/gtk/RenderThemeGtk.cpp:565
> +void RenderThemeGtk::calculateProgressRect(RenderObject* renderObject, IntRect& rect)

Given the name of this function, it seems a bit weird that this function adjusts the rectangle of the progress bar instead of returning a rectangle.

> Source/WebCore/platform/gtk/RenderThemeGtk.cpp:577
> +    int newWidth = max(2, rect.width() / progressActivityBlocks);

Where does the 2 come from?

> Source/WebCore/platform/gtk/RenderThemeGtk.cpp:581
> +        rect.setX(rect.x() + (animationProgress * 2 * movableWidth));

Where does the 2 come from? The parentheses are not needed for the second addend since multiplication has a higher precedence that addition.

> Source/WebCore/platform/gtk/RenderThemeGtk.cpp:583
> +        rect.setX(rect.x() + ((1.0 - animationProgress) * 2 * movableWidth));

Ditto.

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