WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
30143
GraphicsContextSkia draws paths incorrectly
https://bugs.webkit.org/show_bug.cgi?id=30143
Summary
GraphicsContextSkia draws paths incorrectly
Andrew Scherkus
Reported
2009-10-06 16:55:52 PDT
I experienced this when writing RenderMediaControlsChromium. I would create a rounded rectangle path the add it via addPath() then fill it via fillPath() with alpha blending. It rendered correctly, but mousing over/using scroll wheel on the page would cause the re-fill the area, creating a different appearance. I'm thinking context isn't being saved correctly or something.. I'll try and get a better repro steps.
Attachments
Add attachment
proposed patch, testcase, etc.
Silvia Pfeiffer
Comment 1
2012-06-06 17:17:15 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?
Andrew Scherkus
Comment 2
2012-06-06 17:22:33 PDT
Oh my I filed this bug back waaaaaaay back when I initially was working on the original controls :P Are you still hitting it?
Silvia Pfeiffer
Comment 3
2012-06-06 19:18:22 PDT
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. :-)
Silvia Pfeiffer
Comment 4
2012-06-07 21:18:05 PDT
I think we can close this - I have a patch for the video controls that works.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug