Summary: | GraphicsContextSkia draws paths incorrectly | ||
---|---|---|---|
Product: | WebKit | Reporter: | Andrew Scherkus <scherkus> |
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | Normal | CC: | schenney, silviapf |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Description
Andrew Scherkus
2009-10-06 16:55:52 PDT
This is happening in Skia because we only draw rounded borders when the rounding fits into the rectangle. See this code in Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp : Function: void GraphicsContext::fillRoundedRect() if (topLeft.width() + topRight.width() > rect.width() || bottomLeft.width() + bottomRight.width() > rect.width() || topLeft.height() + bottomLeft.height() > rect.height() || topRight.height() + bottomRight.height() > rect.height()) { // Not all the radii fit, return a rect. This matches the behavior of // Path::createRoundedRectangle. Without this we attempt to draw a round // shadow for a square box. fillRect(rect, color, colorSpace); return; } Thus, when the volume slider is too close to 0% or to 100%, the rectangle gets too small to be able to draw the arcs. See bug https://bugs.webkit.org/show_bug.cgi?id=23882 . I don't quite know how to implement the rounded fillers now. Any suggestions? Oh my I filed this bug back waaaaaaay back when I initially was working on the original controls :P Are you still hitting it? I can actually get around this if I make the right side non-rounded underneath the slider thumbs. Also, I have to take the zoomFactor into account. Given all this, it might make sense to re-write this code by introducing a div for the background color and a div for the highlighted buffered range. I'll continue to try in C++ for now. :-) I think we can close this - I have a patch for the video controls that works. |